[Bug]: Claude doesn't use custom model when the name collides with a model alias
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
- Run litellm proxy(or any other proxy/model runner with custom naming) and configure a model with the name "opus"
- Configure Claude code to the litellm url
- Add "opus" as a model in t3 code
- 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
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.
