This repository was archived by the owner on Sep 30, 2026. It is now read-only.
Repository navigation
fix: stop blocking Opus models for Claude Pro OAuth accounts - #4
Merged
Merged
Conversation
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.
This was referenced Aug 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
anthropic_oauth_route_availabilityincorrectly rejectedclaude-opus-4-8andclaude-opus-5for 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-8and/model claude-opus-4-8, staying on Sonnet despite explicit model switches.Fix
model.contains("opus") && !is_max_subscription()gate fromanthropic_oauth_route_availabilityinrouting.rs. The unrelated[1m]extra-usage gate in the same function is untouched.is_max_subscription()fromauth/claude.rssincerouting.rswas its only call site.[1m]gate still works.This is unrelated to
subscription_catalog.rs'sJcodeTiersystem (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-basesucceeds.cargo test -p jcode-base --lib -- claude routingpasses for the changed area (2 unrelated pidfd test failures pre-exist in this sandbox, unaffected by this change).