[BUG] Custom agents can no longer use custom models

Resolved 💬 4 comments Opened Oct 14, 2025 by cooksimo Closed Jan 8, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

I have a custom agent that was working perfectly via out LiteLLM proxy. This requires a custom model in the agent to work (since it only works with models supported by our LiteLLM setup. This was working yesterday but is no longer working today.

What Should Happen?

It should respect my model selection and use what I have specified

Error Messages/Logs

[DEBUG] Agent file xxx/agents/code-reviewer.md has invalid model 'gemini-2.5-pro'. Valid options: sonnet, opus, haiku,
  sonnet[1m], opusplan, inherit

Steps to Reproduce

  1. Create a custom agent that specifies a custom model
  2. The agent will not attempt to use the custom model

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.0.11

Claude Code Version

2.0.14

Platform

Other

Operating System

macOS

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗