-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
isModelNotFoundErrorMessage does not match "Not supported model" error format #92118
Copy link
Copy link
Closed
Closed
Copy link
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Priority
None yet
Description
isModelNotFoundErrorMessage()insrc/agents/live-model-errors.tsdoes not recognize the error format"Not supported model <model-id>"returned by some OpenAI-compatible providers (e.g. internal gateways that proxy multiple model backends).This causes the error to fall through to
isSchemaErrorMessage()→ classified as"schema"→ user sees:instead of the correct model-not-found handling.
Steps to reproduce
{"error":{"code":"400","message":"Param Incorrect","param":"Not supported model some-model-id"}}Expected behavior
The error should be classified as
"model_not_found"and displayed as a model configuration issue, not a schema/tool payload rejection.Root cause
isModelNotFoundErrorMessage()handles patterns like:"model not found""unknown model""invalid model""model does not exist"But NOT
"Not supported model xxx"— a format used by some Chinese cloud provider gateways (Xiaomi MiFY, etc.).Suggested fix
Add one line to
src/agents/live-model-errors.ts:This pattern is unambiguous and won't false-positive on other error types.
Impact
Without this fix, any user on a provider that returns this error format will: