[BUG] Spurious "Claude Opus 4 retired" banner when using custom Opus 4.8 model id via proxy
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?
The retirement banner Claude Opus 4 retired June 15, 2026 · /model to switch shows persistently even though my configured and effective model is Opus 4.8, not the retired Opus 4.
What Should Happen?
Expected: no retirement warning, since 4.8 is current.
Actual: the deprecation check appears to match on the "Opus 4" family/prefix and flags the custom Claude-Opus-4.8 id
as retired. Please make the retirement check match exact retired model ids rather than a loose family/prefix match, so
custom/proxied model names like Claude-Opus-4.8 aren't falsely flagged.
Error Messages/Logs
Steps to Reproduce
Setup:
- ANTHROPIC_BASE_URL points to a corporate proxy
- Model configured via env in settings.json: ANTHROPIC_MODEL=Claude-Opus-4.8,
ANTHROPIC_DEFAULT_OPUS_MODEL=Claude-Opus-4.8
- "model": "opus" alias in settings.json
Verified there is no stray ANTHROPIC_MODEL override in any shell profile or OS env var. The active session reports
Opus 4.8.
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.197
Platform
Other
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
_No response_