Skip to content

Add Claude Opus 4.7 to Claude Code OAuth models - #1347

Merged
diegosouzapw merged 1 commit into
diegosouzapw:release/v3.6.7from
rdself:coder/claude-oauth-opus47
Apr 16, 2026
Merged

diegosouzapw merged 1 commit into
diegosouzapw:release/v3.6.7from
rdself:coder/claude-oauth-opus47

Conversation

@rdself

@rdself rdself commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add Claude Opus 4.7 to the Claude Code OAuth catalog and local static model list
  • add Opus 4.7 specs, pricing metadata, extended-context handling, and family fallback coverage
  • update tests and docs, and verify CC-compatible providers inherit the new model automatically

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

@rdself
rdself requested a review from diegosouzapw as a code owner April 16, 2026 18:37
Copilot AI review requested due to automatic review settings April 16, 2026 18:37
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-7 to 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"],

Copilot AI Apr 16, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
"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"],

Copilot uses AI. Check for mistakes.
Comment on lines +69 to +76
// ── Claude Opus 4.7 ─────────────────────────────────────────────
"claude-opus-4-7": {
maxOutputTokens: 128000,
contextWindow: 1000000,
supportsThinking: true,
supportsTools: true,
supportsVision: true,
aliases: ["claude-opus-4.7"],

Copilot AI Apr 16, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot generated this review using guidance from repository custom instructions.
Comment on lines 123 to +130
cc: {
"claude-opus-4-7": {
input: 5.0,
output: 25.0,
cached: 2.5,
reasoning: 25.0,
cache_creation: 5.0,
},

Copilot AI Apr 16, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
@diegosouzapw
diegosouzapw changed the base branch from main to release/v3.6.7 April 16, 2026 19:03
@diegosouzapw
diegosouzapw merged commit 01bd0d6 into diegosouzapw:release/v3.6.7 Apr 16, 2026
2 checks passed
@diegosouzapw

Copy link
Copy Markdown
Owner

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!

@rdself
rdself deleted the coder/claude-oauth-opus47 branch April 20, 2026 05:35
@diegosouzapw diegosouzapw mentioned this pull request Apr 22, 2026
Poid-ZA pushed a commit to Poid-ZA/OmniRoute that referenced this pull request Aug 5, 2026
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
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.

3 participants