Repository navigation
fix(transport): disable synthetic tool results for OpenAI - #61556
VictorJeon wants to merge 2 commits into
Conversation
Greptile SummaryAligns Confidence Score: 5/5Safe to merge — the fix is targeted, all three transport call sites inherit the correct new default, and regression tests cover both the OpenAI suppression and Anthropic retention paths. No P0 or P1 issues found. The new No files require special attention. Reviews (1): Last reviewed commit: "fix(transport): disable synthetic tool r..." | Re-trigger Greptile |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 31374f7d08
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| function defaultAllowSyntheticToolResults(modelApi: Api): boolean { | ||
| return ( | ||
| modelApi === "anthropic-messages" || | ||
| modelApi === "bedrock-converse-stream" || | ||
| modelApi === "google-generative-ai" |
There was a problem hiding this comment.
Handle transport alias APIs in synthetic-result default
defaultAllowSyntheticToolResults only recognizes canonical APIs, but transport-aware simple mode rewrites Anthropic/Google models to alias APIs like openclaw-anthropic-messages-transport and openclaw-google-generative-ai-transport (see src/agents/provider-transport-stream.ts). In that path this now evaluates to false, so Anthropic/Google requests stop getting synthetic tool results even though this change intends to keep that behavior for those families, which can leave orphaned tool calls in replay and trigger strict-provider request rejections.
Useful? React with 👍 / 👎.
|
superseded by #66447. rebased onto current main, narrowed the replay fix to the supported alias transports, added focused regression coverage, and carried the missing changelog entry. |
Summary
Why
resolveTranscriptPolicy()already disables synthetic tool results for OpenAI-compatible replay, buttransformTransportMessages()was still unconditionally inserting synthetictoolResultmessages with "No result provided" when an orphan tool call was encountered.That mismatch could poison OpenAI session history and lead to downstream pairing/replay failures.
This change aligns transport behavior with transcript policy expectations.
Follow-up / companion to #61337.
Validation
pnpm exec vitest run --config vitest.config.ts --project agents src/agents/transport-message-transform.test.ts src/agents/transcript-policy.test.ts