Repository navigation
Conversation
41 of 42 tasks
Collaborator
Author
|
/run-cpu-ci |
Contributor
|
🚀 Running |
Collaborator
Author
|
/run-cpu-ci |
Contributor
|
🚀 Running |
Collaborator
Author
|
/run-cpu-ci |
Contributor
|
🚀 Running |
Jiminator
requested review from
BBuf,
FlamingoPg,
Fridge003,
HaiShaw,
Jialin,
Qiaolin-Yu,
Ying1123,
alphabetc1,
fzyzcjy,
hnyls2002,
ispobock,
merrymercy,
mickqian,
sufeng-buaa,
yctseng0211,
yhyang201,
yizhang2077 and
yuan-luo
as code owners
November 8, 2026 05:32
Jiminator
requested review from
1am9trash,
Alisehen,
AniZpZ,
ByronHsu,
CatherineSue,
DarkSharpness,
Duyi-Wang,
Edwardf0t1,
HydraQYH,
OrangeRedeng,
ShangmingCai,
YAMY1234,
b8zhong,
celve,
hanming-lu,
hebiao064,
hubertlu-tw,
hzh0425,
ishandhanani,
kkHuang-amd,
rainj-me,
slin1237,
sogalin,
stmatengss,
wisclmy0611,
xiezhq-hermann and
zijiexia
as code owners
November 8, 2026 05:32
Jiminator
force-pushed
the
fix/k31-messages-stream-usage
branch
from
November 8, 2026 05:32
85a2c35 to
5bc54ef
Compare
Collaborator
Author
|
/run-cpu-ci |
Contributor
|
🚀 Running |
This branch has not been deployed
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.
Motivation
Streaming
/v1/messagesomits Kimi cache-read counts when--enable-cache-reportis disabled. Empty completions can also emitmessage_startbefore the final usage summary, reporting zero input tokens even when the backend supplies their count.Modifications
Preserve Kimi cached-token details in continuous usage so the Anthropic adapter can report uncached input and cache reads separately. Start an empty completion from its usage-only summary when available, retaining the existing
[DONE]fallback when no usage is supplied.For 3,847 prompt tokens with a 3,072-token cache hit,
message_start.usagereportsinput_tokens: 775,cache_read_input_tokens: 3072, andoutput_tokens: 0. Final output accounting stays inmessage_delta.Validation
The diff against
mainchanges two production files and contains no test changes. All 70 Anthropic serving tests and 171 OpenAI serving tests pass. A runtime replay reproduces zero input usage on the previous empty-completion path and verifies the corrected 775/3072 split, including with cache reporting disabled. Generic models retain the cache-report flag behavior.Applicable pre-commit hooks and
git diff --checkpass. GitHub lint and all ten hosted CPU CI shards passed for commit5bc54efa79dcb55623bdb981fd3398eda858af5b.CI States
Latest PR Test (Base): ❌ Run #42451196701
Latest PR Test (Extra): ❌ Run #42451196711
Latest PR Test (AMD ROCm 10): ❌ Run #42451196957
Tip
Base CI only covers the core cases, and its workload may not exercise your change. Use
/rerun-testto run the tests your change touches, or copy this prompt for an agent: