Skip to content

Anthropic provider with custom base URL ignores custom model name, sends 'claude-sonnet-4-5' instead #12062

@cobra91

Description

@cobra91

Bug Description

When configuring Anthropic as the API provider with a custom base URL (e.g., http://localhost:3000/api) and entering a custom model name in the model field, the custom model name is ignored. Instead, the request always sends claude-sonnet-4-5 as the model identifier, regardless of what was entered.

Steps to Reproduce

  1. Open Roo Code settings
  2. Select Anthropic as the API Provider
  3. Set a custom Base URL (e.g., http://localhost:3000/api)
  4. Enter a custom model name in the model field (e.g., qwen/qwen3.6-plus or any other value)
  5. Save and start a conversation
  6. Observe the outgoing request body

Expected Behavior

The request body sent to the custom endpoint should contain the custom model name:

{
  "model": "qwen/qwen3.6-plus",
  ...
}

Actual Behavior

The request body always contains the hardcoded default:

{
  "model": "claude-sonnet-4-5",
  ...
}

Evidence

Captured request body from Roo Code hitting a local Anthropic-compatible proxy:

{
  "model": "claude-sonnet-4-5",
  "max_tokens": 16384,
  "temperature": 1,
  "thinking": {
    "type": "enabled",
    "budget_tokens": 8192
  },
  ...
}

The model field is always claude-sonnet-4-5 regardless of the custom model name entered in settings.

Environment

  • OS: Windows 11
  • VS Code version: latest
  • Roo Code version: latest
  • API Provider: Anthropic (custom base URL)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions