You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extend stateful_responses_integration.rs to cover tool-call scenarios using the multi-turn cassettes from PR #77.
The existing integration tests validate the full executor loop (execute() → store → rehydrate → continue) for text-only responses. With the tool-call cassettes now landed (6 vLLM + 6 OpenAI covering linear, streaming, branching, parallel, and tool-output-only patterns), we can add integration tests that exercise:
Tool dispatch flow — execute() returns a function_call output item → caller provides function_call_output in next input → executor continues
Store/rehydrate with tool state — verify that previous_response_id correctly rehydrates conversation history including tool call/output pairs
Parallel tool calls — response contains multiple function_call items → multiple function_call_output items in next input
Tool-output-only turn — input contains only function_call_output (no user message) → executor produces text continuation
Summary
Extend
stateful_responses_integration.rsto cover tool-call scenarios using the multi-turn cassettes from PR #77.The existing integration tests validate the full executor loop (
execute()→ store → rehydrate → continue) for text-only responses. With the tool-call cassettes now landed (6 vLLM + 6 OpenAI covering linear, streaming, branching, parallel, and tool-output-only patterns), we can add integration tests that exercise:execute()returns afunction_calloutput item → caller providesfunction_call_outputin next input → executor continuesprevious_response_idcorrectly rehydrates conversation history including tool call/output pairsfunction_callitems → multiplefunction_call_outputitems in next inputfunction_call_output(no user message) → executor produces text continuationMotivation
Proposed Test Cases (initial coverage)
responses_tool_calls_3turn.yamlresponses_tool_calls_3turn_streaming.yamlresponses_tool_calls_5turn.yamlresponses_tool_calls_branch.yamlopenai_responses_tool_calls_parallel.yamlresponses_tool_calls_tool_output_only.yamlFuture edge cases (expand once tool dispatch stabilizes)
call_idinfunction_call_output— executor should reject or surface errorstore=falsewith tool calls — single-turn dispatch must still work without persistenceLoopDecisionrouting — executor returns "needs tool output" vs "complete" to callerprevious_response_id— store handles correctly under contentionImplementation Notes
TestFixturepattern intests/support/mod.rsmake_request(or add a variant) that acceptsfunction_call_outputinput itemsfunction_calloutput items in the dispatch path (depends on MCP/tool execution story)Dependencies
function_call_outputinput processing (may need to land first)