chore: add claude-opus-4-7 to claudecode DefaultModels#1733
Conversation
Claude Code 2.x ships claude-opus-4-7 as a first-class model, but `claudecode.DefaultModels()` still tops out at 4-6 / sonnet-4-6. As a result, channels of type `claudecode` (Claude MAX OAuth) cannot expose 4-7 via the UI's FetchModels probe — supportedModels never gets the new entry, so the orchestrator route table rejects requests with HTTP 422 `model not found: claude-opus-4-7`. Same one-line shape as looplj#1605 (gpt-5.5 for codex) and looplj#1006 (gpt-5.4). **Tested locally**: with this change, a Claude MAX OAuth channel whose supportedModels gets claude-opus-4-7 from FetchModels returns HTTP 200 from api.anthropic.com/v1/messages when claude code clients request claude-opus-4-7.
|
End-to-end verified after manually appending So the route works end-to-end against |
Greptile SummaryThis PR adds
Confidence Score: 5/5Safe to merge — one-line addition to a static list with no logic changes. The change is a single string appended to a hardcoded slice. The model ID matches what's already registered in providers.json, the surrounding list follows the same dateless-suffix convention used for 4-6 models, and there are no control-flow, auth, or data-path changes involved. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant CC as Claude Code Client
participant AH as AxonHub Orchestrator
participant MF as ModelFetcher (biz)
participant DM as DefaultModels()
participant API as api.anthropic.com
CC->>AH: Request models list (OAuth/MAX channel)
AH->>MF: FetchModels(TypeClaudecode)
MF->>MF: tryReturnDefaultModels()
MF->>DM: claudecode.DefaultModels()
DM-->>MF: [..., "claude-opus-4-6", "claude-sonnet-4-6", "claude-opus-4-7"]
MF-->>AH: ModelIdentify list
AH-->>CC: supportedModels includes claude-opus-4-7
CC->>AH: POST /v1/messages (model: claude-opus-4-7)
AH->>AH: Route lookup — model found
AH->>API: Proxy request
API-->>AH: 200 OK
AH-->>CC: 200 OK
Reviews (1): Last reviewed commit: "chore: add claude-opus-4-7 to claudecode..." | Re-trigger Greptile |
…ge title config, request filter preservation, structured response items Upstream commits merged: - fix: model settings dialog overflow (looplj#1716) - chore: custom page title config after login (looplj#1720) - feat: preserve request log filters on detail navigation (looplj#1723) - feat(llm): support responses websocket sessions (looplj#1730) - chore: add claude-opus-4-7 to claudecode DefaultModels (looplj#1733) - fix(channels): show real i18n label for single-variant types (looplj#1734) - fix(llm): accept structured response item arguments (looplj#1728) Resolved 4 import-path conflicts (looplj -> ldm2060) and adapted session scope integration in auth middleware. Fixed Windows flaky WebSocket test for platform-specific socket error messages. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Claude Code 2.x ships claude-opus-4-7 as a first-class model, but `claudecode.DefaultModels()` still tops out at 4-6 / sonnet-4-6. As a result, channels of type `claudecode` (Claude MAX OAuth) cannot expose 4-7 via the UI's FetchModels probe — supportedModels never gets the new entry, so the orchestrator route table rejects requests with HTTP 422 `model not found: claude-opus-4-7`. Same one-line shape as looplj#1605 (gpt-5.5 for codex) and looplj#1006 (gpt-5.4). **Tested locally**: with this change, a Claude MAX OAuth channel whose supportedModels gets claude-opus-4-7 from FetchModels returns HTTP 200 from api.anthropic.com/v1/messages when claude code clients request claude-opus-4-7. Co-authored-by: qinkangdeid <qinkangdeid@gmail.com>
Claude Code 2.x lists
claude-opus-4-7as a first-class model, butclaudecode.DefaultModels()still tops out atclaude-opus-4-6/claude-sonnet-4-6.Because
FetchModelsshort-circuits on OAuth claudecode channels and returns this hardcoded list (internal/server/biz/model_fetcher.go→getDefaultModelsByType(TypeClaudecode)), the UI cannot surface 4-7 on a Claude MAX channel. The orchestrator route table then rejects requests for that model with422 model not found: claude-opus-4-7.Change: one-line addition to
llm/transformer/anthropic/claudecode/constants.go'sDefaultModels(), same shape as #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-7fromFetchModelsreturns HTTP 200 fromapi.anthropic.com/v1/messageswhen Claude Code clients requestclaude-opus-4-7.Reference
quotaCheckModelis stillclaude-haiku-4-5(not touched here; 4.5 remains Haiku's current top)