fix(ai): sync claude-code-subscription key limits to 3000/750M - #1505
Merged
Conversation
The captain raised this key's rpm/tpm limits directly in the LiteLLM UI to 3000/750000000 while Git still had 300/7500000, so the operator would have silently reverted the change on its next reconcile. Update Git to match the live state and rewrite the sizing comment to record the history and state plainly that Git, not the UI, is the source of truth for future changes.
Contributor
--- LiteLLMVirtualKey ai/claude-code-subscription
+++ LiteLLMVirtualKey ai/claude-code-subscription
@@ -12,8 +12,8 @@
models:
- claude-code-subscription
proxyRef: litellm
- rpmLimit: 300
+ rpmLimit: 3000
secretKey: key
secretName: litellm-key-claude-code-subscription
- tpmLimit: 7500000
+ tpmLimit: 750000000
|
|
✅ Automated recommendation: APPROVE Analysis engine: pr-review-local@http://litellm.ai.svc.cluster.local:4000/v1 (openai) RecommendationApprove. This PR correctly synchronizes the Change-by-Change Findings1.
|
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.
Intent
Bring the claude-code-subscription LiteLLM virtual key's rpmLimit and tpmLimit in Git up to the values the captain set directly in the LiteLLM UI (rpmLimit: 3000, tpmLimit: 750000000), replacing the stale Git values (300 / 7500000). This is urgent because the operator reconciles this LiteLLMVirtualKey CR from Git and would otherwise silently revert the captain's live UI change back to 300/7500000, reintroducing throttling/timeouts. File: kubernetes/apps/base/ai/litellm/app/virtualkeys/claude-code-subscription.yaml. Verified live key via LiteLLM /key/info API (using LITELLM_MASTER_KEY from the litellm-secret) that rpm_limit=3000, tpm_limit=750000000, max_budget=null, models=[claude-code-subscription] matching target exactly, confirming Git was stale before this change. Requirements: set both values to 3000/750000000; rewrite the sizing comment to record the full history (10->300/7.5M after measured throttling on 2026-08-30, then captain raised to 3000/750M in the UI, Git now brought up to match) and state explicitly that the UI is not the source of truth - future changes belong in Git. Preserve the existing safety reasoning intact: this key deliberately has no maxBudget because its model is priced at /bin/zsh (any budget cap would be silently inert), so rate limits are the entire guardrail - do not remove either limit, do not add a budget, do not widen the key's models list (must stay scoped to only claude-code-subscription). Also state plainly (as a caveat, not something to solve here) that at 750,000,000 tpm these limits are no longer a meaningful runaway-agent guardrail, which was their whole purpose on this key - that is the captain's call and stands; the real ceiling is now Anthropic's own subscription rate limits, which this proxy cannot see or raise. Out of scope: any other virtual key, the model catalog, the new Opus subscription route, and the separately reported issue that /bin/zsh pricing is not applying on /v1/messages (mention as known open item only, do not fix). Do not hand-fix the live key - Git becoming source of truth is the point; whether values persist post-reconcile can only be confirmed after merge.
What Changed
claude-code-subscriptionLiteLLMVirtualKeyrpmLimit/tpmLimitfrom300/7500000to3000/750000000so Git matches the captain's live UI values and the operator no longer reverts them on reconcile.Risk Assessment
✅ Low: Single-file GitOps sync of captain-approved rpm/tpm values with required comment history and guardrails preserved; no scope creep or structural risk.
Testing
Updated the stale CI expected limits, then ran the focused Claude Code subscription test plus semantic CR/kustomize/before-after checks; Git now matches the captain UI values (3000/750000000) with safety constraints preserved and only that key changed.
Evidence: CI subscription test run (40 passed)
Evidence: CI test JSON results including rpm=3000 tpm=750000000
Evidence: Semantic CR model + intent acceptance + comment contract
{"rpmLimit": 3000, "tpmLimit": 750000000, "models": ["claude-code-subscription"], "has_maxBudget": false, "all_acceptance_pass": true, "all_comment_contract_pass": true}Evidence: kustomize-emitted virtual key matches intent
{"rpmLimit": 3000, "tpmLimit": 750000000, "models": ["claude-code-subscription"], "has_maxBudget": false, "matches_intent": true}Evidence: Before/after limits vs base commit
before rpm/tpm 300/7500000 → after 3000/750000000; models unchanged; still no maxBudgetEvidence: All virtual keys inventory (only subscription at new limits)
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
EVIDENCE_OUT=... python3 scripts/ci/litellm-claude-code-subscription-test.py(40/40 pass after EXPECTED_RPM/TPM update)semantic YAML model ofkubernetes/apps/base/ai/litellm/app/virtualkeys/claude-code-subscription.yamlagainst intent acceptance + comment contractkubectl kustomize kubernetes/apps/base/ai/litellm/appemitted LiteLLMVirtualKey limits/models/no-budgetbefore/after parse of base379a77a1vs HEAD limits (300/7.5M → 3000/750M)inventory of all virtual keys confirming only claude-code-subscription holds 3000/750000000✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.