fix(quota-poller): match concrete provider IDs via family prefix#214
Merged
github-actions[bot] merged 1 commit intomainfrom Apr 18, 2026
Merged
Conversation
The quota poller compared provider_id against literal "deepseek" and "kilocode", so catalog entries using the real router-facing IDs (deepseek-chat, deepseek-reasoner, kilo-sonnet, kilo-opus) silently fell through with "no balance fetcher for provider X" and "$DEEPSEEK_API_KEY not found". Added _provider_family() that collapses concrete IDs to polling families (deepseek / kilo), used in both the dispatch and env-key lookup. Now KILOCODE_API_KEY is recognised for the full kilo-* family. Verified against live service: DeepSeek /user/balance now returns the real USD balance; Kilo still fails (upstream 404, unrelated). Co-Authored-By: Claude Opus 4.7 <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.
Summary
Why
v2.2.0 introduced the quota poller but its dispatcher compared `provider_id` against literal `"deepseek"` / `"kilocode"`. Real catalog entries use router-facing IDs like `deepseek-chat` → silent fall-through with "no balance fetcher for provider X".
Verified live on a running 2.2.1 service: with the hot-patched fix the poller immediately fetched the real DeepSeek USD balance from `/user/balance` and persisted it back to `packages/catalog.v1.json`.
Test plan
🤖 Generated with Claude Code