Skip to content

HTTP 400: Model ID without provider prefix not auto-resolved (e.g. claude-sonnet-4-6 vs anthropic/claude-sonnet-4.6) #74

@AdamPeacemaker

Description

@AdamPeacemaker

Bug Description

When a user configures a model using the short-form ID (without the provider prefix), OpenRouter returns a non-descriptive HTTP 400 error instead of either auto-resolving the model name or returning a helpful suggestion.

Steps to Reproduce

  1. Set the model to claude-sonnet-4-6 (Anthropic's own naming convention, without prefix)
  2. Make an API request to https://openrouter.ai/api/v1/chat/completions
  3. Receive HTTP 400 with message: claude-sonnet-4-6 is not a valid model ID

Expected Behavior

One of the following:

  • Auto-resolve: OpenRouter knows the model belongs to Anthropic, so it should map claude-sonnet-4-6anthropic/claude-sonnet-4.6 automatically
  • Helpful error: Return a suggestion like: 'claude-sonnet-4-6' is not a valid model ID. Did you mean 'anthropic/claude-sonnet-4.6'?

Actual Behavior

{
  "error": {
    "message": "claude-sonnet-4-6 is not a valid model ID",
    "code": 400
  }
}

No hint as to what the correct format should be.

Why This Matters

Users migrating from the direct Anthropic API are used to model IDs like claude-sonnet-4-6 (no prefix). When they switch to OpenRouter, they naturally copy the same model name and hit this silent failure. The fix is trivial on OpenRouter's side — the mapping between short names and full IDs is already known internally.

This is a common friction point that generates unnecessary support load and confusion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions