You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: Coder Agents shows a Coder-budget message for provider billing and quota errors #32101
Coder Agents maps provider failures to generic error kinds, and the terminal message for some kinds points admins at the wrong cause.
Example: an OpenAI "You have no credits remaining" error (a billing problem on the OpenAI account) is shown as:
The AI usage limit has been exceeded. Contact an administrator or check the applicable budget and quota settings.
That reads like a Coder budget or quota limit. In coderd/x/chatd/chaterror/message.go, ChatErrorKindUsageLimit returns this fixed string and, unlike rate limit, auth, and config errors, doesn't name the provider. Since #25676, provider quota and billing errors (for example insufficient_quota) are classified as usage_limit, so they all get this message. Coder's own spend limits are reported with the same kind, so the two causes look identical in the UI.
The provider's original text is preserved in ClassifiedError.Detail, but the headline message is what admins act on.
Expected Behavior
Provider-side quota and billing errors name the provider and point to the provider account, for example: "OpenAI reports that the account's usage quota or credits are exhausted. Check billing for the provider account."
Coder-side budget and usage limits keep a message that points to Coder's settings.
Ideally, the provider's detail text is shown alongside the message for these errors.
It may be worth auditing the other generic kinds for similar mismatches.
Steps to Reproduce
Configure Coder Agents with an OpenAI provider whose account has no remaining credits.
Send a message in a Coder Agents chat.
The chat fails with "The AI usage limit has been exceeded. Contact an administrator or check the applicable budget and quota settings."
Environment
Coder version: reproduced by a user on a recent release; the message is unchanged on main as of 2026-11-12.
Activity
linear-code commentedon Nov 12, 2026
ENG-3536