Repository navigation
fix: emit text-only ATIF step messages as strings - #1321
Merged
Merged
Conversation
Collapse step messages whose content parts are all text into one newline-joined string, as Relay already does for Anthropic and OpenAI Responses output and for OpenAI Responses input. The shared step-message path still emitted text-only part arrays for Messages API requests, such as Claude's text-block prompts, and for response fallbacks such as assistant_message content. Image-bearing parts keep the schema-only arrays, observation results are unchanged, and the original payload stays in extra.llm_request and extra.llm_response. Signed-off-by: Fernando Luo <[email protected]>
Contributor
willkill07
approved these changes
Oct 13, 2026
Member
|
/ok to test eb0f8e3 |
This branch was previously 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.
Overview
Emit text-only ATIF step messages as a string, as the ATIF spec defines. Messages with images keep #1301's
ContentPart[].Details
ATIF (RFC 0001
StepObject.message):string.ContentPart[].Before and after (one Claude Code turn):
Scope:
atif_content_valuejoins all-text parts with"\n", as the Anthropic and OpenAI Responses paths already do.assistant_message,choices,answer)Why
extra.llm_requestandextra.llm_response.Without it: string-only readers, such as the NeMo Helix SDK (
message: str), reject the whole Claude trajectory atsteps.0.message.Compatibility:
[]becomes"".Validation
observability::atif: 108 passed. The new test fails without the fix.just test-rust: 5,828 of 5,830 passed. The 2 failures are local only, as in fix: emit schema-valid ATIF content parts #1301.just docs(the docs change is one sentence).Where should the reviewer start?
atif_content_valueincrates/core/src/observability/atif.rs.Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)
Summary by CodeRabbit