chore: merge master

Kujtim Hoxha created

Change summary

internal/agent/common_test.go                                                      |  2 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/bash_tool.yaml             | 23 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/download_tool.yaml         | 22 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/fetch_tool.yaml            | 22 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/glob_tool.yaml             | 18 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/grep_tool.yaml             | 27 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/ls_tool.yaml               | 22 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/multiedit_tool.yaml        | 23 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/parallel_tool_calls.yaml   | 28 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/read_a_file.yaml           | 30 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/simple_test.yaml           | 27 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/sourcegraph_tool.yaml      | 27 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/update_a_file.yaml         | 19 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/write_tool.yaml            | 22 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/bash_tool.yaml                 | 34 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/download_tool.yaml             | 24 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/fetch_tool.yaml                | 34 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/glob_tool.yaml                 | 28 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/grep_tool.yaml                 | 32 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/ls_tool.yaml                   | 30 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/multiedit_tool.yaml            | 30 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/parallel_tool_calls.yaml       | 24 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/read_a_file.yaml               | 18 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/simple_test.yaml               | 20 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/sourcegraph_tool.yaml          | 36 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/update_a_file.yaml             | 24 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/write_tool.yaml                | 26 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/bash_tool.yaml           | 20 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/download_tool.yaml       | 18 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/fetch_tool.yaml          |  6 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/glob_tool.yaml           |  3 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/grep_tool.yaml           | 26 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/ls_tool.yaml             | 26 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/multiedit_tool.yaml      | 36 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/parallel_tool_calls.yaml |  3 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/read_a_file.yaml         |  3 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/simple_test.yaml         |  3 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/sourcegraph_tool.yaml    | 30 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/update_a_file.yaml       | 18 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/write_tool.yaml          |  3 
internal/agent/tools/ls.go                                                         | 58 
41 files changed, 437 insertions(+), 488 deletions(-)

Detailed changes

internal/agent/common_test.go 🔗

@@ -159,7 +159,7 @@ func coderAgent(r *recorder.Recorder, env env, large, small ai.LanguageModel) (S
 		tools.NewFetchTool(env.permissions, env.workingDir, r.GetDefaultClient()),
 		tools.NewGlobTool(env.workingDir),
 		tools.NewGrepTool(env.workingDir),
-		tools.NewLsTool(env.permissions, env.workingDir),
+		tools.NewLsTool(env.permissions, env.workingDir, cfg.Tools.Ls),
 		tools.NewSourcegraphTool(r.GetDefaultClient()),
 		tools.NewViewTool(env.lspClients, env.permissions, env.workingDir),
 		tools.NewWriteTool(env.lspClients, env.permissions, env.history, env.workingDir),

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

@@ -25,49 +25,52 @@ interactions:
     content_length: -1
     body: |+
       event: message_start
-      data: {"type":"message_start","message":{"id":"msg_01TmVYrcSPfeEpJxXS6bxwbA","type":"message","role":"assistant","model":"claude-3-5-haiku-20241022","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":124,"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":{"id":"msg_01LqaQeaFnWb1d24ZpBd3GDz","type":"message","role":"assistant","model":"claude-3-5-haiku-20241022","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":124,"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":" Comman"}        }
+
+      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           }
 
       event: message_delta
-      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":124,"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":124,"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: 529.228917ms
+    duration: 565.49875ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 31961
+    content_length: 32034
     host: ""

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

@@ -25,52 +25,52 @@ interactions:
     content_length: -1
     body: |+
       event: message_start
-      data: {"type":"message_start","message":{"id":"msg_01U7QrbATa1NWpKKBu2yg92K","type":"message","role":"assistant","model":"claude-3-5-haiku-20241022","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":128,"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":{"id":"msg_01TY7oeeeBKZx8Q3z4Tido4x","type":"message","role":"assistant","model":"claude-3-5-haiku-20241022","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":128,"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":"Downloa"}        }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"d robots"}    }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"d robots"}              }
 
       event: ping
       data: {"type": "ping"}
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":".txt from"} }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":".txt from"}          }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" http"}               }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" http"}}
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"bin.org"}}
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"bin.org"}  }
 
       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":128,"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":128,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":12}       }
 
       event: message_stop
-      data: {"type":"message_stop"              }
+      data: {"type":"message_stop"               }
 
     headers:
       Content-Type:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 671.618084ms
+    duration: 600.751416ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 31978
+    content_length: 32051
     host: ""

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

@@ -25,49 +25,49 @@ interactions:
     content_length: -1
     body: |+
       event: message_start
-      data: {"type":"message_start","message":{"id":"msg_01NtNJUp6S5AoB7jc6EPLen2","type":"message","role":"assistant","model":"claude-3-5-haiku-20241022","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":3,"service_tier":"standard"}}              }
+      data: {"type":"message_start","message":{"id":"msg_01CJaBVohy3QnSt6fTTq13Ye","type":"message","role":"assistant","model":"claude-3-5-haiku-20241022","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":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":"Fetch HTML"}          }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Fetch HTML"}           }
 
       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":" an"} }
 
       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":"d Search"}           }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" for Herman"}            }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" for Herman"}      }
 
       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":10} }
+      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":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: 684.653208ms
+    duration: 613.788916ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 31988
+    content_length: 32061
     host: ""

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

@@ -25,31 +25,31 @@ interactions:
     content_length: -1
     body: |+
       event: message_start
-      data: {"type":"message_start","message":{"id":"msg_01WwaUg4XieW6yqSW7w39k5r","type":"message","role":"assistant","model":"claude-3-5-haiku-20241022","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":119,"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":{"id":"msg_01DfEsKzksKF1iW3v1d8Uz14","type":"message","role":"assistant","model":"claude-3-5-haiku-20241022","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":119,"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":"Finding"}             }
+      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":" 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 glob"}    }
+      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":" 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   }
 
       event: message_delta
-      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":119,"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":119,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":9}          }
 
       event: message_stop
       data: {"type":"message_stop"           }
@@ -59,15 +59,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 590.105791ms
+    duration: 642.710375ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 31950
+    content_length: 32023
     host: ""

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

@@ -25,46 +25,49 @@ interactions:
     content_length: -1
     body: |+
       event: message_start
-      data: {"type":"message_start","message":{"id":"msg_01J38RteGBbXWmXWyG82CoSd","type":"message","role":"assistant","model":"claude-3-5-haiku-20241022","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":121,"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":{"id":"msg_01P5KzdPQFQJt2KXiM1sE2LA","type":"message","role":"assistant","model":"claude-3-5-haiku-20241022","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":121,"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"}}      }
 
       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 Package"}       }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Searching for 'package"}             }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" References"}  }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"' in Go Files"}         }
 
       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    }
+      data: {"type":"content_block_stop","index":0       }
+
+      event: ping
+      data: {"type": "ping"}
+
+      event: ping
+      data: {"type": "ping"}
 
       event: message_delta
-      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":121,"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":121,"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: 606.941292ms
+    duration: 576.391708ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 31948
+    content_length: 32021
     host: ""

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

@@ -25,49 +25,49 @@ interactions:
     content_length: -1
     body: |+
       event: message_start
-      data: {"type":"message_start","message":{"id":"msg_01N9F5dFrZ7hWhfTckebnP44","type":"message","role":"assistant","model":"claude-3-5-haiku-20241022","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":117,"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":{"id":"msg_01QH5MdoAQhjFKPFQT1CiZtv","type":"message","role":"assistant","model":"claude-3-5-haiku-20241022","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":117,"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":"List"}             }
+      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"}  }
+      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"}       }
+      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           }
+      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":117,"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":117,"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: 609.700625ms
+    duration: 525.075666ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 31942
+    content_length: 32015
     host: ""

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

@@ -25,34 +25,31 @@ interactions:
     content_length: -1
     body: |+
       event: message_start
-      data: {"type":"message_start","message":{"id":"msg_01P3otTW8FXT9iiJLzhrDeAS","type":"message","role":"assistant","model":"claude-3-5-haiku-20241022","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":147,"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":{"id":"msg_01CGqRQiPFCQQTcuhN8FBz5T","type":"message","role":"assistant","model":"claude-3-5-haiku-20241022","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":147,"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":" Greeting in"}           }
 
       event: ping
       data: {"type": "ping"}
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" main.go with"}             }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Go"}      }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Mult"}             }
-
-      event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"iedit"}              }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Program"}   }
 
       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":147,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":16}             }
+      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":147,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":9}    }
 
       event: message_stop
       data: {"type":"message_stop"     }
@@ -62,15 +59,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 594.465333ms
+    duration: 586.474166ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 32028
+    content_length: 32101
     host: ""

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

@@ -25,55 +25,49 @@ interactions:
     content_length: -1
     body: |+
       event: message_start
-      data: {"type":"message_start","message":{"id":"msg_01JnpXQC44uuNTzMPLPV1HGC","type":"message","role":"assistant","model":"claude-3-5-haiku-20241022","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":136,"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":{"id":"msg_01AH9XB691MCVFTi88d4ddjW","type":"message","role":"assistant","model":"claude-3-5-haiku-20241022","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":136,"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":" Discovery"}            }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Discovery"}    }
 
       event: content_block_delta
-      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":" Glob and "}              }
-
-      event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"LS"}       }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" and Listing"}}
 
       event: content_block_stop
-      data: {"type":"content_block_stop","index":0       }
+      data: {"type":"content_block_stop","index":0   }
 
       event: message_delta
-      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":136,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":14}     }
+      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":136,"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: 694.903875ms
+    duration: 671.9185ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 32039
+    content_length: 32112
     host: ""

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

@@ -25,55 +25,49 @@ interactions:
     content_length: -1
     body: |+
       event: message_start
-      data: {"type":"message_start","message":{"id":"msg_01DVVALVrbJTryt1J4MjyZ87","type":"message","role":"assistant","model":"claude-3-5-haiku-20241022","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":111,"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":{"id":"msg_012FWBStQwEKSVhBhq9juncH","type":"message","role":"assistant","model":"claude-3-5-haiku-20241022","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":111,"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":"Checking"}          }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Review"}               }
 
       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":" Go"}          }
 
       event: ping
       data: {"type": "ping"}
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Module Dependencies"}             }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Module"}               }
 
-      event: ping
-      data: {"type": "ping"}
+      event: content_block_delta
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Configuration"}             }
 
       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":111,"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":111,"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: 642.18625ms
+    duration: 1.198261875s
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 31912
+    content_length: 31985
     host: ""

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

@@ -25,49 +25,46 @@ interactions:
     content_length: -1
     body: |+
       event: message_start
-      data: {"type":"message_start","message":{"id":"msg_01NPfprSHhMARzbCZRr49Ke8","type":"message","role":"assistant","model":"claude-3-5-haiku-20241022","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":108,"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":{"id":"msg_01CXaxQ4hxLAZTrDjUQFvr14","type":"message","role":"assistant","model":"claude-3-5-haiku-20241022","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":108,"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":"First"}        }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Getting"} }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Chat"}  }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Starte"}      }
 
       event: ping
       data: {"type": "ping"}
 
-      event: content_block_stop
-      data: {"type":"content_block_stop","index":0           }
-
-      event: ping
-      data: {"type": "ping"}
+      event: content_block_delta
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"d"}    }
 
-      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":108,"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":108,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":5}         }
 
       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.459042ms
+    duration: 808.0945ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 31902
+    content_length: 31975
     host: ""

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

@@ -25,52 +25,55 @@ interactions:
     content_length: -1
     body: |+
       event: message_start
-      data: {"type":"message_start","message":{"id":"msg_01QvTXuWQd7x5a1gdsHNdRLc","type":"message","role":"assistant","model":"claude-3-5-haiku-20241022","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":122,"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":{"id":"msg_01NNQSo6XdvUrm9KVjF253LP","type":"message","role":"assistant","model":"claude-3-5-haiku-20241022","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":122,"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":"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":"'func main' 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 repos"}     }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Repos"}               }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" on"}  }
+      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":" Sourcegraph"}     }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Main"}       }
+
+      event: content_block_delta
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Function"}       }
 
       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":122,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":17}               }
+      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":122,"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: 557.6895ms
+    duration: 549.390667ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 31962
+    content_length: 32035
     host: ""

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

@@ -25,28 +25,25 @@ interactions:
     content_length: -1
     body: |+
       event: message_start
-      data: {"type":"message_start","message":{"id":"msg_012U5SVc7ycGJ6g6CTYwMrtc","type":"message","role":"assistant","model":"claude-3-5-haiku-20241022","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":122,"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":{"id":"msg_017ojmccd78pbpdMdsMBsi1Q","type":"message","role":"assistant","model":"claude-3-5-haiku-20241022","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":122,"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":"Update"}            }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Update main"}              }
 
       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":".go print"}       }
 
       event: ping
       data: {"type": "ping"}
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":".go hello"}  }
-
-      event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" print"}            }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" statement"}    }
 
       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":122,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":9}       }
@@ -59,15 +56,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 682.118125ms
+    duration: 645.703916ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 31968
+    content_length: 32041
     host: ""

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

@@ -25,49 +25,49 @@ interactions:
     content_length: -1
     body: |+
       event: message_start
-      data: {"type":"message_start","message":{"id":"msg_014hAw8pARfMkVqmUpoMM5pz","type":"message","role":"assistant","model":"claude-3-5-haiku-20241022","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":138,"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":{"id":"msg_01WCZLh4HmYZpaDXUTzZPzKN","type":"message","role":"assistant","model":"claude-3-5-haiku-20241022","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":138,"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":"Create"}     }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Create"}    }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" config"} }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" config"}       }
 
       event: ping
       data: {"type": "ping"}
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":".json file with JSON"}    }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":".json file with JSON"}           }
 
       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":" content"}     }
 
       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":138,"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":138,"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: 720.809ms
+    duration: 539.216416ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 32005
+    content_length: 32078
     host: ""

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

@@ -24,27 +24,100 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-CLu8QRD1umrue04IcTVqAvUlUT2nV","object":"chat.completion.chunk","created":1759336706,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"JU6dRaODQHfgSE"}
+      data: {"id":"chatcmpl-CLuSgiKkXhyOjDorCUlST2AUWFtQX","object":"chat.completion.chunk","created":1759337962,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"IqF1t260jyfkmS"}
 
-      data: {"id":"chatcmpl-CLu8QRD1umrue04IcTVqAvUlUT2nV","object":"chat.completion.chunk","created":1759336706,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":"Creating"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"NJZxxDLC"}
+      data: {"id":"chatcmpl-CLuSgiKkXhyOjDorCUlST2AUWFtQX","object":"chat.completion.chunk","created":1759337962,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":"Creating"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"UTmSyAyK"}
 
-      data: {"id":"chatcmpl-CLu8QRD1umrue04IcTVqAvUlUT2nV","object":"chat.completion.chunk","created":1759336706,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"0MWUP899YFxaal"}
+      data: {"id":"chatcmpl-CLuSgiKkXhyOjDorCUlST2AUWFtQX","object":"chat.completion.chunk","created":1759337962,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"7bFe3Val0yi424"}
 
-      data: {"id":"chatcmpl-CLu8QRD1umrue04IcTVqAvUlUT2nV","object":"chat.completion.chunk","created":1759336706,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":" File"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"MrNbBcK8cO2"}
+      data: {"id":"chatcmpl-CLuSgiKkXhyOjDorCUlST2AUWFtQX","object":"chat.completion.chunk","created":1759337962,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":" File"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Pa8Dkpe7h0f"}
 
-      data: {"id":"chatcmpl-CLu8QRD1umrue04IcTVqAvUlUT2nV","object":"chat.completion.chunk","created":1759336706,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":" with"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ReIxnmqqltG"}
+      data: {"id":"chatcmpl-CLuSgiKkXhyOjDorCUlST2AUWFtQX","object":"chat.completion.chunk","created":1759337962,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":" with"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"2MaFDarCPOr"}
 
-      data: {"id":"chatcmpl-CLu8QRD1umrue04IcTVqAvUlUT2nV","object":"chat.completion.chunk","created":1759336706,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":" Bash"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"IksZHXvi7T8"}
+      data: {"id":"chatcmpl-CLuSgiKkXhyOjDorCUlST2AUWFtQX","object":"chat.completion.chunk","created":1759337962,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":" Bash"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"jmzcGHDwoBz"}
 
-      data: {"id":"chatcmpl-CLu8QRD1umrue04IcTVqAvUlUT2nV","object":"chat.completion.chunk","created":1759336706,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":" Cont"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"CWPgOeSwYAV"}
+      data: {"id":"chatcmpl-CLuSgiKkXhyOjDorCUlST2AUWFtQX","object":"chat.completion.chunk","created":1759337962,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":" Command"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"QGA5LMno"}
 
-      data: {"id":"chatcmpl-CLu8QRD1umrue04IcTVqAvUlUT2nV","object":"chat.completion.chunk","created":1759336706,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":"aining"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"aZhEYV6FGA"}
+      data: {"id":"chatcmpl-CLuSgiKkXhyOjDorCUlST2AUWFtQX","object":"chat.completion.chunk","created":1759337962,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"x8QZ3ohcfn"}
 
-      data: {"id":"chatcmpl-CLu8QRD1umrue04IcTVqAvUlUT2nV","object":"chat.completion.chunk","created":1759336706,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":" Text"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Y4ZmtaWeeyb"}
+      data: {"id":"chatcmpl-CLuSgiKkXhyOjDorCUlST2AUWFtQX","object":"chat.completion.chunk","created":1759337962,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[],"usage":{"prompt_tokens":123,"completion_tokens":6,"total_tokens":129,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"p0sEbLTxMZ0e2b"}
 
-      data: {"id":"chatcmpl-CLu8QRD1umrue04IcTVqAvUlUT2nV","object":"chat.completion.chunk","created":1759336706,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"6gSj1fd2bg"}
+      data: [DONE]
+
+    headers:
+      Content-Type:
+      - text/event-stream; charset=utf-8
+    status: 200 OK
+    code: 200
+    duration: 1.414818625s
+- id: 1
+  request:
+    proto: HTTP/1.1
+    proto_major: 1
+    proto_minor: 1
+    content_length: 30654
+    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-CLu8fLNREV3nFHUQT1Yo6URgEheKQ","object":"chat.completion.chunk","created":1759336721,"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":"R56sQfdQhlr97L"}
+      data: {"id":"chatcmpl-CLuTQdlXjkMiYRWMf7AHC2GVmn5vg","object":"chat.completion.chunk","created":1759338008,"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":"3pINgDb7EjG7Bu"}
 
-      data: {"id":"chatcmpl-CLu8fLNREV3nFHUQT1Yo6URgEheKQ","object":"chat.completion.chunk","created":1759336721,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":"Download"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"bIHe5Edu"}
+      data: {"id":"chatcmpl-CLuTQdlXjkMiYRWMf7AHC2GVmn5vg","object":"chat.completion.chunk","created":1759338008,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":"Download"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"IVG3y00i"}
 
-      data: {"id":"chatcmpl-CLu8fLNREV3nFHUQT1Yo6URgEheKQ","object":"chat.completion.chunk","created":1759336721,"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":"IVmQrrkAAxgU"}
+      data: {"id":"chatcmpl-CLuTQdlXjkMiYRWMf7AHC2GVmn5vg","object":"chat.completion.chunk","created":1759338008,"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":"mLi9mcvlihsS"}
 
-      data: {"id":"chatcmpl-CLu8fLNREV3nFHUQT1Yo6URgEheKQ","object":"chat.completion.chunk","created":1759336721,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Save"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"HF4cvdPYhVO"}
+      data: {"id":"chatcmpl-CLuTQdlXjkMiYRWMf7AHC2GVmn5vg","object":"chat.completion.chunk","created":1759338008,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Save"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"gGiUqwTqKFt"}
 
-      data: {"id":"chatcmpl-CLu8fLNREV3nFHUQT1Yo6URgEheKQ","object":"chat.completion.chunk","created":1759336721,"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":"dYlMboYzKkE"}
+      data: {"id":"chatcmpl-CLuTQdlXjkMiYRWMf7AHC2GVmn5vg","object":"chat.completion.chunk","created":1759338008,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" robots"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"JQdi4ipuU"}
 
-      data: {"id":"chatcmpl-CLu8fLNREV3nFHUQT1Yo6URgEheKQ","object":"chat.completion.chunk","created":1759336721,"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":"tVyQojoiriI"}
+      data: {"id":"chatcmpl-CLuTQdlXjkMiYRWMf7AHC2GVmn5vg","object":"chat.completion.chunk","created":1759338008,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":".txt"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"VJDAu0it7YNp"}
 
-      data: {"id":"chatcmpl-CLu8fLNREV3nFHUQT1Yo6URgEheKQ","object":"chat.completion.chunk","created":1759336721,"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":"fBUfut1Iq1C0"}
+      data: {"id":"chatcmpl-CLuTQdlXjkMiYRWMf7AHC2GVmn5vg","object":"chat.completion.chunk","created":1759338008,"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":"hfhMOapEM5w"}
 
-      data: {"id":"chatcmpl-CLu8fLNREV3nFHUQT1Yo6URgEheKQ","object":"chat.completion.chunk","created":1759336721,"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":"v7SYBbIKSC"}
+      data: {"id":"chatcmpl-CLuTQdlXjkMiYRWMf7AHC2GVmn5vg","object":"chat.completion.chunk","created":1759338008,"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":"SE7K0yBXk0ng"}
 
-      data: {"id":"chatcmpl-CLu8fLNREV3nFHUQT1Yo6URgEheKQ","object":"chat.completion.chunk","created":1759336721,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[],"usage":{"prompt_tokens":126,"completion_tokens":6,"total_tokens":132,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"B4rzpzyA5MlGnm"}
+      data: {"id":"chatcmpl-CLuTQdlXjkMiYRWMf7AHC2GVmn5vg","object":"chat.completion.chunk","created":1759338008,"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":"cM9ZqBhMeE"}
+
+      data: {"id":"chatcmpl-CLuTQdlXjkMiYRWMf7AHC2GVmn5vg","object":"chat.completion.chunk","created":1759338008,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[],"usage":{"prompt_tokens":126,"completion_tokens":7,"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":"NcZiVzFNt8fXIn"}
 
       data: [DONE]
 
@@ -49,15 +51,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 887.479375ms
+    duration: 1.219465584s
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 30598
+    content_length: 30671
     host: ""

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

@@ -24,35 +24,27 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-CLu9InV3jEubsFkVE1D5vPeVErzcm","object":"chat.completion.chunk","created":1759336760,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"CakBDWOg1iXzYg"}
+      data: {"id":"chatcmpl-CLuTcBUMssq5FPVAZL1TdzXvUBOlO","object":"chat.completion.chunk","created":1759338020,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"kLKSTcGwqTcCvX"}
 
-      data: {"id":"chatcmpl-CLu9InV3jEubsFkVE1D5vPeVErzcm","object":"chat.completion.chunk","created":1759336760,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"content":"Check"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"T7tKd7tVZfL"}
+      data: {"id":"chatcmpl-CLuTcBUMssq5FPVAZL1TdzXvUBOlO","object":"chat.completion.chunk","created":1759338020,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"content":"Check"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"uWaar4YZjWt"}
 
-      data: {"id":"chatcmpl-CLu9InV3jEubsFkVE1D5vPeVErzcm","object":"chat.completion.chunk","created":1759336760,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"content":" for"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"dbNWqSblLn1W"}
+      data: {"id":"chatcmpl-CLuTcBUMssq5FPVAZL1TdzXvUBOlO","object":"chat.completion.chunk","created":1759338020,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"content":" Word"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"4AdfsQk5ymW"}
 
-      data: {"id":"chatcmpl-CLu9InV3jEubsFkVE1D5vPeVErzcm","object":"chat.completion.chunk","created":1759336760,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"content":" '"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"SSIgYcemP2z2LP"}
+      data: {"id":"chatcmpl-CLuTcBUMssq5FPVAZL1TdzXvUBOlO","object":"chat.completion.chunk","created":1759338020,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"mp2KaahzdBvK2"}
 
-      data: {"id":"chatcmpl-CLu9InV3jEubsFkVE1D5vPeVErzcm","object":"chat.completion.chunk","created":1759336760,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"content":"H"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Pl1YiJXF6Cc6A29"}
+      data: {"id":"chatcmpl-CLuTcBUMssq5FPVAZL1TdzXvUBOlO","object":"chat.completion.chunk","created":1759338020,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"content":" F"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"a8lVkTYoCCfs2g"}
 
-      data: {"id":"chatcmpl-CLu9InV3jEubsFkVE1D5vPeVErzcm","object":"chat.completion.chunk","created":1759336760,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"content":"erman"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"9nOFNYSZ4Gt"}
+      data: {"id":"chatcmpl-CLuTcBUMssq5FPVAZL1TdzXvUBOlO","object":"chat.completion.chunk","created":1759338020,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"content":"etched"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"AgPASxboOi"}
 
-      data: {"id":"chatcmpl-CLu9InV3jEubsFkVE1D5vPeVErzcm","object":"chat.completion.chunk","created":1759336760,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"content":"'"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"eJlNQrapNKxHdmv"}
+      data: {"id":"chatcmpl-CLuTcBUMssq5FPVAZL1TdzXvUBOlO","object":"chat.completion.chunk","created":1759338020,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"content":" Content"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"bCb0DU5Q"}
 
-      data: {"id":"chatcmpl-CLu9InV3jEubsFkVE1D5vPeVErzcm","object":"chat.completion.chunk","created":1759336760,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"7kFQl7DIhpyF0"}
+      data: {"id":"chatcmpl-CLuTcBUMssq5FPVAZL1TdzXvUBOlO","object":"chat.completion.chunk","created":1759338020,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"content":" from"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"XdFcY6DyYsB"}
 
-      data: {"id":"chatcmpl-CLu9InV3jEubsFkVE1D5vPeVErzcm","object":"chat.completion.chunk","created":1759336760,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"content":" http"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"VmI9vkBsnLQ"}
+      data: {"id":"chatcmpl-CLuTcBUMssq5FPVAZL1TdzXvUBOlO","object":"chat.completion.chunk","created":1759338020,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"content":" URL"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"xbSgclbIAQW7"}
 
-      data: {"id":"chatcmpl-CLu9InV3jEubsFkVE1D5vPeVErzcm","object":"chat.completion.chunk","created":1759336760,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"content":"bin"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"0PvqarlSbLKfP"}
+      data: {"id":"chatcmpl-CLuTcBUMssq5FPVAZL1TdzXvUBOlO","object":"chat.completion.chunk","created":1759338020,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"W55zgKyCBG"}
 
-      data: {"id":"chatcmpl-CLu9InV3jEubsFkVE1D5vPeVErzcm","object":"chat.completion.chunk","created":1759336760,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"content":".org"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ak19E8RwY6YW"}
-
-      data: {"id":"chatcmpl-CLu9InV3jEubsFkVE1D5vPeVErzcm","object":"chat.completion.chunk","created":1759336760,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"content":" HTML"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"LaLRZSDd1KM"}
-
-      data: {"id":"chatcmpl-CLu9InV3jEubsFkVE1D5vPeVErzcm","object":"chat.completion.chunk","created":1759336760,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"content":" content"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"tuP0UP1O"}
-
-      data: {"id":"chatcmpl-CLu9InV3jEubsFkVE1D5vPeVErzcm","object":"chat.completion.chunk","created":1759336760,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"CgraHmWtaj"}
-
-      data: {"id":"chatcmpl-CLu9InV3jEubsFkVE1D5vPeVErzcm","object":"chat.completion.chunk","created":1759336760,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[],"usage":{"prompt_tokens":130,"completion_tokens":12,"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":"0aN5Ohg3MAPkn"}
+      data: {"id":"chatcmpl-CLuTcBUMssq5FPVAZL1TdzXvUBOlO","object":"chat.completion.chunk","created":1759338020,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[],"usage":{"prompt_tokens":130,"completion_tokens":8,"total_tokens":138,"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":"ylBGqLCKIKpPuw"}
 
       data: [DONE]
 
@@ -61,15 +53,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 501.407834ms
+    duration: 872.376125ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 30608
+    content_length: 30681
     host: ""

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

@@ -24,29 +24,29 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-CLu9uaVAbIQSfN7mh5jjMJcvxrb02","object":"chat.completion.chunk","created":1759336798,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"FME7dIDZ9RLuUU"}
+      data: {"id":"chatcmpl-CLuTqBHUnM1vkhnO9OrX8h1ZLEFus","object":"chat.completion.chunk","created":1759338034,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"rUXw1FEMu6ZOsN"}
 
-      data: {"id":"chatcmpl-CLu9uaVAbIQSfN7mh5jjMJcvxrb02","object":"chat.completion.chunk","created":1759336798,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":"Finding"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"wYUbKIVPm"}
+      data: {"id":"chatcmpl-CLuTqBHUnM1vkhnO9OrX8h1ZLEFus","object":"chat.completion.chunk","created":1759338034,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":"Finding"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"tI4UF9LtL"}
 
-      data: {"id":"chatcmpl-CLu9uaVAbIQSfN7mh5jjMJcvxrb02","object":"chat.completion.chunk","created":1759336798,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":" ."},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"0OpO79Yo6sek5W"}
+      data: {"id":"chatcmpl-CLuTqBHUnM1vkhnO9OrX8h1ZLEFus","object":"chat.completion.chunk","created":1759338034,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":" ."},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"KGBg4SYncyyPYu"}
 
-      data: {"id":"chatcmpl-CLu9uaVAbIQSfN7mh5jjMJcvxrb02","object":"chat.completion.chunk","created":1759336798,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":"go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"LfZg1SQz8unIiu"}
+      data: {"id":"chatcmpl-CLuTqBHUnM1vkhnO9OrX8h1ZLEFus","object":"chat.completion.chunk","created":1759338034,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":"go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"nO25eF9hlIdNHL"}
 
-      data: {"id":"chatcmpl-CLu9uaVAbIQSfN7mh5jjMJcvxrb02","object":"chat.completion.chunk","created":1759336798,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":" Files"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"tgWRqv5DXN"}
+      data: {"id":"chatcmpl-CLuTqBHUnM1vkhnO9OrX8h1ZLEFus","object":"chat.completion.chunk","created":1759338034,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":" Files"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"TZi0Xf9tHS"}
 
-      data: {"id":"chatcmpl-CLu9uaVAbIQSfN7mh5jjMJcvxrb02","object":"chat.completion.chunk","created":1759336798,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":" with"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"6Q9xjOU2V3E"}
+      data: {"id":"chatcmpl-CLuTqBHUnM1vkhnO9OrX8h1ZLEFus","object":"chat.completion.chunk","created":1759338034,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":" with"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"PPNjDHfUHfu"}
 
-      data: {"id":"chatcmpl-CLu9uaVAbIQSfN7mh5jjMJcvxrb02","object":"chat.completion.chunk","created":1759336798,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":" Glob"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"bvhzWxyDrkq"}
+      data: {"id":"chatcmpl-CLuTqBHUnM1vkhnO9OrX8h1ZLEFus","object":"chat.completion.chunk","created":1759338034,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":" Glob"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"kh05SzrGkJO"}
 
-      data: {"id":"chatcmpl-CLu9uaVAbIQSfN7mh5jjMJcvxrb02","object":"chat.completion.chunk","created":1759336798,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"1TGeucsSnWfKA"}
+      data: {"id":"chatcmpl-CLuTqBHUnM1vkhnO9OrX8h1ZLEFus","object":"chat.completion.chunk","created":1759338034,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"C5wECDjxA7vzy"}
 
-      data: {"id":"chatcmpl-CLu9uaVAbIQSfN7mh5jjMJcvxrb02","object":"chat.completion.chunk","created":1759336798,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":" Current"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"TpYB6Yr0"}
+      data: {"id":"chatcmpl-CLuTqBHUnM1vkhnO9OrX8h1ZLEFus","object":"chat.completion.chunk","created":1759338034,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":" Current"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"pHSOeDci"}
 
-      data: {"id":"chatcmpl-CLu9uaVAbIQSfN7mh5jjMJcvxrb02","object":"chat.completion.chunk","created":1759336798,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":" Directory"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"VSNINr"}
+      data: {"id":"chatcmpl-CLuTqBHUnM1vkhnO9OrX8h1ZLEFus","object":"chat.completion.chunk","created":1759338034,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":" Directory"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"vWU5aK"}
 
-      data: {"id":"chatcmpl-CLu9uaVAbIQSfN7mh5jjMJcvxrb02","object":"chat.completion.chunk","created":1759336798,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"jrphG2UWAu"}
+      data: {"id":"chatcmpl-CLuTqBHUnM1vkhnO9OrX8h1ZLEFus","object":"chat.completion.chunk","created":1759338034,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"1NpNdqJ7nf"}
 
-      data: {"id":"chatcmpl-CLu9uaVAbIQSfN7mh5jjMJcvxrb02","object":"chat.completion.chunk","created":1759336798,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[],"usage":{"prompt_tokens":120,"completion_tokens":9,"total_tokens":129,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"5Mkbja79daMBao"}
+      data: {"id":"chatcmpl-CLuTqBHUnM1vkhnO9OrX8h1ZLEFus","object":"chat.completion.chunk","created":1759338034,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[],"usage":{"prompt_tokens":120,"completion_tokens":9,"total_tokens":129,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"Bf8ozc44y43SCk"}
 
       data: [DONE]
 
@@ -55,15 +55,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 1.170671583s
+    duration: 456.047458ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 30570
+    content_length: 30643
     host: ""

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

@@ -24,33 +24,29 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-CLuA2dJOPms74BebvwiLxmBqTDURj","object":"chat.completion.chunk","created":1759336806,"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":"ztiweTXLMUQZfX"}
+      data: {"id":"chatcmpl-CLuTy3SIocldqGpbWNTW498BvZetk","object":"chat.completion.chunk","created":1759338042,"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":"zdeB5oEXLzK1UG"}
 
-      data: {"id":"chatcmpl-CLuA2dJOPms74BebvwiLxmBqTDURj","object":"chat.completion.chunk","created":1759336806,"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":"wLSkmc0sct9"}
+      data: {"id":"chatcmpl-CLuTy3SIocldqGpbWNTW498BvZetk","object":"chat.completion.chunk","created":1759338042,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":"Search"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"v4rLzfK8xb"}
 
-      data: {"id":"chatcmpl-CLuA2dJOPms74BebvwiLxmBqTDURj","object":"chat.completion.chunk","created":1759336806,"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":"WtcduFxQX9uo"}
+      data: {"id":"chatcmpl-CLuTy3SIocldqGpbWNTW498BvZetk","object":"chat.completion.chunk","created":1759338042,"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":"sv4O4Ie2eWwaPQ"}
 
-      data: {"id":"chatcmpl-CLuA2dJOPms74BebvwiLxmBqTDURj","object":"chat.completion.chunk","created":1759336806,"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":"1zppfZBdK0kkXZA"}
+      data: {"id":"chatcmpl-CLuTy3SIocldqGpbWNTW498BvZetk","object":"chat.completion.chunk","created":1759338042,"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":"hgiI921Pg"}
 
-      data: {"id":"chatcmpl-CLuA2dJOPms74BebvwiLxmBqTDURj","object":"chat.completion.chunk","created":1759336806,"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":"kS38y7QZdrVlV"}
+      data: {"id":"chatcmpl-CLuTy3SIocldqGpbWNTW498BvZetk","object":"chat.completion.chunk","created":1759338042,"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":"SQn7S1KcKAJRJQ6"}
 
-      data: {"id":"chatcmpl-CLuA2dJOPms74BebvwiLxmBqTDURj","object":"chat.completion.chunk","created":1759336806,"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":"yc50AKQ7vUJ"}
+      data: {"id":"chatcmpl-CLuTy3SIocldqGpbWNTW498BvZetk","object":"chat.completion.chunk","created":1759338042,"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":"2DdiIvmHHmpoP"}
 
-      data: {"id":"chatcmpl-CLuA2dJOPms74BebvwiLxmBqTDURj","object":"chat.completion.chunk","created":1759336806,"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":"quElZdGZsH75qg"}
+      data: {"id":"chatcmpl-CLuTy3SIocldqGpbWNTW498BvZetk","object":"chat.completion.chunk","created":1759338042,"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":"UhTQWmsGvnweR"}
 
-      data: {"id":"chatcmpl-CLuA2dJOPms74BebvwiLxmBqTDURj","object":"chat.completion.chunk","created":1759336806,"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":"9oDlUiTj5"}
+      data: {"id":"chatcmpl-CLuTy3SIocldqGpbWNTW498BvZetk","object":"chat.completion.chunk","created":1759338042,"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":"UGbnSmIbkh"}
 
-      data: {"id":"chatcmpl-CLuA2dJOPms74BebvwiLxmBqTDURj","object":"chat.completion.chunk","created":1759336806,"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":"uyZBPmTa5oa13e5"}
+      data: {"id":"chatcmpl-CLuTy3SIocldqGpbWNTW498BvZetk","object":"chat.completion.chunk","created":1759338042,"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":"s2ZsUP4iGu"}
 
-      data: {"id":"chatcmpl-CLuA2dJOPms74BebvwiLxmBqTDURj","object":"chat.completion.chunk","created":1759336806,"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":"i5o87GLIBDuH0"}
+      data: {"id":"chatcmpl-CLuTy3SIocldqGpbWNTW498BvZetk","object":"chat.completion.chunk","created":1759338042,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" grep"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"B5V2nhz7NiX"}
 
-      data: {"id":"chatcmpl-CLuA2dJOPms74BebvwiLxmBqTDURj","object":"chat.completion.chunk","created":1759336806,"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":"Gika8db8IU205"}
+      data: {"id":"chatcmpl-CLuTy3SIocldqGpbWNTW498BvZetk","object":"chat.completion.chunk","created":1759338042,"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":"4hvVroXutX"}
 
-      data: {"id":"chatcmpl-CLuA2dJOPms74BebvwiLxmBqTDURj","object":"chat.completion.chunk","created":1759336806,"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":"s9dwYOK1h8"}
-
-      data: {"id":"chatcmpl-CLuA2dJOPms74BebvwiLxmBqTDURj","object":"chat.completion.chunk","created":1759336806,"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":"DTc9isbsDu"}
-
-      data: {"id":"chatcmpl-CLuA2dJOPms74BebvwiLxmBqTDURj","object":"chat.completion.chunk","created":1759336806,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[],"usage":{"prompt_tokens":121,"completion_tokens":11,"total_tokens":132,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"R3I2nrlEJcwp5"}
+      data: {"id":"chatcmpl-CLuTy3SIocldqGpbWNTW498BvZetk","object":"chat.completion.chunk","created":1759338042,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[],"usage":{"prompt_tokens":121,"completion_tokens":9,"total_tokens":130,"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":"GoHS5k9qdSoPae"}
 
       data: [DONE]
 
@@ -59,15 +55,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 984.419ms
+    duration: 688.485208ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 30568
+    content_length: 30641
     host: ""

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

@@ -24,31 +24,25 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-CLuABmCUeCewB1g01xshdORoWjqpf","object":"chat.completion.chunk","created":1759336815,"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":"N41RyjiPnDqaz5"}
+      data: {"id":"chatcmpl-CLuU8eMrWn3aPVUyPxIsyqpVXTNq0","object":"chat.completion.chunk","created":1759338052,"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":"byeH7w5TFEQa4S"}
 
-      data: {"id":"chatcmpl-CLuABmCUeCewB1g01xshdORoWjqpf","object":"chat.completion.chunk","created":1759336815,"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":"xh2U346BlUl"}
+      data: {"id":"chatcmpl-CLuU8eMrWn3aPVUyPxIsyqpVXTNq0","object":"chat.completion.chunk","created":1759338052,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":"Listing"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"GW3h1aC0o"}
 
-      data: {"id":"chatcmpl-CLuABmCUeCewB1g01xshdORoWjqpf","object":"chat.completion.chunk","created":1759336815,"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":"g889VbADQGz5w5"}
+      data: {"id":"chatcmpl-CLuU8eMrWn3aPVUyPxIsyqpVXTNq0","object":"chat.completion.chunk","created":1759338052,"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":"hvf3ebLYGF"}
 
-      data: {"id":"chatcmpl-CLuABmCUeCewB1g01xshdORoWjqpf","object":"chat.completion.chunk","created":1759336815,"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":"U2i5vosGQrDvzG"}
+      data: {"id":"chatcmpl-CLuU8eMrWn3aPVUyPxIsyqpVXTNq0","object":"chat.completion.chunk","created":1759338052,"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":"AjTKvIL4UedFa"}
 
-      data: {"id":"chatcmpl-CLuABmCUeCewB1g01xshdORoWjqpf","object":"chat.completion.chunk","created":1759336815,"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":"GAwkqAETE404gsW"}
+      data: {"id":"chatcmpl-CLuU8eMrWn3aPVUyPxIsyqpVXTNq0","object":"chat.completion.chunk","created":1759338052,"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":"OZC77OuP"}
 
-      data: {"id":"chatcmpl-CLuABmCUeCewB1g01xshdORoWjqpf","object":"chat.completion.chunk","created":1759336815,"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":"VN2cKOBjGnVcC"}
+      data: {"id":"chatcmpl-CLuU8eMrWn3aPVUyPxIsyqpVXTNq0","object":"chat.completion.chunk","created":1759338052,"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":"4E7n5C"}
 
-      data: {"id":"chatcmpl-CLuABmCUeCewB1g01xshdORoWjqpf","object":"chat.completion.chunk","created":1759336815,"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":"uKSxr1dZtxq"}
+      data: {"id":"chatcmpl-CLuU8eMrWn3aPVUyPxIsyqpVXTNq0","object":"chat.completion.chunk","created":1759338052,"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":"0tw6Kby3Ym"}
 
-      data: {"id":"chatcmpl-CLuABmCUeCewB1g01xshdORoWjqpf","object":"chat.completion.chunk","created":1759336815,"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":"hKxG59DKlC"}
+      data: {"id":"chatcmpl-CLuU8eMrWn3aPVUyPxIsyqpVXTNq0","object":"chat.completion.chunk","created":1759338052,"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":"Uz07pVICfrUqt"}
 
-      data: {"id":"chatcmpl-CLuABmCUeCewB1g01xshdORoWjqpf","object":"chat.completion.chunk","created":1759336815,"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":"9fn4yRLDsriHO"}
+      data: {"id":"chatcmpl-CLuU8eMrWn3aPVUyPxIsyqpVXTNq0","object":"chat.completion.chunk","created":1759338052,"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":"IAYWI5hiN8"}
 
-      data: {"id":"chatcmpl-CLuABmCUeCewB1g01xshdORoWjqpf","object":"chat.completion.chunk","created":1759336815,"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":"rc0kDQbR"}
-
-      data: {"id":"chatcmpl-CLuABmCUeCewB1g01xshdORoWjqpf","object":"chat.completion.chunk","created":1759336815,"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":"abLUI5"}
-
-      data: {"id":"chatcmpl-CLuABmCUeCewB1g01xshdORoWjqpf","object":"chat.completion.chunk","created":1759336815,"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":"GWUSFdhsiD"}
-
-      data: {"id":"chatcmpl-CLuABmCUeCewB1g01xshdORoWjqpf","object":"chat.completion.chunk","created":1759336815,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[],"usage":{"prompt_tokens":118,"completion_tokens":10,"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":"V1w98H3jdoIQU"}
+      data: {"id":"chatcmpl-CLuU8eMrWn3aPVUyPxIsyqpVXTNq0","object":"chat.completion.chunk","created":1759338052,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[],"usage":{"prompt_tokens":118,"completion_tokens":7,"total_tokens":125,"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":"dxQRmtoc2C3OeM"}
 
       data: [DONE]
 
@@ -57,15 +51,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 388.661333ms
+    duration: 400.379666ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 30562
+    content_length: 30635
     host: ""

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

@@ -24,27 +24,31 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-CLuAYMVOmFn5iNZeGgMQtfrgSk5v5","object":"chat.completion.chunk","created":1759336838,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ocosaPT5BY98Nl"}
+      data: {"id":"chatcmpl-CLuUGnQ3olyd8W01dcr6WOixEKWWh","object":"chat.completion.chunk","created":1759338060,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"iVeuhl5Ejb6nB0"}
 
-      data: {"id":"chatcmpl-CLuAYMVOmFn5iNZeGgMQtfrgSk5v5","object":"chat.completion.chunk","created":1759336838,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":"Edit"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"O2OLrKT1E4tf"}
+      data: {"id":"chatcmpl-CLuUGnQ3olyd8W01dcr6WOixEKWWh","object":"chat.completion.chunk","created":1759338060,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":"Autom"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"cCJV9zXuCSB"}
 
-      data: {"id":"chatcmpl-CLuAYMVOmFn5iNZeGgMQtfrgSk5v5","object":"chat.completion.chunk","created":1759336838,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":" Code"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"YiW8eRkiTpV"}
+      data: {"id":"chatcmpl-CLuUGnQ3olyd8W01dcr6WOixEKWWh","object":"chat.completion.chunk","created":1759338060,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":"ate"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"nDIRvhsc2wZrS"}
 
-      data: {"id":"chatcmpl-CLuAYMVOmFn5iNZeGgMQtfrgSk5v5","object":"chat.completion.chunk","created":1759336838,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":" for"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"MSkV28Yv6mET"}
+      data: {"id":"chatcmpl-CLuUGnQ3olyd8W01dcr6WOixEKWWh","object":"chat.completion.chunk","created":1759338060,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":" Code"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"tRmmYg77PHU"}
 
-      data: {"id":"chatcmpl-CLuAYMVOmFn5iNZeGgMQtfrgSk5v5","object":"chat.completion.chunk","created":1759336838,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":" Greeting"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"PDD7iC3"}
+      data: {"id":"chatcmpl-CLuUGnQ3olyd8W01dcr6WOixEKWWh","object":"chat.completion.chunk","created":1759338060,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":" Update"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"YorSURDDn"}
 
-      data: {"id":"chatcmpl-CLuAYMVOmFn5iNZeGgMQtfrgSk5v5","object":"chat.completion.chunk","created":1759336838,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":" Update"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"imCx5U7cP"}
+      data: {"id":"chatcmpl-CLuUGnQ3olyd8W01dcr6WOixEKWWh","object":"chat.completion.chunk","created":1759338060,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":" and"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"yNGrdX13Ab27"}
 
-      data: {"id":"chatcmpl-CLuAYMVOmFn5iNZeGgMQtfrgSk5v5","object":"chat.completion.chunk","created":1759336838,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"QsxicO0rLtKXM"}
+      data: {"id":"chatcmpl-CLuUGnQ3olyd8W01dcr6WOixEKWWh","object":"chat.completion.chunk","created":1759338060,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":" Add"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"dkZjI7cm10Lp"}
 
-      data: {"id":"chatcmpl-CLuAYMVOmFn5iNZeGgMQtfrgSk5v5","object":"chat.completion.chunk","created":1759336838,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":" main"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"D8iMPbOEr26"}
+      data: {"id":"chatcmpl-CLuUGnQ3olyd8W01dcr6WOixEKWWh","object":"chat.completion.chunk","created":1759338060,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":" Comment"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"HmNSoDua"}
 
-      data: {"id":"chatcmpl-CLuAYMVOmFn5iNZeGgMQtfrgSk5v5","object":"chat.completion.chunk","created":1759336838,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":".go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"bfESheAj6RscL"}
+      data: {"id":"chatcmpl-CLuUGnQ3olyd8W01dcr6WOixEKWWh","object":"chat.completion.chunk","created":1759338060,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"FjAT6tv94K2VM"}
 
-      data: {"id":"chatcmpl-CLuAYMVOmFn5iNZeGgMQtfrgSk5v5","object":"chat.completion.chunk","created":1759336838,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"9sQgj0yBRQ"}
+      data: {"id":"chatcmpl-CLuUGnQ3olyd8W01dcr6WOixEKWWh","object":"chat.completion.chunk","created":1759338060,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":" main"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"JX8EpbVOHbZ"}
 
-      data: {"id":"chatcmpl-CLuAYMVOmFn5iNZeGgMQtfrgSk5v5","object":"chat.completion.chunk","created":1759336838,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[],"usage":{"prompt_tokens":140,"completion_tokens":8,"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":"I1En6N8ed1gRZY"}
+      data: {"id":"chatcmpl-CLuUGnQ3olyd8W01dcr6WOixEKWWh","object":"chat.completion.chunk","created":1759338060,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":".go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"dpgiHsAN8Hwk5"}
+
+      data: {"id":"chatcmpl-CLuUGnQ3olyd8W01dcr6WOixEKWWh","object":"chat.completion.chunk","created":1759338060,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"VR194jkOpa"}
+
+      data: {"id":"chatcmpl-CLuUGnQ3olyd8W01dcr6WOixEKWWh","object":"chat.completion.chunk","created":1759338060,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[],"usage":{"prompt_tokens":140,"completion_tokens":10,"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":"IsoU7m51ax049"}
 
       data: [DONE]
 
@@ -53,15 +57,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 590.596125ms
+    duration: 462.968291ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 30648
+    content_length: 30721
     host: ""

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

@@ -24,25 +24,23 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-CLuBspkvxoQ575KorHiWfasWSm7an","object":"chat.completion.chunk","created":1759336920,"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":"ygfQ9Oz524K0Tv"}
+      data: {"id":"chatcmpl-CLuVN1BnkQk7pG0LTgjQP78Mzw3cZ","object":"chat.completion.chunk","created":1759338129,"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":"2Es81CTWNDo6i8"}
 
-      data: {"id":"chatcmpl-CLuBspkvxoQ575KorHiWfasWSm7an","object":"chat.completion.chunk","created":1759336920,"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":"QWFlq8dw"}
+      data: {"id":"chatcmpl-CLuVN1BnkQk7pG0LTgjQP78Mzw3cZ","object":"chat.completion.chunk","created":1759338129,"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":"WXLBNdHE"}
 
-      data: {"id":"chatcmpl-CLuBspkvxoQ575KorHiWfasWSm7an","object":"chat.completion.chunk","created":1759336920,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Execution"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"1Tw3SY"}
+      data: {"id":"chatcmpl-CLuVN1BnkQk7pG0LTgjQP78Mzw3cZ","object":"chat.completion.chunk","created":1759338129,"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":"gJPxymarI2r"}
 
-      data: {"id":"chatcmpl-CLuBspkvxoQ575KorHiWfasWSm7an","object":"chat.completion.chunk","created":1759336920,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" of"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"qLWt2ExGGs4ur"}
+      data: {"id":"chatcmpl-CLuVN1BnkQk7pG0LTgjQP78Mzw3cZ","object":"chat.completion.chunk","created":1759338129,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Search"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"NV7q4FbxZ"}
 
-      data: {"id":"chatcmpl-CLuBspkvxoQ575KorHiWfasWSm7an","object":"chat.completion.chunk","created":1759336920,"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":"AHCGFBR6ED5"}
+      data: {"id":"chatcmpl-CLuVN1BnkQk7pG0LTgjQP78Mzw3cZ","object":"chat.completion.chunk","created":1759338129,"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":"mJauQsngNoHD"}
 
-      data: {"id":"chatcmpl-CLuBspkvxoQ575KorHiWfasWSm7an","object":"chat.completion.chunk","created":1759336920,"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":"dr8XDB7cimHu"}
+      data: {"id":"chatcmpl-CLuVN1BnkQk7pG0LTgjQP78Mzw3cZ","object":"chat.completion.chunk","created":1759338129,"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":"zvfLMC"}
 
-      data: {"id":"chatcmpl-CLuBspkvxoQ575KorHiWfasWSm7an","object":"chat.completion.chunk","created":1759336920,"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":"eu1lw4NMAxuAt"}
+      data: {"id":"chatcmpl-CLuVN1BnkQk7pG0LTgjQP78Mzw3cZ","object":"chat.completion.chunk","created":1759338129,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Listing"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"4tYnN3wZ"}
 
-      data: {"id":"chatcmpl-CLuBspkvxoQ575KorHiWfasWSm7an","object":"chat.completion.chunk","created":1759336920,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Commands"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"eRrIPKY"}
+      data: {"id":"chatcmpl-CLuVN1BnkQk7pG0LTgjQP78Mzw3cZ","object":"chat.completion.chunk","created":1759338129,"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":"qYZMsar46a"}
 
-      data: {"id":"chatcmpl-CLuBspkvxoQ575KorHiWfasWSm7an","object":"chat.completion.chunk","created":1759336920,"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":"k5oqrle3Hf"}
-
-      data: {"id":"chatcmpl-CLuBspkvxoQ575KorHiWfasWSm7an","object":"chat.completion.chunk","created":1759336920,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[],"usage":{"prompt_tokens":137,"completion_tokens":7,"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":"Q8wYeSlMhQtC5W"}
+      data: {"id":"chatcmpl-CLuVN1BnkQk7pG0LTgjQP78Mzw3cZ","object":"chat.completion.chunk","created":1759338129,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[],"usage":{"prompt_tokens":137,"completion_tokens":6,"total_tokens":143,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"fHV8lExaB14K50"}
 
       data: [DONE]
 
@@ -51,15 +49,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 622.431125ms
+    duration: 536.555209ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 30659
+    content_length: 30732
     host: ""

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

@@ -24,17 +24,19 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-CLu7oMAHYDQ2VshSemevLeG6pzFhW","object":"chat.completion.chunk","created":1759336668,"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":"KhCsb8RC3eDmpG"}
+      data: {"id":"chatcmpl-CLuS7VvmRXYoPcVz8RvwAsNjQfe2a","object":"chat.completion.chunk","created":1759337927,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"36S2DJyxeLNcA3"}
 
-      data: {"id":"chatcmpl-CLu7oMAHYDQ2VshSemevLeG6pzFhW","object":"chat.completion.chunk","created":1759336668,"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":"d1i"}
+      data: {"id":"chatcmpl-CLuS7VvmRXYoPcVz8RvwAsNjQfe2a","object":"chat.completion.chunk","created":1759337927,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"content":"Understanding"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"8tC"}
 
-      data: {"id":"chatcmpl-CLu7oMAHYDQ2VshSemevLeG6pzFhW","object":"chat.completion.chunk","created":1759336668,"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":"VEvUhmgkDxyPL"}
+      data: {"id":"chatcmpl-CLuS7VvmRXYoPcVz8RvwAsNjQfe2a","object":"chat.completion.chunk","created":1759337927,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"content":" Go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Odf2U6ZoJz49x"}
 
-      data: {"id":"chatcmpl-CLu7oMAHYDQ2VshSemevLeG6pzFhW","object":"chat.completion.chunk","created":1759336668,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Modules"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"invthUbo"}
+      data: {"id":"chatcmpl-CLuS7VvmRXYoPcVz8RvwAsNjQfe2a","object":"chat.completion.chunk","created":1759337927,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"content":" Mod"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"GX6p8ektbKDh"}
 
-      data: {"id":"chatcmpl-CLu7oMAHYDQ2VshSemevLeG6pzFhW","object":"chat.completion.chunk","created":1759336668,"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":"tYLDqy6tK7"}
+      data: {"id":"chatcmpl-CLuS7VvmRXYoPcVz8RvwAsNjQfe2a","object":"chat.completion.chunk","created":1759337927,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"content":" Files"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"npnjqmCpYc"}
 
-      data: {"id":"chatcmpl-CLu7oMAHYDQ2VshSemevLeG6pzFhW","object":"chat.completion.chunk","created":1759336668,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[],"usage":{"prompt_tokens":112,"completion_tokens":3,"total_tokens":115,"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":"VhNgSQdxHSMei1"}
+      data: {"id":"chatcmpl-CLuS7VvmRXYoPcVz8RvwAsNjQfe2a","object":"chat.completion.chunk","created":1759337927,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"XvzP9vS6EL"}
+
+      data: {"id":"chatcmpl-CLuS7VvmRXYoPcVz8RvwAsNjQfe2a","object":"chat.completion.chunk","created":1759337927,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[],"usage":{"prompt_tokens":112,"completion_tokens":4,"total_tokens":116,"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":"9mzjBxgOZQFxkk"}
 
       data: [DONE]
 
@@ -43,15 +45,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 1.514277208s
+    duration: 716.34375ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 30532
+    content_length: 30605
     host: ""

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

@@ -24,21 +24,15 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-CLu7iJ2epqtUtw0q9nV0rw1xoI03e","object":"chat.completion.chunk","created":1759336662,"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":"VDsfpRWfe0FLMX"}
+      data: {"id":"chatcmpl-CLuS4afB0SlAAOlopNkopx3sMvN5Z","object":"chat.completion.chunk","created":1759337924,"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":"PHKFxWqtOPkKuE"}
 
-      data: {"id":"chatcmpl-CLu7iJ2epqtUtw0q9nV0rw1xoI03e","object":"chat.completion.chunk","created":1759336662,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":"User"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"zwitqOr2gea7"}
+      data: {"id":"chatcmpl-CLuS4afB0SlAAOlopNkopx3sMvN5Z","object":"chat.completion.chunk","created":1759337924,"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":"xLEq8RFJ"}
 
-      data: {"id":"chatcmpl-CLu7iJ2epqtUtw0q9nV0rw1xoI03e","object":"chat.completion.chunk","created":1759336662,"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":"4x3mhBf7Oi94"}
+      data: {"id":"chatcmpl-CLuS4afB0SlAAOlopNkopx3sMvN5Z","object":"chat.completion.chunk","created":1759337924,"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":"NWa1e0e5"}
 
-      data: {"id":"chatcmpl-CLu7iJ2epqtUtw0q9nV0rw1xoI03e","object":"chat.completion.chunk","created":1759336662,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":"ets"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"nmoEu1r6oSgMB"}
+      data: {"id":"chatcmpl-CLuS4afB0SlAAOlopNkopx3sMvN5Z","object":"chat.completion.chunk","created":1759337924,"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":"8r7PsOEws3"}
 
-      data: {"id":"chatcmpl-CLu7iJ2epqtUtw0q9nV0rw1xoI03e","object":"chat.completion.chunk","created":1759336662,"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":"eyxHKqqVlpz"}
-
-      data: {"id":"chatcmpl-CLu7iJ2epqtUtw0q9nV0rw1xoI03e","object":"chat.completion.chunk","created":1759336662,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Hello"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"YeVcT2U9r3"}
-
-      data: {"id":"chatcmpl-CLu7iJ2epqtUtw0q9nV0rw1xoI03e","object":"chat.completion.chunk","created":1759336662,"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":"dHmBEsM3SQ"}
-
-      data: {"id":"chatcmpl-CLu7iJ2epqtUtw0q9nV0rw1xoI03e","object":"chat.completion.chunk","created":1759336662,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[],"usage":{"prompt_tokens":109,"completion_tokens":5,"total_tokens":114,"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":"OrjqNvO9bGU83L"}
+      data: {"id":"chatcmpl-CLuS4afB0SlAAOlopNkopx3sMvN5Z","object":"chat.completion.chunk","created":1759337924,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[],"usage":{"prompt_tokens":109,"completion_tokens":2,"total_tokens":111,"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":"WUEtTLOIl6oDVS"}
 
       data: [DONE]
 
@@ -47,15 +41,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 1.34329025s
+    duration: 873.67075ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 30522
+    content_length: 30595
     host: ""

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

@@ -24,37 +24,35 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-CLuB5GFZakNK17t7puN4gpJtvHfOL","object":"chat.completion.chunk","created":1759336871,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"3jhaXGNBLPHRLM"}
+      data: {"id":"chatcmpl-CLuUk66HwZGrIlaH24d8JVqb4J4GH","object":"chat.completion.chunk","created":1759338090,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"im6NCWyq50riyo"}
 
-      data: {"id":"chatcmpl-CLuB5GFZakNK17t7puN4gpJtvHfOL","object":"chat.completion.chunk","created":1759336871,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"content":"Using"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"roqZwXpIUay"}
+      data: {"id":"chatcmpl-CLuUk66HwZGrIlaH24d8JVqb4J4GH","object":"chat.completion.chunk","created":1759338090,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"content":"Searching"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ZdYgPOX"}
 
-      data: {"id":"chatcmpl-CLuB5GFZakNK17t7puN4gpJtvHfOL","object":"chat.completion.chunk","created":1759336871,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"content":" Source"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"B2r9cabFg"}
+      data: {"id":"chatcmpl-CLuUk66HwZGrIlaH24d8JVqb4J4GH","object":"chat.completion.chunk","created":1759338090,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"content":" '"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"9Y2OXllnrK8pyO"}
 
-      data: {"id":"chatcmpl-CLuB5GFZakNK17t7puN4gpJtvHfOL","object":"chat.completion.chunk","created":1759336871,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"content":"graph"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"CsVUBFQORNI"}
+      data: {"id":"chatcmpl-CLuUk66HwZGrIlaH24d8JVqb4J4GH","object":"chat.completion.chunk","created":1759338090,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"content":"func"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"hAYvtC1XnFwQ"}
 
-      data: {"id":"chatcmpl-CLuB5GFZakNK17t7puN4gpJtvHfOL","object":"chat.completion.chunk","created":1759336871,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"content":" to"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"mdmU48DrNILTu"}
+      data: {"id":"chatcmpl-CLuUk66HwZGrIlaH24d8JVqb4J4GH","object":"chat.completion.chunk","created":1759338090,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"content":" main"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"bYbRi1ylH31"}
 
-      data: {"id":"chatcmpl-CLuB5GFZakNK17t7puN4gpJtvHfOL","object":"chat.completion.chunk","created":1759336871,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"content":" Find"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"DyEMbuYgknM"}
+      data: {"id":"chatcmpl-CLuUk66HwZGrIlaH24d8JVqb4J4GH","object":"chat.completion.chunk","created":1759338090,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"content":"'"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"JojQOMoP5ZswCW3"}
 
-      data: {"id":"chatcmpl-CLuB5GFZakNK17t7puN4gpJtvHfOL","object":"chat.completion.chunk","created":1759336871,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"content":" '"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"UUhX3m9yv0K9aB"}
+      data: {"id":"chatcmpl-CLuUk66HwZGrIlaH24d8JVqb4J4GH","object":"chat.completion.chunk","created":1759338090,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"nuxsDO5B9ewAb"}
 
-      data: {"id":"chatcmpl-CLuB5GFZakNK17t7puN4gpJtvHfOL","object":"chat.completion.chunk","created":1759336871,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"content":"func"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"WJ5kszvaOCkg"}
+      data: {"id":"chatcmpl-CLuUk66HwZGrIlaH24d8JVqb4J4GH","object":"chat.completion.chunk","created":1759338090,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"content":" Go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"KgYm89u0kbEVb"}
 
-      data: {"id":"chatcmpl-CLuB5GFZakNK17t7puN4gpJtvHfOL","object":"chat.completion.chunk","created":1759336871,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"content":" main"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"iIQH5dsA2rG"}
+      data: {"id":"chatcmpl-CLuUk66HwZGrIlaH24d8JVqb4J4GH","object":"chat.completion.chunk","created":1759338090,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"content":" Re"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"qarOV6uf5jpr0"}
 
-      data: {"id":"chatcmpl-CLuB5GFZakNK17t7puN4gpJtvHfOL","object":"chat.completion.chunk","created":1759336871,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"content":"'"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ESt7VceQvv5pg7H"}
+      data: {"id":"chatcmpl-CLuUk66HwZGrIlaH24d8JVqb4J4GH","object":"chat.completion.chunk","created":1759338090,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"content":"positories"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"f5Hj8I"}
 
-      data: {"id":"chatcmpl-CLuB5GFZakNK17t7puN4gpJtvHfOL","object":"chat.completion.chunk","created":1759336871,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"HcRNamfiVGwgK"}
+      data: {"id":"chatcmpl-CLuUk66HwZGrIlaH24d8JVqb4J4GH","object":"chat.completion.chunk","created":1759338090,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"content":" with"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"QarxldhD9i5"}
 
-      data: {"id":"chatcmpl-CLuB5GFZakNK17t7puN4gpJtvHfOL","object":"chat.completion.chunk","created":1759336871,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"content":" Go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"9C7r1jiXqfmNg"}
+      data: {"id":"chatcmpl-CLuUk66HwZGrIlaH24d8JVqb4J4GH","object":"chat.completion.chunk","created":1759338090,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"content":" Source"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"zrNOGWiGX"}
 
-      data: {"id":"chatcmpl-CLuB5GFZakNK17t7puN4gpJtvHfOL","object":"chat.completion.chunk","created":1759336871,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"content":" Re"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"OssMg1mV7j1Ih"}
+      data: {"id":"chatcmpl-CLuUk66HwZGrIlaH24d8JVqb4J4GH","object":"chat.completion.chunk","created":1759338090,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"content":"graph"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"MI6fb9krpyJ"}
 
-      data: {"id":"chatcmpl-CLuB5GFZakNK17t7puN4gpJtvHfOL","object":"chat.completion.chunk","created":1759336871,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{"content":"pos"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"3zyxA44glVE7H"}
+      data: {"id":"chatcmpl-CLuUk66HwZGrIlaH24d8JVqb4J4GH","object":"chat.completion.chunk","created":1759338090,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"rkO4fMIlH7"}
 
-      data: {"id":"chatcmpl-CLuB5GFZakNK17t7puN4gpJtvHfOL","object":"chat.completion.chunk","created":1759336871,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"XvfHISbPW1"}
-
-      data: {"id":"chatcmpl-CLuB5GFZakNK17t7puN4gpJtvHfOL","object":"chat.completion.chunk","created":1759336871,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[],"usage":{"prompt_tokens":121,"completion_tokens":13,"total_tokens":134,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"zFQdYTxYqVTmo"}
+      data: {"id":"chatcmpl-CLuUk66HwZGrIlaH24d8JVqb4J4GH","object":"chat.completion.chunk","created":1759338090,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_1827dd0c55","choices":[],"usage":{"prompt_tokens":121,"completion_tokens":12,"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":"3KpnvLPqXmNwc"}
 
       data: [DONE]
 
@@ -63,15 +61,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 599.140458ms
+    duration: 546.357ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 30582
+    content_length: 30655
     host: ""

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

@@ -24,25 +24,25 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-CLu84UhzdZ1zrRIhmtT16922Ut9HJ","object":"chat.completion.chunk","created":1759336684,"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":"PDwMpyDrrIjjgI"}
+      data: {"id":"chatcmpl-CLuSIABs2T781fy3TB5oxKKq1rp7R","object":"chat.completion.chunk","created":1759337938,"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":"ik4ONex1kYkXvD"}
 
-      data: {"id":"chatcmpl-CLu84UhzdZ1zrRIhmtT16922Ut9HJ","object":"chat.completion.chunk","created":1759336684,"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":"z0nOLpLNiD"}
+      data: {"id":"chatcmpl-CLuSIABs2T781fy3TB5oxKKq1rp7R","object":"chat.completion.chunk","created":1759337938,"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":"FcPhRIjBE2"}
 
-      data: {"id":"chatcmpl-CLu84UhzdZ1zrRIhmtT16922Ut9HJ","object":"chat.completion.chunk","created":1759336684,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Print"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"TW54tBWj2U"}
+      data: {"id":"chatcmpl-CLuSIABs2T781fy3TB5oxKKq1rp7R","object":"chat.completion.chunk","created":1759337938,"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":"UGUa348zEJV"}
 
-      data: {"id":"chatcmpl-CLu84UhzdZ1zrRIhmtT16922Ut9HJ","object":"chat.completion.chunk","created":1759336684,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Statement"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"0AK5rV"}
+      data: {"id":"chatcmpl-CLuSIABs2T781fy3TB5oxKKq1rp7R","object":"chat.completion.chunk","created":1759337938,"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":"RxmOnRcqO2SHa"}
 
-      data: {"id":"chatcmpl-CLu84UhzdZ1zrRIhmtT16922Ut9HJ","object":"chat.completion.chunk","created":1759336684,"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":"KLlpTIwoYd3E9"}
+      data: {"id":"chatcmpl-CLuSIABs2T781fy3TB5oxKKq1rp7R","object":"chat.completion.chunk","created":1759337938,"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":"OFfCbzKVKZXAmj2"}
 
-      data: {"id":"chatcmpl-CLu84UhzdZ1zrRIhmtT16922Ut9HJ","object":"chat.completion.chunk","created":1759336684,"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":"QvEJY0flWco"}
+      data: {"id":"chatcmpl-CLuSIABs2T781fy3TB5oxKKq1rp7R","object":"chat.completion.chunk","created":1759337938,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Change"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"bEQ7drkAq"}
 
-      data: {"id":"chatcmpl-CLu84UhzdZ1zrRIhmtT16922Ut9HJ","object":"chat.completion.chunk","created":1759336684,"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":"KCaffuNe2cXj9"}
+      data: {"id":"chatcmpl-CLuSIABs2T781fy3TB5oxKKq1rp7R","object":"chat.completion.chunk","created":1759337938,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Print"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"mku27xpqAg"}
 
-      data: {"id":"chatcmpl-CLu84UhzdZ1zrRIhmtT16922Ut9HJ","object":"chat.completion.chunk","created":1759336684,"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":"dtWpTnjJZsP"}
+      data: {"id":"chatcmpl-CLuSIABs2T781fy3TB5oxKKq1rp7R","object":"chat.completion.chunk","created":1759337938,"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":"DaN2NEkg"}
 
-      data: {"id":"chatcmpl-CLu84UhzdZ1zrRIhmtT16922Ut9HJ","object":"chat.completion.chunk","created":1759336684,"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":"iOpTa9Rv9B"}
+      data: {"id":"chatcmpl-CLuSIABs2T781fy3TB5oxKKq1rp7R","object":"chat.completion.chunk","created":1759337938,"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":"bEaKtby0w2"}
 
-      data: {"id":"chatcmpl-CLu84UhzdZ1zrRIhmtT16922Ut9HJ","object":"chat.completion.chunk","created":1759336684,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[],"usage":{"prompt_tokens":122,"completion_tokens":7,"total_tokens":129,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"nXTHWpAsOLfx2Z"}
+      data: {"id":"chatcmpl-CLuSIABs2T781fy3TB5oxKKq1rp7R","object":"chat.completion.chunk","created":1759337938,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[],"usage":{"prompt_tokens":122,"completion_tokens":7,"total_tokens":129,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"QRkc7kvcLB2QQ8"}
 
       data: [DONE]
 
@@ -51,15 +51,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 2.15164075s
+    duration: 516.295ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 30588
+    content_length: 30661
     host: ""

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

@@ -24,23 +24,27 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-CLuBhnEkyysqwgjgp0bOe60gZLnhY","object":"chat.completion.chunk","created":1759336909,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"yGefhqtHLOSEAa"}
+      data: {"id":"chatcmpl-CLuVDj86LO7uoa1CdG2mfD3JVwbzF","object":"chat.completion.chunk","created":1759338119,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"n0hU8uavVOkbSZ"}
 
-      data: {"id":"chatcmpl-CLuBhnEkyysqwgjgp0bOe60gZLnhY","object":"chat.completion.chunk","created":1759336909,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":"Creating"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"bcKH4sYI"}
+      data: {"id":"chatcmpl-CLuVDj86LO7uoa1CdG2mfD3JVwbzF","object":"chat.completion.chunk","created":1759338119,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":"Creating"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"yB2tVfbL"}
 
-      data: {"id":"chatcmpl-CLuBhnEkyysqwgjgp0bOe60gZLnhY","object":"chat.completion.chunk","created":1759336909,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":" config"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"uGpgKHgmz"}
+      data: {"id":"chatcmpl-CLuVDj86LO7uoa1CdG2mfD3JVwbzF","object":"chat.completion.chunk","created":1759338119,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"fAGfXdgPdq1bTp"}
 
-      data: {"id":"chatcmpl-CLuBhnEkyysqwgjgp0bOe60gZLnhY","object":"chat.completion.chunk","created":1759336909,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":".json"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"pbAuY789tgg"}
+      data: {"id":"chatcmpl-CLuVDj86LO7uoa1CdG2mfD3JVwbzF","object":"chat.completion.chunk","created":1759338119,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":" JSON"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"1e0rbDm5JBK"}
 
-      data: {"id":"chatcmpl-CLuBhnEkyysqwgjgp0bOe60gZLnhY","object":"chat.completion.chunk","created":1759336909,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":" with"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"WM8xN1hScCN"}
+      data: {"id":"chatcmpl-CLuVDj86LO7uoa1CdG2mfD3JVwbzF","object":"chat.completion.chunk","created":1759338119,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":" Config"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"9K9gPZ6dr"}
 
-      data: {"id":"chatcmpl-CLuBhnEkyysqwgjgp0bOe60gZLnhY","object":"chat.completion.chunk","created":1759336909,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":" JSON"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Q3NUW4DBpIi"}
+      data: {"id":"chatcmpl-CLuVDj86LO7uoa1CdG2mfD3JVwbzF","object":"chat.completion.chunk","created":1759338119,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":" File"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Sewxok0B5hH"}
 
-      data: {"id":"chatcmpl-CLuBhnEkyysqwgjgp0bOe60gZLnhY","object":"chat.completion.chunk","created":1759336909,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":" Content"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"BmSH0JVZ"}
+      data: {"id":"chatcmpl-CLuVDj86LO7uoa1CdG2mfD3JVwbzF","object":"chat.completion.chunk","created":1759338119,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":" with"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"LVZfga5gIAT"}
 
-      data: {"id":"chatcmpl-CLuBhnEkyysqwgjgp0bOe60gZLnhY","object":"chat.completion.chunk","created":1759336909,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"m6y68mVIuN"}
+      data: {"id":"chatcmpl-CLuVDj86LO7uoa1CdG2mfD3JVwbzF","object":"chat.completion.chunk","created":1759338119,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":" Version"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"7FYI6qjD"}
 
-      data: {"id":"chatcmpl-CLuBhnEkyysqwgjgp0bOe60gZLnhY","object":"chat.completion.chunk","created":1759336909,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[],"usage":{"prompt_tokens":137,"completion_tokens":6,"total_tokens":143,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"KZSc2loCPfEiDI"}
+      data: {"id":"chatcmpl-CLuVDj86LO7uoa1CdG2mfD3JVwbzF","object":"chat.completion.chunk","created":1759338119,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{"content":" Info"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"dWSAttdAR9J"}
+
+      data: {"id":"chatcmpl-CLuVDj86LO7uoa1CdG2mfD3JVwbzF","object":"chat.completion.chunk","created":1759338119,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"yEK5tZLeR2"}
+
+      data: {"id":"chatcmpl-CLuVDj86LO7uoa1CdG2mfD3JVwbzF","object":"chat.completion.chunk","created":1759338119,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f33640a400","choices":[],"usage":{"prompt_tokens":137,"completion_tokens":8,"total_tokens":145,"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":"36VYWrnOo8PuzR"}
 
       data: [DONE]
 
@@ -49,15 +53,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 621.512625ms
+    duration: 615.102334ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 30625
+    content_length: 30698
     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-1759336954-fEBioyfTEln652sh0qHZ","provider":"Hyperbolic","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336954,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1759338160-lia6XT1140YVD1V8HPPw","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759338160,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1759336954-fEBioyfTEln652sh0qHZ","provider":"Hyperbolic","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336954,"choices":[{"index":0,"delta":{"role":"assistant","content":"Create"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1759338160-lia6XT1140YVD1V8HPPw","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759338160,"choices":[{"index":0,"delta":{"role":"assistant","content":"Create"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1759336954-fEBioyfTEln652sh0qHZ","provider":"Hyperbolic","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336954,"choices":[{"index":0,"delta":{"role":"assistant","content":" test"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1759338160-lia6XT1140YVD1V8HPPw","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759338160,"choices":[{"index":0,"delta":{"role":"assistant","content":" test"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1759336954-fEBioyfTEln652sh0qHZ","provider":"Hyperbolic","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336954,"choices":[{"index":0,"delta":{"role":"assistant","content":".txt with"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1759338160-lia6XT1140YVD1V8HPPw","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759338160,"choices":[{"index":0,"delta":{"role":"assistant","content":".txt with"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1759336954-fEBioyfTEln652sh0qHZ","provider":"Hyperbolic","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336954,"choices":[{"index":0,"delta":{"role":"assistant","content":" hello bash using"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1759338160-lia6XT1140YVD1V8HPPw","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759338160,"choices":[{"index":0,"delta":{"role":"assistant","content":" hello bash using"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1759336954-fEBioyfTEln652sh0qHZ","provider":"Hyperbolic","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336954,"choices":[{"index":0,"delta":{"role":"assistant","content":" bash"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1759338160-lia6XT1140YVD1V8HPPw","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759338160,"choices":[{"index":0,"delta":{"role":"assistant","content":" bash"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1759336954-fEBioyfTEln652sh0qHZ","provider":"Hyperbolic","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336954,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
+      data: {"id":"gen-1759338160-lia6XT1140YVD1V8HPPw","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759338160,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
 
-      data: {"id":"gen-1759336954-fEBioyfTEln652sh0qHZ","provider":"Hyperbolic","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336954,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":127,"completion_tokens":9,"total_tokens":136,"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.0000381,"upstream_inference_completions_cost":0.0000027},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
+      data: {"id":"gen-1759338160-lia6XT1140YVD1V8HPPw","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759338160,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":127,"completion_tokens":9,"total_tokens":136,"cost":0.00002985,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.00001905,"upstream_inference_completions_cost":0.0000108},"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.5252395s
+    duration: 685.759709ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 30619
+    content_length: 30692
     host: ""

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

@@ -24,19 +24,19 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"gen-1759337052-ukmOPu82M3vZjAu1m5mk","provider":"GMICloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759337052,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1759338169-VQuyzuINOaDHVo3ymv6R","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759338170,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1759337052-ukmOPu82M3vZjAu1m5mk","provider":"GMICloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759337052,"choices":[{"index":0,"delta":{"role":"assistant","content":"Download"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1759338169-VQuyzuINOaDHVo3ymv6R","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759338170,"choices":[{"index":0,"delta":{"role":"assistant","content":"Download"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1759337052-ukmOPu82M3vZjAu1m5mk","provider":"GMICloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759337052,"choices":[{"index":0,"delta":{"role":"assistant","content":" robots"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1759338169-VQuyzuINOaDHVo3ymv6R","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759338170,"choices":[{"index":0,"delta":{"role":"assistant","content":" robots"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1759337052-ukmOPu82M3vZjAu1m5mk","provider":"GMICloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759337052,"choices":[{"index":0,"delta":{"role":"assistant","content":".txt from httpbin"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1759338169-VQuyzuINOaDHVo3ymv6R","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759338170,"choices":[{"index":0,"delta":{"role":"assistant","content":".txt from httpbin"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1759337052-ukmOPu82M3vZjAu1m5mk","provider":"GMICloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759337052,"choices":[{"index":0,"delta":{"role":"assistant","content":".org"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1759338169-VQuyzuINOaDHVo3ymv6R","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759338170,"choices":[{"index":0,"delta":{"role":"assistant","content":".org"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1759337052-ukmOPu82M3vZjAu1m5mk","provider":"GMICloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759337052,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
+      data: {"id":"gen-1759338169-VQuyzuINOaDHVo3ymv6R","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759338170,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
 
-      data: {"id":"gen-1759337052-ukmOPu82M3vZjAu1m5mk","provider":"GMICloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759337052,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":130,"completion_tokens":8,"total_tokens":138,"cost":0.0000315,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.0000195,"upstream_inference_completions_cost":0.000012},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
+      data: {"id":"gen-1759338169-VQuyzuINOaDHVo3ymv6R","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759338170,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":130,"completion_tokens":8,"total_tokens":138,"cost":0.0000291,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.0000195,"upstream_inference_completions_cost":0.0000096},"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.326235334s
+    duration: 941.629583ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 30636
+    content_length: 30709
     host: ""

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

@@ -6,9 +6,9 @@ interactions:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 711
+    content_length: 30681
     host: ""
-    body: '{"messages":[{"content":"you will generate a short title based on the first message a user begins a conversation with\n\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","role":"system"},{"content":"Generate a concise title for the following content:\n\nuse glob to find all .go files in the current directory","role":"user"}],"model":"qwen/qwen3-next-80b-a3b-instruct","max_tokens":40,"stream_options":{"include_usage":true},"usage":{"include":true},"stream":true}'

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

@@ -23,35 +23,21 @@ interactions:
     proto_major: 2
     proto_minor: 0
     content_length: -1
-    body: |+
-      data: {"id":"gen-1759336975-Z1ry5ng9wvlZ2HlctBgU","provider":"GMICloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336975,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1759336975-Z1ry5ng9wvlZ2HlctBgU","provider":"GMICloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336975,"choices":[{"index":0,"delta":{"role":"assistant","content":"Search"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1759336975-Z1ry5ng9wvlZ2HlctBgU","provider":"GMICloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336975,"choices":[{"index":0,"delta":{"role":"assistant","content":" for package in go"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1759336975-Z1ry5ng9wvlZ2HlctBgU","provider":"GMICloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336975,"choices":[{"index":0,"delta":{"role":"assistant","content":" files using grep"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1759336975-Z1ry5ng9wvlZ2HlctBgU","provider":"GMICloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336975,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
-
-      data: {"id":"gen-1759336975-Z1ry5ng9wvlZ2HlctBgU","provider":"GMICloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336975,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":125,"completion_tokens":9,"total_tokens":134,"cost":0.00003225,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.00001875,"upstream_inference_completions_cost":0.0000135},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
-
-      data: [DONE]
-
+    body: '{"error":{"message":"Provider returned error","code":429,"metadata":{"raw":"qwen/qwen3-next-80b-a3b-instruct is temporarily rate-limited upstream. Please retry shortly, or add your own key to accumulate your rate limits: https://openrouter.ai/settings/integrations","provider_name":"GMICloud"}},"user_id":"user_2zMGmKqlf4zmAvL9snVImB1Z1ZQ"}'
     headers:
       Content-Type:
-      - text/event-stream
-    status: 200 OK
-    code: 200
-    duration: 1.244244584s
+      - application/json
+    status: 429 Too Many Requests
+    code: 429
+    duration: 880.966417ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 30606
+    content_length: 30679
     host: ""

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

@@ -23,35 +23,21 @@ interactions:
     proto_major: 2
     proto_minor: 0
     content_length: -1
-    body: |+
-      data: {"id":"gen-1759336979-wU17j8ItMRIXV0KPYwRi","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336979,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1759336979-wU17j8ItMRIXV0KPYwRi","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336979,"choices":[{"index":0,"delta":{"role":"assistant","content":"List"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1759336979-wU17j8ItMRIXV0KPYwRi","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336979,"choices":[{"index":0,"delta":{"role":"assistant","content":" files in current directory"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1759336979-wU17j8ItMRIXV0KPYwRi","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336979,"choices":[{"index":0,"delta":{"role":"assistant","content":" using ls"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1759336979-wU17j8ItMRIXV0KPYwRi","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336979,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
-
-      data: {"id":"gen-1759336979-wU17j8ItMRIXV0KPYwRi","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336979,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":122,"completion_tokens":8,"total_tokens":130,"cost":0.0000279,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.0000183,"upstream_inference_completions_cost":0.0000096},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
-
-      data: [DONE]
-
+    body: '{"error":{"message":"Provider returned error","code":429,"metadata":{"raw":"qwen/qwen3-next-80b-a3b-instruct is temporarily rate-limited upstream. Please retry shortly, or add your own key to accumulate your rate limits: https://openrouter.ai/settings/integrations","provider_name":"GMICloud"}},"user_id":"user_2zMGmKqlf4zmAvL9snVImB1Z1ZQ"}'
     headers:
       Content-Type:
-      - text/event-stream
-    status: 200 OK
-    code: 200
-    duration: 696.278459ms
+      - application/json
+    status: 429 Too Many Requests
+    code: 429
+    duration: 1.266272291s
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 30600
+    content_length: 30673
     host: ""

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

@@ -24,37 +24,37 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"gen-1759336983-e8PSIDUhmBZXLOJ5tJFC","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336984,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1759378400-0QortBKI7SIAJtFnqJF4","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759378400,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1759336983-e8PSIDUhmBZXLOJ5tJFC","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336984,"choices":[{"index":0,"delta":{"role":"assistant","content":"Use"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1759378400-0QortBKI7SIAJtFnqJF4","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759378400,"choices":[{"index":0,"delta":{"role":"assistant","content":"Use"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1759336983-e8PSIDUhmBZXLOJ5tJFC","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336984,"choices":[{"index":0,"delta":{"role":"assistant","content":" mult"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1759378400-0QortBKI7SIAJtFnqJF4","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759378400,"choices":[{"index":0,"delta":{"role":"assistant","content":" mult"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1759336983-e8PSIDUhmBZXLOJ5tJFC","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336984,"choices":[{"index":0,"delta":{"role":"assistant","content":"ied"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1759378400-0QortBKI7SIAJtFnqJF4","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759378400,"choices":[{"index":0,"delta":{"role":"assistant","content":"ied"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1759336983-e8PSIDUhmBZXLOJ5tJFC","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336984,"choices":[{"index":0,"delta":{"role":"assistant","content":"it"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1759378400-0QortBKI7SIAJtFnqJF4","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759378400,"choices":[{"index":0,"delta":{"role":"assistant","content":"it"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1759336983-e8PSIDUhmBZXLOJ5tJFC","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336984,"choices":[{"index":0,"delta":{"role":"assistant","content":" to"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1759378400-0QortBKI7SIAJtFnqJF4","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759378400,"choices":[{"index":0,"delta":{"role":"assistant","content":" to"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1759336983-e8PSIDUhmBZXLOJ5tJFC","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336984,"choices":[{"index":0,"delta":{"role":"assistant","content":" update"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1759378400-0QortBKI7SIAJtFnqJF4","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759378400,"choices":[{"index":0,"delta":{"role":"assistant","content":" update"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1759336983-e8PSIDUhmBZXLOJ5tJFC","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336984,"choices":[{"index":0,"delta":{"role":"assistant","content":" greeting"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1759378400-0QortBKI7SIAJtFnqJF4","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759378400,"choices":[{"index":0,"delta":{"role":"assistant","content":" greeting"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1759336983-e8PSIDUhmBZXLOJ5tJFC","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336984,"choices":[{"index":0,"delta":{"role":"assistant","content":" and"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1759378400-0QortBKI7SIAJtFnqJF4","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759378400,"choices":[{"index":0,"delta":{"role":"assistant","content":" and"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1759336983-e8PSIDUhmBZXLOJ5tJFC","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336984,"choices":[{"index":0,"delta":{"role":"assistant","content":" add"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1759378400-0QortBKI7SIAJtFnqJF4","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759378400,"choices":[{"index":0,"delta":{"role":"assistant","content":" add"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1759336983-e8PSIDUhmBZXLOJ5tJFC","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336984,"choices":[{"index":0,"delta":{"role":"assistant","content":" comment"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1759378400-0QortBKI7SIAJtFnqJF4","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759378400,"choices":[{"index":0,"delta":{"role":"assistant","content":" comment"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1759336983-e8PSIDUhmBZXLOJ5tJFC","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336984,"choices":[{"index":0,"delta":{"role":"assistant","content":" in"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1759378400-0QortBKI7SIAJtFnqJF4","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759378400,"choices":[{"index":0,"delta":{"role":"assistant","content":" in"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1759336983-e8PSIDUhmBZXLOJ5tJFC","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336984,"choices":[{"index":0,"delta":{"role":"assistant","content":" main"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1759378400-0QortBKI7SIAJtFnqJF4","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759378400,"choices":[{"index":0,"delta":{"role":"assistant","content":" main"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1759336983-e8PSIDUhmBZXLOJ5tJFC","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336984,"choices":[{"index":0,"delta":{"role":"assistant","content":".go"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1759378400-0QortBKI7SIAJtFnqJF4","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759378400,"choices":[{"index":0,"delta":{"role":"assistant","content":".go"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1759336983-e8PSIDUhmBZXLOJ5tJFC","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336984,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
+      data: {"id":"gen-1759378400-0QortBKI7SIAJtFnqJF4","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759378400,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
 
-      data: {"id":"gen-1759336983-e8PSIDUhmBZXLOJ5tJFC","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336984,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":145,"completion_tokens":14,"total_tokens":159,"cost":0.0000257,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.0000145,"upstream_inference_completions_cost":0.0000112},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
+      data: {"id":"gen-1759378400-0QortBKI7SIAJtFnqJF4","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759378400,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":145,"completion_tokens":14,"total_tokens":159,"cost":0.00004275,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.00002175,"upstream_inference_completions_cost":0.000021},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
 
       data: [DONE]
 
@@ -63,15 +63,15 @@ interactions:
       - text/event-stream
     status: 200 OK
     code: 200
-    duration: 991.084666ms
+    duration: 1.548603375s
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 30686
+    content_length: 30759
     host: ""

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

@@ -6,9 +6,9 @@ interactions:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 790
+    content_length: 30770
     host: ""
-    body: '{"messages":[{"content":"you will generate a short title based on the first message a user begins a conversation with\n\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","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","role":"user"}],"model":"qwen/qwen3-next-80b-a3b-instruct","max_tokens":40,"stream_options":{"include_usage":true},"usage":{"include":true},"stream":true}'

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

@@ -6,9 +6,9 @@ interactions:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 671
+    content_length: 30643
     host: ""
-    body: '{"messages":[{"content":"you will generate a short title based on the first message a user begins a conversation with\n\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","role":"system"},{"content":"Generate a concise title for the following content:\n\nRead the go mod","role":"user"}],"model":"qwen/qwen3-next-80b-a3b-instruct","max_tokens":40,"stream_options":{"include_usage":true},"usage":{"include":true},"stream":true}'

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

@@ -6,9 +6,9 @@ interactions:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 661
+    content_length: 30633
     host: ""
-    body: '{"messages":[{"content":"you will generate a short title based on the first message a user begins a conversation with\n\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","role":"system"},{"content":"Generate a concise title for the following content:\n\nHello","role":"user"}],"model":"qwen/qwen3-next-80b-a3b-instruct","max_tokens":40,"stream_options":{"include_usage":true},"usage":{"include":true},"stream":true}'

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

@@ -24,31 +24,31 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"gen-1759336997-uww1aUTfxfOdHoq0R1KN","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336997,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1759338211-LicY2wSfLozNiTvKbilm","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759338211,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1759336997-uww1aUTfxfOdHoq0R1KN","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336997,"choices":[{"index":0,"delta":{"role":"assistant","content":"Search"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1759338211-LicY2wSfLozNiTvKbilm","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759338211,"choices":[{"index":0,"delta":{"role":"assistant","content":"Search"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1759336997-uww1aUTfxfOdHoq0R1KN","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336997,"choices":[{"index":0,"delta":{"role":"assistant","content":" for"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1759338211-LicY2wSfLozNiTvKbilm","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759338211,"choices":[{"index":0,"delta":{"role":"assistant","content":" for"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1759336997-uww1aUTfxfOdHoq0R1KN","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336997,"choices":[{"index":0,"delta":{"role":"assistant","content":" func"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1759338211-LicY2wSfLozNiTvKbilm","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759338211,"choices":[{"index":0,"delta":{"role":"assistant","content":" func"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1759336997-uww1aUTfxfOdHoq0R1KN","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336997,"choices":[{"index":0,"delta":{"role":"assistant","content":" main"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1759338211-LicY2wSfLozNiTvKbilm","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759338211,"choices":[{"index":0,"delta":{"role":"assistant","content":" main"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1759336997-uww1aUTfxfOdHoq0R1KN","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336997,"choices":[{"index":0,"delta":{"role":"assistant","content":" in"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1759338211-LicY2wSfLozNiTvKbilm","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759338211,"choices":[{"index":0,"delta":{"role":"assistant","content":" in"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1759336997-uww1aUTfxfOdHoq0R1KN","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336997,"choices":[{"index":0,"delta":{"role":"assistant","content":" Go"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1759338211-LicY2wSfLozNiTvKbilm","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759338211,"choices":[{"index":0,"delta":{"role":"assistant","content":" Go"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1759336997-uww1aUTfxfOdHoq0R1KN","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336997,"choices":[{"index":0,"delta":{"role":"assistant","content":" repositories"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1759338211-LicY2wSfLozNiTvKbilm","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759338211,"choices":[{"index":0,"delta":{"role":"assistant","content":" repositories"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1759336997-uww1aUTfxfOdHoq0R1KN","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336997,"choices":[{"index":0,"delta":{"role":"assistant","content":" using"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1759338211-LicY2wSfLozNiTvKbilm","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759338211,"choices":[{"index":0,"delta":{"role":"assistant","content":" using"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1759336997-uww1aUTfxfOdHoq0R1KN","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336997,"choices":[{"index":0,"delta":{"role":"assistant","content":" Source"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1759338211-LicY2wSfLozNiTvKbilm","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759338211,"choices":[{"index":0,"delta":{"role":"assistant","content":" Source"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1759336997-uww1aUTfxfOdHoq0R1KN","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336997,"choices":[{"index":0,"delta":{"role":"assistant","content":"graph"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1759338211-LicY2wSfLozNiTvKbilm","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759338211,"choices":[{"index":0,"delta":{"role":"assistant","content":"graph"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1759336997-uww1aUTfxfOdHoq0R1KN","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336997,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
+      data: {"id":"gen-1759338211-LicY2wSfLozNiTvKbilm","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759338211,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
 
-      data: {"id":"gen-1759336997-uww1aUTfxfOdHoq0R1KN","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336997,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":125,"completion_tokens":11,"total_tokens":136,"cost":0.0000213,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.0000125,"upstream_inference_completions_cost":0.0000088},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
+      data: {"id":"gen-1759338211-LicY2wSfLozNiTvKbilm","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759338211,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":125,"completion_tokens":11,"total_tokens":136,"cost":0.0000213,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.0000125,"upstream_inference_completions_cost":0.0000088},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
 
       data: [DONE]
 
@@ -57,15 +57,15 @@ interactions:
       - text/event-stream
     status: 200 OK
     code: 200
-    duration: 1.22929525s
+    duration: 1.445218375s
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 30620
+    content_length: 30693
     host: ""

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

@@ -24,19 +24,19 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"gen-1759336941-eKJFGe3QKidxTmheiO6r","provider":"Alibaba","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336941,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":null}
+      data: {"id":"gen-1759338148-cW7pABU0qeaLg0NwSX1d","provider":"Novita","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759338149,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":""}
 
-      data: {"id":"gen-1759336941-eKJFGe3QKidxTmheiO6r","provider":"Alibaba","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336941,"choices":[{"index":0,"delta":{"role":"assistant","content":"Update"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":null}
+      data: {"id":"gen-1759338148-cW7pABU0qeaLg0NwSX1d","provider":"Novita","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759338149,"choices":[{"index":0,"delta":{"role":"assistant","content":"Update"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":""}
 
-      data: {"id":"gen-1759336941-eKJFGe3QKidxTmheiO6r","provider":"Alibaba","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336941,"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-1759338148-cW7pABU0qeaLg0NwSX1d","provider":"Novita","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759338149,"choices":[{"index":0,"delta":{"role":"assistant","content":" main.go to print"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":""}
 
-      data: {"id":"gen-1759336941-eKJFGe3QKidxTmheiO6r","provider":"Alibaba","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336941,"choices":[{"index":0,"delta":{"role":"assistant","content":" hello"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":null}
+      data: {"id":"gen-1759338148-cW7pABU0qeaLg0NwSX1d","provider":"Novita","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759338149,"choices":[{"index":0,"delta":{"role":"assistant","content":" hello"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":""}
 
-      data: {"id":"gen-1759336941-eKJFGe3QKidxTmheiO6r","provider":"Alibaba","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336941,"choices":[{"index":0,"delta":{"role":"assistant","content":" from crush"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":null}
+      data: {"id":"gen-1759338148-cW7pABU0qeaLg0NwSX1d","provider":"Novita","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759338149,"choices":[{"index":0,"delta":{"role":"assistant","content":" from crush"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":""}
 
-      data: {"id":"gen-1759336941-eKJFGe3QKidxTmheiO6r","provider":"Alibaba","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336941,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}],"system_fingerprint":null}
+      data: {"id":"gen-1759338148-cW7pABU0qeaLg0NwSX1d","provider":"Novita","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759338149,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}],"system_fingerprint":""}
 
-      data: {"id":"gen-1759336941-eKJFGe3QKidxTmheiO6r","provider":"Alibaba","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759336941,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":126,"completion_tokens":8,"total_tokens":134,"cost":0.000079,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.000063,"upstream_inference_completions_cost":0.000016},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
+      data: {"id":"gen-1759338148-cW7pABU0qeaLg0NwSX1d","provider":"Novita","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1759338149,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":126,"completion_tokens":8,"total_tokens":134,"cost":0.0000309,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.0000189,"upstream_inference_completions_cost":0.000012},"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.853033542s
+    duration: 1.320866667s
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 30626
+    content_length: 30699
     host: ""

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

@@ -6,9 +6,9 @@ interactions:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 765
+    content_length: 30736
     host: ""
-    body: '{"messages":[{"content":"you will generate a short title based on the first message a user begins a conversation with\n\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","role":"system"},{"content":"Generate a concise title for the following content:\n\nuse write to create a new file called config.json with content ''{\"name\": \"test\", \"version\": \"1.0.0\"}''","role":"user"}],"model":"qwen/qwen3-next-80b-a3b-instruct","max_tokens":40,"stream_options":{"include_usage":true},"usage":{"include":true},"stream":true}'

internal/agent/tools/ls.go 🔗

@@ -1,6 +1,7 @@
 package tools
 
 import (
+	"cmp"
 	"context"
 	_ "embed"
 	"fmt"
@@ -8,6 +9,7 @@ import (
 	"path/filepath"
 	"strings"
 
+	"github.com/charmbracelet/crush/internal/config"
 	"github.com/charmbracelet/crush/internal/fsext"
 	"github.com/charmbracelet/crush/internal/permission"
 	"github.com/charmbracelet/fantasy/ai"
@@ -16,11 +18,13 @@ import (
 type LSParams struct {
 	Path   string   `json:"path" description:"The path to the directory to list (defaults to current working directory)"`
 	Ignore []string `json:"ignore,omitempty" description:"List of glob patterns to ignore"`
+	Depth  int      `json:"depth,omitempty" description:"The maximum depth to traverse"`
 }
 
 type LSPermissionsParams struct {
 	Path   string   `json:"path"`
 	Ignore []string `json:"ignore"`
+	Depth  int      `json:"depth"`
 }
 
 type TreeNode struct {
@@ -37,24 +41,18 @@ type LSResponseMetadata struct {
 
 const (
 	LSToolName = "ls"
-	MaxLSFiles = 1000
+	maxLSFiles = 1000
 )
 
 //go:embed ls.md
 var lsDescription []byte
 
-func NewLsTool(permissions permission.Service, workingDir string) ai.AgentTool {
+func NewLsTool(permissions permission.Service, workingDir string, lsConfig config.ToolLs) ai.AgentTool {
 	return ai.NewAgentTool(
 		LSToolName,
 		string(lsDescription),
 		func(ctx context.Context, params LSParams, call ai.ToolCall) (ai.ToolResponse, error) {
-			searchPath := params.Path
-			if searchPath == "" {
-				searchPath = workingDir
-			}
-
-			var err error
-			searchPath, err = fsext.Expand(searchPath)
+			searchPath, err := fsext.Expand(cmp.Or(params.Path, workingDir))
 			if err != nil {
 				return ai.ToolResponse{}, fmt.Errorf("error expanding path: %w", err)
 			}
@@ -99,45 +97,49 @@ func NewLsTool(permissions permission.Service, workingDir string) ai.AgentTool {
 				}
 			}
 
-			output, err := ListDirectoryTree(searchPath, params.Ignore)
+			output, metadata, err := ListDirectoryTree(searchPath, params, lsConfig)
 			if err != nil {
 				return ai.ToolResponse{}, err
 			}
 
-			// Get file count for metadata
-			files, truncated, err := fsext.ListDirectory(searchPath, params.Ignore, MaxLSFiles)
-			if err != nil {
-				return ai.ToolResponse{}, fmt.Errorf("error listing directory for metadata: %w", err)
-			}
-
 			return ai.WithResponseMetadata(
 				ai.NewTextResponse(output),
-				LSResponseMetadata{
-					NumberOfFiles: len(files),
-					Truncated:     truncated,
-				},
+				metadata,
 			), nil
 		})
 }
 
-func ListDirectoryTree(searchPath string, ignore []string) (string, error) {
+func ListDirectoryTree(searchPath string, params LSParams, lsConfig config.ToolLs) (string, LSResponseMetadata, error) {
 	if _, err := os.Stat(searchPath); os.IsNotExist(err) {
-		return "", fmt.Errorf("path does not exist: %s", searchPath)
+		return "", LSResponseMetadata{}, fmt.Errorf("path does not exist: %s", searchPath)
 	}
 
-	files, truncated, err := fsext.ListDirectory(searchPath, ignore, MaxLSFiles)
+	depth, limit := lsConfig.Limits()
+	maxFiles := min(limit, maxLSFiles)
+	files, truncated, err := fsext.ListDirectory(
+		searchPath,
+		params.Ignore,
+		cmp.Or(params.Depth, depth),
+		maxFiles,
+	)
 	if err != nil {
-		return "", fmt.Errorf("error listing directory: %w", err)
+		return "", LSResponseMetadata{}, fmt.Errorf("error listing directory: %w", err)
 	}
 
+	metadata := LSResponseMetadata{
+		NumberOfFiles: len(files),
+		Truncated:     truncated,
+	}
 	tree := createFileTree(files, searchPath)
-	output := printTree(tree, searchPath)
 
+	var output string
 	if truncated {
-		output = fmt.Sprintf("There are more than %d files in the directory. Use a more specific path or use the Glob tool to find specific files. The first %d files and directories are included below:\n\n%s", MaxLSFiles, MaxLSFiles, output)
+		output = fmt.Sprintf("There are more than %d files in the directory. Use a more specific path or use the Glob tool to find specific files. The first %[1]d files and directories are included below.\n", maxFiles)
 	}
-
-	return output, nil
+	if depth > 0 {
+		output = fmt.Sprintf("The directory tree is shown up to a depth of %d. Use a higher depth and a specific path to see more levels.\n", cmp.Or(params.Depth, depth))
+	}
+	return output + "\n" + printTree(tree, searchPath), metadata, nil
 }
 
 func createFileTree(sortedPaths []string, rootPath string) []*TreeNode {