chore: add claude-opus-4-8 to claudecode DefaultModels#1739
Conversation
Greptile SummaryThis PR adds
Confidence Score: 5/5Safe to merge — a single string appended to a static list with no effect on existing entries or other code paths. The change is one line in a pure data function that returns a hardcoded slice. It cannot break existing model routing, and the new entry is only surfaced when a client explicitly requests claude-opus-4-8. The same pattern was used successfully in prior PRs for 4-7 and earlier models. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Claude Code Client requests claude-opus-4-8] --> B{Channel Type?}
B -->|claudecode Claude MAX OAuth| C[tryReturnDefaultModels]
B -->|other| D[FetchModels via API]
C --> E[getDefaultModelsByType TypeClaudecode]
E --> F[claudecode.DefaultModels]
F --> G[Returns hardcoded model list including claude-opus-4-8]
G -->|model found| H[HTTP 200 routed to api.anthropic.com]
G -->|model missing before this PR| I[HTTP 422 model not found]
Reviews (1): Last reviewed commit: "chore: add claude-opus-4-8 to claudecode..." | Re-trigger Greptile |
Co-authored-by: qinkangdeid <qinkangdeid@users.noreply.github.com>
Claude Opus 4.8 was released on 2026-05-28, but
claudecode.DefaultModels()still tops out atclaude-opus-4-7.Channels of type
claudecode(Claude MAX OAuth) short-circuitFetchModelsand return this hardcoded list (internal/server/biz/model_fetcher.go→getDefaultModelsByType(TypeClaudecode)), so the UI never surfaces 4-8 and the orchestrator route table rejects requests with HTTP 422model not found: claude-opus-4-8. Newer Claude Code clients now default toclaude-opus-4-8, so they fail out of the box against a Claude MAX channel.Same one-line shape as #1733 (claude-opus-4-7), #1605 (gpt-5.5 for codex) and #1006 (gpt-5.4).
Tested locally: with this change, a Claude MAX OAuth channel whose
supportedModelspicks upclaude-opus-4-8fromFetchModelsreturns HTTP 200 fromapi.anthropic.com/v1/messageswhen Claude Code clients requestclaude-opus-4-8.