Repository navigation
$ llm codec: a Gemini transcription answer bills its token fields only, as in 1.5.5 - #858
Merged
Merged
Conversation
…y, as in 1.5.5 The reader billed an upstream-sent usageMetadata.audioDurationSeconds as Billing::Duration (the audio_ms class), so an upstream could pick the meter by sending a member Gemini does not define. 1.5.5 read only promptTokenCount/candidatesTokenCount (v1.5.5 crates/busbar/src/handlers/gemini.rs:229-241). Row-159 plane-llm L3#9, reader half.
MattJackson
marked this pull request as ready for review
October 14, 2026 20:22
MattJackson
marked this pull request as draft
October 14, 2026 22:39
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.
What.
read_transcription_response(Gemini) billed an upstream-sentusageMetadata.audioDurationSecondsasBilling::Duration, theaudio_msclass, in place of the token fields. An upstream could therefore choose the meter by sending a member that Gemini'sUsageMetadatadoes not define. The reader now reads onlypromptTokenCount/candidatesTokenCount, as 1.5.5 did.Why. Row-159 plane-llm L3#9, the reader half; the writer half is in #857, which is not
$. The 1.5.5 source is v1.5.5crates/busbar/src/handlers/gemini.rs:229-241. The fidelity rule says "Billing never moves", and no register entry covers this.RED-able test.
gemini/tests/handler_tests.rs::transcription_response_reads_no_audio_duration_member:{"usageMetadata":{"audioDurationSeconds":12.5}}reads asTokens{0,0}(1.5.5), notDuration{12.5}. It replaces the round-trip test that pinned the 1.6.0 reading.No ledger, oracle cell or ceiling changes.