Skip to content

[BUG] Requests silently use a fallback model when the selected model is unknown #2831

In progress

Description

@zoomote

Problem (one or two sentences)

When the selected model ID is not in a provider's model registry, Zoo Code silently sends the request with a fallback model. The error message then refers to a model the user did not select.

Context (who is affected and when)

Affects any provider that resolves models through a registry with a default fallback. Amazon Bedrock is the confirmed instance. It happens when the requested model ID or custom ARN is missing from the registry. The user then debugs tokens, IAM, and regions for the wrong model.

Observed case: amazon.ergo-1.0 was missing from the Bedrock registry (#2814). getModelById fell back to bedrockDefaultModelId (anthropic.claude-sonnet-4-5-20250929-v1:0). Bedrock denied the request with "You don't have access to the model specified", because IAM only allowed ergo-1.0. The reporter also saw errors about an unsigned Anthropic request document, because the fallback target was a Claude model. Registered models worked. AWS sample code with the same credentials worked. CloudTrail showed the fallback model ID in the denied request.

#2815 fixes the ergo registry gap. This issue tracks the generic silent fallback.

Related closed reports of fallback confusion: #418, #992.

Reproduction steps

  1. Environment: VS Code extension, Amazon Bedrock provider, IAM scoped to amazon.ergo-1.0 (registry before Fix Amazon Ergo 1.0 routing and prices in Bedrock #2815).
  2. Select amazon.ergo-1.0, or a custom foundation-model ARN for it. Send a request.
  3. The registry lookup misses. The request goes out with anthropic.claude-sonnet-4-5-20250929-v1:0.
  4. Bedrock returns: "You don't have access to the model specified."
  5. The logs do not show which model ID left the client.

Expected result

The extension shows an error when the requested model ID cannot be resolved. The error names the requested model and the resolved model. No request leaves the client with a silently substituted model.

Actual result

The request leaves the client with the fallback model. Errors point at the fallback model. Logs do not name the substitution.

Variations tried

Same credentials in AWS sample code work. Other registered Amazon models work in the extension. CloudTrail confirms the fallback model ID in the denied request.

App Version

v3.98.3

API Provider (optional)

Not Applicable / Other

Model Used (optional)

N/A

Zoo Code Task Links (optional)

N/A

Relevant logs or errors

Provider ended the request: You don't have access to the model specified.

Second reported symptom, paraphrased: errors about not signing the Anthropic request document, although no Anthropic model was selected.

Suggested direction

  • Fail the request with an actionable error when the registry lookup misses. Name the requested ID and the provider.
  • Or warn loudly at resolve time. Show requested and resolved model IDs.
  • Keep ARN passthrough for non-foundation-model ARNs.
  • Apply the behavior to all providers with registry-plus-default resolution, not only Bedrock.

Activity

  1. added
    bug
    on Dec 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions