From dc7f5663402bc3098dc6f02dd60161f09947c6bf Mon Sep 17 00:00:00 2001 From: SaladDay <1203511142@qq.com> Date: Sat, 26 Sep 2026 00:10:52 +0000 Subject: [PATCH] Expect a single text tool result as a string in the native stream helper test Pinned Codex 0.153.4 sends a function result made of exactly one input_text item as a plain string output (function_tool_response in codex-rs/core/src/tools/context.rs, covered by its own tests). The daemon forwards the submitted content items unchanged and public history keeps the array, so only the synthetic model expectation changes. --- .../agents-api/internal/store/function_stream_native_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/agents-api/internal/store/function_stream_native_test.go b/services/agents-api/internal/store/function_stream_native_test.go index bdf698bf8..d37cb815e 100644 --- a/services/agents-api/internal/store/function_stream_native_test.go +++ b/services/agents-api/internal/store/function_stream_native_test.go @@ -17,8 +17,9 @@ func TestNativePublicFunctionStreamHelper(t *testing.T) { t.Skip("pinned official Python SDK required") } h, ctx, home := nativeDispatchHarness(t) + // Codex sends a result made of one input_text item as a plain string output. model, requests := nativeFunctionResultsModel(t, home, []any{ - []any{map[string]any{"type": "input_text", "text": "setup complete"}}, + "setup complete", `{"ticket":"42","status":"open"}`, "Tool handler failed.", })