feat: add configurable auto-background threshold for bash tool (#2183)

Sean Porter and Andrey Nering created

Co-authored-by: Andrey Nering <andreynering@users.noreply.github.com>

Change summary

internal/agent/agent_test.go                                                       |   2 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/bash_tool.yaml             |  61 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/download_tool.yaml         |  61 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/fetch_tool.yaml            |  67 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/glob_tool.yaml             |  32 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/grep_tool.yaml             |  32 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/ls_tool.yaml               |  32 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/multiedit_tool.yaml        |  49 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/parallel_tool_calls.yaml   |  66 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/read_a_file.yaml           |  47 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/simple_test.yaml           |  32 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/sourcegraph_tool.yaml      |  58 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/update_a_file.yaml         |  47 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/write_tool.yaml            |  60 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/bash_tool.yaml                 |  24 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/download_tool.yaml             |  26 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/fetch_tool.yaml                |  30 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/glob_tool.yaml                 |  28 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/grep_tool.yaml                 |  32 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/ls_tool.yaml                   |  28 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/multiedit_tool.yaml            |  40 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/parallel_tool_calls.yaml       |  26 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/read_a_file.yaml               |  20 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/simple_test.yaml               |  16 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/sourcegraph_tool.yaml          |  34 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/update_a_file.yaml             |  30 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/write_tool.yaml                |  24 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/bash_tool.yaml           |  18 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/download_tool.yaml       |  22 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/fetch_tool.yaml          |  16 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/glob_tool.yaml           |  28 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/grep_tool.yaml           |  24 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/ls_tool.yaml             |  22 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/multiedit_tool.yaml      |  18 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/parallel_tool_calls.yaml |  26 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/read_a_file.yaml         |  16 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/simple_test.yaml         |  10 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/sourcegraph_tool.yaml    |  28 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/update_a_file.yaml       |  16 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/write_tool.yaml          |  16 
internal/agent/testdata/TestCoderAgent/zai-glm4.6/bash_tool.yaml                   |  22 
internal/agent/testdata/TestCoderAgent/zai-glm4.6/download_tool.yaml               |  18 
internal/agent/testdata/TestCoderAgent/zai-glm4.6/fetch_tool.yaml                  |  22 
internal/agent/testdata/TestCoderAgent/zai-glm4.6/glob_tool.yaml                   |  20 
internal/agent/testdata/TestCoderAgent/zai-glm4.6/grep_tool.yaml                   |  18 
internal/agent/testdata/TestCoderAgent/zai-glm4.6/ls_tool.yaml                     |  18 
internal/agent/testdata/TestCoderAgent/zai-glm4.6/multiedit_tool.yaml              |  22 
internal/agent/testdata/TestCoderAgent/zai-glm4.6/parallel_tool_calls.yaml         |  24 
internal/agent/testdata/TestCoderAgent/zai-glm4.6/read_a_file.yaml                 |  16 
internal/agent/testdata/TestCoderAgent/zai-glm4.6/simple_test.yaml                 |  12 
internal/agent/testdata/TestCoderAgent/zai-glm4.6/sourcegraph_tool.yaml            |  22 
internal/agent/testdata/TestCoderAgent/zai-glm4.6/update_a_file.yaml               |  22 
internal/agent/testdata/TestCoderAgent/zai-glm4.6/write_tool.yaml                  |  22 
internal/agent/tools/bash.go                                                       |  29 
internal/agent/tools/bash.tpl                                                      |   2 
internal/agent/tools/bash_test.go                                                  | 103 
56 files changed, 767 insertions(+), 889 deletions(-)

Detailed changes

internal/agent/agent_test.go 🔗

@@ -20,7 +20,7 @@ import (
 )
 
 var modelPairs = []modelPair{
-	{"anthropic-sonnet", anthropicBuilder("claude-sonnet-4-5-20250929"), anthropicBuilder("claude-3-5-haiku-20241022")},
+	{"anthropic-sonnet", anthropicBuilder("claude-sonnet-4-6"), anthropicBuilder("claude-haiku-4-5-20251001")},
 	{"openai-gpt-5", openaiBuilder("gpt-5"), openaiBuilder("gpt-4o")},
 	{"openrouter-kimi-k2", openRouterBuilder("moonshotai/kimi-k2-0905"), openRouterBuilder("qwen/qwen3-next-80b-a3b-instruct")},
 	{"zai-glm4.6", zAIBuilder("glm-4.6"), zAIBuilder("glm-4.5-air")},

internal/agent/testdata/TestCoderAgent/anthropic-sonnet/bash_tool.yaml 🔗

@@ -8,39 +8,7 @@ interactions:
     proto_minor: 1
     content_length: 802
     host: ""
-    body: '{"max_tokens":40,"messages":[{"content":[{"text":"Generate a concise title for the following content:\n\nuse bash to create a file named test.txt with content ''hello bash''. do not print its timestamp\n \u003cthink\u003e\n\n\u003c/think\u003e","type":"text"}],"role":"user"}],"model":"claude-3-5-haiku-20241022","system":[{"text":"you will generate a short title based on the first message a user begins a conversation with\n\n\u003crules\u003e\n- ensure it is not more than 50 characters long\n- the title should be a summary of the user''s message\n- it should be one line long\n- do not use quotes or colons\n- the entire text you return will be used as the title\n- never return anything that is more than one sentence (one line) long\n\u003c/rules\u003e\n\n /no_think","type":"text"}],"stream":true}'
-    headers:
-      Accept:
-      - application/json
-      Content-Type:
-      - application/json
-      User-Agent:
-      - Charm-Crush/devel (https://charm.land/crush)
-    url: https://api.anthropic.com/v1/messages
-    method: POST
-  response:
-    proto: HTTP/2.0
-    proto_major: 2
-    proto_minor: 0
-    content_length: -1
-    uncompressed: true
-    body: '{"type":"error","error":{"type":"not_found_error","message":"model: claude-3-5-haiku-20241022"},"request_id":"req_011CYyXdxzmDJW29DZnUPMyr"}'
-    headers:
-      Content-Type:
-      - application/json
-      content-type:
-      - application/json
-    status: 404 Not Found
-    code: 404
-    duration: 173.08825ms
-- id: 1
-  request:
-    proto: HTTP/1.1
-    proto_major: 1
-    proto_minor: 1
-    content_length: 803
-    host: ""
-    body: '{"max_tokens":40,"messages":[{"content":[{"text":"Generate a concise title for the following content:\n\nuse bash to create a file named test.txt with content ''hello bash''. do not print its timestamp\n \u003cthink\u003e\n\n\u003c/think\u003e","type":"text"}],"role":"user"}],"model":"claude-sonnet-4-5-20250929","system":[{"text":"you will generate a short title based on the first message a user begins a conversation with\n\n\u003crules\u003e\n- ensure it is not more than 50 characters long\n- the title should be a summary of the user''s message\n- it should be one line long\n- do not use quotes or colons\n- the entire text you return will be used as the title\n- never return anything that is more than one sentence (one line) long\n\u003c/rules\u003e\n\n /no_think","type":"text"}],"stream":true}'
+    body: '{"max_tokens":40,"messages":[{"content":[{"text":"Generate a concise title for the following content:\n\nuse bash to create a file named test.txt with content ''hello bash''. do not print its timestamp\n \u003cthink\u003e\n\n\u003c/think\u003e","type":"text"}],"role":"user"}],"model":"claude-haiku-4-5-20251001","system":[{"text":"you will generate a short title based on the first message a user begins a conversation with\n\n\u003crules\u003e\n- ensure it is not more than 50 characters long\n- the title should be a summary of the user''s message\n- it should be one line long\n- do not use quotes or colons\n- the entire text you return will be used as the title\n- never return anything that is more than one sentence (one line) long\n\u003c/rules\u003e\n\n /no_think","type":"text"}],"stream":true}'
     headers:
       Accept:
       - application/json
@@ -58,55 +26,52 @@ interactions:
     uncompressed: true
     body: |+
       event: message_start
-      data: {"type":"message_start","message":{"model":"claude-sonnet-4-5-20250929","id":"msg_01TE1i1AmaAxwUPdT2otPA1X","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":152,"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","inference_geo":"not_available"}}}
+      data: {"type":"message_start","message":{"model":"claude-haiku-4-5-20251001","id":"msg_01NCBUPGM1ZzefNsxK3oAZsz","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":152,"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","inference_geo":"not_available"}}     }
 
       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":"text","text":""}           }
 
       event: ping
       data: {"type": "ping"}
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Creating"} }
-
-      event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" test"}             }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Create"}         }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":".txt file"}          }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" test"}    }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" with hello"}  }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":".txt file"}        }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" bash content using"}   }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" with hello"}             }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" bash"}             }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" bash content"}  }
 
       event: content_block_stop
       data: {"type":"content_block_stop","index":0               }
 
       event: message_delta
-      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":152,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":14}  }
+      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":152,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":12}   }
 
       event: message_stop
-      data: {"type":"message_stop"}
+      data: {"type":"message_stop"      }
 
     headers:
       Content-Type:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 1.261465167s
-- id: 2
+    duration: 580.853041ms
+- id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 52393
+    content_length: 52585
     host: ""

internal/agent/testdata/TestCoderAgent/anthropic-sonnet/download_tool.yaml 🔗

@@ -8,39 +8,7 @@ interactions:
     proto_minor: 1
     content_length: 823
     host: ""
-    body: '{"max_tokens":40,"messages":[{"content":[{"text":"Generate a concise title for the following content:\n\ndownload the file from https://example-files.online-convert.com/document/txt/example.txt and save it as example.txt\n \u003cthink\u003e\n\n\u003c/think\u003e","type":"text"}],"role":"user"}],"model":"claude-3-5-haiku-20241022","system":[{"text":"you will generate a short title based on the first message a user begins a conversation with\n\n\u003crules\u003e\n- ensure it is not more than 50 characters long\n- the title should be a summary of the user''s message\n- it should be one line long\n- do not use quotes or colons\n- the entire text you return will be used as the title\n- never return anything that is more than one sentence (one line) long\n\u003c/rules\u003e\n\n /no_think","type":"text"}],"stream":true}'
-    headers:
-      Accept:
-      - application/json
-      Content-Type:
-      - application/json
-      User-Agent:
-      - Charm-Crush/devel (https://charm.land/crush)
-    url: https://api.anthropic.com/v1/messages
-    method: POST
-  response:
-    proto: HTTP/2.0
-    proto_major: 2
-    proto_minor: 0
-    content_length: -1
-    uncompressed: true
-    body: '{"type":"error","error":{"type":"not_found_error","message":"model: claude-3-5-haiku-20241022"},"request_id":"req_011CYyXeMNvEPho8gBeQ5CcG"}'
-    headers:
-      Content-Type:
-      - application/json
-      content-type:
-      - application/json
-    status: 404 Not Found
-    code: 404
-    duration: 187.927166ms
-- id: 1
-  request:
-    proto: HTTP/1.1
-    proto_major: 1
-    proto_minor: 1
-    content_length: 824
-    host: ""
-    body: '{"max_tokens":40,"messages":[{"content":[{"text":"Generate a concise title for the following content:\n\ndownload the file from https://example-files.online-convert.com/document/txt/example.txt and save it as example.txt\n \u003cthink\u003e\n\n\u003c/think\u003e","type":"text"}],"role":"user"}],"model":"claude-sonnet-4-5-20250929","system":[{"text":"you will generate a short title based on the first message a user begins a conversation with\n\n\u003crules\u003e\n- ensure it is not more than 50 characters long\n- the title should be a summary of the user''s message\n- it should be one line long\n- do not use quotes or colons\n- the entire text you return will be used as the title\n- never return anything that is more than one sentence (one line) long\n\u003c/rules\u003e\n\n /no_think","type":"text"}],"stream":true}'
+    body: '{"max_tokens":40,"messages":[{"content":[{"text":"Generate a concise title for the following content:\n\ndownload the file from https://example-files.online-convert.com/document/txt/example.txt and save it as example.txt\n \u003cthink\u003e\n\n\u003c/think\u003e","type":"text"}],"role":"user"}],"model":"claude-haiku-4-5-20251001","system":[{"text":"you will generate a short title based on the first message a user begins a conversation with\n\n\u003crules\u003e\n- ensure it is not more than 50 characters long\n- the title should be a summary of the user''s message\n- it should be one line long\n- do not use quotes or colons\n- the entire text you return will be used as the title\n- never return anything that is more than one sentence (one line) long\n\u003c/rules\u003e\n\n /no_think","type":"text"}],"stream":true}'
     headers:
       Accept:
       - application/json
@@ -58,52 +26,49 @@ interactions:
     uncompressed: true
     body: |+
       event: message_start
-      data: {"type":"message_start","message":{"model":"claude-sonnet-4-5-20250929","id":"msg_016Z8XV5wvjg7Xe1rxjm6oZb","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":160,"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","inference_geo":"not_available"}}  }
+      data: {"type":"message_start","message":{"model":"claude-haiku-4-5-20251001","id":"msg_01HcFVhDJ3LAx7YJAek2tnEX","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":160,"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","inference_geo":"not_available"}}          }
 
       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":"text","text":""}         }
 
       event: ping
       data: {"type": "ping"}
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Download"}        }
-
-      event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" and"}}
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Download"}         }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" save example"}              }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" and"}       }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":".txt from online"}  }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" save example"}             }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"-convert.com"}              }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":".txt file"}              }
 
       event: content_block_stop
-      data: {"type":"content_block_stop","index":0          }
+      data: {"type":"content_block_stop","index":0           }
 
       event: message_delta
-      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":160,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":15}         }
+      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":160,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":10}}
 
       event: message_stop
-      data: {"type":"message_stop"               }
+      data: {"type":"message_stop"            }
 
     headers:
       Content-Type:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 1.119027417s
-- id: 2
+    duration: 458.520167ms
+- id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 52418
+    content_length: 52610
     host: ""

internal/agent/testdata/TestCoderAgent/anthropic-sonnet/fetch_tool.yaml 🔗

@@ -8,39 +8,7 @@ interactions:
     proto_minor: 1
     content_length: 844
     host: ""
-    body: '{"max_tokens":40,"messages":[{"content":[{"text":"Generate a concise title for the following content:\n\nfetch the content from https://example-files.online-convert.com/website/html/example.html and tell me if it contains the word ''John Doe''\n \u003cthink\u003e\n\n\u003c/think\u003e","type":"text"}],"role":"user"}],"model":"claude-3-5-haiku-20241022","system":[{"text":"you will generate a short title based on the first message a user begins a conversation with\n\n\u003crules\u003e\n- ensure it is not more than 50 characters long\n- the title should be a summary of the user''s message\n- it should be one line long\n- do not use quotes or colons\n- the entire text you return will be used as the title\n- never return anything that is more than one sentence (one line) long\n\u003c/rules\u003e\n\n /no_think","type":"text"}],"stream":true}'
-    headers:
-      Accept:
-      - application/json
-      Content-Type:
-      - application/json
-      User-Agent:
-      - Charm-Crush/devel (https://charm.land/crush)
-    url: https://api.anthropic.com/v1/messages
-    method: POST
-  response:
-    proto: HTTP/2.0
-    proto_major: 2
-    proto_minor: 0
-    content_length: -1
-    uncompressed: true
-    body: '{"type":"error","error":{"type":"not_found_error","message":"model: claude-3-5-haiku-20241022"},"request_id":"req_011CYyXempLXFFGDDV6GVrjJ"}'
-    headers:
-      Content-Type:
-      - application/json
-      content-type:
-      - application/json
-    status: 404 Not Found
-    code: 404
-    duration: 178.712ms
-- id: 1
-  request:
-    proto: HTTP/1.1
-    proto_major: 1
-    proto_minor: 1
-    content_length: 845
-    host: ""
-    body: '{"max_tokens":40,"messages":[{"content":[{"text":"Generate a concise title for the following content:\n\nfetch the content from https://example-files.online-convert.com/website/html/example.html and tell me if it contains the word ''John Doe''\n \u003cthink\u003e\n\n\u003c/think\u003e","type":"text"}],"role":"user"}],"model":"claude-sonnet-4-5-20250929","system":[{"text":"you will generate a short title based on the first message a user begins a conversation with\n\n\u003crules\u003e\n- ensure it is not more than 50 characters long\n- the title should be a summary of the user''s message\n- it should be one line long\n- do not use quotes or colons\n- the entire text you return will be used as the title\n- never return anything that is more than one sentence (one line) long\n\u003c/rules\u003e\n\n /no_think","type":"text"}],"stream":true}'
+    body: '{"max_tokens":40,"messages":[{"content":[{"text":"Generate a concise title for the following content:\n\nfetch the content from https://example-files.online-convert.com/website/html/example.html and tell me if it contains the word ''John Doe''\n \u003cthink\u003e\n\n\u003c/think\u003e","type":"text"}],"role":"user"}],"model":"claude-haiku-4-5-20251001","system":[{"text":"you will generate a short title based on the first message a user begins a conversation with\n\n\u003crules\u003e\n- ensure it is not more than 50 characters long\n- the title should be a summary of the user''s message\n- it should be one line long\n- do not use quotes or colons\n- the entire text you return will be used as the title\n- never return anything that is more than one sentence (one line) long\n\u003c/rules\u003e\n\n /no_think","type":"text"}],"stream":true}'
     headers:
       Accept:
       - application/json
@@ -58,58 +26,49 @@ interactions:
     uncompressed: true
     body: |+
       event: message_start
-      data: {"type":"message_start","message":{"model":"claude-sonnet-4-5-20250929","id":"msg_01XffoGXF951Te4LqgH2bvLH","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":167,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":2,"service_tier":"standard","inference_geo":"not_available"}}   }
+      data: {"type":"message_start","message":{"model":"claude-haiku-4-5-20251001","id":"msg_019yRu75N7cyTTHykxDghwJc","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":167,"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","inference_geo":"not_available"}}      }
 
       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":"text","text":""}            }
 
       event: ping
       data: {"type": "ping"}
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Checking"}               }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Check"}      }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" if"}       }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" if"}           }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" example"}               }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" example"}              }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" HTML"}        }
-
-      event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" file"}    }
-
-      event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" contains John"}              }
-
-      event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Doe"}      }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":".html contains \"John Doe\""}             }
 
       event: content_block_stop
-      data: {"type":"content_block_stop","index":0              }
+      data: {"type":"content_block_stop","index":0          }
 
       event: message_delta
-      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":167,"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":167,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":14}       }
 
       event: message_stop
-      data: {"type":"message_stop"     }
+      data: {"type":"message_stop"       }
 
     headers:
       Content-Type:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 924.810625ms
-- id: 2
+    duration: 446.485541ms
+- id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 52436
+    content_length: 52628
     host: ""

internal/agent/testdata/TestCoderAgent/anthropic-sonnet/glob_tool.yaml 🔗

@@ -8,39 +8,7 @@ interactions:
     proto_minor: 1
     content_length: 763
     host: ""
-    body: '{"max_tokens":40,"messages":[{"content":[{"text":"Generate a concise title for the following content:\n\nuse glob to find all .go files in the current directory\n \u003cthink\u003e\n\n\u003c/think\u003e","type":"text"}],"role":"user"}],"model":"claude-3-5-haiku-20241022","system":[{"text":"you will generate a short title based on the first message a user begins a conversation with\n\n\u003crules\u003e\n- ensure it is not more than 50 characters long\n- the title should be a summary of the user''s message\n- it should be one line long\n- do not use quotes or colons\n- the entire text you return will be used as the title\n- never return anything that is more than one sentence (one line) long\n\u003c/rules\u003e\n\n /no_think","type":"text"}],"stream":true}'
-    headers:
-      Accept:
-      - application/json
-      Content-Type:
-      - application/json
-      User-Agent:
-      - Charm-Crush/devel (https://charm.land/crush)
-    url: https://api.anthropic.com/v1/messages
-    method: POST
-  response:
-    proto: HTTP/2.0
-    proto_major: 2
-    proto_minor: 0
-    content_length: -1
-    uncompressed: true
-    body: '{"type":"error","error":{"type":"not_found_error","message":"model: claude-3-5-haiku-20241022"},"request_id":"req_011CYyXfU6kyr5j15Xk1D13h"}'
-    headers:
-      Content-Type:
-      - application/json
-      content-type:
-      - application/json
-    status: 404 Not Found
-    code: 404
-    duration: 176.108167ms
-- id: 1
-  request:
-    proto: HTTP/1.1
-    proto_major: 1
-    proto_minor: 1
-    content_length: 52354
-    host: ""

internal/agent/testdata/TestCoderAgent/anthropic-sonnet/grep_tool.yaml 🔗

@@ -8,39 +8,7 @@ interactions:
     proto_minor: 1
     content_length: 761
     host: ""
-    body: '{"max_tokens":40,"messages":[{"content":[{"text":"Generate a concise title for the following content:\n\nuse grep to search for the word ''package'' in go files\n \u003cthink\u003e\n\n\u003c/think\u003e","type":"text"}],"role":"user"}],"model":"claude-3-5-haiku-20241022","system":[{"text":"you will generate a short title based on the first message a user begins a conversation with\n\n\u003crules\u003e\n- ensure it is not more than 50 characters long\n- the title should be a summary of the user''s message\n- it should be one line long\n- do not use quotes or colons\n- the entire text you return will be used as the title\n- never return anything that is more than one sentence (one line) long\n\u003c/rules\u003e\n\n /no_think","type":"text"}],"stream":true}'
-    headers:
-      Accept:
-      - application/json
-      Content-Type:
-      - application/json
-      User-Agent:
-      - Charm-Crush/devel (https://charm.land/crush)
-    url: https://api.anthropic.com/v1/messages
-    method: POST
-  response:
-    proto: HTTP/2.0
-    proto_major: 2
-    proto_minor: 0
-    content_length: -1
-    uncompressed: true
-    body: '{"type":"error","error":{"type":"not_found_error","message":"model: claude-3-5-haiku-20241022"},"request_id":"req_011CYyXfkpbH4dpejHmB6k8N"}'
-    headers:
-      Content-Type:
-      - application/json
-      content-type:
-      - application/json
-    status: 404 Not Found
-    code: 404
-    duration: 169.408458ms
-- id: 1
-  request:
-    proto: HTTP/1.1
-    proto_major: 1
-    proto_minor: 1
-    content_length: 52352
-    host: ""

internal/agent/testdata/TestCoderAgent/anthropic-sonnet/ls_tool.yaml 🔗

@@ -8,39 +8,7 @@ interactions:
     proto_minor: 1
     content_length: 757
     host: ""
-    body: '{"max_tokens":40,"messages":[{"content":[{"text":"Generate a concise title for the following content:\n\nuse ls to list the files in the current directory\n \u003cthink\u003e\n\n\u003c/think\u003e","type":"text"}],"role":"user"}],"model":"claude-3-5-haiku-20241022","system":[{"text":"you will generate a short title based on the first message a user begins a conversation with\n\n\u003crules\u003e\n- ensure it is not more than 50 characters long\n- the title should be a summary of the user''s message\n- it should be one line long\n- do not use quotes or colons\n- the entire text you return will be used as the title\n- never return anything that is more than one sentence (one line) long\n\u003c/rules\u003e\n\n /no_think","type":"text"}],"stream":true}'
-    headers:
-      Accept:
-      - application/json
-      Content-Type:
-      - application/json
-      User-Agent:
-      - Charm-Crush/devel (https://charm.land/crush)
-    url: https://api.anthropic.com/v1/messages
-    method: POST
-  response:
-    proto: HTTP/2.0
-    proto_major: 2
-    proto_minor: 0
-    content_length: -1
-    uncompressed: true
-    body: '{"type":"error","error":{"type":"not_found_error","message":"model: claude-3-5-haiku-20241022"},"request_id":"req_011CYyXgEC8BmgwKAp7Tnqht"}'
-    headers:
-      Content-Type:
-      - application/json
-      content-type:
-      - application/json
-    status: 404 Not Found
-    code: 404
-    duration: 176.300458ms
-- id: 1
-  request:
-    proto: HTTP/1.1
-    proto_major: 1
-    proto_minor: 1
-    content_length: 52346
-    host: ""

internal/agent/testdata/TestCoderAgent/anthropic-sonnet/multiedit_tool.yaml 🔗

@@ -8,7 +8,7 @@ interactions:
     proto_minor: 1
     content_length: 836
     host: ""
-    body: '{"max_tokens":40,"messages":[{"content":[{"text":"Generate a concise title for the following content:\n\nuse multiedit to change ''Hello, World!'' to ''Hello, Crush!'' and add a comment ''// Greeting'' above the fmt.Println line in main.go\n \u003cthink\u003e\n\n\u003c/think\u003e","type":"text"}],"role":"user"}],"model":"claude-3-5-haiku-20241022","system":[{"text":"you will generate a short title based on the first message a user begins a conversation with\n\n\u003crules\u003e\n- ensure it is not more than 50 characters long\n- the title should be a summary of the user''s message\n- it should be one line long\n- do not use quotes or colons\n- the entire text you return will be used as the title\n- never return anything that is more than one sentence (one line) long\n\u003c/rules\u003e\n\n /no_think","type":"text"}],"stream":true}'
+    body: '{"max_tokens":40,"messages":[{"content":[{"text":"Generate a concise title for the following content:\n\nuse multiedit to change ''Hello, World!'' to ''Hello, Crush!'' and add a comment ''// Greeting'' above the fmt.Println line in main.go\n \u003cthink\u003e\n\n\u003c/think\u003e","type":"text"}],"role":"user"}],"model":"claude-haiku-4-5-20251001","system":[{"text":"you will generate a short title based on the first message a user begins a conversation with\n\n\u003crules\u003e\n- ensure it is not more than 50 characters long\n- the title should be a summary of the user''s message\n- it should be one line long\n- do not use quotes or colons\n- the entire text you return will be used as the title\n- never return anything that is more than one sentence (one line) long\n\u003c/rules\u003e\n\n /no_think","type":"text"}],"stream":true}'
     headers:
       Accept:
       - application/json
@@ -24,23 +24,54 @@ interactions:
     proto_minor: 0
     content_length: -1
     uncompressed: true
-    body: '{"type":"error","error":{"type":"not_found_error","message":"model: claude-3-5-haiku-20241022"},"request_id":"req_011CYyXgYrXve6TbDpfy3Hny"}'
+    body: |+
+      event: message_start
+      data: {"type":"message_start","message":{"model":"claude-haiku-4-5-20251001","id":"msg_01DEiHkcPX9joxDtDrsGCY3S","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":170,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":2,"service_tier":"standard","inference_geo":"not_available"}}  }
+
+      event: content_block_start
+      data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}   }
+
+      event: ping
+      data: {"type": "ping"}
+
+      event: content_block_delta
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Mult"}}
+
+      event: content_block_delta
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"iedit Hello"}     }
+
+      event: content_block_delta
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" World"}  }
+
+      event: content_block_delta
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" to Hello Crush in"}      }
+
+      event: content_block_delta
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" main.go"} }
+
+      event: content_block_stop
+      data: {"type":"content_block_stop","index":0               }
+
+      event: message_delta
+      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":170,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":17}         }
+
+      event: message_stop
+      data: {"type":"message_stop"    }
+
     headers:
       Content-Type:
-      - application/json
-      content-type:
-      - application/json
-    status: 404 Not Found
-    code: 404
-    duration: 184.223542ms
+      - text/event-stream; charset=utf-8
+    status: 200 OK
+    code: 200
+    duration: 469.534792ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 52432
+    content_length: 52624
     host: ""

internal/agent/testdata/TestCoderAgent/anthropic-sonnet/parallel_tool_calls.yaml 🔗

@@ -8,39 +8,7 @@ interactions:
     proto_minor: 1
     content_length: 842
     host: ""
-    body: '{"max_tokens":40,"messages":[{"content":[{"text":"Generate a concise title for the following content:\n\nuse glob to find all .go files and use ls to list the current directory, it is very important that you run both tool calls in parallel\n \u003cthink\u003e\n\n\u003c/think\u003e","type":"text"}],"role":"user"}],"model":"claude-3-5-haiku-20241022","system":[{"text":"you will generate a short title based on the first message a user begins a conversation with\n\n\u003crules\u003e\n- ensure it is not more than 50 characters long\n- the title should be a summary of the user''s message\n- it should be one line long\n- do not use quotes or colons\n- the entire text you return will be used as the title\n- never return anything that is more than one sentence (one line) long\n\u003c/rules\u003e\n\n /no_think","type":"text"}],"stream":true}'
-    headers:
-      Accept:
-      - application/json
-      Content-Type:
-      - application/json
-      User-Agent:
-      - Charm-Crush/devel (https://charm.land/crush)
-    url: https://api.anthropic.com/v1/messages
-    method: POST
-  response:
-    proto: HTTP/2.0
-    proto_major: 2
-    proto_minor: 0
-    content_length: -1
-    uncompressed: true
-    body: '{"type":"error","error":{"type":"not_found_error","message":"model: claude-3-5-haiku-20241022"},"request_id":"req_011CYyXiTvRdMM6GAtTPte9G"}'
-    headers:
-      Content-Type:
-      - application/json
-      content-type:
-      - application/json
-    status: 404 Not Found
-    code: 404
-    duration: 187.522083ms
-- id: 1
-  request:
-    proto: HTTP/1.1
-    proto_major: 1
-    proto_minor: 1
-    content_length: 843
-    host: ""
-    body: '{"max_tokens":40,"messages":[{"content":[{"text":"Generate a concise title for the following content:\n\nuse glob to find all .go files and use ls to list the current directory, it is very important that you run both tool calls in parallel\n \u003cthink\u003e\n\n\u003c/think\u003e","type":"text"}],"role":"user"}],"model":"claude-sonnet-4-5-20250929","system":[{"text":"you will generate a short title based on the first message a user begins a conversation with\n\n\u003crules\u003e\n- ensure it is not more than 50 characters long\n- the title should be a summary of the user''s message\n- it should be one line long\n- do not use quotes or colons\n- the entire text you return will be used as the title\n- never return anything that is more than one sentence (one line) long\n\u003c/rules\u003e\n\n /no_think","type":"text"}],"stream":true}'
+    body: '{"max_tokens":40,"messages":[{"content":[{"text":"Generate a concise title for the following content:\n\nuse glob to find all .go files and use ls to list the current directory, it is very important that you run both tool calls in parallel\n \u003cthink\u003e\n\n\u003c/think\u003e","type":"text"}],"role":"user"}],"model":"claude-haiku-4-5-20251001","system":[{"text":"you will generate a short title based on the first message a user begins a conversation with\n\n\u003crules\u003e\n- ensure it is not more than 50 characters long\n- the title should be a summary of the user''s message\n- it should be one line long\n- do not use quotes or colons\n- the entire text you return will be used as the title\n- never return anything that is more than one sentence (one line) long\n\u003c/rules\u003e\n\n /no_think","type":"text"}],"stream":true}'
     headers:
       Accept:
       - application/json
@@ -58,52 +26,58 @@ interactions:
     uncompressed: true
     body: |+
       event: message_start
-      data: {"type":"message_start","message":{"model":"claude-sonnet-4-5-20250929","id":"msg_019YKKn9sWHzZ993RoTKMAog","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":159,"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","inference_geo":"not_available"}}          }
+      data: {"type":"message_start","message":{"model":"claude-haiku-4-5-20251001","id":"msg_013JcAgtbnTMEL4aFdyD4MMK","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":159,"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","inference_geo":"not_available"}}        }
 
       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":"text","text":""} }
 
       event: ping
       data: {"type": "ping"}
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Find"}            }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Go"}           }
+
+      event: content_block_delta
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" files"}         }
+
+      event: content_block_delta
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" glob"}    }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Go"}     }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" with"} }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" files and list directory"}          }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" parallel"}   }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" in"}              }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" ls directory"}            }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" parallel"}              }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" listing"}           }
 
       event: content_block_stop
-      data: {"type":"content_block_stop","index":0  }
+      data: {"type":"content_block_stop","index":0}
 
       event: message_delta
-      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":159,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":11}        }
+      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":159,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":11}         }
 
       event: message_stop
-      data: {"type":"message_stop"   }
+      data: {"type":"message_stop"     }
 
     headers:
       Content-Type:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 1.324753375s
-- id: 2
+    duration: 638.720958ms
+- id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 52443
+    content_length: 52635
     host: ""

internal/agent/testdata/TestCoderAgent/anthropic-sonnet/read_a_file.yaml 🔗

@@ -8,7 +8,7 @@ interactions:
     proto_minor: 1
     content_length: 723
     host: ""
-    body: '{"max_tokens":40,"messages":[{"content":[{"text":"Generate a concise title for the following content:\n\nRead the go mod\n \u003cthink\u003e\n\n\u003c/think\u003e","type":"text"}],"role":"user"}],"model":"claude-3-5-haiku-20241022","system":[{"text":"you will generate a short title based on the first message a user begins a conversation with\n\n\u003crules\u003e\n- ensure it is not more than 50 characters long\n- the title should be a summary of the user''s message\n- it should be one line long\n- do not use quotes or colons\n- the entire text you return will be used as the title\n- never return anything that is more than one sentence (one line) long\n\u003c/rules\u003e\n\n /no_think","type":"text"}],"stream":true}'
+    body: '{"max_tokens":40,"messages":[{"content":[{"text":"Generate a concise title for the following content:\n\nRead the go mod\n \u003cthink\u003e\n\n\u003c/think\u003e","type":"text"}],"role":"user"}],"model":"claude-haiku-4-5-20251001","system":[{"text":"you will generate a short title based on the first message a user begins a conversation with\n\n\u003crules\u003e\n- ensure it is not more than 50 characters long\n- the title should be a summary of the user''s message\n- it should be one line long\n- do not use quotes or colons\n- the entire text you return will be used as the title\n- never return anything that is more than one sentence (one line) long\n\u003c/rules\u003e\n\n /no_think","type":"text"}],"stream":true}'
     headers:
       Accept:
       - application/json
@@ -24,23 +24,51 @@ interactions:
     proto_minor: 0
     content_length: -1
     uncompressed: true
-    body: '{"type":"error","error":{"type":"not_found_error","message":"model: claude-3-5-haiku-20241022"},"request_id":"req_011CYyXcx7QRXJadwTkT3zh9"}'
+    body: |+
+      event: message_start
+      data: {"type":"message_start","message":{"model":"claude-haiku-4-5-20251001","id":"msg_01XmjM7aL79Ah9inAJ6FKFSr","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":134,"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","inference_geo":"not_available"}}  }
+
+      event: content_block_start
+      data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}              }
+
+      event: ping
+      data: {"type": "ping"}
+
+      event: content_block_delta
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Go"}            }
+
+      event: content_block_delta
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Module"}               }
+
+      event: content_block_delta
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" File"}        }
+
+      event: content_block_delta
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Review"}   }
+
+      event: content_block_stop
+      data: {"type":"content_block_stop","index":0          }
+
+      event: message_delta
+      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":134,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":7}     }
+
+      event: message_stop
+      data: {"type":"message_stop"     }
+
     headers:
       Content-Type:
-      - application/json
-      content-type:
-      - application/json
-    status: 404 Not Found
-    code: 404
-    duration: 182.95975ms
+      - text/event-stream; charset=utf-8
+    status: 200 OK
+    code: 200
+    duration: 614.432792ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 724
+    content_length: 52508
     host: ""
-    body: '{"max_tokens":40,"messages":[{"content":[{"text":"Generate a concise title for the following content:\n\nRead the go mod\n \u003cthink\u003e\n\n\u003c/think\u003e","type":"text"}],"role":"user"}],"model":"claude-sonnet-4-5-20250929","system":[{"text":"you will generate a short title based on the first message a user begins a conversation with\n\n\u003crules\u003e\n- ensure it is not more than 50 characters long\n- the title should be a summary of the user''s message\n- it should be one line long\n- do not use quotes or colons\n- the entire text you return will be used as the title\n- never return anything that is more than one sentence (one line) long\n\u003c/rules\u003e\n\n /no_think","type":"text"}],"stream":true}'

internal/agent/testdata/TestCoderAgent/anthropic-sonnet/simple_test.yaml 🔗

@@ -8,39 +8,7 @@ interactions:
     proto_minor: 1
     content_length: 713
     host: ""
-    body: '{"max_tokens":40,"messages":[{"content":[{"text":"Generate a concise title for the following content:\n\nHello\n \u003cthink\u003e\n\n\u003c/think\u003e","type":"text"}],"role":"user"}],"model":"claude-3-5-haiku-20241022","system":[{"text":"you will generate a short title based on the first message a user begins a conversation with\n\n\u003crules\u003e\n- ensure it is not more than 50 characters long\n- the title should be a summary of the user''s message\n- it should be one line long\n- do not use quotes or colons\n- the entire text you return will be used as the title\n- never return anything that is more than one sentence (one line) long\n\u003c/rules\u003e\n\n /no_think","type":"text"}],"stream":true}'
-    headers:
-      Accept:
-      - application/json
-      Content-Type:
-      - application/json
-      User-Agent:
-      - Charm-Crush/devel (https://charm.land/crush)
-    url: https://api.anthropic.com/v1/messages
-    method: POST
-  response:
-    proto: HTTP/2.0
-    proto_major: 2
-    proto_minor: 0
-    content_length: -1
-    uncompressed: true
-    body: '{"type":"error","error":{"type":"not_found_error","message":"model: claude-3-5-haiku-20241022"},"request_id":"req_011CYyXcppNDLs1qvfBtpNfu"}'
-    headers:
-      Content-Type:
-      - application/json
-      content-type:
-      - application/json
-    status: 404 Not Found
-    code: 404
-    duration: 373.872792ms
-- id: 1
-  request:
-    proto: HTTP/1.1
-    proto_major: 1
-    proto_minor: 1
-    content_length: 52306
-    host: ""

internal/agent/testdata/TestCoderAgent/anthropic-sonnet/sourcegraph_tool.yaml 🔗

@@ -8,39 +8,7 @@ interactions:
     proto_minor: 1
     content_length: 768
     host: ""
-    body: '{"max_tokens":40,"messages":[{"content":[{"text":"Generate a concise title for the following content:\n\nuse sourcegraph to search for ''func main'' in Go repositories\n \u003cthink\u003e\n\n\u003c/think\u003e","type":"text"}],"role":"user"}],"model":"claude-3-5-haiku-20241022","system":[{"text":"you will generate a short title based on the first message a user begins a conversation with\n\n\u003crules\u003e\n- ensure it is not more than 50 characters long\n- the title should be a summary of the user''s message\n- it should be one line long\n- do not use quotes or colons\n- the entire text you return will be used as the title\n- never return anything that is more than one sentence (one line) long\n\u003c/rules\u003e\n\n /no_think","type":"text"}],"stream":true}'
-    headers:
-      Accept:
-      - application/json
-      Content-Type:
-      - application/json
-      User-Agent:
-      - Charm-Crush/devel (https://charm.land/crush)
-    url: https://api.anthropic.com/v1/messages
-    method: POST
-  response:
-    proto: HTTP/2.0
-    proto_major: 2
-    proto_minor: 0
-    content_length: -1
-    uncompressed: true
-    body: '{"type":"error","error":{"type":"not_found_error","message":"model: claude-3-5-haiku-20241022"},"request_id":"req_011CYyXh9AXtqWgGynhzofvb"}'
-    headers:
-      Content-Type:
-      - application/json
-      content-type:
-      - application/json
-    status: 404 Not Found
-    code: 404
-    duration: 178.900625ms
-- id: 1
-  request:
-    proto: HTTP/1.1
-    proto_major: 1
-    proto_minor: 1
-    content_length: 769
-    host: ""
-    body: '{"max_tokens":40,"messages":[{"content":[{"text":"Generate a concise title for the following content:\n\nuse sourcegraph to search for ''func main'' in Go repositories\n \u003cthink\u003e\n\n\u003c/think\u003e","type":"text"}],"role":"user"}],"model":"claude-sonnet-4-5-20250929","system":[{"text":"you will generate a short title based on the first message a user begins a conversation with\n\n\u003crules\u003e\n- ensure it is not more than 50 characters long\n- the title should be a summary of the user''s message\n- it should be one line long\n- do not use quotes or colons\n- the entire text you return will be used as the title\n- never return anything that is more than one sentence (one line) long\n\u003c/rules\u003e\n\n /no_think","type":"text"}],"stream":true}'
+    body: '{"max_tokens":40,"messages":[{"content":[{"text":"Generate a concise title for the following content:\n\nuse sourcegraph to search for ''func main'' in Go repositories\n \u003cthink\u003e\n\n\u003c/think\u003e","type":"text"}],"role":"user"}],"model":"claude-haiku-4-5-20251001","system":[{"text":"you will generate a short title based on the first message a user begins a conversation with\n\n\u003crules\u003e\n- ensure it is not more than 50 characters long\n- the title should be a summary of the user''s message\n- it should be one line long\n- do not use quotes or colons\n- the entire text you return will be used as the title\n- never return anything that is more than one sentence (one line) long\n\u003c/rules\u003e\n\n /no_think","type":"text"}],"stream":true}'
     headers:
       Accept:
       - application/json
@@ -58,49 +26,49 @@ interactions:
     uncompressed: true
     body: |+
       event: message_start
-      data: {"type":"message_start","message":{"model":"claude-sonnet-4-5-20250929","id":"msg_019n1xJ4Mq2eLm4f8FxHoZeb","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":145,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":2,"service_tier":"standard","inference_geo":"not_available"}}              }
+      data: {"type":"message_start","message":{"model":"claude-haiku-4-5-20251001","id":"msg_01Ndi9GYfffhiodY599f7iFx","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":145,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":2,"service_tier":"standard","inference_geo":"not_available"}}          }
 
       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":"text","text":""}     }
 
       event: ping
       data: {"type": "ping"}
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Searching"}              }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Searching"}            }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" for func"}      }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" for func"}}
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" main in Go repos"}          }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" main in Go repositories with"}    }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" with Sourcegraph"}      }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Sourcegraph"}}
 
       event: content_block_stop
-      data: {"type":"content_block_stop","index":0         }
+      data: {"type":"content_block_stop","index":0    }
 
       event: message_delta
-      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":145,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":16}            }
+      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":145,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":16}              }
 
       event: message_stop
-      data: {"type":"message_stop"               }
+      data: {"type":"message_stop"        }
 
     headers:
       Content-Type:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 1.199911417s
-- id: 2
+    duration: 1.13498575s
+- id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 52366
+    content_length: 52558
     host: ""

internal/agent/testdata/TestCoderAgent/anthropic-sonnet/update_a_file.yaml 🔗

@@ -8,7 +8,7 @@ interactions:
     proto_minor: 1
     content_length: 777
     host: ""
-    body: '{"max_tokens":40,"messages":[{"content":[{"text":"Generate a concise title for the following content:\n\nupdate the main.go file by changing the print to say hello from crush\n \u003cthink\u003e\n\n\u003c/think\u003e","type":"text"}],"role":"user"}],"model":"claude-3-5-haiku-20241022","system":[{"text":"you will generate a short title based on the first message a user begins a conversation with\n\n\u003crules\u003e\n- ensure it is not more than 50 characters long\n- the title should be a summary of the user''s message\n- it should be one line long\n- do not use quotes or colons\n- the entire text you return will be used as the title\n- never return anything that is more than one sentence (one line) long\n\u003c/rules\u003e\n\n /no_think","type":"text"}],"stream":true}'
+    body: '{"max_tokens":40,"messages":[{"content":[{"text":"Generate a concise title for the following content:\n\nupdate the main.go file by changing the print to say hello from crush\n \u003cthink\u003e\n\n\u003c/think\u003e","type":"text"}],"role":"user"}],"model":"claude-haiku-4-5-20251001","system":[{"text":"you will generate a short title based on the first message a user begins a conversation with\n\n\u003crules\u003e\n- ensure it is not more than 50 characters long\n- the title should be a summary of the user''s message\n- it should be one line long\n- do not use quotes or colons\n- the entire text you return will be used as the title\n- never return anything that is more than one sentence (one line) long\n\u003c/rules\u003e\n\n /no_think","type":"text"}],"stream":true}'
     headers:
       Accept:
       - application/json
@@ -24,23 +24,51 @@ interactions:
     proto_minor: 0
     content_length: -1
     uncompressed: true
-    body: '{"type":"error","error":{"type":"not_found_error","message":"model: claude-3-5-haiku-20241022"},"request_id":"req_011CYyXdKM6cL42HF7edaqh7"}'
+    body: |+
+      event: message_start
+      data: {"type":"message_start","message":{"model":"claude-haiku-4-5-20251001","id":"msg_01DR6im8rp6CvrbFpFMDz9g7","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":145,"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","inference_geo":"not_available"}} }
+
+      event: content_block_start
+      data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}           }
+
+      event: ping
+      data: {"type": "ping"}
+
+      event: content_block_delta
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Update"}        }
+
+      event: content_block_delta
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" main"}             }
+
+      event: content_block_delta
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":".go hello"}               }
+
+      event: content_block_delta
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" from crush"}        }
+
+      event: content_block_stop
+      data: {"type":"content_block_stop","index":0         }
+
+      event: message_delta
+      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":145,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":10}  }
+
+      event: message_stop
+      data: {"type":"message_stop"         }
+
     headers:
       Content-Type:
-      - application/json
-      content-type:
-      - application/json
-    status: 404 Not Found
-    code: 404
-    duration: 279.61775ms
+      - text/event-stream; charset=utf-8
+    status: 200 OK
+    code: 200
+    duration: 470.455ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 778
+    content_length: 52564
     host: ""
-    body: '{"max_tokens":40,"messages":[{"content":[{"text":"Generate a concise title for the following content:\n\nupdate the main.go file by changing the print to say hello from crush\n \u003cthink\u003e\n\n\u003c/think\u003e","type":"text"}],"role":"user"}],"model":"claude-sonnet-4-5-20250929","system":[{"text":"you will generate a short title based on the first message a user begins a conversation with\n\n\u003crules\u003e\n- ensure it is not more than 50 characters long\n- the title should be a summary of the user''s message\n- it should be one line long\n- do not use quotes or colons\n- the entire text you return will be used as the title\n- never return anything that is more than one sentence (one line) long\n\u003c/rules\u003e\n\n /no_think","type":"text"}],"stream":true}'

internal/agent/testdata/TestCoderAgent/anthropic-sonnet/write_tool.yaml 🔗

@@ -8,39 +8,7 @@ interactions:
     proto_minor: 1
     content_length: 817
     host: ""
-    body: '{"max_tokens":40,"messages":[{"content":[{"text":"Generate a concise title for the following content:\n\nuse write to create a new file called config.json with content ''{\"name\": \"test\", \"version\": \"1.0.0\"}''\n \u003cthink\u003e\n\n\u003c/think\u003e","type":"text"}],"role":"user"}],"model":"claude-3-5-haiku-20241022","system":[{"text":"you will generate a short title based on the first message a user begins a conversation with\n\n\u003crules\u003e\n- ensure it is not more than 50 characters long\n- the title should be a summary of the user''s message\n- it should be one line long\n- do not use quotes or colons\n- the entire text you return will be used as the title\n- never return anything that is more than one sentence (one line) long\n\u003c/rules\u003e\n\n /no_think","type":"text"}],"stream":true}'
-    headers:
-      Accept:
-      - application/json
-      Content-Type:
-      - application/json
-      User-Agent:
-      - Charm-Crush/devel (https://charm.land/crush)
-    url: https://api.anthropic.com/v1/messages
-    method: POST
-  response:
-    proto: HTTP/2.0
-    proto_major: 2
-    proto_minor: 0
-    content_length: -1
-    uncompressed: true
-    body: '{"type":"error","error":{"type":"not_found_error","message":"model: claude-3-5-haiku-20241022"},"request_id":"req_011CYyXhtEt3Gg9KWuttrZXF"}'
-    headers:
-      Content-Type:
-      - application/json
-      content-type:
-      - application/json
-    status: 404 Not Found
-    code: 404
-    duration: 171.67925ms
-- id: 1
-  request:
-    proto: HTTP/1.1
-    proto_major: 1
-    proto_minor: 1
-    content_length: 818
-    host: ""
-    body: '{"max_tokens":40,"messages":[{"content":[{"text":"Generate a concise title for the following content:\n\nuse write to create a new file called config.json with content ''{\"name\": \"test\", \"version\": \"1.0.0\"}''\n \u003cthink\u003e\n\n\u003c/think\u003e","type":"text"}],"role":"user"}],"model":"claude-sonnet-4-5-20250929","system":[{"text":"you will generate a short title based on the first message a user begins a conversation with\n\n\u003crules\u003e\n- ensure it is not more than 50 characters long\n- the title should be a summary of the user''s message\n- it should be one line long\n- do not use quotes or colons\n- the entire text you return will be used as the title\n- never return anything that is more than one sentence (one line) long\n\u003c/rules\u003e\n\n /no_think","type":"text"}],"stream":true}'
+    body: '{"max_tokens":40,"messages":[{"content":[{"text":"Generate a concise title for the following content:\n\nuse write to create a new file called config.json with content ''{\"name\": \"test\", \"version\": \"1.0.0\"}''\n \u003cthink\u003e\n\n\u003c/think\u003e","type":"text"}],"role":"user"}],"model":"claude-haiku-4-5-20251001","system":[{"text":"you will generate a short title based on the first message a user begins a conversation with\n\n\u003crules\u003e\n- ensure it is not more than 50 characters long\n- the title should be a summary of the user''s message\n- it should be one line long\n- do not use quotes or colons\n- the entire text you return will be used as the title\n- never return anything that is more than one sentence (one line) long\n\u003c/rules\u003e\n\n /no_think","type":"text"}],"stream":true}'
     headers:
       Accept:
       - application/json
@@ -58,52 +26,52 @@ interactions:
     uncompressed: true
     body: |+
       event: message_start
-      data: {"type":"message_start","message":{"model":"claude-sonnet-4-5-20250929","id":"msg_01Fajda5WbjkxN2M1A1aMBxo","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":161,"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","inference_geo":"not_available"}} }
+      data: {"type":"message_start","message":{"model":"claude-haiku-4-5-20251001","id":"msg_01TYYgbCvYvFDfxiDyMKbZuC","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":161,"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","inference_geo":"not_available"}}   }
 
       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":"text","text":""}        }
 
       event: ping
       data: {"type": "ping"}
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Create"} }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Create"}             }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" config"}   }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" config"}      }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":".json file"}     }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":".json file"}              }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" with JSON"}    }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" with test"}}
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" content"}          }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" data"}             }
 
       event: content_block_stop
-      data: {"type":"content_block_stop","index":0              }
+      data: {"type":"content_block_stop","index":0               }
 
       event: message_delta
-      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":161,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":11}    }
+      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":161,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":11}            }
 
       event: message_stop
-      data: {"type":"message_stop"            }
+      data: {"type":"message_stop"       }
 
     headers:
       Content-Type:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 1.660372625s
-- id: 2
+    duration: 807.968541ms
+- id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 52409
+    content_length: 52601
     host: ""

internal/agent/testdata/TestCoderAgent/openai-gpt-5/bash_tool.yaml 🔗

@@ -24,25 +24,25 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-DIdXpN5qqNdN5azvfHXAPJEMS93dv","object":"chat.completion.chunk","created":1773334285,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"gO6VoQ4c0jcTJD"}
+      data: {"id":"chatcmpl-DIgbv0pTSe1Khfah2QQT8m4hsLZHS","object":"chat.completion.chunk","created":1773346071,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"XNeud2NVXIfn5k"}
 
-      data: {"id":"chatcmpl-DIdXpN5qqNdN5azvfHXAPJEMS93dv","object":"chat.completion.chunk","created":1773334285,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":"Create"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"7uaQuTakyR"}
+      data: {"id":"chatcmpl-DIgbv0pTSe1Khfah2QQT8m4hsLZHS","object":"chat.completion.chunk","created":1773346071,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":"Create"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"asUFZQqxyC"}
 
-      data: {"id":"chatcmpl-DIdXpN5qqNdN5azvfHXAPJEMS93dv","object":"chat.completion.chunk","created":1773334285,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" Test"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"d6vICyjzh2V"}
+      data: {"id":"chatcmpl-DIgbv0pTSe1Khfah2QQT8m4hsLZHS","object":"chat.completion.chunk","created":1773346071,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"R9PoRhaiu1f2AX"}
 
-      data: {"id":"chatcmpl-DIdXpN5qqNdN5azvfHXAPJEMS93dv","object":"chat.completion.chunk","created":1773334285,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" File"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"4Zu7AvmPNUT"}
+      data: {"id":"chatcmpl-DIgbv0pTSe1Khfah2QQT8m4hsLZHS","object":"chat.completion.chunk","created":1773346071,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":" File"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"W1xBbRdHXUF"}
 
-      data: {"id":"chatcmpl-DIdXpN5qqNdN5azvfHXAPJEMS93dv","object":"chat.completion.chunk","created":1773334285,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"iYm3bqiyxCGad"}
+      data: {"id":"chatcmpl-DIgbv0pTSe1Khfah2QQT8m4hsLZHS","object":"chat.completion.chunk","created":1773346071,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":" with"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"RkrqMVn7kRO"}
 
-      data: {"id":"chatcmpl-DIdXpN5qqNdN5azvfHXAPJEMS93dv","object":"chat.completion.chunk","created":1773334285,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" Bash"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"RwVYgTFbPw0"}
+      data: {"id":"chatcmpl-DIgbv0pTSe1Khfah2QQT8m4hsLZHS","object":"chat.completion.chunk","created":1773346071,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":" Content"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"zE7JYVBh"}
 
-      data: {"id":"chatcmpl-DIdXpN5qqNdN5azvfHXAPJEMS93dv","object":"chat.completion.chunk","created":1773334285,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" Without"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"nBnAbAJ2"}
+      data: {"id":"chatcmpl-DIgbv0pTSe1Khfah2QQT8m4hsLZHS","object":"chat.completion.chunk","created":1773346071,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ZQgSormHvSpRP"}
 
-      data: {"id":"chatcmpl-DIdXpN5qqNdN5azvfHXAPJEMS93dv","object":"chat.completion.chunk","created":1773334285,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" Timestamp"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"UvlWNL"}
+      data: {"id":"chatcmpl-DIgbv0pTSe1Khfah2QQT8m4hsLZHS","object":"chat.completion.chunk","created":1773346071,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":" Bash"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"k3Y3oANLYNy"}
 
-      data: {"id":"chatcmpl-DIdXpN5qqNdN5azvfHXAPJEMS93dv","object":"chat.completion.chunk","created":1773334285,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"CGx59NvGan"}
+      data: {"id":"chatcmpl-DIgbv0pTSe1Khfah2QQT8m4hsLZHS","object":"chat.completion.chunk","created":1773346071,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"Wx5pDuKbv6"}
 
-      data: {"id":"chatcmpl-DIdXpN5qqNdN5azvfHXAPJEMS93dv","object":"chat.completion.chunk","created":1773334285,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[],"usage":{"prompt_tokens":145,"completion_tokens":7,"total_tokens":152,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"3hP8oQSKkyuZlA"}
+      data: {"id":"chatcmpl-DIgbv0pTSe1Khfah2QQT8m4hsLZHS","object":"chat.completion.chunk","created":1773346071,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[],"usage":{"prompt_tokens":145,"completion_tokens":7,"total_tokens":152,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"GMNsrdtfCMVZvP"}
 
       data: [DONE]
 
@@ -51,15 +51,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 1.885268458s
+    duration: 590.488833ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50734
+    content_length: 50935
     host: ""

internal/agent/testdata/TestCoderAgent/openai-gpt-5/download_tool.yaml 🔗

@@ -24,27 +24,23 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-DIdYE7QvBnpk6h8OodCAw7ulUfIFj","object":"chat.completion.chunk","created":1773334310,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_7c4b976237","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"GiZ9v8e8Kc55g7"}
+      data: {"id":"chatcmpl-DIgcBCEsQeF7sIYGZFHfvKWv36Jv4","object":"chat.completion.chunk","created":1773346087,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_7c4b976237","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"L6S2S5FbyKuB2Q"}
 
-      data: {"id":"chatcmpl-DIdYE7QvBnpk6h8OodCAw7ulUfIFj","object":"chat.completion.chunk","created":1773334310,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_7c4b976237","choices":[{"index":0,"delta":{"content":"Download"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"h0c0ZtJ4"}
+      data: {"id":"chatcmpl-DIgcBCEsQeF7sIYGZFHfvKWv36Jv4","object":"chat.completion.chunk","created":1773346087,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_7c4b976237","choices":[{"index":0,"delta":{"content":"Downloading"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"OkXl8"}
 
-      data: {"id":"chatcmpl-DIdYE7QvBnpk6h8OodCAw7ulUfIFj","object":"chat.completion.chunk","created":1773334310,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_7c4b976237","choices":[{"index":0,"delta":{"content":" and"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"4dNca67Yg8PX"}
+      data: {"id":"chatcmpl-DIgcBCEsQeF7sIYGZFHfvKWv36Jv4","object":"chat.completion.chunk","created":1773346087,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_7c4b976237","choices":[{"index":0,"delta":{"content":" and"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"KMyiVw3C3PUl"}
 
-      data: {"id":"chatcmpl-DIdYE7QvBnpk6h8OodCAw7ulUfIFj","object":"chat.completion.chunk","created":1773334310,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_7c4b976237","choices":[{"index":0,"delta":{"content":" Save"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Kia8Nvyk5VS"}
+      data: {"id":"chatcmpl-DIgcBCEsQeF7sIYGZFHfvKWv36Jv4","object":"chat.completion.chunk","created":1773346087,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_7c4b976237","choices":[{"index":0,"delta":{"content":" Saving"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"LmMpnjEv2"}
 
-      data: {"id":"chatcmpl-DIdYE7QvBnpk6h8OodCAw7ulUfIFj","object":"chat.completion.chunk","created":1773334310,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_7c4b976237","choices":[{"index":0,"delta":{"content":" Text"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"cCTXN1hVqNO"}
+      data: {"id":"chatcmpl-DIgcBCEsQeF7sIYGZFHfvKWv36Jv4","object":"chat.completion.chunk","created":1773346087,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_7c4b976237","choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"dJNPJ5bRg2cKOx"}
 
-      data: {"id":"chatcmpl-DIdYE7QvBnpk6h8OodCAw7ulUfIFj","object":"chat.completion.chunk","created":1773334310,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_7c4b976237","choices":[{"index":0,"delta":{"content":" File"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"l1YfWMXLtsa"}
+      data: {"id":"chatcmpl-DIgcBCEsQeF7sIYGZFHfvKWv36Jv4","object":"chat.completion.chunk","created":1773346087,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_7c4b976237","choices":[{"index":0,"delta":{"content":" TXT"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"QrEQMWUTcVaA"}
 
-      data: {"id":"chatcmpl-DIdYE7QvBnpk6h8OodCAw7ulUfIFj","object":"chat.completion.chunk","created":1773334310,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_7c4b976237","choices":[{"index":0,"delta":{"content":" as"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"KUQhpSyhyfVyY"}
+      data: {"id":"chatcmpl-DIgcBCEsQeF7sIYGZFHfvKWv36Jv4","object":"chat.completion.chunk","created":1773346087,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_7c4b976237","choices":[{"index":0,"delta":{"content":" File"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Y9rCwhO6q6p"}
 
-      data: {"id":"chatcmpl-DIdYE7QvBnpk6h8OodCAw7ulUfIFj","object":"chat.completion.chunk","created":1773334310,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_7c4b976237","choices":[{"index":0,"delta":{"content":" example"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ZQRDBCCz"}
+      data: {"id":"chatcmpl-DIgcBCEsQeF7sIYGZFHfvKWv36Jv4","object":"chat.completion.chunk","created":1773346087,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_7c4b976237","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"ktdWarf7iR"}
 
-      data: {"id":"chatcmpl-DIdYE7QvBnpk6h8OodCAw7ulUfIFj","object":"chat.completion.chunk","created":1773334310,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_7c4b976237","choices":[{"index":0,"delta":{"content":".txt"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"caO8u7AbNCKf"}
-
-      data: {"id":"chatcmpl-DIdYE7QvBnpk6h8OodCAw7ulUfIFj","object":"chat.completion.chunk","created":1773334310,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_7c4b976237","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"qVc0RmKImr"}
-
-      data: {"id":"chatcmpl-DIdYE7QvBnpk6h8OodCAw7ulUfIFj","object":"chat.completion.chunk","created":1773334310,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_7c4b976237","choices":[],"usage":{"prompt_tokens":148,"completion_tokens":8,"total_tokens":156,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"I1axqnXWrKCqGX"}
+      data: {"id":"chatcmpl-DIgcBCEsQeF7sIYGZFHfvKWv36Jv4","object":"chat.completion.chunk","created":1773346087,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_7c4b976237","choices":[],"usage":{"prompt_tokens":148,"completion_tokens":6,"total_tokens":154,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"lw2dl4V3D9MVgE"}
 
       data: [DONE]
 
@@ -53,15 +49,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 455.819542ms
+    duration: 427.27125ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50759
+    content_length: 50960
     host: ""

internal/agent/testdata/TestCoderAgent/openai-gpt-5/fetch_tool.yaml 🔗

@@ -24,27 +24,31 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-DIdYQTZXcvSq5BBDv7j17jujqAaLt","object":"chat.completion.chunk","created":1773334322,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_22cd3c63e9","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"3nVNa7ebpvr1F5"}
+      data: {"id":"chatcmpl-DIgcTmwGKAdkXj8gSUv69bn6kRuIv","object":"chat.completion.chunk","created":1773346105,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_22cd3c63e9","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"q95A3H5JOC2nwc"}
 
-      data: {"id":"chatcmpl-DIdYQTZXcvSq5BBDv7j17jujqAaLt","object":"chat.completion.chunk","created":1773334322,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_22cd3c63e9","choices":[{"index":0,"delta":{"content":"Check"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"jCnA2CdOU2O"}
+      data: {"id":"chatcmpl-DIgcTmwGKAdkXj8gSUv69bn6kRuIv","object":"chat.completion.chunk","created":1773346105,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_22cd3c63e9","choices":[{"index":0,"delta":{"content":"Checking"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"D0lLDihL"}
 
-      data: {"id":"chatcmpl-DIdYQTZXcvSq5BBDv7j17jujqAaLt","object":"chat.completion.chunk","created":1773334322,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_22cd3c63e9","choices":[{"index":0,"delta":{"content":" HTML"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"vpFLFa8URuV"}
+      data: {"id":"chatcmpl-DIgcTmwGKAdkXj8gSUv69bn6kRuIv","object":"chat.completion.chunk","created":1773346105,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_22cd3c63e9","choices":[{"index":0,"delta":{"content":" for"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"JRHjAu65Ko0t"}
 
-      data: {"id":"chatcmpl-DIdYQTZXcvSq5BBDv7j17jujqAaLt","object":"chat.completion.chunk","created":1773334322,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_22cd3c63e9","choices":[{"index":0,"delta":{"content":" for"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"peCVMVGgoHRZ"}
+      data: {"id":"chatcmpl-DIgcTmwGKAdkXj8gSUv69bn6kRuIv","object":"chat.completion.chunk","created":1773346105,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_22cd3c63e9","choices":[{"index":0,"delta":{"content":" '"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"SgnzoZUn6ipAdA"}
 
-      data: {"id":"chatcmpl-DIdYQTZXcvSq5BBDv7j17jujqAaLt","object":"chat.completion.chunk","created":1773334322,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_22cd3c63e9","choices":[{"index":0,"delta":{"content":" '"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"k3eppbqdKo3zMm"}
+      data: {"id":"chatcmpl-DIgcTmwGKAdkXj8gSUv69bn6kRuIv","object":"chat.completion.chunk","created":1773346105,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_22cd3c63e9","choices":[{"index":0,"delta":{"content":"John"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"J1k2pGqzS0OB"}
 
-      data: {"id":"chatcmpl-DIdYQTZXcvSq5BBDv7j17jujqAaLt","object":"chat.completion.chunk","created":1773334322,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_22cd3c63e9","choices":[{"index":0,"delta":{"content":"John"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"k9OEKYCYLUSu"}
+      data: {"id":"chatcmpl-DIgcTmwGKAdkXj8gSUv69bn6kRuIv","object":"chat.completion.chunk","created":1773346105,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_22cd3c63e9","choices":[{"index":0,"delta":{"content":" Doe"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"LYbaXQklKnYy"}
 
-      data: {"id":"chatcmpl-DIdYQTZXcvSq5BBDv7j17jujqAaLt","object":"chat.completion.chunk","created":1773334322,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_22cd3c63e9","choices":[{"index":0,"delta":{"content":" Doe"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"KUNWoRJak2u9"}
+      data: {"id":"chatcmpl-DIgcTmwGKAdkXj8gSUv69bn6kRuIv","object":"chat.completion.chunk","created":1773346105,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_22cd3c63e9","choices":[{"index":0,"delta":{"content":"'"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Ar2v6w44ZhjQoYc"}
 
-      data: {"id":"chatcmpl-DIdYQTZXcvSq5BBDv7j17jujqAaLt","object":"chat.completion.chunk","created":1773334322,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_22cd3c63e9","choices":[{"index":0,"delta":{"content":"'"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"QWp6BzId68IqGki"}
+      data: {"id":"chatcmpl-DIgcTmwGKAdkXj8gSUv69bn6kRuIv","object":"chat.completion.chunk","created":1773346105,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_22cd3c63e9","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"a6qkfWzXtBcKA"}
 
-      data: {"id":"chatcmpl-DIdYQTZXcvSq5BBDv7j17jujqAaLt","object":"chat.completion.chunk","created":1773334322,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_22cd3c63e9","choices":[{"index":0,"delta":{"content":" Contents"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"S4dQWwl"}
+      data: {"id":"chatcmpl-DIgcTmwGKAdkXj8gSUv69bn6kRuIv","object":"chat.completion.chunk","created":1773346105,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_22cd3c63e9","choices":[{"index":0,"delta":{"content":" Online"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"s6ocv3ua2"}
 
-      data: {"id":"chatcmpl-DIdYQTZXcvSq5BBDv7j17jujqAaLt","object":"chat.completion.chunk","created":1773334322,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_22cd3c63e9","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"Xw2mGPnFns"}
+      data: {"id":"chatcmpl-DIgcTmwGKAdkXj8gSUv69bn6kRuIv","object":"chat.completion.chunk","created":1773346105,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_22cd3c63e9","choices":[{"index":0,"delta":{"content":" HTML"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"x2qzNmJwyZN"}
 
-      data: {"id":"chatcmpl-DIdYQTZXcvSq5BBDv7j17jujqAaLt","object":"chat.completion.chunk","created":1773334322,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_22cd3c63e9","choices":[],"usage":{"prompt_tokens":153,"completion_tokens":8,"total_tokens":161,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"FfsjQqLMvtdPUq"}
+      data: {"id":"chatcmpl-DIgcTmwGKAdkXj8gSUv69bn6kRuIv","object":"chat.completion.chunk","created":1773346105,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_22cd3c63e9","choices":[{"index":0,"delta":{"content":" Content"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"6tqBHzn7"}
+
+      data: {"id":"chatcmpl-DIgcTmwGKAdkXj8gSUv69bn6kRuIv","object":"chat.completion.chunk","created":1773346105,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_22cd3c63e9","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"XtbymLtf5u"}
+
+      data: {"id":"chatcmpl-DIgcTmwGKAdkXj8gSUv69bn6kRuIv","object":"chat.completion.chunk","created":1773346105,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_22cd3c63e9","choices":[],"usage":{"prompt_tokens":153,"completion_tokens":10,"total_tokens":163,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"Nts4cEvzbv33W"}
 
       data: [DONE]
 
@@ -53,15 +57,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 536.229625ms
+    duration: 1.14852275s
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50777
+    content_length: 50978
     host: ""

internal/agent/testdata/TestCoderAgent/openai-gpt-5/glob_tool.yaml 🔗

@@ -24,29 +24,29 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-DIdYqHJyPmEcge5DiRQlWSkaG70Zt","object":"chat.completion.chunk","created":1773334348,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"0ptAF4c2EwwXRi"}
+      data: {"id":"chatcmpl-DIgclnQPkNxEljF48SWE8JwL4QqK4","object":"chat.completion.chunk","created":1773346123,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"cfoaVgskwEMm1A"}
 
-      data: {"id":"chatcmpl-DIdYqHJyPmEcge5DiRQlWSkaG70Zt","object":"chat.completion.chunk","created":1773334348,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":"Find"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"IpyCckAdcC60"}
+      data: {"id":"chatcmpl-DIgclnQPkNxEljF48SWE8JwL4QqK4","object":"chat.completion.chunk","created":1773346123,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":"Finding"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"w4aoChnGJ"}
 
-      data: {"id":"chatcmpl-DIdYqHJyPmEcge5DiRQlWSkaG70Zt","object":"chat.completion.chunk","created":1773334348,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" ."},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"4p8cl8qOm9MoiV"}
+      data: {"id":"chatcmpl-DIgclnQPkNxEljF48SWE8JwL4QqK4","object":"chat.completion.chunk","created":1773346123,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":" ."},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"KhMLocySx1RQuA"}
 
-      data: {"id":"chatcmpl-DIdYqHJyPmEcge5DiRQlWSkaG70Zt","object":"chat.completion.chunk","created":1773334348,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":"go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"LtAVfQWFCtiQ26"}
+      data: {"id":"chatcmpl-DIgclnQPkNxEljF48SWE8JwL4QqK4","object":"chat.completion.chunk","created":1773346123,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":"go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"7vdXUA1mdqHC4p"}
 
-      data: {"id":"chatcmpl-DIdYqHJyPmEcge5DiRQlWSkaG70Zt","object":"chat.completion.chunk","created":1773334348,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" Files"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"y9Hg73rArF"}
+      data: {"id":"chatcmpl-DIgclnQPkNxEljF48SWE8JwL4QqK4","object":"chat.completion.chunk","created":1773346123,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":" Files"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"vhERhjUtDP"}
 
-      data: {"id":"chatcmpl-DIdYqHJyPmEcge5DiRQlWSkaG70Zt","object":"chat.completion.chunk","created":1773334348,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"HJyJwsqDe4JW2"}
+      data: {"id":"chatcmpl-DIgclnQPkNxEljF48SWE8JwL4QqK4","object":"chat.completion.chunk","created":1773346123,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":" Using"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"IZdmx5EFhP"}
 
-      data: {"id":"chatcmpl-DIdYqHJyPmEcge5DiRQlWSkaG70Zt","object":"chat.completion.chunk","created":1773334348,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" Current"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ma1c369i"}
+      data: {"id":"chatcmpl-DIgclnQPkNxEljF48SWE8JwL4QqK4","object":"chat.completion.chunk","created":1773346123,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":" Glob"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"XRGDA3U054d"}
 
-      data: {"id":"chatcmpl-DIdYqHJyPmEcge5DiRQlWSkaG70Zt","object":"chat.completion.chunk","created":1773334348,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" Directory"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"JmOpW1"}
+      data: {"id":"chatcmpl-DIgclnQPkNxEljF48SWE8JwL4QqK4","object":"chat.completion.chunk","created":1773346123,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"L6KrfgAcH62KR"}
 
-      data: {"id":"chatcmpl-DIdYqHJyPmEcge5DiRQlWSkaG70Zt","object":"chat.completion.chunk","created":1773334348,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" Using"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"hfZT2hErIs"}
+      data: {"id":"chatcmpl-DIgclnQPkNxEljF48SWE8JwL4QqK4","object":"chat.completion.chunk","created":1773346123,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":" Current"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"xuOafesK"}
 
-      data: {"id":"chatcmpl-DIdYqHJyPmEcge5DiRQlWSkaG70Zt","object":"chat.completion.chunk","created":1773334348,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" Glob"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"rTl3sY36p8U"}
+      data: {"id":"chatcmpl-DIgclnQPkNxEljF48SWE8JwL4QqK4","object":"chat.completion.chunk","created":1773346123,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":" Directory"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"vZGKrG"}
 
-      data: {"id":"chatcmpl-DIdYqHJyPmEcge5DiRQlWSkaG70Zt","object":"chat.completion.chunk","created":1773334348,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"tFRAnIPzNy"}
+      data: {"id":"chatcmpl-DIgclnQPkNxEljF48SWE8JwL4QqK4","object":"chat.completion.chunk","created":1773346123,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"XFRL0WkCPj"}
 
-      data: {"id":"chatcmpl-DIdYqHJyPmEcge5DiRQlWSkaG70Zt","object":"chat.completion.chunk","created":1773334348,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[],"usage":{"prompt_tokens":137,"completion_tokens":9,"total_tokens":146,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"irzm6HTh50QtjR"}
+      data: {"id":"chatcmpl-DIgclnQPkNxEljF48SWE8JwL4QqK4","object":"chat.completion.chunk","created":1773346123,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[],"usage":{"prompt_tokens":137,"completion_tokens":9,"total_tokens":146,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"EDRwFgK6z3hAbw"}
 
       data: [DONE]
 
@@ -55,15 +55,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 523.979542ms
+    duration: 519.51625ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50695
+    content_length: 50896
     host: ""

internal/agent/testdata/TestCoderAgent/openai-gpt-5/grep_tool.yaml 🔗

@@ -24,33 +24,29 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-DIdYv3plZLNVUtPKvowfcfTgQO8XC","object":"chat.completion.chunk","created":1773334353,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Fhfh695jDrAvFh"}
+      data: {"id":"chatcmpl-DIgcuUeVNoSMAoX47EemdZSCJTZzY","object":"chat.completion.chunk","created":1773346132,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_22cd3c63e9","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"iSldZE4sXLjbM2"}
 
-      data: {"id":"chatcmpl-DIdYv3plZLNVUtPKvowfcfTgQO8XC","object":"chat.completion.chunk","created":1773334353,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":"Using"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"tZHLtEteJNk"}
+      data: {"id":"chatcmpl-DIgcuUeVNoSMAoX47EemdZSCJTZzY","object":"chat.completion.chunk","created":1773346132,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_22cd3c63e9","choices":[{"index":0,"delta":{"content":"Searching"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"NEct4Kc"}
 
-      data: {"id":"chatcmpl-DIdYv3plZLNVUtPKvowfcfTgQO8XC","object":"chat.completion.chunk","created":1773334353,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" Gre"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"RZKwqKCWsrZi"}
+      data: {"id":"chatcmpl-DIgcuUeVNoSMAoX47EemdZSCJTZzY","object":"chat.completion.chunk","created":1773346132,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_22cd3c63e9","choices":[{"index":0,"delta":{"content":" '"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"5H5Dj14eWE7hTh"}
 
-      data: {"id":"chatcmpl-DIdYv3plZLNVUtPKvowfcfTgQO8XC","object":"chat.completion.chunk","created":1773334353,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":"p"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"5Nf9HscEjmRla0a"}
+      data: {"id":"chatcmpl-DIgcuUeVNoSMAoX47EemdZSCJTZzY","object":"chat.completion.chunk","created":1773346132,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_22cd3c63e9","choices":[{"index":0,"delta":{"content":"package"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"9Ctm5HZkk"}
 
-      data: {"id":"chatcmpl-DIdYv3plZLNVUtPKvowfcfTgQO8XC","object":"chat.completion.chunk","created":1773334353,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" to"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"LxEFqEDUdkMVT"}
+      data: {"id":"chatcmpl-DIgcuUeVNoSMAoX47EemdZSCJTZzY","object":"chat.completion.chunk","created":1773346132,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_22cd3c63e9","choices":[{"index":0,"delta":{"content":"'"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"1NroVJmpjmd6qdP"}
 
-      data: {"id":"chatcmpl-DIdYv3plZLNVUtPKvowfcfTgQO8XC","object":"chat.completion.chunk","created":1773334353,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" Search"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"sqgdLGPJp"}
+      data: {"id":"chatcmpl-DIgcuUeVNoSMAoX47EemdZSCJTZzY","object":"chat.completion.chunk","created":1773346132,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_22cd3c63e9","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"bzjPiNS24nrkg"}
 
-      data: {"id":"chatcmpl-DIdYv3plZLNVUtPKvowfcfTgQO8XC","object":"chat.completion.chunk","created":1773334353,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" '"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"us5ynSwsWoj2bW"}
+      data: {"id":"chatcmpl-DIgcuUeVNoSMAoX47EemdZSCJTZzY","object":"chat.completion.chunk","created":1773346132,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_22cd3c63e9","choices":[{"index":0,"delta":{"content":" Go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"UqTnKJM4YMTa5"}
 
-      data: {"id":"chatcmpl-DIdYv3plZLNVUtPKvowfcfTgQO8XC","object":"chat.completion.chunk","created":1773334353,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":"Package"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"C4zK2aNrH"}
+      data: {"id":"chatcmpl-DIgcuUeVNoSMAoX47EemdZSCJTZzY","object":"chat.completion.chunk","created":1773346132,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_22cd3c63e9","choices":[{"index":0,"delta":{"content":" Files"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"8bDYz2kt8R"}
 
-      data: {"id":"chatcmpl-DIdYv3plZLNVUtPKvowfcfTgQO8XC","object":"chat.completion.chunk","created":1773334353,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":"'"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ccUhG2zkBAZJ4YW"}
+      data: {"id":"chatcmpl-DIgcuUeVNoSMAoX47EemdZSCJTZzY","object":"chat.completion.chunk","created":1773346132,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_22cd3c63e9","choices":[{"index":0,"delta":{"content":" with"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"54eqdXTY72H"}
 
-      data: {"id":"chatcmpl-DIdYv3plZLNVUtPKvowfcfTgQO8XC","object":"chat.completion.chunk","created":1773334353,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"dpUk1wi8FgDTY"}
+      data: {"id":"chatcmpl-DIgcuUeVNoSMAoX47EemdZSCJTZzY","object":"chat.completion.chunk","created":1773346132,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_22cd3c63e9","choices":[{"index":0,"delta":{"content":" grep"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"wMlECx61bJP"}
 
-      data: {"id":"chatcmpl-DIdYv3plZLNVUtPKvowfcfTgQO8XC","object":"chat.completion.chunk","created":1773334353,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" Go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"NxWYI2qTEWncA"}
+      data: {"id":"chatcmpl-DIgcuUeVNoSMAoX47EemdZSCJTZzY","object":"chat.completion.chunk","created":1773346132,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_22cd3c63e9","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"8ZsVcpfC6F"}
 
-      data: {"id":"chatcmpl-DIdYv3plZLNVUtPKvowfcfTgQO8XC","object":"chat.completion.chunk","created":1773334353,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" Files"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"dTXf8MjAEF"}
-
-      data: {"id":"chatcmpl-DIdYv3plZLNVUtPKvowfcfTgQO8XC","object":"chat.completion.chunk","created":1773334353,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"gIjYbBoNo9"}
-
-      data: {"id":"chatcmpl-DIdYv3plZLNVUtPKvowfcfTgQO8XC","object":"chat.completion.chunk","created":1773334353,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[],"usage":{"prompt_tokens":138,"completion_tokens":11,"total_tokens":149,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"MmPcoWNMbvn8Y"}
+      data: {"id":"chatcmpl-DIgcuUeVNoSMAoX47EemdZSCJTZzY","object":"chat.completion.chunk","created":1773346132,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_22cd3c63e9","choices":[],"usage":{"prompt_tokens":138,"completion_tokens":9,"total_tokens":147,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"5c9sIP95JwyNsv"}
 
       data: [DONE]
 
@@ -59,15 +55,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 624.648958ms
+    duration: 517.527708ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50693
+    content_length: 50894
     host: ""

internal/agent/testdata/TestCoderAgent/openai-gpt-5/ls_tool.yaml 🔗

@@ -24,27 +24,29 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-DIdZ3WGqCbKeYkYzkzZogVXkuNufD","object":"chat.completion.chunk","created":1773334361,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"7lajKJiYpVB229"}
+      data: {"id":"chatcmpl-DIgd3usqn3rK2LulE9sOc8Ys9KVyh","object":"chat.completion.chunk","created":1773346141,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"T0PHu5of1dr9ez"}
 
-      data: {"id":"chatcmpl-DIdZ3WGqCbKeYkYzkzZogVXkuNufD","object":"chat.completion.chunk","created":1773334361,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":"Listing"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"9OLzOjJTW"}
+      data: {"id":"chatcmpl-DIgd3usqn3rK2LulE9sOc8Ys9KVyh","object":"chat.completion.chunk","created":1773346141,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":"Using"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"kaV6ojPBQK2"}
 
-      data: {"id":"chatcmpl-DIdZ3WGqCbKeYkYzkzZogVXkuNufD","object":"chat.completion.chunk","created":1773334361,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" Files"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"esQpNVXJ2j"}
+      data: {"id":"chatcmpl-DIgd3usqn3rK2LulE9sOc8Ys9KVyh","object":"chat.completion.chunk","created":1773346141,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":" '"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"2eg2ZonmjCC37E"}
 
-      data: {"id":"chatcmpl-DIdZ3WGqCbKeYkYzkzZogVXkuNufD","object":"chat.completion.chunk","created":1773334361,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"fIyyjIuH7EHnd"}
+      data: {"id":"chatcmpl-DIgd3usqn3rK2LulE9sOc8Ys9KVyh","object":"chat.completion.chunk","created":1773346141,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":"ls"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"M6sxFQJakJm3dd"}
 
-      data: {"id":"chatcmpl-DIdZ3WGqCbKeYkYzkzZogVXkuNufD","object":"chat.completion.chunk","created":1773334361,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" Current"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Mhh3mf8I"}
+      data: {"id":"chatcmpl-DIgd3usqn3rK2LulE9sOc8Ys9KVyh","object":"chat.completion.chunk","created":1773346141,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":"'"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"OeQHO5aYO56WDMz"}
 
-      data: {"id":"chatcmpl-DIdZ3WGqCbKeYkYzkzZogVXkuNufD","object":"chat.completion.chunk","created":1773334361,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" Directory"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"NCsVhg"}
+      data: {"id":"chatcmpl-DIgd3usqn3rK2LulE9sOc8Ys9KVyh","object":"chat.completion.chunk","created":1773346141,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":" to"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"b89MsTugihzdX"}
 
-      data: {"id":"chatcmpl-DIdZ3WGqCbKeYkYzkzZogVXkuNufD","object":"chat.completion.chunk","created":1773334361,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" with"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"BIxWMhlwlQO"}
+      data: {"id":"chatcmpl-DIgd3usqn3rK2LulE9sOc8Ys9KVyh","object":"chat.completion.chunk","created":1773346141,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":" List"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"7MEjHpNVcS0"}
 
-      data: {"id":"chatcmpl-DIdZ3WGqCbKeYkYzkzZogVXkuNufD","object":"chat.completion.chunk","created":1773334361,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" ls"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"AWQwV5anzzJ9Z"}
+      data: {"id":"chatcmpl-DIgd3usqn3rK2LulE9sOc8Ys9KVyh","object":"chat.completion.chunk","created":1773346141,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":" Files"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"caJJIZ56Ne"}
 
-      data: {"id":"chatcmpl-DIdZ3WGqCbKeYkYzkzZogVXkuNufD","object":"chat.completion.chunk","created":1773334361,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" Command"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"JtOP1CJX"}
+      data: {"id":"chatcmpl-DIgd3usqn3rK2LulE9sOc8Ys9KVyh","object":"chat.completion.chunk","created":1773346141,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"YiJDyQc9vBKA7"}
 
-      data: {"id":"chatcmpl-DIdZ3WGqCbKeYkYzkzZogVXkuNufD","object":"chat.completion.chunk","created":1773334361,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"pavLwBMXC9"}
+      data: {"id":"chatcmpl-DIgd3usqn3rK2LulE9sOc8Ys9KVyh","object":"chat.completion.chunk","created":1773346141,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":" Directory"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"1R47Xd"}
 
-      data: {"id":"chatcmpl-DIdZ3WGqCbKeYkYzkzZogVXkuNufD","object":"chat.completion.chunk","created":1773334361,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[],"usage":{"prompt_tokens":135,"completion_tokens":8,"total_tokens":143,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"cWjmkE18o8vwX6"}
+      data: {"id":"chatcmpl-DIgd3usqn3rK2LulE9sOc8Ys9KVyh","object":"chat.completion.chunk","created":1773346141,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"DT1EYEwtdR"}
+
+      data: {"id":"chatcmpl-DIgd3usqn3rK2LulE9sOc8Ys9KVyh","object":"chat.completion.chunk","created":1773346141,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[],"usage":{"prompt_tokens":135,"completion_tokens":9,"total_tokens":144,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"vNwglUmg6ThoSE"}
 
       data: [DONE]
 
@@ -53,15 +55,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 2.201591583s
+    duration: 630.309125ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50687
+    content_length: 50888
     host: ""

internal/agent/testdata/TestCoderAgent/openai-gpt-5/multiedit_tool.yaml 🔗

@@ -24,41 +24,27 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-DIdhupjncVHOAcOyd2Ket03ysMRe2","object":"chat.completion.chunk","created":1773334910,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"iANduA3rOGWrUi"}
+      data: {"id":"chatcmpl-DIgdEo8vwexsZno9n14uW5RGLu5Ix","object":"chat.completion.chunk","created":1773346152,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"uHtKH1XdOv3YNP"}
 
-      data: {"id":"chatcmpl-DIdhupjncVHOAcOyd2Ket03ysMRe2","object":"chat.completion.chunk","created":1773334910,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":"Edit"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"3IstHaFYcuV7"}
+      data: {"id":"chatcmpl-DIgdEo8vwexsZno9n14uW5RGLu5Ix","object":"chat.completion.chunk","created":1773346152,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":"Edit"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"GfD4NZFunoaR"}
 
-      data: {"id":"chatcmpl-DIdhupjncVHOAcOyd2Ket03ysMRe2","object":"chat.completion.chunk","created":1773334910,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" '"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"bjYGtN3d8e6uXs"}
+      data: {"id":"chatcmpl-DIgdEo8vwexsZno9n14uW5RGLu5Ix","object":"chat.completion.chunk","created":1773346152,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":" Code"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"P53I5Ex575l"}
 
-      data: {"id":"chatcmpl-DIdhupjncVHOAcOyd2Ket03ysMRe2","object":"chat.completion.chunk","created":1773334910,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":"Hello"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"txXxy8cxqbv"}
+      data: {"id":"chatcmpl-DIgdEo8vwexsZno9n14uW5RGLu5Ix","object":"chat.completion.chunk","created":1773346152,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":" to"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"0KfR1AumNQnz8"}
 
-      data: {"id":"chatcmpl-DIdhupjncVHOAcOyd2Ket03ysMRe2","object":"chat.completion.chunk","created":1773334910,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"9xGrPfehWazbopl"}
+      data: {"id":"chatcmpl-DIgdEo8vwexsZno9n14uW5RGLu5Ix","object":"chat.completion.chunk","created":1773346152,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":" Update"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"BWVmTrFNp"}
 
-      data: {"id":"chatcmpl-DIdhupjncVHOAcOyd2Ket03ysMRe2","object":"chat.completion.chunk","created":1773334910,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" World"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"lKOAsjxlJA"}
+      data: {"id":"chatcmpl-DIgdEo8vwexsZno9n14uW5RGLu5Ix","object":"chat.completion.chunk","created":1773346152,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":" Message"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"0rXfqgvI"}
 
-      data: {"id":"chatcmpl-DIdhupjncVHOAcOyd2Ket03ysMRe2","object":"chat.completion.chunk","created":1773334910,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":"!'"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"M8uljU63Yx2qgT"}
+      data: {"id":"chatcmpl-DIgdEo8vwexsZno9n14uW5RGLu5Ix","object":"chat.completion.chunk","created":1773346152,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":" and"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"8d0rNQbcKmXp"}
 
-      data: {"id":"chatcmpl-DIdhupjncVHOAcOyd2Ket03ysMRe2","object":"chat.completion.chunk","created":1773334910,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" to"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"UrAQqvzfD9YDn"}
+      data: {"id":"chatcmpl-DIgdEo8vwexsZno9n14uW5RGLu5Ix","object":"chat.completion.chunk","created":1773346152,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":" Add"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"v7IvPTxoRTRT"}
 
-      data: {"id":"chatcmpl-DIdhupjncVHOAcOyd2Ket03ysMRe2","object":"chat.completion.chunk","created":1773334910,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" '"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"084P6iZVULHJk8"}
+      data: {"id":"chatcmpl-DIgdEo8vwexsZno9n14uW5RGLu5Ix","object":"chat.completion.chunk","created":1773346152,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":" Comment"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Tyf06vBC"}
 
-      data: {"id":"chatcmpl-DIdhupjncVHOAcOyd2Ket03ysMRe2","object":"chat.completion.chunk","created":1773334910,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":"Hello"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ouKrrdJ0ll5"}
+      data: {"id":"chatcmpl-DIgdEo8vwexsZno9n14uW5RGLu5Ix","object":"chat.completion.chunk","created":1773346152,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"SvGC99IZy2"}
 
-      data: {"id":"chatcmpl-DIdhupjncVHOAcOyd2Ket03ysMRe2","object":"chat.completion.chunk","created":1773334910,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"nbgZdMx96LiA1YH"}
-
-      data: {"id":"chatcmpl-DIdhupjncVHOAcOyd2Ket03ysMRe2","object":"chat.completion.chunk","created":1773334910,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" Crush"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"1ZQDg5fwhs"}
-
-      data: {"id":"chatcmpl-DIdhupjncVHOAcOyd2Ket03ysMRe2","object":"chat.completion.chunk","created":1773334910,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":"!'"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"gKFCin4HrPJYUK"}
-
-      data: {"id":"chatcmpl-DIdhupjncVHOAcOyd2Ket03ysMRe2","object":"chat.completion.chunk","created":1773334910,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"z9w6Gyb4aQWi8"}
-
-      data: {"id":"chatcmpl-DIdhupjncVHOAcOyd2Ket03ysMRe2","object":"chat.completion.chunk","created":1773334910,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" main"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"HDEHvBo973S"}
-
-      data: {"id":"chatcmpl-DIdhupjncVHOAcOyd2Ket03ysMRe2","object":"chat.completion.chunk","created":1773334910,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":".go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"eQV1sg93r4wfB"}
-
-      data: {"id":"chatcmpl-DIdhupjncVHOAcOyd2Ket03ysMRe2","object":"chat.completion.chunk","created":1773334910,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"qc1ig2iugl"}
-
-      data: {"id":"chatcmpl-DIdhupjncVHOAcOyd2Ket03ysMRe2","object":"chat.completion.chunk","created":1773334910,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[],"usage":{"prompt_tokens":157,"completion_tokens":15,"total_tokens":172,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"zXFdWwxGIwErq"}
+      data: {"id":"chatcmpl-DIgdEo8vwexsZno9n14uW5RGLu5Ix","object":"chat.completion.chunk","created":1773346152,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[],"usage":{"prompt_tokens":157,"completion_tokens":8,"total_tokens":165,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"FIcmzhdGIYNUGK"}
 
       data: [DONE]
 
@@ -67,15 +53,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 961.93275ms
+    duration: 620.533292ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50773
+    content_length: 50974
     host: ""

internal/agent/testdata/TestCoderAgent/openai-gpt-5/parallel_tool_calls.yaml 🔗

@@ -24,27 +24,25 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-DIdb2KX6s3e67I6yTJH1D4WI5b69R","object":"chat.completion.chunk","created":1773334484,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"RFzsvHbCvGNdVI"}
+      data: {"id":"chatcmpl-DIgfXYcSQXhQvAsfquHHsAqUpAkO2","object":"chat.completion.chunk","created":1773346295,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"vve0SiQeoAve0J"}
 
-      data: {"id":"chatcmpl-DIdb2KX6s3e67I6yTJH1D4WI5b69R","object":"chat.completion.chunk","created":1773334484,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":"Finding"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"kf6TyrMNB"}
+      data: {"id":"chatcmpl-DIgfXYcSQXhQvAsfquHHsAqUpAkO2","object":"chat.completion.chunk","created":1773346295,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":"Parallel"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"LhhJhYlW"}
 
-      data: {"id":"chatcmpl-DIdb2KX6s3e67I6yTJH1D4WI5b69R","object":"chat.completion.chunk","created":1773334484,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" and"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"EcV7u1SxcEIF"}
+      data: {"id":"chatcmpl-DIgfXYcSQXhQvAsfquHHsAqUpAkO2","object":"chat.completion.chunk","created":1773346295,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":" Execution"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"rPvfeJ"}
 
-      data: {"id":"chatcmpl-DIdb2KX6s3e67I6yTJH1D4WI5b69R","object":"chat.completion.chunk","created":1773334484,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" Listing"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"JIiHceno"}
+      data: {"id":"chatcmpl-DIgfXYcSQXhQvAsfquHHsAqUpAkO2","object":"chat.completion.chunk","created":1773346295,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":" of"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"3LZmYKhy5uD0N"}
 
-      data: {"id":"chatcmpl-DIdb2KX6s3e67I6yTJH1D4WI5b69R","object":"chat.completion.chunk","created":1773334484,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" ."},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"cg3PVIERxPTFLS"}
+      data: {"id":"chatcmpl-DIgfXYcSQXhQvAsfquHHsAqUpAkO2","object":"chat.completion.chunk","created":1773346295,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":" Glob"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"fa2BY7pEqlg"}
 
-      data: {"id":"chatcmpl-DIdb2KX6s3e67I6yTJH1D4WI5b69R","object":"chat.completion.chunk","created":1773334484,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":"go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"vcLx1GcodxRQyG"}
+      data: {"id":"chatcmpl-DIgfXYcSQXhQvAsfquHHsAqUpAkO2","object":"chat.completion.chunk","created":1773346295,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":" and"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"4hWSdHnJE1dL"}
 
-      data: {"id":"chatcmpl-DIdb2KX6s3e67I6yTJH1D4WI5b69R","object":"chat.completion.chunk","created":1773334484,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" Files"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"447BTtDiIw"}
+      data: {"id":"chatcmpl-DIgfXYcSQXhQvAsfquHHsAqUpAkO2","object":"chat.completion.chunk","created":1773346295,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":" LS"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"lD3W51GQd7Fd5"}
 
-      data: {"id":"chatcmpl-DIdb2KX6s3e67I6yTJH1D4WI5b69R","object":"chat.completion.chunk","created":1773334484,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"dekyXUvs7LlL0"}
+      data: {"id":"chatcmpl-DIgfXYcSQXhQvAsfquHHsAqUpAkO2","object":"chat.completion.chunk","created":1773346295,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":" Commands"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"9dhzkf7"}
 
-      data: {"id":"chatcmpl-DIdb2KX6s3e67I6yTJH1D4WI5b69R","object":"chat.completion.chunk","created":1773334484,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" Parallel"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"H7cHwqR"}
+      data: {"id":"chatcmpl-DIgfXYcSQXhQvAsfquHHsAqUpAkO2","object":"chat.completion.chunk","created":1773346295,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"yuDuN4bAk4"}
 
-      data: {"id":"chatcmpl-DIdb2KX6s3e67I6yTJH1D4WI5b69R","object":"chat.completion.chunk","created":1773334484,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"wvjLkNtatH"}
-
-      data: {"id":"chatcmpl-DIdb2KX6s3e67I6yTJH1D4WI5b69R","object":"chat.completion.chunk","created":1773334484,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[],"usage":{"prompt_tokens":154,"completion_tokens":8,"total_tokens":162,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"bNHjBQuNoikQQJ"}
+      data: {"id":"chatcmpl-DIgfXYcSQXhQvAsfquHHsAqUpAkO2","object":"chat.completion.chunk","created":1773346295,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[],"usage":{"prompt_tokens":154,"completion_tokens":7,"total_tokens":161,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"5jJIZmrchS4X0N"}
 
       data: [DONE]
 
@@ -53,15 +51,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 664.656334ms
+    duration: 541.726917ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50784
+    content_length: 50985
     host: ""

internal/agent/testdata/TestCoderAgent/openai-gpt-5/read_a_file.yaml 🔗

@@ -24,21 +24,17 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-DIdWswtHtxcJa8Sn8wZCXtVmPWNkK","object":"chat.completion.chunk","created":1773334226,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_b7c8e3f100","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"pUedaoeP2EqwWY"}
+      data: {"id":"chatcmpl-DIgbNR7z9AwDFGGArsrnbo5IHDoFO","object":"chat.completion.chunk","created":1773346037,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_7cdbc83d36","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"h3aEUDsuEOcdM2"}
 
-      data: {"id":"chatcmpl-DIdWswtHtxcJa8Sn8wZCXtVmPWNkK","object":"chat.completion.chunk","created":1773334226,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_b7c8e3f100","choices":[{"index":0,"delta":{"content":"Reading"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"lua9ZgUIz"}
+      data: {"id":"chatcmpl-DIgbNR7z9AwDFGGArsrnbo5IHDoFO","object":"chat.completion.chunk","created":1773346037,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_7cdbc83d36","choices":[{"index":0,"delta":{"content":"Understanding"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"lI8"}
 
-      data: {"id":"chatcmpl-DIdWswtHtxcJa8Sn8wZCXtVmPWNkK","object":"chat.completion.chunk","created":1773334226,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_b7c8e3f100","choices":[{"index":0,"delta":{"content":" the"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"VxycIoL57Nbq"}
+      data: {"id":"chatcmpl-DIgbNR7z9AwDFGGArsrnbo5IHDoFO","object":"chat.completion.chunk","created":1773346037,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_7cdbc83d36","choices":[{"index":0,"delta":{"content":" Go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"BlCB1J7w94tsJ"}
 
-      data: {"id":"chatcmpl-DIdWswtHtxcJa8Sn8wZCXtVmPWNkK","object":"chat.completion.chunk","created":1773334226,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_b7c8e3f100","choices":[{"index":0,"delta":{"content":" Go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"bYa0SQSGULJJ9"}
+      data: {"id":"chatcmpl-DIgbNR7z9AwDFGGArsrnbo5IHDoFO","object":"chat.completion.chunk","created":1773346037,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_7cdbc83d36","choices":[{"index":0,"delta":{"content":" Modules"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"SSUmRbVb"}
 
-      data: {"id":"chatcmpl-DIdWswtHtxcJa8Sn8wZCXtVmPWNkK","object":"chat.completion.chunk","created":1773334226,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_b7c8e3f100","choices":[{"index":0,"delta":{"content":" Mod"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"QFUyfG5cg2Tc"}
+      data: {"id":"chatcmpl-DIgbNR7z9AwDFGGArsrnbo5IHDoFO","object":"chat.completion.chunk","created":1773346037,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_7cdbc83d36","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"Lh8q0ncyK0"}
 
-      data: {"id":"chatcmpl-DIdWswtHtxcJa8Sn8wZCXtVmPWNkK","object":"chat.completion.chunk","created":1773334226,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_b7c8e3f100","choices":[{"index":0,"delta":{"content":" File"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"vqFyVhyEF6d"}
-
-      data: {"id":"chatcmpl-DIdWswtHtxcJa8Sn8wZCXtVmPWNkK","object":"chat.completion.chunk","created":1773334226,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_b7c8e3f100","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"zP9ztECoBw"}
-
-      data: {"id":"chatcmpl-DIdWswtHtxcJa8Sn8wZCXtVmPWNkK","object":"chat.completion.chunk","created":1773334226,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_b7c8e3f100","choices":[],"usage":{"prompt_tokens":129,"completion_tokens":5,"total_tokens":134,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"3eVPENhdYX3vmH"}
+      data: {"id":"chatcmpl-DIgbNR7z9AwDFGGArsrnbo5IHDoFO","object":"chat.completion.chunk","created":1773346037,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_7cdbc83d36","choices":[],"usage":{"prompt_tokens":129,"completion_tokens":3,"total_tokens":132,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"eGJiZzX7fhB3DQ"}
 
       data: [DONE]
 
@@ -47,15 +43,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 1.509886917s
+    duration: 706.98175ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50657
+    content_length: 50858
     host: ""

internal/agent/testdata/TestCoderAgent/openai-gpt-5/simple_test.yaml 🔗

@@ -24,17 +24,15 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-DIdWnm56V1y8NH3Bc7K8Qy60YeYsc","object":"chat.completion.chunk","created":1773334221,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"v83bH8vMYXG0sA"}
+      data: {"id":"chatcmpl-DIgbK6R5yUtBIGQDJgY0TPRYQOi6y","object":"chat.completion.chunk","created":1773346034,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_2a3fb89a78","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"abFmE7omz4JrEU"}
 
-      data: {"id":"chatcmpl-DIdWnm56V1y8NH3Bc7K8Qy60YeYsc","object":"chat.completion.chunk","created":1773334221,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":"Basic"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"pYFzUhshaFF"}
+      data: {"id":"chatcmpl-DIgbK6R5yUtBIGQDJgY0TPRYQOi6y","object":"chat.completion.chunk","created":1773346034,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_2a3fb89a78","choices":[{"index":0,"delta":{"content":"Greeting"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"N38b9dFW"}
 
-      data: {"id":"chatcmpl-DIdWnm56V1y8NH3Bc7K8Qy60YeYsc","object":"chat.completion.chunk","created":1773334221,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" Greeting"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ZRGKPOG"}
+      data: {"id":"chatcmpl-DIgbK6R5yUtBIGQDJgY0TPRYQOi6y","object":"chat.completion.chunk","created":1773346034,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_2a3fb89a78","choices":[{"index":0,"delta":{"content":" Message"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"WJYwnM0H"}
 
-      data: {"id":"chatcmpl-DIdWnm56V1y8NH3Bc7K8Qy60YeYsc","object":"chat.completion.chunk","created":1773334221,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" Message"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"2j2O6qIt"}
+      data: {"id":"chatcmpl-DIgbK6R5yUtBIGQDJgY0TPRYQOi6y","object":"chat.completion.chunk","created":1773346034,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_2a3fb89a78","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"HwCdXBSzEC"}
 
-      data: {"id":"chatcmpl-DIdWnm56V1y8NH3Bc7K8Qy60YeYsc","object":"chat.completion.chunk","created":1773334221,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"sixpqtFiiz"}
-
-      data: {"id":"chatcmpl-DIdWnm56V1y8NH3Bc7K8Qy60YeYsc","object":"chat.completion.chunk","created":1773334221,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[],"usage":{"prompt_tokens":126,"completion_tokens":3,"total_tokens":129,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"GPnDh0UExdHoh3"}
+      data: {"id":"chatcmpl-DIgbK6R5yUtBIGQDJgY0TPRYQOi6y","object":"chat.completion.chunk","created":1773346034,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_2a3fb89a78","choices":[],"usage":{"prompt_tokens":126,"completion_tokens":2,"total_tokens":128,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"VcX20EEMDDv4zM"}
 
       data: [DONE]
 
@@ -43,15 +41,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 1.762343791s
+    duration: 919.449334ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50647
+    content_length: 50848
     host: ""

internal/agent/testdata/TestCoderAgent/openai-gpt-5/sourcegraph_tool.yaml 🔗

@@ -24,31 +24,35 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-DIdaK0c0xGAyhl5bETTVRBNWyfJkF","object":"chat.completion.chunk","created":1773334440,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"nC4vu98Cw4nNoH"}
+      data: {"id":"chatcmpl-DIgea9hwz4OpfP3VrP7BqtsKtzHy8","object":"chat.completion.chunk","created":1773346236,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"zkyoMu4xoVx6cx"}
 
-      data: {"id":"chatcmpl-DIdaK0c0xGAyhl5bETTVRBNWyfJkF","object":"chat.completion.chunk","created":1773334440,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":"Searching"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"fRWtjkH"}
+      data: {"id":"chatcmpl-DIgea9hwz4OpfP3VrP7BqtsKtzHy8","object":"chat.completion.chunk","created":1773346236,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":"Searching"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"nDxsCPu"}
 
-      data: {"id":"chatcmpl-DIdaK0c0xGAyhl5bETTVRBNWyfJkF","object":"chat.completion.chunk","created":1773334440,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" func"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"gj7k0LEExwr"}
+      data: {"id":"chatcmpl-DIgea9hwz4OpfP3VrP7BqtsKtzHy8","object":"chat.completion.chunk","created":1773346236,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":" '"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"BbicZpCukzDvXw"}
 
-      data: {"id":"chatcmpl-DIdaK0c0xGAyhl5bETTVRBNWyfJkF","object":"chat.completion.chunk","created":1773334440,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" main"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"IWVpT73Ux2j"}
+      data: {"id":"chatcmpl-DIgea9hwz4OpfP3VrP7BqtsKtzHy8","object":"chat.completion.chunk","created":1773346236,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":"func"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"YRjaWaC6KPev"}
 
-      data: {"id":"chatcmpl-DIdaK0c0xGAyhl5bETTVRBNWyfJkF","object":"chat.completion.chunk","created":1773334440,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"urBoCLVxs2xhI"}
+      data: {"id":"chatcmpl-DIgea9hwz4OpfP3VrP7BqtsKtzHy8","object":"chat.completion.chunk","created":1773346236,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":" main"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"P3Wom0W0U5n"}
 
-      data: {"id":"chatcmpl-DIdaK0c0xGAyhl5bETTVRBNWyfJkF","object":"chat.completion.chunk","created":1773334440,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" Go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Iz9TWBXae7beg"}
+      data: {"id":"chatcmpl-DIgea9hwz4OpfP3VrP7BqtsKtzHy8","object":"chat.completion.chunk","created":1773346236,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":"'"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"GwooI4y6nUPZXFk"}
 
-      data: {"id":"chatcmpl-DIdaK0c0xGAyhl5bETTVRBNWyfJkF","object":"chat.completion.chunk","created":1773334440,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" Re"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"abGDp7jCITZ22"}
+      data: {"id":"chatcmpl-DIgea9hwz4OpfP3VrP7BqtsKtzHy8","object":"chat.completion.chunk","created":1773346236,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"EE6vq4kWKW1ls"}
 
-      data: {"id":"chatcmpl-DIdaK0c0xGAyhl5bETTVRBNWyfJkF","object":"chat.completion.chunk","created":1773334440,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":"positories"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ZrI0xz"}
+      data: {"id":"chatcmpl-DIgea9hwz4OpfP3VrP7BqtsKtzHy8","object":"chat.completion.chunk","created":1773346236,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":" Go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"4jDIiRb3w0zWk"}
 
-      data: {"id":"chatcmpl-DIdaK0c0xGAyhl5bETTVRBNWyfJkF","object":"chat.completion.chunk","created":1773334440,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" with"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ZpNGg9OTt2G"}
+      data: {"id":"chatcmpl-DIgea9hwz4OpfP3VrP7BqtsKtzHy8","object":"chat.completion.chunk","created":1773346236,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":" Re"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"zZ5LRyqjNOOf4"}
 
-      data: {"id":"chatcmpl-DIdaK0c0xGAyhl5bETTVRBNWyfJkF","object":"chat.completion.chunk","created":1773334440,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" Source"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"hibLob7hq"}
+      data: {"id":"chatcmpl-DIgea9hwz4OpfP3VrP7BqtsKtzHy8","object":"chat.completion.chunk","created":1773346236,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":"positories"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"WIPhQT"}
 
-      data: {"id":"chatcmpl-DIdaK0c0xGAyhl5bETTVRBNWyfJkF","object":"chat.completion.chunk","created":1773334440,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":"graph"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"b268xHiIIum"}
+      data: {"id":"chatcmpl-DIgea9hwz4OpfP3VrP7BqtsKtzHy8","object":"chat.completion.chunk","created":1773346236,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":" with"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"I51EX5NB2TH"}
 
-      data: {"id":"chatcmpl-DIdaK0c0xGAyhl5bETTVRBNWyfJkF","object":"chat.completion.chunk","created":1773334440,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"ZqBBu7fqo7"}
+      data: {"id":"chatcmpl-DIgea9hwz4OpfP3VrP7BqtsKtzHy8","object":"chat.completion.chunk","created":1773346236,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":" Source"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"rD2GUHQ4C"}
 
-      data: {"id":"chatcmpl-DIdaK0c0xGAyhl5bETTVRBNWyfJkF","object":"chat.completion.chunk","created":1773334440,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[],"usage":{"prompt_tokens":138,"completion_tokens":10,"total_tokens":148,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"KGIEhLUB5DNKe"}
+      data: {"id":"chatcmpl-DIgea9hwz4OpfP3VrP7BqtsKtzHy8","object":"chat.completion.chunk","created":1773346236,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":"graph"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Dg3TMLF9Ros"}
+
+      data: {"id":"chatcmpl-DIgea9hwz4OpfP3VrP7BqtsKtzHy8","object":"chat.completion.chunk","created":1773346236,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"AZaU2kawGZ"}
+
+      data: {"id":"chatcmpl-DIgea9hwz4OpfP3VrP7BqtsKtzHy8","object":"chat.completion.chunk","created":1773346236,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[],"usage":{"prompt_tokens":138,"completion_tokens":12,"total_tokens":150,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"DRfU65h3iz1GX"}
 
       data: [DONE]
 
@@ -57,15 +61,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 997.235292ms
+    duration: 578.111292ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50707
+    content_length: 50908
     host: ""

internal/agent/testdata/TestCoderAgent/openai-gpt-5/update_a_file.yaml 🔗

@@ -24,31 +24,31 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-DIdXMH3Ri3UnlP6s8cylTLAhHl28e","object":"chat.completion.chunk","created":1773334256,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_44968754fe","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"7kEFqcupr6xYGu"}
+      data: {"id":"chatcmpl-DIgbUxWHI144OwWvmvV6m9MU7HQM2","object":"chat.completion.chunk","created":1773346044,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_44968754fe","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"omtKv086CvMki9"}
 
-      data: {"id":"chatcmpl-DIdXMH3Ri3UnlP6s8cylTLAhHl28e","object":"chat.completion.chunk","created":1773334256,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_44968754fe","choices":[{"index":0,"delta":{"content":"Update"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"0CViRwrVob"}
+      data: {"id":"chatcmpl-DIgbUxWHI144OwWvmvV6m9MU7HQM2","object":"chat.completion.chunk","created":1773346044,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_44968754fe","choices":[{"index":0,"delta":{"content":"Update"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ZEXCH8fpHw"}
 
-      data: {"id":"chatcmpl-DIdXMH3Ri3UnlP6s8cylTLAhHl28e","object":"chat.completion.chunk","created":1773334256,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_44968754fe","choices":[{"index":0,"delta":{"content":" main"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ohOz0n1PHu0"}
+      data: {"id":"chatcmpl-DIgbUxWHI144OwWvmvV6m9MU7HQM2","object":"chat.completion.chunk","created":1773346044,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_44968754fe","choices":[{"index":0,"delta":{"content":" main"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"aJATAdu3YXf"}
 
-      data: {"id":"chatcmpl-DIdXMH3Ri3UnlP6s8cylTLAhHl28e","object":"chat.completion.chunk","created":1773334256,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_44968754fe","choices":[{"index":0,"delta":{"content":".go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"iZIw8jaCpH8vj"}
+      data: {"id":"chatcmpl-DIgbUxWHI144OwWvmvV6m9MU7HQM2","object":"chat.completion.chunk","created":1773346044,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_44968754fe","choices":[{"index":0,"delta":{"content":".go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"65HJPfi0HP3YE"}
 
-      data: {"id":"chatcmpl-DIdXMH3Ri3UnlP6s8cylTLAhHl28e","object":"chat.completion.chunk","created":1773334256,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_44968754fe","choices":[{"index":0,"delta":{"content":" to"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"6Noe85Tpagy7t"}
+      data: {"id":"chatcmpl-DIgbUxWHI144OwWvmvV6m9MU7HQM2","object":"chat.completion.chunk","created":1773346044,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_44968754fe","choices":[{"index":0,"delta":{"content":" to"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"vnkod9UqKg6kp"}
 
-      data: {"id":"chatcmpl-DIdXMH3Ri3UnlP6s8cylTLAhHl28e","object":"chat.completion.chunk","created":1773334256,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_44968754fe","choices":[{"index":0,"delta":{"content":" Print"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"79pPN00N2T"}
+      data: {"id":"chatcmpl-DIgbUxWHI144OwWvmvV6m9MU7HQM2","object":"chat.completion.chunk","created":1773346044,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_44968754fe","choices":[{"index":0,"delta":{"content":" Print"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"yxbUPhFzxi"}
 
-      data: {"id":"chatcmpl-DIdXMH3Ri3UnlP6s8cylTLAhHl28e","object":"chat.completion.chunk","created":1773334256,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_44968754fe","choices":[{"index":0,"delta":{"content":" \""},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"tsAilwU5lUXuJ"}
+      data: {"id":"chatcmpl-DIgbUxWHI144OwWvmvV6m9MU7HQM2","object":"chat.completion.chunk","created":1773346044,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_44968754fe","choices":[{"index":0,"delta":{"content":" \""},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"q1dEe2zLZzA1S"}
 
-      data: {"id":"chatcmpl-DIdXMH3Ri3UnlP6s8cylTLAhHl28e","object":"chat.completion.chunk","created":1773334256,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_44968754fe","choices":[{"index":0,"delta":{"content":"Hello"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"bapG7UUINpC"}
+      data: {"id":"chatcmpl-DIgbUxWHI144OwWvmvV6m9MU7HQM2","object":"chat.completion.chunk","created":1773346044,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_44968754fe","choices":[{"index":0,"delta":{"content":"Hello"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"p2SCTWanJnk"}
 
-      data: {"id":"chatcmpl-DIdXMH3Ri3UnlP6s8cylTLAhHl28e","object":"chat.completion.chunk","created":1773334256,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_44968754fe","choices":[{"index":0,"delta":{"content":" from"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"zqRsSPIeKLv"}
+      data: {"id":"chatcmpl-DIgbUxWHI144OwWvmvV6m9MU7HQM2","object":"chat.completion.chunk","created":1773346044,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_44968754fe","choices":[{"index":0,"delta":{"content":" from"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"qy9fD0ToahO"}
 
-      data: {"id":"chatcmpl-DIdXMH3Ri3UnlP6s8cylTLAhHl28e","object":"chat.completion.chunk","created":1773334256,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_44968754fe","choices":[{"index":0,"delta":{"content":" Crush"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ChkF8G1Ez3"}
+      data: {"id":"chatcmpl-DIgbUxWHI144OwWvmvV6m9MU7HQM2","object":"chat.completion.chunk","created":1773346044,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_44968754fe","choices":[{"index":0,"delta":{"content":" Crush"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"13k3IIX4dD"}
 
-      data: {"id":"chatcmpl-DIdXMH3Ri3UnlP6s8cylTLAhHl28e","object":"chat.completion.chunk","created":1773334256,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_44968754fe","choices":[{"index":0,"delta":{"content":"\""},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"93GTrT8XjbawW3"}
+      data: {"id":"chatcmpl-DIgbUxWHI144OwWvmvV6m9MU7HQM2","object":"chat.completion.chunk","created":1773346044,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_44968754fe","choices":[{"index":0,"delta":{"content":"\""},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"22eb1C3HamxEaF"}
 
-      data: {"id":"chatcmpl-DIdXMH3Ri3UnlP6s8cylTLAhHl28e","object":"chat.completion.chunk","created":1773334256,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_44968754fe","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"OUE4eOWhgu"}
+      data: {"id":"chatcmpl-DIgbUxWHI144OwWvmvV6m9MU7HQM2","object":"chat.completion.chunk","created":1773346044,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_44968754fe","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"NpdtMX0n82"}
 
-      data: {"id":"chatcmpl-DIdXMH3Ri3UnlP6s8cylTLAhHl28e","object":"chat.completion.chunk","created":1773334256,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_44968754fe","choices":[],"usage":{"prompt_tokens":139,"completion_tokens":10,"total_tokens":149,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"hZuBL8kKx2W3m"}
+      data: {"id":"chatcmpl-DIgbUxWHI144OwWvmvV6m9MU7HQM2","object":"chat.completion.chunk","created":1773346044,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_44968754fe","choices":[],"usage":{"prompt_tokens":139,"completion_tokens":10,"total_tokens":149,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"AiiC5wZHOeur4"}
 
       data: [DONE]
 
@@ -57,15 +57,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 2.616216541s
+    duration: 523.732ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50713
+    content_length: 50914
     host: ""

internal/agent/testdata/TestCoderAgent/openai-gpt-5/write_tool.yaml 🔗

@@ -24,25 +24,23 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-DIdam3YV5l9zQwNatViQ1L5zBscr0","object":"chat.completion.chunk","created":1773334468,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"JKSGPIMIpUUTLZ"}
+      data: {"id":"chatcmpl-DIgfCpDj2oYbQgEPcRwZLZ7AyDMyL","object":"chat.completion.chunk","created":1773346274,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"lElIIxTR6SfSJe"}
 
-      data: {"id":"chatcmpl-DIdam3YV5l9zQwNatViQ1L5zBscr0","object":"chat.completion.chunk","created":1773334468,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":"Creating"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"moxzaDGd"}
+      data: {"id":"chatcmpl-DIgfCpDj2oYbQgEPcRwZLZ7AyDMyL","object":"chat.completion.chunk","created":1773346274,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":"Creating"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"aJcyTcJt"}
 
-      data: {"id":"chatcmpl-DIdam3YV5l9zQwNatViQ1L5zBscr0","object":"chat.completion.chunk","created":1773334468,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"6dGrnnnqp0Mo55"}
+      data: {"id":"chatcmpl-DIgfCpDj2oYbQgEPcRwZLZ7AyDMyL","object":"chat.completion.chunk","created":1773346274,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":" config"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"5h6rbfdKc"}
 
-      data: {"id":"chatcmpl-DIdam3YV5l9zQwNatViQ1L5zBscr0","object":"chat.completion.chunk","created":1773334468,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" config"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ZbKDhzJjr"}
+      data: {"id":"chatcmpl-DIgfCpDj2oYbQgEPcRwZLZ7AyDMyL","object":"chat.completion.chunk","created":1773346274,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":".json"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"U0XSGt1c8eN"}
 
-      data: {"id":"chatcmpl-DIdam3YV5l9zQwNatViQ1L5zBscr0","object":"chat.completion.chunk","created":1773334468,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":".json"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"j80WUfYfoJX"}
+      data: {"id":"chatcmpl-DIgfCpDj2oYbQgEPcRwZLZ7AyDMyL","object":"chat.completion.chunk","created":1773346274,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":" with"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"LyOc5aUnXjO"}
 
-      data: {"id":"chatcmpl-DIdam3YV5l9zQwNatViQ1L5zBscr0","object":"chat.completion.chunk","created":1773334468,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" File"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"UZKUCEsdpNW"}
+      data: {"id":"chatcmpl-DIgfCpDj2oYbQgEPcRwZLZ7AyDMyL","object":"chat.completion.chunk","created":1773346274,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":" Initial"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"xERgMAB3"}
 
-      data: {"id":"chatcmpl-DIdam3YV5l9zQwNatViQ1L5zBscr0","object":"chat.completion.chunk","created":1773334468,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" with"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"A74Y07SzsTu"}
+      data: {"id":"chatcmpl-DIgfCpDj2oYbQgEPcRwZLZ7AyDMyL","object":"chat.completion.chunk","created":1773346274,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{"content":" Content"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"x7cKTSzp"}
 
-      data: {"id":"chatcmpl-DIdam3YV5l9zQwNatViQ1L5zBscr0","object":"chat.completion.chunk","created":1773334468,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{"content":" Content"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"RSrmUs6O"}
+      data: {"id":"chatcmpl-DIgfCpDj2oYbQgEPcRwZLZ7AyDMyL","object":"chat.completion.chunk","created":1773346274,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"xt5qjxN5v0"}
 
-      data: {"id":"chatcmpl-DIdam3YV5l9zQwNatViQ1L5zBscr0","object":"chat.completion.chunk","created":1773334468,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"QwkeA195sh"}
-
-      data: {"id":"chatcmpl-DIdam3YV5l9zQwNatViQ1L5zBscr0","object":"chat.completion.chunk","created":1773334468,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_044ecc5410","choices":[],"usage":{"prompt_tokens":153,"completion_tokens":7,"total_tokens":160,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"SaIyfhYC03X2Ok"}
+      data: {"id":"chatcmpl-DIgfCpDj2oYbQgEPcRwZLZ7AyDMyL","object":"chat.completion.chunk","created":1773346274,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_18c1fee47e","choices":[],"usage":{"prompt_tokens":153,"completion_tokens":6,"total_tokens":159,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"R31AJ3GYVMTuit"}
 
       data: [DONE]
 
@@ -51,15 +49,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 501.753667ms
+    duration: 518.668542ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50750
+    content_length: 50951
     host: ""

internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/bash_tool.yaml 🔗

@@ -24,19 +24,19 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"gen-1773334532-bmT1HKLd2yUd7E3laqhc","object":"chat.completion.chunk","created":1773334532,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"DeepInfra","choices":[{"index":0,"delta":{"content":"Create","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+      data: {"id":"gen-1773346329-EWUWqwmb1NUxgPTCQmMN","object":"chat.completion.chunk","created":1773346329,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Alibaba","choices":[{"index":0,"delta":{"content":"Create","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334532-bmT1HKLd2yUd7E3laqhc","object":"chat.completion.chunk","created":1773334532,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"DeepInfra","choices":[{"index":0,"delta":{"content":" test","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+      data: {"id":"gen-1773346329-EWUWqwmb1NUxgPTCQmMN","object":"chat.completion.chunk","created":1773346329,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Alibaba","choices":[{"index":0,"delta":{"content":" test","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334532-bmT1HKLd2yUd7E3laqhc","object":"chat.completion.chunk","created":1773334532,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"DeepInfra","choices":[{"index":0,"delta":{"content":".txt with","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+      data: {"id":"gen-1773346329-EWUWqwmb1NUxgPTCQmMN","object":"chat.completion.chunk","created":1773346329,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Alibaba","choices":[{"index":0,"delta":{"content":".txt with","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334532-bmT1HKLd2yUd7E3laqhc","object":"chat.completion.chunk","created":1773334532,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"DeepInfra","choices":[{"index":0,"delta":{"content":" hello bash using","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+      data: {"id":"gen-1773346329-EWUWqwmb1NUxgPTCQmMN","object":"chat.completion.chunk","created":1773346329,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Alibaba","choices":[{"index":0,"delta":{"content":" hello bash using","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334532-bmT1HKLd2yUd7E3laqhc","object":"chat.completion.chunk","created":1773334532,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"DeepInfra","choices":[{"index":0,"delta":{"content":" bash","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+      data: {"id":"gen-1773346329-EWUWqwmb1NUxgPTCQmMN","object":"chat.completion.chunk","created":1773346329,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Alibaba","choices":[{"index":0,"delta":{"content":" bash","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334532-bmT1HKLd2yUd7E3laqhc","object":"chat.completion.chunk","created":1773334532,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"DeepInfra","choices":[{"index":0,"delta":{"content":"","role":"assistant"},"finish_reason":"stop","native_finish_reason":"stop"}]}
+      data: {"id":"gen-1773346329-EWUWqwmb1NUxgPTCQmMN","object":"chat.completion.chunk","created":1773346329,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Alibaba","choices":[{"index":0,"delta":{"content":"","role":"assistant"},"finish_reason":"stop","native_finish_reason":"stop"}]}
 
-      data: {"id":"gen-1773334532-bmT1HKLd2yUd7E3laqhc","object":"chat.completion.chunk","created":1773334532,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"DeepInfra","choices":[],"usage":{"prompt_tokens":147,"completion_tokens":9,"total_tokens":156,"cost":0.00002313,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"cache_write_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.00002313,"upstream_inference_prompt_cost":0.00001323,"upstream_inference_completions_cost":0.0000099},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
+      data: {"id":"gen-1773346329-EWUWqwmb1NUxgPTCQmMN","object":"chat.completion.chunk","created":1773346329,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Alibaba","choices":[],"usage":{"prompt_tokens":151,"completion_tokens":8,"total_tokens":159,"cost":0.0000209625,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"cache_write_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.00003225,"upstream_inference_prompt_cost":0.00002265,"upstream_inference_completions_cost":0.0000096},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
 
       data: [DONE]
 
@@ -45,15 +45,15 @@ interactions:
       - text/event-stream
     status: 200 OK
     code: 200
-    duration: 383.88475ms
+    duration: 711.943708ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50883
+    content_length: 51084
     host: ""

internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/download_tool.yaml 🔗

@@ -24,19 +24,23 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"gen-1773334542-8yPTrBVJcn2XPkNE0E7b","object":"chat.completion.chunk","created":1773334542,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Alibaba","choices":[{"index":0,"delta":{"content":"Download","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+      data: {"id":"gen-1773346336-TVqiuHC80xFmriSa1GnB","object":"chat.completion.chunk","created":1773346336,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Google","choices":[{"index":0,"delta":{"content":"Download","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334542-8yPTrBVJcn2XPkNE0E7b","object":"chat.completion.chunk","created":1773334542,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Alibaba","choices":[{"index":0,"delta":{"content":" example","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+      data: {"id":"gen-1773346336-TVqiuHC80xFmriSa1GnB","object":"chat.completion.chunk","created":1773346336,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Google","choices":[{"index":0,"delta":{"content":" example","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334542-8yPTrBVJcn2XPkNE0E7b","object":"chat.completion.chunk","created":1773334542,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Alibaba","choices":[{"index":0,"delta":{"content":".txt from example","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+      data: {"id":"gen-1773346336-TVqiuHC80xFmriSa1GnB","object":"chat.completion.chunk","created":1773346336,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Google","choices":[{"index":0,"delta":{"content":".txt from example","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334542-8yPTrBVJcn2XPkNE0E7b","object":"chat.completion.chunk","created":1773334542,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Alibaba","choices":[{"index":0,"delta":{"content":"-files","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+      data: {"id":"gen-1773346336-TVqiuHC80xFmriSa1GnB","object":"chat.completion.chunk","created":1773346336,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Google","choices":[{"index":0,"delta":{"content":"-files","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334542-8yPTrBVJcn2XPkNE0E7b","object":"chat.completion.chunk","created":1773334542,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Alibaba","choices":[{"index":0,"delta":{"content":".online-convert.com","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+      data: {"id":"gen-1773346336-TVqiuHC80xFmriSa1GnB","object":"chat.completion.chunk","created":1773346336,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Google","choices":[{"index":0,"delta":{"content":".online","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334542-8yPTrBVJcn2XPkNE0E7b","object":"chat.completion.chunk","created":1773334542,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Alibaba","choices":[{"index":0,"delta":{"content":"","role":"assistant"},"finish_reason":"stop","native_finish_reason":"stop"}]}
+      data: {"id":"gen-1773346336-TVqiuHC80xFmriSa1GnB","object":"chat.completion.chunk","created":1773346336,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Google","choices":[{"index":0,"delta":{"content":"-","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334542-8yPTrBVJcn2XPkNE0E7b","object":"chat.completion.chunk","created":1773334542,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Alibaba","choices":[],"usage":{"prompt_tokens":154,"completion_tokens":10,"total_tokens":164,"cost":0.000022815,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"cache_write_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.0000351,"upstream_inference_prompt_cost":0.0000231,"upstream_inference_completions_cost":0.000012},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
+      data: {"id":"gen-1773346336-TVqiuHC80xFmriSa1GnB","object":"chat.completion.chunk","created":1773346336,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Google","choices":[{"index":0,"delta":{"content":"convert.com","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+
+      data: {"id":"gen-1773346336-TVqiuHC80xFmriSa1GnB","object":"chat.completion.chunk","created":1773346336,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Google","choices":[{"index":0,"delta":{"content":"","role":"assistant"},"finish_reason":"stop","native_finish_reason":"stop"}]}
+
+      data: {"id":"gen-1773346336-TVqiuHC80xFmriSa1GnB","object":"chat.completion.chunk","created":1773346336,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Google","choices":[],"usage":{"prompt_tokens":150,"completion_tokens":11,"total_tokens":161,"cost":0.0000357,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"cache_write_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.0000357,"upstream_inference_prompt_cost":0.0000225,"upstream_inference_completions_cost":0.0000132},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
 
       data: [DONE]
 
@@ -45,15 +49,15 @@ interactions:
       - text/event-stream
     status: 200 OK
     code: 200
-    duration: 859.785125ms
+    duration: 729.655584ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50908
+    content_length: 51109
     host: ""

internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/fetch_tool.yaml 🔗

@@ -24,17 +24,17 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"gen-1773334550-e9I0jErWtiGCcrnyThes","object":"chat.completion.chunk","created":1773334550,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"DeepInfra","choices":[{"index":0,"delta":{"content":"Check","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+      data: {"id":"gen-1773346345-gWD8OXAwYWldd57opVOW","object":"chat.completion.chunk","created":1773346345,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Alibaba","choices":[{"index":0,"delta":{"content":"Check","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334550-e9I0jErWtiGCcrnyThes","object":"chat.completion.chunk","created":1773334550,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"DeepInfra","choices":[{"index":0,"delta":{"content":" if example","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+      data: {"id":"gen-1773346345-gWD8OXAwYWldd57opVOW","object":"chat.completion.chunk","created":1773346345,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Alibaba","choices":[{"index":0,"delta":{"content":" if example","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334550-e9I0jErWtiGCcrnyThes","object":"chat.completion.chunk","created":1773334550,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"DeepInfra","choices":[{"index":0,"delta":{"content":".html contains John","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+      data: {"id":"gen-1773346345-gWD8OXAwYWldd57opVOW","object":"chat.completion.chunk","created":1773346345,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Alibaba","choices":[{"index":0,"delta":{"content":".html contains John","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334550-e9I0jErWtiGCcrnyThes","object":"chat.completion.chunk","created":1773334550,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"DeepInfra","choices":[{"index":0,"delta":{"content":" Doe","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+      data: {"id":"gen-1773346345-gWD8OXAwYWldd57opVOW","object":"chat.completion.chunk","created":1773346345,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Alibaba","choices":[{"index":0,"delta":{"content":" Doe","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334550-e9I0jErWtiGCcrnyThes","object":"chat.completion.chunk","created":1773334550,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"DeepInfra","choices":[{"index":0,"delta":{"content":"","role":"assistant"},"finish_reason":"stop","native_finish_reason":"stop"}]}
+      data: {"id":"gen-1773346345-gWD8OXAwYWldd57opVOW","object":"chat.completion.chunk","created":1773346345,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Alibaba","choices":[{"index":0,"delta":{"content":"","role":"assistant"},"finish_reason":"stop","native_finish_reason":"stop"}]}
 
-      data: {"id":"gen-1773334550-e9I0jErWtiGCcrnyThes","object":"chat.completion.chunk","created":1773334550,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"DeepInfra","choices":[],"usage":{"prompt_tokens":155,"completion_tokens":8,"total_tokens":163,"cost":0.00002275,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"cache_write_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.00002275,"upstream_inference_prompt_cost":0.00001395,"upstream_inference_completions_cost":0.0000088},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
+      data: {"id":"gen-1773346345-gWD8OXAwYWldd57opVOW","object":"chat.completion.chunk","created":1773346345,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Alibaba","choices":[],"usage":{"prompt_tokens":159,"completion_tokens":7,"total_tokens":166,"cost":0.0000209625,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"cache_write_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.00003225,"upstream_inference_prompt_cost":0.00002385,"upstream_inference_completions_cost":0.0000084},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
 
       data: [DONE]
 
@@ -43,15 +43,15 @@ interactions:
       - text/event-stream
     status: 200 OK
     code: 200
-    duration: 1.042426041s
+    duration: 706.07425ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50926
+    content_length: 51127
     host: ""

internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/glob_tool.yaml 🔗

@@ -24,17 +24,29 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"gen-1773334558-RNAmsnbQ8Cy7m80mbZbM","object":"chat.completion.chunk","created":1773334558,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Novita","choices":[{"index":0,"delta":{"content":"Find","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+      data: {"id":"gen-1773346355-xVkkhvwNqJJ5XlXkXyr1","object":"chat.completion.chunk","created":1773346355,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":"Find","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334558-RNAmsnbQ8Cy7m80mbZbM","object":"chat.completion.chunk","created":1773334558,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Novita","choices":[{"index":0,"delta":{"content":" all .go files","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+      data: {"id":"gen-1773346355-xVkkhvwNqJJ5XlXkXyr1","object":"chat.completion.chunk","created":1773346355,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":" all","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334558-RNAmsnbQ8Cy7m80mbZbM","object":"chat.completion.chunk","created":1773334558,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Novita","choices":[{"index":0,"delta":{"content":" in current directory using","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+      data: {"id":"gen-1773346355-xVkkhvwNqJJ5XlXkXyr1","object":"chat.completion.chunk","created":1773346355,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":" .","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334558-RNAmsnbQ8Cy7m80mbZbM","object":"chat.completion.chunk","created":1773334558,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Novita","choices":[{"index":0,"delta":{"content":" glob","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+      data: {"id":"gen-1773346355-xVkkhvwNqJJ5XlXkXyr1","object":"chat.completion.chunk","created":1773346355,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":"go","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334558-RNAmsnbQ8Cy7m80mbZbM","object":"chat.completion.chunk","created":1773334558,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Novita","choices":[{"index":0,"delta":{"content":"","role":"assistant"},"finish_reason":"stop","native_finish_reason":"stop"}]}
+      data: {"id":"gen-1773346355-xVkkhvwNqJJ5XlXkXyr1","object":"chat.completion.chunk","created":1773346355,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":" files","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334558-RNAmsnbQ8Cy7m80mbZbM","object":"chat.completion.chunk","created":1773334558,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Novita","choices":[],"usage":{"prompt_tokens":143,"completion_tokens":10,"total_tokens":153,"cost":0.00003645,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"cache_write_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.00003645,"upstream_inference_prompt_cost":0.00002145,"upstream_inference_completions_cost":0.000015},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
+      data: {"id":"gen-1773346355-xVkkhvwNqJJ5XlXkXyr1","object":"chat.completion.chunk","created":1773346355,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":" in","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+
+      data: {"id":"gen-1773346355-xVkkhvwNqJJ5XlXkXyr1","object":"chat.completion.chunk","created":1773346355,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":" current","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+
+      data: {"id":"gen-1773346355-xVkkhvwNqJJ5XlXkXyr1","object":"chat.completion.chunk","created":1773346355,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":" directory","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+
+      data: {"id":"gen-1773346355-xVkkhvwNqJJ5XlXkXyr1","object":"chat.completion.chunk","created":1773346355,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":" using","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+
+      data: {"id":"gen-1773346355-xVkkhvwNqJJ5XlXkXyr1","object":"chat.completion.chunk","created":1773346355,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":" glob","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+
+      data: {"id":"gen-1773346355-xVkkhvwNqJJ5XlXkXyr1","object":"chat.completion.chunk","created":1773346355,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":"","role":"assistant"},"finish_reason":"stop","native_finish_reason":"stop"}]}
+
+      data: {"id":"gen-1773346355-xVkkhvwNqJJ5XlXkXyr1","object":"chat.completion.chunk","created":1773346355,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[],"usage":{"prompt_tokens":139,"completion_tokens":11,"total_tokens":150,"cost":0.000026,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"cache_write_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.000026,"upstream_inference_prompt_cost":0.0000139,"upstream_inference_completions_cost":0.0000121},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
 
       data: [DONE]
 
@@ -43,15 +55,15 @@ interactions:
       - text/event-stream
     status: 200 OK
     code: 200
-    duration: 1.599437334s
+    duration: 828.859041ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50844
+    content_length: 51045
     host: ""

internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/grep_tool.yaml 🔗

@@ -24,15 +24,25 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"gen-1773334564-8R6khZnT2feHAx6ZOsdt","object":"chat.completion.chunk","created":1773334564,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Novita","choices":[{"index":0,"delta":{"content":"Search","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+      data: {"id":"gen-1773346362-BgYEc5fC5xu3HVSCxh3l","object":"chat.completion.chunk","created":1773346362,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":"Search","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334564-8R6khZnT2feHAx6ZOsdt","object":"chat.completion.chunk","created":1773334564,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Novita","choices":[{"index":0,"delta":{"content":" for package in Go","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+      data: {"id":"gen-1773346362-BgYEc5fC5xu3HVSCxh3l","object":"chat.completion.chunk","created":1773346362,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":" for","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334564-8R6khZnT2feHAx6ZOsdt","object":"chat.completion.chunk","created":1773334564,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Novita","choices":[{"index":0,"delta":{"content":" files using grep","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+      data: {"id":"gen-1773346362-BgYEc5fC5xu3HVSCxh3l","object":"chat.completion.chunk","created":1773346362,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":" package","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334564-8R6khZnT2feHAx6ZOsdt","object":"chat.completion.chunk","created":1773334564,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Novita","choices":[{"index":0,"delta":{"content":"","role":"assistant"},"finish_reason":"stop","native_finish_reason":"stop"}]}
+      data: {"id":"gen-1773346362-BgYEc5fC5xu3HVSCxh3l","object":"chat.completion.chunk","created":1773346362,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":" in","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334564-8R6khZnT2feHAx6ZOsdt","object":"chat.completion.chunk","created":1773334564,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Novita","choices":[],"usage":{"prompt_tokens":144,"completion_tokens":8,"total_tokens":152,"cost":0.0000336,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"cache_write_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.0000336,"upstream_inference_prompt_cost":0.0000216,"upstream_inference_completions_cost":0.000012},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
+      data: {"id":"gen-1773346362-BgYEc5fC5xu3HVSCxh3l","object":"chat.completion.chunk","created":1773346362,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":" Go","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+
+      data: {"id":"gen-1773346362-BgYEc5fC5xu3HVSCxh3l","object":"chat.completion.chunk","created":1773346362,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":" files","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+
+      data: {"id":"gen-1773346362-BgYEc5fC5xu3HVSCxh3l","object":"chat.completion.chunk","created":1773346362,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":" using","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+
+      data: {"id":"gen-1773346362-BgYEc5fC5xu3HVSCxh3l","object":"chat.completion.chunk","created":1773346362,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":" grep","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+
+      data: {"id":"gen-1773346362-BgYEc5fC5xu3HVSCxh3l","object":"chat.completion.chunk","created":1773346362,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":"","role":"assistant"},"finish_reason":"stop","native_finish_reason":"stop"}]}
+
+      data: {"id":"gen-1773346362-BgYEc5fC5xu3HVSCxh3l","object":"chat.completion.chunk","created":1773346362,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[],"usage":{"prompt_tokens":140,"completion_tokens":9,"total_tokens":149,"cost":0.0000239,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"cache_write_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.0000239,"upstream_inference_prompt_cost":0.000014,"upstream_inference_completions_cost":0.0000099},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
 
       data: [DONE]
 
@@ -41,15 +51,15 @@ interactions:
       - text/event-stream
     status: 200 OK
     code: 200
-    duration: 1.068462542s
+    duration: 911.277333ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50842
+    content_length: 51043
     host: ""

internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/ls_tool.yaml 🔗

@@ -24,23 +24,17 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"gen-1773334569-8aJueopkPg7Osv2OFUET","object":"chat.completion.chunk","created":1773334569,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":"List","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+      data: {"id":"gen-1773346371-4q88aKcjB5AruprasyF5","object":"chat.completion.chunk","created":1773346371,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Novita","choices":[{"index":0,"delta":{"content":"List","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334569-8aJueopkPg7Osv2OFUET","object":"chat.completion.chunk","created":1773334569,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":" files","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+      data: {"id":"gen-1773346371-4q88aKcjB5AruprasyF5","object":"chat.completion.chunk","created":1773346371,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Novita","choices":[{"index":0,"delta":{"content":" files in current directory","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334569-8aJueopkPg7Osv2OFUET","object":"chat.completion.chunk","created":1773334569,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":" in","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+      data: {"id":"gen-1773346371-4q88aKcjB5AruprasyF5","object":"chat.completion.chunk","created":1773346371,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Novita","choices":[{"index":0,"delta":{"content":" with","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334569-8aJueopkPg7Osv2OFUET","object":"chat.completion.chunk","created":1773334569,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":" current","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+      data: {"id":"gen-1773346371-4q88aKcjB5AruprasyF5","object":"chat.completion.chunk","created":1773346371,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Novita","choices":[{"index":0,"delta":{"content":" ls","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334569-8aJueopkPg7Osv2OFUET","object":"chat.completion.chunk","created":1773334569,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":" directory","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+      data: {"id":"gen-1773346371-4q88aKcjB5AruprasyF5","object":"chat.completion.chunk","created":1773346371,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Novita","choices":[{"index":0,"delta":{"content":"","role":"assistant"},"finish_reason":"stop","native_finish_reason":"stop"}]}
 
-      data: {"id":"gen-1773334569-8aJueopkPg7Osv2OFUET","object":"chat.completion.chunk","created":1773334569,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":" using","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
-
-      data: {"id":"gen-1773334569-8aJueopkPg7Osv2OFUET","object":"chat.completion.chunk","created":1773334569,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":" ls","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
-
-      data: {"id":"gen-1773334569-8aJueopkPg7Osv2OFUET","object":"chat.completion.chunk","created":1773334569,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":"","role":"assistant"},"finish_reason":"stop","native_finish_reason":"stop"}]}
-
-      data: {"id":"gen-1773334569-8aJueopkPg7Osv2OFUET","object":"chat.completion.chunk","created":1773334569,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[],"usage":{"prompt_tokens":137,"completion_tokens":8,"total_tokens":145,"cost":0.0000225,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"cache_write_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.0000225,"upstream_inference_prompt_cost":0.0000137,"upstream_inference_completions_cost":0.0000088},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
+      data: {"id":"gen-1773346371-4q88aKcjB5AruprasyF5","object":"chat.completion.chunk","created":1773346371,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Novita","choices":[],"usage":{"prompt_tokens":141,"completion_tokens":7,"total_tokens":148,"cost":0.00003165,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"cache_write_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.00003165,"upstream_inference_prompt_cost":0.00002115,"upstream_inference_completions_cost":0.0000105},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
 
       data: [DONE]
 
@@ -49,15 +43,15 @@ interactions:
       - text/event-stream
     status: 200 OK
     code: 200
-    duration: 770.388625ms
+    duration: 917.901459ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50836
+    content_length: 51037
     host: ""

internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/multiedit_tool.yaml 🔗

@@ -24,19 +24,19 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"gen-1773334576-hQsvjJZlZYDs3Hw05RFy","object":"chat.completion.chunk","created":1773334576,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"SiliconFlow","choices":[{"index":0,"delta":{"content":"Change","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+      data: {"id":"gen-1773346378-hfheSaAb9O98TBQ0ELoK","object":"chat.completion.chunk","created":1773346378,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Novita","choices":[{"index":0,"delta":{"content":"Use","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334576-hQsvjJZlZYDs3Hw05RFy","object":"chat.completion.chunk","created":1773334576,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"SiliconFlow","choices":[{"index":0,"delta":{"content":" greeting","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+      data: {"id":"gen-1773346378-hfheSaAb9O98TBQ0ELoK","object":"chat.completion.chunk","created":1773346378,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Novita","choices":[{"index":0,"delta":{"content":" multiedit to","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334576-hQsvjJZlZYDs3Hw05RFy","object":"chat.completion.chunk","created":1773334576,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"SiliconFlow","choices":[{"index":0,"delta":{"content":" and","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+      data: {"id":"gen-1773346378-hfheSaAb9O98TBQ0ELoK","object":"chat.completion.chunk","created":1773346378,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Novita","choices":[{"index":0,"delta":{"content":" update greeting","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334576-hQsvjJZlZYDs3Hw05RFy","object":"chat.completion.chunk","created":1773334576,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"SiliconFlow","choices":[{"index":0,"delta":{"content":" add comment in","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+      data: {"id":"gen-1773346378-hfheSaAb9O98TBQ0ELoK","object":"chat.completion.chunk","created":1773346378,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Novita","choices":[{"index":0,"delta":{"content":" and add comment in","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334576-hQsvjJZlZYDs3Hw05RFy","object":"chat.completion.chunk","created":1773334576,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"SiliconFlow","choices":[{"index":0,"delta":{"content":" main.go","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+      data: {"id":"gen-1773346378-hfheSaAb9O98TBQ0ELoK","object":"chat.completion.chunk","created":1773346378,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Novita","choices":[{"index":0,"delta":{"content":" main.go","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334576-hQsvjJZlZYDs3Hw05RFy","object":"chat.completion.chunk","created":1773334576,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"SiliconFlow","choices":[{"index":0,"delta":{"content":"","role":"assistant"},"finish_reason":"stop","native_finish_reason":"stop"}]}
+      data: {"id":"gen-1773346378-hfheSaAb9O98TBQ0ELoK","object":"chat.completion.chunk","created":1773346378,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Novita","choices":[{"index":0,"delta":{"content":"","role":"assistant"},"finish_reason":"stop","native_finish_reason":"stop"}]}
 
-      data: {"id":"gen-1773334576-hQsvjJZlZYDs3Hw05RFy","object":"chat.completion.chunk","created":1773334576,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"SiliconFlow","choices":[],"usage":{"prompt_tokens":160,"completion_tokens":9,"total_tokens":169,"cost":0.000035,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"cache_write_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.000035,"upstream_inference_prompt_cost":0.0000224,"upstream_inference_completions_cost":0.0000126},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
+      data: {"id":"gen-1773346378-hfheSaAb9O98TBQ0ELoK","object":"chat.completion.chunk","created":1773346378,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Novita","choices":[],"usage":{"prompt_tokens":164,"completion_tokens":13,"total_tokens":177,"cost":0.0000441,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"cache_write_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.0000441,"upstream_inference_prompt_cost":0.0000246,"upstream_inference_completions_cost":0.0000195},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
 
       data: [DONE]
 
@@ -45,15 +45,15 @@ interactions:
       - text/event-stream
     status: 200 OK
     code: 200
-    duration: 2.266157584s
+    duration: 890.058625ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50922
+    content_length: 51123
     host: ""

internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/parallel_tool_calls.yaml 🔗

@@ -24,19 +24,27 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"gen-1773334613-QcM6GdqAs4UX3x5mhwnG","object":"chat.completion.chunk","created":1773334613,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"SiliconFlow","choices":[{"index":0,"delta":{"content":"Find","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+      data: {"id":"gen-1773346444-K8iqCl6Tq9o7IKocQEz7","object":"chat.completion.chunk","created":1773346444,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":"Find","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334613-QcM6GdqAs4UX3x5mhwnG","object":"chat.completion.chunk","created":1773334613,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"SiliconFlow","choices":[{"index":0,"delta":{"content":" .go files and","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+      data: {"id":"gen-1773346444-K8iqCl6Tq9o7IKocQEz7","object":"chat.completion.chunk","created":1773346444,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":" .","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334613-QcM6GdqAs4UX3x5mhwnG","object":"chat.completion.chunk","created":1773334613,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"SiliconFlow","choices":[{"index":0,"delta":{"content":" list directory","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+      data: {"id":"gen-1773346444-K8iqCl6Tq9o7IKocQEz7","object":"chat.completion.chunk","created":1773346444,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":"go","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334613-QcM6GdqAs4UX3x5mhwnG","object":"chat.completion.chunk","created":1773334613,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"SiliconFlow","choices":[{"index":0,"delta":{"content":" in","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+      data: {"id":"gen-1773346444-K8iqCl6Tq9o7IKocQEz7","object":"chat.completion.chunk","created":1773346444,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":" files","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334613-QcM6GdqAs4UX3x5mhwnG","object":"chat.completion.chunk","created":1773334613,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"SiliconFlow","choices":[{"index":0,"delta":{"content":" parallel","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+      data: {"id":"gen-1773346444-K8iqCl6Tq9o7IKocQEz7","object":"chat.completion.chunk","created":1773346444,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":" and","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334613-QcM6GdqAs4UX3x5mhwnG","object":"chat.completion.chunk","created":1773334613,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"SiliconFlow","choices":[{"index":0,"delta":{"content":"","role":"assistant"},"finish_reason":"stop","native_finish_reason":"stop"}]}
+      data: {"id":"gen-1773346444-K8iqCl6Tq9o7IKocQEz7","object":"chat.completion.chunk","created":1773346444,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":" list","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334613-QcM6GdqAs4UX3x5mhwnG","object":"chat.completion.chunk","created":1773334613,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"SiliconFlow","choices":[],"usage":{"prompt_tokens":156,"completion_tokens":10,"total_tokens":166,"cost":0.00003584,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"cache_write_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.00003584,"upstream_inference_prompt_cost":0.00002184,"upstream_inference_completions_cost":0.000014},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
+      data: {"id":"gen-1773346444-K8iqCl6Tq9o7IKocQEz7","object":"chat.completion.chunk","created":1773346444,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":" directory","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+
+      data: {"id":"gen-1773346444-K8iqCl6Tq9o7IKocQEz7","object":"chat.completion.chunk","created":1773346444,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":" in","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+
+      data: {"id":"gen-1773346444-K8iqCl6Tq9o7IKocQEz7","object":"chat.completion.chunk","created":1773346444,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":" parallel","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+
+      data: {"id":"gen-1773346444-K8iqCl6Tq9o7IKocQEz7","object":"chat.completion.chunk","created":1773346444,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":"","role":"assistant"},"finish_reason":"stop","native_finish_reason":"stop"}]}
+
+      data: {"id":"gen-1773346444-K8iqCl6Tq9o7IKocQEz7","object":"chat.completion.chunk","created":1773346444,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[],"usage":{"prompt_tokens":156,"completion_tokens":10,"total_tokens":166,"cost":0.0000266,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"cache_write_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.0000266,"upstream_inference_prompt_cost":0.0000156,"upstream_inference_completions_cost":0.000011},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
 
       data: [DONE]
 
@@ -45,15 +53,15 @@ interactions:
       - text/event-stream
     status: 200 OK
     code: 200
-    duration: 1.74081725s
+    duration: 785.290041ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50933
+    content_length: 51134
     host: ""

internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/read_a_file.yaml 🔗

@@ -24,13 +24,17 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"gen-1773334512-u0AdcFEb7Z8CVaRRTgZP","object":"chat.completion.chunk","created":1773334512,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"DeepInfra","choices":[{"index":0,"delta":{"content":"Read","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+      data: {"id":"gen-1773346308-4TglX5eq0OVD4GrTmKz4","object":"chat.completion.chunk","created":1773346308,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":"Read","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334512-u0AdcFEb7Z8CVaRRTgZP","object":"chat.completion.chunk","created":1773334512,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"DeepInfra","choices":[{"index":0,"delta":{"content":" the go mod","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+      data: {"id":"gen-1773346308-4TglX5eq0OVD4GrTmKz4","object":"chat.completion.chunk","created":1773346308,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":" the","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334512-u0AdcFEb7Z8CVaRRTgZP","object":"chat.completion.chunk","created":1773334512,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"DeepInfra","choices":[{"index":0,"delta":{"content":"","role":"assistant"},"finish_reason":"stop","native_finish_reason":"stop"}]}
+      data: {"id":"gen-1773346308-4TglX5eq0OVD4GrTmKz4","object":"chat.completion.chunk","created":1773346308,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":" go","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334512-u0AdcFEb7Z8CVaRRTgZP","object":"chat.completion.chunk","created":1773334512,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"DeepInfra","choices":[],"usage":{"prompt_tokens":131,"completion_tokens":5,"total_tokens":136,"cost":0.00001729,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"cache_write_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.00001729,"upstream_inference_prompt_cost":0.00001179,"upstream_inference_completions_cost":0.0000055},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
+      data: {"id":"gen-1773346308-4TglX5eq0OVD4GrTmKz4","object":"chat.completion.chunk","created":1773346308,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":" mod","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+
+      data: {"id":"gen-1773346308-4TglX5eq0OVD4GrTmKz4","object":"chat.completion.chunk","created":1773346308,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":"","role":"assistant"},"finish_reason":"stop","native_finish_reason":"stop"}]}
+
+      data: {"id":"gen-1773346308-4TglX5eq0OVD4GrTmKz4","object":"chat.completion.chunk","created":1773346308,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[],"usage":{"prompt_tokens":131,"completion_tokens":5,"total_tokens":136,"cost":0.0000186,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"cache_write_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.0000186,"upstream_inference_prompt_cost":0.0000131,"upstream_inference_completions_cost":0.0000055},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
 
       data: [DONE]
 
@@ -39,15 +43,15 @@ interactions:
       - text/event-stream
     status: 200 OK
     code: 200
-    duration: 364.606375ms
+    duration: 1.141124667s
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50806
+    content_length: 51007
     host: ""

internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/simple_test.yaml 🔗

@@ -24,11 +24,11 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"gen-1773334508-8NckSs9Il6oS66YUbYZu","object":"chat.completion.chunk","created":1773334508,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Alibaba","choices":[{"index":0,"delta":{"content":"Hello","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+      data: {"id":"gen-1773346305-EPRD1xczhbGL5Lx61Bxi","object":"chat.completion.chunk","created":1773346305,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"DeepInfra","choices":[{"index":0,"delta":{"content":"Hello","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334508-8NckSs9Il6oS66YUbYZu","object":"chat.completion.chunk","created":1773334508,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Alibaba","choices":[{"index":0,"delta":{"content":"","role":"assistant"},"finish_reason":"stop","native_finish_reason":"stop"}]}
+      data: {"id":"gen-1773346305-EPRD1xczhbGL5Lx61Bxi","object":"chat.completion.chunk","created":1773346305,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"DeepInfra","choices":[{"index":0,"delta":{"content":"","role":"assistant"},"finish_reason":"stop","native_finish_reason":"stop"}]}
 
-      data: {"id":"gen-1773334508-8NckSs9Il6oS66YUbYZu","object":"chat.completion.chunk","created":1773334508,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Alibaba","choices":[],"usage":{"prompt_tokens":132,"completion_tokens":1,"total_tokens":133,"cost":0.00001365,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"cache_write_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.000021,"upstream_inference_prompt_cost":0.0000198,"upstream_inference_completions_cost":0.0000012},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
+      data: {"id":"gen-1773346305-EPRD1xczhbGL5Lx61Bxi","object":"chat.completion.chunk","created":1773346305,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"DeepInfra","choices":[],"usage":{"prompt_tokens":128,"completion_tokens":2,"total_tokens":130,"cost":0.00001372,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"cache_write_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.00001372,"upstream_inference_prompt_cost":0.00001152,"upstream_inference_completions_cost":0.0000022},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
 
       data: [DONE]
 
@@ -37,15 +37,15 @@ interactions:
       - text/event-stream
     status: 200 OK
     code: 200
-    duration: 2.44035525s
+    duration: 1.422850834s
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50796
+    content_length: 50997
     host: ""

internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/sourcegraph_tool.yaml 🔗

@@ -24,19 +24,29 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"gen-1773334595-thgKsVDmSFrG2maQl82H","object":"chat.completion.chunk","created":1773334595,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Google","choices":[{"index":0,"delta":{"content":"Search","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+      data: {"id":"gen-1773346408-HguKLPahQGX0ilVWriIv","object":"chat.completion.chunk","created":1773346408,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":"Search","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334595-thgKsVDmSFrG2maQl82H","object":"chat.completion.chunk","created":1773334595,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Google","choices":[{"index":0,"delta":{"content":" for func","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+      data: {"id":"gen-1773346408-HguKLPahQGX0ilVWriIv","object":"chat.completion.chunk","created":1773346408,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":" for","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334595-thgKsVDmSFrG2maQl82H","object":"chat.completion.chunk","created":1773334595,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Google","choices":[{"index":0,"delta":{"content":" main in Go repositories","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+      data: {"id":"gen-1773346408-HguKLPahQGX0ilVWriIv","object":"chat.completion.chunk","created":1773346408,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":" func","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334595-thgKsVDmSFrG2maQl82H","object":"chat.completion.chunk","created":1773334595,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Google","choices":[{"index":0,"delta":{"content":" using Source","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+      data: {"id":"gen-1773346408-HguKLPahQGX0ilVWriIv","object":"chat.completion.chunk","created":1773346408,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":" main","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334595-thgKsVDmSFrG2maQl82H","object":"chat.completion.chunk","created":1773334595,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Google","choices":[{"index":0,"delta":{"content":"graph","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+      data: {"id":"gen-1773346408-HguKLPahQGX0ilVWriIv","object":"chat.completion.chunk","created":1773346408,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":" in","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334595-thgKsVDmSFrG2maQl82H","object":"chat.completion.chunk","created":1773334595,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Google","choices":[{"index":0,"delta":{"content":"","role":"assistant"},"finish_reason":"stop","native_finish_reason":"stop"}]}
+      data: {"id":"gen-1773346408-HguKLPahQGX0ilVWriIv","object":"chat.completion.chunk","created":1773346408,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":" Go","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334595-thgKsVDmSFrG2maQl82H","object":"chat.completion.chunk","created":1773334595,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Google","choices":[],"usage":{"prompt_tokens":140,"completion_tokens":11,"total_tokens":151,"cost":0.0000342,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"cache_write_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.0000342,"upstream_inference_prompt_cost":0.000021,"upstream_inference_completions_cost":0.0000132},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
+      data: {"id":"gen-1773346408-HguKLPahQGX0ilVWriIv","object":"chat.completion.chunk","created":1773346408,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":" repositories","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+
+      data: {"id":"gen-1773346408-HguKLPahQGX0ilVWriIv","object":"chat.completion.chunk","created":1773346408,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":" using","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+
+      data: {"id":"gen-1773346408-HguKLPahQGX0ilVWriIv","object":"chat.completion.chunk","created":1773346408,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":" Source","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+
+      data: {"id":"gen-1773346408-HguKLPahQGX0ilVWriIv","object":"chat.completion.chunk","created":1773346408,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":"graph","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+
+      data: {"id":"gen-1773346408-HguKLPahQGX0ilVWriIv","object":"chat.completion.chunk","created":1773346408,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[{"index":0,"delta":{"content":"","role":"assistant"},"finish_reason":"stop","native_finish_reason":"stop"}]}
+
+      data: {"id":"gen-1773346408-HguKLPahQGX0ilVWriIv","object":"chat.completion.chunk","created":1773346408,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Parasail","choices":[],"usage":{"prompt_tokens":140,"completion_tokens":11,"total_tokens":151,"cost":0.0000261,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"cache_write_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.0000261,"upstream_inference_prompt_cost":0.000014,"upstream_inference_completions_cost":0.0000121},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
 
       data: [DONE]
 
@@ -45,15 +55,15 @@ interactions:
       - text/event-stream
     status: 200 OK
     code: 200
-    duration: 573.310375ms
+    duration: 667.337583ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50856
+    content_length: 51057
     host: ""

internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/update_a_file.yaml 🔗

@@ -24,17 +24,17 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"gen-1773334519-otrBdcE4CKqBw01X1AqD","object":"chat.completion.chunk","created":1773334519,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Alibaba","choices":[{"index":0,"delta":{"content":"Update","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+      data: {"id":"gen-1773346314-pTxjL4NOw61KwDwlBC4C","object":"chat.completion.chunk","created":1773346314,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Alibaba","choices":[{"index":0,"delta":{"content":"Update","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334519-otrBdcE4CKqBw01X1AqD","object":"chat.completion.chunk","created":1773334519,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Alibaba","choices":[{"index":0,"delta":{"content":" main.go to print","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+      data: {"id":"gen-1773346314-pTxjL4NOw61KwDwlBC4C","object":"chat.completion.chunk","created":1773346314,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Alibaba","choices":[{"index":0,"delta":{"content":" main.go to print","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334519-otrBdcE4CKqBw01X1AqD","object":"chat.completion.chunk","created":1773334519,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Alibaba","choices":[{"index":0,"delta":{"content":" hello","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+      data: {"id":"gen-1773346314-pTxjL4NOw61KwDwlBC4C","object":"chat.completion.chunk","created":1773346314,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Alibaba","choices":[{"index":0,"delta":{"content":" hello","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334519-otrBdcE4CKqBw01X1AqD","object":"chat.completion.chunk","created":1773334519,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Alibaba","choices":[{"index":0,"delta":{"content":" from crush","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+      data: {"id":"gen-1773346314-pTxjL4NOw61KwDwlBC4C","object":"chat.completion.chunk","created":1773346314,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Alibaba","choices":[{"index":0,"delta":{"content":" from crush","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334519-otrBdcE4CKqBw01X1AqD","object":"chat.completion.chunk","created":1773334519,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Alibaba","choices":[{"index":0,"delta":{"content":"","role":"assistant"},"finish_reason":"stop","native_finish_reason":"stop"}]}
+      data: {"id":"gen-1773346314-pTxjL4NOw61KwDwlBC4C","object":"chat.completion.chunk","created":1773346314,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Alibaba","choices":[{"index":0,"delta":{"content":"","role":"assistant"},"finish_reason":"stop","native_finish_reason":"stop"}]}
 
-      data: {"id":"gen-1773334519-otrBdcE4CKqBw01X1AqD","object":"chat.completion.chunk","created":1773334519,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Alibaba","choices":[],"usage":{"prompt_tokens":145,"completion_tokens":8,"total_tokens":153,"cost":0.0000203775,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"cache_write_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.00003135,"upstream_inference_prompt_cost":0.00002175,"upstream_inference_completions_cost":0.0000096},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
+      data: {"id":"gen-1773346314-pTxjL4NOw61KwDwlBC4C","object":"chat.completion.chunk","created":1773346314,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Alibaba","choices":[],"usage":{"prompt_tokens":145,"completion_tokens":8,"total_tokens":153,"cost":0.0000203775,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"cache_write_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.00003135,"upstream_inference_prompt_cost":0.00002175,"upstream_inference_completions_cost":0.0000096},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
 
       data: [DONE]
 
@@ -43,15 +43,15 @@ interactions:
       - text/event-stream
     status: 200 OK
     code: 200
-    duration: 684.026791ms
+    duration: 667.790583ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50862
+    content_length: 51063
     host: ""

internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/write_tool.yaml 🔗

@@ -24,15 +24,17 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"gen-1773334605-6ZRsy4saGGf5i8FeUwoK","object":"chat.completion.chunk","created":1773334605,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Alibaba","choices":[{"index":0,"delta":{"content":"Create","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+      data: {"id":"gen-1773346434-55tqPNTfjytUMCK8C2DN","object":"chat.completion.chunk","created":1773346434,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Alibaba","choices":[{"index":0,"delta":{"content":"Create","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334605-6ZRsy4saGGf5i8FeUwoK","object":"chat.completion.chunk","created":1773334605,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Alibaba","choices":[{"index":0,"delta":{"content":" config.json with name","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+      data: {"id":"gen-1773346434-55tqPNTfjytUMCK8C2DN","object":"chat.completion.chunk","created":1773346434,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Alibaba","choices":[{"index":0,"delta":{"content":" config.json with sample","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334605-6ZRsy4saGGf5i8FeUwoK","object":"chat.completion.chunk","created":1773334605,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Alibaba","choices":[{"index":0,"delta":{"content":" and version data","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
+      data: {"id":"gen-1773346434-55tqPNTfjytUMCK8C2DN","object":"chat.completion.chunk","created":1773346434,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Alibaba","choices":[{"index":0,"delta":{"content":" JSON","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334605-6ZRsy4saGGf5i8FeUwoK","object":"chat.completion.chunk","created":1773334605,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Alibaba","choices":[{"index":0,"delta":{"content":"","role":"assistant"},"finish_reason":"stop","native_finish_reason":"stop"}]}
+      data: {"id":"gen-1773346434-55tqPNTfjytUMCK8C2DN","object":"chat.completion.chunk","created":1773346434,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Alibaba","choices":[{"index":0,"delta":{"content":" content","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}
 
-      data: {"id":"gen-1773334605-6ZRsy4saGGf5i8FeUwoK","object":"chat.completion.chunk","created":1773334605,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Alibaba","choices":[],"usage":{"prompt_tokens":159,"completion_tokens":8,"total_tokens":167,"cost":0.0000217425,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"cache_write_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.00003345,"upstream_inference_prompt_cost":0.00002385,"upstream_inference_completions_cost":0.0000096},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
+      data: {"id":"gen-1773346434-55tqPNTfjytUMCK8C2DN","object":"chat.completion.chunk","created":1773346434,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Alibaba","choices":[{"index":0,"delta":{"content":"","role":"assistant"},"finish_reason":"stop","native_finish_reason":"stop"}]}
+
+      data: {"id":"gen-1773346434-55tqPNTfjytUMCK8C2DN","object":"chat.completion.chunk","created":1773346434,"model":"qwen/qwen3-next-80b-a3b-instruct-2509","provider":"Alibaba","choices":[],"usage":{"prompt_tokens":159,"completion_tokens":7,"total_tokens":166,"cost":0.0000209625,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"cache_write_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.00003225,"upstream_inference_prompt_cost":0.00002385,"upstream_inference_completions_cost":0.0000084},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}
 
       data: [DONE]
 
@@ -41,15 +43,15 @@ interactions:
       - text/event-stream
     status: 200 OK
     code: 200
-    duration: 1.050449458s
+    duration: 1.003629375s
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50899
+    content_length: 51100
     host: ""

internal/agent/testdata/TestCoderAgent/zai-glm4.6/bash_tool.yaml 🔗

@@ -24,23 +24,21 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"2026031300572754f0fb52268c4ba3","created":1773334648,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","reasoning_content":"\n"}}]}
+      data: {"id":"2026031304143176ff481eb8d34725","created":1773346471,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","reasoning_content":"\n"}}]}
 
-      data: {"id":"2026031300572754f0fb52268c4ba3","created":1773334648,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"B"}}]}
+      data: {"id":"2026031304143176ff481eb8d34725","created":1773346471,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Creating"}}]}
 
-      data: {"id":"2026031300572754f0fb52268c4ba3","created":1773334648,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"ash"}}]}
+      data: {"id":"2026031304143176ff481eb8d34725","created":1773346471,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" test"}}]}
 
-      data: {"id":"2026031300572754f0fb52268c4ba3","created":1773334648,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" file"}}]}
+      data: {"id":"2026031304143176ff481eb8d34725","created":1773346471,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":".txt"}}]}
 
-      data: {"id":"2026031300572754f0fb52268c4ba3","created":1773334648,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" creation"}}]}
+      data: {"id":"2026031304143176ff481eb8d34725","created":1773346471,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" with"}}]}
 
-      data: {"id":"2026031300572754f0fb52268c4ba3","created":1773334648,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" with"}}]}
+      data: {"id":"2026031304143176ff481eb8d34725","created":1773346471,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" bash"}}]}
 
-      data: {"id":"2026031300572754f0fb52268c4ba3","created":1773334648,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" hello"}}]}
+      data: {"id":"2026031304143176ff481eb8d34725","created":1773346471,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" content"}}]}
 
-      data: {"id":"2026031300572754f0fb52268c4ba3","created":1773334648,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" content"}}]}
-
-      data: {"id":"2026031300572754f0fb52268c4ba3","created":1773334648,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":140,"completion_tokens":11,"total_tokens":151,"prompt_tokens_details":{"cached_tokens":114}}}
+      data: {"id":"2026031304143176ff481eb8d34725","created":1773346471,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":140,"completion_tokens":10,"total_tokens":150,"prompt_tokens_details":{"cached_tokens":114}}}
 
       data: [DONE]
 
@@ -49,15 +47,15 @@ interactions:
       - text/event-stream;charset=UTF-8
     status: 200 OK
     code: 200
-    duration: 682.410125ms
+    duration: 627.333917ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50723
+    content_length: 50924
     host: ""

internal/agent/testdata/TestCoderAgent/zai-glm4.6/download_tool.yaml 🔗

@@ -24,19 +24,19 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"20260313005733fdb247bad6284afe","created":1773334653,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","reasoning_content":"\n"}}]}
+      data: {"id":"20260313041436a1f83a7f81b64392","created":1773346476,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","reasoning_content":"\n"}}]}
 
-      data: {"id":"20260313005733fdb247bad6284afe","created":1773334653,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Download"}}]}
+      data: {"id":"20260313041436a1f83a7f81b64392","created":1773346476,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Download"}}]}
 
-      data: {"id":"20260313005733fdb247bad6284afe","created":1773334653,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" and"}}]}
+      data: {"id":"20260313041436a1f83a7f81b64392","created":1773346476,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" example"}}]}
 
-      data: {"id":"20260313005733fdb247bad6284afe","created":1773334653,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" save"}}]}
+      data: {"id":"20260313041436a1f83a7f81b64392","created":1773346476,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":".txt"}}]}
 
-      data: {"id":"20260313005733fdb247bad6284afe","created":1773334653,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" text"}}]}
+      data: {"id":"20260313041436a1f83a7f81b64392","created":1773346476,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" from"}}]}
 
-      data: {"id":"20260313005733fdb247bad6284afe","created":1773334653,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" file"}}]}
+      data: {"id":"20260313041436a1f83a7f81b64392","created":1773346476,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" URL"}}]}
 
-      data: {"id":"20260313005733fdb247bad6284afe","created":1773334653,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":143,"completion_tokens":9,"total_tokens":152,"prompt_tokens_details":{"cached_tokens":114}}}
+      data: {"id":"20260313041436a1f83a7f81b64392","created":1773346476,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":143,"completion_tokens":9,"total_tokens":152,"prompt_tokens_details":{"cached_tokens":114}}}
 
       data: [DONE]
 
@@ -45,15 +45,15 @@ interactions:
       - text/event-stream;charset=UTF-8
     status: 200 OK
     code: 200
-    duration: 614.490625ms
+    duration: 687.490875ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50748
+    content_length: 50949
     host: ""

internal/agent/testdata/TestCoderAgent/zai-glm4.6/fetch_tool.yaml 🔗

@@ -24,23 +24,23 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"20260313005738a2808b3368ba4bed","created":1773334658,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","reasoning_content":"\n"}}]}
+      data: {"id":"20260313041457b8e4f6c46e7c468d","created":1773346497,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","reasoning_content":"\n"}}]}
 
-      data: {"id":"20260313005738a2808b3368ba4bed","created":1773334658,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Fetch"}}]}
+      data: {"id":"20260313041457b8e4f6c46e7c468d","created":1773346497,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Check"}}]}
 
-      data: {"id":"20260313005738a2808b3368ba4bed","created":1773334658,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" content"}}]}
+      data: {"id":"20260313041457b8e4f6c46e7c468d","created":1773346497,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" for"}}]}
 
-      data: {"id":"20260313005738a2808b3368ba4bed","created":1773334658,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" and"}}]}
+      data: {"id":"20260313041457b8e4f6c46e7c468d","created":1773346497,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" John"}}]}
 
-      data: {"id":"20260313005738a2808b3368ba4bed","created":1773334658,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" check"}}]}
+      data: {"id":"20260313041457b8e4f6c46e7c468d","created":1773346497,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" Doe"}}]}
 
-      data: {"id":"20260313005738a2808b3368ba4bed","created":1773334658,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" for"}}]}
+      data: {"id":"20260313041457b8e4f6c46e7c468d","created":1773346497,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" in"}}]}
 
-      data: {"id":"20260313005738a2808b3368ba4bed","created":1773334658,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" John"}}]}
+      data: {"id":"20260313041457b8e4f6c46e7c468d","created":1773346497,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" HTML"}}]}
 
-      data: {"id":"20260313005738a2808b3368ba4bed","created":1773334658,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" Doe"}}]}
+      data: {"id":"20260313041457b8e4f6c46e7c468d","created":1773346497,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" content"}}]}
 
-      data: {"id":"20260313005738a2808b3368ba4bed","created":1773334658,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":148,"completion_tokens":11,"total_tokens":159,"prompt_tokens_details":{"cached_tokens":114}}}
+      data: {"id":"20260313041457b8e4f6c46e7c468d","created":1773346497,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":148,"completion_tokens":11,"total_tokens":159,"prompt_tokens_details":{"cached_tokens":114}}}
 
       data: [DONE]
 
@@ -49,15 +49,15 @@ interactions:
       - text/event-stream;charset=UTF-8
     status: 200 OK
     code: 200
-    duration: 736.606625ms
+    duration: 653.304417ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50766
+    content_length: 50967
     host: ""

internal/agent/testdata/TestCoderAgent/zai-glm4.6/glob_tool.yaml 🔗

@@ -24,19 +24,21 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"20260313005744c3401f0b08cd4721","created":1773334664,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","reasoning_content":"\n"}}]}
+      data: {"id":"202603130415039728beb3b5dc461d","created":1773346503,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","reasoning_content":"\n"}}]}
 
-      data: {"id":"20260313005744c3401f0b08cd4721","created":1773334664,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Find"}}]}
+      data: {"id":"202603130415039728beb3b5dc461d","created":1773346503,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Find"}}]}
 
-      data: {"id":"20260313005744c3401f0b08cd4721","created":1773334664,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" Go"}}]}
+      data: {"id":"202603130415039728beb3b5dc461d","created":1773346503,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" all"}}]}
 
-      data: {"id":"20260313005744c3401f0b08cd4721","created":1773334664,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" files"}}]}
+      data: {"id":"202603130415039728beb3b5dc461d","created":1773346503,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" Go"}}]}
 
-      data: {"id":"20260313005744c3401f0b08cd4721","created":1773334664,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" with"}}]}
+      data: {"id":"202603130415039728beb3b5dc461d","created":1773346503,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" files"}}]}
 
-      data: {"id":"20260313005744c3401f0b08cd4721","created":1773334664,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" glob"}}]}
+      data: {"id":"202603130415039728beb3b5dc461d","created":1773346503,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" with"}}]}
 
-      data: {"id":"20260313005744c3401f0b08cd4721","created":1773334664,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":132,"completion_tokens":9,"total_tokens":141,"prompt_tokens_details":{"cached_tokens":115}}}
+      data: {"id":"202603130415039728beb3b5dc461d","created":1773346503,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" glob"}}]}
+
+      data: {"id":"202603130415039728beb3b5dc461d","created":1773346503,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":132,"completion_tokens":10,"total_tokens":142,"prompt_tokens_details":{"cached_tokens":115}}}
 
       data: [DONE]
 
@@ -45,15 +47,15 @@ interactions:
       - text/event-stream;charset=UTF-8
     status: 200 OK
     code: 200
-    duration: 645.146834ms
+    duration: 692.47975ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50684
+    content_length: 50885
     host: ""

internal/agent/testdata/TestCoderAgent/zai-glm4.6/grep_tool.yaml 🔗

@@ -24,19 +24,17 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"20260313005754ac4e16e48c2b4fb9","created":1773334674,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","reasoning_content":"\n"}}]}
+      data: {"id":"20260313041507c3bb3653caaa4a29","created":1773346507,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","reasoning_content":"\n"}}]}
 
-      data: {"id":"20260313005754ac4e16e48c2b4fb9","created":1773334674,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Go"}}]}
+      data: {"id":"20260313041507c3bb3653caaa4a29","created":1773346507,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"grep"}}]}
 
-      data: {"id":"20260313005754ac4e16e48c2b4fb9","created":1773334674,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" package"}}]}
+      data: {"id":"20260313041507c3bb3653caaa4a29","created":1773346507,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" package"}}]}
 
-      data: {"id":"20260313005754ac4e16e48c2b4fb9","created":1773334674,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" search"}}]}
+      data: {"id":"20260313041507c3bb3653caaa4a29","created":1773346507,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" *."}}]}
 
-      data: {"id":"20260313005754ac4e16e48c2b4fb9","created":1773334674,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" with"}}]}
+      data: {"id":"20260313041507c3bb3653caaa4a29","created":1773346507,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"go"}}]}
 
-      data: {"id":"20260313005754ac4e16e48c2b4fb9","created":1773334674,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" grep"}}]}
-
-      data: {"id":"20260313005754ac4e16e48c2b4fb9","created":1773334674,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":133,"completion_tokens":9,"total_tokens":142,"prompt_tokens_details":{"cached_tokens":115}}}
+      data: {"id":"20260313041507c3bb3653caaa4a29","created":1773346507,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":133,"completion_tokens":8,"total_tokens":141,"prompt_tokens_details":{"cached_tokens":115}}}
 
       data: [DONE]
 
@@ -45,15 +43,15 @@ interactions:
       - text/event-stream;charset=UTF-8
     status: 200 OK
     code: 200
-    duration: 691.100708ms
+    duration: 608.726334ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50682
+    content_length: 50883
     host: ""

internal/agent/testdata/TestCoderAgent/zai-glm4.6/ls_tool.yaml 🔗

@@ -24,19 +24,17 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"202603130057586d7c2b9c2d97413c","created":1773334678,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","reasoning_content":"\n"}}]}
+      data: {"id":"20260313041513cafe5646e30a4b09","created":1773346513,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","reasoning_content":"\n"}}]}
 
-      data: {"id":"202603130057586d7c2b9c2d97413c","created":1773334678,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"List"}}]}
+      data: {"id":"20260313041513cafe5646e30a4b09","created":1773346513,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"List"}}]}
 
-      data: {"id":"202603130057586d7c2b9c2d97413c","created":1773334678,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" files"}}]}
+      data: {"id":"20260313041513cafe5646e30a4b09","created":1773346513,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" Files"}}]}
 
-      data: {"id":"202603130057586d7c2b9c2d97413c","created":1773334678,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" with"}}]}
+      data: {"id":"20260313041513cafe5646e30a4b09","created":1773346513,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" with"}}]}
 
-      data: {"id":"202603130057586d7c2b9c2d97413c","created":1773334678,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" ls"}}]}
+      data: {"id":"20260313041513cafe5646e30a4b09","created":1773346513,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" ls"}}]}
 
-      data: {"id":"202603130057586d7c2b9c2d97413c","created":1773334678,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" command"}}]}
-
-      data: {"id":"202603130057586d7c2b9c2d97413c","created":1773334678,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":130,"completion_tokens":9,"total_tokens":139,"prompt_tokens_details":{"cached_tokens":115}}}
+      data: {"id":"20260313041513cafe5646e30a4b09","created":1773346513,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":130,"completion_tokens":8,"total_tokens":138,"prompt_tokens_details":{"cached_tokens":115}}}
 
       data: [DONE]
 
@@ -45,15 +43,15 @@ interactions:
       - text/event-stream;charset=UTF-8
     status: 200 OK
     code: 200
-    duration: 640.509291ms
+    duration: 650.921958ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50676
+    content_length: 50877
     host: ""

internal/agent/testdata/TestCoderAgent/zai-glm4.6/multiedit_tool.yaml 🔗

@@ -24,23 +24,21 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"2026031300580127adcbad203e4bcb","created":1773334681,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","reasoning_content":"\n"}}]}
+      data: {"id":"2026031304151715bb72c64ce040ce","created":1773346517,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","reasoning_content":"\n"}}]}
 
-      data: {"id":"2026031300580127adcbad203e4bcb","created":1773334681,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Mult"}}]}
+      data: {"id":"2026031304151715bb72c64ce040ce","created":1773346517,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Mult"}}]}
 
-      data: {"id":"2026031300580127adcbad203e4bcb","created":1773334681,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"ied"}}]}
+      data: {"id":"2026031304151715bb72c64ce040ce","created":1773346517,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"ied"}}]}
 
-      data: {"id":"2026031300580127adcbad203e4bcb","created":1773334681,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"it"}}]}
+      data: {"id":"2026031304151715bb72c64ce040ce","created":1773346517,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"it"}}]}
 
-      data: {"id":"2026031300580127adcbad203e4bcb","created":1773334681,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" Go"}}]}
+      data: {"id":"2026031304151715bb72c64ce040ce","created":1773346517,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" Go"}}]}
 
-      data: {"id":"2026031300580127adcbad203e4bcb","created":1773334681,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" G"}}]}
+      data: {"id":"2026031304151715bb72c64ce040ce","created":1773346517,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" Code"}}]}
 
-      data: {"id":"2026031300580127adcbad203e4bcb","created":1773334681,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"reeting"}}]}
+      data: {"id":"2026031304151715bb72c64ce040ce","created":1773346517,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" Modification"}}]}
 
-      data: {"id":"2026031300580127adcbad203e4bcb","created":1773334681,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" Change"}}]}
-
-      data: {"id":"2026031300580127adcbad203e4bcb","created":1773334681,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":153,"completion_tokens":11,"total_tokens":164,"prompt_tokens_details":{"cached_tokens":115}}}
+      data: {"id":"2026031304151715bb72c64ce040ce","created":1773346517,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":153,"completion_tokens":10,"total_tokens":163,"prompt_tokens_details":{"cached_tokens":115}}}
 
       data: [DONE]
 
@@ -49,15 +47,15 @@ interactions:
       - text/event-stream;charset=UTF-8
     status: 200 OK
     code: 200
-    duration: 650.443875ms
+    duration: 617.22425ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50762
+    content_length: 50963
     host: ""

internal/agent/testdata/TestCoderAgent/zai-glm4.6/parallel_tool_calls.yaml 🔗

@@ -24,19 +24,25 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"2026031300583406bc96b58dec4ddf","created":1773334714,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","reasoning_content":"\n"}}]}
+      data: {"id":"20260313041539bcf7d231fb614122","created":1773346539,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","reasoning_content":"\n"}}]}
 
-      data: {"id":"2026031300583406bc96b58dec4ddf","created":1773334714,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Parallel"}}]}
+      data: {"id":"20260313041539bcf7d231fb614122","created":1773346539,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Parallel"}}]}
 
-      data: {"id":"2026031300583406bc96b58dec4ddf","created":1773334714,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" glob"}}]}
+      data: {"id":"20260313041539bcf7d231fb614122","created":1773346539,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" glob"}}]}
 
-      data: {"id":"2026031300583406bc96b58dec4ddf","created":1773334714,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" and"}}]}
+      data: {"id":"20260313041539bcf7d231fb614122","created":1773346539,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" and"}}]}
 
-      data: {"id":"2026031300583406bc96b58dec4ddf","created":1773334714,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" ls"}}]}
+      data: {"id":"20260313041539bcf7d231fb614122","created":1773346539,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" ls"}}]}
 
-      data: {"id":"2026031300583406bc96b58dec4ddf","created":1773334714,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" commands"}}]}
+      data: {"id":"20260313041539bcf7d231fb614122","created":1773346539,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" commands"}}]}
 
-      data: {"id":"2026031300583406bc96b58dec4ddf","created":1773334714,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":149,"completion_tokens":9,"total_tokens":158,"prompt_tokens_details":{"cached_tokens":122}}}
+      data: {"id":"20260313041539bcf7d231fb614122","created":1773346539,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" for"}}]}
+
+      data: {"id":"20260313041539bcf7d231fb614122","created":1773346539,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" Go"}}]}
+
+      data: {"id":"20260313041539bcf7d231fb614122","created":1773346539,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" files"}}]}
+
+      data: {"id":"20260313041539bcf7d231fb614122","created":1773346539,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":149,"completion_tokens":12,"total_tokens":161,"prompt_tokens_details":{"cached_tokens":122}}}
 
       data: [DONE]
 
@@ -45,15 +51,15 @@ interactions:
       - text/event-stream;charset=UTF-8
     status: 200 OK
     code: 200
-    duration: 671.149208ms
+    duration: 698.619667ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50773
+    content_length: 50974
     host: ""

internal/agent/testdata/TestCoderAgent/zai-glm4.6/read_a_file.yaml 🔗

@@ -24,17 +24,15 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"202603130057068493e9d0537f4469","created":1773334626,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","reasoning_content":"\n"}}]}
+      data: {"id":"20260313041419382e7728255d4003","created":1773346459,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","reasoning_content":"\n"}}]}
 
-      data: {"id":"202603130057068493e9d0537f4469","created":1773334626,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Go"}}]}
+      data: {"id":"20260313041419382e7728255d4003","created":1773346459,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Go"}}]}
 
-      data: {"id":"202603130057068493e9d0537f4469","created":1773334626,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" mod"}}]}
+      data: {"id":"20260313041419382e7728255d4003","created":1773346459,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" mod"}}]}
 
-      data: {"id":"202603130057068493e9d0537f4469","created":1773334626,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" file"}}]}
+      data: {"id":"20260313041419382e7728255d4003","created":1773346459,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" reading"}}]}
 
-      data: {"id":"202603130057068493e9d0537f4469","created":1773334626,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" examination"}}]}
-
-      data: {"id":"202603130057068493e9d0537f4469","created":1773334626,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":124,"completion_tokens":8,"total_tokens":132,"prompt_tokens_details":{"cached_tokens":114}}}
+      data: {"id":"20260313041419382e7728255d4003","created":1773346459,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":124,"completion_tokens":7,"total_tokens":131,"prompt_tokens_details":{"cached_tokens":114}}}
 
       data: [DONE]
 
@@ -43,15 +41,15 @@ interactions:
       - text/event-stream;charset=UTF-8
     status: 200 OK
     code: 200
-    duration: 485.383916ms
+    duration: 751.460042ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50646
+    content_length: 50847
     host: ""

internal/agent/testdata/TestCoderAgent/zai-glm4.6/simple_test.yaml 🔗

@@ -24,11 +24,13 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"2026031300570169f889211fd042f0","created":1773334621,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","reasoning_content":"\n"}}]}
+      data: {"id":"202603130414168ff3a068e783494c","created":1773346456,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","reasoning_content":"\n"}}]}
 
-      data: {"id":"2026031300570169f889211fd042f0","created":1773334621,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Hello"}}]}
+      data: {"id":"202603130414168ff3a068e783494c","created":1773346456,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"G"}}]}
 
-      data: {"id":"2026031300570169f889211fd042f0","created":1773334621,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":121,"completion_tokens":5,"total_tokens":126,"prompt_tokens_details":{"cached_tokens":4}}}
+      data: {"id":"202603130414168ff3a068e783494c","created":1773346456,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"reeting"}}]}
+
+      data: {"id":"202603130414168ff3a068e783494c","created":1773346456,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":121,"completion_tokens":6,"total_tokens":127,"prompt_tokens_details":{"cached_tokens":4}}}
 
       data: [DONE]
 
@@ -37,15 +39,15 @@ interactions:
       - text/event-stream;charset=UTF-8
     status: 200 OK
     code: 200
-    duration: 1.889344417s
+    duration: 1.762131625s
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50636
+    content_length: 50837
     host: ""

internal/agent/testdata/TestCoderAgent/zai-glm4.6/sourcegraph_tool.yaml 🔗

@@ -24,23 +24,17 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"20260313005814b570dd650aed4f95","created":1773334694,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","reasoning_content":"\n"}}]}
+      data: {"id":"202603130415283ca31ec31524434b","created":1773346528,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","reasoning_content":"\n"}}]}
 
-      data: {"id":"20260313005814b570dd650aed4f95","created":1773334694,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Search"}}]}
+      data: {"id":"202603130415283ca31ec31524434b","created":1773346528,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Go"}}]}
 
-      data: {"id":"20260313005814b570dd650aed4f95","created":1773334694,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" '"}}]}
+      data: {"id":"202603130415283ca31ec31524434b","created":1773346528,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" main"}}]}
 
-      data: {"id":"20260313005814b570dd650aed4f95","created":1773334694,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"func"}}]}
+      data: {"id":"202603130415283ca31ec31524434b","created":1773346528,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" function"}}]}
 
-      data: {"id":"20260313005814b570dd650aed4f95","created":1773334694,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" main"}}]}
+      data: {"id":"202603130415283ca31ec31524434b","created":1773346528,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" search"}}]}
 
-      data: {"id":"20260313005814b570dd650aed4f95","created":1773334694,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"'"}}]}
-
-      data: {"id":"20260313005814b570dd650aed4f95","created":1773334694,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" in"}}]}
-
-      data: {"id":"20260313005814b570dd650aed4f95","created":1773334694,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" Go"}}]}
-
-      data: {"id":"20260313005814b570dd650aed4f95","created":1773334694,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":133,"completion_tokens":11,"total_tokens":144,"prompt_tokens_details":{"cached_tokens":115}}}
+      data: {"id":"202603130415283ca31ec31524434b","created":1773346528,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":133,"completion_tokens":8,"total_tokens":141,"prompt_tokens_details":{"cached_tokens":115}}}
 
       data: [DONE]
 
@@ -49,15 +43,15 @@ interactions:
       - text/event-stream;charset=UTF-8
     status: 200 OK
     code: 200
-    duration: 653.2945ms
+    duration: 676.245916ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50696
+    content_length: 50897
     host: ""

internal/agent/testdata/TestCoderAgent/zai-glm4.6/update_a_file.yaml 🔗

@@ -24,23 +24,21 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"202603130057173d64ded14ab944a3","created":1773334637,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","reasoning_content":"\n"}}]}
+      data: {"id":"2026031304142637b25add063545df","created":1773346466,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","reasoning_content":"\n"}}]}
 
-      data: {"id":"202603130057173d64ded14ab944a3","created":1773334637,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Update"}}]}
+      data: {"id":"2026031304142637b25add063545df","created":1773346466,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Update"}}]}
 
-      data: {"id":"202603130057173d64ded14ab944a3","created":1773334637,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" main"}}]}
+      data: {"id":"2026031304142637b25add063545df","created":1773346466,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" main"}}]}
 
-      data: {"id":"202603130057173d64ded14ab944a3","created":1773334637,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":".go"}}]}
+      data: {"id":"2026031304142637b25add063545df","created":1773346466,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":".go"}}]}
 
-      data: {"id":"202603130057173d64ded14ab944a3","created":1773334637,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" file"}}]}
+      data: {"id":"2026031304142637b25add063545df","created":1773346466,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" to"}}]}
 
-      data: {"id":"202603130057173d64ded14ab944a3","created":1773334637,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" for"}}]}
+      data: {"id":"2026031304142637b25add063545df","created":1773346466,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" print"}}]}
 
-      data: {"id":"202603130057173d64ded14ab944a3","created":1773334637,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" crush"}}]}
+      data: {"id":"2026031304142637b25add063545df","created":1773346466,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" hello"}}]}
 
-      data: {"id":"202603130057173d64ded14ab944a3","created":1773334637,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" hello"}}]}
-
-      data: {"id":"202603130057173d64ded14ab944a3","created":1773334637,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":134,"completion_tokens":11,"total_tokens":145,"prompt_tokens_details":{"cached_tokens":114}}}
+      data: {"id":"2026031304142637b25add063545df","created":1773346466,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":134,"completion_tokens":10,"total_tokens":144,"prompt_tokens_details":{"cached_tokens":114}}}
 
       data: [DONE]
 
@@ -49,15 +47,15 @@ interactions:
       - text/event-stream;charset=UTF-8
     status: 200 OK
     code: 200
-    duration: 1.61739175s
+    duration: 1.264043875s
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50702
+    content_length: 50903
     host: ""

internal/agent/testdata/TestCoderAgent/zai-glm4.6/write_tool.yaml 🔗

@@ -24,23 +24,23 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"2026031300583043a1c1ec22d741f4","created":1773334710,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","reasoning_content":"\n"}}]}
+      data: {"id":"202603130415354342f3e7fce041ac","created":1773346535,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","reasoning_content":"\n"}}]}
 
-      data: {"id":"2026031300583043a1c1ec22d741f4","created":1773334710,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Write"}}]}
+      data: {"id":"202603130415354342f3e7fce041ac","created":1773346535,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Creating"}}]}
 
-      data: {"id":"2026031300583043a1c1ec22d741f4","created":1773334710,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" config"}}]}
+      data: {"id":"202603130415354342f3e7fce041ac","created":1773346535,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" config"}}]}
 
-      data: {"id":"2026031300583043a1c1ec22d741f4","created":1773334710,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":".json"}}]}
+      data: {"id":"202603130415354342f3e7fce041ac","created":1773346535,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":".json"}}]}
 
-      data: {"id":"2026031300583043a1c1ec22d741f4","created":1773334710,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" file"}}]}
+      data: {"id":"202603130415354342f3e7fce041ac","created":1773346535,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" file"}}]}
 
-      data: {"id":"2026031300583043a1c1ec22d741f4","created":1773334710,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" with"}}]}
+      data: {"id":"202603130415354342f3e7fce041ac","created":1773346535,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" with"}}]}
 
-      data: {"id":"2026031300583043a1c1ec22d741f4","created":1773334710,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" JSON"}}]}
+      data: {"id":"202603130415354342f3e7fce041ac","created":1773346535,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" write"}}]}
 
-      data: {"id":"2026031300583043a1c1ec22d741f4","created":1773334710,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" content"}}]}
+      data: {"id":"202603130415354342f3e7fce041ac","created":1773346535,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" command"}}]}
 
-      data: {"id":"2026031300583043a1c1ec22d741f4","created":1773334710,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":148,"completion_tokens":11,"total_tokens":159,"prompt_tokens_details":{"cached_tokens":115}}}
+      data: {"id":"202603130415354342f3e7fce041ac","created":1773346535,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":148,"completion_tokens":11,"total_tokens":159,"prompt_tokens_details":{"cached_tokens":115}}}
 
       data: [DONE]
 
@@ -49,15 +49,15 @@ interactions:
       - text/event-stream;charset=UTF-8
     status: 200 OK
     code: 200
-    duration: 714.901209ms
+    duration: 626.617ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50739
+    content_length: 50940
     host: ""

internal/agent/tools/bash.go 🔗

@@ -20,17 +20,19 @@ import (
 )
 
 type BashParams struct {
-	Description     string `json:"description" description:"A brief description of what the command does, try to keep it under 30 characters or so"`
-	Command         string `json:"command" description:"The command to execute"`
-	WorkingDir      string `json:"working_dir,omitempty" description:"The working directory to execute the command in (defaults to current directory)"`
-	RunInBackground bool   `json:"run_in_background,omitempty" description:"Set to true (boolean) to run this command in the background. Use job_output to read the output later."`
+	Description         string `json:"description" description:"A brief description of what the command does, try to keep it under 30 characters or so"`
+	Command             string `json:"command" description:"The command to execute"`
+	WorkingDir          string `json:"working_dir,omitempty" description:"The working directory to execute the command in (defaults to current directory)"`
+	RunInBackground     bool   `json:"run_in_background,omitempty" description:"Set to true (boolean) to run this command in the background. Use job_output to read the output later."`
+	AutoBackgroundAfter int    `json:"auto_background_after,omitempty" description:"Seconds to wait before automatically moving the command to a background job (default: 60)"`
 }
 
 type BashPermissionsParams struct {
-	Description     string `json:"description"`
-	Command         string `json:"command"`
-	WorkingDir      string `json:"working_dir"`
-	RunInBackground bool   `json:"run_in_background"`
+	Description         string `json:"description"`
+	Command             string `json:"command"`
+	WorkingDir          string `json:"working_dir"`
+	RunInBackground     bool   `json:"run_in_background"`
+	AutoBackgroundAfter int    `json:"auto_background_after"`
 }
 
 type BashResponseMetadata struct {
@@ -46,9 +48,9 @@ type BashResponseMetadata struct {
 const (
 	BashToolName = "bash"
 
-	AutoBackgroundThreshold = 1 * time.Minute // Commands taking longer automatically become background jobs
-	MaxOutputLength         = 30000
-	BashNoOutput            = "no output"
+	DefaultAutoBackgroundAfter = 60 // Commands taking longer automatically become background jobs
+	MaxOutputLength            = 30000
+	BashNoOutput               = "no output"
 )
 
 //go:embed bash.tpl
@@ -303,7 +305,10 @@ func NewBashTool(permissions permission.Service, workingDir string, attribution
 			// Wait for either completion, auto-background threshold, or context cancellation
 			ticker := time.NewTicker(100 * time.Millisecond)
 			defer ticker.Stop()
-			timeout := time.After(AutoBackgroundThreshold)
+
+			autoBackgroundAfter := cmp.Or(params.AutoBackgroundAfter, DefaultAutoBackgroundAfter)
+			autoBackgroundThreshold := time.Duration(autoBackgroundAfter) * time.Second
+			timeout := time.After(autoBackgroundThreshold)
 
 			var stdout, stderr string
 			var done bool

internal/agent/tools/bash.tpl 🔗

@@ -10,7 +10,7 @@ Common shell builtins and core utils available on Windows.
 1. Directory Verification: If creating directories/files, use LS tool to verify parent exists
 2. Security Check: Banned commands ({{ .BannedCommands }}) return error - explain to user. Safe read-only commands execute without prompts
 3. Command Execution: Execute with proper quoting, capture output
-4. Auto-Background: Commands exceeding 1 minute automatically move to background and return shell ID
+4. Auto-Background: Commands exceeding 1 minute (default, configurable via `auto_background_after`) automatically move to background and return shell ID
 5. Output Processing: Truncate if exceeds {{ .MaxOutputLength }} characters
 6. Return Result: Include errors, metadata with <cwd></cwd> tags
 </execution_steps>

internal/agent/tools/bash_test.go 🔗

@@ -0,0 +1,103 @@
+package tools
+
+import (
+	"context"
+	"encoding/json"
+	"testing"
+
+	"charm.land/fantasy"
+	"github.com/charmbracelet/crush/internal/config"
+	"github.com/charmbracelet/crush/internal/permission"
+	"github.com/charmbracelet/crush/internal/pubsub"
+	"github.com/charmbracelet/crush/internal/shell"
+	"github.com/stretchr/testify/require"
+)
+
+type mockBashPermissionService struct {
+	*pubsub.Broker[permission.PermissionRequest]
+}
+
+func (m *mockBashPermissionService) Request(ctx context.Context, req permission.CreatePermissionRequest) (bool, error) {
+	return true, nil
+}
+
+func (m *mockBashPermissionService) Grant(req permission.PermissionRequest) {}
+
+func (m *mockBashPermissionService) Deny(req permission.PermissionRequest) {}
+
+func (m *mockBashPermissionService) GrantPersistent(req permission.PermissionRequest) {}
+
+func (m *mockBashPermissionService) AutoApproveSession(sessionID string) {}
+
+func (m *mockBashPermissionService) SetSkipRequests(skip bool) {}
+
+func (m *mockBashPermissionService) SkipRequests() bool {
+	return false
+}
+
+func (m *mockBashPermissionService) SubscribeNotifications(ctx context.Context) <-chan pubsub.Event[permission.PermissionNotification] {
+	return make(<-chan pubsub.Event[permission.PermissionNotification])
+}
+
+func TestBashTool_DefaultAutoBackgroundThreshold(t *testing.T) {
+	workingDir := t.TempDir()
+	tool := newBashToolForTest(workingDir)
+	ctx := context.WithValue(context.Background(), SessionIDContextKey, "test-session")
+
+	resp := runBashTool(t, tool, ctx, BashParams{
+		Description: "default threshold",
+		Command:     "echo done",
+	})
+
+	require.False(t, resp.IsError)
+	var meta BashResponseMetadata
+	require.NoError(t, json.Unmarshal([]byte(resp.Metadata), &meta))
+	require.False(t, meta.Background)
+	require.Empty(t, meta.ShellID)
+	require.Contains(t, meta.Output, "done")
+}
+
+func TestBashTool_CustomAutoBackgroundThreshold(t *testing.T) {
+	workingDir := t.TempDir()
+	tool := newBashToolForTest(workingDir)
+	ctx := context.WithValue(context.Background(), SessionIDContextKey, "test-session")
+
+	resp := runBashTool(t, tool, ctx, BashParams{
+		Description:         "custom threshold",
+		Command:             "sleep 1.5 && echo done",
+		AutoBackgroundAfter: 1,
+	})
+
+	require.False(t, resp.IsError)
+	var meta BashResponseMetadata
+	require.NoError(t, json.Unmarshal([]byte(resp.Metadata), &meta))
+	require.True(t, meta.Background)
+	require.NotEmpty(t, meta.ShellID)
+	require.Contains(t, resp.Content, "moved to background")
+
+	bgManager := shell.GetBackgroundShellManager()
+	require.NoError(t, bgManager.Kill(meta.ShellID))
+}
+
+func newBashToolForTest(workingDir string) fantasy.AgentTool {
+	permissions := &mockBashPermissionService{Broker: pubsub.NewBroker[permission.PermissionRequest]()}
+	attribution := &config.Attribution{TrailerStyle: config.TrailerStyleNone}
+	return NewBashTool(permissions, workingDir, attribution, "test-model")
+}
+
+func runBashTool(t *testing.T, tool fantasy.AgentTool, ctx context.Context, params BashParams) fantasy.ToolResponse {
+	t.Helper()
+
+	input, err := json.Marshal(params)
+	require.NoError(t, err)
+
+	call := fantasy.ToolCall{
+		ID:    "test-call",
+		Name:  BashToolName,
+		Input: string(input),
+	}
+
+	resp, err := tool.Run(ctx, call)
+	require.NoError(t, err)
+	return resp
+}