feat: keep successful edits even if some fail (#1327)

Kujtim Hoxha created

Change summary

internal/agent/testdata/TestCoderAgent/anthropic-sonnet/bash_tool.yaml             |  28 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/download_tool.yaml         |  31 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/fetch_tool.yaml            |  27 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/glob_tool.yaml             |  23 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/grep_tool.yaml             |  30 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/ls_tool.yaml               |  19 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/multiedit_tool.yaml        |  25 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/parallel_tool_calls.yaml   |  28 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/read_a_file.yaml           |  20 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/simple_test.yaml           |  25 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/sourcegraph_tool.yaml      |  22 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/update_a_file.yaml         |  22 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/write_tool.yaml            |  27 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/bash_tool.yaml                 |  30 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/download_tool.yaml             |  24 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/fetch_tool.yaml                |  30 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/glob_tool.yaml                 |  30 
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            |  26 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/parallel_tool_calls.yaml       |  30 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/read_a_file.yaml               |  18 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/simple_test.yaml               |  14 
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                |  22 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/bash_tool.yaml           |  20 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/download_tool.yaml       |   2 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/fetch_tool.yaml          |  29 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/glob_tool.yaml           |  18 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/grep_tool.yaml           |  26 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/ls_tool.yaml             |  24 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/multiedit_tool.yaml      |  20 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/parallel_tool_calls.yaml |  38 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/read_a_file.yaml         |   2 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/simple_test.yaml         |  14 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/sourcegraph_tool.yaml    |  30 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/update_a_file.yaml       |  26 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/write_tool.yaml          |  18 
internal/agent/testdata/TestCoderAgent/zai-glm4.6/bash_tool.yaml                   |  20 
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                   |  22 
internal/agent/testdata/TestCoderAgent/zai-glm4.6/grep_tool.yaml                   |  22 
internal/agent/testdata/TestCoderAgent/zai-glm4.6/ls_tool.yaml                     |  18 
internal/agent/testdata/TestCoderAgent/zai-glm4.6/multiedit_tool.yaml              |  24 
internal/agent/testdata/TestCoderAgent/zai-glm4.6/parallel_tool_calls.yaml         |   3 
internal/agent/testdata/TestCoderAgent/zai-glm4.6/read_a_file.yaml                 |   2 
internal/agent/testdata/TestCoderAgent/zai-glm4.6/simple_test.yaml                 |  12 
internal/agent/testdata/TestCoderAgent/zai-glm4.6/sourcegraph_tool.yaml            |  20 
internal/agent/testdata/TestCoderAgent/zai-glm4.6/update_a_file.yaml               |  22 
internal/agent/testdata/TestCoderAgent/zai-glm4.6/write_tool.yaml                  |  20 
internal/agent/tools/multiedit.go                                                  |  76 
internal/agent/tools/multiedit.md                                                  |  35 
internal/agent/tools/multiedit_test.go                                             | 225 
internal/tui/components/chat/messages/renderer.go                                  |  11 
56 files changed, 897 insertions(+), 617 deletions(-)

Detailed changes

internal/agent/testdata/TestCoderAgent/anthropic-sonnet/bash_tool.yaml πŸ”—

@@ -25,49 +25,55 @@ interactions:
     content_length: -1
     body: |+
       event: message_start
-      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_018vvGJgLJDHRwgcXt9xFHSn","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":3,"service_tier":"standard"}}               }
+      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_01VitTYtpvnwj5N6fBKySom4","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":2,"service_tier":"standard"}}       }
 
       event: content_block_start
-      data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}  }
+      data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}      }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Bash File"}   }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Bash"}         }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Creation"}    }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" File"}               }
 
       event: ping
       data: {"type": "ping"}
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Comman"}}
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Creation"}    }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"d"} }
+      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":" Hello"}          }
+
+      event: content_block_delta
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Message"}           }
 
       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":152,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":8}         }
+      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":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: 725.34975ms
+    duration: 560.092417ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 45570
+    content_length: 45989
     host: ""

internal/agent/testdata/TestCoderAgent/anthropic-sonnet/download_tool.yaml πŸ”—

@@ -25,55 +25,52 @@ interactions:
     content_length: -1
     body: |+
       event: message_start
-      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_01WC9ngFiHLQdExEcKQAtWp9","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":2,"service_tier":"standard"}} }
+      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_01SMGNsdc3MdjnDTj98MeSvC","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"}}      }
 
       event: content_block_start
       data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}  }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Download Example"} }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Downloa"}            }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Text"}          }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"d Text"}       }
 
       event: ping
       data: {"type": "ping"}
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" File"}          }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" File from"}}
 
-      event: ping
-      data: {"type": "ping"}
-
-      event: content_block_stop
-      data: {"type":"content_block_stop","index":0             }
+      event: content_block_delta
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Example"}        }
 
-      event: ping
-      data: {"type": "ping"}
+      event: content_block_delta
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" URL"}}
 
-      event: ping
-      data: {"type": "ping"}
+      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":160,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":7}       }
+      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":9}            }
 
       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: 637.960541ms
+    duration: 506.850208ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 45595
+    content_length: 46014
     host: ""

internal/agent/testdata/TestCoderAgent/anthropic-sonnet/fetch_tool.yaml πŸ”—

@@ -25,52 +25,55 @@ interactions:
     content_length: -1
     body: |+
       event: message_start
-      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_01BRDPXhzbGHNDZaHgoYjpSL","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":3,"service_tier":"standard"}}}
+      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_018xCr1DYiCf3jArVxFU59KR","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"}}       }
 
       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: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Fetch HTML"} }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Web"}               }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" an"}            }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Page"}  }
 
       event: ping
       data: {"type": "ping"}
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"d Search"}            }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Search"}       }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" for John"}         }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" for"}        }
 
       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":" John"}  }
+
+      event: content_block_delta
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" 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":12}        }
+      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":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: 670.326292ms
+    duration: 601.795959ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 45613
+    content_length: 46032
     host: ""

internal/agent/testdata/TestCoderAgent/anthropic-sonnet/glob_tool.yaml πŸ”—

@@ -25,52 +25,49 @@ interactions:
     content_length: -1
     body: |+
       event: message_start
-      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_01JyW7ZnNKWjjHfyHNr4YYqU","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":142,"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"}}    }
+      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_019rtcSpEMDvDZB1L5jzASu7","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":142,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":1,"service_tier":"standard"}}    }
 
       event: content_block_start
       data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}    }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Fin"}             }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Fin"}        }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"d Go"}            }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"d Go"}             }
 
       event: ping
       data: {"type": "ping"}
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" files with"}           }
+      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":" pattern"}         }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" in Current Directory"}          }
 
       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":142,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":9}           }
+      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":142,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":9}}
 
       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: 845.779666ms
+    duration: 827.522292ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 45531
+    content_length: 45950
     host: ""

internal/agent/testdata/TestCoderAgent/anthropic-sonnet/grep_tool.yaml πŸ”—

@@ -25,55 +25,49 @@ interactions:
     content_length: -1
     body: |+
       event: message_start
-      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_01ANS7svAARMMhYAVFetyTTm","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":144,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":6,"service_tier":"standard"}}        }
+      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_01RAcxzeTopaX9juzPGBzfRV","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":144,"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"}}           }
 
       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: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Searching for 'package"}          }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Grep"}    }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"' in Go files with"}  }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Package"}          }
 
       event: ping
       data: {"type": "ping"}
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" grep"}       }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Search"}            }
 
-      event: ping
-      data: {"type": "ping"}
+      event: content_block_delta
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" in Go Files"}            }
 
       event: content_block_stop
-      data: {"type":"content_block_stop","index":0           }
-
-      event: ping
-      data: {"type": "ping"}
-
-      event: ping
-      data: {"type": "ping"}
+      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":144,"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":144,"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: 720.443917ms
+    duration: 551.294833ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 45529
+    content_length: 45948
     host: ""

internal/agent/testdata/TestCoderAgent/anthropic-sonnet/ls_tool.yaml πŸ”—

@@ -25,46 +25,49 @@ interactions:
     content_length: -1
     body: |+
       event: message_start
-      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_01BNFzNWD2kzAnPn5YweshvD","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":140,"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"}}         }
+      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_016Uu4PnZb2k4Sx33HrinmEr","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":140,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":1,"service_tier":"standard"}}        }
 
       event: content_block_start
       data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}     }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Listing"}   }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"List"}   }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Files"} }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Files"}               }
 
       event: ping
       data: {"type": "ping"}
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" in Current Directory"}}
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" in"}}
+
+      event: content_block_delta
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Current Directory"}   }
 
       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":140,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":9}       }
+      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":140,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":8}    }
 
       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.012243208s
+    duration: 988.34175ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 45523
+    content_length: 45942
     host: ""

internal/agent/testdata/TestCoderAgent/anthropic-sonnet/multiedit_tool.yaml πŸ”—

@@ -25,49 +25,52 @@ interactions:
     content_length: -1
     body: |+
       event: message_start
-      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_01QY6iFxXLQNuLLZhBYyPPrj","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"}} }
+      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_01FjZyvRmmP6f5huYC6M5w9q","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":1,"service_tier":"standard"}} }
 
       event: content_block_start
-      data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}             }
+      data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}      }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Modify"}     }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Edit"}              }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Greeting in"}        }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Go"} }
 
       event: ping
       data: {"type": "ping"}
 
       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":" Code"}}
+
+      event: content_block_delta
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Text"}          }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Program"}      }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Modification"}    }
 
       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":170,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":10}          }
+      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":9}   }
 
       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: 570.817375ms
+    duration: 614.803834ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 45609
+    content_length: 46028
     host: ""

internal/agent/testdata/TestCoderAgent/anthropic-sonnet/parallel_tool_calls.yaml πŸ”—

@@ -25,49 +25,55 @@ interactions:
     content_length: -1
     body: |+
       event: message_start
-      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_01QLJQGk8HupwYPrdhAENEqs","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":2,"service_tier":"standard"}}               }
+      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_01C8kCFF38gUc1F98cNSb1Je","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":2,"service_tier":"standard"}}           }
 
       event: content_block_start
-      data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}         }
+      data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}          }
 
       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":"Parallel"}       }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Go File"}              }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Go File"}            }
 
       event: ping
       data: {"type": "ping"}
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Glob and Directory"}            }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Listing"}             }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Listing"}        }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" an"} }
+
+      event: content_block_delta
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"d Directory"}             }
+
+      event: content_block_delta
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Scan"}              }
 
       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":13}   }
+      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":13}              }
 
       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.296836708s
+    duration: 640.574ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 45620
+    content_length: 46039
     host: ""

internal/agent/testdata/TestCoderAgent/anthropic-sonnet/read_a_file.yaml πŸ”—

@@ -25,49 +25,49 @@ interactions:
     content_length: -1
     body: |+
       event: message_start
-      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_01TSuuNRcdWrv4YQYCMEMnFi","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"}}     }
+      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_015jTnfBT3pBhzGcY78T5dtG","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"}}   }
 
       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: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Rea"}  }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Rea"}           }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"d Go"}        }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"d Go"}            }
 
       event: ping
       data: {"type": "ping"}
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Module"}          }
+      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":" Details"}          }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Details"}              }
 
       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":134,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":7}     }
 
       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: 715.464792ms
+    duration: 534.240625ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 45493
+    content_length: 45912
     host: ""

internal/agent/testdata/TestCoderAgent/anthropic-sonnet/simple_test.yaml πŸ”—

@@ -25,37 +25,46 @@ interactions:
     content_length: -1
     body: |+
       event: message_start
-      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_01WZWJDPKKADvmCVs9XebStk","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":131,"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"}}           }
+      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_01RjUuxns7MZVJP9xo7zXJpb","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":131,"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"}}          }
 
       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: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Greeting"}               }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Greeting"}  }
+
+      event: content_block_delta
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Receive"}           }
+
+      event: ping
+      data: {"type": "ping"}
+
+      event: content_block_delta
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"d"}            }
 
       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":131,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":5}       }
+      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":131,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":7}}
 
       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.241140167s
+    duration: 746.008542ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 45483
+    content_length: 45902
     host: ""

internal/agent/testdata/TestCoderAgent/anthropic-sonnet/sourcegraph_tool.yaml πŸ”—

@@ -25,49 +25,49 @@ interactions:
     content_length: -1
     body: |+
       event: message_start
-      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_01YZpsBGrkEqikV1yyBPNcsV","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":5,"service_tier":"standard"}}         }
+      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_0195z3mYv7Lex96ZVV3g7ikE","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":3,"service_tier":"standard"}}          }
 
       event: content_block_start
-      data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}       }
+      data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}        }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Sourcegraph Go"}   }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Searching Go"}            }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Main"}      }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Repos"}        }
 
       event: ping
       data: {"type": "ping"}
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Function"}          }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" for Main"}       }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Search"}}
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Functions"}        }
 
       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":11}              }
+      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":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: 750.301125ms
+    duration: 572.207834ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 45543
+    content_length: 45962
     host: ""

internal/agent/testdata/TestCoderAgent/anthropic-sonnet/update_a_file.yaml πŸ”—

@@ -25,49 +25,49 @@ interactions:
     content_length: -1
     body: |+
       event: message_start
-      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_01H2zZJHC8GovvETy9DLVgYC","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"}}          }
+      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_01A6Qs3G2Urq3zaAYhFxQNDW","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"}}       }
 
       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: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Update"}    }
+      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"}         }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" main"}              }
 
       event: ping
       data: {"type": "ping"}
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":".go Hello"}  }
+      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":" Greeting"}               }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Message"}      }
 
       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":10}   }
+      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":9}      }
 
       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.593052292s
+    duration: 552.206292ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 45549
+    content_length: 45968
     host: ""

internal/agent/testdata/TestCoderAgent/anthropic-sonnet/write_tool.yaml πŸ”—

@@ -25,52 +25,55 @@ interactions:
     content_length: -1
     body: |+
       event: message_start
-      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_01FjvqkSUirvNJcG5AknVvWJ","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"}}        }
+      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_01BvsQtHoFHkXJ1tT8f3apHB","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"}}    }
 
       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: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Creating"}}
+      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":" config"}               }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" config"}            }
 
       event: ping
       data: {"type": "ping"}
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":".json with"}           }
+      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":" JSON"}              }
+      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":" data"}              }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" JSON"}          }
+
+      event: content_block_delta
+      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":10}}
+      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: 608.98875ms
+    duration: 569.883ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 45586
+    content_length: 46005
     host: ""

internal/agent/testdata/TestCoderAgent/openai-gpt-5/bash_tool.yaml πŸ”—

@@ -24,31 +24,25 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-CVkYXlQVkG4kOITZtPeGj1Wea2jlT","object":"chat.completion.chunk","created":1761683165,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"I5izUUiZXafojL"}
+      data: {"id":"chatcmpl-CVz85CQ0qlWRtpRhywMn7QxqYeUYQ","object":"chat.completion.chunk","created":1761739185,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"dPfRtCklVGPSLq"}
 
-      data: {"id":"chatcmpl-CVkYXlQVkG4kOITZtPeGj1Wea2jlT","object":"chat.completion.chunk","created":1761683165,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":"Create"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"zoT7el8iPw"}
+      data: {"id":"chatcmpl-CVz85CQ0qlWRtpRhywMn7QxqYeUYQ","object":"chat.completion.chunk","created":1761739185,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":"Create"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"3CGkCwblCY"}
 
-      data: {"id":"chatcmpl-CVkYXlQVkG4kOITZtPeGj1Wea2jlT","object":"chat.completion.chunk","created":1761683165,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" test"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"8JjJrzhJf3i"}
+      data: {"id":"chatcmpl-CVz85CQ0qlWRtpRhywMn7QxqYeUYQ","object":"chat.completion.chunk","created":1761739185,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"oIjvexf0CnIPO7"}
 
-      data: {"id":"chatcmpl-CVkYXlQVkG4kOITZtPeGj1Wea2jlT","object":"chat.completion.chunk","created":1761683165,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":".txt"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"SNLsh5OJDZ0i"}
+      data: {"id":"chatcmpl-CVz85CQ0qlWRtpRhywMn7QxqYeUYQ","object":"chat.completion.chunk","created":1761739185,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" File"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"KshWvicCVvK"}
 
-      data: {"id":"chatcmpl-CVkYXlQVkG4kOITZtPeGj1Wea2jlT","object":"chat.completion.chunk","created":1761683165,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" with"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"5ZU4WISnahF"}
+      data: {"id":"chatcmpl-CVz85CQ0qlWRtpRhywMn7QxqYeUYQ","object":"chat.completion.chunk","created":1761739185,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"k72piYp6kyfVe"}
 
-      data: {"id":"chatcmpl-CVkYXlQVkG4kOITZtPeGj1Wea2jlT","object":"chat.completion.chunk","created":1761683165,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" '"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"lS5v20QIaaXehp"}
+      data: {"id":"chatcmpl-CVz85CQ0qlWRtpRhywMn7QxqYeUYQ","object":"chat.completion.chunk","created":1761739185,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Bash"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"C2cr4u4USNi"}
 
-      data: {"id":"chatcmpl-CVkYXlQVkG4kOITZtPeGj1Wea2jlT","object":"chat.completion.chunk","created":1761683165,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":"hello"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"N4Qd5ORSmwO"}
+      data: {"id":"chatcmpl-CVz85CQ0qlWRtpRhywMn7QxqYeUYQ","object":"chat.completion.chunk","created":1761739185,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Without"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"dI3i42bz"}
 
-      data: {"id":"chatcmpl-CVkYXlQVkG4kOITZtPeGj1Wea2jlT","object":"chat.completion.chunk","created":1761683165,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" bash"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"w7QB3j8cVFr"}
+      data: {"id":"chatcmpl-CVz85CQ0qlWRtpRhywMn7QxqYeUYQ","object":"chat.completion.chunk","created":1761739185,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Timestamp"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"VdcMJZ"}
 
-      data: {"id":"chatcmpl-CVkYXlQVkG4kOITZtPeGj1Wea2jlT","object":"chat.completion.chunk","created":1761683165,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":"'"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"yMufQpWW4809JSV"}
+      data: {"id":"chatcmpl-CVz85CQ0qlWRtpRhywMn7QxqYeUYQ","object":"chat.completion.chunk","created":1761739185,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"i4Wcz3RpqM"}
 
-      data: {"id":"chatcmpl-CVkYXlQVkG4kOITZtPeGj1Wea2jlT","object":"chat.completion.chunk","created":1761683165,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"onq1SihfeIeJN"}
-
-      data: {"id":"chatcmpl-CVkYXlQVkG4kOITZtPeGj1Wea2jlT","object":"chat.completion.chunk","created":1761683165,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" Bash"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"0JcXLGDWmtE"}
-
-      data: {"id":"chatcmpl-CVkYXlQVkG4kOITZtPeGj1Wea2jlT","object":"chat.completion.chunk","created":1761683165,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"ZQsiyh6q9P"}
-
-      data: {"id":"chatcmpl-CVkYXlQVkG4kOITZtPeGj1Wea2jlT","object":"chat.completion.chunk","created":1761683165,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[],"usage":{"prompt_tokens":145,"completion_tokens":10,"total_tokens":155,"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":"0EehISoHXSeTj"}
+      data: {"id":"chatcmpl-CVz85CQ0qlWRtpRhywMn7QxqYeUYQ","object":"chat.completion.chunk","created":1761739185,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","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":"wLpzGFATixr61S"}
 
       data: [DONE]
 
@@ -57,15 +51,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 841.764917ms
+    duration: 483.992958ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 44015
+    content_length: 44434
     host: ""

internal/agent/testdata/TestCoderAgent/openai-gpt-5/download_tool.yaml πŸ”—

@@ -24,23 +24,25 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-CVkqq6Trj6gZrpXcPNZi55d6OT7xT","object":"chat.completion.chunk","created":1761684300,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"3Q0CfgaOjtrce9"}
+      data: {"id":"chatcmpl-CVz8ORCoQnKn39RNjD1Lf8o75Wf0z","object":"chat.completion.chunk","created":1761739204,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"RwvYFz0dPL8l0W"}
 
-      data: {"id":"chatcmpl-CVkqq6Trj6gZrpXcPNZi55d6OT7xT","object":"chat.completion.chunk","created":1761684300,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":"Download"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"FvUGUmDN"}
+      data: {"id":"chatcmpl-CVz8ORCoQnKn39RNjD1Lf8o75Wf0z","object":"chat.completion.chunk","created":1761739204,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":"Downloading"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"CqJV6"}
 
-      data: {"id":"chatcmpl-CVkqq6Trj6gZrpXcPNZi55d6OT7xT","object":"chat.completion.chunk","created":1761684300,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" and"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"WdIFm5cczZBF"}
+      data: {"id":"chatcmpl-CVz8ORCoQnKn39RNjD1Lf8o75Wf0z","object":"chat.completion.chunk","created":1761739204,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" and"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"MPLHEWMpGNMy"}
 
-      data: {"id":"chatcmpl-CVkqq6Trj6gZrpXcPNZi55d6OT7xT","object":"chat.completion.chunk","created":1761684300,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" Save"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"o6fkjFBDj0g"}
+      data: {"id":"chatcmpl-CVz8ORCoQnKn39RNjD1Lf8o75Wf0z","object":"chat.completion.chunk","created":1761739204,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Saving"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"OfMw5WYWH"}
 
-      data: {"id":"chatcmpl-CVkqq6Trj6gZrpXcPNZi55d6OT7xT","object":"chat.completion.chunk","created":1761684300,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" File"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"snoBJt70Nkp"}
+      data: {"id":"chatcmpl-CVz8ORCoQnKn39RNjD1Lf8o75Wf0z","object":"chat.completion.chunk","created":1761739204,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"o3iIHjAqucSGGm"}
 
-      data: {"id":"chatcmpl-CVkqq6Trj6gZrpXcPNZi55d6OT7xT","object":"chat.completion.chunk","created":1761684300,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" from"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"stkjjr67Pqb"}
+      data: {"id":"chatcmpl-CVz8ORCoQnKn39RNjD1Lf8o75Wf0z","object":"chat.completion.chunk","created":1761739204,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" File"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"rxRYblxgwlo"}
 
-      data: {"id":"chatcmpl-CVkqq6Trj6gZrpXcPNZi55d6OT7xT","object":"chat.completion.chunk","created":1761684300,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" URL"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"bxktqBZKgN4Q"}
+      data: {"id":"chatcmpl-CVz8ORCoQnKn39RNjD1Lf8o75Wf0z","object":"chat.completion.chunk","created":1761739204,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" from"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"KSaPxJ74eiy"}
 
-      data: {"id":"chatcmpl-CVkqq6Trj6gZrpXcPNZi55d6OT7xT","object":"chat.completion.chunk","created":1761684300,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"Vkf5XiiVEb"}
+      data: {"id":"chatcmpl-CVz8ORCoQnKn39RNjD1Lf8o75Wf0z","object":"chat.completion.chunk","created":1761739204,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" URL"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"NTcNYugpWc6J"}
 
-      data: {"id":"chatcmpl-CVkqq6Trj6gZrpXcPNZi55d6OT7xT","object":"chat.completion.chunk","created":1761684300,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","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":"eVXGNbhTWZQR2C"}
+      data: {"id":"chatcmpl-CVz8ORCoQnKn39RNjD1Lf8o75Wf0z","object":"chat.completion.chunk","created":1761739204,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"ZdzoBm7g8D"}
+
+      data: {"id":"chatcmpl-CVz8ORCoQnKn39RNjD1Lf8o75Wf0z","object":"chat.completion.chunk","created":1761739204,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[],"usage":{"prompt_tokens":148,"completion_tokens":7,"total_tokens":155,"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":"TbRv7pp8ket1UJ"}
 
       data: [DONE]
 
@@ -49,15 +51,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 1.138533041s
+    duration: 563.767708ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 44040
+    content_length: 44459
     host: ""

internal/agent/testdata/TestCoderAgent/openai-gpt-5/fetch_tool.yaml πŸ”—

@@ -24,29 +24,31 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-CVk4FFPkAR6LMqwDsO1tikJRErbbb","object":"chat.completion.chunk","created":1761681287,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"zuiedJFZgQpBA2"}
+      data: {"id":"chatcmpl-CVz8Z1N4lDfIKxM3aKQXbLTiNKzfZ","object":"chat.completion.chunk","created":1761739215,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ZSodjBgdEw6KCJ"}
 
-      data: {"id":"chatcmpl-CVk4FFPkAR6LMqwDsO1tikJRErbbb","object":"chat.completion.chunk","created":1761681287,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":"Check"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"LktXXhIuz6U"}
+      data: {"id":"chatcmpl-CVz8Z1N4lDfIKxM3aKQXbLTiNKzfZ","object":"chat.completion.chunk","created":1761739215,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":"Checking"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"bF12rabT"}
 
-      data: {"id":"chatcmpl-CVk4FFPkAR6LMqwDsO1tikJRErbbb","object":"chat.completion.chunk","created":1761681287,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" for"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"8sQhOVLXweHQ"}
+      data: {"id":"chatcmpl-CVz8Z1N4lDfIKxM3aKQXbLTiNKzfZ","object":"chat.completion.chunk","created":1761739215,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" if"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Qfmp4QtXXMBJ2"}
 
-      data: {"id":"chatcmpl-CVk4FFPkAR6LMqwDsO1tikJRErbbb","object":"chat.completion.chunk","created":1761681287,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" '"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"zKD9ot2I8chtC0"}
+      data: {"id":"chatcmpl-CVz8Z1N4lDfIKxM3aKQXbLTiNKzfZ","object":"chat.completion.chunk","created":1761739215,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" '"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"HFTQeLI6UiLT25"}
 
-      data: {"id":"chatcmpl-CVk4FFPkAR6LMqwDsO1tikJRErbbb","object":"chat.completion.chunk","created":1761681287,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":"John"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"o2fM1DnimM9h"}
+      data: {"id":"chatcmpl-CVz8Z1N4lDfIKxM3aKQXbLTiNKzfZ","object":"chat.completion.chunk","created":1761739215,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":"John"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"UI4PYSxRbpnM"}
 
-      data: {"id":"chatcmpl-CVk4FFPkAR6LMqwDsO1tikJRErbbb","object":"chat.completion.chunk","created":1761681287,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" Doe"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"XyiiDtu8rgPT"}
+      data: {"id":"chatcmpl-CVz8Z1N4lDfIKxM3aKQXbLTiNKzfZ","object":"chat.completion.chunk","created":1761739215,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Doe"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ojMKfmvfUFg4"}
 
-      data: {"id":"chatcmpl-CVk4FFPkAR6LMqwDsO1tikJRErbbb","object":"chat.completion.chunk","created":1761681287,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":"'"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"8XwWkP5nxbYZiaM"}
+      data: {"id":"chatcmpl-CVz8Z1N4lDfIKxM3aKQXbLTiNKzfZ","object":"chat.completion.chunk","created":1761739215,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":"'"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"qkbwGKQtasDxjsc"}
 
-      data: {"id":"chatcmpl-CVk4FFPkAR6LMqwDsO1tikJRErbbb","object":"chat.completion.chunk","created":1761681287,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"q8bhDDYdcIBTG"}
+      data: {"id":"chatcmpl-CVz8Z1N4lDfIKxM3aKQXbLTiNKzfZ","object":"chat.completion.chunk","created":1761739215,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Exists"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"PWMxS15Ep"}
 
-      data: {"id":"chatcmpl-CVk4FFPkAR6LMqwDsO1tikJRErbbb","object":"chat.completion.chunk","created":1761681287,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" HTML"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"bND7TZ3EDcw"}
+      data: {"id":"chatcmpl-CVz8Z1N4lDfIKxM3aKQXbLTiNKzfZ","object":"chat.completion.chunk","created":1761739215,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" on"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"8AEgYShpeKANP"}
 
-      data: {"id":"chatcmpl-CVk4FFPkAR6LMqwDsO1tikJRErbbb","object":"chat.completion.chunk","created":1761681287,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" Content"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"OcKqmbdJ"}
+      data: {"id":"chatcmpl-CVz8Z1N4lDfIKxM3aKQXbLTiNKzfZ","object":"chat.completion.chunk","created":1761739215,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Example"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"i5ULrBVE"}
 
-      data: {"id":"chatcmpl-CVk4FFPkAR6LMqwDsO1tikJRErbbb","object":"chat.completion.chunk","created":1761681287,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"A9oI3T2IDh"}
+      data: {"id":"chatcmpl-CVz8Z1N4lDfIKxM3aKQXbLTiNKzfZ","object":"chat.completion.chunk","created":1761739215,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" HTML"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"b1Y4cutYF16"}
 
-      data: {"id":"chatcmpl-CVk4FFPkAR6LMqwDsO1tikJRErbbb","object":"chat.completion.chunk","created":1761681287,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[],"usage":{"prompt_tokens":153,"completion_tokens":9,"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":"nyxpQFx8svYAu6"}
+      data: {"id":"chatcmpl-CVz8Z1N4lDfIKxM3aKQXbLTiNKzfZ","object":"chat.completion.chunk","created":1761739215,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"7b6R8Pa8K7"}
+
+      data: {"id":"chatcmpl-CVz8Z1N4lDfIKxM3aKQXbLTiNKzfZ","object":"chat.completion.chunk","created":1761739215,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","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":"NJ9Mpy4WpGAPz"}
 
       data: [DONE]
 
@@ -55,15 +57,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 845.24925ms
+    duration: 466.436917ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 44058
+    content_length: 44477
     host: ""

internal/agent/testdata/TestCoderAgent/openai-gpt-5/glob_tool.yaml πŸ”—

@@ -24,31 +24,29 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-CVk4XBWaJ5qgdSns8unlydp75Uizi","object":"chat.completion.chunk","created":1761681305,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"DBgYnSzS2A0y6Y"}
+      data: {"id":"chatcmpl-CVz8nkACA1RsQpVgdlsFtHBkPgEjH","object":"chat.completion.chunk","created":1761739229,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"E7kaF9NObIZFla"}
 
-      data: {"id":"chatcmpl-CVk4XBWaJ5qgdSns8unlydp75Uizi","object":"chat.completion.chunk","created":1761681305,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":"Finding"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"elxl9svnK"}
+      data: {"id":"chatcmpl-CVz8nkACA1RsQpVgdlsFtHBkPgEjH","object":"chat.completion.chunk","created":1761739229,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":"Finding"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"VbMVqy1KJ"}
 
-      data: {"id":"chatcmpl-CVk4XBWaJ5qgdSns8unlydp75Uizi","object":"chat.completion.chunk","created":1761681305,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" All"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"DtWJu9bvJcpU"}
+      data: {"id":"chatcmpl-CVz8nkACA1RsQpVgdlsFtHBkPgEjH","object":"chat.completion.chunk","created":1761739229,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" ."},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"eWVVzxYqslpGup"}
 
-      data: {"id":"chatcmpl-CVk4XBWaJ5qgdSns8unlydp75Uizi","object":"chat.completion.chunk","created":1761681305,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" ."},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"vHO9MB9bxBWmyF"}
+      data: {"id":"chatcmpl-CVz8nkACA1RsQpVgdlsFtHBkPgEjH","object":"chat.completion.chunk","created":1761739229,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":"go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"yuwvS6J1n7FYdl"}
 
-      data: {"id":"chatcmpl-CVk4XBWaJ5qgdSns8unlydp75Uizi","object":"chat.completion.chunk","created":1761681305,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":"go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"gyCDou7GXmJbPW"}
+      data: {"id":"chatcmpl-CVz8nkACA1RsQpVgdlsFtHBkPgEjH","object":"chat.completion.chunk","created":1761739229,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Files"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"nWBgo5PP8U"}
 
-      data: {"id":"chatcmpl-CVk4XBWaJ5qgdSns8unlydp75Uizi","object":"chat.completion.chunk","created":1761681305,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" Files"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"9TsD1Q9alm"}
+      data: {"id":"chatcmpl-CVz8nkACA1RsQpVgdlsFtHBkPgEjH","object":"chat.completion.chunk","created":1761739229,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" with"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"jfCy4U9cFjj"}
 
-      data: {"id":"chatcmpl-CVk4XBWaJ5qgdSns8unlydp75Uizi","object":"chat.completion.chunk","created":1761681305,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" with"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"CTaSum4Hl0D"}
+      data: {"id":"chatcmpl-CVz8nkACA1RsQpVgdlsFtHBkPgEjH","object":"chat.completion.chunk","created":1761739229,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Glob"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"KKQl6QiQWnt"}
 
-      data: {"id":"chatcmpl-CVk4XBWaJ5qgdSns8unlydp75Uizi","object":"chat.completion.chunk","created":1761681305,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" Glob"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"J7Ytqr8JeSs"}
+      data: {"id":"chatcmpl-CVz8nkACA1RsQpVgdlsFtHBkPgEjH","object":"chat.completion.chunk","created":1761739229,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"HxbWz6VBDUpff"}
 
-      data: {"id":"chatcmpl-CVk4XBWaJ5qgdSns8unlydp75Uizi","object":"chat.completion.chunk","created":1761681305,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"GWb2EsZhtLx4d"}
+      data: {"id":"chatcmpl-CVz8nkACA1RsQpVgdlsFtHBkPgEjH","object":"chat.completion.chunk","created":1761739229,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Current"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"QLwGYffq"}
 
-      data: {"id":"chatcmpl-CVk4XBWaJ5qgdSns8unlydp75Uizi","object":"chat.completion.chunk","created":1761681305,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" Current"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"zbdolta9"}
+      data: {"id":"chatcmpl-CVz8nkACA1RsQpVgdlsFtHBkPgEjH","object":"chat.completion.chunk","created":1761739229,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Directory"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"SXUCMF"}
 
-      data: {"id":"chatcmpl-CVk4XBWaJ5qgdSns8unlydp75Uizi","object":"chat.completion.chunk","created":1761681305,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" Directory"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"LWYOdH"}
+      data: {"id":"chatcmpl-CVz8nkACA1RsQpVgdlsFtHBkPgEjH","object":"chat.completion.chunk","created":1761739229,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"XHDEivoJLE"}
 
-      data: {"id":"chatcmpl-CVk4XBWaJ5qgdSns8unlydp75Uizi","object":"chat.completion.chunk","created":1761681305,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"2joAULceCV"}
-
-      data: {"id":"chatcmpl-CVk4XBWaJ5qgdSns8unlydp75Uizi","object":"chat.completion.chunk","created":1761681305,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[],"usage":{"prompt_tokens":137,"completion_tokens":10,"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":"GS0MXVTjYqFty"}
+      data: {"id":"chatcmpl-CVz8nkACA1RsQpVgdlsFtHBkPgEjH","object":"chat.completion.chunk","created":1761739229,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","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":"ZQpOdtfy9BHSzt"}
 
       data: [DONE]
 
@@ -57,15 +55,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 1.181283541s
+    duration: 672.036958ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 43976
+    content_length: 44395
     host: ""

internal/agent/testdata/TestCoderAgent/openai-gpt-5/grep_tool.yaml πŸ”—

@@ -24,29 +24,33 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-CVk4ekm2bWpqwYhlCYWG0HXD5Op6k","object":"chat.completion.chunk","created":1761681312,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"adfoklUySpqupF"}
+      data: {"id":"chatcmpl-CVz8u8rtmrPrnOnMfyPeNyeEqUUrD","object":"chat.completion.chunk","created":1761739236,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ahKhyTWfKpnSNX"}
 
-      data: {"id":"chatcmpl-CVk4ekm2bWpqwYhlCYWG0HXD5Op6k","object":"chat.completion.chunk","created":1761681312,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":"Search"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"L64GOZgifh"}
+      data: {"id":"chatcmpl-CVz8u8rtmrPrnOnMfyPeNyeEqUUrD","object":"chat.completion.chunk","created":1761739236,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":"Using"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"OMUcUyQXmXS"}
 
-      data: {"id":"chatcmpl-CVk4ekm2bWpqwYhlCYWG0HXD5Op6k","object":"chat.completion.chunk","created":1761681312,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" '"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"IHBSLjjATJ6rPC"}
+      data: {"id":"chatcmpl-CVz8u8rtmrPrnOnMfyPeNyeEqUUrD","object":"chat.completion.chunk","created":1761739236,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Gre"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ExmDSgnleUNM"}
 
-      data: {"id":"chatcmpl-CVk4ekm2bWpqwYhlCYWG0HXD5Op6k","object":"chat.completion.chunk","created":1761681312,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":"package"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"cn1tCbHgo"}
+      data: {"id":"chatcmpl-CVz8u8rtmrPrnOnMfyPeNyeEqUUrD","object":"chat.completion.chunk","created":1761739236,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":"p"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"su01FSZqFiUkvbC"}
 
-      data: {"id":"chatcmpl-CVk4ekm2bWpqwYhlCYWG0HXD5Op6k","object":"chat.completion.chunk","created":1761681312,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":"'"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"9X8hgRcDSQMQEX5"}
+      data: {"id":"chatcmpl-CVz8u8rtmrPrnOnMfyPeNyeEqUUrD","object":"chat.completion.chunk","created":1761739236,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" to"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"tcKXxtEspOODx"}
 
-      data: {"id":"chatcmpl-CVk4ekm2bWpqwYhlCYWG0HXD5Op6k","object":"chat.completion.chunk","created":1761681312,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"8LKklzuRTxcPC"}
+      data: {"id":"chatcmpl-CVz8u8rtmrPrnOnMfyPeNyeEqUUrD","object":"chat.completion.chunk","created":1761739236,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Find"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"SnppB5u8iZh"}
 
-      data: {"id":"chatcmpl-CVk4ekm2bWpqwYhlCYWG0HXD5Op6k","object":"chat.completion.chunk","created":1761681312,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" Go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"fdJcFjBuDbQkY"}
+      data: {"id":"chatcmpl-CVz8u8rtmrPrnOnMfyPeNyeEqUUrD","object":"chat.completion.chunk","created":1761739236,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" '"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"6YYmrtrzGibewT"}
 
-      data: {"id":"chatcmpl-CVk4ekm2bWpqwYhlCYWG0HXD5Op6k","object":"chat.completion.chunk","created":1761681312,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" Files"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"7KepEPG67k"}
+      data: {"id":"chatcmpl-CVz8u8rtmrPrnOnMfyPeNyeEqUUrD","object":"chat.completion.chunk","created":1761739236,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":"Package"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"okrR2yd76"}
 
-      data: {"id":"chatcmpl-CVk4ekm2bWpqwYhlCYWG0HXD5Op6k","object":"chat.completion.chunk","created":1761681312,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" Using"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"i4JfbbTgYT"}
+      data: {"id":"chatcmpl-CVz8u8rtmrPrnOnMfyPeNyeEqUUrD","object":"chat.completion.chunk","created":1761739236,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":"'"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"GiDYz9Ujv3CEhdo"}
 
-      data: {"id":"chatcmpl-CVk4ekm2bWpqwYhlCYWG0HXD5Op6k","object":"chat.completion.chunk","created":1761681312,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" grep"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"6i8pIK1SPuy"}
+      data: {"id":"chatcmpl-CVz8u8rtmrPrnOnMfyPeNyeEqUUrD","object":"chat.completion.chunk","created":1761739236,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"H0dMz9bYeCrQV"}
 
-      data: {"id":"chatcmpl-CVk4ekm2bWpqwYhlCYWG0HXD5Op6k","object":"chat.completion.chunk","created":1761681312,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"L7IhLJ0DrF"}
+      data: {"id":"chatcmpl-CVz8u8rtmrPrnOnMfyPeNyeEqUUrD","object":"chat.completion.chunk","created":1761739236,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"qXNyYxUt2IC7r"}
 
-      data: {"id":"chatcmpl-CVk4ekm2bWpqwYhlCYWG0HXD5Op6k","object":"chat.completion.chunk","created":1761681312,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","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":"RoMFkWVMpHDtEO"}
+      data: {"id":"chatcmpl-CVz8u8rtmrPrnOnMfyPeNyeEqUUrD","object":"chat.completion.chunk","created":1761739236,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Files"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"k4yGSJkTED"}
+
+      data: {"id":"chatcmpl-CVz8u8rtmrPrnOnMfyPeNyeEqUUrD","object":"chat.completion.chunk","created":1761739236,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"dEm4izpMZ3"}
+
+      data: {"id":"chatcmpl-CVz8u8rtmrPrnOnMfyPeNyeEqUUrD","object":"chat.completion.chunk","created":1761739236,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","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":"6OFFvxMCHtM5j"}
 
       data: [DONE]
 
@@ -55,15 +59,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 2.273728917s
+    duration: 908.098416ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 43974
+    content_length: 44393
     host: ""

internal/agent/testdata/TestCoderAgent/openai-gpt-5/ls_tool.yaml πŸ”—

@@ -24,29 +24,25 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-CVk4pHPQXxKX0iaeD7YJwV1kN5MTP","object":"chat.completion.chunk","created":1761681323,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"hcB3ARTRN2hfCM"}
+      data: {"id":"chatcmpl-CVz93jAyx5CeFxsv9A8SSZpefq5qN","object":"chat.completion.chunk","created":1761739245,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"5QixgozlJLHplQ"}
 
-      data: {"id":"chatcmpl-CVk4pHPQXxKX0iaeD7YJwV1kN5MTP","object":"chat.completion.chunk","created":1761681323,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":"Listing"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"5ZPo9s0L3"}
+      data: {"id":"chatcmpl-CVz93jAyx5CeFxsv9A8SSZpefq5qN","object":"chat.completion.chunk","created":1761739245,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":"List"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"u8ABYV1Emeo0"}
 
-      data: {"id":"chatcmpl-CVk4pHPQXxKX0iaeD7YJwV1kN5MTP","object":"chat.completion.chunk","created":1761681323,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" Files"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"0jLXDtZyrm"}
+      data: {"id":"chatcmpl-CVz93jAyx5CeFxsv9A8SSZpefq5qN","object":"chat.completion.chunk","created":1761739245,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Files"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"S951WhiNf6"}
 
-      data: {"id":"chatcmpl-CVk4pHPQXxKX0iaeD7YJwV1kN5MTP","object":"chat.completion.chunk","created":1761681323,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"vXVFwgPdDSDkD"}
+      data: {"id":"chatcmpl-CVz93jAyx5CeFxsv9A8SSZpefq5qN","object":"chat.completion.chunk","created":1761739245,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"YudcskZEywucf"}
 
-      data: {"id":"chatcmpl-CVk4pHPQXxKX0iaeD7YJwV1kN5MTP","object":"chat.completion.chunk","created":1761681323,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" Current"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"lByqa5mY"}
+      data: {"id":"chatcmpl-CVz93jAyx5CeFxsv9A8SSZpefq5qN","object":"chat.completion.chunk","created":1761739245,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Directory"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"tjJf66"}
 
-      data: {"id":"chatcmpl-CVk4pHPQXxKX0iaeD7YJwV1kN5MTP","object":"chat.completion.chunk","created":1761681323,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" Directory"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"4fkSK6"}
+      data: {"id":"chatcmpl-CVz93jAyx5CeFxsv9A8SSZpefq5qN","object":"chat.completion.chunk","created":1761739245,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Using"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"6NpmB69Xbd"}
 
-      data: {"id":"chatcmpl-CVk4pHPQXxKX0iaeD7YJwV1kN5MTP","object":"chat.completion.chunk","created":1761681323,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" Using"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"iXfZoanfKb"}
+      data: {"id":"chatcmpl-CVz93jAyx5CeFxsv9A8SSZpefq5qN","object":"chat.completion.chunk","created":1761739245,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" ls"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"S1TPsqQSetufh"}
 
-      data: {"id":"chatcmpl-CVk4pHPQXxKX0iaeD7YJwV1kN5MTP","object":"chat.completion.chunk","created":1761681323,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" '"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"z2sF6lm2zHQAOS"}
+      data: {"id":"chatcmpl-CVz93jAyx5CeFxsv9A8SSZpefq5qN","object":"chat.completion.chunk","created":1761739245,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Command"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"kt6iCrf5"}
 
-      data: {"id":"chatcmpl-CVk4pHPQXxKX0iaeD7YJwV1kN5MTP","object":"chat.completion.chunk","created":1761681323,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":"ls"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"QEi72tRnDpU3JD"}
+      data: {"id":"chatcmpl-CVz93jAyx5CeFxsv9A8SSZpefq5qN","object":"chat.completion.chunk","created":1761739245,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"hcQCwYw5aa"}
 
-      data: {"id":"chatcmpl-CVk4pHPQXxKX0iaeD7YJwV1kN5MTP","object":"chat.completion.chunk","created":1761681323,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":"'"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"t9TBEy2XKZgVZEb"}
-
-      data: {"id":"chatcmpl-CVk4pHPQXxKX0iaeD7YJwV1kN5MTP","object":"chat.completion.chunk","created":1761681323,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"xIxGuXpOJK"}
-
-      data: {"id":"chatcmpl-CVk4pHPQXxKX0iaeD7YJwV1kN5MTP","object":"chat.completion.chunk","created":1761681323,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","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":"nSdpczn6e5A5rc"}
+      data: {"id":"chatcmpl-CVz93jAyx5CeFxsv9A8SSZpefq5qN","object":"chat.completion.chunk","created":1761739245,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[],"usage":{"prompt_tokens":135,"completion_tokens":7,"total_tokens":142,"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":"NTja3di3JtfoUc"}
 
       data: [DONE]
 
@@ -55,15 +51,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 688.16175ms
+    duration: 516.491041ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 43968
+    content_length: 44387
     host: ""

internal/agent/testdata/TestCoderAgent/openai-gpt-5/multiedit_tool.yaml πŸ”—

@@ -24,27 +24,27 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-CVkL6wNBxzykcxxBZfbYFlPJQDXke","object":"chat.completion.chunk","created":1761682332,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"dLa3qhSGJU44fX"}
+      data: {"id":"chatcmpl-CVz9BYtDNy4C04jozEiPEmpYjut38","object":"chat.completion.chunk","created":1761739253,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"A5mPC2w49X7e4L"}
 
-      data: {"id":"chatcmpl-CVkL6wNBxzykcxxBZfbYFlPJQDXke","object":"chat.completion.chunk","created":1761682332,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":"Edit"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"mKp55kq7QD4k"}
+      data: {"id":"chatcmpl-CVz9BYtDNy4C04jozEiPEmpYjut38","object":"chat.completion.chunk","created":1761739253,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":"Code"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"SS1H1FSBIjyj"}
 
-      data: {"id":"chatcmpl-CVkL6wNBxzykcxxBZfbYFlPJQDXke","object":"chat.completion.chunk","created":1761682332,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" Code"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Nhz6AjZvPor"}
+      data: {"id":"chatcmpl-CVz9BYtDNy4C04jozEiPEmpYjut38","object":"chat.completion.chunk","created":1761739253,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Update"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Ib9alVmik"}
 
-      data: {"id":"chatcmpl-CVkL6wNBxzykcxxBZfbYFlPJQDXke","object":"chat.completion.chunk","created":1761682332,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" and"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"TDITbv5IO0FI"}
+      data: {"id":"chatcmpl-CVz9BYtDNy4C04jozEiPEmpYjut38","object":"chat.completion.chunk","created":1761739253,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":":"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"eyZSLrijBAyTFBv"}
 
-      data: {"id":"chatcmpl-CVkL6wNBxzykcxxBZfbYFlPJQDXke","object":"chat.completion.chunk","created":1761682332,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" Add"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"JCygqg8WnBV4"}
+      data: {"id":"chatcmpl-CVz9BYtDNy4C04jozEiPEmpYjut38","object":"chat.completion.chunk","created":1761739253,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Modify"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"AB1TfytG6"}
 
-      data: {"id":"chatcmpl-CVkL6wNBxzykcxxBZfbYFlPJQDXke","object":"chat.completion.chunk","created":1761682332,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" Comment"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"CwcMuXtY"}
+      data: {"id":"chatcmpl-CVz9BYtDNy4C04jozEiPEmpYjut38","object":"chat.completion.chunk","created":1761739253,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Greeting"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Kw2tOAz"}
 
-      data: {"id":"chatcmpl-CVkL6wNBxzykcxxBZfbYFlPJQDXke","object":"chat.completion.chunk","created":1761682332,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Qtp3jwJNkRM3F"}
+      data: {"id":"chatcmpl-CVz9BYtDNy4C04jozEiPEmpYjut38","object":"chat.completion.chunk","created":1761739253,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" and"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"J2VONZuhdNWT"}
 
-      data: {"id":"chatcmpl-CVkL6wNBxzykcxxBZfbYFlPJQDXke","object":"chat.completion.chunk","created":1761682332,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" main"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"bdOmBpaMuVw"}
+      data: {"id":"chatcmpl-CVz9BYtDNy4C04jozEiPEmpYjut38","object":"chat.completion.chunk","created":1761739253,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Add"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"rwzswcLQzBX3"}
 
-      data: {"id":"chatcmpl-CVkL6wNBxzykcxxBZfbYFlPJQDXke","object":"chat.completion.chunk","created":1761682332,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":".go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"7d9X8p9QMO6Vy"}
+      data: {"id":"chatcmpl-CVz9BYtDNy4C04jozEiPEmpYjut38","object":"chat.completion.chunk","created":1761739253,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Comment"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ynC8NzJt"}
 
-      data: {"id":"chatcmpl-CVkL6wNBxzykcxxBZfbYFlPJQDXke","object":"chat.completion.chunk","created":1761682332,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"lxeweVsgZ6"}
+      data: {"id":"chatcmpl-CVz9BYtDNy4C04jozEiPEmpYjut38","object":"chat.completion.chunk","created":1761739253,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"IzNrxqGDIw"}
 
-      data: {"id":"chatcmpl-CVkL6wNBxzykcxxBZfbYFlPJQDXke","object":"chat.completion.chunk","created":1761682332,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","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":"6HWYS5o2ghzOP8"}
+      data: {"id":"chatcmpl-CVz9BYtDNy4C04jozEiPEmpYjut38","object":"chat.completion.chunk","created":1761739253,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","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":"tMyXWmzN6vgaQN"}
 
       data: [DONE]
 
@@ -53,15 +53,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 759.762875ms
+    duration: 652.283291ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 44054
+    content_length: 44473
     host: ""

internal/agent/testdata/TestCoderAgent/openai-gpt-5/parallel_tool_calls.yaml πŸ”—

@@ -24,25 +24,31 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-CVk73Vs8kMBikpjLb6LZq7WJgTNQ5","object":"chat.completion.chunk","created":1761681461,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"sCMpqOFl4OlDrq"}
+      data: {"id":"chatcmpl-CVzA7h3O81W7Kcav9cNqmaQrk7Pio","object":"chat.completion.chunk","created":1761739311,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"fBW8ERonoDjPp2"}
 
-      data: {"id":"chatcmpl-CVk73Vs8kMBikpjLb6LZq7WJgTNQ5","object":"chat.completion.chunk","created":1761681461,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":"Parallel"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"pALTTNkP"}
+      data: {"id":"chatcmpl-CVzA7h3O81W7Kcav9cNqmaQrk7Pio","object":"chat.completion.chunk","created":1761739311,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":"Run"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"NOY0xKDAXaeZT"}
 
-      data: {"id":"chatcmpl-CVk73Vs8kMBikpjLb6LZq7WJgTNQ5","object":"chat.completion.chunk","created":1761681461,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" Execution"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"2DBfCv"}
+      data: {"id":"chatcmpl-CVzA7h3O81W7Kcav9cNqmaQrk7Pio","object":"chat.completion.chunk","created":1761739311,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" glob"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"fUFLgRivvgn"}
 
-      data: {"id":"chatcmpl-CVk73Vs8kMBikpjLb6LZq7WJgTNQ5","object":"chat.completion.chunk","created":1761681461,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" of"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"aOdLfL8zK9LCz"}
+      data: {"id":"chatcmpl-CVzA7h3O81W7Kcav9cNqmaQrk7Pio","object":"chat.completion.chunk","created":1761739311,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" and"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"34SQZ5YlfwUq"}
 
-      data: {"id":"chatcmpl-CVk73Vs8kMBikpjLb6LZq7WJgTNQ5","object":"chat.completion.chunk","created":1761681461,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" glob"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"5NGA2r1yika"}
+      data: {"id":"chatcmpl-CVzA7h3O81W7Kcav9cNqmaQrk7Pio","object":"chat.completion.chunk","created":1761739311,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" ls"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"BtIV3GCECJAvH"}
 
-      data: {"id":"chatcmpl-CVk73Vs8kMBikpjLb6LZq7WJgTNQ5","object":"chat.completion.chunk","created":1761681461,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" and"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"G2wHvypOUoAF"}
+      data: {"id":"chatcmpl-CVzA7h3O81W7Kcav9cNqmaQrk7Pio","object":"chat.completion.chunk","created":1761739311,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"odxkkaok1GA0n"}
 
-      data: {"id":"chatcmpl-CVk73Vs8kMBikpjLb6LZq7WJgTNQ5","object":"chat.completion.chunk","created":1761681461,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" ls"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"vHzUU9G2Ewg71"}
+      data: {"id":"chatcmpl-CVzA7h3O81W7Kcav9cNqmaQrk7Pio","object":"chat.completion.chunk","created":1761739311,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" parallel"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"UTPm4Nz"}
 
-      data: {"id":"chatcmpl-CVk73Vs8kMBikpjLb6LZq7WJgTNQ5","object":"chat.completion.chunk","created":1761681461,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" Commands"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"TNbfFAb"}
+      data: {"id":"chatcmpl-CVzA7h3O81W7Kcav9cNqmaQrk7Pio","object":"chat.completion.chunk","created":1761739311,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" for"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"1bSYd379FCmf"}
 
-      data: {"id":"chatcmpl-CVk73Vs8kMBikpjLb6LZq7WJgTNQ5","object":"chat.completion.chunk","created":1761681461,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"HlVRGtbxKq"}
+      data: {"id":"chatcmpl-CVzA7h3O81W7Kcav9cNqmaQrk7Pio","object":"chat.completion.chunk","created":1761739311,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" ."},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"dHc9swaGTqacpR"}
 
-      data: {"id":"chatcmpl-CVk73Vs8kMBikpjLb6LZq7WJgTNQ5","object":"chat.completion.chunk","created":1761681461,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","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":"HOmNZvUQzEpoYw"}
+      data: {"id":"chatcmpl-CVzA7h3O81W7Kcav9cNqmaQrk7Pio","object":"chat.completion.chunk","created":1761739311,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":"go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"jaW5KAJBdyX7qt"}
+
+      data: {"id":"chatcmpl-CVzA7h3O81W7Kcav9cNqmaQrk7Pio","object":"chat.completion.chunk","created":1761739311,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" files"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Yk6ndaqjh4"}
+
+      data: {"id":"chatcmpl-CVzA7h3O81W7Kcav9cNqmaQrk7Pio","object":"chat.completion.chunk","created":1761739311,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"K4garAYdiS"}
+
+      data: {"id":"chatcmpl-CVzA7h3O81W7Kcav9cNqmaQrk7Pio","object":"chat.completion.chunk","created":1761739311,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[],"usage":{"prompt_tokens":154,"completion_tokens":10,"total_tokens":164,"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":"eTseDtFteVPsV"}
 
       data: [DONE]
 
@@ -51,15 +57,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 609.845917ms
+    duration: 629.818375ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 44065
+    content_length: 44484
     host: ""

internal/agent/testdata/TestCoderAgent/openai-gpt-5/read_a_file.yaml πŸ”—

@@ -24,19 +24,19 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-CVk2fOChi0EXvda7Rntuv9XiBcRfo","object":"chat.completion.chunk","created":1761681189,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"XJINLSJVcEqfn3"}
+      data: {"id":"chatcmpl-CVz7RYyWicHAaNOUrX5BVio64NXIk","object":"chat.completion.chunk","created":1761739145,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"NHRD5WcbQjF9Kv"}
 
-      data: {"id":"chatcmpl-CVk2fOChi0EXvda7Rntuv9XiBcRfo","object":"chat.completion.chunk","created":1761681189,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":"Understanding"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"k1m"}
+      data: {"id":"chatcmpl-CVz7RYyWicHAaNOUrX5BVio64NXIk","object":"chat.completion.chunk","created":1761739145,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":"Understanding"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"AfS"}
 
-      data: {"id":"chatcmpl-CVk2fOChi0EXvda7Rntuv9XiBcRfo","object":"chat.completion.chunk","created":1761681189,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" Go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"r6OLbFohCF8IU"}
+      data: {"id":"chatcmpl-CVz7RYyWicHAaNOUrX5BVio64NXIk","object":"chat.completion.chunk","created":1761739145,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"2FyAfb5Cut7hl"}
 
-      data: {"id":"chatcmpl-CVk2fOChi0EXvda7Rntuv9XiBcRfo","object":"chat.completion.chunk","created":1761681189,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" Mod"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"PsQ8FROv9Y6l"}
+      data: {"id":"chatcmpl-CVz7RYyWicHAaNOUrX5BVio64NXIk","object":"chat.completion.chunk","created":1761739145,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Mod"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"AOvLcw6QL6u6"}
 
-      data: {"id":"chatcmpl-CVk2fOChi0EXvda7Rntuv9XiBcRfo","object":"chat.completion.chunk","created":1761681189,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" Files"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"0bUVP3bdbz"}
+      data: {"id":"chatcmpl-CVz7RYyWicHAaNOUrX5BVio64NXIk","object":"chat.completion.chunk","created":1761739145,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Files"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"bYx0QbUXIC"}
 
-      data: {"id":"chatcmpl-CVk2fOChi0EXvda7Rntuv9XiBcRfo","object":"chat.completion.chunk","created":1761681189,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"zeXPNl5qS6"}
+      data: {"id":"chatcmpl-CVz7RYyWicHAaNOUrX5BVio64NXIk","object":"chat.completion.chunk","created":1761739145,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"8AZHBANsEj"}
 
-      data: {"id":"chatcmpl-CVk2fOChi0EXvda7Rntuv9XiBcRfo","object":"chat.completion.chunk","created":1761681189,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[],"usage":{"prompt_tokens":129,"completion_tokens":4,"total_tokens":133,"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":"nAPl04jqBnXWZG"}
+      data: {"id":"chatcmpl-CVz7RYyWicHAaNOUrX5BVio64NXIk","object":"chat.completion.chunk","created":1761739145,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[],"usage":{"prompt_tokens":129,"completion_tokens":4,"total_tokens":133,"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":"YZdL8KWfASsgF3"}
 
       data: [DONE]
 
@@ -45,15 +45,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 2.271404792s
+    duration: 1.260231917s
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 43938
+    content_length: 44357
     host: ""

internal/agent/testdata/TestCoderAgent/openai-gpt-5/simple_test.yaml πŸ”—

@@ -24,13 +24,15 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-CVk2beojsDVmmqhq9e3IepwKOIfY6","object":"chat.completion.chunk","created":1761681185,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"uGjyEb2R4SzsZu"}
+      data: {"id":"chatcmpl-CVz7MIPSHlXphCyxpyRBWksQLSvTb","object":"chat.completion.chunk","created":1761739140,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"1vowxVSXtxJ2d4"}
 
-      data: {"id":"chatcmpl-CVk2beojsDVmmqhq9e3IepwKOIfY6","object":"chat.completion.chunk","created":1761681185,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":"Greeting"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ic6Z4RhP"}
+      data: {"id":"chatcmpl-CVz7MIPSHlXphCyxpyRBWksQLSvTb","object":"chat.completion.chunk","created":1761739140,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":"Greeting"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"KJBxcZr3"}
 
-      data: {"id":"chatcmpl-CVk2beojsDVmmqhq9e3IepwKOIfY6","object":"chat.completion.chunk","created":1761681185,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"Hu41ilGFmi"}
+      data: {"id":"chatcmpl-CVz7MIPSHlXphCyxpyRBWksQLSvTb","object":"chat.completion.chunk","created":1761739140,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Message"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"2ChAiMG4"}
 
-      data: {"id":"chatcmpl-CVk2beojsDVmmqhq9e3IepwKOIfY6","object":"chat.completion.chunk","created":1761681185,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[],"usage":{"prompt_tokens":126,"completion_tokens":1,"total_tokens":127,"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":"IROPExM99CDjTU"}
+      data: {"id":"chatcmpl-CVz7MIPSHlXphCyxpyRBWksQLSvTb","object":"chat.completion.chunk","created":1761739140,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"UbBkoFM6re"}
+
+      data: {"id":"chatcmpl-CVz7MIPSHlXphCyxpyRBWksQLSvTb","object":"chat.completion.chunk","created":1761739140,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","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":"vPzxvpR8ryY52U"}
 
       data: [DONE]
 
@@ -39,15 +41,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 1.698654583s
+    duration: 859.302541ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 43928
+    content_length: 44347
     host: ""

internal/agent/testdata/TestCoderAgent/openai-gpt-5/sourcegraph_tool.yaml πŸ”—

@@ -24,35 +24,31 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-CVk6bQPgmH7NADAN4APH859zh8m9o","object":"chat.completion.chunk","created":1761681433,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"3efVtikOwU2QQd"}
+      data: {"id":"chatcmpl-CVz9NVZBhmFDLAKKev5QLaOCWUO9O","object":"chat.completion.chunk","created":1761739265,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"fe0CpOYZlazOH5"}
 
-      data: {"id":"chatcmpl-CVk6bQPgmH7NADAN4APH859zh8m9o","object":"chat.completion.chunk","created":1761681433,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":"Searching"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"5iDhw3i"}
+      data: {"id":"chatcmpl-CVz9NVZBhmFDLAKKev5QLaOCWUO9O","object":"chat.completion.chunk","created":1761739265,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":"Searching"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"niEOlyZ"}
 
-      data: {"id":"chatcmpl-CVk6bQPgmH7NADAN4APH859zh8m9o","object":"chat.completion.chunk","created":1761681433,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" '"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"6v41Y1YsuWpWsS"}
+      data: {"id":"chatcmpl-CVz9NVZBhmFDLAKKev5QLaOCWUO9O","object":"chat.completion.chunk","created":1761739265,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" for"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"u6E8aJR0iMA3"}
 
-      data: {"id":"chatcmpl-CVk6bQPgmH7NADAN4APH859zh8m9o","object":"chat.completion.chunk","created":1761681433,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":"func"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"BS6Pr9k4ipaE"}
+      data: {"id":"chatcmpl-CVz9NVZBhmFDLAKKev5QLaOCWUO9O","object":"chat.completion.chunk","created":1761739265,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" '"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"t0LrHYO84mGtQV"}
 
-      data: {"id":"chatcmpl-CVk6bQPgmH7NADAN4APH859zh8m9o","object":"chat.completion.chunk","created":1761681433,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" main"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"cmn25X4mcO9"}
+      data: {"id":"chatcmpl-CVz9NVZBhmFDLAKKev5QLaOCWUO9O","object":"chat.completion.chunk","created":1761739265,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":"func"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"GAQWvwLXiX3M"}
 
-      data: {"id":"chatcmpl-CVk6bQPgmH7NADAN4APH859zh8m9o","object":"chat.completion.chunk","created":1761681433,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":"'"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ogbWLN6TSPcHI7T"}
+      data: {"id":"chatcmpl-CVz9NVZBhmFDLAKKev5QLaOCWUO9O","object":"chat.completion.chunk","created":1761739265,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" main"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"jfdD4Xk3zVv"}
 
-      data: {"id":"chatcmpl-CVk6bQPgmH7NADAN4APH859zh8m9o","object":"chat.completion.chunk","created":1761681433,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"7m5n01mGx17jK"}
+      data: {"id":"chatcmpl-CVz9NVZBhmFDLAKKev5QLaOCWUO9O","object":"chat.completion.chunk","created":1761739265,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":"'"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"x1s9HJnIiJmigtW"}
 
-      data: {"id":"chatcmpl-CVk6bQPgmH7NADAN4APH859zh8m9o","object":"chat.completion.chunk","created":1761681433,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" Go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ZCFYmNUoMmKVL"}
+      data: {"id":"chatcmpl-CVz9NVZBhmFDLAKKev5QLaOCWUO9O","object":"chat.completion.chunk","created":1761739265,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"AVSl72ugYDvrX"}
 
-      data: {"id":"chatcmpl-CVk6bQPgmH7NADAN4APH859zh8m9o","object":"chat.completion.chunk","created":1761681433,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" Re"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ooRjlcuX3j2iJ"}
+      data: {"id":"chatcmpl-CVz9NVZBhmFDLAKKev5QLaOCWUO9O","object":"chat.completion.chunk","created":1761739265,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"C79tD3LVf9TJB"}
 
-      data: {"id":"chatcmpl-CVk6bQPgmH7NADAN4APH859zh8m9o","object":"chat.completion.chunk","created":1761681433,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":"positories"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"FRh6cT"}
+      data: {"id":"chatcmpl-CVz9NVZBhmFDLAKKev5QLaOCWUO9O","object":"chat.completion.chunk","created":1761739265,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Re"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Lnc2wuAP1DFi2"}
 
-      data: {"id":"chatcmpl-CVk6bQPgmH7NADAN4APH859zh8m9o","object":"chat.completion.chunk","created":1761681433,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" with"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"fCDPFRLW1TB"}
+      data: {"id":"chatcmpl-CVz9NVZBhmFDLAKKev5QLaOCWUO9O","object":"chat.completion.chunk","created":1761739265,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":"positories"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"NeTuNV"}
 
-      data: {"id":"chatcmpl-CVk6bQPgmH7NADAN4APH859zh8m9o","object":"chat.completion.chunk","created":1761681433,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" Source"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"cdHXGCsGB"}
+      data: {"id":"chatcmpl-CVz9NVZBhmFDLAKKev5QLaOCWUO9O","object":"chat.completion.chunk","created":1761739265,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"QEVxkLwgD4"}
 
-      data: {"id":"chatcmpl-CVk6bQPgmH7NADAN4APH859zh8m9o","object":"chat.completion.chunk","created":1761681433,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":"graph"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"aV5ylGH1wqM"}
-
-      data: {"id":"chatcmpl-CVk6bQPgmH7NADAN4APH859zh8m9o","object":"chat.completion.chunk","created":1761681433,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"euwy79pPSc"}
-
-      data: {"id":"chatcmpl-CVk6bQPgmH7NADAN4APH859zh8m9o","object":"chat.completion.chunk","created":1761681433,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","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":"UwyCkvyEEF1dk"}
+      data: {"id":"chatcmpl-CVz9NVZBhmFDLAKKev5QLaOCWUO9O","object":"chat.completion.chunk","created":1761739265,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","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":"dJfT8DVIT9w0K"}
 
       data: [DONE]
 
@@ -61,15 +57,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 736.569917ms
+    duration: 448.444542ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 43988
+    content_length: 44407
     host: ""

internal/agent/testdata/TestCoderAgent/openai-gpt-5/update_a_file.yaml πŸ”—

@@ -24,31 +24,25 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-CVk2sNxS8qBnzj3NLwoDotnH16qYk","object":"chat.completion.chunk","created":1761681202,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"R3Yn6iuW6b8HIG"}
+      data: {"id":"chatcmpl-CVz7cLwcqlyipViB3KQ0SHCuvoCcD","object":"chat.completion.chunk","created":1761739156,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"X6UJgdERVeZftx"}
 
-      data: {"id":"chatcmpl-CVk2sNxS8qBnzj3NLwoDotnH16qYk","object":"chat.completion.chunk","created":1761681202,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":"Update"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"QBbkulYf5h"}
+      data: {"id":"chatcmpl-CVz7cLwcqlyipViB3KQ0SHCuvoCcD","object":"chat.completion.chunk","created":1761739156,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":"Update"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"0mP6avxjgD"}
 
-      data: {"id":"chatcmpl-CVk2sNxS8qBnzj3NLwoDotnH16qYk","object":"chat.completion.chunk","created":1761681202,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" main"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"x0XiJE7rkNR"}
+      data: {"id":"chatcmpl-CVz7cLwcqlyipViB3KQ0SHCuvoCcD","object":"chat.completion.chunk","created":1761739156,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" Print"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"6uSgVowxbg"}
 
-      data: {"id":"chatcmpl-CVk2sNxS8qBnzj3NLwoDotnH16qYk","object":"chat.completion.chunk","created":1761681202,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":".go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"BuBW48ym6MpIH"}
+      data: {"id":"chatcmpl-CVz7cLwcqlyipViB3KQ0SHCuvoCcD","object":"chat.completion.chunk","created":1761739156,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" Statement"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"J6rKIU"}
 
-      data: {"id":"chatcmpl-CVk2sNxS8qBnzj3NLwoDotnH16qYk","object":"chat.completion.chunk","created":1761681202,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" to"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"v1imL3nZbF8mI"}
+      data: {"id":"chatcmpl-CVz7cLwcqlyipViB3KQ0SHCuvoCcD","object":"chat.completion.chunk","created":1761739156,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"HUKnpRUoNzTaa"}
 
-      data: {"id":"chatcmpl-CVk2sNxS8qBnzj3NLwoDotnH16qYk","object":"chat.completion.chunk","created":1761681202,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" Print"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"CoAaUwSdqe"}
+      data: {"id":"chatcmpl-CVz7cLwcqlyipViB3KQ0SHCuvoCcD","object":"chat.completion.chunk","created":1761739156,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" main"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"5XXcdcHGSpW"}
 
-      data: {"id":"chatcmpl-CVk2sNxS8qBnzj3NLwoDotnH16qYk","object":"chat.completion.chunk","created":1761681202,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" '"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"iWfznG6OyaFJ8d"}
+      data: {"id":"chatcmpl-CVz7cLwcqlyipViB3KQ0SHCuvoCcD","object":"chat.completion.chunk","created":1761739156,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":".go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Lw0ACzS7NeDnv"}
 
-      data: {"id":"chatcmpl-CVk2sNxS8qBnzj3NLwoDotnH16qYk","object":"chat.completion.chunk","created":1761681202,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":"Hello"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"pIdJEP2vPX2"}
+      data: {"id":"chatcmpl-CVz7cLwcqlyipViB3KQ0SHCuvoCcD","object":"chat.completion.chunk","created":1761739156,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" File"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"cK7347ocgYS"}
 
-      data: {"id":"chatcmpl-CVk2sNxS8qBnzj3NLwoDotnH16qYk","object":"chat.completion.chunk","created":1761681202,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" from"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"910PGerTLOV"}
+      data: {"id":"chatcmpl-CVz7cLwcqlyipViB3KQ0SHCuvoCcD","object":"chat.completion.chunk","created":1761739156,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"57cdGQmo0R"}
 
-      data: {"id":"chatcmpl-CVk2sNxS8qBnzj3NLwoDotnH16qYk","object":"chat.completion.chunk","created":1761681202,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" Crush"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"6PaKqGDvcY"}
-
-      data: {"id":"chatcmpl-CVk2sNxS8qBnzj3NLwoDotnH16qYk","object":"chat.completion.chunk","created":1761681202,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":"'"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"9BDcYHO629IKfQk"}
-
-      data: {"id":"chatcmpl-CVk2sNxS8qBnzj3NLwoDotnH16qYk","object":"chat.completion.chunk","created":1761681202,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"9RfCvE5WIg"}
-
-      data: {"id":"chatcmpl-CVk2sNxS8qBnzj3NLwoDotnH16qYk","object":"chat.completion.chunk","created":1761681202,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","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":"y7sGiCFcujZqp"}
+      data: {"id":"chatcmpl-CVz7cLwcqlyipViB3KQ0SHCuvoCcD","object":"chat.completion.chunk","created":1761739156,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[],"usage":{"prompt_tokens":139,"completion_tokens":7,"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":"ScSeP3iMu5yYl2"}
 
       data: [DONE]
 
@@ -57,15 +51,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 1.055637958s
+    duration: 485.046167ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 43994
+    content_length: 44413
     host: ""

internal/agent/testdata/TestCoderAgent/openai-gpt-5/write_tool.yaml πŸ”—

@@ -24,23 +24,23 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-CVk6ofJyze27VhqpyyC3LL1WuQUUT","object":"chat.completion.chunk","created":1761681446,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"zMAHXy5Yx0lUqy"}
+      data: {"id":"chatcmpl-CVz9pqBh43nAYUGjA4HmpNmfVpUvH","object":"chat.completion.chunk","created":1761739293,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"yvRftXRjka0BLl"}
 
-      data: {"id":"chatcmpl-CVk6ofJyze27VhqpyyC3LL1WuQUUT","object":"chat.completion.chunk","created":1761681446,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":"Create"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"MX0N0lOkh7"}
+      data: {"id":"chatcmpl-CVz9pqBh43nAYUGjA4HmpNmfVpUvH","object":"chat.completion.chunk","created":1761739293,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":"Create"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"fZcBPhRtnG"}
 
-      data: {"id":"chatcmpl-CVk6ofJyze27VhqpyyC3LL1WuQUUT","object":"chat.completion.chunk","created":1761681446,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" config"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"xEASynL4v"}
+      data: {"id":"chatcmpl-CVz9pqBh43nAYUGjA4HmpNmfVpUvH","object":"chat.completion.chunk","created":1761739293,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" config"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"UYN60fFyW"}
 
-      data: {"id":"chatcmpl-CVk6ofJyze27VhqpyyC3LL1WuQUUT","object":"chat.completion.chunk","created":1761681446,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":".json"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"QrwRYsIfwmD"}
+      data: {"id":"chatcmpl-CVz9pqBh43nAYUGjA4HmpNmfVpUvH","object":"chat.completion.chunk","created":1761739293,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":".json"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"arJ5vFKUof9"}
 
-      data: {"id":"chatcmpl-CVk6ofJyze27VhqpyyC3LL1WuQUUT","object":"chat.completion.chunk","created":1761681446,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" with"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Is53hpOzi0t"}
+      data: {"id":"chatcmpl-CVz9pqBh43nAYUGjA4HmpNmfVpUvH","object":"chat.completion.chunk","created":1761739293,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" with"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"jkl1Cyas5JJ"}
 
-      data: {"id":"chatcmpl-CVk6ofJyze27VhqpyyC3LL1WuQUUT","object":"chat.completion.chunk","created":1761681446,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" JSON"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"BPVemxKv7Jb"}
+      data: {"id":"chatcmpl-CVz9pqBh43nAYUGjA4HmpNmfVpUvH","object":"chat.completion.chunk","created":1761739293,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" JSON"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"YNOesLqjiP7"}
 
-      data: {"id":"chatcmpl-CVk6ofJyze27VhqpyyC3LL1WuQUUT","object":"chat.completion.chunk","created":1761681446,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{"content":" Content"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"jdYveAsc"}
+      data: {"id":"chatcmpl-CVz9pqBh43nAYUGjA4HmpNmfVpUvH","object":"chat.completion.chunk","created":1761739293,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Content"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"tyZHLJ74"}
 
-      data: {"id":"chatcmpl-CVk6ofJyze27VhqpyyC3LL1WuQUUT","object":"chat.completion.chunk","created":1761681446,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"QjjaTWqUpr"}
+      data: {"id":"chatcmpl-CVz9pqBh43nAYUGjA4HmpNmfVpUvH","object":"chat.completion.chunk","created":1761739293,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"XgpssLlNl0"}
 
-      data: {"id":"chatcmpl-CVk6ofJyze27VhqpyyC3LL1WuQUUT","object":"chat.completion.chunk","created":1761681446,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_65564d8ba5","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":"1ekL6k70ElsT3D"}
+      data: {"id":"chatcmpl-CVz9pqBh43nAYUGjA4HmpNmfVpUvH","object":"chat.completion.chunk","created":1761739293,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","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":"ElEHEb9B9kNRsi"}
 
       data: [DONE]
 
@@ -49,15 +49,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 555.366458ms
+    duration: 504.447625ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 44031
+    content_length: 44450
     host: ""

internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/bash_tool.yaml πŸ”—

@@ -24,21 +24,21 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"gen-1761683188-6tgZOupTkCMjXNJ4X5p8","provider":"Hyperbolic","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761683188,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739340-MhErwSz7AYBvQhO2456S","provider":"Hyperbolic","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739340,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761683188-6tgZOupTkCMjXNJ4X5p8","provider":"Hyperbolic","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761683188,"choices":[{"index":0,"delta":{"role":"assistant","content":"Create"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739340-MhErwSz7AYBvQhO2456S","provider":"Hyperbolic","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739340,"choices":[{"index":0,"delta":{"role":"assistant","content":"Create"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761683188-6tgZOupTkCMjXNJ4X5p8","provider":"Hyperbolic","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761683188,"choices":[{"index":0,"delta":{"role":"assistant","content":" test"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739340-MhErwSz7AYBvQhO2456S","provider":"Hyperbolic","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739340,"choices":[{"index":0,"delta":{"role":"assistant","content":" test"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761683188-6tgZOupTkCMjXNJ4X5p8","provider":"Hyperbolic","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761683188,"choices":[{"index":0,"delta":{"role":"assistant","content":".txt with"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739340-MhErwSz7AYBvQhO2456S","provider":"Hyperbolic","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739340,"choices":[{"index":0,"delta":{"role":"assistant","content":".txt with"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761683188-6tgZOupTkCMjXNJ4X5p8","provider":"Hyperbolic","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761683188,"choices":[{"index":0,"delta":{"role":"assistant","content":" hello bash using"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739340-MhErwSz7AYBvQhO2456S","provider":"Hyperbolic","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739340,"choices":[{"index":0,"delta":{"role":"assistant","content":" hello bash using"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761683188-6tgZOupTkCMjXNJ4X5p8","provider":"Hyperbolic","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761683188,"choices":[{"index":0,"delta":{"role":"assistant","content":" bash"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739340-MhErwSz7AYBvQhO2456S","provider":"Hyperbolic","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739340,"choices":[{"index":0,"delta":{"role":"assistant","content":" bash"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761683188-6tgZOupTkCMjXNJ4X5p8","provider":"Hyperbolic","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761683188,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
+      data: {"id":"gen-1761739340-MhErwSz7AYBvQhO2456S","provider":"Hyperbolic","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739340,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
 
-      data: {"id":"gen-1761683188-6tgZOupTkCMjXNJ4X5p8","provider":"Hyperbolic","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761683188,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":147,"completion_tokens":9,"total_tokens":156,"cost":0.0000468,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.0000441,"upstream_inference_completions_cost":0.0000027},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
+      data: {"id":"gen-1761739340-MhErwSz7AYBvQhO2456S","provider":"Hyperbolic","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739340,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":147,"completion_tokens":9,"total_tokens":156,"cost":0.0000468,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.0000441,"upstream_inference_completions_cost":0.0000027},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
 
       data: [DONE]
 
@@ -47,15 +47,15 @@ interactions:
       - text/event-stream
     status: 200 OK
     code: 200
-    duration: 2.295061208s
+    duration: 1.509632708s
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 44127
+    content_length: 44546
     host: ""

internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/fetch_tool.yaml πŸ”—

@@ -24,56 +24,25 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"gen-1761681516-yyGVaFT8oJ7zCV0iCfTI","provider":"GMICloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761681516,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739353-7uwZ5o6Mg2R3OxXIJzTD","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739353,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761681516-yyGVaFT8oJ7zCV0iCfTI","provider":"GMICloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761681516,"choices":[{"index":0,"delta":{"role":"assistant","content":"Check"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739353-7uwZ5o6Mg2R3OxXIJzTD","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739353,"choices":[{"index":0,"delta":{"role":"assistant","content":"Check"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761681516-yyGVaFT8oJ7zCV0iCfTI","provider":"GMICloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761681516,"choices":[{"index":0,"delta":{"role":"assistant","content":" if example"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739353-7uwZ5o6Mg2R3OxXIJzTD","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739353,"choices":[{"index":0,"delta":{"role":"assistant","content":" if"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761681516-yyGVaFT8oJ7zCV0iCfTI","provider":"GMICloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761681516,"choices":[{"index":0,"delta":{"role":"assistant","content":".html contains John"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739353-7uwZ5o6Mg2R3OxXIJzTD","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739353,"choices":[{"index":0,"delta":{"role":"assistant","content":" example"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761681516-yyGVaFT8oJ7zCV0iCfTI","provider":"GMICloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761681516,"choices":[{"index":0,"delta":{"role":"assistant","content":" Doe"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739353-7uwZ5o6Mg2R3OxXIJzTD","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739353,"choices":[{"index":0,"delta":{"role":"assistant","content":".html"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761681516-yyGVaFT8oJ7zCV0iCfTI","provider":"GMICloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761681516,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
+      data: {"id":"gen-1761739353-7uwZ5o6Mg2R3OxXIJzTD","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739353,"choices":[{"index":0,"delta":{"role":"assistant","content":" contains"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761681516-yyGVaFT8oJ7zCV0iCfTI","provider":"GMICloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761681516,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":155,"completion_tokens":8,"total_tokens":163,"cost":0.00003525,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.00002325,"upstream_inference_completions_cost":0.000012},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
+      data: {"id":"gen-1761739353-7uwZ5o6Mg2R3OxXIJzTD","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739353,"choices":[{"index":0,"delta":{"role":"assistant","content":" John"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: [DONE]
-
-    headers:
-      Content-Type:
-      - text/event-stream
-    status: 200 OK
-    code: 200
-    duration: 962.130167ms
-- id: 1
-  request:
-    proto: HTTP/1.1
-    proto_major: 1
-    proto_minor: 1
-    content_length: 44170
-    host: ""

internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/glob_tool.yaml πŸ”—

@@ -24,19 +24,19 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"gen-1761681523-AIa4Rs8fdHWMJCYVAHh0","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761681523,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739365-9tYIRPaRwzq4zyeyutpR","provider":"Hyperbolic","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739365,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761681523-AIa4Rs8fdHWMJCYVAHh0","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761681523,"choices":[{"index":0,"delta":{"role":"assistant","content":"Find"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739365-9tYIRPaRwzq4zyeyutpR","provider":"Hyperbolic","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739365,"choices":[{"index":0,"delta":{"role":"assistant","content":"Find"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761681523-AIa4Rs8fdHWMJCYVAHh0","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761681523,"choices":[{"index":0,"delta":{"role":"assistant","content":" all .go files"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739365-9tYIRPaRwzq4zyeyutpR","provider":"Hyperbolic","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739365,"choices":[{"index":0,"delta":{"role":"assistant","content":" all .go files"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761681523-AIa4Rs8fdHWMJCYVAHh0","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761681523,"choices":[{"index":0,"delta":{"role":"assistant","content":" in current directory using"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739365-9tYIRPaRwzq4zyeyutpR","provider":"Hyperbolic","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739365,"choices":[{"index":0,"delta":{"role":"assistant","content":" in current directory using"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761681523-AIa4Rs8fdHWMJCYVAHh0","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761681523,"choices":[{"index":0,"delta":{"role":"assistant","content":" glob"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739365-9tYIRPaRwzq4zyeyutpR","provider":"Hyperbolic","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739365,"choices":[{"index":0,"delta":{"role":"assistant","content":" glob"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761681523-AIa4Rs8fdHWMJCYVAHh0","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761681523,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
+      data: {"id":"gen-1761739365-9tYIRPaRwzq4zyeyutpR","provider":"Hyperbolic","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739365,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
 
-      data: {"id":"gen-1761681523-AIa4Rs8fdHWMJCYVAHh0","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761681523,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":139,"completion_tokens":11,"total_tokens":150,"cost":0.00003405,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.00002085,"upstream_inference_completions_cost":0.0000132},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
+      data: {"id":"gen-1761739365-9tYIRPaRwzq4zyeyutpR","provider":"Hyperbolic","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739365,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":139,"completion_tokens":11,"total_tokens":150,"cost":0.000045,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.0000417,"upstream_inference_completions_cost":0.0000033},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
 
       data: [DONE]
 
@@ -45,15 +45,15 @@ interactions:
       - text/event-stream
     status: 200 OK
     code: 200
-    duration: 1.906578584s
+    duration: 866.379167ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 44088
+    content_length: 44507
     host: ""

internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/grep_tool.yaml πŸ”—

@@ -24,27 +24,27 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"gen-1761682681-tYJwPHC1Ey3ldJuOlcWM","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682681,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739368-d3cedwgttisP1LWVaMoF","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739368,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761682681-tYJwPHC1Ey3ldJuOlcWM","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682681,"choices":[{"index":0,"delta":{"role":"assistant","content":"Search"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739368-d3cedwgttisP1LWVaMoF","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739368,"choices":[{"index":0,"delta":{"role":"assistant","content":"Search"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761682681-tYJwPHC1Ey3ldJuOlcWM","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682681,"choices":[{"index":0,"delta":{"role":"assistant","content":" for"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739368-d3cedwgttisP1LWVaMoF","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739368,"choices":[{"index":0,"delta":{"role":"assistant","content":" for"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761682681-tYJwPHC1Ey3ldJuOlcWM","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682681,"choices":[{"index":0,"delta":{"role":"assistant","content":" package"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739368-d3cedwgttisP1LWVaMoF","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739368,"choices":[{"index":0,"delta":{"role":"assistant","content":" package"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761682681-tYJwPHC1Ey3ldJuOlcWM","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682681,"choices":[{"index":0,"delta":{"role":"assistant","content":" in"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739368-d3cedwgttisP1LWVaMoF","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739368,"choices":[{"index":0,"delta":{"role":"assistant","content":" in"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761682681-tYJwPHC1Ey3ldJuOlcWM","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682681,"choices":[{"index":0,"delta":{"role":"assistant","content":" Go"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739368-d3cedwgttisP1LWVaMoF","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739368,"choices":[{"index":0,"delta":{"role":"assistant","content":" go"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761682681-tYJwPHC1Ey3ldJuOlcWM","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682681,"choices":[{"index":0,"delta":{"role":"assistant","content":" files"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739368-d3cedwgttisP1LWVaMoF","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739368,"choices":[{"index":0,"delta":{"role":"assistant","content":" files"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761682681-tYJwPHC1Ey3ldJuOlcWM","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682681,"choices":[{"index":0,"delta":{"role":"assistant","content":" using"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739368-d3cedwgttisP1LWVaMoF","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739368,"choices":[{"index":0,"delta":{"role":"assistant","content":" using"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761682681-tYJwPHC1Ey3ldJuOlcWM","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682681,"choices":[{"index":0,"delta":{"role":"assistant","content":" grep"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739368-d3cedwgttisP1LWVaMoF","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739368,"choices":[{"index":0,"delta":{"role":"assistant","content":" grep"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761682681-tYJwPHC1Ey3ldJuOlcWM","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682681,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
+      data: {"id":"gen-1761739368-d3cedwgttisP1LWVaMoF","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739368,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
 
-      data: {"id":"gen-1761682681-tYJwPHC1Ey3ldJuOlcWM","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682681,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":140,"completion_tokens":9,"total_tokens":149,"cost":0.0000239,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.000014,"upstream_inference_completions_cost":0.0000099},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
+      data: {"id":"gen-1761739368-d3cedwgttisP1LWVaMoF","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739368,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":140,"completion_tokens":9,"total_tokens":149,"cost":0.0000212,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.000014,"upstream_inference_completions_cost":0.0000072},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
 
       data: [DONE]
 
@@ -53,15 +53,15 @@ interactions:
       - text/event-stream
     status: 200 OK
     code: 200
-    duration: 5.039463417s
+    duration: 1.196160875s
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 44086
+    content_length: 44505
     host: ""

internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/ls_tool.yaml πŸ”—

@@ -24,25 +24,25 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"gen-1761682070-KoRJgCqOyhjuH2xKrf7P","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682070,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739375-MQ1rVq0evwsr6N2PEE68","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739375,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761682070-KoRJgCqOyhjuH2xKrf7P","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682070,"choices":[{"index":0,"delta":{"role":"assistant","content":"List"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739375-MQ1rVq0evwsr6N2PEE68","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739375,"choices":[{"index":0,"delta":{"role":"assistant","content":"List"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761682070-KoRJgCqOyhjuH2xKrf7P","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682070,"choices":[{"index":0,"delta":{"role":"assistant","content":" files"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739375-MQ1rVq0evwsr6N2PEE68","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739375,"choices":[{"index":0,"delta":{"role":"assistant","content":" files"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761682070-KoRJgCqOyhjuH2xKrf7P","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682070,"choices":[{"index":0,"delta":{"role":"assistant","content":" in"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739375-MQ1rVq0evwsr6N2PEE68","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739375,"choices":[{"index":0,"delta":{"role":"assistant","content":" in"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761682070-KoRJgCqOyhjuH2xKrf7P","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682070,"choices":[{"index":0,"delta":{"role":"assistant","content":" current"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739375-MQ1rVq0evwsr6N2PEE68","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739375,"choices":[{"index":0,"delta":{"role":"assistant","content":" current"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761682070-KoRJgCqOyhjuH2xKrf7P","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682070,"choices":[{"index":0,"delta":{"role":"assistant","content":" directory"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739375-MQ1rVq0evwsr6N2PEE68","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739375,"choices":[{"index":0,"delta":{"role":"assistant","content":" directory"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761682070-KoRJgCqOyhjuH2xKrf7P","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682070,"choices":[{"index":0,"delta":{"role":"assistant","content":" using"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739375-MQ1rVq0evwsr6N2PEE68","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739375,"choices":[{"index":0,"delta":{"role":"assistant","content":" using"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761682070-KoRJgCqOyhjuH2xKrf7P","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682070,"choices":[{"index":0,"delta":{"role":"assistant","content":" ls"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739375-MQ1rVq0evwsr6N2PEE68","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739375,"choices":[{"index":0,"delta":{"role":"assistant","content":" ls"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761682070-KoRJgCqOyhjuH2xKrf7P","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682070,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
+      data: {"id":"gen-1761739375-MQ1rVq0evwsr6N2PEE68","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739375,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
 
-      data: {"id":"gen-1761682070-KoRJgCqOyhjuH2xKrf7P","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682070,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":137,"completion_tokens":8,"total_tokens":145,"cost":0.0000225,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.0000137,"upstream_inference_completions_cost":0.0000088},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
+      data: {"id":"gen-1761739375-MQ1rVq0evwsr6N2PEE68","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739375,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":137,"completion_tokens":8,"total_tokens":145,"cost":0.0000225,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.0000137,"upstream_inference_completions_cost":0.0000088},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
 
       data: [DONE]
 
@@ -51,15 +51,15 @@ interactions:
       - text/event-stream
     status: 200 OK
     code: 200
-    duration: 1.775485334s
+    duration: 552.375417ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 44080
+    content_length: 44499
     host: ""

internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/multiedit_tool.yaml πŸ”—

@@ -24,21 +24,21 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"gen-1761682080-aFNbmWGKBHHPKcET0Z39","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682081,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739379-8wX8woLDnS1q1V3VLm9P","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739379,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761682080-aFNbmWGKBHHPKcET0Z39","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682081,"choices":[{"index":0,"delta":{"role":"assistant","content":"Use"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739379-8wX8woLDnS1q1V3VLm9P","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739379,"choices":[{"index":0,"delta":{"role":"assistant","content":"Use"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761682080-aFNbmWGKBHHPKcET0Z39","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682081,"choices":[{"index":0,"delta":{"role":"assistant","content":" multiedit to"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739379-8wX8woLDnS1q1V3VLm9P","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739379,"choices":[{"index":0,"delta":{"role":"assistant","content":" multiedit to"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761682080-aFNbmWGKBHHPKcET0Z39","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682081,"choices":[{"index":0,"delta":{"role":"assistant","content":" update greeting"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739379-8wX8woLDnS1q1V3VLm9P","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739379,"choices":[{"index":0,"delta":{"role":"assistant","content":" update greeting"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761682080-aFNbmWGKBHHPKcET0Z39","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682081,"choices":[{"index":0,"delta":{"role":"assistant","content":" and add comment in"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739379-8wX8woLDnS1q1V3VLm9P","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739379,"choices":[{"index":0,"delta":{"role":"assistant","content":" and add comment in"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761682080-aFNbmWGKBHHPKcET0Z39","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682081,"choices":[{"index":0,"delta":{"role":"assistant","content":" main.go"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739379-8wX8woLDnS1q1V3VLm9P","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739379,"choices":[{"index":0,"delta":{"role":"assistant","content":" main.go"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761682080-aFNbmWGKBHHPKcET0Z39","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682081,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
+      data: {"id":"gen-1761739379-8wX8woLDnS1q1V3VLm9P","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739379,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
 
-      data: {"id":"gen-1761682080-aFNbmWGKBHHPKcET0Z39","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682081,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":160,"completion_tokens":14,"total_tokens":174,"cost":0.0000408,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.000024,"upstream_inference_completions_cost":0.0000168},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
+      data: {"id":"gen-1761739379-8wX8woLDnS1q1V3VLm9P","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739379,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":160,"completion_tokens":14,"total_tokens":174,"cost":0.0000408,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.000024,"upstream_inference_completions_cost":0.0000168},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
 
       data: [DONE]
 
@@ -47,15 +47,15 @@ interactions:
       - text/event-stream
     status: 200 OK
     code: 200
-    duration: 1.107639958s
+    duration: 732.581833ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 44166
+    content_length: 44585
     host: ""

internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/parallel_tool_calls.yaml πŸ”—

@@ -24,39 +24,23 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"gen-1761682116-TteZV0O6hO0XOIaBiXId","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682116,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739412-Y09R7myDXdUaQmaPvgvH","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739412,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761682116-TteZV0O6hO0XOIaBiXId","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682116,"choices":[{"index":0,"delta":{"role":"assistant","content":"Run"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739412-Y09R7myDXdUaQmaPvgvH","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739412,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761682116-TteZV0O6hO0XOIaBiXId","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682116,"choices":[{"index":0,"delta":{"role":"assistant","content":" glob"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739412-Y09R7myDXdUaQmaPvgvH","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739412,"choices":[{"index":0,"delta":{"role":"assistant","content":"Find"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761682116-TteZV0O6hO0XOIaBiXId","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682116,"choices":[{"index":0,"delta":{"role":"assistant","content":" and"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739412-Y09R7myDXdUaQmaPvgvH","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739412,"choices":[{"index":0,"delta":{"role":"assistant","content":" .go files and"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761682116-TteZV0O6hO0XOIaBiXId","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682116,"choices":[{"index":0,"delta":{"role":"assistant","content":" ls"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739412-Y09R7myDXdUaQmaPvgvH","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739412,"choices":[{"index":0,"delta":{"role":"assistant","content":" list directory"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761682116-TteZV0O6hO0XOIaBiXId","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682116,"choices":[{"index":0,"delta":{"role":"assistant","content":" in"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739412-Y09R7myDXdUaQmaPvgvH","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739412,"choices":[{"index":0,"delta":{"role":"assistant","content":" in"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761682116-TteZV0O6hO0XOIaBiXId","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682116,"choices":[{"index":0,"delta":{"role":"assistant","content":" parallel"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739412-Y09R7myDXdUaQmaPvgvH","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739412,"choices":[{"index":0,"delta":{"role":"assistant","content":" parallel"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761682116-TteZV0O6hO0XOIaBiXId","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682116,"choices":[{"index":0,"delta":{"role":"assistant","content":" to"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739412-Y09R7myDXdUaQmaPvgvH","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739412,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
 
-      data: {"id":"gen-1761682116-TteZV0O6hO0XOIaBiXId","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682116,"choices":[{"index":0,"delta":{"role":"assistant","content":" find"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1761682116-TteZV0O6hO0XOIaBiXId","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682116,"choices":[{"index":0,"delta":{"role":"assistant","content":" ."},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1761682116-TteZV0O6hO0XOIaBiXId","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682116,"choices":[{"index":0,"delta":{"role":"assistant","content":"go"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1761682116-TteZV0O6hO0XOIaBiXId","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682116,"choices":[{"index":0,"delta":{"role":"assistant","content":" files"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1761682116-TteZV0O6hO0XOIaBiXId","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682116,"choices":[{"index":0,"delta":{"role":"assistant","content":" and"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1761682116-TteZV0O6hO0XOIaBiXId","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682116,"choices":[{"index":0,"delta":{"role":"assistant","content":" list"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1761682116-TteZV0O6hO0XOIaBiXId","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682116,"choices":[{"index":0,"delta":{"role":"assistant","content":" directory"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1761682116-TteZV0O6hO0XOIaBiXId","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682116,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
-
-      data: {"id":"gen-1761682116-TteZV0O6hO0XOIaBiXId","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682116,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":156,"completion_tokens":15,"total_tokens":171,"cost":0.0000321,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.0000156,"upstream_inference_completions_cost":0.0000165},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
+      data: {"id":"gen-1761739412-Y09R7myDXdUaQmaPvgvH","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739412,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":156,"completion_tokens":10,"total_tokens":166,"cost":0.00003284,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.00002184,"upstream_inference_completions_cost":0.000011},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
 
       data: [DONE]
 
@@ -65,15 +49,15 @@ interactions:
       - text/event-stream
     status: 200 OK
     code: 200
-    duration: 652.183625ms
+    duration: 561.956875ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 44177
+    content_length: 44596
     host: ""

internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/simple_test.yaml πŸ”—

@@ -24,13 +24,15 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"gen-1761681484-LmlRifrM7XnC8PwbmPQg","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761681484,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739318-IdmkJnEu9uY8yYiY9n5i","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739318,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761681484-LmlRifrM7XnC8PwbmPQg","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761681484,"choices":[{"index":0,"delta":{"role":"assistant","content":"Hello"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739318-IdmkJnEu9uY8yYiY9n5i","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739318,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761681484-LmlRifrM7XnC8PwbmPQg","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761681484,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
+      data: {"id":"gen-1761739318-IdmkJnEu9uY8yYiY9n5i","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739318,"choices":[{"index":0,"delta":{"role":"assistant","content":"Hello"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761681484-LmlRifrM7XnC8PwbmPQg","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761681484,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":128,"completion_tokens":2,"total_tokens":130,"cost":0.000015,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.0000128,"upstream_inference_completions_cost":0.0000022},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
+      data: {"id":"gen-1761739318-IdmkJnEu9uY8yYiY9n5i","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739318,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
+
+      data: {"id":"gen-1761739318-IdmkJnEu9uY8yYiY9n5i","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739318,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":128,"completion_tokens":2,"total_tokens":130,"cost":0.00002012,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.00001792,"upstream_inference_completions_cost":0.0000022},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
 
       data: [DONE]
 
@@ -39,15 +41,15 @@ interactions:
       - text/event-stream
     status: 200 OK
     code: 200
-    duration: 7.559907625s
+    duration: 1.246189959s
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 44040
+    content_length: 44459
     host: ""

internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/sourcegraph_tool.yaml πŸ”—

@@ -24,21 +24,31 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"gen-1761682095-LEJwmEsBmTSWiw4qEO65","provider":"Hyperbolic","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682095,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739394-Sje6bTef73gHJt8BJ6QE","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739394,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761682095-LEJwmEsBmTSWiw4qEO65","provider":"Hyperbolic","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682095,"choices":[{"index":0,"delta":{"role":"assistant","content":"Search"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739394-Sje6bTef73gHJt8BJ6QE","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739394,"choices":[{"index":0,"delta":{"role":"assistant","content":"Search"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761682095-LEJwmEsBmTSWiw4qEO65","provider":"Hyperbolic","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682095,"choices":[{"index":0,"delta":{"role":"assistant","content":" for func"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739394-Sje6bTef73gHJt8BJ6QE","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739394,"choices":[{"index":0,"delta":{"role":"assistant","content":" for"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761682095-LEJwmEsBmTSWiw4qEO65","provider":"Hyperbolic","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682095,"choices":[{"index":0,"delta":{"role":"assistant","content":" main in Go repositories"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739394-Sje6bTef73gHJt8BJ6QE","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739394,"choices":[{"index":0,"delta":{"role":"assistant","content":" func"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761682095-LEJwmEsBmTSWiw4qEO65","provider":"Hyperbolic","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682095,"choices":[{"index":0,"delta":{"role":"assistant","content":" using Source"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739394-Sje6bTef73gHJt8BJ6QE","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739394,"choices":[{"index":0,"delta":{"role":"assistant","content":" main"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761682095-LEJwmEsBmTSWiw4qEO65","provider":"Hyperbolic","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682095,"choices":[{"index":0,"delta":{"role":"assistant","content":"graph"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739394-Sje6bTef73gHJt8BJ6QE","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739394,"choices":[{"index":0,"delta":{"role":"assistant","content":" in"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761682095-LEJwmEsBmTSWiw4qEO65","provider":"Hyperbolic","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682095,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
+      data: {"id":"gen-1761739394-Sje6bTef73gHJt8BJ6QE","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739394,"choices":[{"index":0,"delta":{"role":"assistant","content":" Go"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761682095-LEJwmEsBmTSWiw4qEO65","provider":"Hyperbolic","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682095,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":140,"completion_tokens":11,"total_tokens":151,"cost":0.0000453,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.000042,"upstream_inference_completions_cost":0.0000033},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
+      data: {"id":"gen-1761739394-Sje6bTef73gHJt8BJ6QE","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739394,"choices":[{"index":0,"delta":{"role":"assistant","content":" repositories"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+      data: {"id":"gen-1761739394-Sje6bTef73gHJt8BJ6QE","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739394,"choices":[{"index":0,"delta":{"role":"assistant","content":" using"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+      data: {"id":"gen-1761739394-Sje6bTef73gHJt8BJ6QE","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739394,"choices":[{"index":0,"delta":{"role":"assistant","content":" Source"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+      data: {"id":"gen-1761739394-Sje6bTef73gHJt8BJ6QE","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739394,"choices":[{"index":0,"delta":{"role":"assistant","content":"graph"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+      data: {"id":"gen-1761739394-Sje6bTef73gHJt8BJ6QE","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739394,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
+
+      data: {"id":"gen-1761739394-Sje6bTef73gHJt8BJ6QE","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739394,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":140,"completion_tokens":11,"total_tokens":151,"cost":0.0000261,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.000014,"upstream_inference_completions_cost":0.0000121},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
 
       data: [DONE]
 
@@ -47,15 +57,15 @@ interactions:
       - text/event-stream
     status: 200 OK
     code: 200
-    duration: 1.891482334s
+    duration: 660.816458ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 44100
+    content_length: 44519
     host: ""

internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/update_a_file.yaml πŸ”—

@@ -24,27 +24,19 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"gen-1761681493-7gQZ1t7hsCm4fDQIs2VY","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761681493,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739329-MncJd5Hu7FuIefPllGvs","provider":"Alibaba","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739329,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":null}
 
-      data: {"id":"gen-1761681493-7gQZ1t7hsCm4fDQIs2VY","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761681493,"choices":[{"index":0,"delta":{"role":"assistant","content":"Update"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739329-MncJd5Hu7FuIefPllGvs","provider":"Alibaba","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739329,"choices":[{"index":0,"delta":{"role":"assistant","content":"Update"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":null}
 
-      data: {"id":"gen-1761681493-7gQZ1t7hsCm4fDQIs2VY","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761681493,"choices":[{"index":0,"delta":{"role":"assistant","content":" main"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739329-MncJd5Hu7FuIefPllGvs","provider":"Alibaba","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739329,"choices":[{"index":0,"delta":{"role":"assistant","content":" main.go to print"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":null}
 
-      data: {"id":"gen-1761681493-7gQZ1t7hsCm4fDQIs2VY","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761681493,"choices":[{"index":0,"delta":{"role":"assistant","content":".go"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739329-MncJd5Hu7FuIefPllGvs","provider":"Alibaba","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739329,"choices":[{"index":0,"delta":{"role":"assistant","content":" hello"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":null}
 
-      data: {"id":"gen-1761681493-7gQZ1t7hsCm4fDQIs2VY","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761681493,"choices":[{"index":0,"delta":{"role":"assistant","content":" to"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739329-MncJd5Hu7FuIefPllGvs","provider":"Alibaba","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739329,"choices":[{"index":0,"delta":{"role":"assistant","content":" from crush"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":null}
 
-      data: {"id":"gen-1761681493-7gQZ1t7hsCm4fDQIs2VY","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761681493,"choices":[{"index":0,"delta":{"role":"assistant","content":" print"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739329-MncJd5Hu7FuIefPllGvs","provider":"Alibaba","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739329,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}],"system_fingerprint":null}
 
-      data: {"id":"gen-1761681493-7gQZ1t7hsCm4fDQIs2VY","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761681493,"choices":[{"index":0,"delta":{"role":"assistant","content":" hello"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1761681493-7gQZ1t7hsCm4fDQIs2VY","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761681493,"choices":[{"index":0,"delta":{"role":"assistant","content":" from"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1761681493-7gQZ1t7hsCm4fDQIs2VY","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761681493,"choices":[{"index":0,"delta":{"role":"assistant","content":" crush"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1761681493-7gQZ1t7hsCm4fDQIs2VY","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761681493,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
-
-      data: {"id":"gen-1761681493-7gQZ1t7hsCm4fDQIs2VY","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761681493,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":141,"completion_tokens":9,"total_tokens":150,"cost":0.000024,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.0000141,"upstream_inference_completions_cost":0.0000099},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
+      data: {"id":"gen-1761739329-MncJd5Hu7FuIefPllGvs","provider":"Alibaba","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739329,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":145,"completion_tokens":8,"total_tokens":153,"cost":0.0000885,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.0000725,"upstream_inference_completions_cost":0.000016},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
 
       data: [DONE]
 
@@ -53,15 +45,15 @@ interactions:
       - text/event-stream
     status: 200 OK
     code: 200
-    duration: 727.707458ms
+    duration: 1.927088584s
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 44106
+    content_length: 44525
     host: ""

internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/write_tool.yaml πŸ”—

@@ -24,19 +24,19 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"gen-1761682113-nRNEZZYffaoHlmXYEb6Y","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682113,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739409-Xr5oIGvyjjbROoGHaNFi","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739409,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761682113-nRNEZZYffaoHlmXYEb6Y","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682113,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739409-Xr5oIGvyjjbROoGHaNFi","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739409,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761682113-nRNEZZYffaoHlmXYEb6Y","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682113,"choices":[{"index":0,"delta":{"role":"assistant","content":"Create"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739409-Xr5oIGvyjjbROoGHaNFi","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739409,"choices":[{"index":0,"delta":{"role":"assistant","content":"Create"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761682113-nRNEZZYffaoHlmXYEb6Y","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682113,"choices":[{"index":0,"delta":{"role":"assistant","content":" config.json with name"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739409-Xr5oIGvyjjbROoGHaNFi","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739409,"choices":[{"index":0,"delta":{"role":"assistant","content":" config.json with name"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761682113-nRNEZZYffaoHlmXYEb6Y","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682113,"choices":[{"index":0,"delta":{"role":"assistant","content":" and version data"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761739409-Xr5oIGvyjjbROoGHaNFi","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739409,"choices":[{"index":0,"delta":{"role":"assistant","content":" and version data"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761682113-nRNEZZYffaoHlmXYEb6Y","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682113,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
+      data: {"id":"gen-1761739409-Xr5oIGvyjjbROoGHaNFi","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739409,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
 
-      data: {"id":"gen-1761682113-nRNEZZYffaoHlmXYEb6Y","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761682113,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":155,"completion_tokens":9,"total_tokens":164,"cost":0.0000316,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.0000217,"upstream_inference_completions_cost":0.0000099},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
+      data: {"id":"gen-1761739409-Xr5oIGvyjjbROoGHaNFi","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761739409,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":155,"completion_tokens":9,"total_tokens":164,"cost":0.0000316,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.0000217,"upstream_inference_completions_cost":0.0000099},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
 
       data: [DONE]
 
@@ -45,15 +45,15 @@ interactions:
       - text/event-stream
     status: 200 OK
     code: 200
-    duration: 824.312625ms
+    duration: 249.539125ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 44143
+    content_length: 44562
     host: ""

internal/agent/testdata/TestCoderAgent/zai-glm4.6/bash_tool.yaml πŸ”—

@@ -24,19 +24,21 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"20251029042638a2c68683068a4b3b","created":1761683198,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"\n"}}]}
+      data: {"id":"20251029200356894bd1a4c4464c46","created":1761739436,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"\n"}}]}
 
-      data: {"id":"20251029042638a2c68683068a4b3b","created":1761683198,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Create"}}]}
+      data: {"id":"20251029200356894bd1a4c4464c46","created":1761739436,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Create"}}]}
 
-      data: {"id":"20251029042638a2c68683068a4b3b","created":1761683198,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" bash"}}]}
+      data: {"id":"20251029200356894bd1a4c4464c46","created":1761739436,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" test"}}]}
 
-      data: {"id":"20251029042638a2c68683068a4b3b","created":1761683198,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" file"}}]}
+      data: {"id":"20251029200356894bd1a4c4464c46","created":1761739436,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":".txt"}}]}
 
-      data: {"id":"20251029042638a2c68683068a4b3b","created":1761683198,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" without"}}]}
+      data: {"id":"20251029200356894bd1a4c4464c46","created":1761739436,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" with"}}]}
 
-      data: {"id":"20251029042638a2c68683068a4b3b","created":1761683198,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" timestamp"}}]}
+      data: {"id":"20251029200356894bd1a4c4464c46","created":1761739436,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" hello"}}]}
 
-      data: {"id":"20251029042638a2c68683068a4b3b","created":1761683198,"model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":140,"completion_tokens":9,"total_tokens":149,"prompt_tokens_details":{"cached_tokens":4}}}
+      data: {"id":"20251029200356894bd1a4c4464c46","created":1761739436,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" bash"}}]}
+
+      data: {"id":"20251029200356894bd1a4c4464c46","created":1761739436,"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":21}}}
 
       data: [DONE]
 
@@ -45,15 +47,15 @@ interactions:
       - text/event-stream;charset=UTF-8
     status: 200 OK
     code: 200
-    duration: 2.088014083s
+    duration: 740.930958ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 44004
+    content_length: 44423
     host: ""

internal/agent/testdata/TestCoderAgent/zai-glm4.6/download_tool.yaml πŸ”—

@@ -24,17 +24,19 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"202510290445484b084f61821f417c","created":1761684348,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"\n"}}]}
+      data: {"id":"2025102920040009471dbb3c37434e","created":1761739440,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"\n"}}]}
 
-      data: {"id":"202510290445484b084f61821f417c","created":1761684348,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Download"}}]}
+      data: {"id":"2025102920040009471dbb3c37434e","created":1761739440,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Download"}}]}
 
-      data: {"id":"202510290445484b084f61821f417c","created":1761684348,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" file"}}]}
+      data: {"id":"2025102920040009471dbb3c37434e","created":1761739440,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" example"}}]}
 
-      data: {"id":"202510290445484b084f61821f417c","created":1761684348,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" example"}}]}
+      data: {"id":"2025102920040009471dbb3c37434e","created":1761739440,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":".txt"}}]}
 
-      data: {"id":"202510290445484b084f61821f417c","created":1761684348,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":".txt"}}]}
+      data: {"id":"2025102920040009471dbb3c37434e","created":1761739440,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" from"}}]}
 
-      data: {"id":"202510290445484b084f61821f417c","created":1761684348,"model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":143,"completion_tokens":8,"total_tokens":151,"prompt_tokens_details":{"cached_tokens":4}}}
+      data: {"id":"2025102920040009471dbb3c37434e","created":1761739440,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" URL"}}]}
+
+      data: {"id":"2025102920040009471dbb3c37434e","created":1761739440,"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]
 
@@ -43,15 +45,15 @@ interactions:
       - text/event-stream;charset=UTF-8
     status: 200 OK
     code: 200
-    duration: 2.283956959s
+    duration: 743.129ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 44029
+    content_length: 44448
     host: ""

internal/agent/testdata/TestCoderAgent/zai-glm4.6/fetch_tool.yaml πŸ”—

@@ -24,23 +24,17 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"20251029040934fc9dcd0e9d084bd4","created":1761682174,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"\n"}}]}
+      data: {"id":"202510292004033e9a51a671454592","created":1761739443,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"\n"}}]}
 
-      data: {"id":"20251029040934fc9dcd0e9d084bd4","created":1761682174,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Check"}}]}
+      data: {"id":"202510292004033e9a51a671454592","created":1761739443,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Check"}}]}
 
-      data: {"id":"20251029040934fc9dcd0e9d084bd4","created":1761682174,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" HTML"}}]}
+      data: {"id":"202510292004033e9a51a671454592","created":1761739443,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" HTML"}}]}
 
-      data: {"id":"20251029040934fc9dcd0e9d084bd4","created":1761682174,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" for"}}]}
+      data: {"id":"202510292004033e9a51a671454592","created":1761739443,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" for"}}]}
 
-      data: {"id":"20251029040934fc9dcd0e9d084bd4","created":1761682174,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" '"}}]}
+      data: {"id":"202510292004033e9a51a671454592","created":1761739443,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" John Doe"}}]}
 
-      data: {"id":"20251029040934fc9dcd0e9d084bd4","created":1761682174,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"John"}}]}
-
-      data: {"id":"20251029040934fc9dcd0e9d084bd4","created":1761682174,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" Doe"}}]}
-
-      data: {"id":"20251029040934fc9dcd0e9d084bd4","created":1761682174,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"'"}}]}
-
-      data: {"id":"20251029040934fc9dcd0e9d084bd4","created":1761682174,"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":"202510292004033e9a51a671454592","created":1761739443,"model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":148,"completion_tokens":9,"total_tokens":157,"prompt_tokens_details":{"cached_tokens":4}}}
 
       data: [DONE]
 
@@ -49,15 +43,15 @@ interactions:
       - text/event-stream;charset=UTF-8
     status: 200 OK
     code: 200
-    duration: 1.106568667s
+    duration: 792.712834ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 44047
+    content_length: 44466
     host: ""

internal/agent/testdata/TestCoderAgent/zai-glm4.6/glob_tool.yaml πŸ”—

@@ -24,23 +24,21 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"20251029040937cd04c81a23504486","created":1761682178,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"\n"}}]}
+      data: {"id":"20251029200411fd81181f53354f03","created":1761739451,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"\n"}}]}
 
-      data: {"id":"20251029040937cd04c81a23504486","created":1761682178,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Find"}}]}
+      data: {"id":"20251029200411fd81181f53354f03","created":1761739451,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Find"}}]}
 
-      data: {"id":"20251029040937cd04c81a23504486","created":1761682178,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" all"}}]}
+      data: {"id":"20251029200411fd81181f53354f03","created":1761739451,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" all"}}]}
 
-      data: {"id":"20251029040937cd04c81a23504486","created":1761682178,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" ."}}]}
+      data: {"id":"20251029200411fd81181f53354f03","created":1761739451,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" Go"}}]}
 
-      data: {"id":"20251029040937cd04c81a23504486","created":1761682178,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"go"}}]}
+      data: {"id":"20251029200411fd81181f53354f03","created":1761739451,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" files"}}]}
 
-      data: {"id":"20251029040937cd04c81a23504486","created":1761682178,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" files"}}]}
+      data: {"id":"20251029200411fd81181f53354f03","created":1761739451,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" with"}}]}
 
-      data: {"id":"20251029040937cd04c81a23504486","created":1761682178,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" with"}}]}
+      data: {"id":"20251029200411fd81181f53354f03","created":1761739451,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" glob"}}]}
 
-      data: {"id":"20251029040937cd04c81a23504486","created":1761682178,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" glob"}}]}
-
-      data: {"id":"20251029040937cd04c81a23504486","created":1761682178,"model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":132,"completion_tokens":11,"total_tokens":143,"prompt_tokens_details":{"cached_tokens":114}}}
+      data: {"id":"20251029200411fd81181f53354f03","created":1761739451,"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]
 
@@ -49,15 +47,15 @@ interactions:
       - text/event-stream;charset=UTF-8
     status: 200 OK
     code: 200
-    duration: 666.317458ms
+    duration: 846.707459ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 43965
+    content_length: 44384
     host: ""

internal/agent/testdata/TestCoderAgent/zai-glm4.6/grep_tool.yaml πŸ”—

@@ -24,23 +24,17 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"202510290413195778ff6437db499f","created":1761682399,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"\n"}}]}
+      data: {"id":"20251029200416d739eb7454db496d","created":1761739456,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"\n"}}]}
 
-      data: {"id":"202510290413195778ff6437db499f","created":1761682399,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"G"}}]}
+      data: {"id":"20251029200416d739eb7454db496d","created":1761739456,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"grep"}}]}
 
-      data: {"id":"202510290413195778ff6437db499f","created":1761682399,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"rep"}}]}
+      data: {"id":"20251029200416d739eb7454db496d","created":1761739456,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" package"}}]}
 
-      data: {"id":"202510290413195778ff6437db499f","created":1761682399,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" for"}}]}
+      data: {"id":"20251029200416d739eb7454db496d","created":1761739456,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" go"}}]}
 
-      data: {"id":"202510290413195778ff6437db499f","created":1761682399,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" package"}}]}
+      data: {"id":"20251029200416d739eb7454db496d","created":1761739456,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" files"}}]}
 
-      data: {"id":"202510290413195778ff6437db499f","created":1761682399,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" in"}}]}
-
-      data: {"id":"202510290413195778ff6437db499f","created":1761682399,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" Go"}}]}
-
-      data: {"id":"202510290413195778ff6437db499f","created":1761682399,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" files"}}]}
-
-      data: {"id":"202510290413195778ff6437db499f","created":1761682399,"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":"20251029200416d739eb7454db496d","created":1761739456,"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":114}}}
 
       data: [DONE]
 
@@ -49,15 +43,15 @@ interactions:
       - text/event-stream;charset=UTF-8
     status: 200 OK
     code: 200
-    duration: 2.113607708s
+    duration: 1.200410625s
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 43963
+    content_length: 44382
     host: ""

internal/agent/testdata/TestCoderAgent/zai-glm4.6/ls_tool.yaml πŸ”—

@@ -24,19 +24,19 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"20251029040944a71b1eb513d74ad2","created":1761682184,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"\n"}}]}
+      data: {"id":"2025102920042291a8037739ca4770","created":1761739462,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"\n"}}]}
 
-      data: {"id":"20251029040944a71b1eb513d74ad2","created":1761682184,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"List"}}]}
+      data: {"id":"2025102920042291a8037739ca4770","created":1761739462,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"List"}}]}
 
-      data: {"id":"20251029040944a71b1eb513d74ad2","created":1761682184,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" files"}}]}
+      data: {"id":"2025102920042291a8037739ca4770","created":1761739462,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" files"}}]}
 
-      data: {"id":"20251029040944a71b1eb513d74ad2","created":1761682184,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" with"}}]}
+      data: {"id":"2025102920042291a8037739ca4770","created":1761739462,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" with"}}]}
 
-      data: {"id":"20251029040944a71b1eb513d74ad2","created":1761682184,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" ls"}}]}
+      data: {"id":"2025102920042291a8037739ca4770","created":1761739462,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" ls"}}]}
 
-      data: {"id":"20251029040944a71b1eb513d74ad2","created":1761682184,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" command"}}]}
+      data: {"id":"2025102920042291a8037739ca4770","created":1761739462,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" command"}}]}
 
-      data: {"id":"20251029040944a71b1eb513d74ad2","created":1761682184,"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":"2025102920042291a8037739ca4770","created":1761739462,"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: [DONE]
 
@@ -45,15 +45,15 @@ interactions:
       - text/event-stream;charset=UTF-8
     status: 200 OK
     code: 200
-    duration: 676.153208ms
+    duration: 741.087417ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 43957
+    content_length: 44376
     host: ""

internal/agent/testdata/TestCoderAgent/zai-glm4.6/multiedit_tool.yaml πŸ”—

@@ -24,21 +24,25 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"202510290409463baf4757f0a7436b","created":1761682186,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"\n"}}]}
+      data: {"id":"202510292004259eac19652f9f410e","created":1761739465,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"\n"}}]}
 
-      data: {"id":"202510290409463baf4757f0a7436b","created":1761682186,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Mult"}}]}
+      data: {"id":"202510292004259eac19652f9f410e","created":1761739465,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Mult"}}]}
 
-      data: {"id":"202510290409463baf4757f0a7436b","created":1761682186,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"ied"}}]}
+      data: {"id":"202510292004259eac19652f9f410e","created":1761739465,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"ied"}}]}
 
-      data: {"id":"202510290409463baf4757f0a7436b","created":1761682186,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"it"}}]}
+      data: {"id":"202510292004259eac19652f9f410e","created":1761739465,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"it"}}]}
 
-      data: {"id":"202510290409463baf4757f0a7436b","created":1761682186,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" Go"}}]}
+      data: {"id":"202510292004259eac19652f9f410e","created":1761739465,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" main"}}]}
 
-      data: {"id":"202510290409463baf4757f0a7436b","created":1761682186,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" Code"}}]}
+      data: {"id":"202510292004259eac19652f9f410e","created":1761739465,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":".go"}}]}
 
-      data: {"id":"202510290409463baf4757f0a7436b","created":1761682186,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" Modification"}}]}
+      data: {"id":"202510292004259eac19652f9f410e","created":1761739465,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" changes"}}]}
 
-      data: {"id":"202510290409463baf4757f0a7436b","created":1761682186,"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":4}}}
+      data: {"id":"202510292004259eac19652f9f410e","created":1761739465,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" and"}}]}
+
+      data: {"id":"202510292004259eac19652f9f410e","created":1761739465,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" comment"}}]}
+
+      data: {"id":"202510292004259eac19652f9f410e","created":1761739465,"model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":153,"completion_tokens":12,"total_tokens":165,"prompt_tokens_details":{"cached_tokens":114}}}
 
       data: [DONE]
 
@@ -47,15 +51,15 @@ interactions:
       - text/event-stream;charset=UTF-8
     status: 200 OK
     code: 200
-    duration: 669.678208ms
+    duration: 663.65375ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 44043
+    content_length: 44462
     host: ""

internal/agent/testdata/TestCoderAgent/zai-glm4.6/parallel_tool_calls.yaml πŸ”—

@@ -6,9 +6,9 @@ interactions:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 797
+    content_length: 44473
     host: ""
-    body: '{"messages":[{"content":"you will generate a short title based on the first message a user begins a conversation with\n\n<rules>\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</rules>\n\n /no_think","role":"system"},{"content":"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 <think>\n\n</think>","role":"user"}],"model":"glm-4.5-air","max_tokens":40,"stream_options":{"include_usage":true},"stream":true}'

internal/agent/testdata/TestCoderAgent/zai-glm4.6/simple_test.yaml πŸ”—

@@ -24,11 +24,13 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"20251029040845da47b998896542f4","created":1761682125,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"\n"}}]}
+      data: {"id":"202510292003376739b0e60ce941f9","created":1761739417,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"\n"}}]}
 
-      data: {"id":"20251029040845da47b998896542f4","created":1761682125,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Hello"}}]}
+      data: {"id":"202510292003376739b0e60ce941f9","created":1761739417,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"G"}}]}
 
-      data: {"id":"20251029040845da47b998896542f4","created":1761682125,"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":114}}}
+      data: {"id":"202510292003376739b0e60ce941f9","created":1761739417,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"reeting"}}]}
+
+      data: {"id":"202510292003376739b0e60ce941f9","created":1761739417,"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: 2.278464958s
+    duration: 2.487319667s
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 43917
+    content_length: 44336
     host: ""

internal/agent/testdata/TestCoderAgent/zai-glm4.6/sourcegraph_tool.yaml πŸ”—

@@ -24,21 +24,21 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"202510290409524ac5def0af464bc4","created":1761682193,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"\n"}}]}
+      data: {"id":"20251029200447164db4e5a2864767","created":1761739487,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"\n"}}]}
 
-      data: {"id":"202510290409524ac5def0af464bc4","created":1761682193,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Searching"}}]}
+      data: {"id":"20251029200447164db4e5a2864767","created":1761739487,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Search"}}]}
 
-      data: {"id":"202510290409524ac5def0af464bc4","created":1761682193,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" Go"}}]}
+      data: {"id":"20251029200447164db4e5a2864767","created":1761739487,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" for"}}]}
 
-      data: {"id":"202510290409524ac5def0af464bc4","created":1761682193,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" code"}}]}
+      data: {"id":"20251029200447164db4e5a2864767","created":1761739487,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" func"}}]}
 
-      data: {"id":"202510290409524ac5def0af464bc4","created":1761682193,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" with"}}]}
+      data: {"id":"20251029200447164db4e5a2864767","created":1761739487,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" main"}}]}
 
-      data: {"id":"202510290409524ac5def0af464bc4","created":1761682193,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" Source"}}]}
+      data: {"id":"20251029200447164db4e5a2864767","created":1761739487,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" in"}}]}
 
-      data: {"id":"202510290409524ac5def0af464bc4","created":1761682193,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"graph"}}]}
+      data: {"id":"20251029200447164db4e5a2864767","created":1761739487,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" Go"}}]}
 
-      data: {"id":"202510290409524ac5def0af464bc4","created":1761682193,"model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":133,"completion_tokens":10,"total_tokens":143,"prompt_tokens_details":{"cached_tokens":4}}}
+      data: {"id":"20251029200447164db4e5a2864767","created":1761739487,"model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":133,"completion_tokens":10,"total_tokens":143,"prompt_tokens_details":{"cached_tokens":115}}}
 
       data: [DONE]
 
@@ -47,15 +47,15 @@ interactions:
       - text/event-stream;charset=UTF-8
     status: 200 OK
     code: 200
-    duration: 651.244208ms
+    duration: 756.125875ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 43977
+    content_length: 44396
     host: ""

internal/agent/testdata/TestCoderAgent/zai-glm4.6/update_a_file.yaml πŸ”—

@@ -24,19 +24,23 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"202510290409211c3e7a5180404c72","created":1761682161,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"\n"}}]}
+      data: {"id":"202510292003484ef425e7627b4601","created":1761739428,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"\n"}}]}
 
-      data: {"id":"202510290409211c3e7a5180404c72","created":1761682161,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Update"}}]}
+      data: {"id":"202510292003484ef425e7627b4601","created":1761739428,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Update"}}]}
 
-      data: {"id":"202510290409211c3e7a5180404c72","created":1761682161,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" main"}}]}
+      data: {"id":"202510292003484ef425e7627b4601","created":1761739428,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" main"}}]}
 
-      data: {"id":"202510290409211c3e7a5180404c72","created":1761682161,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":".go"}}]}
+      data: {"id":"202510292003484ef425e7627b4601","created":1761739428,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":".go"}}]}
 
-      data: {"id":"202510290409211c3e7a5180404c72","created":1761682161,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" print"}}]}
+      data: {"id":"202510292003484ef425e7627b4601","created":1761739428,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" with"}}]}
 
-      data: {"id":"202510290409211c3e7a5180404c72","created":1761682161,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" message"}}]}
+      data: {"id":"202510292003484ef425e7627b4601","created":1761739428,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" crush"}}]}
 
-      data: {"id":"202510290409211c3e7a5180404c72","created":1761682161,"model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":134,"completion_tokens":9,"total_tokens":143,"prompt_tokens_details":{"cached_tokens":4}}}
+      data: {"id":"202510292003484ef425e7627b4601","created":1761739428,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" hello"}}]}
+
+      data: {"id":"202510292003484ef425e7627b4601","created":1761739428,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" message"}}]}
+
+      data: {"id":"202510292003484ef425e7627b4601","created":1761739428,"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":4}}}
 
       data: [DONE]
 
@@ -45,15 +49,15 @@ interactions:
       - text/event-stream;charset=UTF-8
     status: 200 OK
     code: 200
-    duration: 651.769584ms
+    duration: 626.21525ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 43983
+    content_length: 44402
     host: ""

internal/agent/testdata/TestCoderAgent/zai-glm4.6/write_tool.yaml πŸ”—

@@ -24,21 +24,21 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"20251029040956e75079d164ca44d0","created":1761682196,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"\n"}}]}
+      data: {"id":"202510292004575c0d2dedae6b4990","created":1761739497,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"\n"}}]}
 
-      data: {"id":"20251029040956e75079d164ca44d0","created":1761682196,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Create"}}]}
+      data: {"id":"202510292004575c0d2dedae6b4990","created":1761739497,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Create"}}]}
 
-      data: {"id":"20251029040956e75079d164ca44d0","created":1761682196,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" config"}}]}
+      data: {"id":"202510292004575c0d2dedae6b4990","created":1761739497,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" config"}}]}
 
-      data: {"id":"20251029040956e75079d164ca44d0","created":1761682196,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":".json"}}]}
+      data: {"id":"202510292004575c0d2dedae6b4990","created":1761739497,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":".json"}}]}
 
-      data: {"id":"20251029040956e75079d164ca44d0","created":1761682196,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" with"}}]}
+      data: {"id":"202510292004575c0d2dedae6b4990","created":1761739497,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" with"}}]}
 
-      data: {"id":"20251029040956e75079d164ca44d0","created":1761682196,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" JSON"}}]}
+      data: {"id":"202510292004575c0d2dedae6b4990","created":1761739497,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" write"}}]}
 
-      data: {"id":"20251029040956e75079d164ca44d0","created":1761682196,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" content"}}]}
+      data: {"id":"202510292004575c0d2dedae6b4990","created":1761739497,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" command"}}]}
 
-      data: {"id":"20251029040956e75079d164ca44d0","created":1761682196,"model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":148,"completion_tokens":10,"total_tokens":158,"prompt_tokens_details":{"cached_tokens":115}}}
+      data: {"id":"202510292004575c0d2dedae6b4990","created":1761739497,"model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":148,"completion_tokens":10,"total_tokens":158,"prompt_tokens_details":{"cached_tokens":115}}}
 
       data: [DONE]
 
@@ -47,15 +47,15 @@ interactions:
       - text/event-stream;charset=UTF-8
     status: 200 OK
     code: 200
-    duration: 619.585583ms
+    duration: 738.070334ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 44020
+    content_length: 44439
     host: ""

internal/agent/tools/multiedit.go πŸ”—

@@ -37,12 +37,19 @@ type MultiEditPermissionsParams struct {
 	NewContent string `json:"new_content,omitempty"`
 }
 
+type FailedEdit struct {
+	Index int                `json:"index"`
+	Error string             `json:"error"`
+	Edit  MultiEditOperation `json:"edit"`
+}
+
 type MultiEditResponseMetadata struct {
-	Additions    int    `json:"additions"`
-	Removals     int    `json:"removals"`
-	OldContent   string `json:"old_content,omitempty"`
-	NewContent   string `json:"new_content,omitempty"`
-	EditsApplied int    `json:"edits_applied"`
+	Additions    int          `json:"additions"`
+	Removals     int          `json:"removals"`
+	OldContent   string       `json:"old_content,omitempty"`
+	NewContent   string       `json:"new_content,omitempty"`
+	EditsApplied int          `json:"edits_applied"`
+	EditsFailed  []FailedEdit `json:"edits_failed,omitempty"`
 }
 
 const MultiEditToolName = "multiedit"
@@ -102,9 +109,6 @@ func NewMultiEditTool(lspClients *csync.Map[string, *lsp.Client], permissions pe
 
 func validateEdits(edits []MultiEditOperation) error {
 	for i, edit := range edits {
-		if edit.OldString == edit.NewString {
-			return fmt.Errorf("edit %d: old_string and new_string are identical", i+1)
-		}
 		// Only the first edit can have empty old_string (for file creation)
 		if i > 0 && edit.OldString == "" {
 			return fmt.Errorf("edit %d: only the first edit can have empty old_string (for file creation)", i+1)
@@ -136,12 +140,18 @@ func processMultiEditWithCreation(edit editContext, params MultiEditParams, call
 	// Start with the content from the first edit
 	currentContent := firstEdit.NewString
 
-	// Apply remaining edits to the content
+	// Apply remaining edits to the content, tracking failures
+	var failedEdits []FailedEdit
 	for i := 1; i < len(params.Edits); i++ {
 		edit := params.Edits[i]
 		newContent, err := applyEditToContent(currentContent, edit)
 		if err != nil {
-			return fantasy.NewTextErrorResponse(fmt.Sprintf("edit %d failed: %s", i+1, err.Error())), nil
+			failedEdits = append(failedEdits, FailedEdit{
+				Index: i + 1,
+				Error: err.Error(),
+				Edit:  edit,
+			})
+			continue
 		}
 		currentContent = newContent
 	}
@@ -192,14 +202,23 @@ func processMultiEditWithCreation(edit editContext, params MultiEditParams, call
 	recordFileWrite(params.FilePath)
 	recordFileRead(params.FilePath)
 
+	editsApplied := len(params.Edits) - len(failedEdits)
+	var message string
+	if len(failedEdits) > 0 {
+		message = fmt.Sprintf("File created with %d of %d edits: %s (%d edit(s) failed)", editsApplied, len(params.Edits), params.FilePath, len(failedEdits))
+	} else {
+		message = fmt.Sprintf("File created with %d edits: %s", len(params.Edits), params.FilePath)
+	}
+
 	return fantasy.WithResponseMetadata(
-		fantasy.NewTextResponse(fmt.Sprintf("File created with %d edits: %s", len(params.Edits), params.FilePath)),
+		fantasy.NewTextResponse(message),
 		MultiEditResponseMetadata{
 			OldContent:   "",
 			NewContent:   currentContent,
 			Additions:    additions,
 			Removals:     removals,
-			EditsApplied: len(params.Edits),
+			EditsApplied: editsApplied,
+			EditsFailed:  failedEdits,
 		},
 	), nil
 }
@@ -242,17 +261,33 @@ func processMultiEditExistingFile(edit editContext, params MultiEditParams, call
 	oldContent, isCrlf := fsext.ToUnixLineEndings(string(content))
 	currentContent := oldContent
 
-	// Apply all edits sequentially
+	// Apply all edits sequentially, tracking failures
+	var failedEdits []FailedEdit
 	for i, edit := range params.Edits {
 		newContent, err := applyEditToContent(currentContent, edit)
 		if err != nil {
-			return fantasy.NewTextErrorResponse(fmt.Sprintf("edit %d failed: %s", i+1, err.Error())), nil
+			failedEdits = append(failedEdits, FailedEdit{
+				Index: i + 1,
+				Error: err.Error(),
+				Edit:  edit,
+			})
+			continue
 		}
 		currentContent = newContent
 	}
 
 	// Check if content actually changed
 	if oldContent == currentContent {
+		// If we have failed edits, report them
+		if len(failedEdits) > 0 {
+			return fantasy.WithResponseMetadata(
+				fantasy.NewTextErrorResponse(fmt.Sprintf("no changes made - all %d edit(s) failed", len(failedEdits))),
+				MultiEditResponseMetadata{
+					EditsApplied: 0,
+					EditsFailed:  failedEdits,
+				},
+			), nil
+		}
 		return fantasy.NewTextErrorResponse("no changes made - all edits resulted in identical content"), nil
 	}
 
@@ -316,14 +351,23 @@ func processMultiEditExistingFile(edit editContext, params MultiEditParams, call
 	recordFileWrite(params.FilePath)
 	recordFileRead(params.FilePath)
 
+	editsApplied := len(params.Edits) - len(failedEdits)
+	var message string
+	if len(failedEdits) > 0 {
+		message = fmt.Sprintf("Applied %d of %d edits to file: %s (%d edit(s) failed)", editsApplied, len(params.Edits), params.FilePath, len(failedEdits))
+	} else {
+		message = fmt.Sprintf("Applied %d edits to file: %s", len(params.Edits), params.FilePath)
+	}
+
 	return fantasy.WithResponseMetadata(
-		fantasy.NewTextResponse(fmt.Sprintf("Applied %d edits to file: %s", len(params.Edits), params.FilePath)),
+		fantasy.NewTextResponse(message),
 		MultiEditResponseMetadata{
 			OldContent:   oldContent,
 			NewContent:   currentContent,
 			Additions:    additions,
 			Removals:     removals,
-			EditsApplied: len(params.Edits),
+			EditsApplied: editsApplied,
+			EditsFailed:  failedEdits,
 		},
 	), nil
 }

internal/agent/tools/multiedit.md πŸ”—

@@ -17,7 +17,8 @@ Makes multiple edits to a single file in one operation. Built on Edit tool for e
 <operation>
 - Edits applied sequentially in provided order.
 - Each edit operates on result of previous edit.
-- ATOMIC: If any single edit fails, the entire operation fails and no changes are applied.
+- PARTIAL SUCCESS: If some edits fail, successful edits are still applied. Failed edits are returned in the response.
+- File is modified if at least one edit succeeds.
 - Ideal for several changes to different parts of same file.
 </operation>
 
@@ -31,9 +32,10 @@ Use the same level of precision as Edit. Multiedit often fails due to formatting
 
 <critical_requirements>
 1. Apply Edit tool rules to EACH edit (see edit.md).
-2. Edits are atomicβ€”either all succeed or none are applied.
+2. Edits are applied in order; successful edits are kept even if later edits fail.
 3. Plan sequence carefully: earlier edits change the file content that later edits must match.
 4. Ensure each old_string is unique at its application time (after prior edits).
+5. Check the response for failed edits and retry them if needed.
 </critical_requirements>
 
 <verification_before_using>
@@ -45,26 +47,27 @@ Use the same level of precision as Edit. Multiedit often fails due to formatting
 </verification_before_using>
 
 <warnings>
-- Operation fails if any old_string doesn’t match exactly (including whitespace) or equals new_string.
+- Operation continues even if some edits fail; check response for failed edits.
 - Earlier edits can invalidate later matches (added/removed spaces, lines, or reordered text).
 - Mixed tabs/spaces, trailing spaces, or missing blank lines commonly cause failures.
 - replace_all may affect unintended regionsβ€”use carefully or provide more context.
 </warnings>
 
 <recovery_steps>
-If the operation fails:
-1. Identify the first failing edit (start from top; test subsets to isolate).
-2. View the file again and copy more surrounding context for that edit.
-3. Recalculate later old_string values based on the file state AFTER preceding edits.
-4. Reduce the batch (apply earlier stable edits first), then follow up with the rest.
+If some edits fail:
+1. Check the response metadata for the list of failed edits with their error messages.
+2. View the file again to see the current state after successful edits.
+3. Adjust the failed edits based on the new file content.
+4. Retry the failed edits with corrected old_string values.
+5. Consider breaking complex batches into smaller, independent operations.
 </recovery_steps>
 
 <best_practices>
-- Ensure all edits result in correct, idiomatic code; don’t leave code broken.
+- Ensure all edits result in correct, idiomatic code; don't leave code broken.
 - Use absolute file paths (starting with /).
-- Use replace_all only when you’re certain; otherwise provide unique context.
+- Use replace_all only when you're certain; otherwise provide unique context.
 - Match existing style exactly (spaces, tabs, blank lines).
-- Test after the operation; if it fails, fix and retry in smaller chunks.
+- Review failed edits in the response and retry with corrections.
 </best_practices>
 
 <whitespace_checklist>
@@ -109,4 +112,14 @@ edits: [
   },
 ]
 ```
+
+βœ… Correct: Handling partial success
+
+```
+// If edit 2 fails, edit 1 is still applied
+// Response will indicate:
+// - edits_applied: 1
+// - edits_failed: [{index: 2, error: "...", edit: {...}}]
+// You can then retry edit 2 with corrected context
+```
 </examples>

internal/agent/tools/multiedit_test.go πŸ”—

@@ -0,0 +1,225 @@
+package tools
+
+import (
+	"context"
+	"os"
+	"path/filepath"
+	"testing"
+
+	"github.com/charmbracelet/crush/internal/csync"
+	"github.com/charmbracelet/crush/internal/history"
+	"github.com/charmbracelet/crush/internal/lsp"
+	"github.com/charmbracelet/crush/internal/permission"
+	"github.com/charmbracelet/crush/internal/pubsub"
+	"github.com/stretchr/testify/require"
+)
+
+type mockPermissionService struct {
+	*pubsub.Broker[permission.PermissionRequest]
+}
+
+func (m *mockPermissionService) Request(req permission.CreatePermissionRequest) bool {
+	return true
+}
+
+func (m *mockPermissionService) Grant(req permission.PermissionRequest) {}
+
+func (m *mockPermissionService) Deny(req permission.PermissionRequest) {}
+
+func (m *mockPermissionService) GrantPersistent(req permission.PermissionRequest) {}
+
+func (m *mockPermissionService) AutoApproveSession(sessionID string) {}
+
+func (m *mockPermissionService) SetSkipRequests(skip bool) {}
+
+func (m *mockPermissionService) SkipRequests() bool {
+	return false
+}
+
+func (m *mockPermissionService) SubscribeNotifications(ctx context.Context) <-chan pubsub.Event[permission.PermissionNotification] {
+	return make(<-chan pubsub.Event[permission.PermissionNotification])
+}
+
+type mockHistoryService struct {
+	*pubsub.Broker[history.File]
+}
+
+func (m *mockHistoryService) Create(ctx context.Context, sessionID, path, content string) (history.File, error) {
+	return history.File{Path: path, Content: content}, nil
+}
+
+func (m *mockHistoryService) CreateVersion(ctx context.Context, sessionID, path, content string) (history.File, error) {
+	return history.File{}, nil
+}
+
+func (m *mockHistoryService) GetByPathAndSession(ctx context.Context, path, sessionID string) (history.File, error) {
+	return history.File{Path: path, Content: ""}, nil
+}
+
+func (m *mockHistoryService) Get(ctx context.Context, id string) (history.File, error) {
+	return history.File{}, nil
+}
+
+func (m *mockHistoryService) ListBySession(ctx context.Context, sessionID string) ([]history.File, error) {
+	return nil, nil
+}
+
+func (m *mockHistoryService) ListLatestSessionFiles(ctx context.Context, sessionID string) ([]history.File, error) {
+	return nil, nil
+}
+
+func (m *mockHistoryService) Delete(ctx context.Context, id string) error {
+	return nil
+}
+
+func (m *mockHistoryService) DeleteSessionFiles(ctx context.Context, sessionID string) error {
+	return nil
+}
+
+func TestApplyEditToContentPartialSuccess(t *testing.T) {
+	t.Parallel()
+
+	content := "line 1\nline 2\nline 3\n"
+
+	// Test successful edit.
+	newContent, err := applyEditToContent(content, MultiEditOperation{
+		OldString: "line 1",
+		NewString: "LINE 1",
+	})
+	require.NoError(t, err)
+	require.Contains(t, newContent, "LINE 1")
+	require.Contains(t, newContent, "line 2")
+
+	// Test failed edit (string not found).
+	_, err = applyEditToContent(content, MultiEditOperation{
+		OldString: "line 99",
+		NewString: "LINE 99",
+	})
+	require.Error(t, err)
+	require.Contains(t, err.Error(), "not found")
+}
+
+func TestMultiEditSequentialApplication(t *testing.T) {
+	t.Parallel()
+
+	tmpDir := t.TempDir()
+	testFile := filepath.Join(tmpDir, "test.txt")
+
+	// Create test file.
+	content := "line 1\nline 2\nline 3\nline 4\n"
+	err := os.WriteFile(testFile, []byte(content), 0o644)
+	require.NoError(t, err)
+
+	// Mock components.
+	lspClients := csync.NewMap[string, *lsp.Client]()
+	permissions := &mockPermissionService{Broker: pubsub.NewBroker[permission.PermissionRequest]()}
+	files := &mockHistoryService{Broker: pubsub.NewBroker[history.File]()}
+
+	// Create multiedit tool.
+	_ = NewMultiEditTool(lspClients, permissions, files, tmpDir)
+
+	// Simulate reading the file first.
+	recordFileRead(testFile)
+
+	// Manually test the sequential application logic.
+	currentContent := content
+
+	// Apply edits sequentially, tracking failures.
+	edits := []MultiEditOperation{
+		{OldString: "line 1", NewString: "LINE 1"},   // Should succeed
+		{OldString: "line 99", NewString: "LINE 99"}, // Should fail - doesn't exist
+		{OldString: "line 3", NewString: "LINE 3"},   // Should succeed
+		{OldString: "line 2", NewString: "LINE 2"},   // Should succeed - still exists
+	}
+
+	var failedEdits []FailedEdit
+	successCount := 0
+
+	for i, edit := range edits {
+		newContent, err := applyEditToContent(currentContent, edit)
+		if err != nil {
+			failedEdits = append(failedEdits, FailedEdit{
+				Index: i + 1,
+				Error: err.Error(),
+				Edit:  edit,
+			})
+			continue
+		}
+		currentContent = newContent
+		successCount++
+	}
+
+	// Verify results.
+	require.Equal(t, 3, successCount, "Expected 3 successful edits")
+	require.Len(t, failedEdits, 1, "Expected 1 failed edit")
+
+	// Check failed edit details.
+	require.Equal(t, 2, failedEdits[0].Index)
+	require.Contains(t, failedEdits[0].Error, "not found")
+
+	// Verify content changes.
+	require.Contains(t, currentContent, "LINE 1")
+	require.Contains(t, currentContent, "LINE 2")
+	require.Contains(t, currentContent, "LINE 3")
+	require.Contains(t, currentContent, "line 4") // Original unchanged
+	require.NotContains(t, currentContent, "LINE 99")
+}
+
+func TestMultiEditAllEditsSucceed(t *testing.T) {
+	t.Parallel()
+
+	content := "line 1\nline 2\nline 3\n"
+
+	edits := []MultiEditOperation{
+		{OldString: "line 1", NewString: "LINE 1"},
+		{OldString: "line 2", NewString: "LINE 2"},
+		{OldString: "line 3", NewString: "LINE 3"},
+	}
+
+	currentContent := content
+	successCount := 0
+
+	for _, edit := range edits {
+		newContent, err := applyEditToContent(currentContent, edit)
+		if err != nil {
+			t.Fatalf("Unexpected error: %v", err)
+		}
+		currentContent = newContent
+		successCount++
+	}
+
+	require.Equal(t, 3, successCount)
+	require.Contains(t, currentContent, "LINE 1")
+	require.Contains(t, currentContent, "LINE 2")
+	require.Contains(t, currentContent, "LINE 3")
+}
+
+func TestMultiEditAllEditsFail(t *testing.T) {
+	t.Parallel()
+
+	content := "line 1\nline 2\n"
+
+	edits := []MultiEditOperation{
+		{OldString: "line 99", NewString: "LINE 99"},
+		{OldString: "line 100", NewString: "LINE 100"},
+	}
+
+	currentContent := content
+	var failedEdits []FailedEdit
+
+	for i, edit := range edits {
+		newContent, err := applyEditToContent(currentContent, edit)
+		if err != nil {
+			failedEdits = append(failedEdits, FailedEdit{
+				Index: i + 1,
+				Error: err.Error(),
+				Edit:  edit,
+			})
+			continue
+		}
+		currentContent = newContent
+	}
+
+	require.Len(t, failedEdits, 2)
+	require.Equal(t, content, currentContent, "Content should be unchanged")
+}

internal/tui/components/chat/messages/renderer.go πŸ”—

@@ -364,6 +364,17 @@ func (mer multiEditRenderer) Render(v *toolCallCmp) string {
 				Render(fmt.Sprintf("… (%d lines)", len(contentLines)-responseContextHeight))
 			formatted = strings.Join(contentLines[:responseContextHeight], "\n") + "\n" + truncateMessage
 		}
+
+		// Add failed edits warning if any exist
+		if len(meta.EditsFailed) > 0 {
+			noteTag := t.S().Base.Padding(0, 2).Background(t.Info).Foreground(t.White).Render("Note")
+			noteMsg := fmt.Sprintf("%d of %d edits succeeded", meta.EditsApplied, len(params.Edits))
+			note := t.S().Base.
+				Width(v.textWidth() - 2).
+				Render(fmt.Sprintf("%s %s", noteTag, t.S().Muted.Render(noteMsg)))
+			formatted = lipgloss.JoinVertical(lipgloss.Left, formatted, "", note)
+		}
+
 		return formatted
 	})
 }