diff --git a/cagent-schema.json b/cagent-schema.json index d68664464..3167ed747 100644 --- a/cagent-schema.json +++ b/cagent-schema.json @@ -451,7 +451,7 @@ }, "provider_opts": { "type": "object", - "description": "Provider-specific options. dmr: runtime_flags. anthropic: interleaved_thinking (boolean, default false). openai/anthropic/google: rerank_prompt (string) to fully override the system prompt used for RAG reranking (advanced - prefer using results.reranking.criteria for domain-specific guidance).", + "description": "Provider-specific options. dmr: runtime_flags. anthropic/amazon-bedrock (Claude): interleaved_thinking (boolean, default true). openai/anthropic/google: rerank_prompt (string) to fully override the system prompt used for RAG reranking (advanced - prefer using results.reranking.criteria for domain-specific guidance).", "additionalProperties": true }, "track_usage": { @@ -459,7 +459,7 @@ "description": "Whether to track usage" }, "thinking_budget": { - "description": "Controls reasoning effort/budget. OpenAI: string levels ('minimal','low','medium','high'). Anthropic: integer token budget (1024-32768). Gemini: integer token budget (-1 for unlimited, 0 to disable, 24576 max).", + "description": "Controls reasoning effort/budget. OpenAI: string levels ('minimal','low','medium','high'), default 'medium'. Anthropic: integer token budget (1024-32768), default 8192. Amazon Bedrock (Claude): same as Anthropic. Google Gemini 2.5: integer token budget (-1 for dynamic, 0 to disable, 24576 max), default -1. Google Gemini 3: string levels ('minimal' Flash only,'low','medium','high'), default 'high' for Pro, 'medium' for Flash.", "oneOf": [ { "type": "string", @@ -469,13 +469,13 @@ "medium", "high" ], - "description": "Reasoning effort level (OpenAI)" + "description": "Reasoning effort level (OpenAI, Gemini 3)" }, { "type": "integer", "minimum": -1, "maximum": 32768, - "description": "Token budget for extended thinking (Anthropic, Google)" + "description": "Token budget for extended thinking (Anthropic, Bedrock Claude, Gemini 2.5)" } ], "examples": [ @@ -483,7 +483,9 @@ "low", "medium", "high", + -1, 1024, + 8192, 32768 ] }, diff --git a/docs/USAGE.md b/docs/USAGE.md index 4afbbc48f..5964f041c 100644 --- a/docs/USAGE.md +++ b/docs/USAGE.md @@ -283,9 +283,11 @@ models: Determine how much the model should think by setting the `thinking_budget` -- **OpenAI**: use effort levels — `minimal`, `low`, `medium`, `high` -- **Anthropic**: set an integer token budget. Range is 1024–32768; must be strictly less than `max_tokens`. -- **Google (Gemini)**: set an integer token budget. `0` -> disable thinking, `-1` -> dynamic thinking (model decides). Most models: 0–24576 tokens. Gemini 2.5 Pro: 128–32768 tokens (and cannot disable thinking). +- **OpenAI**: use effort levels — `minimal`, `low`, `medium`, `high`. Default: `medium` +- **Anthropic**: set an integer token budget. Range is 1024–32768; must be strictly less than `max_tokens`. Default: `8192` with `interleaved_thinking: true` +- **Google (Gemini 2.5)**: set an integer token budget. `0` -> disable thinking, `-1` -> dynamic thinking (model decides). Default: `-1` (dynamic) +- **Google (Gemini 3)**: use effort levels — `minimal` (Flash only), `low`, `medium`, `high`. Default: `high` for Pro, `medium` for Flash +- **Amazon Bedrock (Claude models)**: set an integer token budget, same as Anthropic. Default: `8192` with `interleaved_thinking: true` Examples (OpenAI): @@ -317,7 +319,7 @@ agents: instruction: you are a helpful assistant that doesn't think very much ``` -Examples (Google): +Examples (Google Gemini 2.5 - token-based): ```yaml models: @@ -329,7 +331,7 @@ models: gemini-dynamic: provider: google model: gemini-2.5-flash - thinking_budget: -1 # Dynamic thinking (model decides) + thinking_budget: -1 # Dynamic thinking (model decides) - this is the default gemini-fixed: provider: google @@ -342,29 +344,101 @@ agents: instruction: you are a helpful assistant ``` -#### Interleaved Thinking (Anthropic) +Examples (Google Gemini 3 - level-based): -Anthropic's interleaved thinking feature uses the Beta Messages API to provide tool calling during model reasoning. You can control this behavior using the `interleaved_thinking` provider option: +```yaml +models: + # Gemini 3 Pro: supports "low" and "high" levels + gemini-3-pro-high: + provider: google + model: gemini-3-pro + thinking_budget: high # Default for Pro models + + gemini-3-pro-low: + provider: google + model: gemini-3-pro + thinking_budget: low + + # Gemini 3 Flash: supports "minimal", "low", "medium", "high" levels + gemini-3-flash-medium: + provider: google + model: gemini-3-flash + thinking_budget: medium # Default for Flash models + + gemini-3-flash-minimal: + provider: google + model: gemini-3-flash + thinking_budget: minimal + +agents: + root: + model: gemini-3-pro-high + instruction: you are a helpful assistant +``` + +Examples (Amazon Bedrock Claude): + +```yaml +models: + bedrock-claude: + provider: amazon-bedrock + model: global.anthropic.claude-sonnet-4-5-20250929-v1:0 + # thinking_budget defaults to 8192 and interleaved_thinking defaults to true for Claude models + provider_opts: + region: us-east-1 + + bedrock-claude-custom: + provider: amazon-bedrock + model: anthropic.claude-sonnet-4-20250514-v1:0 + thinking_budget: 16384 # Override default + provider_opts: + region: eu-west-1 + interleaved_thinking: true + +agents: + root: + model: bedrock-claude + instruction: you are a helpful assistant +``` + +#### Interleaved Thinking (Anthropic and Bedrock Claude) + +Anthropic's interleaved thinking feature uses the Beta Messages API to provide tool calling during model reasoning. This is now enabled by default for both `anthropic` and `amazon-bedrock` (Claude models) providers. You can control this behavior using the `interleaved_thinking` provider option: ```yaml models: claude: provider: anthropic model: claude-sonnet-4-5-20250929 - thinking_budget: 8192 # Optional: defaults to 16384 when interleaved thinking is enabled + # thinking_budget defaults to 8192 + # interleaved_thinking defaults to true provider_opts: - interleaved_thinking: true # Enable interleaved thinking (default: false) + interleaved_thinking: false # Disable if needed + + bedrock-claude: + provider: amazon-bedrock + model: global.anthropic.claude-sonnet-4-5-20250929-v1:0 + # thinking_budget defaults to 8192 for Claude models + # interleaved_thinking defaults to true for Claude models + provider_opts: + region: us-east-1 + interleaved_thinking: false # Disable if needed ``` Notes: -- **OpenAI**: If an invalid effort value is set, the request will fail with a clear error -- **Anthropic**: Values < 1024 or ≥ `max_tokens` are ignored (warning logged). When `interleaved_thinking` is enabled, -Docker `cagent` uses Anthropic's Beta Messages API with a default thinking budget of 16384 tokens if not specified -- **Google**: +- **OpenAI**: If an invalid effort value is set, the request will fail with a clear error. Default: `medium` +- **Anthropic**: Values < 1024 or ≥ `max_tokens` are ignored (warning logged). Default: `thinking_budget: 8192` with `interleaved_thinking: true` +- **Amazon Bedrock (Claude)**: Same behavior as Anthropic. Non-Claude Bedrock models are not affected by defaults +- **Google (Gemini 2.5)**: - Most models support values between -1 and 24576 tokens. Set to `0` to disable, `-1` for dynamic thinking - Gemini 2.5 Pro: supports 128–32768 tokens. Cannot be disabled (minimum 128) - Gemini 2.5 Flash-Lite: supports 512–24576 tokens. Set to `0` to disable, `-1` for dynamic thinking + - Default: `-1` (dynamic thinking) +- **Google (Gemini 3)**: + - Uses effort levels instead of token budgets: `minimal` (Flash only), `low`, `medium`, `high` + - Gemini 3 Pro default: `high` + - Gemini 3 Flash default: `medium` - For unsupported providers, `thinking_budget` has no effect - Debug logs include the applied effort (e.g., "OpenAI request using thinking_budget", "Gemini request using thinking_budget") diff --git a/e2e/cagent_exec_test.go b/e2e/cagent_exec_test.go index fe5c59b26..567ef024a 100644 --- a/e2e/cagent_exec_test.go +++ b/e2e/cagent_exec_test.go @@ -45,37 +45,56 @@ func TestExec_OpenAI_gpt5_1(t *testing.T) { func TestExec_OpenAI_gpt5_codex(t *testing.T) { out := cagentExec(t, "testdata/basic.yaml", "--model=openai/gpt-5-codex", "What's 2+2?") - require.Equal(t, "\n--- Agent: root ---\n**Preparing to answer question 4**2 + 2 = 4.", out) + // Model reasoning summary varies, just check for the core response + require.Contains(t, out, "--- Agent: root ---") + require.Contains(t, out, "2 + 2 = 4") } func TestExec_Anthropic(t *testing.T) { out := cagentExec(t, "testdata/basic.yaml", "--model=anthropic/claude-sonnet-4-0", "What's 2+2?") - require.Equal(t, "\n--- Agent: root ---\n2 + 2 = 4", out) + // With interleaved thinking enabled by default, Anthropic responses include thinking content + require.Contains(t, out, "--- Agent: root ---") + require.Contains(t, out, "2 + 2 = 4") } func TestExec_Anthropic_ToolCall(t *testing.T) { out := cagentExec(t, "testdata/fs_tools.yaml", "--model=anthropic/claude-sonnet-4-0", "How many files in testdata/working_dir? Only output the number.") - require.Equal(t, "\n--- Agent: root ---\n\nCalling list_directory(path: \"testdata/working_dir\")\n\nlist_directory response → \"FILE README.me\\n\"\n1", out) + // With interleaved thinking enabled by default, Anthropic responses include thinking content + require.Contains(t, out, "--- Agent: root ---") + require.Contains(t, out, `Calling list_directory(path: "testdata/working_dir")`) + require.Contains(t, out, `list_directory response → "FILE README.me\n"`) + // The response should end with "1" (the count) + require.True(t, out != "" && out[len(out)-1] == '1', "response should end with '1'") } func TestExec_Anthropic_AgentsMd(t *testing.T) { out := cagentExec(t, "testdata/agents-md.yaml", "--model=anthropic/claude-sonnet-4-0", "What's 2+2?") - require.Equal(t, "\n--- Agent: root ---\n2 + 2 = 4", out) + // With interleaved thinking enabled by default, Anthropic responses include thinking content + require.Contains(t, out, "--- Agent: root ---") + require.Contains(t, out, "2 + 2 = 4") } func TestExec_Gemini(t *testing.T) { out := cagentExec(t, "testdata/basic.yaml", "--model=google/gemini-2.5-flash", "What's 2+2?") - require.Equal(t, "\n--- Agent: root ---\n2 + 2 = 4", out) + // With thinking enabled by default (dynamic thinking for Gemini 2.5), responses may include thinking content + require.Contains(t, out, "--- Agent: root ---") + // The response should contain the answer "4" somewhere + require.Contains(t, out, "4") } func TestExec_Gemini_ToolCall(t *testing.T) { out := cagentExec(t, "testdata/fs_tools.yaml", "--model=google/gemini-2.5-flash", "How many files in testdata/working_dir? Only output the number.") - require.Equal(t, "\n--- Agent: root ---\n\nCalling list_directory(path: \"testdata/working_dir\")\n\nlist_directory response → \"FILE README.me\\n\"\n1", out) + // With thinking enabled by default (dynamic thinking for Gemini 2.5), responses include thinking content + require.Contains(t, out, "--- Agent: root ---") + require.Contains(t, out, `Calling list_directory(path: "testdata/working_dir")`) + require.Contains(t, out, `list_directory response → "FILE README.me\n"`) + // The response should end with "1" (the count) + require.True(t, out != "" && out[len(out)-1] == '1', "response should end with '1'") } func TestExec_Mistral(t *testing.T) { diff --git a/e2e/cagent_mcp_test.go b/e2e/cagent_mcp_test.go index 54bd71016..c2a7e3bdc 100644 --- a/e2e/cagent_mcp_test.go +++ b/e2e/cagent_mcp_test.go @@ -54,5 +54,6 @@ func TestMCP_MultiAgent(t *testing.T) { }) require.NoError(t, err) - assert.Equal(t, "Hello, nice to meet you!", output.Response) + // Model response to "say hello" can vary, just check it contains a greeting + assert.Contains(t, output.Response, "Hello") } diff --git a/e2e/testdata/cassettes/TestA2AServer_MultiAgent.yaml b/e2e/testdata/cassettes/TestA2AServer_MultiAgent.yaml index c61deae03..e6cfd3aea 100644 --- a/e2e/testdata/cassettes/TestA2AServer_MultiAgent.yaml +++ b/e2e/testdata/cassettes/TestA2AServer_MultiAgent.yaml @@ -8,7 +8,7 @@ interactions: proto_minor: 1 content_length: 0 host: api.openai.com - body: '{"input":[{"content":[{"text":"You are a multi-agent system, make sure to answer the user query in the most helpful way possible. You have access to these sub-agents:\nName: web | Description: \n\nIMPORTANT: You can ONLY transfer tasks to the agents listed above using their ID. The valid agent names are: web. You MUST NOT attempt to transfer to any other agent IDs - doing so will cause system errors.\n\nIf you are the best to answer the question according to your description, you can answer it.\n\nIf another agent is better for answering the question according to its description, call `transfer_task` function to transfer the question to that agent using the agent''s ID. When transferring, do not generate any text other than the function call.\n\n","type":"input_text"}],"role":"system"},{"content":[{"text":"You are a knowledgeable assistant that helps users with various tasks.\nBe helpful, accurate, and concise in your responses.\n","type":"input_text"}],"role":"system"},{"content":"Say hello.","role":"user"}],"model":"gpt-5-mini","reasoning":{"summary":"detailed"},"tools":[{"strict":true,"parameters":{"additionalProperties":false,"properties":{"agent":{"description":"The name of the agent to transfer the task to.","type":"string"},"expected_output":{"description":"The expected output from the member (optional).","type":"string"},"task":{"description":"A clear and concise description of the task the member should achieve.","type":"string"}},"required":["agent","expected_output","task"],"type":"object"},"name":"transfer_task","description":"Use this function to transfer a task to the selected team member.\n You must provide a clear and concise description of the task the member should achieve AND the expected output.","type":"function"}],"stream":true}' + body: '{"input":[{"content":[{"text":"You are a helpful AI assistant that generates concise, descriptive titles for conversations. You will be given a conversation history and asked to create a title that captures the main topic.","type":"input_text"}],"role":"system"},{"content":"Based on the following message a user sent to an AI assistant, generate a short, descriptive title (maximum 50 characters) that captures the main topic or purpose of the conversation. Return ONLY the title text, nothing else.\n\nUser message: Say hello.\n\n","role":"user"}],"model":"gpt-5-mini","reasoning":{"effort":"medium","summary":"detailed"},"stream":true}' url: https://api.openai.com/v1/responses method: POST response: @@ -18,309 +18,425 @@ interactions: content_length: -1 body: |+ event: response.created - data: {"type":"response.created","response":{"id":"resp_0aa050c0917aa92400696a92d9aa94819480cb297c6d5d45bd","object":"response","created_at":1768592089,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5-mini-2025-08-07","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":"detailed"},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[{"type":"function","description":"Use this function to transfer a task to the selected team member.\n You must provide a clear and concise description of the task the member should achieve AND the expected output.","name":"transfer_task","parameters":{"additionalProperties":false,"properties":{"agent":{"description":"The name of the agent to transfer the task to.","type":"string"},"expected_output":{"description":"The expected output from the member (optional).","type":"string"},"task":{"description":"A clear and concise description of the task the member should achieve.","type":"string"}},"required":["agent","expected_output","task"],"type":"object"},"strict":true}],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":0} + data: {"type":"response.created","response":{"id":"resp_0d1f10c9986b28ec00696b71757c1c8195960c36fb3f543a1c","object":"response","created_at":1768649077,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5-mini-2025-08-07","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":"detailed"},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":0} event: response.in_progress - data: {"type":"response.in_progress","response":{"id":"resp_0aa050c0917aa92400696a92d9aa94819480cb297c6d5d45bd","object":"response","created_at":1768592089,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5-mini-2025-08-07","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":"detailed"},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[{"type":"function","description":"Use this function to transfer a task to the selected team member.\n You must provide a clear and concise description of the task the member should achieve AND the expected output.","name":"transfer_task","parameters":{"additionalProperties":false,"properties":{"agent":{"description":"The name of the agent to transfer the task to.","type":"string"},"expected_output":{"description":"The expected output from the member (optional).","type":"string"},"task":{"description":"A clear and concise description of the task the member should achieve.","type":"string"}},"required":["agent","expected_output","task"],"type":"object"},"strict":true}],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":1} + data: {"type":"response.in_progress","response":{"id":"resp_0d1f10c9986b28ec00696b71757c1c8195960c36fb3f543a1c","object":"response","created_at":1768649077,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5-mini-2025-08-07","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":"detailed"},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":1} event: response.output_item.added - data: {"type":"response.output_item.added","item":{"id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","type":"reasoning","summary":[]},"output_index":0,"sequence_number":2} + data: {"type":"response.output_item.added","item":{"id":"rs_0d1f10c9986b28ec00696b7175b5a88195865dd609bdfb3c3c","type":"reasoning","summary":[]},"output_index":0,"sequence_number":2} + + event: response.output_item.done + data: {"type":"response.output_item.done","item":{"id":"rs_0d1f10c9986b28ec00696b7175b5a88195865dd609bdfb3c3c","type":"reasoning","summary":[]},"output_index":0,"sequence_number":3} + + event: response.output_item.added + data: {"type":"response.output_item.added","item":{"id":"msg_0d1f10c9986b28ec00696b7178eb0c8195b0066a85f0261ba7","type":"message","status":"in_progress","content":[],"role":"assistant"},"output_index":1,"sequence_number":4} + + event: response.content_part.added + data: {"type":"response.content_part.added","content_index":0,"item_id":"msg_0d1f10c9986b28ec00696b7178eb0c8195b0066a85f0261ba7","output_index":1,"part":{"type":"output_text","annotations":[],"logprobs":[],"text":""},"sequence_number":5} + + event: response.output_text.delta + data: {"type":"response.output_text.delta","content_index":0,"delta":"Request","item_id":"msg_0d1f10c9986b28ec00696b7178eb0c8195b0066a85f0261ba7","logprobs":[],"obfuscation":"z74121sKd","output_index":1,"sequence_number":6} + + event: response.output_text.delta + data: {"type":"response.output_text.delta","content_index":0,"delta":":","item_id":"msg_0d1f10c9986b28ec00696b7178eb0c8195b0066a85f0261ba7","logprobs":[],"obfuscation":"ay5jG1m6tdsvSGZ","output_index":1,"sequence_number":7} + + event: response.output_text.delta + data: {"type":"response.output_text.delta","content_index":0,"delta":" Say","item_id":"msg_0d1f10c9986b28ec00696b7178eb0c8195b0066a85f0261ba7","logprobs":[],"obfuscation":"sTpEmOuGg9xB","output_index":1,"sequence_number":8} + + event: response.output_text.delta + data: {"type":"response.output_text.delta","content_index":0,"delta":" Hello","item_id":"msg_0d1f10c9986b28ec00696b7178eb0c8195b0066a85f0261ba7","logprobs":[],"obfuscation":"PrulgsuG6p","output_index":1,"sequence_number":9} + + event: response.output_text.done + data: {"type":"response.output_text.done","content_index":0,"item_id":"msg_0d1f10c9986b28ec00696b7178eb0c8195b0066a85f0261ba7","logprobs":[],"output_index":1,"sequence_number":10,"text":"Request: Say Hello"} + + event: response.content_part.done + data: {"type":"response.content_part.done","content_index":0,"item_id":"msg_0d1f10c9986b28ec00696b7178eb0c8195b0066a85f0261ba7","output_index":1,"part":{"type":"output_text","annotations":[],"logprobs":[],"text":"Request: Say Hello"},"sequence_number":11} + + event: response.output_item.done + data: {"type":"response.output_item.done","item":{"id":"msg_0d1f10c9986b28ec00696b7178eb0c8195b0066a85f0261ba7","type":"message","status":"completed","content":[{"type":"output_text","annotations":[],"logprobs":[],"text":"Request: Say Hello"}],"role":"assistant"},"output_index":1,"sequence_number":12} + + event: response.completed + data: {"type":"response.completed","response":{"id":"resp_0d1f10c9986b28ec00696b71757c1c8195960c36fb3f543a1c","object":"response","created_at":1768649077,"status":"completed","background":false,"completed_at":1768649080,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5-mini-2025-08-07","output":[{"id":"rs_0d1f10c9986b28ec00696b7175b5a88195865dd609bdfb3c3c","type":"reasoning","summary":[]},{"id":"msg_0d1f10c9986b28ec00696b7178eb0c8195b0066a85f0261ba7","type":"message","status":"completed","content":[{"type":"output_text","annotations":[],"logprobs":[],"text":"Request: Say Hello"}],"role":"assistant"}],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":"detailed"},"safety_identifier":null,"service_tier":"default","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":{"input_tokens":95,"input_tokens_details":{"cached_tokens":0},"output_tokens":74,"output_tokens_details":{"reasoning_tokens":64},"total_tokens":169},"user":null,"metadata":{}},"sequence_number":13} + + headers: {} + status: 200 OK + code: 200 + duration: 350.26882ms + - id: 1 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + host: api.openai.com + body: '{"input":[{"content":[{"text":"You are a multi-agent system, make sure to answer the user query in the most helpful way possible. You have access to these sub-agents:\nName: web | Description: \n\nIMPORTANT: You can ONLY transfer tasks to the agents listed above using their ID. The valid agent names are: web. You MUST NOT attempt to transfer to any other agent IDs - doing so will cause system errors.\n\nIf you are the best to answer the question according to your description, you can answer it.\n\nIf another agent is better for answering the question according to its description, call `transfer_task` function to transfer the question to that agent using the agent''s ID. When transferring, do not generate any text other than the function call.\n\n","type":"input_text"}],"role":"system"},{"content":[{"text":"You are a knowledgeable assistant that helps users with various tasks.\nBe helpful, accurate, and concise in your responses.\n","type":"input_text"}],"role":"system"},{"content":"Say hello.","role":"user"}],"model":"gpt-5-mini","reasoning":{"effort":"medium","summary":"detailed"},"tools":[{"strict":true,"parameters":{"additionalProperties":false,"properties":{"agent":{"description":"The name of the agent to transfer the task to.","type":"string"},"expected_output":{"description":"The expected output from the member (optional).","type":"string"},"task":{"description":"A clear and concise description of the task the member should achieve.","type":"string"}},"required":["agent","expected_output","task"],"type":"object"},"name":"transfer_task","description":"Use this function to transfer a task to the selected team member.\n You must provide a clear and concise description of the task the member should achieve AND the expected output.","type":"function"}],"stream":true}' + url: https://api.openai.com/v1/responses + method: POST + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: -1 + body: |+ + event: response.created + data: {"type":"response.created","response":{"id":"resp_0eaccefbe8d1cad100696b7175c7388194a0e40ce80ec719e0","object":"response","created_at":1768649077,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5-mini-2025-08-07","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":"detailed"},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[{"type":"function","description":"Use this function to transfer a task to the selected team member.\n You must provide a clear and concise description of the task the member should achieve AND the expected output.","name":"transfer_task","parameters":{"additionalProperties":false,"properties":{"agent":{"description":"The name of the agent to transfer the task to.","type":"string"},"expected_output":{"description":"The expected output from the member (optional).","type":"string"},"task":{"description":"A clear and concise description of the task the member should achieve.","type":"string"}},"required":["agent","expected_output","task"],"type":"object"},"strict":true}],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":0} + + event: response.in_progress + data: {"type":"response.in_progress","response":{"id":"resp_0eaccefbe8d1cad100696b7175c7388194a0e40ce80ec719e0","object":"response","created_at":1768649077,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5-mini-2025-08-07","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":"detailed"},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[{"type":"function","description":"Use this function to transfer a task to the selected team member.\n You must provide a clear and concise description of the task the member should achieve AND the expected output.","name":"transfer_task","parameters":{"additionalProperties":false,"properties":{"agent":{"description":"The name of the agent to transfer the task to.","type":"string"},"expected_output":{"description":"The expected output from the member (optional).","type":"string"},"task":{"description":"A clear and concise description of the task the member should achieve.","type":"string"}},"required":["agent","expected_output","task"],"type":"object"},"strict":true}],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":1} + + event: response.output_item.added + data: {"type":"response.output_item.added","item":{"id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","type":"reasoning","summary":[]},"output_index":0,"sequence_number":2} event: response.reasoning_summary_part.added - data: {"type":"response.reasoning_summary_part.added","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","output_index":0,"part":{"type":"summary_text","text":""},"sequence_number":3,"summary_index":0} + data: {"type":"response.reasoning_summary_part.added","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","output_index":0,"part":{"type":"summary_text","text":""},"sequence_number":3,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":"**Respond","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"lJthMOF","output_index":0,"sequence_number":4,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":"ing","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"EbIGNGSXpF8ob","output_index":0,"sequence_number":5,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" to","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"fFiS9oLrMAYj9","output_index":0,"sequence_number":6,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" a","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"7YXYT5ew5hYYWi","output_index":0,"sequence_number":7,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" greeting","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"WiyiwGX","output_index":0,"sequence_number":8,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":"**\n\nThe","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"S7RYG4ySK","output_index":0,"sequence_number":9,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" user","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"V52zMea7Tyo","output_index":0,"sequence_number":10,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" request","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"BkWDs9yM","output_index":0,"sequence_number":11,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" is","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"WEucjOkaNlk0g","output_index":0,"sequence_number":12,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" clear","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"fa1byp9YeN","output_index":0,"sequence_number":13,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":":","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"xdHfw6NTaCnd50l","output_index":0,"sequence_number":14,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" they","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"sCTYHW5SERA","output_index":0,"sequence_number":15,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" just","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"HaqdT2TZxpe","output_index":0,"sequence_number":16,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" want","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"pmyUuvCbvCX","output_index":0,"sequence_number":17,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" me","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"GJvRFnHhScXvI","output_index":0,"sequence_number":18,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" to","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"TFIf5Gyw2PDs9","output_index":0,"sequence_number":19,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" say","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"1y1cgusYRtga","output_index":0,"sequence_number":20,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" hello","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"vG2MIPRhx3","output_index":0,"sequence_number":21,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":"**Craft","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"cT3SMCzEG","output_index":0,"sequence_number":4,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":".","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"CDihxcMSgxQWBme","output_index":0,"sequence_number":22,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":"ing","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"L35i0k511xlqP","output_index":0,"sequence_number":5,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" There","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"DdIpjBnHKG","output_index":0,"sequence_number":23,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" a","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"dKUN374Y9ousVw","output_index":0,"sequence_number":6,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":"’s","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"Pa9XJGq9MbTegS","output_index":0,"sequence_number":24,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" simple","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"33Zw4dgux","output_index":0,"sequence_number":7,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" no","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"paPImpvUgo915","output_index":0,"sequence_number":25,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" greeting","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"fvBa3LS","output_index":0,"sequence_number":8,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" need","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"EpP5rX7xmp1","output_index":0,"sequence_number":26,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":"**\n\nThe","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"gTLwlwo7h","output_index":0,"sequence_number":9,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" for","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"hcsg054ggOqW","output_index":0,"sequence_number":27,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" user","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"xlfSmUyiFnx","output_index":0,"sequence_number":10,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" any","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"zRgTsrNGbfRU","output_index":0,"sequence_number":28,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" wants","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"4m4WvBPcDm","output_index":0,"sequence_number":11,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" tool","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"58RKNXHHI7i","output_index":0,"sequence_number":29,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" me","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"RhA7J636Fk94b","output_index":0,"sequence_number":12,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" calls","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"AHdDrtktDM","output_index":0,"sequence_number":30,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" to","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"hdmAqznrhc4WC","output_index":0,"sequence_number":13,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":",","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"XSm2z749n04jsOO","output_index":0,"sequence_number":31,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" keep","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"uCpAhgma5td","output_index":0,"sequence_number":14,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" just","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"fHqNuxCtWQJ","output_index":0,"sequence_number":32,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" it","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"UvoHOCYMuxBuO","output_index":0,"sequence_number":15,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" a","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"2wCsPpiW02eYAb","output_index":0,"sequence_number":33,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" straightforward","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"","output_index":0,"sequence_number":16,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" simple","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"dCQtFHBiB","output_index":0,"sequence_number":34,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":",","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"17NvnqqVYRytDp0","output_index":0,"sequence_number":17,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" response","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"GQna88S","output_index":0,"sequence_number":35,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" just","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"LDULq83tybb","output_index":0,"sequence_number":18,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":".","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"xBPzrx4aDh4yxKa","output_index":0,"sequence_number":36,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" a","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"4fxEZ4eXGT51G7","output_index":0,"sequence_number":19,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" I","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"4NcclUzs3vYLk3","output_index":0,"sequence_number":37,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" friendly","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"sMjzxkN","output_index":0,"sequence_number":20,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" think","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"JCVAatILCB","output_index":0,"sequence_number":38,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" greeting","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"4jTjWIS","output_index":0,"sequence_number":21,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" a","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"eiF3YEMZ1eVW6N","output_index":0,"sequence_number":39,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" and","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"4jsSB54QiqRt","output_index":0,"sequence_number":22,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" warm","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"GYpbg91Zqlm","output_index":0,"sequence_number":40,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" to","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"JLiiVGnxh8Bqh","output_index":0,"sequence_number":23,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" greeting","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"N3eq0zd","output_index":0,"sequence_number":41,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" ask","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"1ElasP4m23Fg","output_index":0,"sequence_number":24,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" like","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"0WQs6yM1Tqb","output_index":0,"sequence_number":42,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" how","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"GHCn3fHW4xQa","output_index":0,"sequence_number":25,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":",","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"2BSrmnyeHBkxiHY","output_index":0,"sequence_number":43,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" I","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"YFkBhwK9z4W79M","output_index":0,"sequence_number":26,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" “","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"FQ7CpgQFHr47pU","output_index":0,"sequence_number":44,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" can","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"f46JxzEmxdKz","output_index":0,"sequence_number":27,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":"Hello","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"eMG4eB5yN0x","output_index":0,"sequence_number":45,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" help","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"vnuAYYnO0VQ","output_index":0,"sequence_number":28,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":"!","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"qhq6sIviI4aeTWm","output_index":0,"sequence_number":46,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":".","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"pGWkiwla0gNRUHE","output_index":0,"sequence_number":29,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" How","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"n7b3fBEmDEM6","output_index":0,"sequence_number":47,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" I","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"PfImHwM6FIZegi","output_index":0,"sequence_number":30,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" can","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"yTg3w4YrGZNf","output_index":0,"sequence_number":48,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" like","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"GhexhdFTLnQ","output_index":0,"sequence_number":31,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" I","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"7JEkmUoGTG0wmZ","output_index":0,"sequence_number":49,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" the","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"9dvDVY2TDbyk","output_index":0,"sequence_number":32,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" help","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"sxonATunKZ3","output_index":0,"sequence_number":50,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" idea","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"nbvYGr9cAVR","output_index":0,"sequence_number":33,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" you","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"PEDvw17REIIi","output_index":0,"sequence_number":51,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" of","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"v9Pluat0lLlJk","output_index":0,"sequence_number":34,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" today","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"CH9xdzcfnR","output_index":0,"sequence_number":52,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" saying","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"HLP6YHGiB","output_index":0,"sequence_number":35,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":"?”","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"iqJvjFWRq7SVdB","output_index":0,"sequence_number":53,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":",","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"AkEErbMA4EoHGEk","output_index":0,"sequence_number":36,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" would","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"YYDKSnPcCg","output_index":0,"sequence_number":54,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" “","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"vtyPy0k3PreeYl","output_index":0,"sequence_number":37,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" work","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"woLRWORL2jy","output_index":0,"sequence_number":55,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":"Hello","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"TqEVKvshRzg","output_index":0,"sequence_number":38,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" well","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"3KgSXehPDFi","output_index":0,"sequence_number":56,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":"!","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"TgBlhxDDkf9M0V1","output_index":0,"sequence_number":39,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":",","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"hpCMRPzrxaejdhQ","output_index":0,"sequence_number":57,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" How","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"6EjqEVZwcch5","output_index":0,"sequence_number":40,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" but","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"iso5CzvHytBq","output_index":0,"sequence_number":58,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" can","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"9eyRFpW8zYiL","output_index":0,"sequence_number":41,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" I","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"UYItyAtWNFN86M","output_index":0,"sequence_number":59,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" I","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"9o9g0zjaWuZ164","output_index":0,"sequence_number":42,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" must","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"D6IpYaonSR2","output_index":0,"sequence_number":60,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" assist","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"ZayYsy8Nm","output_index":0,"sequence_number":43,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" keep","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"H1JoWYvxv4Y","output_index":0,"sequence_number":61,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" you","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"YvRSLYG3oKrY","output_index":0,"sequence_number":44,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" it","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"LpAuD6mtjLa1M","output_index":0,"sequence_number":62,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":"?”","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"bFn0aMP1L8sEvK","output_index":0,"sequence_number":45,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" concise","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"Zz30C2WT","output_index":0,"sequence_number":63,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" It","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"x45aYg4sob8tD","output_index":0,"sequence_number":46,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" since","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"gEWwtErdVR","output_index":0,"sequence_number":64,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" feels","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"Jhms451C7D","output_index":0,"sequence_number":47,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" they","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"Dudj3TpoNjj","output_index":0,"sequence_number":65,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" warm","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"mZV2RabaVIY","output_index":0,"sequence_number":48,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" only","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"AdLWdgKZKTl","output_index":0,"sequence_number":66,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" and","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"LS4PEOircSR9","output_index":0,"sequence_number":49,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" asked","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"n3vXQDgsQZ","output_index":0,"sequence_number":67,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" inviting","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"lt8XWel","output_index":0,"sequence_number":50,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" for","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"c4QU3LdkT6y9","output_index":0,"sequence_number":68,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" while","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"jGE7DmM59l","output_index":0,"sequence_number":51,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" a","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"5kiUVRo8S6uMhp","output_index":0,"sequence_number":69,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" staying","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"KzTdsfdr","output_index":0,"sequence_number":52,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" greeting","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"0lyRCT7","output_index":0,"sequence_number":70,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" concise","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"FWaNxKs1","output_index":0,"sequence_number":53,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":".","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"GKTWqiuwWIN7MTf","output_index":0,"sequence_number":71,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":".","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"AsFhpF3qxnzvjBh","output_index":0,"sequence_number":54,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" So","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"MAOk9JFabq7YT","output_index":0,"sequence_number":72,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" I","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"uUybF3zcUdQT02","output_index":0,"sequence_number":55,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":",","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"6gaiLLFSEGaoWxv","output_index":0,"sequence_number":73,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" want","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"rZNJJgZnlJC","output_index":0,"sequence_number":56,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" I","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"6htEeqC4pKq8nN","output_index":0,"sequence_number":74,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" to","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"xdBvcJJYHwrmZ","output_index":0,"sequence_number":57,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":"’ll","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"Sag609o8mxf1E","output_index":0,"sequence_number":75,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" ensure","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"sAYad8tnz","output_index":0,"sequence_number":58,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" go","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"H0wckFDtlu9bZ","output_index":0,"sequence_number":76,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" my","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"6c3U7mhfehE11","output_index":0,"sequence_number":59,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" with","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"sIskUDN5KnT","output_index":0,"sequence_number":77,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" response","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"ivEyqCQ","output_index":0,"sequence_number":60,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" a","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"YpukEgagMmHJpJ","output_index":0,"sequence_number":78,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" is","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"khdcRr4MekLU5","output_index":0,"sequence_number":61,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" simple","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"hdwBGpOzI","output_index":0,"sequence_number":79,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" friendly","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"qiyfqMw","output_index":0,"sequence_number":62,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" “","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"phZY3esH6BWcZb","output_index":0,"sequence_number":80,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" and","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"to8d0kJiII4G","output_index":0,"sequence_number":63,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":"Hello","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"h4H1VPtqzE2","output_index":0,"sequence_number":81,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" approachable","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"fGs","output_index":0,"sequence_number":64,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":"!”","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"fkNaILG98AA2gn","output_index":0,"sequence_number":82,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" without","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"QBlJJr4d","output_index":0,"sequence_number":65,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" and","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"qhFdEM7PM4mv","output_index":0,"sequence_number":83,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" going","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"AGGPCnERjW","output_index":0,"sequence_number":66,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" then","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"abKEGUvdrW1","output_index":0,"sequence_number":84,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" over","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"YIbVeL7yC0F","output_index":0,"sequence_number":67,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" add","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"yb4JYE4BVuD4","output_index":0,"sequence_number":85,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":"board","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"nvy4lvqDftu","output_index":0,"sequence_number":68,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":",","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"Zw9C1PgVcWKDIsb","output_index":0,"sequence_number":86,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":".","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"843Tn4GXlezd26Z","output_index":0,"sequence_number":69,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" \"","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"IrcCu6YaZ5UcXv","output_index":0,"sequence_number":87,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" Al","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"VDBw2MDJVPX4x","output_index":0,"sequence_number":70,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":"How","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"9pqmrQfRmH1hC","output_index":0,"sequence_number":88,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":"right","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"tT7YV7SVp6j","output_index":0,"sequence_number":71,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" can","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"tAWpNSVP5LRB","output_index":0,"sequence_number":89,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":",","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"bmrffOniWWrl7Fi","output_index":0,"sequence_number":72,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" I","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"5dd50t2hsfxXKd","output_index":0,"sequence_number":90,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" I","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"aW68ke9EtpKK0d","output_index":0,"sequence_number":73,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" help","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"8yrbvOFjc4Z","output_index":0,"sequence_number":91,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":"’ll","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"R1Waa4O1nfVKS","output_index":0,"sequence_number":74,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" you","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"BzTMFsKNGvmw","output_index":0,"sequence_number":92,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" keep","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"Cu2JXMR6KOV","output_index":0,"sequence_number":75,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" today","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"hzOSdOJ89N","output_index":0,"sequence_number":93,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" it","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"5eQw2l0ZZCGuV","output_index":0,"sequence_number":76,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":"?\"","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"l7aFUmEzX9JSS9","output_index":0,"sequence_number":94,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" short","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"3O9jzER9yu","output_index":0,"sequence_number":77,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" That","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"3GTYRJeHGPY","output_index":0,"sequence_number":95,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" and","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"bmKvAoV64Czt","output_index":0,"sequence_number":78,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" strikes","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"ikWshMkB","output_index":0,"sequence_number":96,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" sweet","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"esnb1jMnaY","output_index":0,"sequence_number":79,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" a","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"rYGUYZScs1uHig","output_index":0,"sequence_number":97,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" as","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"TqZVkblKJYCch","output_index":0,"sequence_number":80,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" good","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"CEyXOMj4iyw","output_index":0,"sequence_number":98,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" requested","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"8Y7DEB","output_index":0,"sequence_number":81,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" balance","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"xUPDh5Fq","output_index":0,"sequence_number":99,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":"!","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","obfuscation":"jXHWTbrY4peGCcg","output_index":0,"sequence_number":82,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":"!","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","obfuscation":"gqvOyWcCfmF0dZp","output_index":0,"sequence_number":100,"summary_index":0} event: response.reasoning_summary_text.done - data: {"type":"response.reasoning_summary_text.done","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","output_index":0,"sequence_number":83,"summary_index":0,"text":"**Crafting a simple greeting**\n\nThe user wants me to keep it straightforward, just a friendly greeting and to ask how I can help. I like the idea of saying, “Hello! How can I assist you?” It feels warm and inviting while staying concise. I want to ensure my response is friendly and approachable without going overboard. Alright, I’ll keep it short and sweet as requested!"} + data: {"type":"response.reasoning_summary_text.done","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","output_index":0,"sequence_number":101,"summary_index":0,"text":"**Responding to a greeting**\n\nThe user request is clear: they just want me to say hello. There’s no need for any tool calls, just a simple response. I think a warm greeting like, “Hello! How can I help you today?” would work well, but I must keep it concise since they only asked for a greeting. So, I’ll go with a simple “Hello!” and then add, \"How can I help you today?\" That strikes a good balance!"} event: response.reasoning_summary_part.done - data: {"type":"response.reasoning_summary_part.done","item_id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","output_index":0,"part":{"type":"summary_text","text":"**Crafting a simple greeting**\n\nThe user wants me to keep it straightforward, just a friendly greeting and to ask how I can help. I like the idea of saying, “Hello! How can I assist you?” It feels warm and inviting while staying concise. I want to ensure my response is friendly and approachable without going overboard. Alright, I’ll keep it short and sweet as requested!"},"sequence_number":84,"summary_index":0} + data: {"type":"response.reasoning_summary_part.done","item_id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","output_index":0,"part":{"type":"summary_text","text":"**Responding to a greeting**\n\nThe user request is clear: they just want me to say hello. There’s no need for any tool calls, just a simple response. I think a warm greeting like, “Hello! How can I help you today?” would work well, but I must keep it concise since they only asked for a greeting. So, I’ll go with a simple “Hello!” and then add, \"How can I help you today?\" That strikes a good balance!"},"sequence_number":102,"summary_index":0} event: response.output_item.done - data: {"type":"response.output_item.done","item":{"id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","type":"reasoning","summary":[{"type":"summary_text","text":"**Crafting a simple greeting**\n\nThe user wants me to keep it straightforward, just a friendly greeting and to ask how I can help. I like the idea of saying, “Hello! How can I assist you?” It feels warm and inviting while staying concise. I want to ensure my response is friendly and approachable without going overboard. Alright, I’ll keep it short and sweet as requested!"}]},"output_index":0,"sequence_number":85} + data: {"type":"response.output_item.done","item":{"id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","type":"reasoning","summary":[{"type":"summary_text","text":"**Responding to a greeting**\n\nThe user request is clear: they just want me to say hello. There’s no need for any tool calls, just a simple response. I think a warm greeting like, “Hello! How can I help you today?” would work well, but I must keep it concise since they only asked for a greeting. So, I’ll go with a simple “Hello!” and then add, \"How can I help you today?\" That strikes a good balance!"}]},"output_index":0,"sequence_number":103} event: response.output_item.added - data: {"type":"response.output_item.added","item":{"id":"msg_0aa050c0917aa92400696a92dcd78c8194b48ed6743a6b09da","type":"message","status":"in_progress","content":[],"role":"assistant"},"output_index":1,"sequence_number":86} + data: {"type":"response.output_item.added","item":{"id":"msg_0eaccefbe8d1cad100696b717a48d48194a9862119b16f385f","type":"message","status":"in_progress","content":[],"role":"assistant"},"output_index":1,"sequence_number":104} event: response.content_part.added - data: {"type":"response.content_part.added","content_index":0,"item_id":"msg_0aa050c0917aa92400696a92dcd78c8194b48ed6743a6b09da","output_index":1,"part":{"type":"output_text","annotations":[],"logprobs":[],"text":""},"sequence_number":87} + data: {"type":"response.content_part.added","content_index":0,"item_id":"msg_0eaccefbe8d1cad100696b717a48d48194a9862119b16f385f","output_index":1,"part":{"type":"output_text","annotations":[],"logprobs":[],"text":""},"sequence_number":105} event: response.output_text.delta - data: {"type":"response.output_text.delta","content_index":0,"delta":"Hello","item_id":"msg_0aa050c0917aa92400696a92dcd78c8194b48ed6743a6b09da","logprobs":[],"obfuscation":"1rsMrSOjBNM","output_index":1,"sequence_number":88} + data: {"type":"response.output_text.delta","content_index":0,"delta":"Hello","item_id":"msg_0eaccefbe8d1cad100696b717a48d48194a9862119b16f385f","logprobs":[],"obfuscation":"PxAMDAu0pso","output_index":1,"sequence_number":106} event: response.output_text.delta - data: {"type":"response.output_text.delta","content_index":0,"delta":"!","item_id":"msg_0aa050c0917aa92400696a92dcd78c8194b48ed6743a6b09da","logprobs":[],"obfuscation":"pDzOm9GUPRNJxdw","output_index":1,"sequence_number":89} + data: {"type":"response.output_text.delta","content_index":0,"delta":"!","item_id":"msg_0eaccefbe8d1cad100696b717a48d48194a9862119b16f385f","logprobs":[],"obfuscation":"sqVAszeBeZt023r","output_index":1,"sequence_number":107} event: response.output_text.delta - data: {"type":"response.output_text.delta","content_index":0,"delta":" How","item_id":"msg_0aa050c0917aa92400696a92dcd78c8194b48ed6743a6b09da","logprobs":[],"obfuscation":"00vrYu0fCPDe","output_index":1,"sequence_number":90} + data: {"type":"response.output_text.delta","content_index":0,"delta":" How","item_id":"msg_0eaccefbe8d1cad100696b717a48d48194a9862119b16f385f","logprobs":[],"obfuscation":"5KXNvPpQ1ixc","output_index":1,"sequence_number":108} event: response.output_text.delta - data: {"type":"response.output_text.delta","content_index":0,"delta":" can","item_id":"msg_0aa050c0917aa92400696a92dcd78c8194b48ed6743a6b09da","logprobs":[],"obfuscation":"0ooEiyqmSAW4","output_index":1,"sequence_number":91} + data: {"type":"response.output_text.delta","content_index":0,"delta":" can","item_id":"msg_0eaccefbe8d1cad100696b717a48d48194a9862119b16f385f","logprobs":[],"obfuscation":"wWRCrfLWvrY7","output_index":1,"sequence_number":109} event: response.output_text.delta - data: {"type":"response.output_text.delta","content_index":0,"delta":" I","item_id":"msg_0aa050c0917aa92400696a92dcd78c8194b48ed6743a6b09da","logprobs":[],"obfuscation":"QkyMMcHftzgADn","output_index":1,"sequence_number":92} + data: {"type":"response.output_text.delta","content_index":0,"delta":" I","item_id":"msg_0eaccefbe8d1cad100696b717a48d48194a9862119b16f385f","logprobs":[],"obfuscation":"Ye6YZtwS7Joi85","output_index":1,"sequence_number":110} event: response.output_text.delta - data: {"type":"response.output_text.delta","content_index":0,"delta":" help","item_id":"msg_0aa050c0917aa92400696a92dcd78c8194b48ed6743a6b09da","logprobs":[],"obfuscation":"jdAt7eezGRZ","output_index":1,"sequence_number":93} + data: {"type":"response.output_text.delta","content_index":0,"delta":" help","item_id":"msg_0eaccefbe8d1cad100696b717a48d48194a9862119b16f385f","logprobs":[],"obfuscation":"TyMigFa99aq","output_index":1,"sequence_number":111} event: response.output_text.delta - data: {"type":"response.output_text.delta","content_index":0,"delta":" you","item_id":"msg_0aa050c0917aa92400696a92dcd78c8194b48ed6743a6b09da","logprobs":[],"obfuscation":"ZbfZNliH0XxO","output_index":1,"sequence_number":94} + data: {"type":"response.output_text.delta","content_index":0,"delta":" you","item_id":"msg_0eaccefbe8d1cad100696b717a48d48194a9862119b16f385f","logprobs":[],"obfuscation":"n3ptXE5OI6T5","output_index":1,"sequence_number":112} event: response.output_text.delta - data: {"type":"response.output_text.delta","content_index":0,"delta":" today","item_id":"msg_0aa050c0917aa92400696a92dcd78c8194b48ed6743a6b09da","logprobs":[],"obfuscation":"cMbV2QnRA9","output_index":1,"sequence_number":95} + data: {"type":"response.output_text.delta","content_index":0,"delta":" today","item_id":"msg_0eaccefbe8d1cad100696b717a48d48194a9862119b16f385f","logprobs":[],"obfuscation":"1gqR5G4T83","output_index":1,"sequence_number":113} event: response.output_text.delta - data: {"type":"response.output_text.delta","content_index":0,"delta":"?","item_id":"msg_0aa050c0917aa92400696a92dcd78c8194b48ed6743a6b09da","logprobs":[],"obfuscation":"HnNReI76Hs6gcd4","output_index":1,"sequence_number":96} + data: {"type":"response.output_text.delta","content_index":0,"delta":"?","item_id":"msg_0eaccefbe8d1cad100696b717a48d48194a9862119b16f385f","logprobs":[],"obfuscation":"UH1kVn8mPkjsAKI","output_index":1,"sequence_number":114} event: response.output_text.done - data: {"type":"response.output_text.done","content_index":0,"item_id":"msg_0aa050c0917aa92400696a92dcd78c8194b48ed6743a6b09da","logprobs":[],"output_index":1,"sequence_number":97,"text":"Hello! How can I help you today?"} + data: {"type":"response.output_text.done","content_index":0,"item_id":"msg_0eaccefbe8d1cad100696b717a48d48194a9862119b16f385f","logprobs":[],"output_index":1,"sequence_number":115,"text":"Hello! How can I help you today?"} event: response.content_part.done - data: {"type":"response.content_part.done","content_index":0,"item_id":"msg_0aa050c0917aa92400696a92dcd78c8194b48ed6743a6b09da","output_index":1,"part":{"type":"output_text","annotations":[],"logprobs":[],"text":"Hello! How can I help you today?"},"sequence_number":98} + data: {"type":"response.content_part.done","content_index":0,"item_id":"msg_0eaccefbe8d1cad100696b717a48d48194a9862119b16f385f","output_index":1,"part":{"type":"output_text","annotations":[],"logprobs":[],"text":"Hello! How can I help you today?"},"sequence_number":116} event: response.output_item.done - data: {"type":"response.output_item.done","item":{"id":"msg_0aa050c0917aa92400696a92dcd78c8194b48ed6743a6b09da","type":"message","status":"completed","content":[{"type":"output_text","annotations":[],"logprobs":[],"text":"Hello! How can I help you today?"}],"role":"assistant"},"output_index":1,"sequence_number":99} + data: {"type":"response.output_item.done","item":{"id":"msg_0eaccefbe8d1cad100696b717a48d48194a9862119b16f385f","type":"message","status":"completed","content":[{"type":"output_text","annotations":[],"logprobs":[],"text":"Hello! How can I help you today?"}],"role":"assistant"},"output_index":1,"sequence_number":117} event: response.completed - data: {"type":"response.completed","response":{"id":"resp_0aa050c0917aa92400696a92d9aa94819480cb297c6d5d45bd","object":"response","created_at":1768592089,"status":"completed","background":false,"completed_at":1768592092,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5-mini-2025-08-07","output":[{"id":"rs_0aa050c0917aa92400696a92d9fa2881949921ff65f3af2a61","type":"reasoning","summary":[{"type":"summary_text","text":"**Crafting a simple greeting**\n\nThe user wants me to keep it straightforward, just a friendly greeting and to ask how I can help. I like the idea of saying, “Hello! How can I assist you?” It feels warm and inviting while staying concise. I want to ensure my response is friendly and approachable without going overboard. Alright, I’ll keep it short and sweet as requested!"}]},{"id":"msg_0aa050c0917aa92400696a92dcd78c8194b48ed6743a6b09da","type":"message","status":"completed","content":[{"type":"output_text","annotations":[],"logprobs":[],"text":"Hello! How can I help you today?"}],"role":"assistant"}],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":"detailed"},"safety_identifier":null,"service_tier":"default","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[{"type":"function","description":"Use this function to transfer a task to the selected team member.\n You must provide a clear and concise description of the task the member should achieve AND the expected output.","name":"transfer_task","parameters":{"additionalProperties":false,"properties":{"agent":{"description":"The name of the agent to transfer the task to.","type":"string"},"expected_output":{"description":"The expected output from the member (optional).","type":"string"},"task":{"description":"A clear and concise description of the task the member should achieve.","type":"string"}},"required":["agent","expected_output","task"],"type":"object"},"strict":true}],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":{"input_tokens":292,"input_tokens_details":{"cached_tokens":0},"output_tokens":15,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":307},"user":null,"metadata":{}},"sequence_number":100} + data: {"type":"response.completed","response":{"id":"resp_0eaccefbe8d1cad100696b7175c7388194a0e40ce80ec719e0","object":"response","created_at":1768649077,"status":"completed","background":false,"completed_at":1768649082,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5-mini-2025-08-07","output":[{"id":"rs_0eaccefbe8d1cad100696b7176155c8194b14e753cd12099f7","type":"reasoning","summary":[{"type":"summary_text","text":"**Responding to a greeting**\n\nThe user request is clear: they just want me to say hello. There’s no need for any tool calls, just a simple response. I think a warm greeting like, “Hello! How can I help you today?” would work well, but I must keep it concise since they only asked for a greeting. So, I’ll go with a simple “Hello!” and then add, \"How can I help you today?\" That strikes a good balance!"}]},{"id":"msg_0eaccefbe8d1cad100696b717a48d48194a9862119b16f385f","type":"message","status":"completed","content":[{"type":"output_text","annotations":[],"logprobs":[],"text":"Hello! How can I help you today?"}],"role":"assistant"}],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":"detailed"},"safety_identifier":null,"service_tier":"default","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[{"type":"function","description":"Use this function to transfer a task to the selected team member.\n You must provide a clear and concise description of the task the member should achieve AND the expected output.","name":"transfer_task","parameters":{"additionalProperties":false,"properties":{"agent":{"description":"The name of the agent to transfer the task to.","type":"string"},"expected_output":{"description":"The expected output from the member (optional).","type":"string"},"task":{"description":"A clear and concise description of the task the member should achieve.","type":"string"}},"required":["agent","expected_output","task"],"type":"object"},"strict":true}],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":{"input_tokens":292,"input_tokens_details":{"cached_tokens":0},"output_tokens":79,"output_tokens_details":{"reasoning_tokens":64},"total_tokens":371},"user":null,"metadata":{}},"sequence_number":118} headers: {} status: 200 OK code: 200 - duration: 318.350917ms + duration: 654.71233ms diff --git a/e2e/testdata/cassettes/TestExec_Anthropic.yaml b/e2e/testdata/cassettes/TestExec_Anthropic.yaml index 57ae2969a..5258462b3 100644 --- a/e2e/testdata/cassettes/TestExec_Anthropic.yaml +++ b/e2e/testdata/cassettes/TestExec_Anthropic.yaml @@ -8,8 +8,11 @@ interactions: proto_minor: 1 content_length: 0 host: api.anthropic.com - body: '{"max_tokens":64000,"messages":[{"content":[{"text":"What''s 2+2?","cache_control":{"type":"ephemeral"},"type":"text"}],"role":"user"}],"model":"claude-sonnet-4-0","system":[{"text":"You are a knowledgeable assistant that helps users with various tasks.\nBe helpful, accurate, and concise in your responses.","cache_control":{"type":"ephemeral"},"type":"text"}],"tools":[],"stream":true}' - url: https://api.anthropic.com/v1/messages + body: '{"max_tokens":64000,"messages":[{"content":[{"text":"What''s 2+2?","cache_control":{"type":"ephemeral"},"type":"text"}],"role":"user"}],"model":"claude-sonnet-4-0","system":[{"text":"You are a knowledgeable assistant that helps users with various tasks.\nBe helpful, accurate, and concise in your responses.","cache_control":{"type":"ephemeral"},"type":"text"}],"thinking":{"budget_tokens":8192,"type":"enabled"},"tools":[],"stream":true}' + form: + beta: + - "true" + url: https://api.anthropic.com/v1/messages?beta=true method: POST response: proto: HTTP/2.0 @@ -18,25 +21,73 @@ interactions: content_length: -1 body: |+ event: message_start - data: {"type":"message_start","message":{"model":"claude-sonnet-4-20250514","id":"msg_01GXFRpuydwBQ1cR7FwUzKf2","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":42,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":3,"service_tier":"standard"}} } + data: {"type":"message_start","message":{"model":"claude-sonnet-4-20250514","id":"msg_01XdBWjQgiaSjP8e9d3YrnJ6","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":72,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":1,"service_tier":"standard"}} } event: content_block_start - data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""} } + data: {"type":"content_block_start","index":0,"content_block":{"type":"thinking","thinking":"","signature":""} } event: ping data: {"type": "ping"} event: content_block_delta - data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"2 "} } + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":"This"} } event: content_block_delta - data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"+ 2 = 4"} } + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" is a simple arithmetic question."} } + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" "}} + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":"2 "} } + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":"+ 2 = 4."} } + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" This"} } + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" is a basic"} } + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" math"} } + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" fact that I should answer"} } + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" directly"} } + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" an"} } + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":"d accurately."} } + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":""} } + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"signature_delta","signature":"EqECCkYICxgCKkCBEDDA5Ostk+KQMjR9hLF5g9zTT2AD0xR/pleqahaHWxCY1hG/7u56MP672Cxb4rtOf3zJCC9A2o66eE35ofbOEgzK81rEcZh1x8Ve81QaDGnmf45zz6rCx5EnaCIw8qudSsQbjEauPpGM+DN2NGgatKlRkIlEx2aV0dhy+EO7NqCKY+X/iC1gB3a3TH0pKogBC4qbBiJr44UZswjhs1JyOblrJtgvIu0Bv8v0J9svL6IHSGywo9SQztKEoU8SIzlnFSjJjExfvVfvxQJOe1kxLDRPRVs97rOiBUubWMIxIQuzGMcSMzZciEqul6oKFt+Tfno4OEI3FDhyE5Dwy4nSZLp+B+i3b0cC1G+l+T88Be1tSwXYILNxtxgB"}} + + event: content_block_stop + data: {"type":"content_block_stop","index":0 } + + event: content_block_start + data: {"type":"content_block_start","index":1,"content_block":{"type":"text","text":""} } + + event: content_block_delta + data: {"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":"2 + 2 "} } + + event: content_block_delta + data: {"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":"= 4"} } event: content_block_stop - data: {"type":"content_block_stop","index":0} + data: {"type":"content_block_stop","index":1 } event: message_delta - data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":42,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":13} } + data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":72,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":52} } event: message_stop data: {"type":"message_stop" } @@ -44,4 +95,4 @@ interactions: headers: {} status: 200 OK code: 200 - duration: 2.017107125s + duration: 4.09885925s diff --git a/e2e/testdata/cassettes/TestExec_Anthropic_AgentsMd.yaml b/e2e/testdata/cassettes/TestExec_Anthropic_AgentsMd.yaml index be1b72c2a..ca82352c5 100644 --- a/e2e/testdata/cassettes/TestExec_Anthropic_AgentsMd.yaml +++ b/e2e/testdata/cassettes/TestExec_Anthropic_AgentsMd.yaml @@ -8,8 +8,11 @@ interactions: proto_minor: 1 content_length: 0 host: api.anthropic.com - body: '{"max_tokens":64000,"messages":[{"content":[{"text":"What''s 2+2?","cache_control":{"type":"ephemeral"},"type":"text"}],"role":"user"}],"model":"claude-sonnet-4-0","system":[{"text":"You are a knowledgeable assistant that helps users with various tasks.\nBe helpful, accurate, and concise in your responses.","cache_control":{"type":"ephemeral"},"type":"text"},{"text":"This is a test agents.md file.","cache_control":{"type":"ephemeral"},"type":"text"}],"tools":[],"stream":true}' - url: https://api.anthropic.com/v1/messages + body: '{"max_tokens":64000,"messages":[{"content":[{"text":"What''s 2+2?","cache_control":{"type":"ephemeral"},"type":"text"}],"role":"user"}],"model":"claude-sonnet-4-0","system":[{"text":"You are a knowledgeable assistant that helps users with various tasks.\nBe helpful, accurate, and concise in your responses.","cache_control":{"type":"ephemeral"},"type":"text"},{"text":"This is a test agents.md file.","cache_control":{"type":"ephemeral"},"type":"text"}],"thinking":{"budget_tokens":8192,"type":"enabled"},"tools":[],"stream":true}' + form: + beta: + - "true" + url: https://api.anthropic.com/v1/messages?beta=true method: POST response: proto: HTTP/2.0 @@ -18,30 +21,78 @@ interactions: content_length: -1 body: |+ event: message_start - data: {"type":"message_start","message":{"model":"claude-sonnet-4-20250514","id":"msg_012P4u6eXp1GHoJgX7p5Axot","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":51,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":3,"service_tier":"standard"}} } + data: {"type":"message_start","message":{"model":"claude-sonnet-4-20250514","id":"msg_01EPdJLMMc47eouuMxzxE5fb","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":81,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":1,"service_tier":"standard"}}} event: content_block_start - data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""} } + data: {"type":"content_block_start","index":0,"content_block":{"type":"thinking","thinking":"","signature":""} } event: ping data: {"type": "ping"} event: content_block_delta - data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"2 "} } + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":"This"} } event: content_block_delta - data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"+ 2 = 4"} } + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" is a very"} } + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" straight"}} + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":"forward math question. "} } + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":"2 "} } + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":"+ 2 = 4."} } + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" This"} } + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" is basic"}} + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" arithmetic that I"}} + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" can answer"} } + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" directly an"} } + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":"d accurately."}} + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":""} } + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"signature_delta","signature":"EqUCCkYICxgCKkADS6FWWyQZD/Ho7nbheLhxNGQETPU+zihQK+A0544EUnseyqEl2GnZCbq22cZK6mI69/9Wrf1jCq9dDV+JOmkQEgwifmIZ+XMYJNQ29xwaDDO1isEcLUw6wyGlayIwEiv7LCMF9aKaPnc7JNHboWNDckzB3p9kTuJlrArTDahJsymQbbGA3VqnEdgSBWcPKowBVvzQuZRDh61j84U5MkQoIsxmlrh4P3ydherI7Q+GGbOcUgEiBgibrBvIGxiY1OVGqpdKaM2UET7K+J66G9/JWso7fXGxEXZtc/DcMjbSBM2CO6NhB0sgweFQi7YKKUt5G78VYnzXh75AYYJ8oNUVj033PjkD0S2UdaJ1u8yYAiEp6hUUQcWguM0kjyEYAQ=="} } event: content_block_stop data: {"type":"content_block_stop","index":0 } + event: content_block_start + data: {"type":"content_block_start","index":1,"content_block":{"type":"text","text":""} } + + event: content_block_delta + data: {"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":"2 + 2 "} } + + event: content_block_delta + data: {"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":"= 4"} } + + event: content_block_stop + data: {"type":"content_block_stop","index":1 } + event: message_delta - data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":51,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":13} } + data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":81,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":52} } event: message_stop - data: {"type":"message_stop" } + data: {"type":"message_stop" } headers: {} status: 200 OK code: 200 - duration: 765.528375ms + duration: 1.818977375s diff --git a/e2e/testdata/cassettes/TestExec_Anthropic_ToolCall.yaml b/e2e/testdata/cassettes/TestExec_Anthropic_ToolCall.yaml index cdd9ef352..4e3130ff3 100644 --- a/e2e/testdata/cassettes/TestExec_Anthropic_ToolCall.yaml +++ b/e2e/testdata/cassettes/TestExec_Anthropic_ToolCall.yaml @@ -8,8 +8,11 @@ interactions: proto_minor: 1 content_length: 0 host: api.anthropic.com - body: '{"max_tokens":64000,"messages":[{"content":[{"text":"How many files in testdata/working_dir? Only output the number.","cache_control":{"type":"ephemeral"},"type":"text"}],"role":"user"}],"model":"claude-sonnet-4-0","system":[{"text":"You are a knowledgeable assistant that helps users with various tasks.\nBe helpful, accurate, and concise in your responses.","type":"text"},{"text":"## Filesystem Tool Instructions\n\nThis toolset provides comprehensive filesystem operations.\n\n### Working Directory\n- Relative paths (like \".\" or \"src/main.go\") are resolved relative to the working directory\n- Absolute paths (like \"/etc/hosts\") access files directly\n- Paths starting with \"..\" can access parent directories\n\n### Common Patterns\n- Always check if directories exist before creating files\n- Prefer read_multiple_files for batch operations\n- Use search_files_content for finding specific code or text\n\n### Performance Tips\n- Use read_multiple_files instead of multiple read_file calls\n- Use directory_tree with max_depth to limit large traversals\n- Use appropriate exclude patterns in search operations","cache_control":{"type":"ephemeral"},"type":"text"}],"tools":[{"input_schema":{"properties":{"path":{"description":"The directory path to traverse (relative to working directory)","type":"string"}},"required":["path"],"type":"object"},"name":"directory_tree","description":"Get a recursive tree view of files and directories as a JSON structure."},{"input_schema":{"properties":{"edits":{"description":"Array of edit operations","items":{"additionalProperties":false,"properties":{"newText":{"description":"The replacement text","type":"string"},"oldText":{"description":"The exact text to replace","type":"string"}},"required":["oldText","newText"],"type":"object"},"type":["null","array"]},"path":{"description":"The file path to edit","type":"string"}},"required":["path","edits"],"type":"object"},"name":"edit_file","description":"Make line-based edits to a text file. Each edit replaces exact line sequences with new content."},{"input_schema":{"properties":{"path":{"description":"The directory path to list","type":"string"}},"required":["path"],"type":"object"},"name":"list_directory","description":"Get a detailed listing of all files and directories in a specified path."},{"input_schema":{"properties":{"path":{"description":"The file path to read","type":"string"}},"required":["path"],"type":"object"},"name":"read_file","description":"Read the complete contents of a file from the file system."},{"input_schema":{"properties":{"json":{"description":"Whether to return the result as JSON","type":"boolean"},"paths":{"description":"Array of file paths to read","items":{"type":"string"},"type":["null","array"]}},"required":["paths"],"type":"object"},"name":"read_multiple_files","description":"Read the contents of multiple files simultaneously."},{"input_schema":{"properties":{"excludePatterns":{"description":"Patterns to exclude from search","items":{"type":"string"},"type":["null","array"]},"is_regex":{"description":"If true, treat query as regex; otherwise literal text","type":"boolean"},"path":{"description":"The starting directory path","type":"string"},"query":{"description":"The text or regex pattern to search for","type":"string"}},"required":["path","query"],"type":"object"},"name":"search_files_content","description":"Searches for text or regex patterns in the content of files matching a GLOB pattern."},{"input_schema":{"properties":{"content":{"description":"The content to write to the file","type":"string"},"path":{"description":"The file path to write","type":"string"}},"required":["path","content"],"type":"object"},"name":"write_file","description":"Create a new file or completely overwrite an existing file with new content."}],"stream":true}' - url: https://api.anthropic.com/v1/messages + body: '{"max_tokens":64000,"messages":[{"content":[{"text":"How many files in testdata/working_dir? Only output the number.","cache_control":{"type":"ephemeral"},"type":"text"}],"role":"user"}],"model":"claude-sonnet-4-0","system":[{"text":"You are a knowledgeable assistant that helps users with various tasks.\nBe helpful, accurate, and concise in your responses.","type":"text"},{"text":"## Filesystem Tool Instructions\n\nThis toolset provides comprehensive filesystem operations.\n\n### Working Directory\n- Relative paths (like \".\" or \"src/main.go\") are resolved relative to the working directory\n- Absolute paths (like \"/etc/hosts\") access files directly\n- Paths starting with \"..\" can access parent directories\n\n### Common Patterns\n- Always check if directories exist before creating files\n- Prefer read_multiple_files for batch operations\n- Use search_files_content for finding specific code or text\n\n### Performance Tips\n- Use read_multiple_files instead of multiple read_file calls\n- Use directory_tree with max_depth to limit large traversals\n- Use appropriate exclude patterns in search operations","cache_control":{"type":"ephemeral"},"type":"text"}],"thinking":{"budget_tokens":8192,"type":"enabled"},"tools":[{"input_schema":{"properties":{"path":{"description":"The directory path to traverse (relative to working directory)","type":"string"}},"required":["path"],"type":"object"},"name":"directory_tree","description":"Get a recursive tree view of files and directories as a JSON structure."},{"input_schema":{"properties":{"edits":{"description":"Array of edit operations","items":{"additionalProperties":false,"properties":{"newText":{"description":"The replacement text","type":"string"},"oldText":{"description":"The exact text to replace","type":"string"}},"required":["oldText","newText"],"type":"object"},"type":["null","array"]},"path":{"description":"The file path to edit","type":"string"}},"required":["path","edits"],"type":"object"},"name":"edit_file","description":"Make line-based edits to a text file. Each edit replaces exact line sequences with new content."},{"input_schema":{"properties":{"path":{"description":"The directory path to list","type":"string"}},"required":["path"],"type":"object"},"name":"list_directory","description":"Get a detailed listing of all files and directories in a specified path."},{"input_schema":{"properties":{"path":{"description":"The file path to read","type":"string"}},"required":["path"],"type":"object"},"name":"read_file","description":"Read the complete contents of a file from the file system."},{"input_schema":{"properties":{"json":{"description":"Whether to return the result as JSON","type":"boolean"},"paths":{"description":"Array of file paths to read","items":{"type":"string"},"type":["null","array"]}},"required":["paths"],"type":"object"},"name":"read_multiple_files","description":"Read the contents of multiple files simultaneously."},{"input_schema":{"properties":{"excludePatterns":{"description":"Patterns to exclude from search","items":{"type":"string"},"type":["null","array"]},"is_regex":{"description":"If true, treat query as regex; otherwise literal text","type":"boolean"},"path":{"description":"The starting directory path","type":"string"},"query":{"description":"The text or regex pattern to search for","type":"string"}},"required":["path","query"],"type":"object"},"name":"search_files_content","description":"Searches for text or regex patterns in the content of files matching a GLOB pattern."},{"input_schema":{"properties":{"content":{"description":"The content to write to the file","type":"string"},"path":{"description":"The file path to write","type":"string"}},"required":["path","content"],"type":"object"},"name":"write_file","description":"Create a new file or completely overwrite an existing file with new content."}],"stream":true}' + form: + beta: + - "true" + url: https://api.anthropic.com/v1/messages?beta=true method: POST response: proto: HTTP/2.0 @@ -18,36 +21,96 @@ interactions: content_length: -1 body: |+ event: message_start - data: {"type":"message_start","message":{"model":"claude-sonnet-4-20250514","id":"msg_01XMB8NZNJvc6HLpow9dBZsN","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":3,"cache_creation_input_tokens":1276,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":1276,"ephemeral_1h_input_tokens":0},"output_tokens":1,"service_tier":"standard"}} } + data: {"type":"message_start","message":{"model":"claude-sonnet-4-20250514","id":"msg_01VGwM1asir9xEbbT6GgohGz","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":10,"cache_creation_input_tokens":0,"cache_read_input_tokens":1447,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":3,"service_tier":"standard"}} } event: content_block_start - data: {"type":"content_block_start","index":0,"content_block":{"type":"tool_use","id":"toolu_014s24YHqFHKjhBgnZwX6b1j","name":"list_directory","input":{}} } + data: {"type":"content_block_start","index":0,"content_block":{"type":"thinking","thinking":"","signature":""} } event: ping data: {"type": "ping"} event: content_block_delta - data: {"type":"content_block_delta","index":0,"delta":{"type":"input_json_delta","partial_json":""}} + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":"The user wants"} } event: content_block_delta - data: {"type":"content_block_delta","index":0,"delta":{"type":"input_json_delta","partial_json":"{\"path\": \"testdata/working_dir"} } + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" to know how many files are in the"} } event: content_block_delta - data: {"type":"content_block_delta","index":0,"delta":{"type":"input_json_delta","partial_json":"\"}"} } + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" \""} } + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":"testdata/working_dir\" directory"} } + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" an"} } + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":"d only"}} + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" wants"} } + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" the number as"} } + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" output. I nee"} } + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":"d to use the list_directory function to"} } + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" get the contents"} } + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" of that"} } + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" directory an"} } + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":"d then count the files ("} } + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":"not directories)."} } + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":""} } + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"signature_delta","signature":"EpsDCkYICxgCKkB7pvGBLJjWTPM/xYHIISqNOg9LySRVznutx46Pbr2jIg2URvAZOxaaDghD2EqcL/znV9Yz8eNWddn4IwL6GtzZEgy6oSDufFlHwS01tugaDPSZBASgLBi39yorDCIwxQisMk2IX0M9F14pKfNHRUtRF0R/5ydtsG0sKzwb0tj5aJAB+mMraamFZivw/8NXKoICCaUrCP9wiUFxxvpqRDDy4IEqQ+Eob++Zwd//hXDq59m6HXptYzrmdaTzl8091yxcDdyGkH6cLHMuPWpdDO6ksVH7eK5PbXZ1bfghX4YO1+cyH53Ma2Y0rcbDgw7OkLJ5jEkDHKa6uyzfhf5o4oF/TXTGH81Hkl//rGeur2ucuKjHibWFR3m3xC72B4MwzgzeHmQ1RPXaHyV75YGbuIWZUgzxSvOSYIvygInga7Qv8rH0ARWSc2by6t2pIk70AwigLpOj/28agEQQPXcwxIa+0VfZoyP7/UcUnX8zvvL+j5LtHu5vM07jt8K8L/CMXW5tuu3LhOJy/5YtHwJFbHo9ZG33GAE="} } + + event: content_block_stop + data: {"type":"content_block_stop","index":0 } + + event: content_block_start + data: {"type":"content_block_start","index":1,"content_block":{"type":"tool_use","id":"toolu_01351PtRMRaDsvjDtTiKFrdX","name":"list_directory","input":{}} } + + event: content_block_delta + data: {"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":""} } + + event: content_block_delta + data: {"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"{\"path\": \"testdata/"} } + + event: content_block_delta + data: {"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"working_dir"} } + + event: content_block_delta + data: {"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"\"}"} } event: content_block_stop - data: {"type":"content_block_stop","index":0 } + data: {"type":"content_block_stop","index":1 } event: message_delta - data: {"type":"message_delta","delta":{"stop_reason":"tool_use","stop_sequence":null},"usage":{"input_tokens":3,"cache_creation_input_tokens":1276,"cache_read_input_tokens":0,"output_tokens":58} } + data: {"type":"message_delta","delta":{"stop_reason":"tool_use","stop_sequence":null},"usage":{"input_tokens":10,"cache_creation_input_tokens":0,"cache_read_input_tokens":1447,"output_tokens":119} } event: message_stop - data: {"type":"message_stop" } + data: {"type":"message_stop" } headers: {} status: 200 OK code: 200 - duration: 1.609181416s + duration: 1.896834584s - id: 1 request: proto: HTTP/1.1 @@ -55,8 +118,11 @@ interactions: proto_minor: 1 content_length: 0 host: api.anthropic.com - body: '{"max_tokens":64000,"messages":[{"content":[{"text":"How many files in testdata/working_dir? Only output the number.","type":"text"}],"role":"user"},{"content":[{"id":"toolu_014s24YHqFHKjhBgnZwX6b1j","input":{"path":"testdata/working_dir"},"name":"list_directory","cache_control":{"type":"ephemeral"},"type":"tool_use"}],"role":"assistant"},{"content":[{"tool_use_id":"toolu_014s24YHqFHKjhBgnZwX6b1j","is_error":false,"cache_control":{"type":"ephemeral"},"content":[{"text":"FILE README.me","type":"text"}],"type":"tool_result"}],"role":"user"}],"model":"claude-sonnet-4-0","system":[{"text":"You are a knowledgeable assistant that helps users with various tasks.\nBe helpful, accurate, and concise in your responses.","type":"text"},{"text":"## Filesystem Tool Instructions\n\nThis toolset provides comprehensive filesystem operations.\n\n### Working Directory\n- Relative paths (like \".\" or \"src/main.go\") are resolved relative to the working directory\n- Absolute paths (like \"/etc/hosts\") access files directly\n- Paths starting with \"..\" can access parent directories\n\n### Common Patterns\n- Always check if directories exist before creating files\n- Prefer read_multiple_files for batch operations\n- Use search_files_content for finding specific code or text\n\n### Performance Tips\n- Use read_multiple_files instead of multiple read_file calls\n- Use directory_tree with max_depth to limit large traversals\n- Use appropriate exclude patterns in search operations","cache_control":{"type":"ephemeral"},"type":"text"}],"tools":[{"input_schema":{"properties":{"path":{"description":"The directory path to traverse (relative to working directory)","type":"string"}},"required":["path"],"type":"object"},"name":"directory_tree","description":"Get a recursive tree view of files and directories as a JSON structure."},{"input_schema":{"properties":{"edits":{"description":"Array of edit operations","items":{"additionalProperties":false,"properties":{"newText":{"description":"The replacement text","type":"string"},"oldText":{"description":"The exact text to replace","type":"string"}},"required":["oldText","newText"],"type":"object"},"type":["null","array"]},"path":{"description":"The file path to edit","type":"string"}},"required":["path","edits"],"type":"object"},"name":"edit_file","description":"Make line-based edits to a text file. Each edit replaces exact line sequences with new content."},{"input_schema":{"properties":{"path":{"description":"The directory path to list","type":"string"}},"required":["path"],"type":"object"},"name":"list_directory","description":"Get a detailed listing of all files and directories in a specified path."},{"input_schema":{"properties":{"path":{"description":"The file path to read","type":"string"}},"required":["path"],"type":"object"},"name":"read_file","description":"Read the complete contents of a file from the file system."},{"input_schema":{"properties":{"json":{"description":"Whether to return the result as JSON","type":"boolean"},"paths":{"description":"Array of file paths to read","items":{"type":"string"},"type":["null","array"]}},"required":["paths"],"type":"object"},"name":"read_multiple_files","description":"Read the contents of multiple files simultaneously."},{"input_schema":{"properties":{"excludePatterns":{"description":"Patterns to exclude from search","items":{"type":"string"},"type":["null","array"]},"is_regex":{"description":"If true, treat query as regex; otherwise literal text","type":"boolean"},"path":{"description":"The starting directory path","type":"string"},"query":{"description":"The text or regex pattern to search for","type":"string"}},"required":["path","query"],"type":"object"},"name":"search_files_content","description":"Searches for text or regex patterns in the content of files matching a GLOB pattern."},{"input_schema":{"properties":{"content":{"description":"The content to write to the file","type":"string"},"path":{"description":"The file path to write","type":"string"}},"required":["path","content"],"type":"object"},"name":"write_file","description":"Create a new file or completely overwrite an existing file with new content."}],"stream":true}' - url: https://api.anthropic.com/v1/messages + body: '{"max_tokens":64000,"messages":[{"content":[{"text":"How many files in testdata/working_dir? Only output the number.","type":"text"}],"role":"user"},{"content":[{"signature":"EpsDCkYICxgCKkB7pvGBLJjWTPM/xYHIISqNOg9LySRVznutx46Pbr2jIg2URvAZOxaaDghD2EqcL/znV9Yz8eNWddn4IwL6GtzZEgy6oSDufFlHwS01tugaDPSZBASgLBi39yorDCIwxQisMk2IX0M9F14pKfNHRUtRF0R/5ydtsG0sKzwb0tj5aJAB+mMraamFZivw/8NXKoICCaUrCP9wiUFxxvpqRDDy4IEqQ+Eob++Zwd//hXDq59m6HXptYzrmdaTzl8091yxcDdyGkH6cLHMuPWpdDO6ksVH7eK5PbXZ1bfghX4YO1+cyH53Ma2Y0rcbDgw7OkLJ5jEkDHKa6uyzfhf5o4oF/TXTGH81Hkl//rGeur2ucuKjHibWFR3m3xC72B4MwzgzeHmQ1RPXaHyV75YGbuIWZUgzxSvOSYIvygInga7Qv8rH0ARWSc2by6t2pIk70AwigLpOj/28agEQQPXcwxIa+0VfZoyP7/UcUnX8zvvL+j5LtHu5vM07jt8K8L/CMXW5tuu3LhOJy/5YtHwJFbHo9ZG33GAE=","thinking":"The user wants to know how many files are in the \"testdata/working_dir\" directory and only wants the number as output. I need to use the list_directory function to get the contents of that directory and then count the files (not directories).","type":"thinking"},{"id":"toolu_01351PtRMRaDsvjDtTiKFrdX","input":{"path":"testdata/working_dir"},"name":"list_directory","cache_control":{"type":"ephemeral"},"type":"tool_use"}],"role":"assistant"},{"content":[{"tool_use_id":"toolu_01351PtRMRaDsvjDtTiKFrdX","cache_control":{"type":"ephemeral"},"content":[{"text":"FILE README.me","type":"text"}],"type":"tool_result"}],"role":"user"}],"model":"claude-sonnet-4-0","system":[{"text":"You are a knowledgeable assistant that helps users with various tasks.\nBe helpful, accurate, and concise in your responses.","type":"text"},{"text":"## Filesystem Tool Instructions\n\nThis toolset provides comprehensive filesystem operations.\n\n### Working Directory\n- Relative paths (like \".\" or \"src/main.go\") are resolved relative to the working directory\n- Absolute paths (like \"/etc/hosts\") access files directly\n- Paths starting with \"..\" can access parent directories\n\n### Common Patterns\n- Always check if directories exist before creating files\n- Prefer read_multiple_files for batch operations\n- Use search_files_content for finding specific code or text\n\n### Performance Tips\n- Use read_multiple_files instead of multiple read_file calls\n- Use directory_tree with max_depth to limit large traversals\n- Use appropriate exclude patterns in search operations","cache_control":{"type":"ephemeral"},"type":"text"}],"thinking":{"budget_tokens":8192,"type":"enabled"},"tools":[{"input_schema":{"properties":{"path":{"description":"The directory path to traverse (relative to working directory)","type":"string"}},"required":["path"],"type":"object"},"name":"directory_tree","description":"Get a recursive tree view of files and directories as a JSON structure."},{"input_schema":{"properties":{"edits":{"description":"Array of edit operations","items":{"additionalProperties":false,"properties":{"newText":{"description":"The replacement text","type":"string"},"oldText":{"description":"The exact text to replace","type":"string"}},"required":["oldText","newText"],"type":"object"},"type":["null","array"]},"path":{"description":"The file path to edit","type":"string"}},"required":["path","edits"],"type":"object"},"name":"edit_file","description":"Make line-based edits to a text file. Each edit replaces exact line sequences with new content."},{"input_schema":{"properties":{"path":{"description":"The directory path to list","type":"string"}},"required":["path"],"type":"object"},"name":"list_directory","description":"Get a detailed listing of all files and directories in a specified path."},{"input_schema":{"properties":{"path":{"description":"The file path to read","type":"string"}},"required":["path"],"type":"object"},"name":"read_file","description":"Read the complete contents of a file from the file system."},{"input_schema":{"properties":{"json":{"description":"Whether to return the result as JSON","type":"boolean"},"paths":{"description":"Array of file paths to read","items":{"type":"string"},"type":["null","array"]}},"required":["paths"],"type":"object"},"name":"read_multiple_files","description":"Read the contents of multiple files simultaneously."},{"input_schema":{"properties":{"excludePatterns":{"description":"Patterns to exclude from search","items":{"type":"string"},"type":["null","array"]},"is_regex":{"description":"If true, treat query as regex; otherwise literal text","type":"boolean"},"path":{"description":"The starting directory path","type":"string"},"query":{"description":"The text or regex pattern to search for","type":"string"}},"required":["path","query"],"type":"object"},"name":"search_files_content","description":"Searches for text or regex patterns in the content of files matching a GLOB pattern."},{"input_schema":{"properties":{"content":{"description":"The content to write to the file","type":"string"},"path":{"description":"The file path to write","type":"string"}},"required":["path","content"],"type":"object"},"name":"write_file","description":"Create a new file or completely overwrite an existing file with new content."}],"stream":true}' + form: + beta: + - "true" + url: https://api.anthropic.com/v1/messages?beta=true method: POST response: proto: HTTP/2.0 @@ -65,27 +131,90 @@ interactions: content_length: -1 body: |+ event: message_start - data: {"type":"message_start","message":{"model":"claude-sonnet-4-20250514","id":"msg_01Fgtbn8FaKcAgSMhYfMx4Gr","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":6,"cache_creation_input_tokens":72,"cache_read_input_tokens":1276,"cache_creation":{"ephemeral_5m_input_tokens":72,"ephemeral_1h_input_tokens":0},"output_tokens":1,"service_tier":"standard"}} } + data: {"type":"message_start","message":{"model":"claude-sonnet-4-20250514","id":"msg_01G27XZsH236DwqeqRwPZCXM","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":13,"cache_creation_input_tokens":139,"cache_read_input_tokens":1447,"cache_creation":{"ephemeral_5m_input_tokens":139,"ephemeral_1h_input_tokens":0},"output_tokens":5,"service_tier":"standard"}} } event: content_block_start - data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""} } + data: {"type":"content_block_start","index":0,"content_block":{"type":"thinking","thinking":"","signature":""} } event: ping data: {"type": "ping"} event: content_block_delta - data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"1"} } + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":"The result shows there is"} } + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" "} } + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":"1 file in the test"} } + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":"data/working_dir directory. The"} } + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" listing"} } + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" shows \""} } + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":"FILE README.me\","} } + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" which indicates"}} + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" there"} } + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" is"}} + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" one"} } + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" file name"} } + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":"d \"README.me\"."} } + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" Since the user only"} } + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" wants the number,"} } + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" I should output just \""} } + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":"1\"."} } + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":""} } + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"signature_delta","signature":"EokDCkYICxgCKkD6x65qrU9K6vIHYlap2o7BNToPc7uJYhb4i8cFmygXJibPVEqSPitHbEs5KwINhKUrUsCOV+VM4l3vczIE4+otEgyFPxvwBhKe9N2x+AIaDFSagh2SZgV4S3y8iCIw2Yj4TQRzoolitQFm0ft2rnybomYYJ/v0QOoQWoDMttrIqDy5RRlRTOGs4aiWomL5KvABufY5u8AiJGI1HpslkXNhBA7p0mvfT2MQOPpxmQb6HXEJqs2cfoLJQVnTpa9LFf6b5evP1Ll6RffJGUBzjPhuYuKP5oeVDVdD8lj2onkLQC2uH8oTLNoK/F2hmyTAoHNZvWOValY5M6vTjig/yr5i8m6l5pwObHSjR3Mt8l2+fSfmcZ5uIxr5EnEfnNSUc+Jnxu237Lkd7lHX0f1CChRmFGRZRgY9x32diSNXuYIK/nCJIZCgy+1mds+DiAdYkAbyV5ZmkF8QAO/U662qdJnjGZ1FOWiymj7tozUbA6uXz8uwD4nVkH7xKv3OcKm4xwHSGAE="} } event: content_block_stop data: {"type":"content_block_stop","index":0 } + event: content_block_start + data: {"type":"content_block_start","index":1,"content_block":{"type":"text","text":""} } + + event: content_block_delta + data: {"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":"1"} } + + event: content_block_stop + data: {"type":"content_block_stop","index":1 } + event: message_delta - data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":6,"cache_creation_input_tokens":72,"cache_read_input_tokens":1276,"output_tokens":4} } + data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":13,"cache_creation_input_tokens":139,"cache_read_input_tokens":1447,"output_tokens":67} } event: message_stop - data: {"type":"message_stop" } + data: {"type":"message_stop" } headers: {} status: 200 OK code: 200 - duration: 1.408707334s + duration: 1.922262125s diff --git a/e2e/testdata/cassettes/TestExec_Gemini.yaml b/e2e/testdata/cassettes/TestExec_Gemini.yaml index 0d2b448ae..f44495c0d 100644 --- a/e2e/testdata/cassettes/TestExec_Gemini.yaml +++ b/e2e/testdata/cassettes/TestExec_Gemini.yaml @@ -1,26 +1,27 @@ --- version: 2 interactions: -- id: 0 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 0 - host: generativelanguage.googleapis.com - body: "{\"contents\":[{\"parts\":[{\"text\":\"You are a knowledgeable assistant that helps users with various tasks.\\nBe helpful, accurate, and concise in your responses.\\n\"}],\"role\":\"user\"},{\"parts\":[{\"text\":\"What's 2+2?\"}],\"role\":\"user\"}],\"generationConfig\":{}}\n" - form: - alt: - - sse - url: https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:streamGenerateContent?alt=sse - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - body: "data: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \"2 + 2 = 4\"}],\"role\": \"model\"},\"finishReason\": \"STOP\",\"index\": 0}],\"usageMetadata\": {\"promptTokenCount\": 35,\"candidatesTokenCount\": 7,\"totalTokenCount\": 62,\"promptTokensDetails\": [{\"modality\": \"TEXT\",\"tokenCount\": 35}],\"thoughtsTokenCount\": 20},\"modelVersion\": \"gemini-2.5-flash\",\"responseId\": \"KbsUaZ_aC72vnsEPyNaRiAk\"}\r\n\r\n" - headers: {} - status: 200 OK - code: 200 - duration: 753.598125ms + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + host: generativelanguage.googleapis.com + body: | + {"contents":[{"parts":[{"text":"You are a knowledgeable assistant that helps users with various tasks.\nBe helpful, accurate, and concise in your responses.\n"}],"role":"user"},{"parts":[{"text":"What's 2+2?"}],"role":"user"}],"generationConfig":{"thinkingConfig":{"includeThoughts":true,"thinkingBudget":-1}}} + form: + alt: + - sse + url: https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:streamGenerateContent?alt=sse + method: POST + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: -1 + body: "data: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \"**Calculating the Answer Directly**\\n\\nI'm focused on providing the direct answer to this arithmetic question. There's no need for complex reasoning or exploration; simplicity is key here. The emphasis is purely on delivering the correct response as efficiently as possible. I'm streamlining my process to get this result out.\\n\\n\\n\",\"thought\": true}],\"role\": \"model\"},\"index\": 0}],\"usageMetadata\": {\"promptTokenCount\": 35,\"totalTokenCount\": 51,\"promptTokensDetails\": [{\"modality\": \"TEXT\",\"tokenCount\": 35}],\"thoughtsTokenCount\": 16},\"modelVersion\": \"gemini-2.5-flash\",\"responseId\": \"-qRqaanCMLmfkdUPsYTm6AI\"}\r\n\r\ndata: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \"4\"}],\"role\": \"model\"},\"finishReason\": \"STOP\",\"index\": 0}],\"usageMetadata\": {\"promptTokenCount\": 35,\"totalTokenCount\": 51,\"promptTokensDetails\": [{\"modality\": \"TEXT\",\"tokenCount\": 35}],\"thoughtsTokenCount\": 16},\"modelVersion\": \"gemini-2.5-flash\",\"responseId\": \"-qRqaanCMLmfkdUPsYTm6AI\"}\r\n\r\n" + headers: {} + status: 200 OK + code: 200 + duration: 946.481458ms diff --git a/e2e/testdata/cassettes/TestExec_Gemini_ToolCall.yaml b/e2e/testdata/cassettes/TestExec_Gemini_ToolCall.yaml index f01d38d62..2bc099a13 100644 --- a/e2e/testdata/cassettes/TestExec_Gemini_ToolCall.yaml +++ b/e2e/testdata/cassettes/TestExec_Gemini_ToolCall.yaml @@ -9,7 +9,7 @@ interactions: content_length: 0 host: generativelanguage.googleapis.com body: | - {"contents":[{"parts":[{"text":"You are a knowledgeable assistant that helps users with various tasks.\nBe helpful, accurate, and concise in your responses.\n"}],"role":"user"},{"parts":[{"text":"## Filesystem Tool Instructions\n\nThis toolset provides comprehensive filesystem operations.\n\n### Working Directory\n- Relative paths (like \".\" or \"src/main.go\") are resolved relative to the working directory\n- Absolute paths (like \"/etc/hosts\") access files directly\n- Paths starting with \"..\" can access parent directories\n\n### Common Patterns\n- Always check if directories exist before creating files\n- Prefer read_multiple_files for batch operations\n- Use search_files_content for finding specific code or text\n\n### Performance Tips\n- Use read_multiple_files instead of multiple read_file calls\n- Use directory_tree with max_depth to limit large traversals\n- Use appropriate exclude patterns in search operations"}],"role":"user"},{"parts":[{"text":"How many files in testdata/working_dir? Only output the number."}],"role":"user"}],"generationConfig":{},"toolConfig":{"functionCallingConfig":{"mode":"AUTO"}},"tools":[{"functionDeclarations":[{"description":"Get a recursive tree view of files and directories as a JSON structure.","name":"directory_tree","parameters":{"properties":{"path":{"description":"The directory path to traverse (relative to working directory)","type":"string"}},"required":["path"],"type":"object"}},{"description":"Make line-based edits to a text file. Each edit replaces exact line sequences with new content.","name":"edit_file","parameters":{"properties":{"edits":{"description":"Array of edit operations","items":{"properties":{"newText":{"description":"The replacement text","type":"string"},"oldText":{"description":"The exact text to replace","type":"string"}},"required":["oldText","newText"],"type":"object"},"type":"array"},"path":{"description":"The file path to edit","type":"string"}},"required":["path","edits"],"type":"object"}},{"description":"Get a detailed listing of all files and directories in a specified path.","name":"list_directory","parameters":{"properties":{"path":{"description":"The directory path to list","type":"string"}},"required":["path"],"type":"object"}},{"description":"Read the complete contents of a file from the file system.","name":"read_file","parameters":{"properties":{"path":{"description":"The file path to read","type":"string"}},"required":["path"],"type":"object"}},{"description":"Read the contents of multiple files simultaneously.","name":"read_multiple_files","parameters":{"properties":{"json":{"description":"Whether to return the result as JSON","type":"boolean"},"paths":{"description":"Array of file paths to read","items":{"type":"string"},"type":"array"}},"required":["paths"],"type":"object"}},{"description":"Searches for text or regex patterns in the content of files matching a GLOB pattern.","name":"search_files_content","parameters":{"properties":{"excludePatterns":{"description":"Patterns to exclude from search","items":{"type":"string"},"type":"array"},"is_regex":{"description":"If true, treat query as regex; otherwise literal text","type":"boolean"},"path":{"description":"The starting directory path","type":"string"},"query":{"description":"The text or regex pattern to search for","type":"string"}},"required":["path","query"],"type":"object"}},{"description":"Create a new file or completely overwrite an existing file with new content.","name":"write_file","parameters":{"properties":{"content":{"description":"The content to write to the file","type":"string"},"path":{"description":"The file path to write","type":"string"}},"required":["path","content"],"type":"object"}}]}]} + {"contents":[{"parts":[{"text":"You are a knowledgeable assistant that helps users with various tasks.\nBe helpful, accurate, and concise in your responses.\n"}],"role":"user"},{"parts":[{"text":"## Filesystem Tool Instructions\n\nThis toolset provides comprehensive filesystem operations.\n\n### Working Directory\n- Relative paths (like \".\" or \"src/main.go\") are resolved relative to the working directory\n- Absolute paths (like \"/etc/hosts\") access files directly\n- Paths starting with \"..\" can access parent directories\n\n### Common Patterns\n- Always check if directories exist before creating files\n- Prefer read_multiple_files for batch operations\n- Use search_files_content for finding specific code or text\n\n### Performance Tips\n- Use read_multiple_files instead of multiple read_file calls\n- Use directory_tree with max_depth to limit large traversals\n- Use appropriate exclude patterns in search operations"}],"role":"user"},{"parts":[{"text":"How many files in testdata/working_dir? Only output the number."}],"role":"user"}],"generationConfig":{"thinkingConfig":{"includeThoughts":true,"thinkingBudget":-1}},"toolConfig":{"functionCallingConfig":{"mode":"AUTO"}},"tools":[{"functionDeclarations":[{"description":"Get a recursive tree view of files and directories as a JSON structure.","name":"directory_tree","parameters":{"properties":{"path":{"description":"The directory path to traverse (relative to working directory)","type":"string"}},"required":["path"],"type":"object"}},{"description":"Make line-based edits to a text file. Each edit replaces exact line sequences with new content.","name":"edit_file","parameters":{"properties":{"edits":{"description":"Array of edit operations","items":{"properties":{"newText":{"description":"The replacement text","type":"string"},"oldText":{"description":"The exact text to replace","type":"string"}},"required":["oldText","newText"],"type":"object"},"type":"array"},"path":{"description":"The file path to edit","type":"string"}},"required":["path","edits"],"type":"object"}},{"description":"Get a detailed listing of all files and directories in a specified path.","name":"list_directory","parameters":{"properties":{"path":{"description":"The directory path to list","type":"string"}},"required":["path"],"type":"object"}},{"description":"Read the complete contents of a file from the file system.","name":"read_file","parameters":{"properties":{"path":{"description":"The file path to read","type":"string"}},"required":["path"],"type":"object"}},{"description":"Read the contents of multiple files simultaneously.","name":"read_multiple_files","parameters":{"properties":{"json":{"description":"Whether to return the result as JSON","type":"boolean"},"paths":{"description":"Array of file paths to read","items":{"type":"string"},"type":"array"}},"required":["paths"],"type":"object"}},{"description":"Searches for text or regex patterns in the content of files matching a GLOB pattern.","name":"search_files_content","parameters":{"properties":{"excludePatterns":{"description":"Patterns to exclude from search","items":{"type":"string"},"type":"array"},"is_regex":{"description":"If true, treat query as regex; otherwise literal text","type":"boolean"},"path":{"description":"The starting directory path","type":"string"},"query":{"description":"The text or regex pattern to search for","type":"string"}},"required":["path","query"],"type":"object"}},{"description":"Create a new file or completely overwrite an existing file with new content.","name":"write_file","parameters":{"properties":{"content":{"description":"The content to write to the file","type":"string"},"path":{"description":"The file path to write","type":"string"}},"required":["path","content"],"type":"object"}}]}]} form: alt: - sse @@ -20,11 +20,11 @@ interactions: proto_major: 2 proto_minor: 0 content_length: -1 - body: "data: {\"candidates\": [{\"content\": {\"parts\": [{\"functionCall\": {\"name\": \"list_directory\",\"args\": {\"path\": \"testdata/working_dir\"}},\"thoughtSignature\": \"CiQBcsjafMQOAtd/kYG5K8Mxkz/fvdvygCm3OBNzcp0jhUMuo9oKYgFyyNp8lZNRvDMqK0UBBno7MGFYcVulOWq1BXb1PxTgI9pCoUq3JPhcGqRwWy5bH9XwS4HnTvWM8WD4qIV0b6TgEmvpq3WXGwo64A12DGrb1GFGxbYTEQyg3j0wcEiqD71YCt8BAXLI2nyNlaPD5FJDwjHZ0wBQofwpcE0IGFEQpHjdk8duKF5LMaujdkA5CkWlWadpEZhprVkdnDmJv07pxOCBsP7ZBS9qhNeMHnmVu4Dna9PO+2X5n5V30mGD3so3ILH7Y3dzsrLlGuJ9mIWFZGWvjQgY9TU4ESPztUdUlqLw91AbxiUop7dKjywGgr968OfOuSgy+QeXoKb5KdymUBjhroBPuOsODHQaSWqxip5mo4faPpBHMoI2i81Vz/mLlmR8Oe1Px8fsFZTKilYzBfh31nP8poDVsZ4Iacb5ygf8Xw==\"}],\"role\": \"model\"},\"finishReason\": \"STOP\",\"index\": 0,\"finishMessage\": \"Model generated function call(s).\"}],\"usageMetadata\": {\"promptTokenCount\": 745,\"candidatesTokenCount\": 20,\"totalTokenCount\": 827,\"promptTokensDetails\": [{\"modality\": \"TEXT\",\"tokenCount\": 745}],\"thoughtsTokenCount\": 62},\"modelVersion\": \"gemini-2.5-flash\",\"responseId\": \"ulhqabbLJb3xvdIP74iiuAc\"}\r\n\r\n" + body: "data: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \"**Pinpointing Directory Information**\\n\\nI'm currently focused on the user's request, specifically the need to determine the file count within a directory. I've identified `list_directory` and `directory_tree` as potentially relevant functions, and I'm zeroing in on the required input parameters for the former; it needs a `path`, which the user has provided as \\\"testdata/working_dir\\\".\\n\\n\\n\",\"thought\": true}],\"role\": \"model\"},\"index\": 0}],\"usageMetadata\": {\"promptTokenCount\": 745,\"totalTokenCount\": 813,\"promptTokensDetails\": [{\"modality\": \"TEXT\",\"tokenCount\": 745}],\"thoughtsTokenCount\": 68},\"modelVersion\": \"gemini-2.5-flash\",\"responseId\": \"-6RqadX3MObxnsEPw_WZmAM\"}\r\n\r\ndata: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \"**Narrowing Down the Strategy**\\n\\nI've determined that `list_directory` is the more appropriate function to use initially, given the need for a file count in a specified directory. The output from `list_directory` requires parsing to identify and count files. My updated plan is to call `list_directory` using the path \\\"testdata/working_dir\\\", then process the returned data, specifically the items where the `type` is listed as \\\"file\\\". I'll count those items to arrive at the desired file count.\\n\\n\\n\",\"thought\": true}],\"role\": \"model\"},\"index\": 0}],\"usageMetadata\": {\"promptTokenCount\": 745,\"totalTokenCount\": 989,\"promptTokensDetails\": [{\"modality\": \"TEXT\",\"tokenCount\": 745}],\"thoughtsTokenCount\": 244},\"modelVersion\": \"gemini-2.5-flash\",\"responseId\": \"-6RqadX3MObxnsEPw_WZmAM\"}\r\n\r\ndata: {\"candidates\": [{\"content\": {\"parts\": [{\"functionCall\": {\"name\": \"list_directory\",\"args\": {\"path\": \"testdata/working_dir\"}},\"thoughtSignature\": \"CiIBcsjafB2TOWr7jmzqFUDRT8stM2yL5XXwxrnDh6fF8NO/Cm4BcsjafOGQI+limC2mW0iBTjfbGqZ4lP9JiKcrOskJQYxZI6jblZF02CEv0q/D+HWs/MxTh9/pxjanyR8Wr1aXcm12gsT7WwQ0qrA7ObQghi7yLpok0lOa9fGydSV60AvWp3Gcnagyn2LfkmoEbwrUAQFyyNp8FJS6ZBgDMdfSU6Q429HED7UiEPPM5iWQF8fgW3tMy7O9a2VPbaRAkP0tkkGrd9+uTp2Js3WcojOUoi5dNC5BShf7i7z6/TT6oKNayCOZeBwVjYA5Vc8YbqCqyPqSYwl+bhdmkKwKl0Ei/OS2wX8LHwMaJKBOjJHEEcUFOuKk9DM5QldeMjB08g0rk7+BIiNltiCTm+QyIkV9nw2pGyUkYIRWjU7Ceck/3miZ+Cuihw28NBhCJ9zHDsDJAhRqkwK6Zkty49Iw+yiisz8VgAIaCugBAXLI2nxZ0hQ8JTVb5mRDv5Tk8ynKeTYDaRkP4eJBeqCq6/bBdDh7yyqN986W2cYWacXuF/bJczYRdoRMfXJRTyQ2hfHxQfxToZZIGc6KodNJD/LEErSsjFJPxhp0aqldH+dp/UXP86+/Uhx7VBIkxNG6GOZhuZxrPZM65qkgdUqajkAhZXz/HFZF4H+wmYV4yPXwPNoEuQLWqpkVINmsJ2Ae43AnFZmSARhO3faex+n0I8XTuBjy8NPfcAICNXNY9rICO7x35uKPAJsAgFXyVGk5pXF0NrpEd4ppiZyyZrc4cBNSZ3ju1Qr8AQFyyNp8MFNfVIIjLjywDXmz1d+gRMwGh4SQHlNsI16IzS0iIm/z8nm22AbpjaVlaSN8tag4OR4CgqJsa7A83ECR5xv6NuNW8WHOquw/mmBY8L5/nGS92aBD5cXcUJuFUeI38VJR0Ff1aCt9CDDtnKqEnbdxMZYs7ruxXY7fB7LR5opw00N1bniJyZrpVQgjL5HomNkFRNn+Ch58v0YZ1g7Zt2/iy943u74WCjiTEHmOKYRDtDMXfQb+uyEqnr7S3nCKytXNMylDcOiZaS9VqAO5B/xa83cjWQpmtwquhdqQM4fgk0ebufqeLh4qUGy7xst9wV12eRkFqgL/MwrKAQFyyNp8SgJlP9UKqUr+vs3IrjxIRTWC6CODjw0vZzl4Yt93yuLMcqTsNNXondyEQbrwD9PHbfGEDWJNjMQfw9PD8Jwxz6jmen2vFn1LYt4q5amceev/lsmv0NOTXvxXbzK1K6xXYsewbsCFa4Lekj7aT9JAVZN8X94Be79u0feQhrnwl21XxYFs6/mo9QWuOSxiucTNF0+6Dt7cfx5EwvSLSbuw3qXbr9cPqkrOsqC5jY+7df0TT12fBnv4ZROpiikWMrqDZB8RlcoKiQEBcsjafDQ1RrE5G0Yz5O45MakHGoB7AbglTeu/2pVnrboJTRntER6bbWme3mqifCjVuyjxSkrQqBRR9854rezwMHB+yY9069hG0NaVkRFMUji6PO7wLaNARdoXhQF74aJP5UxCY/x7EAox7Z89o3XolPSlAZC04aCJwBjFbDC5ghze9cU4aA/KFQ==\"}],\"role\": \"model\"},\"finishReason\": \"STOP\",\"index\": 0,\"finishMessage\": \"Model generated function call(s).\"}],\"usageMetadata\": {\"promptTokenCount\": 745,\"candidatesTokenCount\": 18,\"totalTokenCount\": 1007,\"promptTokensDetails\": [{\"modality\": \"TEXT\",\"tokenCount\": 745}],\"thoughtsTokenCount\": 244},\"modelVersion\": \"gemini-2.5-flash\",\"responseId\": \"-6RqadX3MObxnsEPw_WZmAM\"}\r\n\r\n" headers: {} status: 200 OK code: 200 - duration: 921.011167ms + duration: 1.356446125s - id: 1 request: proto: HTTP/1.1 @@ -33,7 +33,7 @@ interactions: content_length: 0 host: generativelanguage.googleapis.com body: | - {"contents":[{"parts":[{"text":"You are a knowledgeable assistant that helps users with various tasks.\nBe helpful, accurate, and concise in your responses.\n"}],"role":"user"},{"parts":[{"text":"## Filesystem Tool Instructions\n\nThis toolset provides comprehensive filesystem operations.\n\n### Working Directory\n- Relative paths (like \".\" or \"src/main.go\") are resolved relative to the working directory\n- Absolute paths (like \"/etc/hosts\") access files directly\n- Paths starting with \"..\" can access parent directories\n\n### Common Patterns\n- Always check if directories exist before creating files\n- Prefer read_multiple_files for batch operations\n- Use search_files_content for finding specific code or text\n\n### Performance Tips\n- Use read_multiple_files instead of multiple read_file calls\n- Use directory_tree with max_depth to limit large traversals\n- Use appropriate exclude patterns in search operations"}],"role":"user"},{"parts":[{"text":"How many files in testdata/working_dir? Only output the number."}],"role":"user"},{"parts":[{"functionCall":{"args":{"path":"testdata/working_dir"},"name":"list_directory"},"thoughtSignature":"CiQBcsjafMQOAtd/kYG5K8Mxkz/fvdvygCm3OBNzcp0jhUMuo9oKYgFyyNp8lZNRvDMqK0UBBno7MGFYcVulOWq1BXb1PxTgI9pCoUq3JPhcGqRwWy5bH9XwS4HnTvWM8WD4qIV0b6TgEmvpq3WXGwo64A12DGrb1GFGxbYTEQyg3j0wcEiqD71YCt8BAXLI2nyNlaPD5FJDwjHZ0wBQofwpcE0IGFEQpHjdk8duKF5LMaujdkA5CkWlWadpEZhprVkdnDmJv07pxOCBsP7ZBS9qhNeMHnmVu4Dna9PO+2X5n5V30mGD3so3ILH7Y3dzsrLlGuJ9mIWFZGWvjQgY9TU4ESPztUdUlqLw91AbxiUop7dKjywGgr968OfOuSgy+QeXoKb5KdymUBjhroBPuOsODHQaSWqxip5mo4faPpBHMoI2i81Vz/mLlmR8Oe1Px8fsFZTKilYzBfh31nP8poDVsZ4Iacb5ygf8Xw=="}],"role":"model"},{"parts":[{"functionResponse":{"name":"call_7a82211f-95da-406b-b994-c6814936f490","response":{"result":"FILE README.me\n"}}}],"role":"user"}],"generationConfig":{},"toolConfig":{"functionCallingConfig":{"mode":"AUTO"}},"tools":[{"functionDeclarations":[{"description":"Get a recursive tree view of files and directories as a JSON structure.","name":"directory_tree","parameters":{"properties":{"path":{"description":"The directory path to traverse (relative to working directory)","type":"string"}},"required":["path"],"type":"object"}},{"description":"Make line-based edits to a text file. Each edit replaces exact line sequences with new content.","name":"edit_file","parameters":{"properties":{"edits":{"description":"Array of edit operations","items":{"properties":{"newText":{"description":"The replacement text","type":"string"},"oldText":{"description":"The exact text to replace","type":"string"}},"required":["oldText","newText"],"type":"object"},"type":"array"},"path":{"description":"The file path to edit","type":"string"}},"required":["path","edits"],"type":"object"}},{"description":"Get a detailed listing of all files and directories in a specified path.","name":"list_directory","parameters":{"properties":{"path":{"description":"The directory path to list","type":"string"}},"required":["path"],"type":"object"}},{"description":"Read the complete contents of a file from the file system.","name":"read_file","parameters":{"properties":{"path":{"description":"The file path to read","type":"string"}},"required":["path"],"type":"object"}},{"description":"Read the contents of multiple files simultaneously.","name":"read_multiple_files","parameters":{"properties":{"json":{"description":"Whether to return the result as JSON","type":"boolean"},"paths":{"description":"Array of file paths to read","items":{"type":"string"},"type":"array"}},"required":["paths"],"type":"object"}},{"description":"Searches for text or regex patterns in the content of files matching a GLOB pattern.","name":"search_files_content","parameters":{"properties":{"excludePatterns":{"description":"Patterns to exclude from search","items":{"type":"string"},"type":"array"},"is_regex":{"description":"If true, treat query as regex; otherwise literal text","type":"boolean"},"path":{"description":"The starting directory path","type":"string"},"query":{"description":"The text or regex pattern to search for","type":"string"}},"required":["path","query"],"type":"object"}},{"description":"Create a new file or completely overwrite an existing file with new content.","name":"write_file","parameters":{"properties":{"content":{"description":"The content to write to the file","type":"string"},"path":{"description":"The file path to write","type":"string"}},"required":["path","content"],"type":"object"}}]}]} + {"contents":[{"parts":[{"text":"You are a knowledgeable assistant that helps users with various tasks.\nBe helpful, accurate, and concise in your responses.\n"}],"role":"user"},{"parts":[{"text":"## Filesystem Tool Instructions\n\nThis toolset provides comprehensive filesystem operations.\n\n### Working Directory\n- Relative paths (like \".\" or \"src/main.go\") are resolved relative to the working directory\n- Absolute paths (like \"/etc/hosts\") access files directly\n- Paths starting with \"..\" can access parent directories\n\n### Common Patterns\n- Always check if directories exist before creating files\n- Prefer read_multiple_files for batch operations\n- Use search_files_content for finding specific code or text\n\n### Performance Tips\n- Use read_multiple_files instead of multiple read_file calls\n- Use directory_tree with max_depth to limit large traversals\n- Use appropriate exclude patterns in search operations"}],"role":"user"},{"parts":[{"text":"How many files in testdata/working_dir? Only output the number."}],"role":"user"},{"parts":[{"functionCall":{"args":{"path":"testdata/working_dir"},"name":"list_directory"},"thoughtSignature":"CiIBcsjafB2TOWr7jmzqFUDRT8stM2yL5XXwxrnDh6fF8NO/Cm4BcsjafOGQI+limC2mW0iBTjfbGqZ4lP9JiKcrOskJQYxZI6jblZF02CEv0q/D+HWs/MxTh9/pxjanyR8Wr1aXcm12gsT7WwQ0qrA7ObQghi7yLpok0lOa9fGydSV60AvWp3Gcnagyn2LfkmoEbwrUAQFyyNp8FJS6ZBgDMdfSU6Q429HED7UiEPPM5iWQF8fgW3tMy7O9a2VPbaRAkP0tkkGrd9+uTp2Js3WcojOUoi5dNC5BShf7i7z6/TT6oKNayCOZeBwVjYA5Vc8YbqCqyPqSYwl+bhdmkKwKl0Ei/OS2wX8LHwMaJKBOjJHEEcUFOuKk9DM5QldeMjB08g0rk7+BIiNltiCTm+QyIkV9nw2pGyUkYIRWjU7Ceck/3miZ+Cuihw28NBhCJ9zHDsDJAhRqkwK6Zkty49Iw+yiisz8VgAIaCugBAXLI2nxZ0hQ8JTVb5mRDv5Tk8ynKeTYDaRkP4eJBeqCq6/bBdDh7yyqN986W2cYWacXuF/bJczYRdoRMfXJRTyQ2hfHxQfxToZZIGc6KodNJD/LEErSsjFJPxhp0aqldH+dp/UXP86+/Uhx7VBIkxNG6GOZhuZxrPZM65qkgdUqajkAhZXz/HFZF4H+wmYV4yPXwPNoEuQLWqpkVINmsJ2Ae43AnFZmSARhO3faex+n0I8XTuBjy8NPfcAICNXNY9rICO7x35uKPAJsAgFXyVGk5pXF0NrpEd4ppiZyyZrc4cBNSZ3ju1Qr8AQFyyNp8MFNfVIIjLjywDXmz1d+gRMwGh4SQHlNsI16IzS0iIm/z8nm22AbpjaVlaSN8tag4OR4CgqJsa7A83ECR5xv6NuNW8WHOquw/mmBY8L5/nGS92aBD5cXcUJuFUeI38VJR0Ff1aCt9CDDtnKqEnbdxMZYs7ruxXY7fB7LR5opw00N1bniJyZrpVQgjL5HomNkFRNn+Ch58v0YZ1g7Zt2/iy943u74WCjiTEHmOKYRDtDMXfQb+uyEqnr7S3nCKytXNMylDcOiZaS9VqAO5B/xa83cjWQpmtwquhdqQM4fgk0ebufqeLh4qUGy7xst9wV12eRkFqgL/MwrKAQFyyNp8SgJlP9UKqUr+vs3IrjxIRTWC6CODjw0vZzl4Yt93yuLMcqTsNNXondyEQbrwD9PHbfGEDWJNjMQfw9PD8Jwxz6jmen2vFn1LYt4q5amceev/lsmv0NOTXvxXbzK1K6xXYsewbsCFa4Lekj7aT9JAVZN8X94Be79u0feQhrnwl21XxYFs6/mo9QWuOSxiucTNF0+6Dt7cfx5EwvSLSbuw3qXbr9cPqkrOsqC5jY+7df0TT12fBnv4ZROpiikWMrqDZB8RlcoKiQEBcsjafDQ1RrE5G0Yz5O45MakHGoB7AbglTeu/2pVnrboJTRntER6bbWme3mqifCjVuyjxSkrQqBRR9854rezwMHB+yY9069hG0NaVkRFMUji6PO7wLaNARdoXhQF74aJP5UxCY/x7EAox7Z89o3XolPSlAZC04aCJwBjFbDC5ghze9cU4aA/KFQ=="}],"role":"model"},{"parts":[{"functionResponse":{"name":"call_5ba0cd1b-f278-47be-a6cd-a8aa0a7bd4e8","response":{"result":"FILE README.me\n"}}}],"role":"user"}],"generationConfig":{"thinkingConfig":{"includeThoughts":true,"thinkingBudget":-1}},"toolConfig":{"functionCallingConfig":{"mode":"AUTO"}},"tools":[{"functionDeclarations":[{"description":"Get a recursive tree view of files and directories as a JSON structure.","name":"directory_tree","parameters":{"properties":{"path":{"description":"The directory path to traverse (relative to working directory)","type":"string"}},"required":["path"],"type":"object"}},{"description":"Make line-based edits to a text file. Each edit replaces exact line sequences with new content.","name":"edit_file","parameters":{"properties":{"edits":{"description":"Array of edit operations","items":{"properties":{"newText":{"description":"The replacement text","type":"string"},"oldText":{"description":"The exact text to replace","type":"string"}},"required":["oldText","newText"],"type":"object"},"type":"array"},"path":{"description":"The file path to edit","type":"string"}},"required":["path","edits"],"type":"object"}},{"description":"Get a detailed listing of all files and directories in a specified path.","name":"list_directory","parameters":{"properties":{"path":{"description":"The directory path to list","type":"string"}},"required":["path"],"type":"object"}},{"description":"Read the complete contents of a file from the file system.","name":"read_file","parameters":{"properties":{"path":{"description":"The file path to read","type":"string"}},"required":["path"],"type":"object"}},{"description":"Read the contents of multiple files simultaneously.","name":"read_multiple_files","parameters":{"properties":{"json":{"description":"Whether to return the result as JSON","type":"boolean"},"paths":{"description":"Array of file paths to read","items":{"type":"string"},"type":"array"}},"required":["paths"],"type":"object"}},{"description":"Searches for text or regex patterns in the content of files matching a GLOB pattern.","name":"search_files_content","parameters":{"properties":{"excludePatterns":{"description":"Patterns to exclude from search","items":{"type":"string"},"type":"array"},"is_regex":{"description":"If true, treat query as regex; otherwise literal text","type":"boolean"},"path":{"description":"The starting directory path","type":"string"},"query":{"description":"The text or regex pattern to search for","type":"string"}},"required":["path","query"],"type":"object"}},{"description":"Create a new file or completely overwrite an existing file with new content.","name":"write_file","parameters":{"properties":{"content":{"description":"The content to write to the file","type":"string"},"path":{"description":"The file path to write","type":"string"}},"required":["path","content"],"type":"object"}}]}]} form: alt: - sse @@ -44,8 +44,8 @@ interactions: proto_major: 2 proto_minor: 0 content_length: -1 - body: "data: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \"1\",\"thoughtSignature\": \"Ci0BcsjafHrvUicT32tNasfpk3WE23q0OIon1W2RgejyaOFaN0JmOdbOfw3GygYKYgFyyNp8EuG+1tdoTp6Grnj0sWaFc0l5bVakV7Zcc9RNxBi9gp57TqKfA9nY7Pj2nFifQosZHRBIHHEmMhdqRhRkCj8JsjbGdPxH60i0BW0hTTN3pEjbKCnZwLc4uoAB1GQVCqcBAXLI2nyW6raQonFY+WncKGnQlDlOZPJK7zlyTZD+hmzrXSe8sal3HzaPzKS3xaxy91aJK5xrDhDUnif44AHbfZtuHPqacfeTqN8ldJK2Fm3sVQSRVmo32bJRUoQ66w9BMH94wyaP2JawKidOt+Gie31H1fpY44FqNlBVx/r/qlSmo5TsSCU+YU4jcaYuIfmfCWk1kQXO0dc4WARWQW7RUWvugaJd3zU=\"}],\"role\": \"model\"},\"finishReason\": \"STOP\",\"index\": 0}],\"usageMetadata\": {\"promptTokenCount\": 881,\"candidatesTokenCount\": 1,\"totalTokenCount\": 938,\"promptTokensDetails\": [{\"modality\": \"TEXT\",\"tokenCount\": 881}],\"thoughtsTokenCount\": 56},\"modelVersion\": \"gemini-2.5-flash\",\"responseId\": \"u1hqaY3oJpzwvdIPltqIsAo\"}\r\n\r\n" + body: "data: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \"**Enumerating the Files**\\n\\nI've tackled the directory listing; the `list_directory` command returned \\\"FILE README.me\\\\n\\\". From that, I've confirmed a single file, \\\"README.me\\\", resides in the specified location. Therefore, the file count is precisely one.\\n\\n\\n\",\"thought\": true}],\"role\": \"model\"},\"index\": 0}],\"usageMetadata\": {\"promptTokenCount\": 1058,\"totalTokenCount\": 1119,\"cachedContentTokenCount\": 726,\"promptTokensDetails\": [{\"modality\": \"TEXT\",\"tokenCount\": 1058}],\"cacheTokensDetails\": [{\"modality\": \"TEXT\",\"tokenCount\": 726}],\"thoughtsTokenCount\": 61},\"modelVersion\": \"gemini-2.5-flash\",\"responseId\": \"_qRqaYKFAbWIkdUP1ZyAqQE\"}\r\n\r\ndata: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \"1\",\"thoughtSignature\": \"CikBcsjafGvqeBJndOJleJfWxpHhHvslAgacwu37Yvk4bq1zjyByg+JgywpgAXLI2nyPv1L50nvCHIfx8FtcZl9fJqJ/f7sv2DTzHGniKcym1Z+4VbtlzC00uJlaUQp4p1Vm9vuIPRHPqC/aijz37alChyCXiFFehO/5HCuSZO74zDyzPn/8k08kjeU1CqsBAXLI2nzNhfnRVvQDPqA67bw0Wads8VFa2gnQv/QvlNTOPxJ04BC66ir1dfsafxO9w5gq0L8IwqwStrF39AGR0fJBTyNy/dN+QlPgEFyuQ0Z4BWztGWsvM4+mC3PUItG0ssNUDFga14793toJ0J4OYk5krhhNNoXjET5bfO9eIVnWjDmYILxbhDU2m9csZD9PP9Ar6RPREh9axHiczbwX5kPP/s4h0jrglCAr\"}],\"role\": \"model\"},\"finishReason\": \"STOP\",\"index\": 0}],\"usageMetadata\": {\"promptTokenCount\": 1058,\"totalTokenCount\": 1119,\"cachedContentTokenCount\": 726,\"promptTokensDetails\": [{\"modality\": \"TEXT\",\"tokenCount\": 1058}],\"cacheTokensDetails\": [{\"modality\": \"TEXT\",\"tokenCount\": 726}],\"thoughtsTokenCount\": 61},\"modelVersion\": \"gemini-2.5-flash\",\"responseId\": \"_qRqaYKFAbWIkdUP1ZyAqQE\"}\r\n\r\n" headers: {} status: 200 OK code: 200 - duration: 890.827833ms + duration: 1.211973167s diff --git a/e2e/testdata/cassettes/TestExec_OpenAI_gpt5.yaml b/e2e/testdata/cassettes/TestExec_OpenAI_gpt5.yaml index 20ae36744..ca59b5529 100644 --- a/e2e/testdata/cassettes/TestExec_OpenAI_gpt5.yaml +++ b/e2e/testdata/cassettes/TestExec_OpenAI_gpt5.yaml @@ -8,7 +8,7 @@ interactions: proto_minor: 1 content_length: 0 host: api.openai.com - body: '{"input":[{"content":[{"text":"You are a knowledgeable assistant that helps users with various tasks.\nBe helpful, accurate, and concise in your responses.\n","type":"input_text"}],"role":"system"},{"content":"What''s 2+2?","role":"user"}],"model":"gpt-5","reasoning":{"summary":"detailed"},"stream":true}' + body: '{"input":[{"content":[{"text":"You are a knowledgeable assistant that helps users with various tasks.\nBe helpful, accurate, and concise in your responses.\n","type":"input_text"}],"role":"system"},{"content":"What''s 2+2?","role":"user"}],"model":"gpt-5","reasoning":{"effort":"medium","summary":"detailed"},"stream":true}' url: https://api.openai.com/v1/responses method: POST response: @@ -18,39 +18,39 @@ interactions: content_length: -1 body: |+ event: response.created - data: {"type":"response.created","response":{"id":"resp_07aba19846ac576900696a92c851488194a8821d02da97c312","object":"response","created_at":1768592072,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5-2025-08-07","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":"detailed"},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":0} + data: {"type":"response.created","response":{"id":"resp_0dac9a2e9038678000696b7161c0bc8196872d52c97b1827ea","object":"response","created_at":1768649057,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5-2025-08-07","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":"detailed"},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":0} event: response.in_progress - data: {"type":"response.in_progress","response":{"id":"resp_07aba19846ac576900696a92c851488194a8821d02da97c312","object":"response","created_at":1768592072,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5-2025-08-07","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":"detailed"},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":1} + data: {"type":"response.in_progress","response":{"id":"resp_0dac9a2e9038678000696b7161c0bc8196872d52c97b1827ea","object":"response","created_at":1768649057,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5-2025-08-07","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":"detailed"},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":1} event: response.output_item.added - data: {"type":"response.output_item.added","item":{"id":"rs_07aba19846ac576900696a92c8a4d48194b48b90d02cc97109","type":"reasoning","summary":[]},"output_index":0,"sequence_number":2} + data: {"type":"response.output_item.added","item":{"id":"rs_0dac9a2e9038678000696b716217cc8196a5fb2973e7fa4884","type":"reasoning","summary":[]},"output_index":0,"sequence_number":2} event: response.output_item.done - data: {"type":"response.output_item.done","item":{"id":"rs_07aba19846ac576900696a92c8a4d48194b48b90d02cc97109","type":"reasoning","summary":[]},"output_index":0,"sequence_number":3} + data: {"type":"response.output_item.done","item":{"id":"rs_0dac9a2e9038678000696b716217cc8196a5fb2973e7fa4884","type":"reasoning","summary":[]},"output_index":0,"sequence_number":3} event: response.output_item.added - data: {"type":"response.output_item.added","item":{"id":"msg_07aba19846ac576900696a92c935688194a593cc8530c4d260","type":"message","status":"in_progress","content":[],"role":"assistant"},"output_index":1,"sequence_number":4} + data: {"type":"response.output_item.added","item":{"id":"msg_0dac9a2e9038678000696b716265dc8196ae44ee6f10e196bc","type":"message","status":"in_progress","content":[],"role":"assistant"},"output_index":1,"sequence_number":4} event: response.content_part.added - data: {"type":"response.content_part.added","content_index":0,"item_id":"msg_07aba19846ac576900696a92c935688194a593cc8530c4d260","output_index":1,"part":{"type":"output_text","annotations":[],"logprobs":[],"text":""},"sequence_number":5} + data: {"type":"response.content_part.added","content_index":0,"item_id":"msg_0dac9a2e9038678000696b716265dc8196ae44ee6f10e196bc","output_index":1,"part":{"type":"output_text","annotations":[],"logprobs":[],"text":""},"sequence_number":5} event: response.output_text.delta - data: {"type":"response.output_text.delta","content_index":0,"delta":"4","item_id":"msg_07aba19846ac576900696a92c935688194a593cc8530c4d260","logprobs":[],"obfuscation":"gfTxllebeyuuaOt","output_index":1,"sequence_number":6} + data: {"type":"response.output_text.delta","content_index":0,"delta":"4","item_id":"msg_0dac9a2e9038678000696b716265dc8196ae44ee6f10e196bc","logprobs":[],"obfuscation":"2zPtWNriOHudX9T","output_index":1,"sequence_number":6} event: response.output_text.done - data: {"type":"response.output_text.done","content_index":0,"item_id":"msg_07aba19846ac576900696a92c935688194a593cc8530c4d260","logprobs":[],"output_index":1,"sequence_number":7,"text":"4"} + data: {"type":"response.output_text.done","content_index":0,"item_id":"msg_0dac9a2e9038678000696b716265dc8196ae44ee6f10e196bc","logprobs":[],"output_index":1,"sequence_number":7,"text":"4"} event: response.content_part.done - data: {"type":"response.content_part.done","content_index":0,"item_id":"msg_07aba19846ac576900696a92c935688194a593cc8530c4d260","output_index":1,"part":{"type":"output_text","annotations":[],"logprobs":[],"text":"4"},"sequence_number":8} + data: {"type":"response.content_part.done","content_index":0,"item_id":"msg_0dac9a2e9038678000696b716265dc8196ae44ee6f10e196bc","output_index":1,"part":{"type":"output_text","annotations":[],"logprobs":[],"text":"4"},"sequence_number":8} event: response.output_item.done - data: {"type":"response.output_item.done","item":{"id":"msg_07aba19846ac576900696a92c935688194a593cc8530c4d260","type":"message","status":"completed","content":[{"type":"output_text","annotations":[],"logprobs":[],"text":"4"}],"role":"assistant"},"output_index":1,"sequence_number":9} + data: {"type":"response.output_item.done","item":{"id":"msg_0dac9a2e9038678000696b716265dc8196ae44ee6f10e196bc","type":"message","status":"completed","content":[{"type":"output_text","annotations":[],"logprobs":[],"text":"4"}],"role":"assistant"},"output_index":1,"sequence_number":9} event: response.completed - data: {"type":"response.completed","response":{"id":"resp_07aba19846ac576900696a92c851488194a8821d02da97c312","object":"response","created_at":1768592072,"status":"completed","background":false,"completed_at":1768592073,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5-2025-08-07","output":[{"id":"rs_07aba19846ac576900696a92c8a4d48194b48b90d02cc97109","type":"reasoning","summary":[]},{"id":"msg_07aba19846ac576900696a92c935688194a593cc8530c4d260","type":"message","status":"completed","content":[{"type":"output_text","annotations":[],"logprobs":[],"text":"4"}],"role":"assistant"}],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":"detailed"},"safety_identifier":null,"service_tier":"default","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":{"input_tokens":39,"input_tokens_details":{"cached_tokens":0},"output_tokens":7,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":46},"user":null,"metadata":{}},"sequence_number":10} + data: {"type":"response.completed","response":{"id":"resp_0dac9a2e9038678000696b7161c0bc8196872d52c97b1827ea","object":"response","created_at":1768649057,"status":"completed","background":false,"completed_at":1768649058,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5-2025-08-07","output":[{"id":"rs_0dac9a2e9038678000696b716217cc8196a5fb2973e7fa4884","type":"reasoning","summary":[]},{"id":"msg_0dac9a2e9038678000696b716265dc8196ae44ee6f10e196bc","type":"message","status":"completed","content":[{"type":"output_text","annotations":[],"logprobs":[],"text":"4"}],"role":"assistant"}],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":"detailed"},"safety_identifier":null,"service_tier":"default","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":{"input_tokens":39,"input_tokens_details":{"cached_tokens":0},"output_tokens":7,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":46},"user":null,"metadata":{}},"sequence_number":10} headers: {} status: 200 OK code: 200 - duration: 551.395583ms + duration: 625.407222ms diff --git a/e2e/testdata/cassettes/TestExec_OpenAI_gpt5_1.yaml b/e2e/testdata/cassettes/TestExec_OpenAI_gpt5_1.yaml index a02c1b1e6..a8d7134f1 100644 --- a/e2e/testdata/cassettes/TestExec_OpenAI_gpt5_1.yaml +++ b/e2e/testdata/cassettes/TestExec_OpenAI_gpt5_1.yaml @@ -8,7 +8,7 @@ interactions: proto_minor: 1 content_length: 0 host: api.openai.com - body: '{"input":[{"content":[{"text":"You are a knowledgeable assistant that helps users with various tasks.\nBe helpful, accurate, and concise in your responses.\n","type":"input_text"}],"role":"system"},{"content":"What''s 2+2?","role":"user"}],"model":"gpt-5.1","reasoning":{"summary":"detailed"},"stream":true}' + body: '{"input":[{"content":[{"text":"You are a knowledgeable assistant that helps users with various tasks.\nBe helpful, accurate, and concise in your responses.\n","type":"input_text"}],"role":"system"},{"content":"What''s 2+2?","role":"user"}],"model":"gpt-5.1","reasoning":{"effort":"medium","summary":"detailed"},"stream":true}' url: https://api.openai.com/v1/responses method: POST response: @@ -18,54 +18,60 @@ interactions: content_length: -1 body: |+ event: response.created - data: {"type":"response.created","response":{"id":"resp_0bc7a799f8db51bf00696a92c9a8f48194920c96587f7bb0d2","object":"response","created_at":1768592073,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5.1-2025-11-13","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"none","summary":"detailed"},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":0} + data: {"type":"response.created","response":{"id":"resp_05d23ad3b9deb77d00696b716321748190ad52b28107e147b5","object":"response","created_at":1768649059,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5.1-2025-11-13","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":"detailed"},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":0} event: response.in_progress - data: {"type":"response.in_progress","response":{"id":"resp_0bc7a799f8db51bf00696a92c9a8f48194920c96587f7bb0d2","object":"response","created_at":1768592073,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5.1-2025-11-13","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"none","summary":"detailed"},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":1} + data: {"type":"response.in_progress","response":{"id":"resp_05d23ad3b9deb77d00696b716321748190ad52b28107e147b5","object":"response","created_at":1768649059,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5.1-2025-11-13","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":"detailed"},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":1} event: response.output_item.added - data: {"type":"response.output_item.added","item":{"id":"msg_0bc7a799f8db51bf00696a92ca30348194a64c9b7826185041","type":"message","status":"in_progress","content":[],"role":"assistant"},"output_index":0,"sequence_number":2} + data: {"type":"response.output_item.added","item":{"id":"rs_05d23ad3b9deb77d00696b7163bce88190bfb1ee9cad9e351b","type":"reasoning","summary":[]},"output_index":0,"sequence_number":2} + + event: response.output_item.done + data: {"type":"response.output_item.done","item":{"id":"rs_05d23ad3b9deb77d00696b7163bce88190bfb1ee9cad9e351b","type":"reasoning","summary":[]},"output_index":0,"sequence_number":3} + + event: response.output_item.added + data: {"type":"response.output_item.added","item":{"id":"msg_05d23ad3b9deb77d00696b71641fc88190aa50342576d85830","type":"message","status":"in_progress","content":[],"role":"assistant"},"output_index":1,"sequence_number":4} event: response.content_part.added - data: {"type":"response.content_part.added","content_index":0,"item_id":"msg_0bc7a799f8db51bf00696a92ca30348194a64c9b7826185041","output_index":0,"part":{"type":"output_text","annotations":[],"logprobs":[],"text":""},"sequence_number":3} + data: {"type":"response.content_part.added","content_index":0,"item_id":"msg_05d23ad3b9deb77d00696b71641fc88190aa50342576d85830","output_index":1,"part":{"type":"output_text","annotations":[],"logprobs":[],"text":""},"sequence_number":5} event: response.output_text.delta - data: {"type":"response.output_text.delta","content_index":0,"delta":"2","item_id":"msg_0bc7a799f8db51bf00696a92ca30348194a64c9b7826185041","logprobs":[],"obfuscation":"Z9ebxU0lwmSHepI","output_index":0,"sequence_number":4} + data: {"type":"response.output_text.delta","content_index":0,"delta":"2","item_id":"msg_05d23ad3b9deb77d00696b71641fc88190aa50342576d85830","logprobs":[],"obfuscation":"EbVXbsrmDXZy4iJ","output_index":1,"sequence_number":6} event: response.output_text.delta - data: {"type":"response.output_text.delta","content_index":0,"delta":" +","item_id":"msg_0bc7a799f8db51bf00696a92ca30348194a64c9b7826185041","logprobs":[],"obfuscation":"ygytWLZDtW6Xbz","output_index":0,"sequence_number":5} + data: {"type":"response.output_text.delta","content_index":0,"delta":" +","item_id":"msg_05d23ad3b9deb77d00696b71641fc88190aa50342576d85830","logprobs":[],"obfuscation":"zZ0yvygbURAOwO","output_index":1,"sequence_number":7} event: response.output_text.delta - data: {"type":"response.output_text.delta","content_index":0,"delta":" ","item_id":"msg_0bc7a799f8db51bf00696a92ca30348194a64c9b7826185041","logprobs":[],"obfuscation":"7vt6vdvmLLLAhnX","output_index":0,"sequence_number":6} + data: {"type":"response.output_text.delta","content_index":0,"delta":" ","item_id":"msg_05d23ad3b9deb77d00696b71641fc88190aa50342576d85830","logprobs":[],"obfuscation":"GxZ1gqwrWtQJUVe","output_index":1,"sequence_number":8} event: response.output_text.delta - data: {"type":"response.output_text.delta","content_index":0,"delta":"2","item_id":"msg_0bc7a799f8db51bf00696a92ca30348194a64c9b7826185041","logprobs":[],"obfuscation":"8IYvgPHc6WbufKJ","output_index":0,"sequence_number":7} + data: {"type":"response.output_text.delta","content_index":0,"delta":"2","item_id":"msg_05d23ad3b9deb77d00696b71641fc88190aa50342576d85830","logprobs":[],"obfuscation":"A1EdlDrZjit9iBm","output_index":1,"sequence_number":9} event: response.output_text.delta - data: {"type":"response.output_text.delta","content_index":0,"delta":" =","item_id":"msg_0bc7a799f8db51bf00696a92ca30348194a64c9b7826185041","logprobs":[],"obfuscation":"GFNGJtcL9P88YS","output_index":0,"sequence_number":8} + data: {"type":"response.output_text.delta","content_index":0,"delta":" =","item_id":"msg_05d23ad3b9deb77d00696b71641fc88190aa50342576d85830","logprobs":[],"obfuscation":"vaXWnF0607amPg","output_index":1,"sequence_number":10} event: response.output_text.delta - data: {"type":"response.output_text.delta","content_index":0,"delta":" ","item_id":"msg_0bc7a799f8db51bf00696a92ca30348194a64c9b7826185041","logprobs":[],"obfuscation":"Ampa98Lyo1pmZWp","output_index":0,"sequence_number":9} + data: {"type":"response.output_text.delta","content_index":0,"delta":" ","item_id":"msg_05d23ad3b9deb77d00696b71641fc88190aa50342576d85830","logprobs":[],"obfuscation":"sdQA4YzTq29aZ3o","output_index":1,"sequence_number":11} event: response.output_text.delta - data: {"type":"response.output_text.delta","content_index":0,"delta":"4","item_id":"msg_0bc7a799f8db51bf00696a92ca30348194a64c9b7826185041","logprobs":[],"obfuscation":"K18JjUKSoabHIr6","output_index":0,"sequence_number":10} + data: {"type":"response.output_text.delta","content_index":0,"delta":"4","item_id":"msg_05d23ad3b9deb77d00696b71641fc88190aa50342576d85830","logprobs":[],"obfuscation":"msvPP5ig310IFJ1","output_index":1,"sequence_number":12} event: response.output_text.delta - data: {"type":"response.output_text.delta","content_index":0,"delta":".","item_id":"msg_0bc7a799f8db51bf00696a92ca30348194a64c9b7826185041","logprobs":[],"obfuscation":"goYW7wl2j8AbfNQ","output_index":0,"sequence_number":11} + data: {"type":"response.output_text.delta","content_index":0,"delta":".","item_id":"msg_05d23ad3b9deb77d00696b71641fc88190aa50342576d85830","logprobs":[],"obfuscation":"cYiXB2sHjOUMO4L","output_index":1,"sequence_number":13} event: response.output_text.done - data: {"type":"response.output_text.done","content_index":0,"item_id":"msg_0bc7a799f8db51bf00696a92ca30348194a64c9b7826185041","logprobs":[],"output_index":0,"sequence_number":12,"text":"2 + 2 = 4."} + data: {"type":"response.output_text.done","content_index":0,"item_id":"msg_05d23ad3b9deb77d00696b71641fc88190aa50342576d85830","logprobs":[],"output_index":1,"sequence_number":14,"text":"2 + 2 = 4."} event: response.content_part.done - data: {"type":"response.content_part.done","content_index":0,"item_id":"msg_0bc7a799f8db51bf00696a92ca30348194a64c9b7826185041","output_index":0,"part":{"type":"output_text","annotations":[],"logprobs":[],"text":"2 + 2 = 4."},"sequence_number":13} + data: {"type":"response.content_part.done","content_index":0,"item_id":"msg_05d23ad3b9deb77d00696b71641fc88190aa50342576d85830","output_index":1,"part":{"type":"output_text","annotations":[],"logprobs":[],"text":"2 + 2 = 4."},"sequence_number":15} event: response.output_item.done - data: {"type":"response.output_item.done","item":{"id":"msg_0bc7a799f8db51bf00696a92ca30348194a64c9b7826185041","type":"message","status":"completed","content":[{"type":"output_text","annotations":[],"logprobs":[],"text":"2 + 2 = 4."}],"role":"assistant"},"output_index":0,"sequence_number":14} + data: {"type":"response.output_item.done","item":{"id":"msg_05d23ad3b9deb77d00696b71641fc88190aa50342576d85830","type":"message","status":"completed","content":[{"type":"output_text","annotations":[],"logprobs":[],"text":"2 + 2 = 4."}],"role":"assistant"},"output_index":1,"sequence_number":16} event: response.completed - data: {"type":"response.completed","response":{"id":"resp_0bc7a799f8db51bf00696a92c9a8f48194920c96587f7bb0d2","object":"response","created_at":1768592073,"status":"completed","background":false,"completed_at":1768592074,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5.1-2025-11-13","output":[{"id":"msg_0bc7a799f8db51bf00696a92ca30348194a64c9b7826185041","type":"message","status":"completed","content":[{"type":"output_text","annotations":[],"logprobs":[],"text":"2 + 2 = 4."}],"role":"assistant"}],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"none","summary":"detailed"},"safety_identifier":null,"service_tier":"default","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":{"input_tokens":39,"input_tokens_details":{"cached_tokens":0},"output_tokens":18,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":57},"user":null,"metadata":{}},"sequence_number":15} + data: {"type":"response.completed","response":{"id":"resp_05d23ad3b9deb77d00696b716321748190ad52b28107e147b5","object":"response","created_at":1768649059,"status":"completed","background":false,"completed_at":1768649060,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5.1-2025-11-13","output":[{"id":"rs_05d23ad3b9deb77d00696b7163bce88190bfb1ee9cad9e351b","type":"reasoning","summary":[]},{"id":"msg_05d23ad3b9deb77d00696b71641fc88190aa50342576d85830","type":"message","status":"completed","content":[{"type":"output_text","annotations":[],"logprobs":[],"text":"2 + 2 = 4."}],"role":"assistant"}],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":"detailed"},"safety_identifier":null,"service_tier":"default","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":{"input_tokens":39,"input_tokens_details":{"cached_tokens":0},"output_tokens":20,"output_tokens_details":{"reasoning_tokens":6},"total_tokens":59},"user":null,"metadata":{}},"sequence_number":17} headers: {} status: 200 OK code: 200 - duration: 354.609167ms + duration: 632.660299ms diff --git a/e2e/testdata/cassettes/TestExec_OpenAI_gpt5_codex.yaml b/e2e/testdata/cassettes/TestExec_OpenAI_gpt5_codex.yaml index a71cf1112..88bfe9687 100644 --- a/e2e/testdata/cassettes/TestExec_OpenAI_gpt5_codex.yaml +++ b/e2e/testdata/cassettes/TestExec_OpenAI_gpt5_codex.yaml @@ -8,7 +8,7 @@ interactions: proto_minor: 1 content_length: 0 host: api.openai.com - body: '{"input":[{"content":[{"text":"You are a knowledgeable assistant that helps users with various tasks.\nBe helpful, accurate, and concise in your responses.\n","type":"input_text"}],"role":"system"},{"content":"What''s 2+2?","role":"user"}],"model":"gpt-5-codex","reasoning":{"summary":"detailed"},"stream":true}' + body: '{"input":[{"content":[{"text":"You are a knowledgeable assistant that helps users with various tasks.\nBe helpful, accurate, and concise in your responses.\n","type":"input_text"}],"role":"system"},{"content":"What''s 2+2?","role":"user"}],"model":"gpt-5-codex","reasoning":{"effort":"medium","summary":"detailed"},"stream":true}' url: https://api.openai.com/v1/responses method: POST response: @@ -18,87 +18,81 @@ interactions: content_length: -1 body: |+ event: response.created - data: {"type":"response.created","response":{"id":"resp_0e11597de1bcc81c00696a92cace288195b33fc64d72725f4f","object":"response","created_at":1768592074,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5-codex","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":"detailed"},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":0} + data: {"type":"response.created","response":{"id":"resp_0caa416caf80be0200696b71ba8aa081978f004985e12d88db","object":"response","created_at":1768649146,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5-codex","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":"detailed"},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":0} event: response.in_progress - data: {"type":"response.in_progress","response":{"id":"resp_0e11597de1bcc81c00696a92cace288195b33fc64d72725f4f","object":"response","created_at":1768592074,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5-codex","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":"detailed"},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":1} + data: {"type":"response.in_progress","response":{"id":"resp_0caa416caf80be0200696b71ba8aa081978f004985e12d88db","object":"response","created_at":1768649146,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5-codex","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":"detailed"},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":1} event: response.output_item.added - data: {"type":"response.output_item.added","item":{"id":"rs_0e11597de1bcc81c00696a92cb1a3c8195bb92ac5f5e8a463c","type":"reasoning","summary":[]},"output_index":0,"sequence_number":2} + data: {"type":"response.output_item.added","item":{"id":"rs_0caa416caf80be0200696b71bace0481978bff525411522398","type":"reasoning","summary":[]},"output_index":0,"sequence_number":2} event: response.reasoning_summary_part.added - data: {"type":"response.reasoning_summary_part.added","item_id":"rs_0e11597de1bcc81c00696a92cb1a3c8195bb92ac5f5e8a463c","output_index":0,"part":{"type":"summary_text","text":""},"sequence_number":3,"summary_index":0} + data: {"type":"response.reasoning_summary_part.added","item_id":"rs_0caa416caf80be0200696b71bace0481978bff525411522398","output_index":0,"part":{"type":"summary_text","text":""},"sequence_number":3,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":"**Preparing","item_id":"rs_0e11597de1bcc81c00696a92cb1a3c8195bb92ac5f5e8a463c","obfuscation":"txhLa","output_index":0,"sequence_number":4,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":"**Not","item_id":"rs_0caa416caf80be0200696b71bace0481978bff525411522398","obfuscation":"DdB1gpNDCMv","output_index":0,"sequence_number":4,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" to","item_id":"rs_0e11597de1bcc81c00696a92cb1a3c8195bb92ac5f5e8a463c","obfuscation":"749gweugNHWHg","output_index":0,"sequence_number":5,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":"icing","item_id":"rs_0caa416caf80be0200696b71bace0481978bff525411522398","obfuscation":"zH4wBEF4DHH","output_index":0,"sequence_number":5,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" answer","item_id":"rs_0e11597de1bcc81c00696a92cb1a3c8195bb92ac5f5e8a463c","obfuscation":"k48sBebeh","output_index":0,"sequence_number":6,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":" simplicity","item_id":"rs_0caa416caf80be0200696b71bace0481978bff525411522398","obfuscation":"81c43","output_index":0,"sequence_number":6,"summary_index":0} event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" question","item_id":"rs_0e11597de1bcc81c00696a92cb1a3c8195bb92ac5f5e8a463c","obfuscation":"cdJ2bmO","output_index":0,"sequence_number":7,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" 4","item_id":"rs_0e11597de1bcc81c00696a92cb1a3c8195bb92ac5f5e8a463c","obfuscation":"kzj9AOk6Fa0jKR","output_index":0,"sequence_number":8,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":"**","item_id":"rs_0e11597de1bcc81c00696a92cb1a3c8195bb92ac5f5e8a463c","obfuscation":"3BgCBEdpCSTpS6","output_index":0,"sequence_number":9,"summary_index":0} + data: {"type":"response.reasoning_summary_text.delta","delta":"**","item_id":"rs_0caa416caf80be0200696b71bace0481978bff525411522398","obfuscation":"A7u4gb9Pt9NIM4","output_index":0,"sequence_number":7,"summary_index":0} event: response.reasoning_summary_text.done - data: {"type":"response.reasoning_summary_text.done","item_id":"rs_0e11597de1bcc81c00696a92cb1a3c8195bb92ac5f5e8a463c","output_index":0,"sequence_number":10,"summary_index":0,"text":"**Preparing to answer question 4**"} + data: {"type":"response.reasoning_summary_text.done","item_id":"rs_0caa416caf80be0200696b71bace0481978bff525411522398","output_index":0,"sequence_number":8,"summary_index":0,"text":"**Noticing simplicity**"} event: response.reasoning_summary_part.done - data: {"type":"response.reasoning_summary_part.done","item_id":"rs_0e11597de1bcc81c00696a92cb1a3c8195bb92ac5f5e8a463c","output_index":0,"part":{"type":"summary_text","text":"**Preparing to answer question 4**"},"sequence_number":11,"summary_index":0} + data: {"type":"response.reasoning_summary_part.done","item_id":"rs_0caa416caf80be0200696b71bace0481978bff525411522398","output_index":0,"part":{"type":"summary_text","text":"**Noticing simplicity**"},"sequence_number":9,"summary_index":0} event: response.output_item.done - data: {"type":"response.output_item.done","item":{"id":"rs_0e11597de1bcc81c00696a92cb1a3c8195bb92ac5f5e8a463c","type":"reasoning","summary":[{"type":"summary_text","text":"**Preparing to answer question 4**"}]},"output_index":0,"sequence_number":12} + data: {"type":"response.output_item.done","item":{"id":"rs_0caa416caf80be0200696b71bace0481978bff525411522398","type":"reasoning","summary":[{"type":"summary_text","text":"**Noticing simplicity**"}]},"output_index":0,"sequence_number":10} event: response.output_item.added - data: {"type":"response.output_item.added","item":{"id":"msg_0e11597de1bcc81c00696a92cb82c88195b0bbe9ce7940ea96","type":"message","status":"in_progress","content":[],"role":"assistant"},"output_index":1,"sequence_number":13} + data: {"type":"response.output_item.added","item":{"id":"msg_0caa416caf80be0200696b71bb1cc48197af3eb482cc40fd08","type":"message","status":"in_progress","content":[],"role":"assistant"},"output_index":1,"sequence_number":11} event: response.content_part.added - data: {"type":"response.content_part.added","content_index":0,"item_id":"msg_0e11597de1bcc81c00696a92cb82c88195b0bbe9ce7940ea96","output_index":1,"part":{"type":"output_text","annotations":[],"logprobs":[],"text":""},"sequence_number":14} + data: {"type":"response.content_part.added","content_index":0,"item_id":"msg_0caa416caf80be0200696b71bb1cc48197af3eb482cc40fd08","output_index":1,"part":{"type":"output_text","annotations":[],"logprobs":[],"text":""},"sequence_number":12} event: response.output_text.delta - data: {"type":"response.output_text.delta","content_index":0,"delta":"2","item_id":"msg_0e11597de1bcc81c00696a92cb82c88195b0bbe9ce7940ea96","logprobs":[],"obfuscation":"rnDpa7QMylTo2lQ","output_index":1,"sequence_number":15} + data: {"type":"response.output_text.delta","content_index":0,"delta":"2","item_id":"msg_0caa416caf80be0200696b71bb1cc48197af3eb482cc40fd08","logprobs":[],"obfuscation":"zlTkBsI0ihiHaMq","output_index":1,"sequence_number":13} event: response.output_text.delta - data: {"type":"response.output_text.delta","content_index":0,"delta":" +","item_id":"msg_0e11597de1bcc81c00696a92cb82c88195b0bbe9ce7940ea96","logprobs":[],"obfuscation":"ZAAQBySPABOLbl","output_index":1,"sequence_number":16} + data: {"type":"response.output_text.delta","content_index":0,"delta":" +","item_id":"msg_0caa416caf80be0200696b71bb1cc48197af3eb482cc40fd08","logprobs":[],"obfuscation":"9VlJCvGL1JLFjj","output_index":1,"sequence_number":14} event: response.output_text.delta - data: {"type":"response.output_text.delta","content_index":0,"delta":" ","item_id":"msg_0e11597de1bcc81c00696a92cb82c88195b0bbe9ce7940ea96","logprobs":[],"obfuscation":"IacVgzXwIUlgHVW","output_index":1,"sequence_number":17} + data: {"type":"response.output_text.delta","content_index":0,"delta":" ","item_id":"msg_0caa416caf80be0200696b71bb1cc48197af3eb482cc40fd08","logprobs":[],"obfuscation":"ZJ8kFb3BonkeKLC","output_index":1,"sequence_number":15} event: response.output_text.delta - data: {"type":"response.output_text.delta","content_index":0,"delta":"2","item_id":"msg_0e11597de1bcc81c00696a92cb82c88195b0bbe9ce7940ea96","logprobs":[],"obfuscation":"HN5cK9z8MNb1EKP","output_index":1,"sequence_number":18} + data: {"type":"response.output_text.delta","content_index":0,"delta":"2","item_id":"msg_0caa416caf80be0200696b71bb1cc48197af3eb482cc40fd08","logprobs":[],"obfuscation":"ofHNgxChzvc44fu","output_index":1,"sequence_number":16} event: response.output_text.delta - data: {"type":"response.output_text.delta","content_index":0,"delta":" =","item_id":"msg_0e11597de1bcc81c00696a92cb82c88195b0bbe9ce7940ea96","logprobs":[],"obfuscation":"fcTxE9b5udVjUu","output_index":1,"sequence_number":19} + data: {"type":"response.output_text.delta","content_index":0,"delta":" =","item_id":"msg_0caa416caf80be0200696b71bb1cc48197af3eb482cc40fd08","logprobs":[],"obfuscation":"Y7mob1vmwwJSxQ","output_index":1,"sequence_number":17} event: response.output_text.delta - data: {"type":"response.output_text.delta","content_index":0,"delta":" ","item_id":"msg_0e11597de1bcc81c00696a92cb82c88195b0bbe9ce7940ea96","logprobs":[],"obfuscation":"p8dUnsxwJjH8z0R","output_index":1,"sequence_number":20} + data: {"type":"response.output_text.delta","content_index":0,"delta":" ","item_id":"msg_0caa416caf80be0200696b71bb1cc48197af3eb482cc40fd08","logprobs":[],"obfuscation":"O0cBvOZM9Uarl40","output_index":1,"sequence_number":18} event: response.output_text.delta - data: {"type":"response.output_text.delta","content_index":0,"delta":"4","item_id":"msg_0e11597de1bcc81c00696a92cb82c88195b0bbe9ce7940ea96","logprobs":[],"obfuscation":"QVUQ1Lg5AcXgSGA","output_index":1,"sequence_number":21} + data: {"type":"response.output_text.delta","content_index":0,"delta":"4","item_id":"msg_0caa416caf80be0200696b71bb1cc48197af3eb482cc40fd08","logprobs":[],"obfuscation":"eDMsbP2SXJRd8R0","output_index":1,"sequence_number":19} event: response.output_text.delta - data: {"type":"response.output_text.delta","content_index":0,"delta":".","item_id":"msg_0e11597de1bcc81c00696a92cb82c88195b0bbe9ce7940ea96","logprobs":[],"obfuscation":"8cq49fCiBrl6yIM","output_index":1,"sequence_number":22} + data: {"type":"response.output_text.delta","content_index":0,"delta":".","item_id":"msg_0caa416caf80be0200696b71bb1cc48197af3eb482cc40fd08","logprobs":[],"obfuscation":"bxrMSQpt7uWUOZP","output_index":1,"sequence_number":20} event: response.output_text.done - data: {"type":"response.output_text.done","content_index":0,"item_id":"msg_0e11597de1bcc81c00696a92cb82c88195b0bbe9ce7940ea96","logprobs":[],"output_index":1,"sequence_number":23,"text":"2 + 2 = 4."} + data: {"type":"response.output_text.done","content_index":0,"item_id":"msg_0caa416caf80be0200696b71bb1cc48197af3eb482cc40fd08","logprobs":[],"output_index":1,"sequence_number":21,"text":"2 + 2 = 4."} event: response.content_part.done - data: {"type":"response.content_part.done","content_index":0,"item_id":"msg_0e11597de1bcc81c00696a92cb82c88195b0bbe9ce7940ea96","output_index":1,"part":{"type":"output_text","annotations":[],"logprobs":[],"text":"2 + 2 = 4."},"sequence_number":24} + data: {"type":"response.content_part.done","content_index":0,"item_id":"msg_0caa416caf80be0200696b71bb1cc48197af3eb482cc40fd08","output_index":1,"part":{"type":"output_text","annotations":[],"logprobs":[],"text":"2 + 2 = 4."},"sequence_number":22} event: response.output_item.done - data: {"type":"response.output_item.done","item":{"id":"msg_0e11597de1bcc81c00696a92cb82c88195b0bbe9ce7940ea96","type":"message","status":"completed","content":[{"type":"output_text","annotations":[],"logprobs":[],"text":"2 + 2 = 4."}],"role":"assistant"},"output_index":1,"sequence_number":25} + data: {"type":"response.output_item.done","item":{"id":"msg_0caa416caf80be0200696b71bb1cc48197af3eb482cc40fd08","type":"message","status":"completed","content":[{"type":"output_text","annotations":[],"logprobs":[],"text":"2 + 2 = 4."}],"role":"assistant"},"output_index":1,"sequence_number":23} event: response.completed - data: {"type":"response.completed","response":{"id":"resp_0e11597de1bcc81c00696a92cace288195b33fc64d72725f4f","object":"response","created_at":1768592074,"status":"completed","background":false,"completed_at":1768592075,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5-codex","output":[{"id":"rs_0e11597de1bcc81c00696a92cb1a3c8195bb92ac5f5e8a463c","type":"reasoning","summary":[{"type":"summary_text","text":"**Preparing to answer question 4**"}]},{"id":"msg_0e11597de1bcc81c00696a92cb82c88195b0bbe9ce7940ea96","type":"message","status":"completed","content":[{"type":"output_text","annotations":[],"logprobs":[],"text":"2 + 2 = 4."}],"role":"assistant"}],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":"detailed"},"safety_identifier":null,"service_tier":"default","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":{"input_tokens":39,"input_tokens_details":{"cached_tokens":0},"output_tokens":14,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":53},"user":null,"metadata":{}},"sequence_number":26} + data: {"type":"response.completed","response":{"id":"resp_0caa416caf80be0200696b71ba8aa081978f004985e12d88db","object":"response","created_at":1768649146,"status":"completed","background":false,"completed_at":1768649147,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5-codex","output":[{"id":"rs_0caa416caf80be0200696b71bace0481978bff525411522398","type":"reasoning","summary":[{"type":"summary_text","text":"**Noticing simplicity**"}]},{"id":"msg_0caa416caf80be0200696b71bb1cc48197af3eb482cc40fd08","type":"message","status":"completed","content":[{"type":"output_text","annotations":[],"logprobs":[],"text":"2 + 2 = 4."}],"role":"assistant"}],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":"detailed"},"safety_identifier":null,"service_tier":"default","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":{"input_tokens":39,"input_tokens_details":{"cached_tokens":0},"output_tokens":14,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":53},"user":null,"metadata":{}},"sequence_number":24} headers: {} status: 200 OK code: 200 - duration: 361.007458ms + duration: 625.340188ms diff --git a/e2e/testdata/cassettes/TestExec_ToolCallsNeedAcceptance.yaml b/e2e/testdata/cassettes/TestExec_ToolCallsNeedAcceptance.yaml index 14be5f707..a44d1eb44 100644 --- a/e2e/testdata/cassettes/TestExec_ToolCallsNeedAcceptance.yaml +++ b/e2e/testdata/cassettes/TestExec_ToolCallsNeedAcceptance.yaml @@ -8,7 +8,7 @@ interactions: proto_minor: 1 content_length: 0 host: api.openai.com - body: '{"input":[{"content":[{"text":"You are a knowledgeable assistant that can write test files.","type":"input_text"}],"role":"system"},{"content":[{"text":"## Filesystem Tool Instructions\n\nThis toolset provides comprehensive filesystem operations.\n\n### Working Directory\n- Relative paths (like \".\" or \"src/main.go\") are resolved relative to the working directory\n- Absolute paths (like \"/etc/hosts\") access files directly\n- Paths starting with \"..\" can access parent directories\n\n### Common Patterns\n- Always check if directories exist before creating files\n- Prefer read_multiple_files for batch operations\n- Use search_files_content for finding specific code or text\n\n### Performance Tips\n- Use read_multiple_files instead of multiple read_file calls\n- Use directory_tree with max_depth to limit large traversals\n- Use appropriate exclude patterns in search operations","type":"input_text"}],"role":"system"},{"content":"Create a hello.txt file with \"Hello, World!\" content. Try only once. On error, exit without further message.","role":"user"}],"model":"gpt-5-mini","reasoning":{"summary":"detailed"},"tools":[{"strict":true,"parameters":{"additionalProperties":false,"properties":{"content":{"description":"The content to write to the file","type":"string"},"path":{"description":"The file path to write","type":"string"}},"required":["content","path"],"type":"object"},"name":"write_file","description":"Create a new file or completely overwrite an existing file with new content.","type":"function"}],"stream":true}' + body: '{"input":[{"content":[{"text":"You are a knowledgeable assistant that can write test files.","type":"input_text"}],"role":"system"},{"content":[{"text":"## Filesystem Tool Instructions\n\nThis toolset provides comprehensive filesystem operations.\n\n### Working Directory\n- Relative paths (like \".\" or \"src/main.go\") are resolved relative to the working directory\n- Absolute paths (like \"/etc/hosts\") access files directly\n- Paths starting with \"..\" can access parent directories\n\n### Common Patterns\n- Always check if directories exist before creating files\n- Prefer read_multiple_files for batch operations\n- Use search_files_content for finding specific code or text\n\n### Performance Tips\n- Use read_multiple_files instead of multiple read_file calls\n- Use directory_tree with max_depth to limit large traversals\n- Use appropriate exclude patterns in search operations","type":"input_text"}],"role":"system"},{"content":"Create a hello.txt file with \"Hello, World!\" content. Try only once. On error, exit without further message.","role":"user"}],"model":"gpt-5-mini","reasoning":{"effort":"medium","summary":"detailed"},"tools":[{"strict":true,"parameters":{"additionalProperties":false,"properties":{"content":{"description":"The content to write to the file","type":"string"},"path":{"description":"The file path to write","type":"string"}},"required":["content","path"],"type":"object"},"name":"write_file","description":"Create a new file or completely overwrite an existing file with new content.","type":"function"}],"stream":true}' url: https://api.openai.com/v1/responses method: POST response: @@ -18,312 +18,72 @@ interactions: content_length: -1 body: |+ event: response.created - data: {"type":"response.created","response":{"id":"resp_05119accbb90821300696a92cc9ed481948499a67d6cd38005","object":"response","created_at":1768592076,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5-mini-2025-08-07","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":"detailed"},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[{"type":"function","description":"Create a new file or completely overwrite an existing file with new content.","name":"write_file","parameters":{"additionalProperties":false,"properties":{"content":{"description":"The content to write to the file","type":"string"},"path":{"description":"The file path to write","type":"string"}},"required":["content","path"],"type":"object"},"strict":true}],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":0} + data: {"type":"response.created","response":{"id":"resp_0ce56eab07b114ad00696b716613f881959679f21b3143c55c","object":"response","created_at":1768649062,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5-mini-2025-08-07","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":"detailed"},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[{"type":"function","description":"Create a new file or completely overwrite an existing file with new content.","name":"write_file","parameters":{"additionalProperties":false,"properties":{"content":{"description":"The content to write to the file","type":"string"},"path":{"description":"The file path to write","type":"string"}},"required":["content","path"],"type":"object"},"strict":true}],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":0} event: response.in_progress - data: {"type":"response.in_progress","response":{"id":"resp_05119accbb90821300696a92cc9ed481948499a67d6cd38005","object":"response","created_at":1768592076,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5-mini-2025-08-07","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":"detailed"},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[{"type":"function","description":"Create a new file or completely overwrite an existing file with new content.","name":"write_file","parameters":{"additionalProperties":false,"properties":{"content":{"description":"The content to write to the file","type":"string"},"path":{"description":"The file path to write","type":"string"}},"required":["content","path"],"type":"object"},"strict":true}],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":1} + data: {"type":"response.in_progress","response":{"id":"resp_0ce56eab07b114ad00696b716613f881959679f21b3143c55c","object":"response","created_at":1768649062,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5-mini-2025-08-07","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":"detailed"},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[{"type":"function","description":"Create a new file or completely overwrite an existing file with new content.","name":"write_file","parameters":{"additionalProperties":false,"properties":{"content":{"description":"The content to write to the file","type":"string"},"path":{"description":"The file path to write","type":"string"}},"required":["content","path"],"type":"object"},"strict":true}],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":1} event: response.output_item.added - data: {"type":"response.output_item.added","item":{"id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","type":"reasoning","summary":[]},"output_index":0,"sequence_number":2} - - event: response.reasoning_summary_part.added - data: {"type":"response.reasoning_summary_part.added","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","output_index":0,"part":{"type":"summary_text","text":""},"sequence_number":3,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":"I","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"QETRqT3EMnTGPdD","output_index":0,"sequence_number":4,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":"’m","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"OkEFfkKDoCvTm7","output_index":0,"sequence_number":5,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" trying","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"mBqb8PrnG","output_index":0,"sequence_number":6,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" to","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"2k08gX3A4ldnd","output_index":0,"sequence_number":7,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" figure","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"oLeyreOSk","output_index":0,"sequence_number":8,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" out","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"F6LP06ptPFPl","output_index":0,"sequence_number":9,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" how","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"awRdzVnlCXJ5","output_index":0,"sequence_number":10,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" to","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"FyF4EcAq2IT7V","output_index":0,"sequence_number":11,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" handle","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"xSvTJQ4pO","output_index":0,"sequence_number":12,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" the","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"wOA27dCNSVKG","output_index":0,"sequence_number":13,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" scenario","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"zwQbe1C","output_index":0,"sequence_number":14,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" if","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"RFUbtQvxcba8u","output_index":0,"sequence_number":15,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" a","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"4k1yDMaYNjKrD3","output_index":0,"sequence_number":16,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" tool","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"NMnZEnE7KYr","output_index":0,"sequence_number":17,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" returns","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"R3LNviDx","output_index":0,"sequence_number":18,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" an","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"t6d99a9cfZCXD","output_index":0,"sequence_number":19,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" error","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"JTf2kFyrwY","output_index":0,"sequence_number":20,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":".","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"U8EATukz61ljw6g","output_index":0,"sequence_number":21,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" In","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"A5ME9ut1RzjNC","output_index":0,"sequence_number":22,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" this","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"0ObYtvAfTb3","output_index":0,"sequence_number":23,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" environment","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"6paf","output_index":0,"sequence_number":24,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":",","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"9K3FvKcqSorUBK7","output_index":0,"sequence_number":25,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" tools","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"WaFe4cUhis","output_index":0,"sequence_number":26,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" don","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"8ZegtKTAWQes","output_index":0,"sequence_number":27,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":"’t","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"yWWF8RZ6L8MDM7","output_index":0,"sequence_number":28,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" actually","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"MwLFzb1","output_index":0,"sequence_number":29,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" throw","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"lp8KvnaJgP","output_index":0,"sequence_number":30,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" exceptions","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"Pf4Wo","output_index":0,"sequence_number":31,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" but","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"FfpTdy8Hxo02","output_index":0,"sequence_number":32,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" rather","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"CE2AotrO6","output_index":0,"sequence_number":33,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" return","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"EvIjhTIzA","output_index":0,"sequence_number":34,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" a","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"JN5cvnm0grZyEk","output_index":0,"sequence_number":35,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" message","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"IJCGFC88","output_index":0,"sequence_number":36,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":".","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"3s7suns6owRVkrR","output_index":0,"sequence_number":37,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" I","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"PBeQujY3b6j0ee","output_index":0,"sequence_number":38,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":"’ll","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"SVMCdRrJXizrD","output_index":0,"sequence_number":39,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" assume","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"zjqcllMgH","output_index":0,"sequence_number":40,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" that","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"foLR4O9Fcod","output_index":0,"sequence_number":41,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" everything","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"5S9AH","output_index":0,"sequence_number":42,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" works","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"D6yEo3qOho","output_index":0,"sequence_number":43,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" fine","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"IbSDzT3y2du","output_index":0,"sequence_number":44,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" for","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"uYaGmh9LG5FE","output_index":0,"sequence_number":45,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" now","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"gXU1XlJdfAFi","output_index":0,"sequence_number":46,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":".","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"7TL1tRNg8BkFlv8","output_index":0,"sequence_number":47,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" So","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"mwnEkK2J7z6fB","output_index":0,"sequence_number":48,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":",","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"vwOtFHIFZfv2VkC","output_index":0,"sequence_number":49,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" I","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"6QbCXOTSDHT4ji","output_index":0,"sequence_number":50,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":"’m","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"MIPnFKgJTDlusj","output_index":0,"sequence_number":51,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" going","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"TbxakAZQq6","output_index":0,"sequence_number":52,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" to","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"FYcoDr0HShKLa","output_index":0,"sequence_number":53,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" proceed","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"r0xBabcl","output_index":0,"sequence_number":54,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" and","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"nNekNLl5rxR9","output_index":0,"sequence_number":55,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" call","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"BpsOBRNWbI7","output_index":0,"sequence_number":56,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" functions","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"hy67pr","output_index":0,"sequence_number":57,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":".write","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"z91xhh6kDG","output_index":0,"sequence_number":58,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":"_file","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"ERWjmu2iAWP","output_index":0,"sequence_number":59,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":".","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"OnZ6QG2fksierHv","output_index":0,"sequence_number":60,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" Let","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"JkQNlFPEOjMf","output_index":0,"sequence_number":61,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":"’s","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"NPratBOXTyPnb6","output_index":0,"sequence_number":62,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" keep","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"jXylFdtOir1","output_index":0,"sequence_number":63,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" things","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"yucyVXW3H","output_index":0,"sequence_number":64,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" moving","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"EMDk3jpmh","output_index":0,"sequence_number":65,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" along","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"KAWtVaBDpW","output_index":0,"sequence_number":66,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" smoothly","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"A123uOn","output_index":0,"sequence_number":67,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":",","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"IkJnj9IzT6jG0UO","output_index":0,"sequence_number":68,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" and","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"ABpNoU5y8ehp","output_index":0,"sequence_number":69,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" hopefully","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"cdxxeO","output_index":0,"sequence_number":70,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":",","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"49Q7oN0rRuLjLrw","output_index":0,"sequence_number":71,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" I","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"3W1qKEUYutQ3vB","output_index":0,"sequence_number":72,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" won","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"kHmwmAf69Tau","output_index":0,"sequence_number":73,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":"’t","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"zaPGTvvjOGwHQi","output_index":0,"sequence_number":74,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" run","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"ij4Ny2iOQEH9","output_index":0,"sequence_number":75,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" into","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"NOUgbyqSISB","output_index":0,"sequence_number":76,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" any","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"iFa47mrZVqOJ","output_index":0,"sequence_number":77,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":" hic","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"KeEISoP3uown","output_index":0,"sequence_number":78,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":"cups","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"8Kg1d0aX5GHs","output_index":0,"sequence_number":79,"summary_index":0} - - event: response.reasoning_summary_text.delta - data: {"type":"response.reasoning_summary_text.delta","delta":"!","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","obfuscation":"cc2Mw7DRJhTDjJU","output_index":0,"sequence_number":80,"summary_index":0} - - event: response.reasoning_summary_text.done - data: {"type":"response.reasoning_summary_text.done","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","output_index":0,"sequence_number":81,"summary_index":0,"text":"I’m trying to figure out how to handle the scenario if a tool returns an error. In this environment, tools don’t actually throw exceptions but rather return a message. I’ll assume that everything works fine for now. So, I’m going to proceed and call functions.write_file. Let’s keep things moving along smoothly, and hopefully, I won’t run into any hiccups!"} - - event: response.reasoning_summary_part.done - data: {"type":"response.reasoning_summary_part.done","item_id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","output_index":0,"part":{"type":"summary_text","text":"I’m trying to figure out how to handle the scenario if a tool returns an error. In this environment, tools don’t actually throw exceptions but rather return a message. I’ll assume that everything works fine for now. So, I’m going to proceed and call functions.write_file. Let’s keep things moving along smoothly, and hopefully, I won’t run into any hiccups!"},"sequence_number":82,"summary_index":0} + data: {"type":"response.output_item.added","item":{"id":"rs_0ce56eab07b114ad00696b716668308195aa072dd6c54c3f64","type":"reasoning","summary":[]},"output_index":0,"sequence_number":2} event: response.output_item.done - data: {"type":"response.output_item.done","item":{"id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","type":"reasoning","summary":[{"type":"summary_text","text":"I’m trying to figure out how to handle the scenario if a tool returns an error. In this environment, tools don’t actually throw exceptions but rather return a message. I’ll assume that everything works fine for now. So, I’m going to proceed and call functions.write_file. Let’s keep things moving along smoothly, and hopefully, I won’t run into any hiccups!"}]},"output_index":0,"sequence_number":83} + data: {"type":"response.output_item.done","item":{"id":"rs_0ce56eab07b114ad00696b716668308195aa072dd6c54c3f64","type":"reasoning","summary":[]},"output_index":0,"sequence_number":3} event: response.output_item.added - data: {"type":"response.output_item.added","item":{"id":"fc_05119accbb90821300696a92d4824881948b29ea6c46bac886","type":"function_call","status":"in_progress","arguments":"","call_id":"call_Ffnq4wG9DkgGr7YyjtdTp6GV","name":"write_file"},"output_index":1,"sequence_number":84} + data: {"type":"response.output_item.added","item":{"id":"fc_0ce56eab07b114ad00696b716ab8908195a44e2caf8ccd1192","type":"function_call","status":"in_progress","arguments":"","call_id":"call_1Twh0iq79aaZbUbVQG9Eta7c","name":"write_file"},"output_index":1,"sequence_number":4} event: response.function_call_arguments.delta - data: {"type":"response.function_call_arguments.delta","delta":"{\"","item_id":"fc_05119accbb90821300696a92d4824881948b29ea6c46bac886","obfuscation":"8Xo402QegdiPjI","output_index":1,"sequence_number":85} + data: {"type":"response.function_call_arguments.delta","delta":"{\"","item_id":"fc_0ce56eab07b114ad00696b716ab8908195a44e2caf8ccd1192","obfuscation":"WJWz0rB5Fnse92","output_index":1,"sequence_number":5} event: response.function_call_arguments.delta - data: {"type":"response.function_call_arguments.delta","delta":"content","item_id":"fc_05119accbb90821300696a92d4824881948b29ea6c46bac886","obfuscation":"XjWqB6V73","output_index":1,"sequence_number":86} + data: {"type":"response.function_call_arguments.delta","delta":"content","item_id":"fc_0ce56eab07b114ad00696b716ab8908195a44e2caf8ccd1192","obfuscation":"Rxrf2qxUh","output_index":1,"sequence_number":6} event: response.function_call_arguments.delta - data: {"type":"response.function_call_arguments.delta","delta":"\":\"","item_id":"fc_05119accbb90821300696a92d4824881948b29ea6c46bac886","obfuscation":"a6bemkPJ9KD30","output_index":1,"sequence_number":87} + data: {"type":"response.function_call_arguments.delta","delta":"\":\"","item_id":"fc_0ce56eab07b114ad00696b716ab8908195a44e2caf8ccd1192","obfuscation":"3gfCtKImNw1YM","output_index":1,"sequence_number":7} event: response.function_call_arguments.delta - data: {"type":"response.function_call_arguments.delta","delta":"Hello","item_id":"fc_05119accbb90821300696a92d4824881948b29ea6c46bac886","obfuscation":"Rpbm4oR8Yx8","output_index":1,"sequence_number":88} + data: {"type":"response.function_call_arguments.delta","delta":"Hello","item_id":"fc_0ce56eab07b114ad00696b716ab8908195a44e2caf8ccd1192","obfuscation":"BsSFihatLYC","output_index":1,"sequence_number":8} event: response.function_call_arguments.delta - data: {"type":"response.function_call_arguments.delta","delta":",","item_id":"fc_05119accbb90821300696a92d4824881948b29ea6c46bac886","obfuscation":"Pos7Bgjk0nB3SC1","output_index":1,"sequence_number":89} + data: {"type":"response.function_call_arguments.delta","delta":",","item_id":"fc_0ce56eab07b114ad00696b716ab8908195a44e2caf8ccd1192","obfuscation":"0dD3feeYDy2sL9f","output_index":1,"sequence_number":9} event: response.function_call_arguments.delta - data: {"type":"response.function_call_arguments.delta","delta":" World","item_id":"fc_05119accbb90821300696a92d4824881948b29ea6c46bac886","obfuscation":"4strngcZ5L","output_index":1,"sequence_number":90} + data: {"type":"response.function_call_arguments.delta","delta":" World","item_id":"fc_0ce56eab07b114ad00696b716ab8908195a44e2caf8ccd1192","obfuscation":"24UL9VIAYP","output_index":1,"sequence_number":10} event: response.function_call_arguments.delta - data: {"type":"response.function_call_arguments.delta","delta":"!","item_id":"fc_05119accbb90821300696a92d4824881948b29ea6c46bac886","obfuscation":"DecbgVigLC8EfGS","output_index":1,"sequence_number":91} + data: {"type":"response.function_call_arguments.delta","delta":"!","item_id":"fc_0ce56eab07b114ad00696b716ab8908195a44e2caf8ccd1192","obfuscation":"p6mF9CVBAxsERjU","output_index":1,"sequence_number":11} event: response.function_call_arguments.delta - data: {"type":"response.function_call_arguments.delta","delta":"\",\"","item_id":"fc_05119accbb90821300696a92d4824881948b29ea6c46bac886","obfuscation":"DfxPXFkrBOePx","output_index":1,"sequence_number":92} + data: {"type":"response.function_call_arguments.delta","delta":"\",\"","item_id":"fc_0ce56eab07b114ad00696b716ab8908195a44e2caf8ccd1192","obfuscation":"Zox2BPTiUCHnx","output_index":1,"sequence_number":12} event: response.function_call_arguments.delta - data: {"type":"response.function_call_arguments.delta","delta":"path","item_id":"fc_05119accbb90821300696a92d4824881948b29ea6c46bac886","obfuscation":"ovg2cZ9l90Ky","output_index":1,"sequence_number":93} + data: {"type":"response.function_call_arguments.delta","delta":"path","item_id":"fc_0ce56eab07b114ad00696b716ab8908195a44e2caf8ccd1192","obfuscation":"IFquLvPuMOCl","output_index":1,"sequence_number":13} event: response.function_call_arguments.delta - data: {"type":"response.function_call_arguments.delta","delta":"\":\"","item_id":"fc_05119accbb90821300696a92d4824881948b29ea6c46bac886","obfuscation":"65KP5wyN9NKGH","output_index":1,"sequence_number":94} + data: {"type":"response.function_call_arguments.delta","delta":"\":\"","item_id":"fc_0ce56eab07b114ad00696b716ab8908195a44e2caf8ccd1192","obfuscation":"CSXQ13NWBYlAY","output_index":1,"sequence_number":14} event: response.function_call_arguments.delta - data: {"type":"response.function_call_arguments.delta","delta":"hello","item_id":"fc_05119accbb90821300696a92d4824881948b29ea6c46bac886","obfuscation":"irNcFc8uEjM","output_index":1,"sequence_number":95} + data: {"type":"response.function_call_arguments.delta","delta":"hello","item_id":"fc_0ce56eab07b114ad00696b716ab8908195a44e2caf8ccd1192","obfuscation":"EdPUdd9AQN5","output_index":1,"sequence_number":15} event: response.function_call_arguments.delta - data: {"type":"response.function_call_arguments.delta","delta":".txt","item_id":"fc_05119accbb90821300696a92d4824881948b29ea6c46bac886","obfuscation":"s86S9nduD48t","output_index":1,"sequence_number":96} + data: {"type":"response.function_call_arguments.delta","delta":".txt","item_id":"fc_0ce56eab07b114ad00696b716ab8908195a44e2caf8ccd1192","obfuscation":"S0I6NaZWy0ew","output_index":1,"sequence_number":16} event: response.function_call_arguments.delta - data: {"type":"response.function_call_arguments.delta","delta":"\"}","item_id":"fc_05119accbb90821300696a92d4824881948b29ea6c46bac886","obfuscation":"LMV2S4LDyEZDvd","output_index":1,"sequence_number":97} + data: {"type":"response.function_call_arguments.delta","delta":"\"}","item_id":"fc_0ce56eab07b114ad00696b716ab8908195a44e2caf8ccd1192","obfuscation":"2PxJ3l0EmoSGSw","output_index":1,"sequence_number":17} event: response.function_call_arguments.done - data: {"type":"response.function_call_arguments.done","arguments":"{\"content\":\"Hello, World!\",\"path\":\"hello.txt\"}","item_id":"fc_05119accbb90821300696a92d4824881948b29ea6c46bac886","output_index":1,"sequence_number":98} + data: {"type":"response.function_call_arguments.done","arguments":"{\"content\":\"Hello, World!\",\"path\":\"hello.txt\"}","item_id":"fc_0ce56eab07b114ad00696b716ab8908195a44e2caf8ccd1192","output_index":1,"sequence_number":18} event: response.output_item.done - data: {"type":"response.output_item.done","item":{"id":"fc_05119accbb90821300696a92d4824881948b29ea6c46bac886","type":"function_call","status":"completed","arguments":"{\"content\":\"Hello, World!\",\"path\":\"hello.txt\"}","call_id":"call_Ffnq4wG9DkgGr7YyjtdTp6GV","name":"write_file"},"output_index":1,"sequence_number":99} + data: {"type":"response.output_item.done","item":{"id":"fc_0ce56eab07b114ad00696b716ab8908195a44e2caf8ccd1192","type":"function_call","status":"completed","arguments":"{\"content\":\"Hello, World!\",\"path\":\"hello.txt\"}","call_id":"call_1Twh0iq79aaZbUbVQG9Eta7c","name":"write_file"},"output_index":1,"sequence_number":19} event: response.completed - data: {"type":"response.completed","response":{"id":"resp_05119accbb90821300696a92cc9ed481948499a67d6cd38005","object":"response","created_at":1768592076,"status":"completed","background":false,"completed_at":1768592084,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5-mini-2025-08-07","output":[{"id":"rs_05119accbb90821300696a92cd0c5481948c794c3a4ee6df9f","type":"reasoning","summary":[{"type":"summary_text","text":"I’m trying to figure out how to handle the scenario if a tool returns an error. In this environment, tools don’t actually throw exceptions but rather return a message. I’ll assume that everything works fine for now. So, I’m going to proceed and call functions.write_file. Let’s keep things moving along smoothly, and hopefully, I won’t run into any hiccups!"}]},{"id":"fc_05119accbb90821300696a92d4824881948b29ea6c46bac886","type":"function_call","status":"completed","arguments":"{\"content\":\"Hello, World!\",\"path\":\"hello.txt\"}","call_id":"call_Ffnq4wG9DkgGr7YyjtdTp6GV","name":"write_file"}],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":"detailed"},"safety_identifier":null,"service_tier":"default","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[{"type":"function","description":"Create a new file or completely overwrite an existing file with new content.","name":"write_file","parameters":{"additionalProperties":false,"properties":{"content":{"description":"The content to write to the file","type":"string"},"path":{"description":"The file path to write","type":"string"}},"required":["content","path"],"type":"object"},"strict":true}],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":{"input_tokens":248,"input_tokens_details":{"cached_tokens":0},"output_tokens":412,"output_tokens_details":{"reasoning_tokens":384},"total_tokens":660},"user":null,"metadata":{}},"sequence_number":100} + data: {"type":"response.completed","response":{"id":"resp_0ce56eab07b114ad00696b716613f881959679f21b3143c55c","object":"response","created_at":1768649062,"status":"completed","background":false,"completed_at":1768649066,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5-mini-2025-08-07","output":[{"id":"rs_0ce56eab07b114ad00696b716668308195aa072dd6c54c3f64","type":"reasoning","summary":[]},{"id":"fc_0ce56eab07b114ad00696b716ab8908195a44e2caf8ccd1192","type":"function_call","status":"completed","arguments":"{\"content\":\"Hello, World!\",\"path\":\"hello.txt\"}","call_id":"call_1Twh0iq79aaZbUbVQG9Eta7c","name":"write_file"}],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":"detailed"},"safety_identifier":null,"service_tier":"default","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[{"type":"function","description":"Create a new file or completely overwrite an existing file with new content.","name":"write_file","parameters":{"additionalProperties":false,"properties":{"content":{"description":"The content to write to the file","type":"string"},"path":{"description":"The file path to write","type":"string"}},"required":["content","path"],"type":"object"},"strict":true}],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":{"input_tokens":248,"input_tokens_details":{"cached_tokens":0},"output_tokens":284,"output_tokens_details":{"reasoning_tokens":256},"total_tokens":532},"user":null,"metadata":{}},"sequence_number":20} headers: {} status: 200 OK code: 200 - duration: 986.2845ms + duration: 672.267227ms - id: 1 request: proto: HTTP/1.1 @@ -331,7 +91,7 @@ interactions: proto_minor: 1 content_length: 0 host: api.openai.com - body: '{"input":[{"content":[{"text":"You are a knowledgeable assistant that can write test files.","type":"input_text"}],"role":"system"},{"content":[{"text":"## Filesystem Tool Instructions\n\nThis toolset provides comprehensive filesystem operations.\n\n### Working Directory\n- Relative paths (like \".\" or \"src/main.go\") are resolved relative to the working directory\n- Absolute paths (like \"/etc/hosts\") access files directly\n- Paths starting with \"..\" can access parent directories\n\n### Common Patterns\n- Always check if directories exist before creating files\n- Prefer read_multiple_files for batch operations\n- Use search_files_content for finding specific code or text\n\n### Performance Tips\n- Use read_multiple_files instead of multiple read_file calls\n- Use directory_tree with max_depth to limit large traversals\n- Use appropriate exclude patterns in search operations","type":"input_text"}],"role":"system"},{"content":"Create a hello.txt file with \"Hello, World!\" content. Try only once. On error, exit without further message.","role":"user"},{"arguments":"{\"content\":\"Hello, World!\",\"path\":\"hello.txt\"}","call_id":"call_Ffnq4wG9DkgGr7YyjtdTp6GV","name":"write_file","type":"function_call"},{"call_id":"call_Ffnq4wG9DkgGr7YyjtdTp6GV","output":"The user rejected the tool call.","type":"function_call_output"}],"model":"gpt-5-mini","reasoning":{"summary":"detailed"},"tools":[{"strict":true,"parameters":{"additionalProperties":false,"properties":{"content":{"description":"The content to write to the file","type":"string"},"path":{"description":"The file path to write","type":"string"}},"required":["content","path"],"type":"object"},"name":"write_file","description":"Create a new file or completely overwrite an existing file with new content.","type":"function"}],"stream":true}' + body: '{"input":[{"content":[{"text":"You are a knowledgeable assistant that can write test files.","type":"input_text"}],"role":"system"},{"content":[{"text":"## Filesystem Tool Instructions\n\nThis toolset provides comprehensive filesystem operations.\n\n### Working Directory\n- Relative paths (like \".\" or \"src/main.go\") are resolved relative to the working directory\n- Absolute paths (like \"/etc/hosts\") access files directly\n- Paths starting with \"..\" can access parent directories\n\n### Common Patterns\n- Always check if directories exist before creating files\n- Prefer read_multiple_files for batch operations\n- Use search_files_content for finding specific code or text\n\n### Performance Tips\n- Use read_multiple_files instead of multiple read_file calls\n- Use directory_tree with max_depth to limit large traversals\n- Use appropriate exclude patterns in search operations","type":"input_text"}],"role":"system"},{"content":"Create a hello.txt file with \"Hello, World!\" content. Try only once. On error, exit without further message.","role":"user"},{"arguments":"{\"content\":\"Hello, World!\",\"path\":\"hello.txt\"}","call_id":"call_1Twh0iq79aaZbUbVQG9Eta7c","name":"write_file","type":"function_call"},{"call_id":"call_1Twh0iq79aaZbUbVQG9Eta7c","output":"The user rejected the tool call.","type":"function_call_output"}],"model":"gpt-5-mini","reasoning":{"effort":"medium","summary":"detailed"},"tools":[{"strict":true,"parameters":{"additionalProperties":false,"properties":{"content":{"description":"The content to write to the file","type":"string"},"path":{"description":"The file path to write","type":"string"}},"required":["content","path"],"type":"object"},"name":"write_file","description":"Create a new file or completely overwrite an existing file with new content.","type":"function"}],"stream":true}' url: https://api.openai.com/v1/responses method: POST response: @@ -341,36 +101,36 @@ interactions: content_length: -1 body: |+ event: response.created - data: {"type":"response.created","response":{"id":"resp_0685f97004791c3600696a92d510c081979e8aaafe4faca29e","object":"response","created_at":1768592085,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5-mini-2025-08-07","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":"detailed"},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[{"type":"function","description":"Create a new file or completely overwrite an existing file with new content.","name":"write_file","parameters":{"additionalProperties":false,"properties":{"content":{"description":"The content to write to the file","type":"string"},"path":{"description":"The file path to write","type":"string"}},"required":["content","path"],"type":"object"},"strict":true}],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":0} + data: {"type":"response.created","response":{"id":"resp_09f630552a1455cb00696b716b86d4819580b910d947e53b01","object":"response","created_at":1768649067,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5-mini-2025-08-07","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":"detailed"},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[{"type":"function","description":"Create a new file or completely overwrite an existing file with new content.","name":"write_file","parameters":{"additionalProperties":false,"properties":{"content":{"description":"The content to write to the file","type":"string"},"path":{"description":"The file path to write","type":"string"}},"required":["content","path"],"type":"object"},"strict":true}],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":0} event: response.in_progress - data: {"type":"response.in_progress","response":{"id":"resp_0685f97004791c3600696a92d510c081979e8aaafe4faca29e","object":"response","created_at":1768592085,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5-mini-2025-08-07","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":"detailed"},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[{"type":"function","description":"Create a new file or completely overwrite an existing file with new content.","name":"write_file","parameters":{"additionalProperties":false,"properties":{"content":{"description":"The content to write to the file","type":"string"},"path":{"description":"The file path to write","type":"string"}},"required":["content","path"],"type":"object"},"strict":true}],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":1} + data: {"type":"response.in_progress","response":{"id":"resp_09f630552a1455cb00696b716b86d4819580b910d947e53b01","object":"response","created_at":1768649067,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5-mini-2025-08-07","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":"detailed"},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[{"type":"function","description":"Create a new file or completely overwrite an existing file with new content.","name":"write_file","parameters":{"additionalProperties":false,"properties":{"content":{"description":"The content to write to the file","type":"string"},"path":{"description":"The file path to write","type":"string"}},"required":["content","path"],"type":"object"},"strict":true}],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":1} event: response.output_item.added - data: {"type":"response.output_item.added","item":{"id":"rs_0685f97004791c3600696a92d566ec81978f6c527b869d23bc","type":"reasoning","summary":[]},"output_index":0,"sequence_number":2} + data: {"type":"response.output_item.added","item":{"id":"rs_09f630552a1455cb00696b716bcf348195b5daaf0546ca6165","type":"reasoning","summary":[]},"output_index":0,"sequence_number":2} event: response.output_item.done - data: {"type":"response.output_item.done","item":{"id":"rs_0685f97004791c3600696a92d566ec81978f6c527b869d23bc","type":"reasoning","summary":[]},"output_index":0,"sequence_number":3} + data: {"type":"response.output_item.done","item":{"id":"rs_09f630552a1455cb00696b716bcf348195b5daaf0546ca6165","type":"reasoning","summary":[]},"output_index":0,"sequence_number":3} event: response.output_item.added - data: {"type":"response.output_item.added","item":{"id":"msg_0685f97004791c3600696a92d9264081978a4f978a26e77428","type":"message","status":"in_progress","content":[],"role":"assistant"},"output_index":1,"sequence_number":4} + data: {"type":"response.output_item.added","item":{"id":"msg_09f630552a1455cb00696b717502e8819585d20820cdf72533","type":"message","status":"in_progress","content":[],"role":"assistant"},"output_index":1,"sequence_number":4} event: response.content_part.added - data: {"type":"response.content_part.added","content_index":0,"item_id":"msg_0685f97004791c3600696a92d9264081978a4f978a26e77428","output_index":1,"part":{"type":"output_text","annotations":[],"logprobs":[],"text":""},"sequence_number":5} + data: {"type":"response.content_part.added","content_index":0,"item_id":"msg_09f630552a1455cb00696b717502e8819585d20820cdf72533","output_index":1,"part":{"type":"output_text","annotations":[],"logprobs":[],"text":""},"sequence_number":5} event: response.output_text.done - data: {"type":"response.output_text.done","content_index":0,"item_id":"msg_0685f97004791c3600696a92d9264081978a4f978a26e77428","logprobs":[],"output_index":1,"sequence_number":6,"text":""} + data: {"type":"response.output_text.done","content_index":0,"item_id":"msg_09f630552a1455cb00696b717502e8819585d20820cdf72533","logprobs":[],"output_index":1,"sequence_number":6,"text":""} event: response.content_part.done - data: {"type":"response.content_part.done","content_index":0,"item_id":"msg_0685f97004791c3600696a92d9264081978a4f978a26e77428","output_index":1,"part":{"type":"output_text","annotations":[],"logprobs":[],"text":""},"sequence_number":7} + data: {"type":"response.content_part.done","content_index":0,"item_id":"msg_09f630552a1455cb00696b717502e8819585d20820cdf72533","output_index":1,"part":{"type":"output_text","annotations":[],"logprobs":[],"text":""},"sequence_number":7} event: response.output_item.done - data: {"type":"response.output_item.done","item":{"id":"msg_0685f97004791c3600696a92d9264081978a4f978a26e77428","type":"message","status":"completed","content":[{"type":"output_text","annotations":[],"logprobs":[],"text":""}],"role":"assistant"},"output_index":1,"sequence_number":8} + data: {"type":"response.output_item.done","item":{"id":"msg_09f630552a1455cb00696b717502e8819585d20820cdf72533","type":"message","status":"completed","content":[{"type":"output_text","annotations":[],"logprobs":[],"text":""}],"role":"assistant"},"output_index":1,"sequence_number":8} event: response.completed - data: {"type":"response.completed","response":{"id":"resp_0685f97004791c3600696a92d510c081979e8aaafe4faca29e","object":"response","created_at":1768592085,"status":"completed","background":false,"completed_at":1768592089,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5-mini-2025-08-07","output":[{"id":"rs_0685f97004791c3600696a92d566ec81978f6c527b869d23bc","type":"reasoning","summary":[]},{"id":"msg_0685f97004791c3600696a92d9264081978a4f978a26e77428","type":"message","status":"completed","content":[{"type":"output_text","annotations":[],"logprobs":[],"text":""}],"role":"assistant"}],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":"detailed"},"safety_identifier":null,"service_tier":"default","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[{"type":"function","description":"Create a new file or completely overwrite an existing file with new content.","name":"write_file","parameters":{"additionalProperties":false,"properties":{"content":{"description":"The content to write to the file","type":"string"},"path":{"description":"The file path to write","type":"string"}},"required":["content","path"],"type":"object"},"strict":true}],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":{"input_tokens":289,"input_tokens_details":{"cached_tokens":0},"output_tokens":262,"output_tokens_details":{"reasoning_tokens":256},"total_tokens":551},"user":null,"metadata":{}},"sequence_number":9} + data: {"type":"response.completed","response":{"id":"resp_09f630552a1455cb00696b716b86d4819580b910d947e53b01","object":"response","created_at":1768649067,"status":"completed","background":false,"completed_at":1768649077,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5-mini-2025-08-07","output":[{"id":"rs_09f630552a1455cb00696b716bcf348195b5daaf0546ca6165","type":"reasoning","summary":[]},{"id":"msg_09f630552a1455cb00696b717502e8819585d20820cdf72533","type":"message","status":"completed","content":[{"type":"output_text","annotations":[],"logprobs":[],"text":""}],"role":"assistant"}],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":"detailed"},"safety_identifier":null,"service_tier":"default","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[{"type":"function","description":"Create a new file or completely overwrite an existing file with new content.","name":"write_file","parameters":{"additionalProperties":false,"properties":{"content":{"description":"The content to write to the file","type":"string"},"path":{"description":"The file path to write","type":"string"}},"required":["content","path"],"type":"object"},"strict":true}],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":{"input_tokens":289,"input_tokens_details":{"cached_tokens":0},"output_tokens":198,"output_tokens_details":{"reasoning_tokens":192},"total_tokens":487},"user":null,"metadata":{}},"sequence_number":9} headers: {} status: 200 OK code: 200 - duration: 293.877ms + duration: 568.572243ms diff --git a/e2e/testdata/cassettes/TestMCP_MultiAgent.yaml b/e2e/testdata/cassettes/TestMCP_MultiAgent.yaml index e087e6921..fb80cdc00 100644 --- a/e2e/testdata/cassettes/TestMCP_MultiAgent.yaml +++ b/e2e/testdata/cassettes/TestMCP_MultiAgent.yaml @@ -8,7 +8,7 @@ interactions: proto_minor: 1 content_length: 0 host: api.openai.com - body: '{"input":[{"content":[{"text":"You are a knowledgeable assistant that helps users with web tasks.\n","type":"input_text"}],"role":"system"},{"content":"Say hello in one sentence.","role":"user"}],"model":"gpt-5-mini","reasoning":{"summary":"detailed"},"stream":true}' + body: '{"input":[{"content":[{"text":"You are a knowledgeable assistant that helps users with web tasks.\n","type":"input_text"}],"role":"system"},{"content":"Say hello in one sentence.","role":"user"}],"model":"gpt-5-mini","reasoning":{"effort":"medium","summary":"detailed"},"stream":true}' url: https://api.openai.com/v1/responses method: POST response: @@ -18,57 +18,294 @@ interactions: content_length: -1 body: |+ event: response.created - data: {"type":"response.created","response":{"id":"resp_04b005b5ce28f85f00696a92d9e6e4819093ac2ce3255c1574","object":"response","created_at":1768592089,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5-mini-2025-08-07","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":"detailed"},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":0} + data: {"type":"response.created","response":{"id":"resp_03efa54773f8c97e00696b71757d0081979561d65a51434326","object":"response","created_at":1768649077,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5-mini-2025-08-07","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":"detailed"},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":0} event: response.in_progress - data: {"type":"response.in_progress","response":{"id":"resp_04b005b5ce28f85f00696a92d9e6e4819093ac2ce3255c1574","object":"response","created_at":1768592089,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5-mini-2025-08-07","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":"detailed"},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":1} + data: {"type":"response.in_progress","response":{"id":"resp_03efa54773f8c97e00696b71757d0081979561d65a51434326","object":"response","created_at":1768649077,"status":"in_progress","background":false,"completed_at":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5-mini-2025-08-07","output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":"detailed"},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":1} event: response.output_item.added - data: {"type":"response.output_item.added","item":{"id":"rs_04b005b5ce28f85f00696a92da41388190a51cfe3452554c79","type":"reasoning","summary":[]},"output_index":0,"sequence_number":2} + data: {"type":"response.output_item.added","item":{"id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","type":"reasoning","summary":[]},"output_index":0,"sequence_number":2} - event: response.output_item.done - data: {"type":"response.output_item.done","item":{"id":"rs_04b005b5ce28f85f00696a92da41388190a51cfe3452554c79","type":"reasoning","summary":[]},"output_index":0,"sequence_number":3} + event: response.reasoning_summary_part.added + data: {"type":"response.reasoning_summary_part.added","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","output_index":0,"part":{"type":"summary_text","text":""},"sequence_number":3,"summary_index":0} - event: response.output_item.added - data: {"type":"response.output_item.added","item":{"id":"msg_04b005b5ce28f85f00696a92ddc12c8190b38c6b32b6a83531","type":"message","status":"in_progress","content":[],"role":"assistant"},"output_index":1,"sequence_number":4} + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":"**Providing","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"eZtUO","output_index":0,"sequence_number":4,"summary_index":0} - event: response.content_part.added - data: {"type":"response.content_part.added","content_index":0,"item_id":"msg_04b005b5ce28f85f00696a92ddc12c8190b38c6b32b6a83531","output_index":1,"part":{"type":"output_text","annotations":[],"logprobs":[],"text":""},"sequence_number":5} + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" a","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"W0pxOVhF72QVP3","output_index":0,"sequence_number":5,"summary_index":0} - event: response.output_text.delta - data: {"type":"response.output_text.delta","content_index":0,"delta":"Hello","item_id":"msg_04b005b5ce28f85f00696a92ddc12c8190b38c6b32b6a83531","logprobs":[],"obfuscation":"BLFTLmegxc7","output_index":1,"sequence_number":6} + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" simple","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"oxYNLRlS1","output_index":0,"sequence_number":6,"summary_index":0} - event: response.output_text.delta - data: {"type":"response.output_text.delta","content_index":0,"delta":",","item_id":"msg_04b005b5ce28f85f00696a92ddc12c8190b38c6b32b6a83531","logprobs":[],"obfuscation":"J5V1AFq1pHSfSoT","output_index":1,"sequence_number":7} + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" greeting","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"BWKgO84","output_index":0,"sequence_number":7,"summary_index":0} - event: response.output_text.delta - data: {"type":"response.output_text.delta","content_index":0,"delta":" nice","item_id":"msg_04b005b5ce28f85f00696a92ddc12c8190b38c6b32b6a83531","logprobs":[],"obfuscation":"5OHSaDXrwZ5","output_index":1,"sequence_number":8} + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":"**\n\nThe","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"eN9PwYbYo","output_index":0,"sequence_number":8,"summary_index":0} - event: response.output_text.delta - data: {"type":"response.output_text.delta","content_index":0,"delta":" to","item_id":"msg_04b005b5ce28f85f00696a92ddc12c8190b38c6b32b6a83531","logprobs":[],"obfuscation":"WTLx3qYtRMl1S","output_index":1,"sequence_number":9} + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" user","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"lNmcUwtajnp","output_index":0,"sequence_number":9,"summary_index":0} - event: response.output_text.delta - data: {"type":"response.output_text.delta","content_index":0,"delta":" meet","item_id":"msg_04b005b5ce28f85f00696a92ddc12c8190b38c6b32b6a83531","logprobs":[],"obfuscation":"TDHgUD1uIyv","output_index":1,"sequence_number":10} + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":"’s","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"iKCSBop4d5KMVm","output_index":0,"sequence_number":10,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" request","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"j7NDqan9","output_index":0,"sequence_number":11,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" is","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"sp0vrgWBRh0UW","output_index":0,"sequence_number":12,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" clear","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"RBgEh9zC0m","output_index":0,"sequence_number":13,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":":","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"c7Fpj31SbdNbCpt","output_index":0,"sequence_number":14,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" they","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"5yqn56KIc4z","output_index":0,"sequence_number":15,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" want","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"3j9NoTABm67","output_index":0,"sequence_number":16,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" me","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"71kxVGESOj9Gc","output_index":0,"sequence_number":17,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" to","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"o8rgUPEGQ5847","output_index":0,"sequence_number":18,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" say","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"F2bOkgvxl0IC","output_index":0,"sequence_number":19,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" hello","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"Ths0DxTFYG","output_index":0,"sequence_number":20,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" in","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"evzOD4KYHADfb","output_index":0,"sequence_number":21,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" one","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"4GaAgj4M1V7N","output_index":0,"sequence_number":22,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" concise","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"PWdkiKDn","output_index":0,"sequence_number":23,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" sentence","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"RHHOV8F","output_index":0,"sequence_number":24,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":".","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"ES7l5oeMibpHnTr","output_index":0,"sequence_number":25,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" I","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"Ex879hW9oBSP1V","output_index":0,"sequence_number":26,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" could","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"CVN4693sMR","output_index":0,"sequence_number":27,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" simply","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"KGMoJVYyi","output_index":0,"sequence_number":28,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" go","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"96NjDZqdXwrPf","output_index":0,"sequence_number":29,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" with","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"7RsE2cFZ0vM","output_index":0,"sequence_number":30,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" “","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"z32LWFxrLXmq7X","output_index":0,"sequence_number":31,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":"Hello","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"XsDxUVT4su9","output_index":0,"sequence_number":32,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":"!”","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"KtG9x8fLqAisAp","output_index":0,"sequence_number":33,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" or","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"lc38OBmBeoyBZ","output_index":0,"sequence_number":34,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" add","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"mXgGeDHg638Z","output_index":0,"sequence_number":35,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" a","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"UT1AgeimYByvfI","output_index":0,"sequence_number":36,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" little","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"iaQ31nLPn","output_index":0,"sequence_number":37,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" more","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"APp4OWQ8g6V","output_index":0,"sequence_number":38,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" with","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"PvzHNcQ7Bqm","output_index":0,"sequence_number":39,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" “","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"4k0TVRnSubBr9S","output_index":0,"sequence_number":40,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":"Hello","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"EQMO7Wn8004","output_index":0,"sequence_number":41,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":",","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"Zux3gRD0pyYSIdV","output_index":0,"sequence_number":42,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" how","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"r5RCxFwh7jbE","output_index":0,"sequence_number":43,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" can","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"2nWVv7B5kjhZ","output_index":0,"sequence_number":44,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" I","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"xx37jqVXzOrFUq","output_index":0,"sequence_number":45,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" help","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"vd452ZhYorp","output_index":0,"sequence_number":46,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" you","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"KhSS6tbSTH87","output_index":0,"sequence_number":47,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" today","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"vB9DOfWySo","output_index":0,"sequence_number":48,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":"?”","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"hlbYt1ztWMESIh","output_index":0,"sequence_number":49,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" But","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"PpNboOHOHNWs","output_index":0,"sequence_number":50,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" since","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"0KqMHVnUGG","output_index":0,"sequence_number":51,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" they","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"PFPypQ5hanj","output_index":0,"sequence_number":52,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" asked","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"C1BnvmIj7S","output_index":0,"sequence_number":53,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" explicitly","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"qV8He","output_index":0,"sequence_number":54,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" for","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"jFMFrKd1ftpZ","output_index":0,"sequence_number":55,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" one","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"b12995tqrd6q","output_index":0,"sequence_number":56,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" sentence","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"oQvy8QE","output_index":0,"sequence_number":57,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":",","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"cTxdmzcWQfB67gG","output_index":0,"sequence_number":58,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" I","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"V4jzw9ihdxF2i0","output_index":0,"sequence_number":59,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":"’ll","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"Bcho5cLuUBLTT","output_index":0,"sequence_number":60,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" stick","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"JWIiiCeaYt","output_index":0,"sequence_number":61,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" to","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"koSVR1af22f50","output_index":0,"sequence_number":62,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" just","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"b7reYRnXjhz","output_index":0,"sequence_number":63,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" “","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"xsoDqzyF7ZGK5i","output_index":0,"sequence_number":64,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":"Hello","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"s8offdwHsZR","output_index":0,"sequence_number":65,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":"!”","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"PeqQiI780ddMOK","output_index":0,"sequence_number":66,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" to","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"Jb7LlexuIYf9J","output_index":0,"sequence_number":67,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" keep","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"HhXcBoi6x6l","output_index":0,"sequence_number":68,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" it","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"tkpJMWA3csn0Z","output_index":0,"sequence_number":69,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" simple","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"nm9GjNu0w","output_index":0,"sequence_number":70,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":".","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"W3EVa2DRcmMywW9","output_index":0,"sequence_number":71,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" That","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"jTVqWseLwRB","output_index":0,"sequence_number":72,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" way","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"ck5CaDbxATMn","output_index":0,"sequence_number":73,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":",","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"MQamC2SneoIBsYj","output_index":0,"sequence_number":74,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" I","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"3ZtBBRH4fgeWSZ","output_index":0,"sequence_number":75,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":"’m","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"VvNpRI6SKS3dIv","output_index":0,"sequence_number":76,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" answering","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"xchzkI","output_index":0,"sequence_number":77,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" their","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"IYLsaw72mq","output_index":0,"sequence_number":78,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" request","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"T1oDtFFT","output_index":0,"sequence_number":79,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" directly","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"KOqSBdn","output_index":0,"sequence_number":80,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" without","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"Fs02Tcdq","output_index":0,"sequence_number":81,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" any","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"2W6tEk255zL7","output_index":0,"sequence_number":82,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":" fluff","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"FRSrlgEZvu","output_index":0,"sequence_number":83,"summary_index":0} + + event: response.reasoning_summary_text.delta + data: {"type":"response.reasoning_summary_text.delta","delta":".","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","obfuscation":"8Xp7DBNa74weICC","output_index":0,"sequence_number":84,"summary_index":0} + + event: response.reasoning_summary_text.done + data: {"type":"response.reasoning_summary_text.done","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","output_index":0,"sequence_number":85,"summary_index":0,"text":"**Providing a simple greeting**\n\nThe user’s request is clear: they want me to say hello in one concise sentence. I could simply go with “Hello!” or add a little more with “Hello, how can I help you today?” But since they asked explicitly for one sentence, I’ll stick to just “Hello!” to keep it simple. That way, I’m answering their request directly without any fluff."} + + event: response.reasoning_summary_part.done + data: {"type":"response.reasoning_summary_part.done","item_id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","output_index":0,"part":{"type":"summary_text","text":"**Providing a simple greeting**\n\nThe user’s request is clear: they want me to say hello in one concise sentence. I could simply go with “Hello!” or add a little more with “Hello, how can I help you today?” But since they asked explicitly for one sentence, I’ll stick to just “Hello!” to keep it simple. That way, I’m answering their request directly without any fluff."},"sequence_number":86,"summary_index":0} + + event: response.output_item.done + data: {"type":"response.output_item.done","item":{"id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","type":"reasoning","summary":[{"type":"summary_text","text":"**Providing a simple greeting**\n\nThe user’s request is clear: they want me to say hello in one concise sentence. I could simply go with “Hello!” or add a little more with “Hello, how can I help you today?” But since they asked explicitly for one sentence, I’ll stick to just “Hello!” to keep it simple. That way, I’m answering their request directly without any fluff."}]},"output_index":0,"sequence_number":87} + + event: response.output_item.added + data: {"type":"response.output_item.added","item":{"id":"msg_03efa54773f8c97e00696b7178fea08197b2dec6df945ebb5f","type":"message","status":"in_progress","content":[],"role":"assistant"},"output_index":1,"sequence_number":88} + + event: response.content_part.added + data: {"type":"response.content_part.added","content_index":0,"item_id":"msg_03efa54773f8c97e00696b7178fea08197b2dec6df945ebb5f","output_index":1,"part":{"type":"output_text","annotations":[],"logprobs":[],"text":""},"sequence_number":89} event: response.output_text.delta - data: {"type":"response.output_text.delta","content_index":0,"delta":" you","item_id":"msg_04b005b5ce28f85f00696a92ddc12c8190b38c6b32b6a83531","logprobs":[],"obfuscation":"ExnB5bu0o3Qb","output_index":1,"sequence_number":11} + data: {"type":"response.output_text.delta","content_index":0,"delta":"Hello","item_id":"msg_03efa54773f8c97e00696b7178fea08197b2dec6df945ebb5f","logprobs":[],"obfuscation":"rIs3fcn18hX","output_index":1,"sequence_number":90} event: response.output_text.delta - data: {"type":"response.output_text.delta","content_index":0,"delta":"!","item_id":"msg_04b005b5ce28f85f00696a92ddc12c8190b38c6b32b6a83531","logprobs":[],"obfuscation":"r6lisYwlnZa5DVS","output_index":1,"sequence_number":12} + data: {"type":"response.output_text.delta","content_index":0,"delta":"!","item_id":"msg_03efa54773f8c97e00696b7178fea08197b2dec6df945ebb5f","logprobs":[],"obfuscation":"EABhOBOoyL4mcEJ","output_index":1,"sequence_number":91} event: response.output_text.done - data: {"type":"response.output_text.done","content_index":0,"item_id":"msg_04b005b5ce28f85f00696a92ddc12c8190b38c6b32b6a83531","logprobs":[],"output_index":1,"sequence_number":13,"text":"Hello, nice to meet you!"} + data: {"type":"response.output_text.done","content_index":0,"item_id":"msg_03efa54773f8c97e00696b7178fea08197b2dec6df945ebb5f","logprobs":[],"output_index":1,"sequence_number":92,"text":"Hello!"} event: response.content_part.done - data: {"type":"response.content_part.done","content_index":0,"item_id":"msg_04b005b5ce28f85f00696a92ddc12c8190b38c6b32b6a83531","output_index":1,"part":{"type":"output_text","annotations":[],"logprobs":[],"text":"Hello, nice to meet you!"},"sequence_number":14} + data: {"type":"response.content_part.done","content_index":0,"item_id":"msg_03efa54773f8c97e00696b7178fea08197b2dec6df945ebb5f","output_index":1,"part":{"type":"output_text","annotations":[],"logprobs":[],"text":"Hello!"},"sequence_number":93} event: response.output_item.done - data: {"type":"response.output_item.done","item":{"id":"msg_04b005b5ce28f85f00696a92ddc12c8190b38c6b32b6a83531","type":"message","status":"completed","content":[{"type":"output_text","annotations":[],"logprobs":[],"text":"Hello, nice to meet you!"}],"role":"assistant"},"output_index":1,"sequence_number":15} + data: {"type":"response.output_item.done","item":{"id":"msg_03efa54773f8c97e00696b7178fea08197b2dec6df945ebb5f","type":"message","status":"completed","content":[{"type":"output_text","annotations":[],"logprobs":[],"text":"Hello!"}],"role":"assistant"},"output_index":1,"sequence_number":94} event: response.completed - data: {"type":"response.completed","response":{"id":"resp_04b005b5ce28f85f00696a92d9e6e4819093ac2ce3255c1574","object":"response","created_at":1768592089,"status":"completed","background":false,"completed_at":1768592093,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5-mini-2025-08-07","output":[{"id":"rs_04b005b5ce28f85f00696a92da41388190a51cfe3452554c79","type":"reasoning","summary":[]},{"id":"msg_04b005b5ce28f85f00696a92ddc12c8190b38c6b32b6a83531","type":"message","status":"completed","content":[{"type":"output_text","annotations":[],"logprobs":[],"text":"Hello, nice to meet you!"}],"role":"assistant"}],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":"detailed"},"safety_identifier":null,"service_tier":"default","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":{"input_tokens":28,"input_tokens_details":{"cached_tokens":0},"output_tokens":205,"output_tokens_details":{"reasoning_tokens":192},"total_tokens":233},"user":null,"metadata":{}},"sequence_number":16} + data: {"type":"response.completed","response":{"id":"resp_03efa54773f8c97e00696b71757d0081979561d65a51434326","object":"response","created_at":1768649077,"status":"completed","background":false,"completed_at":1768649081,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5-mini-2025-08-07","output":[{"id":"rs_03efa54773f8c97e00696b7175bfcc81979d2b6f55eb20d023","type":"reasoning","summary":[{"type":"summary_text","text":"**Providing a simple greeting**\n\nThe user’s request is clear: they want me to say hello in one concise sentence. I could simply go with “Hello!” or add a little more with “Hello, how can I help you today?” But since they asked explicitly for one sentence, I’ll stick to just “Hello!” to keep it simple. That way, I’m answering their request directly without any fluff."}]},{"id":"msg_03efa54773f8c97e00696b7178fea08197b2dec6df945ebb5f","type":"message","status":"completed","content":[{"type":"output_text","annotations":[],"logprobs":[],"text":"Hello!"}],"role":"assistant"}],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":"detailed"},"safety_identifier":null,"service_tier":"default","store":true,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":{"input_tokens":28,"input_tokens_details":{"cached_tokens":0},"output_tokens":72,"output_tokens_details":{"reasoning_tokens":64},"total_tokens":100},"user":null,"metadata":{}},"sequence_number":95} headers: {} status: 200 OK code: 200 - duration: 600.015792ms + duration: 366.331104ms diff --git a/pkg/model/provider/gemini/client.go b/pkg/model/provider/gemini/client.go index 2a5968ccc..3642d6c0d 100644 --- a/pkg/model/provider/gemini/client.go +++ b/pkg/model/provider/gemini/client.go @@ -308,28 +308,20 @@ func (c *Client) buildConfig() *genai.GenerateContentConfig { config.PresencePenalty = genai.Ptr(float32(*c.ModelConfig.PresencePenalty)) } - // Apply thinking budget for Gemini models using token-based configuration. + // Apply thinking configuration for Gemini models. // Per official docs: https://ai.google.dev/gemini-api/docs/thinking + // + // Gemini 2.5 models use token-based configuration (thinkingBudget): // - Set thinkingBudget to 0 to disable thinking // - Set thinkingBudget to -1 for dynamic thinking (model decides) - // - Set to a specific value for a fixed token budget, - // maximum is 24576 for all models except Gemini 2.5 Pro (max 32768) + // - Set to a specific value for a fixed token budget + // (max 24576 for most models, 32768 for Gemini 2.5 Pro) + // + // Gemini 3 models use level-based configuration (thinkingLevel): + // - Gemini 3 Pro: "low", "high" + // - Gemini 3 Flash: "minimal", "low", "medium", "high" if c.ModelConfig.ThinkingBudget != nil { - if config.ThinkingConfig == nil { - config.ThinkingConfig = &genai.ThinkingConfig{} - } - config.ThinkingConfig.IncludeThoughts = true - tokens := c.ModelConfig.ThinkingBudget.Tokens - config.ThinkingConfig.ThinkingBudget = genai.Ptr(int32(tokens)) - - switch tokens { - case 0: - slog.Debug("Gemini request with thinking disabled", "budget_tokens", tokens) - case -1: - slog.Debug("Gemini request with dynamic thinking", "budget_tokens", tokens) - default: - slog.Debug("Gemini request using thinking_budget", "budget_tokens", tokens) - } + c.applyThinkingConfig(config) } if structuredOutput := c.ModelOptions.StructuredOutput(); structuredOutput != nil { @@ -340,6 +332,81 @@ func (c *Client) buildConfig() *genai.GenerateContentConfig { return config } +// applyThinkingConfig applies the appropriate thinking configuration based on model type. +func (c *Client) applyThinkingConfig(config *genai.GenerateContentConfig) { + if config.ThinkingConfig == nil { + config.ThinkingConfig = &genai.ThinkingConfig{} + } + config.ThinkingConfig.IncludeThoughts = true + + model := strings.ToLower(c.ModelConfig.Model) + + // Gemini 3 models use ThinkingLevel (effort-based) + if strings.HasPrefix(model, "gemini-3-") { + c.applyGemini3ThinkingLevel(config) + return + } + + // Gemini 2.5 and other models use ThinkingBudget (token-based) + c.applyGemini25ThinkingBudget(config) +} + +// applyGemini3ThinkingLevel applies level-based thinking for Gemini 3 models. +func (c *Client) applyGemini3ThinkingLevel(config *genai.GenerateContentConfig) { + effort := strings.ToLower(c.ModelConfig.ThinkingBudget.Effort) + + var level genai.ThinkingLevel + switch effort { + case "minimal": + level = genai.ThinkingLevelMinimal + case "low": + level = genai.ThinkingLevelLow + case "medium": + level = genai.ThinkingLevelMedium + case "high": + level = genai.ThinkingLevelHigh + default: + // If effort is not set but tokens are, fall back to token-based config + if c.ModelConfig.ThinkingBudget.Tokens != 0 { + slog.Warn("Gemini 3 models use thinkingLevel, not thinkingBudget tokens; falling back to token-based config", + "model", c.ModelConfig.Model, + "tokens", c.ModelConfig.ThinkingBudget.Tokens, + ) + c.applyGemini25ThinkingBudget(config) + return + } + // Default to high if no valid effort specified + level = genai.ThinkingLevelHigh + slog.Debug("Gemini 3 using default thinking level", + "model", c.ModelConfig.Model, + "level", "high", + ) + config.ThinkingConfig.ThinkingLevel = level + return + } + + config.ThinkingConfig.ThinkingLevel = level + slog.Debug("Gemini 3 request using thinkingLevel", + "model", c.ModelConfig.Model, + "level", effort, + ) +} + +// applyGemini25ThinkingBudget applies token-based thinking for Gemini 2.5 and other models. +func (c *Client) applyGemini25ThinkingBudget(config *genai.GenerateContentConfig) { + tokens := c.ModelConfig.ThinkingBudget.Tokens + config.ThinkingConfig.ThinkingBudget = genai.Ptr(int32(tokens)) + + switch tokens { + case 0: + slog.Debug("Gemini request with thinking disabled", "budget_tokens", tokens) + case -1: + slog.Debug("Gemini request with dynamic thinking", "budget_tokens", tokens) + default: + slog.Debug("Gemini request using thinking_budget", "budget_tokens", tokens) + } +} + // convertToolsToGemini converts tools to Gemini format func convertToolsToGemini(requestTools []tools.Tool) ([]*genai.Tool, error) { if len(requestTools) == 0 { diff --git a/pkg/model/provider/gemini/client_test.go b/pkg/model/provider/gemini/client_test.go new file mode 100644 index 000000000..a30376771 --- /dev/null +++ b/pkg/model/provider/gemini/client_test.go @@ -0,0 +1,285 @@ +package gemini + +import ( + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "google.golang.org/genai" + + "github.com/docker/cagent/pkg/config/latest" + "github.com/docker/cagent/pkg/model/provider/base" +) + +func TestBuildConfig_Gemini25_ThinkingBudget(t *testing.T) { + t.Parallel() + + tests := []struct { + name string + model string + thinkingBudget *latest.ThinkingBudget + expectThinkingBudget *int32 + expectThinkingLevel genai.ThinkingLevel + }{ + { + name: "gemini-2.5-flash with dynamic thinking (-1)", + model: "gemini-2.5-flash", + thinkingBudget: &latest.ThinkingBudget{Tokens: -1}, + expectThinkingBudget: ptr(int32(-1)), + expectThinkingLevel: "", + }, + { + name: "gemini-2.5-pro with dynamic thinking (-1)", + model: "gemini-2.5-pro", + thinkingBudget: &latest.ThinkingBudget{Tokens: -1}, + expectThinkingBudget: ptr(int32(-1)), + expectThinkingLevel: "", + }, + { + name: "gemini-2.5-flash with specific token budget", + model: "gemini-2.5-flash", + thinkingBudget: &latest.ThinkingBudget{Tokens: 8192}, + expectThinkingBudget: ptr(int32(8192)), + expectThinkingLevel: "", + }, + { + name: "gemini-2.5-flash with thinking disabled (0)", + model: "gemini-2.5-flash", + thinkingBudget: &latest.ThinkingBudget{Tokens: 0}, + expectThinkingBudget: ptr(int32(0)), + expectThinkingLevel: "", + }, + { + name: "gemini-2.5-flash-lite with dynamic thinking", + model: "gemini-2.5-flash-lite", + thinkingBudget: &latest.ThinkingBudget{Tokens: -1}, + expectThinkingBudget: ptr(int32(-1)), + expectThinkingLevel: "", + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + + client := &Client{ + Config: base.Config{ + ModelConfig: latest.ModelConfig{ + Provider: "google", + Model: tt.model, + ThinkingBudget: tt.thinkingBudget, + }, + }, + } + + config := client.buildConfig() + + require.NotNil(t, config.ThinkingConfig, "ThinkingConfig should be set") + assert.True(t, config.ThinkingConfig.IncludeThoughts, "IncludeThoughts should be true") + + // Verify token-based budget is used + require.NotNil(t, config.ThinkingConfig.ThinkingBudget, "ThinkingBudget should be set") + assert.Equal(t, *tt.expectThinkingBudget, *config.ThinkingConfig.ThinkingBudget, "ThinkingBudget tokens should match") + + // Verify ThinkingLevel is NOT set for Gemini 2.5 + assert.Equal(t, tt.expectThinkingLevel, config.ThinkingConfig.ThinkingLevel, "ThinkingLevel should not be set for Gemini 2.5") + }) + } +} + +func TestBuildConfig_Gemini3_ThinkingLevel(t *testing.T) { + t.Parallel() + + tests := []struct { + name string + model string + thinkingBudget *latest.ThinkingBudget + expectThinkingLevel genai.ThinkingLevel + }{ + { + name: "gemini-3-pro with high thinking level", + model: "gemini-3-pro", + thinkingBudget: &latest.ThinkingBudget{Effort: "high"}, + expectThinkingLevel: genai.ThinkingLevelHigh, + }, + { + name: "gemini-3-pro with low thinking level", + model: "gemini-3-pro", + thinkingBudget: &latest.ThinkingBudget{Effort: "low"}, + expectThinkingLevel: genai.ThinkingLevelLow, + }, + { + name: "gemini-3-flash with medium thinking level", + model: "gemini-3-flash", + thinkingBudget: &latest.ThinkingBudget{Effort: "medium"}, + expectThinkingLevel: genai.ThinkingLevelMedium, + }, + { + name: "gemini-3-flash with minimal thinking level", + model: "gemini-3-flash", + thinkingBudget: &latest.ThinkingBudget{Effort: "minimal"}, + expectThinkingLevel: genai.ThinkingLevelMinimal, + }, + { + name: "gemini-3-flash with high thinking level", + model: "gemini-3-flash", + thinkingBudget: &latest.ThinkingBudget{Effort: "high"}, + expectThinkingLevel: genai.ThinkingLevelHigh, + }, + { + name: "gemini-3-pro-preview with high thinking level", + model: "gemini-3-pro-preview", + thinkingBudget: &latest.ThinkingBudget{Effort: "high"}, + expectThinkingLevel: genai.ThinkingLevelHigh, + }, + { + name: "gemini-3-flash-preview with medium thinking level", + model: "gemini-3-flash-preview", + thinkingBudget: &latest.ThinkingBudget{Effort: "medium"}, + expectThinkingLevel: genai.ThinkingLevelMedium, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + + client := &Client{ + Config: base.Config{ + ModelConfig: latest.ModelConfig{ + Provider: "google", + Model: tt.model, + ThinkingBudget: tt.thinkingBudget, + }, + }, + } + + config := client.buildConfig() + + require.NotNil(t, config.ThinkingConfig, "ThinkingConfig should be set") + assert.True(t, config.ThinkingConfig.IncludeThoughts, "IncludeThoughts should be true") + + // Verify level-based thinking is used + assert.Equal(t, tt.expectThinkingLevel, config.ThinkingConfig.ThinkingLevel, "ThinkingLevel should match") + }) + } +} + +func TestBuildConfig_NoThinkingBudget(t *testing.T) { + t.Parallel() + + client := &Client{ + Config: base.Config{ + ModelConfig: latest.ModelConfig{ + Provider: "google", + Model: "gemini-2.5-flash", + ThinkingBudget: nil, // No thinking budget set + }, + }, + } + + config := client.buildConfig() + + // When no ThinkingBudget is set, ThinkingConfig should not be configured + assert.Nil(t, config.ThinkingConfig, "ThinkingConfig should not be set when ThinkingBudget is nil") +} + +func TestBuildConfig_Gemini3_FallbackToTokens(t *testing.T) { + t.Parallel() + + // Test that Gemini 3 with tokens (not effort) falls back to token-based config + client := &Client{ + Config: base.Config{ + ModelConfig: latest.ModelConfig{ + Provider: "google", + Model: "gemini-3-pro", + ThinkingBudget: &latest.ThinkingBudget{Tokens: 8192}, // Tokens instead of effort + }, + }, + } + + config := client.buildConfig() + + require.NotNil(t, config.ThinkingConfig, "ThinkingConfig should be set") + assert.True(t, config.ThinkingConfig.IncludeThoughts, "IncludeThoughts should be true") + + // Should fall back to token-based config + require.NotNil(t, config.ThinkingConfig.ThinkingBudget, "ThinkingBudget should be set as fallback") + assert.Equal(t, int32(8192), *config.ThinkingConfig.ThinkingBudget, "ThinkingBudget tokens should match") +} + +func TestBuildConfig_Gemini3_DefaultEffort(t *testing.T) { + t.Parallel() + + // Test that Gemini 3 with no effort and no tokens defaults to high + client := &Client{ + Config: base.Config{ + ModelConfig: latest.ModelConfig{ + Provider: "google", + Model: "gemini-3-pro", + ThinkingBudget: &latest.ThinkingBudget{}, // Empty ThinkingBudget + }, + }, + } + + config := client.buildConfig() + + require.NotNil(t, config.ThinkingConfig, "ThinkingConfig should be set") + assert.True(t, config.ThinkingConfig.IncludeThoughts, "IncludeThoughts should be true") + + // Should default to high level + assert.Equal(t, genai.ThinkingLevelHigh, config.ThinkingConfig.ThinkingLevel, "Should default to high thinking level") +} + +func TestBuildConfig_CaseInsensitiveModel(t *testing.T) { + t.Parallel() + + // Test that model name matching is case-insensitive + tests := []struct { + name string + model string + expectThinkingLevel genai.ThinkingLevel + }{ + { + name: "uppercase GEMINI-3-PRO", + model: "GEMINI-3-PRO", + expectThinkingLevel: genai.ThinkingLevelHigh, + }, + { + name: "mixed case Gemini-3-Flash", + model: "Gemini-3-Flash", + expectThinkingLevel: genai.ThinkingLevelMedium, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + + client := &Client{ + Config: base.Config{ + ModelConfig: latest.ModelConfig{ + Provider: "google", + Model: tt.model, + ThinkingBudget: &latest.ThinkingBudget{Effort: "high"}, + }, + }, + } + + // For mixed case flash model, use medium + if tt.model == "Gemini-3-Flash" { + client.ModelConfig.ThinkingBudget = &latest.ThinkingBudget{Effort: "medium"} + } + + config := client.buildConfig() + + require.NotNil(t, config.ThinkingConfig, "ThinkingConfig should be set") + assert.Equal(t, tt.expectThinkingLevel, config.ThinkingConfig.ThinkingLevel, "ThinkingLevel should match") + }) + } +} + +// ptr is a helper to create a pointer to an int32 value. +func ptr(v int32) *int32 { + return &v +} diff --git a/pkg/model/provider/model_defaults_test.go b/pkg/model/provider/model_defaults_test.go new file mode 100644 index 000000000..7e5c8290d --- /dev/null +++ b/pkg/model/provider/model_defaults_test.go @@ -0,0 +1,678 @@ +package provider + +import ( + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/docker/cagent/pkg/config/latest" +) + +// TestApplyModelDefaults_OpenAI tests that OpenAI models get the correct default thinking_budget. +func TestApplyModelDefaults_OpenAI(t *testing.T) { + t.Parallel() + + tests := []struct { + name string + config *latest.ModelConfig + expectThinkingBudget *latest.ThinkingBudget + expectProviderOptsKeys []string + }{ + { + name: "openai provider gets medium thinking_budget default", + config: &latest.ModelConfig{ + Provider: "openai", + Model: "gpt-4o", + }, + expectThinkingBudget: &latest.ThinkingBudget{Effort: "medium"}, + }, + { + name: "openai_chatcompletions api_type gets medium thinking_budget default", + config: &latest.ModelConfig{ + Provider: "custom", + Model: "custom-model", + ProviderOpts: map[string]any{"api_type": "openai_chatcompletions"}, + }, + expectThinkingBudget: &latest.ThinkingBudget{Effort: "medium"}, + }, + { + name: "openai_responses api_type gets medium thinking_budget default", + config: &latest.ModelConfig{ + Provider: "custom", + Model: "custom-model", + ProviderOpts: map[string]any{"api_type": "openai_responses"}, + }, + expectThinkingBudget: &latest.ThinkingBudget{Effort: "medium"}, + }, + { + name: "mistral alias (openai) gets medium thinking_budget default", + config: &latest.ModelConfig{ + Provider: "mistral", + Model: "mistral-large-latest", + }, + expectThinkingBudget: &latest.ThinkingBudget{Effort: "medium"}, + }, + { + name: "xai alias (openai) gets medium thinking_budget default", + config: &latest.ModelConfig{ + Provider: "xai", + Model: "grok-2", + }, + expectThinkingBudget: &latest.ThinkingBudget{Effort: "medium"}, + }, + { + name: "explicit thinking_budget is preserved", + config: &latest.ModelConfig{ + Provider: "openai", + Model: "gpt-4o", + ThinkingBudget: &latest.ThinkingBudget{Effort: "high"}, + }, + expectThinkingBudget: &latest.ThinkingBudget{Effort: "high"}, + }, + { + name: "explicit thinking_budget with tokens is preserved", + config: &latest.ModelConfig{ + Provider: "openai", + Model: "gpt-4o", + ThinkingBudget: &latest.ThinkingBudget{Tokens: 5000}, + }, + expectThinkingBudget: &latest.ThinkingBudget{Tokens: 5000}, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + + // Apply defaults + applyModelDefaults(tt.config) + + // Verify thinking budget + require.NotNil(t, tt.config.ThinkingBudget, "ThinkingBudget should be set") + assert.Equal(t, tt.expectThinkingBudget.Effort, tt.config.ThinkingBudget.Effort, "Effort should match") + assert.Equal(t, tt.expectThinkingBudget.Tokens, tt.config.ThinkingBudget.Tokens, "Tokens should match") + }) + } +} + +// TestApplyModelDefaults_Anthropic tests that Anthropic models get the correct defaults. +func TestApplyModelDefaults_Anthropic(t *testing.T) { + t.Parallel() + + tests := []struct { + name string + config *latest.ModelConfig + expectThinkingBudget *latest.ThinkingBudget + expectInterleavedThinking bool + expectExplicitInterleaved bool // true if we expect an explicit value in ProviderOpts + }{ + { + name: "anthropic provider gets 8192 thinking_budget default", + config: &latest.ModelConfig{ + Provider: "anthropic", + Model: "claude-sonnet-4-0", + }, + expectThinkingBudget: &latest.ThinkingBudget{Tokens: 8192}, + expectInterleavedThinking: true, + expectExplicitInterleaved: true, + }, + { + name: "anthropic provider with no initial ProviderOpts", + config: &latest.ModelConfig{ + Provider: "anthropic", + Model: "claude-opus-4-0", + }, + expectThinkingBudget: &latest.ThinkingBudget{Tokens: 8192}, + expectInterleavedThinking: true, + expectExplicitInterleaved: true, + }, + { + name: "explicit thinking_budget is preserved", + config: &latest.ModelConfig{ + Provider: "anthropic", + Model: "claude-sonnet-4-0", + ThinkingBudget: &latest.ThinkingBudget{Tokens: 16384}, + }, + expectThinkingBudget: &latest.ThinkingBudget{Tokens: 16384}, + expectInterleavedThinking: true, + expectExplicitInterleaved: true, + }, + { + name: "explicit interleaved_thinking false is preserved", + config: &latest.ModelConfig{ + Provider: "anthropic", + Model: "claude-sonnet-4-0", + ProviderOpts: map[string]any{"interleaved_thinking": false}, + }, + expectThinkingBudget: &latest.ThinkingBudget{Tokens: 8192}, + expectInterleavedThinking: false, + expectExplicitInterleaved: true, + }, + { + name: "explicit interleaved_thinking true is preserved", + config: &latest.ModelConfig{ + Provider: "anthropic", + Model: "claude-sonnet-4-0", + ProviderOpts: map[string]any{"interleaved_thinking": true}, + }, + expectThinkingBudget: &latest.ThinkingBudget{Tokens: 8192}, + expectInterleavedThinking: true, + expectExplicitInterleaved: true, + }, + { + name: "existing ProviderOpts are preserved", + config: &latest.ModelConfig{ + Provider: "anthropic", + Model: "claude-sonnet-4-0", + ProviderOpts: map[string]any{"some_other_option": "value"}, + }, + expectThinkingBudget: &latest.ThinkingBudget{Tokens: 8192}, + expectInterleavedThinking: true, + expectExplicitInterleaved: true, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + + // Save original ProviderOpts keys to check preservation + originalOpts := make(map[string]any) + if tt.config.ProviderOpts != nil { + for k, v := range tt.config.ProviderOpts { + originalOpts[k] = v + } + } + + // Apply defaults + applyModelDefaults(tt.config) + + // Verify thinking budget + require.NotNil(t, tt.config.ThinkingBudget, "ThinkingBudget should be set") + assert.Equal(t, tt.expectThinkingBudget.Tokens, tt.config.ThinkingBudget.Tokens, "Tokens should match") + + // Verify interleaved_thinking + if tt.expectExplicitInterleaved { + require.NotNil(t, tt.config.ProviderOpts, "ProviderOpts should be set") + val, exists := tt.config.ProviderOpts["interleaved_thinking"] + require.True(t, exists, "interleaved_thinking should be set in ProviderOpts") + assert.Equal(t, tt.expectInterleavedThinking, val, "interleaved_thinking should match expected value") + } + + // Verify original ProviderOpts are preserved + for k, v := range originalOpts { + if k != "interleaved_thinking" { + assert.Equal(t, v, tt.config.ProviderOpts[k], "original ProviderOpts key %s should be preserved", k) + } + } + }) + } +} + +// TestApplyModelDefaults_Google tests that Google Gemini models get the correct defaults. +func TestApplyModelDefaults_Google(t *testing.T) { + t.Parallel() + + tests := []struct { + name string + config *latest.ModelConfig + expectThinkingBudget *latest.ThinkingBudget + expectNoDefault bool // true if no default should be applied + }{ + { + name: "gemini-2.5-flash gets dynamic thinking default (-1)", + config: &latest.ModelConfig{ + Provider: "google", + Model: "gemini-2.5-flash", + }, + expectThinkingBudget: &latest.ThinkingBudget{Tokens: -1}, + }, + { + name: "gemini-2.5-pro gets dynamic thinking default (-1)", + config: &latest.ModelConfig{ + Provider: "google", + Model: "gemini-2.5-pro", + }, + expectThinkingBudget: &latest.ThinkingBudget{Tokens: -1}, + }, + { + name: "gemini-2.5-flash-lite gets dynamic thinking default (-1)", + config: &latest.ModelConfig{ + Provider: "google", + Model: "gemini-2.5-flash-lite", + }, + expectThinkingBudget: &latest.ThinkingBudget{Tokens: -1}, + }, + { + name: "gemini-3-pro gets high thinking level default", + config: &latest.ModelConfig{ + Provider: "google", + Model: "gemini-3-pro", + }, + expectThinkingBudget: &latest.ThinkingBudget{Effort: "high"}, + }, + { + name: "gemini-3-pro-preview gets high thinking level default", + config: &latest.ModelConfig{ + Provider: "google", + Model: "gemini-3-pro-preview", + }, + expectThinkingBudget: &latest.ThinkingBudget{Effort: "high"}, + }, + { + name: "gemini-3-flash gets medium thinking level default", + config: &latest.ModelConfig{ + Provider: "google", + Model: "gemini-3-flash", + }, + expectThinkingBudget: &latest.ThinkingBudget{Effort: "medium"}, + }, + { + name: "gemini-3-flash-preview gets medium thinking level default", + config: &latest.ModelConfig{ + Provider: "google", + Model: "gemini-3-flash-preview", + }, + expectThinkingBudget: &latest.ThinkingBudget{Effort: "medium"}, + }, + { + name: "gemini-2.0-flash is not affected (old model)", + config: &latest.ModelConfig{ + Provider: "google", + Model: "gemini-2.0-flash", + }, + expectNoDefault: true, + }, + { + name: "gemini-1.5-pro is not affected (old model)", + config: &latest.ModelConfig{ + Provider: "google", + Model: "gemini-1.5-pro", + }, + expectNoDefault: true, + }, + { + name: "explicit thinking_budget is preserved for gemini-2.5", + config: &latest.ModelConfig{ + Provider: "google", + Model: "gemini-2.5-flash", + ThinkingBudget: &latest.ThinkingBudget{Tokens: 8192}, + }, + expectThinkingBudget: &latest.ThinkingBudget{Tokens: 8192}, + }, + { + name: "explicit thinking_budget is preserved for gemini-3", + config: &latest.ModelConfig{ + Provider: "google", + Model: "gemini-3-pro", + ThinkingBudget: &latest.ThinkingBudget{Effort: "low"}, + }, + expectThinkingBudget: &latest.ThinkingBudget{Effort: "low"}, + }, + { + name: "explicit thinking_budget 0 (disabled) is preserved", + config: &latest.ModelConfig{ + Provider: "google", + Model: "gemini-2.5-flash", + ThinkingBudget: &latest.ThinkingBudget{Tokens: 0}, + }, + expectThinkingBudget: &latest.ThinkingBudget{Tokens: 0}, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + + // Apply defaults + applyModelDefaults(tt.config) + + if tt.expectNoDefault { + assert.Nil(t, tt.config.ThinkingBudget, "ThinkingBudget should not be set for old Gemini model") + return + } + + // Verify thinking budget + require.NotNil(t, tt.config.ThinkingBudget, "ThinkingBudget should be set") + assert.Equal(t, tt.expectThinkingBudget.Effort, tt.config.ThinkingBudget.Effort, "Effort should match") + assert.Equal(t, tt.expectThinkingBudget.Tokens, tt.config.ThinkingBudget.Tokens, "Tokens should match") + }) + } +} + +// TestApplyModelDefaults_Bedrock tests that Amazon Bedrock Claude models get the correct defaults. +func TestApplyModelDefaults_Bedrock(t *testing.T) { + t.Parallel() + + tests := []struct { + name string + config *latest.ModelConfig + expectThinkingBudget *latest.ThinkingBudget + expectInterleavedThinking bool + expectExplicitInterleaved bool // true if we expect an explicit value in ProviderOpts + expectNoDefault bool // true if no default should be applied + }{ + { + name: "bedrock claude model gets defaults", + config: &latest.ModelConfig{ + Provider: "amazon-bedrock", + Model: "anthropic.claude-3-sonnet", + }, + expectThinkingBudget: &latest.ThinkingBudget{Tokens: 8192}, + expectInterleavedThinking: true, + expectExplicitInterleaved: true, + }, + { + name: "bedrock claude-sonnet-4 model gets defaults", + config: &latest.ModelConfig{ + Provider: "amazon-bedrock", + Model: "anthropic.claude-sonnet-4-20250514-v1:0", + }, + expectThinkingBudget: &latest.ThinkingBudget{Tokens: 8192}, + expectInterleavedThinking: true, + expectExplicitInterleaved: true, + }, + { + name: "bedrock global claude model gets defaults", + config: &latest.ModelConfig{ + Provider: "amazon-bedrock", + Model: "global.anthropic.claude-sonnet-4-5-20250929-v1:0", + }, + expectThinkingBudget: &latest.ThinkingBudget{Tokens: 8192}, + expectInterleavedThinking: true, + expectExplicitInterleaved: true, + }, + { + name: "bedrock claude opus model gets defaults", + config: &latest.ModelConfig{ + Provider: "amazon-bedrock", + Model: "anthropic.claude-opus-4-0", + }, + expectThinkingBudget: &latest.ThinkingBudget{Tokens: 8192}, + expectInterleavedThinking: true, + expectExplicitInterleaved: true, + }, + { + name: "bedrock non-claude model is not affected", + config: &latest.ModelConfig{ + Provider: "amazon-bedrock", + Model: "amazon.titan-text-express-v1", + }, + expectNoDefault: true, + }, + { + name: "bedrock mistral model is not affected", + config: &latest.ModelConfig{ + Provider: "amazon-bedrock", + Model: "mistral.mistral-large-latest", + }, + expectNoDefault: true, + }, + { + name: "explicit thinking_budget is preserved", + config: &latest.ModelConfig{ + Provider: "amazon-bedrock", + Model: "anthropic.claude-3-sonnet", + ThinkingBudget: &latest.ThinkingBudget{Tokens: 16384}, + }, + expectThinkingBudget: &latest.ThinkingBudget{Tokens: 16384}, + expectInterleavedThinking: true, + expectExplicitInterleaved: true, + }, + { + name: "explicit interleaved_thinking false is preserved", + config: &latest.ModelConfig{ + Provider: "amazon-bedrock", + Model: "anthropic.claude-3-sonnet", + ProviderOpts: map[string]any{"interleaved_thinking": false}, + }, + expectThinkingBudget: &latest.ThinkingBudget{Tokens: 8192}, + expectInterleavedThinking: false, + expectExplicitInterleaved: true, + }, + { + name: "existing ProviderOpts are preserved", + config: &latest.ModelConfig{ + Provider: "amazon-bedrock", + Model: "anthropic.claude-3-sonnet", + ProviderOpts: map[string]any{"region": "us-west-2"}, + }, + expectThinkingBudget: &latest.ThinkingBudget{Tokens: 8192}, + expectInterleavedThinking: true, + expectExplicitInterleaved: true, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + + // Save original ProviderOpts keys to check preservation + originalOpts := make(map[string]any) + if tt.config.ProviderOpts != nil { + for k, v := range tt.config.ProviderOpts { + originalOpts[k] = v + } + } + + // Apply defaults + applyModelDefaults(tt.config) + + if tt.expectNoDefault { + assert.Nil(t, tt.config.ThinkingBudget, "ThinkingBudget should not be set for non-Claude Bedrock model") + if tt.config.ProviderOpts != nil { + _, exists := tt.config.ProviderOpts["interleaved_thinking"] + assert.False(t, exists, "interleaved_thinking should not be set for non-Claude Bedrock model") + } + return + } + + // Verify thinking budget + require.NotNil(t, tt.config.ThinkingBudget, "ThinkingBudget should be set") + assert.Equal(t, tt.expectThinkingBudget.Tokens, tt.config.ThinkingBudget.Tokens, "Tokens should match") + + // Verify interleaved_thinking + if tt.expectExplicitInterleaved { + require.NotNil(t, tt.config.ProviderOpts, "ProviderOpts should be set") + val, exists := tt.config.ProviderOpts["interleaved_thinking"] + require.True(t, exists, "interleaved_thinking should be set in ProviderOpts") + assert.Equal(t, tt.expectInterleavedThinking, val, "interleaved_thinking should match expected value") + } + + // Verify original ProviderOpts are preserved + for k, v := range originalOpts { + if k != "interleaved_thinking" { + assert.Equal(t, v, tt.config.ProviderOpts[k], "original ProviderOpts key %s should be preserved", k) + } + } + }) + } +} + +// TestApplyModelDefaults_NonAffectedProviders tests that other providers are not affected. +func TestApplyModelDefaults_NonAffectedProviders(t *testing.T) { + t.Parallel() + + tests := []struct { + name string + config *latest.ModelConfig + }{ + { + name: "google gemini-2.0-flash is not affected (old model)", + config: &latest.ModelConfig{ + Provider: "google", + Model: "gemini-2.0-flash", + }, + }, + { + name: "dmr provider is not affected", + config: &latest.ModelConfig{ + Provider: "dmr", + Model: "ai/llama3.2", + }, + }, + { + name: "amazon-bedrock non-claude model is not affected", + config: &latest.ModelConfig{ + Provider: "amazon-bedrock", + Model: "amazon.titan-text-express-v1", + }, + }, + { + name: "unknown provider is not affected", + config: &latest.ModelConfig{ + Provider: "unknown", + Model: "some-model", + }, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + + // Apply defaults + applyModelDefaults(tt.config) + + // Verify thinking_budget is NOT set + assert.Nil(t, tt.config.ThinkingBudget, "ThinkingBudget should not be set for non-affected provider") + + // Verify interleaved_thinking is NOT set + if tt.config.ProviderOpts != nil { + _, exists := tt.config.ProviderOpts["interleaved_thinking"] + assert.False(t, exists, "interleaved_thinking should not be set for non-affected provider") + } + }) + } +} + +// TestApplyProviderDefaults_IncludesModelDefaults tests that applyProviderDefaults +// also applies model-specific defaults via applyModelDefaults. +func TestApplyProviderDefaults_IncludesModelDefaults(t *testing.T) { + t.Parallel() + + tests := []struct { + name string + config *latest.ModelConfig + customProviders map[string]latest.ProviderConfig + expectThinkingBudget *latest.ThinkingBudget + expectInterleavedThinking *bool + }{ + { + name: "openai model from config gets defaults", + config: &latest.ModelConfig{ + Provider: "openai", + Model: "gpt-4o", + }, + expectThinkingBudget: &latest.ThinkingBudget{Effort: "medium"}, + }, + { + name: "anthropic model from config gets defaults", + config: &latest.ModelConfig{ + Provider: "anthropic", + Model: "claude-sonnet-4-0", + }, + expectThinkingBudget: &latest.ThinkingBudget{Tokens: 8192}, + expectInterleavedThinking: boolPtr(true), + }, + { + name: "google gemini-2.5 model gets defaults", + config: &latest.ModelConfig{ + Provider: "google", + Model: "gemini-2.5-flash", + }, + expectThinkingBudget: &latest.ThinkingBudget{Tokens: -1}, + }, + { + name: "google gemini-3-pro model gets defaults", + config: &latest.ModelConfig{ + Provider: "google", + Model: "gemini-3-pro", + }, + expectThinkingBudget: &latest.ThinkingBudget{Effort: "high"}, + }, + { + name: "google gemini-3-flash model gets defaults", + config: &latest.ModelConfig{ + Provider: "google", + Model: "gemini-3-flash", + }, + expectThinkingBudget: &latest.ThinkingBudget{Effort: "medium"}, + }, + { + name: "bedrock claude model gets defaults", + config: &latest.ModelConfig{ + Provider: "amazon-bedrock", + Model: "anthropic.claude-3-sonnet", + }, + expectThinkingBudget: &latest.ThinkingBudget{Tokens: 8192}, + expectInterleavedThinking: boolPtr(true), + }, + { + name: "bedrock global claude model gets defaults", + config: &latest.ModelConfig{ + Provider: "amazon-bedrock", + Model: "global.anthropic.claude-sonnet-4-5-20250929-v1:0", + }, + expectThinkingBudget: &latest.ThinkingBudget{Tokens: 8192}, + expectInterleavedThinking: boolPtr(true), + }, + { + name: "custom provider with openai api_type gets openai defaults", + config: &latest.ModelConfig{ + Provider: "my_gateway", + Model: "gpt-4o", + }, + customProviders: map[string]latest.ProviderConfig{ + "my_gateway": { + APIType: "openai_chatcompletions", + BaseURL: "https://api.example.com/v1", + TokenKey: "MY_KEY", + }, + }, + expectThinkingBudget: &latest.ThinkingBudget{Effort: "medium"}, + }, + { + name: "custom provider with anthropic api_type gets anthropic defaults", + config: &latest.ModelConfig{ + Provider: "my_anthropic_gateway", + Model: "claude-sonnet-4-0", + ProviderOpts: map[string]any{ + "api_type": "anthropic", + }, + }, + customProviders: nil, + expectThinkingBudget: &latest.ThinkingBudget{Tokens: 8192}, + expectInterleavedThinking: boolPtr(true), + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + + result := applyProviderDefaults(tt.config, tt.customProviders) + + // Verify thinking budget + if tt.expectThinkingBudget != nil { + require.NotNil(t, result.ThinkingBudget, "ThinkingBudget should be set") + assert.Equal(t, tt.expectThinkingBudget.Effort, result.ThinkingBudget.Effort, "Effort should match") + assert.Equal(t, tt.expectThinkingBudget.Tokens, result.ThinkingBudget.Tokens, "Tokens should match") + } + + // Verify interleaved_thinking for Anthropic + if tt.expectInterleavedThinking != nil { + require.NotNil(t, result.ProviderOpts, "ProviderOpts should be set") + val, exists := result.ProviderOpts["interleaved_thinking"] + require.True(t, exists, "interleaved_thinking should be set") + assert.Equal(t, *tt.expectInterleavedThinking, val, "interleaved_thinking should match") + } + }) + } +} + +// boolPtr is a helper to create a pointer to a bool value. +func boolPtr(b bool) *bool { + return &b +} diff --git a/pkg/model/provider/provider.go b/pkg/model/provider/provider.go index 01ef59713..bede7115f 100644 --- a/pkg/model/provider/provider.go +++ b/pkg/model/provider/provider.go @@ -302,6 +302,7 @@ func applyProviderDefaults(cfg *latest.ModelConfig, customProviders map[string]l enhancedCfg.ProviderOpts["api_type"] = apiType } + applyModelDefaults(&enhancedCfg) return &enhancedCfg } } @@ -318,5 +319,164 @@ func applyProviderDefaults(cfg *latest.ModelConfig, customProviders map[string]l } } + // Apply model-specific defaults + applyModelDefaults(&enhancedCfg) return &enhancedCfg } + +// applyModelDefaults applies provider-specific default values for model configuration. +// These defaults are applied only if the user hasn't explicitly set the values. +// +// NOTE: max_tokens is NOT set here because: +// 1. Different providers read it differently (ModelConfig vs ModelOptions) +// 2. Runtime can do modelsdev lookups for model-specific limits +// 3. Providers have their own fallbacks (e.g., Anthropic defaults to 8192) +// max_tokens defaults are handled in teamloader and runtime/model_switcher via options. +// +// Config-level defaults (set here): +// - OpenAI: thinking_budget = "medium" +// - Anthropic: thinking_budget = 8192, interleaved_thinking = true +// - Google: Gemini 2.5 → thinking_budget = -1 (dynamic), Gemini 3 Pro → "high", Gemini 3 Flash → "medium" +// - Amazon Bedrock (Claude models only): thinking_budget = 8192, interleaved_thinking = true +func applyModelDefaults(cfg *latest.ModelConfig) { + // Resolve the actual provider type (handling aliases like mistral -> openai) + providerType := cfg.Provider + if alias, exists := Aliases[cfg.Provider]; exists && alias.APIType != "" { + providerType = alias.APIType + } + // Also check for api_type override in ProviderOpts + if cfg.ProviderOpts != nil { + if apiType, ok := cfg.ProviderOpts["api_type"].(string); ok && apiType != "" { + providerType = apiType + } + } + + switch providerType { + case "openai", "openai_chatcompletions", "openai_responses": + applyOpenAIDefaults(cfg) + case "anthropic": + applyAnthropicDefaults(cfg) + case "google": + applyGoogleDefaults(cfg) + case "amazon-bedrock": + applyBedrockDefaults(cfg) + } +} + +// applyOpenAIDefaults applies default configuration for OpenAI models. +func applyOpenAIDefaults(cfg *latest.ModelConfig) { + // Default thinking_budget to "medium" if not set + if cfg.ThinkingBudget == nil { + cfg.ThinkingBudget = &latest.ThinkingBudget{Effort: "medium"} + slog.Debug("Applied default thinking_budget for OpenAI", + "provider", cfg.Provider, + "model", cfg.Model, + "thinking_budget", "medium", + ) + } +} + +// applyAnthropicDefaults applies default configuration for Anthropic models. +func applyAnthropicDefaults(cfg *latest.ModelConfig) { + // Default thinking_budget to 8192 tokens if not set + if cfg.ThinkingBudget == nil { + cfg.ThinkingBudget = &latest.ThinkingBudget{Tokens: 8192} + slog.Debug("Applied default thinking_budget for Anthropic", + "provider", cfg.Provider, + "model", cfg.Model, + "thinking_budget", 8192, + ) + } + + // Default interleaved_thinking to true if not set + if cfg.ProviderOpts == nil { + cfg.ProviderOpts = make(map[string]any) + } + if _, has := cfg.ProviderOpts["interleaved_thinking"]; !has { + cfg.ProviderOpts["interleaved_thinking"] = true + slog.Debug("Applied default interleaved_thinking for Anthropic", + "provider", cfg.Provider, + "model", cfg.Model, + "interleaved_thinking", true, + ) + } +} + +// applyGoogleDefaults applies default configuration for Google Gemini models. +// - Gemini 2.5 models: thinking_budget = -1 (dynamic thinking) +// - Gemini 3 Pro models: thinking_budget effort = "high" +// - Gemini 3 Flash models: thinking_budget effort = "medium" +func applyGoogleDefaults(cfg *latest.ModelConfig) { + if cfg.ThinkingBudget != nil { + return // User explicitly set thinking_budget + } + + model := strings.ToLower(cfg.Model) + + switch { + case strings.HasPrefix(model, "gemini-2.5-"): + // Gemini 2.5 models use token-based thinking budget (-1 = dynamic) + cfg.ThinkingBudget = &latest.ThinkingBudget{Tokens: -1} + slog.Debug("Applied default thinking_budget for Google Gemini 2.5", + "provider", cfg.Provider, + "model", cfg.Model, + "thinking_budget", -1, + ) + case strings.HasPrefix(model, "gemini-3-pro"): + // Gemini 3 Pro models use level-based thinking (high) + cfg.ThinkingBudget = &latest.ThinkingBudget{Effort: "high"} + slog.Debug("Applied default thinking_budget for Google Gemini 3 Pro", + "provider", cfg.Provider, + "model", cfg.Model, + "thinking_budget", "high", + ) + case strings.HasPrefix(model, "gemini-3-flash"): + // Gemini 3 Flash models use level-based thinking (medium) + cfg.ThinkingBudget = &latest.ThinkingBudget{Effort: "medium"} + slog.Debug("Applied default thinking_budget for Google Gemini 3 Flash", + "provider", cfg.Provider, + "model", cfg.Model, + "thinking_budget", "medium", + ) + } + // For other Gemini models (e.g., gemini-2.0-*), leave unchanged +} + +// applyBedrockDefaults applies default configuration for Amazon Bedrock models. +// Only applies to Claude models (anthropic.claude-* or global.anthropic.claude-*). +func applyBedrockDefaults(cfg *latest.ModelConfig) { + // Only apply defaults for Claude models on Bedrock + if !isBedrockClaudeModel(cfg.Model) { + return + } + + // Default thinking_budget to 8192 tokens if not set + if cfg.ThinkingBudget == nil { + cfg.ThinkingBudget = &latest.ThinkingBudget{Tokens: 8192} + slog.Debug("Applied default thinking_budget for Bedrock Claude", + "provider", cfg.Provider, + "model", cfg.Model, + "thinking_budget", 8192, + ) + } + + // Default interleaved_thinking to true if not set + if cfg.ProviderOpts == nil { + cfg.ProviderOpts = make(map[string]any) + } + if _, has := cfg.ProviderOpts["interleaved_thinking"]; !has { + cfg.ProviderOpts["interleaved_thinking"] = true + slog.Debug("Applied default interleaved_thinking for Bedrock Claude", + "provider", cfg.Provider, + "model", cfg.Model, + "interleaved_thinking", true, + ) + } +} + +// isBedrockClaudeModel returns true if the model ID is a Claude model on Bedrock. +// Claude model IDs on Bedrock start with "anthropic.claude-" or "global.anthropic.claude-". +func isBedrockClaudeModel(model string) bool { + m := strings.ToLower(model) + return strings.HasPrefix(m, "anthropic.claude-") || strings.HasPrefix(m, "global.anthropic.claude-") +}