Repository navigation
feat(server): route Claude usage and reset credits through a usage source (superseded) - #39
Closed
orbitingflea wants to merge 2 commits into
Closed
orbitingflea wants to merge 2 commits into
orbitingflea wants to merge 2 commits into
Conversation
Hub (CLIProxyAPI-compatible, e.g. t3switch) Claude accounts showed usage but never their reset credits, and could not redeem one, while native Claude logins and Codex hub accounts could. The hub Claude usage read now asks for the cedar_ember block and maps it with claudeResetCreditsToContract. Redemption posts the claim through the hub's api-call to the account's own organization (organization_uuid from auth-files), with a request id derived from account and grant so retries deduplicate, then clears the hub cooldown as for Codex. The native and hub paths share claim validation and answer mapping, so 429, 401/403, cooldown and unavailable read the same on both. The hub's Claude user agent is now the CLI's, which Anthropic requires for reset eligibility. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Re-applies PR #34 (Claude reset credits for hub accounts) without its hard-coded user agent; t3switch sets the headers Anthropic sees. Directly signed-in Claude logins now read plan usage and reset credits from the t3switch account with the same email and organization, and redeem through it too, so T3 sends none of these requests to Anthropic itself. The CLI probe no longer asks Claude for usage. A login no t3switch source holds shows usage as unavailable and cannot redeem. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Superseded by #42.