Repository navigation
Add Claude Opus 4.7 to Claude Code OAuth models - #1347
Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
There was a problem hiding this comment.
Pull request overview
Adds the new Claude Code OAuth model claude-opus-4-7 (Claude Opus 4.7) across OmniRoute’s catalogs and metadata so it appears consistently in provider model lists, capability resolution, pricing, and fallback behavior.
Changes:
- Add
claude-opus-4-7to Claude Code OAuth registry + local static provider model list. - Add centralized model spec metadata (context/max output) and pricing for
claude-opus-4-7. - Extend family fallback + extended-context allowlist, and update unit tests + docs to reference Opus 4.7.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/t31-t33-t34-t38-model-specs.test.ts | Adds assertions for Opus 4.7 spec/alias and max-output capping. |
| tests/unit/provider-models-route.test.ts | Verifies the provider models route includes claude-opus-4-7. |
| tests/unit/models-catalog-route.test.ts | Verifies CC-demo catalog includes ccdemo/claude-opus-4-7. |
| tests/unit/cc-compatible-model-catalog.test.ts | Verifies CC-compatible provider node includes cm/claude-opus-4-7. |
| src/shared/constants/pricing.ts | Adds default pricing metadata for cc/claude-opus-4-7. |
| src/shared/constants/modelSpecs.ts | Adds centralized spec for claude-opus-4-7 plus alias claude-opus-4.7. |
| src/app/api/providers/[id]/models/route.ts | Adds Opus 4.7 to the static Claude provider model list. |
| open-sse/services/modelFamilyFallback.ts | Adds Opus 4.7 to the Claude Opus family fallback mapping. |
| open-sse/executors/base.ts | Adds Opus 4.7 to the extended-context beta header allowlist. |
| open-sse/config/providerRegistry.ts | Adds Opus 4.7 to the Claude OAuth provider registry models list. |
| docs/USER_GUIDE.md | Updates example combos/config snippets from Opus 4.6 → 4.7. |
| README.md | Updates example combos/config snippets from Opus 4.6 → 4.7. |
| "gemini-2.5-pro-preview-06-05": ["gemini-2.5-pro", "gemini-2.5-pro-exp-03-25"], | ||
|
|
||
| // Claude Opus family | ||
| "claude-opus-4-7": ["claude-opus-4-6", "claude-opus-4-5-20251101", "claude-sonnet-4-6"], |
There was a problem hiding this comment.
claude-opus-4-7 family fallback skips claude-opus-4-6-thinking. This can miss the best/available fallback on providers like antigravity where the Opus 4.6 entry is claude-opus-4-6-thinking (and claude-opus-4-6 may not exist). Consider adding claude-opus-4-6-thinking ahead of claude-opus-4-6 in the claude-opus-4-7 fallback list.
| "claude-opus-4-7": ["claude-opus-4-6", "claude-opus-4-5-20251101", "claude-sonnet-4-6"], | |
| "claude-opus-4-7": ["claude-opus-4-6-thinking", "claude-opus-4-6", "claude-opus-4-5-20251101", "claude-sonnet-4-6"], |
| // ── Claude Opus 4.7 ───────────────────────────────────────────── | ||
| "claude-opus-4-7": { | ||
| maxOutputTokens: 128000, | ||
| contextWindow: 1000000, | ||
| supportsThinking: true, | ||
| supportsTools: true, | ||
| supportsVision: true, | ||
| aliases: ["claude-opus-4.7"], |
There was a problem hiding this comment.
This PR changes production code under src/ and open-sse/. Per repo gate, please run npm run test:coverage and ensure overall statements/lines/functions/branches are each >= 60%, and include the final coverage summary in the PR validation output.
| cc: { | ||
| "claude-opus-4-7": { | ||
| input: 5.0, | ||
| output: 25.0, | ||
| cached: 2.5, | ||
| reasoning: 25.0, | ||
| cache_creation: 5.0, | ||
| }, |
There was a problem hiding this comment.
cc pricing for claude-opus-4-7 duplicates the same rate block as claude-opus-4-6. To reduce drift risk when rates change, consider factoring this into a shared constant (or aliasing 4-7 to the 4-6 pricing entry) rather than repeating the literal values.
|
Thanks @rdself for this great contribution! 🎉 This PR has been evaluated and successfully integrated into the release/v3.6.7 branch and will be part of the final production release. We appreciate your effort! |
Integrated into release/v3.6.7
Integrated into release/v3.6.7
Summary
Why
Claude Code now exposes Opus 4.7 as the current Opus model. OmniRoute should surface it consistently in the OAuth provider, the mirrored CC-compatible catalog, and the related capability metadata.
Validation
node --import tsx/esm --test tests/unit/provider-models-route.test.ts tests/unit/cc-compatible-model-catalog.test.ts tests/unit/models-catalog-route.test.ts tests/unit/t31-t33-t34-t38-model-specs.test.ts