[codex] Restore chat tool-call ID normalization - #658
Merged
Conversation
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.
Summary
Restores OpenAI chat tool-call ID normalization on the SDK branch so non-stream
/v1/chat/completionsresponses synthesize missingtool_calls[].idvalues before clients see them.Root Cause
The SDK branch dropped the non-stream chat-completion response adapter while retaining the stream adapter. The nightly stability harness then failed the
autonon-stream tool-call probe withtool call is missing an id.Impact
Agent clients using non-stream chat completions can reliably continue after tool calls again, matching the behavior already present on
mainand the streaming response path.Validation
cargo test -p mesh-llm-host-runtime chat_completion_json_normalizer --libcargo test -p mesh-llm-host-runtime relay_normalized_chat_completion_json_adds_missing_tool_call_id --libcargo test -p mesh-llm-host-runtime chat_stream_normalizer --libcargo check -p mesh-llmcargo fmt --all -- --checkFull
cargo test -p mesh-llm-host-runtime --libwas also run; it failed on two unrelated existingnetwork::nostr::auto_pack_testsdisplay-name expectations.