fix: add missing_key error kind for missing chat api_key_id (#25783)

Refs CODAGT-486

- `codersdk/chats.go`: New `ChatErrorKindMissingKey` constant and
`AllChatErrorKinds` entry
- `coderd/x/chatd/chaterror/message.go`: `terminalMessage` and
`retryMessage` cases
- `coderd/x/chatd/model_routing_aibridge.go`: Pre-classify error with
`WithClassification`
- `coderd/x/chatd/model_routing_internal_test.go`: Classification
assertion on production path (CRF-2)
- `chatStatusHelpers.ts`: Frontend title "Chat interrupted"
- `LiveStreamTail.stories.tsx`: Storybook story with `detail` assertion
- `docs/ai-coder/ai-gateway/clients/coder-agents.md`: Troubleshooting
entry
- Tests: classification round-trip, terminal message, metrics kind
enumeration

> Generated with [Coder Agents](https://coder.com/agents) on behalf of
@johnstcn
This commit is contained in:
Cian Johnston
2026-05-28 15:50:52 +01:00
committed by GitHub
parent ea280c5a90
commit 6df1536256
15 changed files with 119 additions and 15 deletions
+4 -2
View File
@@ -14904,7 +14904,8 @@
"startup_timeout",
"auth",
"config",
"usage_limit"
"usage_limit",
"missing_key"
],
"x-enum-varnames": [
"ChatErrorKindGeneric",
@@ -14914,7 +14915,8 @@
"ChatErrorKindStartupTimeout",
"ChatErrorKindAuth",
"ChatErrorKindConfig",
"ChatErrorKindUsageLimit"
"ChatErrorKindUsageLimit",
"ChatErrorKindMissingKey"
]
},
"codersdk.ChatFileMetadata": {