fix(reflect): emit canonical OpenAI tool result messages#2766
fix(reflect): emit canonical OpenAI tool result messages#2766Jordan-Jarvis wants to merge 3 commits into
Conversation
|
Additional validation from the corresponding integration branch:
The focused Gemini/Reflect coverage in this PR remains the direct behavioral proof: canonical OpenAI |
|
Thanks @Jordan-Jarvis. Verified locally on the PR head:
Routing the merge to @nicoloboschi rather than merging directly, because this changes a provider-level message-handling contract in shared infra ( No blocking concerns from me: the fix is correct, well-scoped, and lint/format clean per the PR + my run. Flagging it as a provider-contract review item. cc @nicoloboschi |
…canonical-tool-results-20260717
|
Updated the branch to current upstream The existing DeepSeek Validation on the updated head:
|
|
@nicoloboschi following @benfrank241’s provider-contract review, the current head adds direct OpenAI-compatible request-boundary coverage for the canonical tool-result shape. The PR is clean, mergeable, and green; could you complete the provider-contract review when available? |
Summary
namefield from Reflect role=toolmessagestool_call_idWhy
OpenAI-compatible provider boundaries reject role=
toolmessages that include anamefield. Gemini still requires a function name in its nativeFunctionResponse, so the provider adapter must derive that provider-specific field from the canonical assistant tool call instead of requiring Reflect to emit a noncanonical message shape.Validation
HINDSIGHT_API_LLM_API_KEYwas configured locallygit diff --checkpassed