Skip to content

feat(usage): add Kilo Code balance and Kilo Pass quotas - #12178

Merged
diegosouzapw merged 4 commits into
cheaper-inference:release/v3.8.51from
killer30001000:feat/kilocode-quota-upstream
Sep 1, 2026
Merged

diegosouzapw merged 4 commits into
cheaper-inference:release/v3.8.51from
killer30001000:feat/kilocode-quota-upstream

Conversation

@killer30001000

@killer30001000 killer30001000 commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Adds Kilo Code to OmniRoute provider usage/quota support.
  • Uses the existing Kilo OAuth credential; no additional API key is required.
  • Exposes personal account balance.
  • Exposes Kilo Pass base, bonus, usage, remaining, and renewal data.
  • Adds a dedicated Kilo Pass usage meter in the dashboard.

Provider behavior

Personal balance: GET /api/profile/balance

Kilo Pass: GET /api/trpc/kiloPass.getState

Authentication uses the existing kilocode OAuth Bearer token. Balance and Kilo Pass requests fail independently, and anonymous connections do not request account data.

Dashboard

The Kilo Pass card displays used / total, paid and free-bonus segments, remaining credits, renewal timing, and a separate account balance. Technical quota rows are not rendered as raw dashboard entries.

Upstream compatibility

The account endpoints are based on the contracts currently used by the official Kilo-Org/kilocode client. KILO_API_URL optionally overrides the API base URL. Requests degrade gracefully when account data is unavailable.

Testing

  • Targeted Kilo, ProviderLimits, quota parsing, Codex, AgentRouter, DeepSeek, i18n, and environment tests: 171 passing
  • Kilo Pass meter UI tests: 11 passing
  • npm run typecheck:core: passing
  • npm run check:open-sse-typecheck: passing
  • npm run check:env-doc-sync: passing
  • npm run check:docs-sync: passing
  • npm run check:release-green: all completed hard/drift gates passed before the sandbox stopped the parallel long-running test phase (exit 149)
  • Local Docker runner build could not start because the sandbox disallows BuildKit bind mounts

@diegosouzapw
diegosouzapw merged commit debb82b into cheaper-inference:release/v3.8.51 Sep 1, 2026
3 checks passed
@killer30001000
killer30001000 deleted the feat/kilocode-quota-upstream branch September 1, 2026 05:53
chirag127 added a commit to chirag127/OmniRoute that referenced this pull request Sep 4, 2026
…g desc in pt

Adds the 7 usage.kiloPass* keys (Kilo Pass usage meter, upstream cheaper-inference#12178)
to the 38 catalogs that were missing them, using the documented
__MISSING__: escape hatch so the runtime serves the correct English
until the translation pipeline catches up — the exact pattern pt-BR
already uses for these keys.

Also adds featureFlagOmnirouteDisableThinkingLevelVariantsDescription to
pt.json using pt-BR's Portuguese translation (same language; the only
catalog still missing it).

All three i18n gates pass (ui-icu: 546,084 messages / 42 catalogs,
value-drift, keys-coverage) and unit tests stay 10/10.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
patrykkopycinski added a commit to patrykkopycinski/OmniRoute that referenced this pull request Sep 6, 2026
PR #6 added four settings.payloadRule* keys to en.json only, which broke the
key-parity gates for every other locale (i18n-vi-completeness, i18n-pt-br,
settings-i18n-keys).

Backfilled with the EN string as the value, matching the convention in
scripts/i18n/fill-missing-from-en.mjs (no __MISSING__ markers — the parity gate
rejects marker values).

Deliberately scoped to my 4 keys. The same locales are also missing 7
usage.kiloPass* keys from cheaper-inference#12178 and carry 3 stale radarPage.* entries whose
en.json counterparts were removed; both are pre-existing and belong to their
owners, not this PR.

Verification:
- all 42 locales: exactly +4 keys, 0 keys lost
- diff contains 0 kiloPass keys (scope held)
- i18n-pt-br: green (was red)
patrykkopycinski added a commit to patrykkopycinski/OmniRoute that referenced this pull request Sep 11, 2026
PR #6 added four settings.payloadRule* keys to en.json only, which broke the
key-parity gates for every other locale (i18n-vi-completeness, i18n-pt-br,
settings-i18n-keys).

Backfilled with the EN string as the value, matching the convention in
scripts/i18n/fill-missing-from-en.mjs (no __MISSING__ markers — the parity gate
rejects marker values).

Deliberately scoped to my 4 keys. The same locales are also missing 7
usage.kiloPass* keys from cheaper-inference#12178 and carry 3 stale radarPage.* entries whose
en.json counterparts were removed; both are pre-existing and belong to their
owners, not this PR.

Verification:
- all 42 locales: exactly +4 keys, 0 keys lost
- diff contains 0 kiloPass keys (scope held)
- i18n-pt-br: green (was red)
diegosouzapw pushed a commit that referenced this pull request Sep 11, 2026
) (#13027)

Good archaeology: #12178 added seven strings and only `de` and `vi` ever got them, with `pt-BR` left holding placeholders. Restoring the feature-flag description missing from `pt.json` alone is the kind of thing only a full-catalog diff finds.

---

Validated in one consolidated worktree cut from `release/v3.8.51`, boarded with the other 19 PRs of this batch. Two in-batch conflicts, both additive and resolved by keeping each side: the `ENVIRONMENT.md` table (#13035 + #13011) and the `chatHelpers.ts` import block (#12975 on the tip + #13017).

- `typecheck:core` clean; `check:dashboard-typecheck` OK (206 pre-existing, within baseline); `check:changelog-integrity` OK; `check:docs-counts` migrations ✓
- complexity 2816 / baseline 3218 and cognitive-complexity 1271 / baseline 1437 — both under baseline
- 531 of 532 focused assertions green across the batch's 46 test files
- `check-file-size` rebaselined for the batch's real growth (annotation `_rebaseline_2026_09_11_mergebatch_v3851_houminxi`, landed on #13038), attributed per PR

The single red is **not this batch**: `tests/unit/combo/quota-weighted-strategy.test.ts` → "A/B isolation: 7 hard-empty + 2 at 0.5% + 1 at 40%, floor=1" asserts an order between two connections of identical weight and flakes on the pure tip too — 2 failures in 4 runs at `origin/release/v3.8.51` with nothing from this batch applied.

⚠️ base-red inherited: #12732 — `Docs Gates`, `Merge integrity`, `No new ESLint warnings`, `Unit Tests fast-path` and `Fast Quality Gates` reproduce on the pure tip (provider count 356 vs the 358 the modules define, SKILL.md drift, and `open-sse/utils/stream.ts` at 3115 > frozen 3098, untouched here).

Thanks @HouMinXi — the live evidence on these (X500 logs, `storage.sqlite` state, real `/v1/models` probes, the 36-minute outage write-up) is what let a 20-PR batch be reviewed as a unit.
Githab-capibara added a commit to Githab-capibara/OmniRoute that referenced this pull request Sep 17, 2026
…aper-inference#12561) (cheaper-inference#13027)

Good archaeology: cheaper-inference#12178 added seven strings and only `de` and `vi` ever got them, with `pt-BR` left holding placeholders. Restoring the feature-flag description missing from `pt.json` alone is the kind of thing only a full-catalog diff finds.

---

Validated in one consolidated worktree cut from `release/v3.8.51`, boarded with the other 19 PRs of this batch. Two in-batch conflicts, both additive and resolved by keeping each side: the `ENVIRONMENT.md` table (cheaper-inference#13035 + cheaper-inference#13011) and the `chatHelpers.ts` import block (cheaper-inference#12975 on the tip + cheaper-inference#13017).

- `typecheck:core` clean; `check:dashboard-typecheck` OK (206 pre-existing, within baseline); `check:changelog-integrity` OK; `check:docs-counts` migrations ✓
- complexity 2816 / baseline 3218 and cognitive-complexity 1271 / baseline 1437 — both under baseline
- 531 of 532 focused assertions green across the batch's 46 test files
- `check-file-size` rebaselined for the batch's real growth (annotation `_rebaseline_2026_09_11_mergebatch_v3851_houminxi`, landed on cheaper-inference#13038), attributed per PR

The single red is **not this batch**: `tests/unit/combo/quota-weighted-strategy.test.ts` → "A/B isolation: 7 hard-empty + 2 at 0.5% + 1 at 40%, floor=1" asserts an order between two connections of identical weight and flakes on the pure tip too — 2 failures in 4 runs at `origin/release/v3.8.51` with nothing from this batch applied.

⚠️ base-red inherited: cheaper-inference#12732 — `Docs Gates`, `Merge integrity`, `No new ESLint warnings`, `Unit Tests fast-path` and `Fast Quality Gates` reproduce on the pure tip (provider count 356 vs the 358 the modules define, SKILL.md drift, and `open-sse/utils/stream.ts` at 3115 > frozen 3098, untouched here).

Thanks @HouMinXi — the live evidence on these (X500 logs, `storage.sqlite` state, real `/v1/models` probes, the 36-minute outage write-up) is what let a 20-PR batch be reviewed as a unit.
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…rence#12178)

* feat(usage): add Kilo Code balance and Kilo Pass quotas

* feat(usage): add Kilo Pass dashboard meter

* test(usage): cover Kilo Code quota integration

* docs(usage): document Kilo API endpoint override
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…aper-inference#12561) (cheaper-inference#13027)

Good archaeology: cheaper-inference#12178 added seven strings and only `de` and `vi` ever got them, with `pt-BR` left holding placeholders. Restoring the feature-flag description missing from `pt.json` alone is the kind of thing only a full-catalog diff finds.

---

Validated in one consolidated worktree cut from `release/v3.8.51`, boarded with the other 19 PRs of this batch. Two in-batch conflicts, both additive and resolved by keeping each side: the `ENVIRONMENT.md` table (cheaper-inference#13035 + cheaper-inference#13011) and the `chatHelpers.ts` import block (cheaper-inference#12975 on the tip + cheaper-inference#13017).

- `typecheck:core` clean; `check:dashboard-typecheck` OK (206 pre-existing, within baseline); `check:changelog-integrity` OK; `check:docs-counts` migrations ✓
- complexity 2816 / baseline 3218 and cognitive-complexity 1271 / baseline 1437 — both under baseline
- 531 of 532 focused assertions green across the batch's 46 test files
- `check-file-size` rebaselined for the batch's real growth (annotation `_rebaseline_2026_09_11_mergebatch_v3851_houminxi`, landed on cheaper-inference#13038), attributed per PR

The single red is **not this batch**: `tests/unit/combo/quota-weighted-strategy.test.ts` → "A/B isolation: 7 hard-empty + 2 at 0.5% + 1 at 40%, floor=1" asserts an order between two connections of identical weight and flakes on the pure tip too — 2 failures in 4 runs at `origin/release/v3.8.51` with nothing from this batch applied.

⚠️ base-red inherited: cheaper-inference#12732 — `Docs Gates`, `Merge integrity`, `No new ESLint warnings`, `Unit Tests fast-path` and `Fast Quality Gates` reproduce on the pure tip (provider count 356 vs the 358 the modules define, SKILL.md drift, and `open-sse/utils/stream.ts` at 3115 > frozen 3098, untouched here).

Thanks @HouMinXi — the live evidence on these (X500 logs, `storage.sqlite` state, real `/v1/models` probes, the 36-minute outage write-up) is what let a 20-PR batch be reviewed as a unit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants