Repository navigation
llm anthropic: translated stream's in-stream error event carries request_id (ErrorResponse requires it) - #967
Merged
Conversation
…quest_id, as Anthropic's published ErrorResponse requires When a translated stream into Anthropic ingress fails part way, the anthropic writer writes the `event: error` frame itself. Its body is Anthropic's ErrorResponse, and the pinned schema requires type, error and request_id (nullable). v1.5.5 wrote no request_id (crates/busbar/src/proto/anthropic/writer.rs:626-666 at v1.5.5), and neither did this writer, so the llm spec-conformance rig fails any such row on `required`. Owner rule 22 (2026-10-14): named conformance gaps are zero; ARCHITECT ruling 2026-10-14. The writer now mints a req_ id, the same way its buffered error envelope does (synth_request_id). Registered as accepted difference "R-22 a translated Anthropic stream's error event carries request_id": improvement, body only, owed cells (expected_cells 0, since no oracle cell records a translated stream failing part way), with its CHANGELOG line. RED: tests/anthropic_stream_error_request_id.rs. For three error classes, the written event must carry every member ErrorResponse requires. On predev request_id is absent.
Collaborator
Author
|
#1028 also edits crates/busbar-plane-llm/src/codec/anthropic/writer.rs: every ProtocolWriter method takes |
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.
Owner rule 22 (2026-10-14): named conformance gaps are zero. ARCHITECT ruling 2026-10-14.
The anthropic writer's in-stream
event: errorbody is Anthropic's ErrorResponse. The pinned schema requirestype,errorandrequest_id(nullable). v1.5.5 omittedrequest_id(crates/busbar/src/proto/anthropic/writer.rs:626-666at v1.5.5), and so did predev. The llm spec-conformance rig would therefore FAIL any translated stream that fails part way.The fix. The writer mints a
req_id, using the same mint as its buffered error envelope.Accepted difference "R-22 a translated Anthropic stream's error event carries request_id":
RED.
crates/busbar-plane-llm/tests/anthropic_stream_error_request_id.rsfails on predev becauserequest_idis absent.