Skip to content

fix(ai): sync claude-code-subscription key limits to 3000/750M - #1505

Merged
Aviator-Coding merged 2 commits into
mainfrom
fm/homeops-litellm-sub-limits-3000
Aug 31, 2026
Merged

fix(ai): sync claude-code-subscription key limits to 3000/750M#1505
Aviator-Coding merged 2 commits into
mainfrom
fm/homeops-litellm-sub-limits-3000

Conversation

@Aviator-Coding

Copy link
Copy Markdown
Owner

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

  • Raised the claude-code-subscription LiteLLMVirtualKey rpmLimit/tpmLimit from 300/7500000 to 3000/750000000 so Git matches the captain's live UI values and the operator no longer reverts them on reconcile.
  • Rewrote the CR sizing comment to record the full limit history (10/250k → 300/7.5M → 3000/750M), reaffirm that Git—not the LiteLLM UI—is source of truth, and note that at 750M tpm these limits are no longer a meaningful runaway-agent guardrail.
  • Updated the claude-code-subscription runbook and CI pin test to the new limits and the Git-as-source-of-truth guidance.

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)
APP_DIR=/Users/coder/.no-mistakes/worktrees/07f90326a876/01M1ATKK9J26TW24YWTSG67J3A/kubernetes/apps/base/ai/litellm/app
rendered model_list=35 names_has_subscription=True
[PASS] claude_code_subscription_model_present_in_operator_render — n_models=35 has=True
[PASS] upstream_model_id_is_anthropic_claude_sonnet_5_dash_form — model='anthropic/claude-sonnet-5'
[PASS] api_key_is_present_non_env_placeholder — api_key='sk-ant-oat-PLACEHOLDER-CLIENT-SENDS-ITS-OWN-TOKEN'
[PASS] api_key_carries_sk_ant_oat_prefix_for_oauth_branch — prefix_ok=True
[PASS] sibling_claude_sonnet_5_still_uses_shared_env_key — sonnet_api_key='os.environ/ANTHROPIC_API_KEY'
[PASS] model_info_declares_explicit_zero_token_prices — model_info={'input_cost_per_token': 0, 'output_cost_per_token': 0}
[PASS] zero_prices_are_numeric_zero_not_none — types=(int,int)
[PASS] general_settings_does_not_enable_forward_client_headers — general_settings.forward=None
[PASS] litellm_settings_has_no_model_group_forward_headers_list — model_group_settings.forward=None
[PASS] proxy_cr_generalSettings_omits_forward_client_headers — keys=['maximum_spend_logs_retention_period', 'store_model_in_db', 'store_prompts_in_spend_logs']
[PASS] proxy_cr_litellmSettings_omits_global_forward_flag — keys=['cache', 'cache_params', 'callbacks']
[PASS] fallback_maps_parse — avail={'chat-ha': ['claude-sonnet-5'], 'auto': ['claude-sonnet-5']} ctx={'chat-ha': ['claude-sonnet-5'], 'auto': ['claude-sonnet-5']}
[PASS] claude_code_subscription_not_a_fallback_primary — in_avail=False in_ctx=False
[PASS] claude_code_subscription_not_a_fallback_target — avail_targets={'chat-ha': ['claude-sonnet-5'], 'auto': ['claude-sonnet-5']} ctx_targets={'chat-ha': ['claude-sonnet-5'], 'auto': ['claude-sonnet-5']}
[PASS] virtualkey_cr_present — keys=['ai-pr-review', 'claude-code-subscription', 'demo', 'ha-demo', 'opencode', 'repo-wiki', 'router-demo']
[PASS] virtualkey_scoped_only_to_subscription_model — models=['claude-code-subscription']
[PASS] virtualkey_key_alias_matches_name — keyAlias='claude-code-subscription'
[PASS] virtualkey_has_no_maxBudget — spec_keys=['keyAlias', 'models', 'proxyRef', 'rpmLimit', 'secretKey', 'secretName', 'tpmLimit']
[PASS] virtualkey_rpm_tpm_match_captain_sizing — rpm=3000 tpm=750000000
[PASS] only_subscription_key_lacks_maxBudget — no_budget_keys=['claude-code-subscription']
[PASS] no_other_virtualkey_holds_subscription_model — other_holders=[]
[PASS] sibling_opencode_key_still_has_maxBudget_and_lower_rpm — opencode={'maxBudget': '10.00', 'rpmLimit': 8, 'tpmLimit': 200000, 'models': ['auto']}
[PASS] pushsecret_companion_present — n=1
[PASS] pushsecret_targets_litellm_consumer_item — remote={'remoteKey': 'litellm-consumer-claude-code-subscription', 'property': 'key'} selector={'secret': {'name': 'litellm-key-claude-code-subscription'}}
[PASS] externalsecret_file_still_single_shared_secret — n=1
[PASS] externalsecret_does_not_reference_subscription_model_or_placeholder — es_name=litellm
[PASS] externalsecret_still_pulls_shared_ai_keys_item — extracts=['litellm', 'cloudnative-pg', 'ai-keys', 'litellm-sso']
[PASS] kubectl_kustomize_app_succeeds — bytes=31306
[PASS] kustomize_emits_subscription_model_key_pushsecret — missing=[]
[PASS] kustomize_emitted_model_keeps_placeholder_and_zero_prices — params={'apiKey': 'sk-ant-oat-PLACEHOLDER-CLIENT-SENDS-ITS-OWN-TOKEN', 'model': 'anthropic/claude-sonnet-5'} extra={'input_cost_per_token': 0, 'output_cost_per_token': 0}
[PASS] kustomize_emitted_key_has_limits_no_budget — spec={'keyAlias': 'claude-code-subscription', 'models': ['claude-code-subscription'], 'proxyRef': 'litellm', 'rpmLimit': 3000, 'secretKey': 'key', 'secretName': 'litellm-key-claude-code-subscription', 'tpmLimit': 750000000}
[PASS] runbook_doc_exists — bytes=14629
[PASS] runbook_documents_client_env_contract — missing=[]
[PASS] runbook_model_value_is_claude_code_subscription — model assignment present
[PASS] runbook_forbids_putting_virtual_key_in_authorization — authorization guidance present
[PASS] runbook_states_oauth_login_is_manual_per_person — oauth login section present
[PASS] runbook_states_headless_oauth_out_of_scope — headless scope note present
[PASS] runbook_records_forward_client_headers_deliberately_off — flag decision recorded
[PASS] app_readme_links_subscription_pass_through_section — readme_bytes=21262
[PASS] litellm_runtime_available_for_subscription_proofs — litellm not installed here - semantic CR proofs still ran; re-run under ghcr.io/berriai/litellm-non_root:v1.98.0 for runtime proofs

=== SUMMARY ===
passed=40 failed=0 total=40
wrote /var/folders/yr/h20mxtv56yj1c1pt9tr1_kbc0000gn/T/no-mistakes-evidence/01M1ATKK9J26TW24YWTSG67J3A/claude-code-subscription-test-results.json
Evidence: CI test JSON results including rpm=3000 tpm=750000000
{
  "results": [
    {
      "name": "claude_code_subscription_model_present_in_operator_render",
      "ok": true,
      "detail": "n_models=35 has=True"
    },
    {
      "name": "upstream_model_id_is_anthropic_claude_sonnet_5_dash_form",
      "ok": true,
      "detail": "model='anthropic/claude-sonnet-5'"
    },
    {
      "name": "api_key_is_present_non_env_placeholder",
      "ok": true,
      "detail": "api_key='sk-ant-oat-PLACEHOLDER-CLIENT-SENDS-ITS-OWN-TOKEN'"
    },
    {
      "name": "api_key_carries_sk_ant_oat_prefix_for_oauth_branch",
      "ok": true,
      "detail": "prefix_ok=True"
    },
    {
      "name": "sibling_claude_sonnet_5_still_uses_shared_env_key",
      "ok": true,
      "detail": "sonnet_api_key='os.environ/ANTHROPIC_API_KEY'"
    },
    {
      "name": "model_info_declares_explicit_zero_token_prices",
      "ok": true,
      "detail": "model_info={'input_cost_per_token': 0, 'output_cost_per_token': 0}"
    },
    {
      "name": "zero_prices_are_numeric_zero_not_none",
      "ok": true,
      "detail": "types=(int,int)"
    },
    {
      "name": "general_settings_does_not_enable_forward_client_headers",
      "ok": true,
      "detail": "general_settings.forward=None"
    },
    {
      "name": "litellm_settings_has_no_model_group_forward_headers_list",
      "ok": true,
      "detail": "model_group_settings.forward=None"
    },
    {
      "name": "proxy_cr_generalSettings_omits_forward_client_headers",
      "ok": true,
      "detail": "keys=['maximum_spend_logs_retention_period', 'store_model_in_db', 'store_prompts_in_spend_logs']"
    },
    {
      "name": "proxy_cr_litellmSettings_omits_global_forward_flag",
      "ok": true,
      "detail": "keys=['cache', 'cache_params', 'callbacks']"
    },
    {
      "name": "fallback_maps_parse",
      "ok": true,
      "detail": "avail={'chat-ha': ['claude-sonnet-5'], 'auto': ['claude-sonnet-5']} ctx={'chat-ha': ['claude-sonnet-5'], 'auto': ['claude-sonnet-5']}"
    },
    {
      "name": "claude_code_subscription_not_a_fallback_primary",
      "ok": true,
      "detail": "in_avail=False in_ctx=False"
    },
    {
      "name": "claude_code_subscription_not_a_fallback_target",
      "ok": true,
      "detail": "avail_targets={'chat-ha': ['claude-sonnet-5'], 'auto': ['claude-sonnet-5']} ctx_targets={'chat-ha': ['claude-sonnet-5'], 'auto': ['claude-sonnet-5']}"
    },
    {
      "name": "virtualkey_cr_present",
      "ok": true,
      "detail": "keys=['ai-pr-review', 'claude-code-subscription', 'demo', 'ha-demo', 'opencode', 'repo-wiki', 'router-demo']"
    },
    {
      "name": "virtualkey_scoped_only_to_subscription_model",
      "ok": true,
      "detail": "models=['claude-code-subscription']"
    },
    {
      "name": "virtualkey_key_alias_matches_name",
      "ok": true,
      "detail": "keyAlias='claude-code-subscription'"
    },
    {
      "name": "virtualkey_has_no_maxBudget",
      "ok": true,
      "detail": "spec_keys=['keyAlias', 'models', 'proxyRef', 'rpmLimit', 'secretKey', 'secretName', 'tpmLimit']"
    },
    {
      "name": "virtualkey_rpm_tpm_match_captain_sizing",
      "ok": true,
      "detail": "rpm=3000 tpm=750000000"
    },
    {
      "name": "only_subscription_key_lacks_maxBudget",
      "ok": true,
      "detail": "no_budget_keys=['claude-code-subscription']"
    },
    {
      "name": "no_other_virtualkey_holds_subscription_model",
      "ok": true,
      "detail": "other_holders=[]"
    },
    {
      "name": "sibling_opencode_key_still_has_maxBudget_and_lower_rpm",
      "ok": true,
      "detail": "opencode={'maxBudget': '10.00', 'rpmLimit': 8, 'tpmLimit': 200000, 'models': ['auto']}"
    },
    {
      "name": "pushsecret_companion_present",
      "ok": true,
      "detail": "n=1"
    },
    {
      "name": "pushsecret_targets_litellm_consumer_item",
      "ok": true,
      "detail": "remote={'remoteKey': 'litellm-consumer-claude-code-subscription', 'property': 'key'} selector={'secret': {'name': 'litellm-key-claude-code-subscription'}}"
    },
    {
      "name": "externalsecret_file_still_single_shared_secret",
      "ok": true,
      "detail": "n=1"
    },
    {
      "name": "externalsecret_does_not_reference_subscription_model_or_placeholder",
      "ok": true,
      "detail": "es_name=litellm"
    },
    {
      "name": "externalsecret_still_pulls_shared_ai_keys_item",
      "ok": true,
      "detail": "extracts=['litellm', 'cloudnative-pg', 'ai-keys', 'litellm-sso']"
    },
    {
      "name": "kubectl_kustomize_app_succeeds",
      "ok": true,
      "detail": "bytes=31306"
    },
    {
      "name": "kustomize_emits_subscription_model_key_pushsecret",
      "ok": true,
      "detail": "missing=[]"
    },
    {
      "name": "kustomize_emitted_model_keeps_placeholder_and_zero_prices",
      "ok": true,
      "detail": "params={'apiKey': 'sk-ant-oat-PLACEHOLDER-CLIENT-SENDS-ITS-OWN-TOKEN', 'model': 'anthropic/claude-sonnet-5'} extra={'input_cost_per_token': 0, 'output_cost_per_token': 0}"
    },
    {
      "name": "kustomize_emitted_key_has_limits_no_budget",
      "ok": true,
      "detail": "spec={'keyAlias': 'claude-code-subscription', 'models': ['claude-code-subscription'], 'proxyRef': 'litellm', 'rpmLimit': 3000, 'secretKey': 'key', 'secretName': 'litellm-key-claude-code-subscription', 'tpmLimit': 750000000}"
    },
    {
      "name": "runbook_doc_exists",
      "ok": true,
      "detail": "bytes=14629"
    },
    {
      "name": "runbook_documents_client_env_contract",
      "ok": true,
      "detail": "missing=[]"
    },
    {
      "name": "runbook_model_value_is_claude_code_subscription",
      "ok": true,
      "detail": "model assignment present"
    },
    {
      "name": "runbook_forbids_putting_virtual_key_in_authorization",
      "ok": true,
      "detail": "authorization guidance present"
    },
    {
      "name": "runbook_states_oauth_login_is_manual_per_person",
      "ok": true,
      "detail": "oauth login section present"
    },
    {
      "name": "runbook_states_headless_oauth_out_of_scope",
      "ok": true,
      "detail": "headless scope note present"
    },
    {
      "name": "runbook_records_forward_client_headers_deliberately_off",
      "ok": true,
      "detail": "flag decision recorded"
    },
    {
      "name": "app_readme_links_subscription_pass_through_section",
      "ok": true,
      "detail": "readme_bytes=21262"
    },
    {
      "name": "litellm_runtime_available_for_subscription_proofs",
      "ok": true,
      "detail": "litellm not installed here - semantic CR proofs still ran; re-run under ghcr.io/berriai/litellm-non_root:v1.98.0 for runtime proofs"
    }
  ],
  "failed": [],
  "model_names": [
    "auto",
    "chat-ha",
    "chat-local",
    "claude-code-subscription",
    "claude-fable-5",
    "claude-opus-4-8",
    "claude-opus-5",
    "claude-sonnet-5",
    "deepseek-v4-flash",
    "deepseek-v4-flash-0731",
    "deepseek-v4-pro",
    "deepseek-v4-pro-0813",
    "gemini-3.1-pro",
    "gemini-3.5-flash-lite",
    "gemini-3.6-flash",
    "gemini-3.7-flash",
    "gemma-4-31b",
    "glm-5.2",
    "glm-5.3",
    "gpt-5.6-luna",
    "gpt-5.6-sol",
    "gpt-5.6-terra",
    "gpt-oss-20b",
    "grok-4.5",
    "grok-4.6",
    "kimi-k3",
    "minimax-m3",
    "muse-glimmer-30b",
    "nemotron-3.5-lightning",
    "pr-review-local",
    "qwen3.6-27b",
    "qwen3.6-35b-a3b",
    "qwen3.6-35b-a3b-classifier",
    "qwen3.8-2.4t-a95b",
    "qwen3.8-27b"
  ],
  "subscription_entry": {
    "model_name": "claude-code-subscription",
    "litellm_params": {
      "model": "anthropic/claude-sonnet-5",
      "api_key": "sk-ant-oat-PLACEHOLDER-CLIENT-SENDS-ITS-OWN-TOKEN"
    },
    "model_info": {
      "input_cost_per_token": 0,
      "output_cost_per_token": 0
    }
  },
  "general_settings": {
    "store_model_in_db": false,
    "store_prompts_in_spend_logs": true,
    "maximum_spend_logs_retention_period": "30d"
  },
  "router_settings_fallbacks": [
    {
      "chat-ha": [
        "claude-sonnet-5"
      ]
    },
    {
      "auto": [
        "claude-sonnet-5"
      ]
    }
  ],
  "router_settings_context_window_fallbacks": [
    {
      "chat-ha": [
        "claude-sonnet-5"
      ]
    },
    {
      "auto": [
        "claude-sonnet-5"
      ]
    }
  ]
}
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}

{
  "semantic_model": {
    "kind": "LiteLLMVirtualKey",
    "name": "claude-code-subscription",
    "keyAlias": "claude-code-subscription",
    "models": [
      "claude-code-subscription"
    ],
    "rpmLimit": 3000,
    "tpmLimit": 750000000,
    "has_maxBudget": false,
    "maxBudget_value": null,
    "pushsecret_present": true
  },
  "acceptance": {
    "rpm_is_3000": true,
    "tpm_is_750000000": true,
    "models_only_claude_code_subscription": true,
    "no_maxBudget": true,
    "not_old_rpm_300": true,
    "not_old_tpm_7500000": true
  },
  "comment_contract": {
    "mentions_sizing_history": true,
    "mentions_10_to_300_step": true,
    "mentions_captain_ui_raise": true,
    "states_git_is_source_of_truth": true,
    "states_future_changes_belong_in_git": true,
    "caveat_limits_not_meaningful_guardrail": true,
    "preserves_no_maxBudget_safety_reasoning": true,
    "preserves_rate_limits_are_whole_guardrail": true,
    "preserves_zero_price_inert_budget_reason": true
  },
  "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}

{
  "source": "kubectl kustomize kubernetes/apps/base/ai/litellm/app",
  "kind": "LiteLLMVirtualKey",
  "name": "claude-code-subscription",
  "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 maxBudget

{
  "before_base_commit": "379a77a17de9511808e5a4799e1eea148a78e27a",
  "before": {
    "rpmLimit": 300,
    "tpmLimit": 7500000,
    "models": [
      "claude-code-subscription"
    ],
    "has_maxBudget": false
  },
  "after": {
    "rpmLimit": 3000,
    "tpmLimit": 750000000,
    "models": [
      "claude-code-subscription"
    ],
    "has_maxBudget": false
  },
  "delta": {
    "rpm_was_stale_300": true,
    "tpm_was_stale_7500000": true,
    "rpm_now_matches_captain_ui": true,
    "tpm_now_matches_captain_ui": true,
    "models_unchanged_scoped": true,
    "still_no_maxBudget": true
  }
}
Evidence: All virtual keys inventory (only subscription at new limits)
{
  "all_virtual_keys": [
    {
      "file": "ai-pr-review.yaml",
      "name": "ai-pr-review",
      "rpmLimit": 10,
      "tpmLimit": 200000,
      "maxBudget": "5.00",
      "models": [
        "pr-review-local"
      ]
    },
    {
      "file": "claude-code-subscription.yaml",
      "name": "claude-code-subscription",
      "rpmLimit": 3000,
      "tpmLimit": 750000000,
      "maxBudget": null,
      "models": [
        "claude-code-subscription"
      ]
    },
    {
      "file": "demo.yaml",
      "name": "demo",
      "rpmLimit": 2,
      "tpmLimit": 2000,
      "maxBudget": "0.05",
      "models": [
        "qwen3.6-35b-a3b"
      ]
    },
    {
      "file": "ha-demo.yaml",
      "name": "ha-demo",
      "rpmLimit": 10,
      "tpmLimit": 60000,
      "maxBudget": "1.0",
      "models": [
        "chat-ha"
      ]
    },
    {
      "file": "opencode.yaml",
      "name": "opencode",
      "rpmLimit": 8,
      "tpmLimit": 200000,
      "maxBudget": "10.00",
      "models": [
        "auto"
      ]
    },
    {
      "file": "repo-wiki.yaml",
      "name": "repo-wiki",
      "rpmLimit": 12,
      "tpmLimit": 200000,
      "maxBudget": "30.00",
      "models": [
        "chat-local"
      ]
    },
    {
      "file": "router-demo.yaml",
      "name": "router-demo",
      "rpmLimit": 6,
      "tpmLimit": 60000,
      "maxBudget": "0.5",
      "models": [
        "auto"
      ]
    }
  ],
  "only_subscription_changed_to_3000_750m": true
}

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 of kubernetes/apps/base/ai/litellm/app/virtualkeys/claude-code-subscription.yaml against intent acceptance + comment contract
  • kubectl kustomize kubernetes/apps/base/ai/litellm/app emitted LiteLLMVirtualKey limits/models/no-budget
  • before/after parse of base 379a77a1 vs 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.

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.
@mortyops

mortyops Bot commented Aug 31, 2026

Copy link
Copy Markdown
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
 

@github-actions

Copy link
Copy Markdown

Automated recommendation: APPROVE

Analysis engine: pr-review-local@http://litellm.ai.svc.cluster.local:4000/v1 (openai)

Recommendation

Approve. This PR correctly synchronizes the claude-code-subscription LiteLLMVirtualKey rate limits in Git to match the captain's live UI changes, preventing the operator from silently reverting them on the next reconcile. The changes are scoped, well-documented, and consistent with repository standards.

Change-by-Change Findings

1. kubernetes/apps/base/ai/litellm/app/virtualkeys/claude-code-subscription.yaml

  • Limits Updated: rpmLimit raised from 300 to 3000 and tpmLimit from 7500000 to 750000000. This matches the live state verified via the LiteLLM /key/info API.
  • Comment History: The sizing comment now accurately reflects the full history (10/250k → 300/7.5M → 3000/750M) and explicitly states that Git is the source of truth, not the UI. It also includes the required caveat that at 750M tpm, these limits are no longer a meaningful runaway-agent guardrail.
  • Safety Preserved: The key remains scoped to claude-code-subscription only, with no maxBudget added, preserving the existing safety reasoning that rate limits are the sole guardrail for this budget-less key.

2. docs/ai-system/litellm/claude-code-subscription.md

  • Documentation Sync: The runbook was updated to remove hardcoded limit values and instead point to the CR for current values, reinforcing the "Git is source of truth" principle. The explanation of why maxBudget is absent and the role of rate limits remains intact.

3. scripts/ci/litellm-claude-code-subscription-test.py

  • Test Expectations: The CI test script's EXPECTED_RPM and EXPECTED_TPM constants were updated to 3000 and 750000000 respectively, ensuring the automated checks validate the new limits. The comment history was also updated to match the CR.

Standards Compliance

  • No Plaintext Secrets: No secrets are present in the diff. The changes are limited to rate limit values and documentation.
  • Flux/Kustomize: The CR follows the standard naming and structure. No postBuild.substitute collisions are introduced.
  • AI Stack Conventions: The change respects the AI stack conventions by not altering the models list, not adding a budget, and clearly documenting the limitation of the new rate limits as a guardrail.
  • Commits: The PR title follows the fix(scope): description convention.

Tool Harness Findings

Tool harness findings were disabled.

Unknowns or Needs Verification

  • Live Reconciliation: The PR body notes that whether the values persist post-reconcile can only be confirmed after merge. This is an expected outcome of the GitOps workflow and not a blocker.
  • Anthropic Subscription Limits: The caveat that Anthropic's own subscription rate limits are now the real ceiling is noted but does not require immediate action within this PR's scope.

@Aviator-Coding
Aviator-Coding merged commit 7ac0561 into main Aug 31, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant