镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

[Bug]: Claude doesn't use custom model when the name collides with a model alias #22326

Closed

Description

@S4AR-inc

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

  1. Run litellm proxy(or any other proxy/model runner with custom naming) and configure a model with the name "opus"
  2. Configure Claude code to the litellm url
  3. Add "opus" as a model in t3 code
  4. Send a message, the message will be sent to opus-5-5 and you should get an error

Expected behavior

The message should use that custom model instead of resolving an opus alias

Actual behavior

The request is sent to opus-5-5. This is caused because ClaudeAdapterV2 makeClaudeQueryOptions doesn't pass a catalog to compileClaudeModelSelection. This causes resolveClaudeCatalogApiModelId to resolve opus-5-5 from the bundled catalog and fallback to model name when not found so it works when the custom model name doesn't collide with an alias.

ClaudeTextGeneration makeClaudeTextGeneration does work correctly by calling scopeClaudeModelCatalog which solves the alias problem

Impact

Blocks work completely

Version or commit

0.1.0

Environment

Linux

Logs or stack traces

Screenshots, recordings, or supporting files

No response

Workaround

Claude patched the binary for me changing the opus alias to xpus

Activity

  1. added
    bugSomething is broken or behaving incorrectly.
    needs-triageIssue needs maintainer review and initial categorization.
    on Oct 20, 2026
  2. changed the title [-][Bug]:[/-] [+][Bug]: Claude doesn't use custom model when the name collides with a model alias[/+] on Oct 20, 2026
  3. juliusmarminge commented on Oct 21, 2026

    @juliusmarminge
    Member

    Reproduced on Linux, main 70e5e384da, web dev app with Claude CLI 2.1.303. Added custom opus, selected it in a fresh thread, and sent a message through a local recording proxy. The proxy received claude-opus-5-5; custom xpus reached it unchanged.

    Request transcript

    Custom opus selected; proxy receives claude-opus-5-5

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

    bugSomething is broken or behaving incorrectly.needs-triageIssue needs maintainer review and initial categorization.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions