Skip to content

feat(claude): add Claude 5 models and Claude Code OAuth scopes - #68

Open
mahdiwafy wants to merge 3 commits into
Vanszs:mainfrom
mahdiwafy:pr/claude-5-models
Open

feat(claude): add Claude 5 models and Claude Code OAuth scopes#68
mahdiwafy wants to merge 3 commits into
Vanszs:mainfrom
mahdiwafy:pr/claude-5-models

Conversation

@mahdiwafy

Copy link
Copy Markdown

Summary

  • Adds Claude 5 family model entries.
  • Requests Claude Code OAuth scopes needed for usage.
  • Uses Anthropic's whitelisted redirect URI for Claude Code login.

Scope

Focused only on Claude model catalog and Claude Code OAuth behavior.

Verification

  • npm run lint:undef

mahdiwafy and others added 3 commits July 29, 2026 22:17
The Claude Code (cc) provider's model list stopped at Opus 4.8 and was
missing the entire Claude 5 generation — even though the CLI defaults in
cliTools.js already point at cc/claude-fable-5 and cc/claude-sonnet-5.

Add the three generally-available Claude 5 models (per Anthropic's model
docs), keeping 4.x as legacy entries:
  - claude-fable-5  ($10/$50, 1M ctx, adaptive thinking always-on)
  - claude-opus-5   ($5/$25,  1M ctx, adaptive thinking)
  - claude-sonnet-5 ($3/$15,  1M ctx, adaptive thinking)

Also add exact capabilities entries for claude-opus-5 / claude-fable-5
(so the generic *claude* pattern doesn't downgrade them to claude-budget
thinking) and canonical pricing for claude-opus-5 / claude-sonnet-5.
claude-mythos-5 is intentionally omitted — it is invitation-only
(Project Glasswing) and not generally accessible.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Match the official Claude Code OAuth client scope set by requesting
user:sessions:claude_code and user:mcp_servers in addition to the existing
profile/inference scopes. Tokens minted without these scopes can connect
for basic OAuth but fail Claude Code session/usage endpoints or org policy
checks.

Also send the same Claude CLI fingerprint headers to the OAuth usage
endpoint that we already use for Claude Code inference. When Anthropic
rejects OAuth for an organization, surface an explicit org-policy message
instead of falling back to the misleading legacy admin-permissions text.

Note that oauth_not_allowed_for_organization is still an Anthropic org
policy decision; users must reconnect after this change to mint a fresh
scoped token, and accounts in orgs that disable OAuth still need an org
admin or a different Claude account.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
claude.ai/oauth/authorize rejects our redirect_uri
(https://api.bevansatria.my.id/callback) with "Redirect URI ... is not
supported by client" because it isn't on the whitelist for the public
Claude Code client_id. Switch to the same redirect Anthropic's own
Claude Code CLI uses (https://platform.claude.com/oauth/code/callback),
which is whitelisted.

Since that redirect lands on Anthropic's domain instead of our own
/callback route, the popup can never postMessage/BroadcastChannel the
code back to us — force manual-paste mode for the claude provider and
accept Anthropic's bare `code#state` callback format (not a full URL).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@mahdiwafy mahdiwafy closed this Jul 30, 2026
@mahdiwafy
mahdiwafy deleted the pr/claude-5-models branch July 30, 2026 05:06
@mahdiwafy
mahdiwafy restored the pr/claude-5-models branch July 30, 2026 05:15
@mahdiwafy mahdiwafy reopened this Jul 30, 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.

1 participant