t3code icon indicating copy to clipboard operation
t3code copied to clipboard

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

Open S4AR-inc opened this issue 1 month ago • 1 comments

Before submitting

  • [x] I searched existing issues and did not find a duplicate.
  • [x] 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

S4AR-inc avatar Oct 20 '26 13:10 S4AR-inc

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

juliusmarminge avatar Oct 21 '26 22:10 juliusmarminge