Skip to content

chore: add claude-opus-4-8 to claudecode DefaultModels#1739

Merged
looplj merged 1 commit into
looplj:unstablefrom
qinkangdeid:feat/opus-4-8
May 29, 2026
Merged

chore: add claude-opus-4-8 to claudecode DefaultModels#1739
looplj merged 1 commit into
looplj:unstablefrom
qinkangdeid:feat/opus-4-8

Conversation

@qinkangdeid

Copy link
Copy Markdown
Contributor

Claude Opus 4.8 was released on 2026-05-28, but claudecode.DefaultModels() still tops out at claude-opus-4-7.

Channels of type claudecode (Claude MAX OAuth) short-circuit FetchModels and return this hardcoded list (internal/server/biz/model_fetcher.gogetDefaultModelsByType(TypeClaudecode)), so the UI never surfaces 4-8 and the orchestrator route table rejects requests with HTTP 422 model not found: claude-opus-4-8. Newer Claude Code clients now default to claude-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 supportedModels picks up claude-opus-4-8 from FetchModels returns HTTP 200 from api.anthropic.com/v1/messages when Claude Code clients request claude-opus-4-8.

@greptile-apps

greptile-apps Bot commented May 29, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds claude-opus-4-8 to the DefaultModels() list in llm/transformer/anthropic/claudecode/constants.go, which is the hardcoded model catalog returned by claudecode-type channels (Claude MAX OAuth) when FetchModels is short-circuited. Without this entry, newer Claude Code clients that default to claude-opus-4-8 receive an HTTP 422 "model not found" error against any Claude MAX channel.

  • Appends \"claude-opus-4-8\" as a single string entry in the DefaultModels() slice, matching the exact pattern established by prior additions (claude-opus-4-7, claude-opus-4-6, etc.).
  • No logic, routing, or configuration changes; the fix is entirely contained in this one-line constant list update.

Confidence Score: 5/5

Safe 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

Filename Overview
llm/transformer/anthropic/claudecode/constants.go Adds claude-opus-4-8 to the hardcoded default models list used by claudecode (Claude MAX OAuth) channels to serve model discovery without hitting the upstream API.

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]
Loading

Reviews (1): Last reviewed commit: "chore: add claude-opus-4-8 to claudecode..." | Re-trigger Greptile

@looplj looplj merged commit 483719b into looplj:unstable May 29, 2026
4 checks passed
junjiangao pushed a commit to junjiangao/axonhub that referenced this pull request May 30, 2026
Co-authored-by: qinkangdeid <qinkangdeid@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants