Repository navigation
[WRONG BRANCH] fix(kimi): read the usages.limit_* quota shape before the legacy one - #6
Closed
vadymhimself wants to merge 1 commit into
Closed
vadymhimself wants to merge 1 commit into
vadymhimself wants to merge 1 commit into
Conversation
|
✅ Deterministic PR hygiene checks passed. |
⏳ DRAFT
What to do
Its title has been prefixed with |
Kimi's /coding/v1/usages now returns usages.{limit_5h, limit_7d,
limit_month_total, limit_month_code}, each {used_ratio 0..1, reset_time}
(MoonshotAI/kimi-code packages/oauth/src/managed-usage.ts). When usages is
present it alone is read (5h, weekly, monthly total); the legacy limits[] /
totalQuota blocks can be placeholders. Without it, the legacy parse is
unchanged. Diff by be-low-chief (Vadym 19319).
Co-Authored-By: Claude Code <noreply@anthropic.com>
vadymhimself
force-pushed
the
fix/kimi-usages-parser
branch
from
November 6, 2026 04:38
742d3ec to
1dbcdb0
Compare
Collaborator
Author
|
Superseded by #30: the same change rebased onto the current release line (version .24), with its main test loading a documented Kimi sample from fixtures/external/kimi/. |
vadymhimself
pushed a commit
that referenced
this pull request
Nov 16, 2026
…ites (lidge-jun#8590) * devin: opt-in Cognition blocklist rewrite on history data surfaces The blocklist sanitizer only touched instruction surfaces (tool descriptions, the #2 system prompt); data fields stayed byte-exact, so one quoted trigger phrase anywhere in a long thread history made every later request fail with upstream permission_denied. New OPENCODEX_DEVIN_SANITIZE_DATA_SURFACES=1 opt-in extends the same rewrites to message text (#3), tool-call arguments (#6.3), image captions (#10.3) and replayed thinking (#11). Identifiers (tool name, tool_call_id) and opaque signature blobs stay byte-exact. Off by default: rewriting literal history changes what the model sees, so refusing stays the default failure. The permission_denied hint now names the opt-in. Tests pin both modes: data literal by default, rewritten when enabled. * devin: add Codex CLI boilerplate phrases to Cognition blocklist rewrites Two more live-isolated triggers in the Codex CLI developer boilerplate: the identity sentence "Codex refers to the open-source agentic coding interface" and the "Don not output ANSI escape codes directly — the CLI renderer applies them" bullet. Both are rewritten meaning-preservingly like the existing entries. Also adds the dump/bisect probe scripts used to isolate the triggers. * fix(devin): drop stale signatures after thinking sanitization Keep reasoning signatures only when the serialized thinking is unchanged. Preserve signature-only replay and default-off sanitization, and add wire, authentication and continuity regressions with matching adapter docs. * chore(devin): keep live credential probes out of the runtime PR
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
KIMI-USAGES-PARSER (Vadym 19319; GW-CD-19243 spec, "Not in scope" list). be-low-chief wrote the diff (
fork16.diff); the fork teammate reviewed it and commits it here (19202).parseKimiQuotaPayloadinsrc/providers/quota/vendor-probes-key.tsreads Kimi's current/coding/v1/usagesshape:usages.{limit_5h, limit_7d, limit_month_total}, each{used_ratio 0..1, reset_time}. The field names were checked against MoonshotAI/kimi-codepackages/oauth/src/managed-usage.ts.limit_month_codeis not a separate window. It is the coding share of the monthly total, and Kimi's own CLI shows it only as a breakdown (usage-format.ts).usagesis present, it is the only thing read: the legacylimits[]/totalQuotablocks can be zero-use placeholders.usagesis absent, the legacy parse is unchanged.{ data: { usages } }envelope unwraps the same way as the legacy fields.tests/providers/provider-quota.test.tsgrew, so its ratchet baseline goes to the new size.Based on
release/2.65.0-vadymhimself.15. CI keeps the known release-branch failures until #5 merges. Rebase this PR on the branch after that.Test plan
limit_5h.used_ratio 0.15gives 15%.limit_month_total"0.0082" gives monthly 0.82%.limit_7dgives weekly, and a row with no ratio is skipped.bun test tests/providers/provider-quota.test.ts tests/providers/provider-api-keys.test.ts: 194 pass. The 1 failure is [WRONG BRANCH] fix(errors): hop on Anthropic 400 "out of extra usage" (OCX-LOW-400-NO-FAILOVER) #8, fixed in [WRONG BRANCH] ci(fork): green CI on release/* + fork-release.yml (GW-CD-19243) #5.bun run typecheck: clean.🤖 Generated with Claude Code