Repository navigation
llm codec: translated bytes back to 1.5.5 (row-159 L3#5-#9, L2#1) - #857
Open
MattJackson wants to merge 3 commits into
Open
MattJackson wants to merge 3 commits into
MattJackson wants to merge 3 commits into
Conversation
…ni stop scan, candidates count, tool ids, transcription usage, Anthropic response_format) - Responses: a translated stream stamped created_at 0 (1970); it stamps the host's wall clock again, as 1.5.5 stamped now_unix_secs() (v1.5.5 proto/openai_responses/writer.rs:479). - Gemini/Cohere: the relay's stop-reason scan is structural (member at a container depth), so a model-written tool `args` object holding "finishReason":"MALFORMED_FUNCTION_CALL" no longer faults a shared lane. - Gemini: candidatesTokenCount is the whole output again, with no thoughtsTokenCount (v1.5.5 proto/gemini/writer.rs:962-964); streamed tool ids after text count the text block as 1.5.5 did (v1.5.5 proto/gemini/reader.rs:895), matching the buffered ids; a duration-billed transcription writes no invented usageMetadata.audioDurationSeconds (v1.5.5 handlers/gemini.rs:259-265). - Anthropic: a lane without native structured outputs drops response_format again (v1.5.5 proto/anthropic/writer.rs:343-347) instead of a synthetic forced tool that overwrote the caller's tool_choice and streamed back as a tool call. Unit goldens resp_r2g_reasoning.json returns to its pre-971e2b6508 bytes.
This was referenced Oct 13, 2026
Collaborator
Author
|
row 155 B2 (#974) edits crates/busbar-plane-llm/src/codec/{anthropic,openai_responses}/mod.rs at fn claims and the DECL quota_exceeded_status / auth_failure_status_and_kind rows, and proto_codec.rs at the DialectRef DialectCodec impl (attach_error_response_headers -> error_response_fields); disjoint from this PR's hunks. |
…onse_format drop in busbar-llm's audit tests, the tool-args stop test) - gemini/handler.rs write_transcription_response: the single-arm `match` is an `if let` (clippy::single_match). It writes the same bytes. - busbar-llm engine/tests/egress_dropped_controls_audit_tests.rs: the two tests that pinned the post-1.5.5 `busbar_response_format` forced tool now hold 1.5.5 (v1.5.5 crates/busbar/src/proto/anthropic/writer.rs:343-347; ARCHITECT ruling 2026-10-13, F25 rows 107/109, as #884 ports them). - openai_to_anthropic_response_format_forwards_dropped_and_audited: the default Anthropic lane forwards with no response_format, tool_choice or tools, and records the `response_format on anthropic` degraded audit event. - egress_dropped_controls_reports_the_right_controls_per_dialect: the default Anthropic lane reports ["response_format"]. - gemini tests a_finish_reason_inside_tool_args_is_not_the_stop_reason: the raw scan reads the candidate's own `STOP` (EndTurn), never the args' MALFORMED_FUNCTION_CALL (Error). The test had also compared it to read_response's stop reason, which promotes a tool-call STOP to ToolUse from the content; a token-only scan cannot see that, and the fault check does not need it. The test now asserts each side for what it is.
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.
What. These are codec HIGHs from the row-159 plane-llm audit. Each puts back the bytes 1.5.5 sent, or fixes a 1.6.0 defect that has no 1.5.5 counterpart. None of them moves a billed figure. The one billing edge, Gemini
audioDurationSecondson the read side, is split into its own$PR.created_at: 0(1970). It now stamps the host wall clock (busbar_contract::codec::wall_clock_now, the same reading the Chat writer uses).proto/openai_responses/writer.rs:479(now_unix_secs())"finishReason"anywhere in the body, so a model-writtenfunctionCall.argsobject faulted a shared lane.StopKeynow names a member at a container depth (Gemini candidate = 3, Cohere top level = 1), and the scanner walks the JSON lexically, inline and without heap use.candidatesTokenCountwas the output minus reasoning, with a newthoughtsTokenCount. It is the whole output again, with no new member.proto/gemini/writer.rs:962-964text_index.is_some(), matching the buffered ids.proto/gemini/reader.rs:895usageMetadata.audioDurationSeconds.handlers/gemini.rs:259-265response_formatagain, with a warn and a reported control. It no longer sends a syntheticbusbar_response_formatforced tool, which overwrote the caller'stool_choiceand streamed back to the client as a tool call.proto/anthropic/writer.rs:343-347; CHANGELOG 1.6.0 "an omitted key sends what 1.5.5 sent"RED-able tests.
tests/proto/stream_translate_tests.rs::a_translated_stream_into_responses_carries_the_host_clock_created_atgemini/tests/tests.rs::{a_finish_reason_inside_tool_args_is_not_the_stop_reason, stop_key_scanner_reads_the_candidate_member_at_every_split, streamed_tool_ids_after_text_match_the_buffered_ids}gemini/tests/ir_mapping_tests.rs::reasoning_tokens_stay_inside_candidates_for_a_gemini_clientgemini/tests/handler_tests.rs::a_duration_billed_transcription_writes_no_usage_metadataanthropic/tests/ir_mapping_q57_tests.rs::ant07_default_lane_drops_the_directive_as_in_1_5_5anthropic/tests/anthropic_hardening_tests.rs::read_response_rewrites_no_tool_use_blockresp_r2g_reasoning.jsongoes back to its bytes from before 971e2b6.Not in this PR. L3#10's byte moves are pre-approved by the fidelity rule, but each needs a register entry plus a CHANGELOG line, and those files are outside this lane's write set (reported to the coordinator). No ledger, oracle cell or ceiling changes.