Skip to content
This repository was archived by the owner on Sep 30, 2026. It is now read-only.

fix: stop blocking Opus models for Claude Pro OAuth accounts - #4

Merged
yjuyjuy merged 1 commit into
masterfrom
fix/claude-oauth-opus-pro-gating
Aug 6, 2026
Merged

yjuyjuy merged 1 commit into
masterfrom
fix/claude-oauth-opus-pro-gating

Conversation

@yjuyjuy

@yjuyjuy yjuyjuy commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Summary

anthropic_oauth_route_availability incorrectly rejected claude-opus-4-8 and claude-opus-5 for Claude "Pro" subscriptions with a "requires Max subscription" error. This assumption is factually wrong: Anthropic's Claude Pro plan does include Opus access (at Pro-tier rate limits, lower than Max but not zero).

Verified live: a Pro-tier OAuth account was rejected/silently ignored when trying --model claude-opus-4-8 and /model claude-opus-4-8, staying on Sonnet despite explicit model switches.

Fix

  • Removed the model.contains("opus") && !is_max_subscription() gate from anthropic_oauth_route_availability in routing.rs. The unrelated [1m] extra-usage gate in the same function is untouched.
  • Removed is_max_subscription() from auth/claude.rs since routing.rs was its only call site.
  • Removed the three unit tests asserting the old (wrong) behavior and added tests asserting Opus routes are available regardless of subscription tier, plus a test confirming the [1m] gate still works.

This is unrelated to subscription_catalog.rs's JcodeTier system (jcode's own Plus/Pro/Max/Ultra/Flagship tiers), which already permits Opus at the lowest tier and is untouched.

Testing

  • cargo build -p jcode-base succeeds.
  • cargo test -p jcode-base --lib -- claude routing passes for the changed area (2 unrelated pidfd test failures pre-exist in this sandbox, unaffected by this change).

anthropic_oauth_route_availability incorrectly rejected claude-opus-4-8
and claude-opus-5 for Pro-tier subscriptions with 'requires Max
subscription', based on a false assumption that Claude Pro excludes
Opus access. Anthropic's Pro plan does include Opus (at lower rate
limits). Remove the client-side gate and let Anthropic's API be the
authoritative source of any real entitlement failure.

is_max_subscription() had no other call sites, so it is removed along
with its now-incorrect unit tests. The unrelated [1m] extra-usage gate
in the same function is untouched.
@yjuyjuy
yjuyjuy merged commit 65d0ec8 into master Aug 6, 2026
5 of 11 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant