Client or integration
Streaming Responses clients using freeform custom tools.
Area
SSE custom-tool input projection.
Summary
The fallback wrappers accepted by #4983 are repaired only at completion. Partial input handling in src/bridge/sse.ts recognizes and holds only the compact {"input":" prefix.
For a newly accepted wrapper such as {"code":"const x = 1"}, the bridge streams raw JSON through response.custom_tool_call_input.delta, then publishes only const x = 1 in the done/completed item. Concatenated deltas no longer equal the authoritative final input, creating a mid-stream rewind for clients that render or accumulate tool input.
Expected behaviour
A supported wrapper must have one stable streaming representation. Hold recognized fallback-wrapper prefixes until repair is resolved, or emit deltas whose concatenation equals the final repaired input. Unsupported/ordinary freeform inputs must keep current byte behavior.
Required regressions
- delta concatenation equals done/completed input for every accepted fallback key;
- a wrapper split at every byte boundary does not leak raw JSON then rewind;
- ambiguous or multi-field objects stay unrepaired and byte-exact; and
- cancellation/EOF releases any held buffer without manufacturing a successful tool call.
Regression origin
Merged in #4983; current dev still defines only FREEFORM_WRAP_PREFIX = '{"input":"' for partial streaming.
Client or integration
Streaming Responses clients using freeform custom tools.
Area
SSE custom-tool input projection.
Summary
The fallback wrappers accepted by #4983 are repaired only at completion. Partial input handling in
src/bridge/sse.tsrecognizes and holds only the compact{"input":"prefix.For a newly accepted wrapper such as
{"code":"const x = 1"}, the bridge streams raw JSON throughresponse.custom_tool_call_input.delta, then publishes onlyconst x = 1in the done/completed item. Concatenated deltas no longer equal the authoritative final input, creating a mid-stream rewind for clients that render or accumulate tool input.Expected behaviour
A supported wrapper must have one stable streaming representation. Hold recognized fallback-wrapper prefixes until repair is resolved, or emit deltas whose concatenation equals the final repaired input. Unsupported/ordinary freeform inputs must keep current byte behavior.
Required regressions
Regression origin
Merged in #4983; current
devstill defines onlyFREEFORM_WRAP_PREFIX = '{"input":"'for partial streaming.