Merge remote-tracking branch 'origin/main' into ui

Kujtim Hoxha created

Change summary

README.md                                                                          |   3 
go.mod                                                                             |  19 
go.sum                                                                             |  48 
internal/agent/agent.go                                                            |  30 
internal/agent/agent_test.go                                                       |   4 
internal/agent/coordinator.go                                                      |   2 
internal/agent/hyper/provider.go                                                   |   2 
internal/agent/templates/coder.md.tpl                                              |  10 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/bash_tool.yaml             |  30 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/download_tool.yaml         |  27 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/fetch_tool.yaml            |  29 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/glob_tool.yaml             |  29 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/grep_tool.yaml             |  30 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/ls_tool.yaml               |  25 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/multiedit_tool.yaml        |  29 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/parallel_tool_calls.yaml   |  28 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/read_a_file.yaml           |  28 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/simple_test.yaml           |  31 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/sourcegraph_tool.yaml      |  28 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/update_a_file.yaml         |  26 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/write_tool.yaml            |   2 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/bash_tool.yaml                 |  38 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/download_tool.yaml             |  22 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/fetch_tool.yaml                |  28 
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                   |  24 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/multiedit_tool.yaml            |  40 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/parallel_tool_calls.yaml       |  26 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/read_a_file.yaml               |  20 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/simple_test.yaml               |  14 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/sourcegraph_tool.yaml          |  36 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/update_a_file.yaml             |  30 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/write_tool.yaml                |  22 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/bash_tool.yaml           |  20 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/download_tool.yaml       |  24 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/fetch_tool.yaml          |  24 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/glob_tool.yaml           |  30 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/grep_tool.yaml           |   3 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/ls_tool.yaml             |   2 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/multiedit_tool.yaml      |  34 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/parallel_tool_calls.yaml |  20 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/read_a_file.yaml         |  25 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/simple_test.yaml         |  12 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/sourcegraph_tool.yaml    |   3 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/update_a_file.yaml       |  20 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/write_tool.yaml          |  24 
internal/agent/testdata/TestCoderAgent/zai-glm4.6/bash_tool.yaml                   |  20 
internal/agent/testdata/TestCoderAgent/zai-glm4.6/download_tool.yaml               |  18 
internal/agent/testdata/TestCoderAgent/zai-glm4.6/fetch_tool.yaml                  |   2 
internal/agent/testdata/TestCoderAgent/zai-glm4.6/glob_tool.yaml                   |  18 
internal/agent/testdata/TestCoderAgent/zai-glm4.6/grep_tool.yaml                   |   3 
internal/agent/testdata/TestCoderAgent/zai-glm4.6/ls_tool.yaml                     |  18 
internal/agent/testdata/TestCoderAgent/zai-glm4.6/multiedit_tool.yaml              |  24 
internal/agent/testdata/TestCoderAgent/zai-glm4.6/parallel_tool_calls.yaml         |  22 
internal/agent/testdata/TestCoderAgent/zai-glm4.6/read_a_file.yaml                 |  14 
internal/agent/testdata/TestCoderAgent/zai-glm4.6/simple_test.yaml                 |  10 
internal/agent/testdata/TestCoderAgent/zai-glm4.6/sourcegraph_tool.yaml            |  20 
internal/agent/testdata/TestCoderAgent/zai-glm4.6/update_a_file.yaml               |  24 
internal/agent/testdata/TestCoderAgent/zai-glm4.6/write_tool.yaml                  |  22 
internal/agent/tools/diagnostics.go                                                |   2 
internal/agent/tools/edit.go                                                       |  32 
internal/agent/tools/fetch.go                                                      |  22 
internal/agent/tools/ls.go                                                         |  17 
internal/agent/tools/mcp/init.go                                                   |  14 
internal/agent/tools/search.go                                                     | 172 
internal/agent/tools/view.go                                                       |   7 
internal/agent/tools/web_search.go                                                 |   3 
internal/agent/tools/write.go                                                      |   9 
internal/app/app.go                                                                |   9 
internal/app/lsp.go                                                                |   2 
internal/config/load.go                                                            |  17 
internal/event/event.go                                                            |  24 
internal/history/file.go                                                           |   7 
internal/permission/permission.go                                                  |   9 
internal/tui/components/chat/editor/clipboard.go                                   |   8 
internal/tui/components/chat/editor/clipboard_not_supported.go                     |   7 
internal/tui/components/chat/editor/clipboard_supported.go                         |  15 
internal/tui/components/chat/editor/editor.go                                      |  10 
internal/update/update.go                                                          |   2 
80 files changed, 853 insertions(+), 811 deletions(-)

Detailed changes

README.md 🔗

@@ -18,7 +18,8 @@
 - **Session-Based:** maintain multiple work sessions and contexts per project
 - **LSP-Enhanced:** Crush uses LSPs for additional context, just like you do
 - **Extensible:** add capabilities via MCPs (`http`, `stdio`, and `sse`)
-- **Works Everywhere:** first-class support in every terminal on macOS, Linux, Windows (PowerShell and WSL), FreeBSD, OpenBSD, and NetBSD
+- **Works Everywhere:** first-class support in every terminal on macOS, Linux, Windows (PowerShell and WSL), Android, FreeBSD, OpenBSD, and NetBSD
+- **Industrial Grade:** built on the Charm ecosystem, powering 25k+ applications, from leading open source projects to business-critical infrastructure
 
 ## Installation
 

go.mod 🔗

@@ -13,17 +13,17 @@ require (
 	github.com/JohannesKaufmann/html-to-markdown v1.6.0
 	github.com/MakeNowJust/heredoc v1.0.0
 	github.com/PuerkitoBio/goquery v1.11.0
-	github.com/alecthomas/chroma/v2 v2.22.0
+	github.com/alecthomas/chroma/v2 v2.23.0
 	github.com/atotto/clipboard v0.1.4
 	github.com/aymanbagabas/go-nativeclipboard v0.1.2
 	github.com/aymanbagabas/go-udiff v0.3.1
 	github.com/bmatcuk/doublestar/v4 v4.9.2
 	github.com/charlievieth/fastwalk v1.0.14
-	github.com/charmbracelet/catwalk v0.14.1
+	github.com/charmbracelet/catwalk v0.14.2
 	github.com/charmbracelet/colorprofile v0.4.1
 	github.com/charmbracelet/fang v0.4.4
 	github.com/charmbracelet/ultraviolet v0.0.0-20251212194010-b927aa605560
-	github.com/charmbracelet/x/ansi v0.11.3
+	github.com/charmbracelet/x/ansi v0.11.4
 	github.com/charmbracelet/x/editor v0.2.0
 	github.com/charmbracelet/x/etag v0.2.0
 	github.com/charmbracelet/x/exp/charmtone v0.0.0-20260109001716-2fbdffcb221f
@@ -48,7 +48,7 @@ require (
 	github.com/nxadm/tail v1.4.11
 	github.com/openai/openai-go/v2 v2.7.1
 	github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c
-	github.com/posthog/posthog-go v1.8.2
+	github.com/posthog/posthog-go v1.9.0
 	github.com/pressly/goose/v3 v3.26.0
 	github.com/qjebbs/go-jsons v1.0.0-alpha.4
 	github.com/rivo/uniseg v0.4.7
@@ -67,7 +67,7 @@ require (
 	golang.org/x/text v0.33.0
 	gopkg.in/natefinch/lumberjack.v2 v2.2.1
 	gopkg.in/yaml.v3 v3.0.1
-	modernc.org/sqlite v1.43.0
+	modernc.org/sqlite v1.44.2
 	mvdan.cc/sh/moreinterp v0.0.0-20250902163504-3cf4fd5717a5
 	mvdan.cc/sh/v3 v3.12.1-0.20250902163504-3cf4fd5717a5
 )
@@ -104,7 +104,7 @@ require (
 	github.com/charmbracelet/x/json v0.2.0 // indirect
 	github.com/charmbracelet/x/termios v0.1.1 // indirect
 	github.com/charmbracelet/x/windows v0.2.2 // indirect
-	github.com/clipperhouse/displaywidth v0.6.2 // indirect
+	github.com/clipperhouse/displaywidth v0.7.0 // indirect
 	github.com/clipperhouse/stringish v0.1.1 // indirect
 	github.com/clipperhouse/uax29/v2 v2.3.0 // indirect
 	github.com/davecgh/go-spew v1.1.1 // indirect
@@ -118,6 +118,7 @@ require (
 	github.com/go-logr/logr v1.4.3 // indirect
 	github.com/go-logr/stdr v1.2.2 // indirect
 	github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
+	github.com/goccy/go-json v0.10.5 // indirect
 	github.com/goccy/go-yaml v1.19.0 // indirect
 	github.com/google/go-cmp v0.7.0 // indirect
 	github.com/google/jsonschema-go v0.3.0 // indirect
@@ -146,7 +147,7 @@ require (
 	github.com/muesli/mango-cobra v1.2.0 // indirect
 	github.com/muesli/mango-pflag v0.1.0 // indirect
 	github.com/muesli/roff v0.1.0 // indirect
-	github.com/ncruces/go-strftime v0.1.9 // indirect
+	github.com/ncruces/go-strftime v1.0.0 // indirect
 	github.com/ncruces/julianday v1.0.0 // indirect
 	github.com/pierrec/lz4/v4 v4.1.22 // indirect
 	github.com/pmezard/go-difflib v1.0.0 // indirect
@@ -174,7 +175,7 @@ require (
 	go.uber.org/multierr v1.11.0 // indirect
 	go.yaml.in/yaml/v4 v4.0.0-rc.3 // indirect
 	golang.org/x/crypto v0.47.0 // indirect
-	golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b // indirect
+	golang.org/x/exp v0.0.0-20251023183803-a4bb9ffd2546 // indirect
 	golang.org/x/image v0.34.0 // indirect
 	golang.org/x/oauth2 v0.34.0 // indirect
 	golang.org/x/sys v0.40.0 // indirect
@@ -187,7 +188,7 @@ require (
 	google.golang.org/protobuf v1.36.10 // indirect
 	gopkg.in/dnaeon/go-vcr.v4 v4.0.6-0.20251110073552-01de4eb40290 // indirect
 	gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
-	modernc.org/libc v1.66.10 // indirect
+	modernc.org/libc v1.67.6 // indirect
 	modernc.org/mathutil v1.7.1 // indirect
 	modernc.org/memory v1.11.0 // indirect
 )

go.sum 🔗

@@ -39,8 +39,8 @@ github.com/RealAlexandreAI/json-repair v0.0.14 h1:4kTqotVonDVTio5n2yweRUELVcNe2x
 github.com/RealAlexandreAI/json-repair v0.0.14/go.mod h1:GKJi5borR78O8c7HCVbgqjhoiVibZ6hJldxbc6dGrAI=
 github.com/alecthomas/assert/v2 v2.11.0 h1:2Q9r3ki8+JYXvGsDyBXwH3LcJ+WK5D0gc5E8vS6K3D0=
 github.com/alecthomas/assert/v2 v2.11.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k=
-github.com/alecthomas/chroma/v2 v2.22.0 h1:PqEhf+ezz5F5owoDeOUKFzW+W3ZJDShNCaHg4sZuItI=
-github.com/alecthomas/chroma/v2 v2.22.0/go.mod h1:NqVhfBR0lte5Ouh3DcthuUCTUpDC9cxBOfyMbMQPs3o=
+github.com/alecthomas/chroma/v2 v2.23.0 h1:u/Orux1J0eLuZDeQ44froV8smumheieI0EofhbyKhhk=
+github.com/alecthomas/chroma/v2 v2.23.0/go.mod h1:NqVhfBR0lte5Ouh3DcthuUCTUpDC9cxBOfyMbMQPs3o=
 github.com/alecthomas/repr v0.5.2 h1:SU73FTI9D1P5UNtvseffFSGmdNci/O6RsqzeXJtP0Qs=
 github.com/alecthomas/repr v0.5.2/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4=
 github.com/andybalholm/cascadia v1.3.2/go.mod h1:7gtRlve5FxPPgIgX36uWBX58OdBsSS6lUvCFb+h7KvU=
@@ -96,16 +96,16 @@ github.com/charlievieth/fastwalk v1.0.14 h1:3Eh5uaFGwHZd8EGwTjJnSpBkfwfsak9h6ICg
 github.com/charlievieth/fastwalk v1.0.14/go.mod h1:diVcUreiU1aQ4/Wu3NbxxH4/KYdKpLDojrQ1Bb2KgNY=
 github.com/charmbracelet/anthropic-sdk-go v0.0.0-20251024181547-21d6f3d9a904 h1:rwLdEpG9wE6kL69KkEKDiWprO8pQOZHZXeod6+9K+mw=
 github.com/charmbracelet/anthropic-sdk-go v0.0.0-20251024181547-21d6f3d9a904/go.mod h1:8TIYxZxsuCqqeJ0lga/b91tBwrbjoHDC66Sq5t8N2R4=
-github.com/charmbracelet/catwalk v0.14.1 h1:n16H880MHW8PPgQeh0dorP77AJMxw5JcOUPuC3FFhaQ=
-github.com/charmbracelet/catwalk v0.14.1/go.mod h1:qg+Yl9oaZTkTvRscqbxfttzOFQ4v0pOT5XwC7b5O0NQ=
+github.com/charmbracelet/catwalk v0.14.2 h1:7st55IXbMbOaj8/m4Ceb0Ppvz6M879FfYK3e4loUhic=
+github.com/charmbracelet/catwalk v0.14.2/go.mod h1:qg+Yl9oaZTkTvRscqbxfttzOFQ4v0pOT5XwC7b5O0NQ=
 github.com/charmbracelet/colorprofile v0.4.1 h1:a1lO03qTrSIRaK8c3JRxJDZOvhvIeSco3ej+ngLk1kk=
 github.com/charmbracelet/colorprofile v0.4.1/go.mod h1:U1d9Dljmdf9DLegaJ0nGZNJvoXAhayhmidOdcBwAvKk=
 github.com/charmbracelet/fang v0.4.4 h1:G4qKxF6or/eTPgmAolwPuRNyuci3hTUGGX1rj1YkHJY=
 github.com/charmbracelet/fang v0.4.4/go.mod h1:P5/DNb9DddQ0Z0dbc0P3ol4/ix5Po7Ofr2KMBfAqoCo=
 github.com/charmbracelet/ultraviolet v0.0.0-20251212194010-b927aa605560 h1:j3PW2hypGoPKBy3ooKzW0TFxaxhyHK3NbkLLn4KeRFc=
 github.com/charmbracelet/ultraviolet v0.0.0-20251212194010-b927aa605560/go.mod h1:VWATWLRwYP06VYCEur7FsNR2B1xAo7Y+xl1PTbd1ePc=
-github.com/charmbracelet/x/ansi v0.11.3 h1:6DcVaqWI82BBVM/atTyq6yBoRLZFBsnoDoX9GCu2YOI=
-github.com/charmbracelet/x/ansi v0.11.3/go.mod h1:yI7Zslym9tCJcedxz5+WBq+eUGMJT0bM06Fqy1/Y4dI=
+github.com/charmbracelet/x/ansi v0.11.4 h1:6G65PLu6HjmE858CnTUQY1LXT3ZUWwfvqEROLF8vqHI=
+github.com/charmbracelet/x/ansi v0.11.4/go.mod h1:/5AZ+UfWExW3int5H5ugnsG/PWjNcSQcwYsHBlPFQN4=
 github.com/charmbracelet/x/editor v0.2.0 h1:7XLUKtaRaB8jN7bWU2p2UChiySyaAuIfYiIRg8gGWwk=
 github.com/charmbracelet/x/editor v0.2.0/go.mod h1:p3oQ28TSL3YPd+GKJ1fHWcp+7bVGpedHpXmo0D6t1dY=
 github.com/charmbracelet/x/etag v0.2.0 h1:Euj1VkheoHfTYA9y+TCwkeXF/hN8Fb9l4LqZl79pt04=
@@ -130,8 +130,8 @@ github.com/charmbracelet/x/termios v0.1.1 h1:o3Q2bT8eqzGnGPOYheoYS8eEleT5ZVNYNy8
 github.com/charmbracelet/x/termios v0.1.1/go.mod h1:rB7fnv1TgOPOyyKRJ9o+AsTU/vK5WHJ2ivHeut/Pcwo=
 github.com/charmbracelet/x/windows v0.2.2 h1:IofanmuvaxnKHuV04sC0eBy/smG6kIKrWG2/jYn2GuM=
 github.com/charmbracelet/x/windows v0.2.2/go.mod h1:/8XtdKZzedat74NQFn0NGlGL4soHB0YQZrETF96h75k=
-github.com/clipperhouse/displaywidth v0.6.2 h1:ZDpTkFfpHOKte4RG5O/BOyf3ysnvFswpyYrV7z2uAKo=
-github.com/clipperhouse/displaywidth v0.6.2/go.mod h1:R+kHuzaYWFkTm7xoMmK1lFydbci4X2CicfbGstSGg0o=
+github.com/clipperhouse/displaywidth v0.7.0 h1:QNv1GYsnLX9QBrcWUtMlogpTXuM5FVnBwKWp1O5NwmE=
+github.com/clipperhouse/displaywidth v0.7.0/go.mod h1:R+kHuzaYWFkTm7xoMmK1lFydbci4X2CicfbGstSGg0o=
 github.com/clipperhouse/stringish v0.1.1 h1:+NSqMOr3GR6k1FdRhhnXrLfztGzuG+VuFDfatpWHKCs=
 github.com/clipperhouse/stringish v0.1.1/go.mod h1:v/WhFtE1q0ovMta2+m+UbpZ+2/HEXNWYXQgCt4hdOzA=
 github.com/clipperhouse/uax29/v2 v2.3.0 h1:SNdx9DVUqMoBuBoW3iLOj4FQv3dN5mDtuqwuhIGpJy4=
@@ -181,6 +181,8 @@ github.com/go-quicktest/qt v1.101.0 h1:O1K29Txy5P2OK0dGo59b7b0LR6wKfIhttaAhHUyn7
 github.com/go-quicktest/qt v1.101.0/go.mod h1:14Bz/f7NwaXPtdYEgzsx46kqSxVwTbzVZsDC26tQJow=
 github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs=
 github.com/go-viper/mapstructure/v2 v2.4.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=
+github.com/goccy/go-json v0.10.5 h1:Fq85nIqj+gXn/S5ahsiTlK3TmC85qgirsdTP/+DeaC4=
+github.com/goccy/go-json v0.10.5/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M=
 github.com/goccy/go-yaml v1.19.0 h1:EmkZ9RIsX+Uq4DYFowegAuJo8+xdX3T/2dwNPXbxEYE=
 github.com/goccy/go-yaml v1.19.0/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA=
 github.com/golang-jwt/jwt/v5 v5.2.2 h1:Rl4B7itRWVtYIHFrSNd7vhTiz9UpLdi6gZhZ3wEeDy8=
@@ -271,8 +273,8 @@ github.com/muesli/termenv v0.16.0 h1:S5AlUN9dENB57rsbnkPyfdGuWIlkmzJjbFf0Tf5FWUc
 github.com/muesli/termenv v0.16.0/go.mod h1:ZRfOIKPFDYQoDFF4Olj7/QJbW60Ol/kL1pU3VfY/Cnk=
 github.com/ncruces/go-sqlite3 v0.30.4 h1:j9hEoOL7f9ZoXl8uqXVniaq1VNwlWAXihZbTvhqPPjA=
 github.com/ncruces/go-sqlite3 v0.30.4/go.mod h1:7WR20VSC5IZusKhUdiR9y1NsUqnZgqIYCmKKoMEYg68=
-github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4=
-github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls=
+github.com/ncruces/go-strftime v1.0.0 h1:HMFp8mLCTPp341M/ZnA4qaf7ZlsbTc+miZjCLOFAw7w=
+github.com/ncruces/go-strftime v1.0.0/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls=
 github.com/ncruces/julianday v1.0.0 h1:fH0OKwa7NWvniGQtxdJRxAgkBMolni2BjDHaWTxqt7M=
 github.com/ncruces/julianday v1.0.0/go.mod h1:Dusn2KvZrrovOMJuOt0TNXL6tB7U2E8kvza5fFc9G7g=
 github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 h1:zYyBkD/k9seD2A7fsi6Oo2LfFZAehjjQMERAvZLEDnQ=
@@ -292,8 +294,8 @@ github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 h1:GFCKgm
 github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8=
 github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
 github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/posthog/posthog-go v1.8.2 h1:v/ajsM8lq+2Z3OlQbTVWqiHI+hyh9Cd4uiQt1wFlehE=
-github.com/posthog/posthog-go v1.8.2/go.mod h1:ueZiJCmHezyDHI/swIR1RmOfktLehnahJnFxEvQ9mnQ=
+github.com/posthog/posthog-go v1.9.0 h1:7tRfnaHqPNrBNTnSnFLQwJ5aVz6LOBngiwl15lD8bHU=
+github.com/posthog/posthog-go v1.9.0/go.mod h1:0i1H2BlsK9mHvHGc9Kp6oenUlHUqPl45hWzRtR/2PVI=
 github.com/pressly/goose/v3 v3.26.0 h1:KJakav68jdH0WDvoAcj8+n61WqOIaPGgH0bJWS6jpmM=
 github.com/pressly/goose/v3 v3.26.0/go.mod h1:4hC1KrritdCxtuFsqgs1R4AU5bWtTAf+cnWvfhf2DNY=
 github.com/qjebbs/go-jsons v1.0.0-alpha.4 h1:Qsb4ohRUHQODIUAsJKdKJ/SIDbsO7oGOzsfy+h1yQZs=
@@ -395,8 +397,8 @@ golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v
 golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk=
 golang.org/x/crypto v0.47.0 h1:V6e3FRj+n4dbpw86FJ8Fv7XVOql7TEwpHapKoMJ/GO8=
 golang.org/x/crypto v0.47.0/go.mod h1:ff3Y9VzzKbwSSEzWqJsJVBnWmRwRSHt/6Op5n9bQc4A=
-golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b h1:M2rDM6z3Fhozi9O7NWsxAkg/yqS/lQJ6PmkyIV3YP+o=
-golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b/go.mod h1:3//PLf8L/X+8b4vuAfHzxeRUl04Adcb341+IGKfnqS8=
+golang.org/x/exp v0.0.0-20251023183803-a4bb9ffd2546 h1:mgKeJMpvi0yx/sU5GsxQ7p6s2wtOnGAHZWCHUM4KGzY=
+golang.org/x/exp v0.0.0-20251023183803-a4bb9ffd2546/go.mod h1:j/pmGrbnkbPtQfxEe5D0VQhZC6qKbfKifgD0oM7sR70=
 golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
 golang.org/x/image v0.34.0 h1:33gCkyw9hmwbZJeZkct8XyR11yH889EQt/QH4VmXMn8=
 golang.org/x/image v0.34.0/go.mod h1:2RNFBZRB+vnwwFil8GkMdRvrJOFd1AzdZI6vOY+eJVU=
@@ -512,18 +514,20 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
 gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
 gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
 gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
-modernc.org/cc/v4 v4.26.5 h1:xM3bX7Mve6G8K8b+T11ReenJOT+BmVqQj0FY5T4+5Y4=
-modernc.org/cc/v4 v4.26.5/go.mod h1:uVtb5OGqUKpoLWhqwNQo/8LwvoiEBLvZXIQ/SmO6mL0=
-modernc.org/ccgo/v4 v4.28.1 h1:wPKYn5EC/mYTqBO373jKjvX2n+3+aK7+sICCv4Fjy1A=
-modernc.org/ccgo/v4 v4.28.1/go.mod h1:uD+4RnfrVgE6ec9NGguUNdhqzNIeeomeXf6CL0GTE5Q=
+modernc.org/cc/v4 v4.27.1 h1:9W30zRlYrefrDV2JE2O8VDtJ1yPGownxciz5rrbQZis=
+modernc.org/cc/v4 v4.27.1/go.mod h1:uVtb5OGqUKpoLWhqwNQo/8LwvoiEBLvZXIQ/SmO6mL0=
+modernc.org/ccgo/v4 v4.30.1 h1:4r4U1J6Fhj98NKfSjnPUN7Ze2c6MnAdL0hWw6+LrJpc=
+modernc.org/ccgo/v4 v4.30.1/go.mod h1:bIOeI1JL54Utlxn+LwrFyjCx2n2RDiYEaJVSrgdrRfM=
 modernc.org/fileutil v1.3.40 h1:ZGMswMNc9JOCrcrakF1HrvmergNLAmxOPjizirpfqBA=
 modernc.org/fileutil v1.3.40/go.mod h1:HxmghZSZVAz/LXcMNwZPA/DRrQZEVP9VX0V4LQGQFOc=
 modernc.org/gc/v2 v2.6.5 h1:nyqdV8q46KvTpZlsw66kWqwXRHdjIlJOhG6kxiV/9xI=
 modernc.org/gc/v2 v2.6.5/go.mod h1:YgIahr1ypgfe7chRuJi2gD7DBQiKSLMPgBQe9oIiito=
+modernc.org/gc/v3 v3.1.1 h1:k8T3gkXWY9sEiytKhcgyiZ2L0DTyCQ/nvX+LoCljoRE=
+modernc.org/gc/v3 v3.1.1/go.mod h1:HFK/6AGESC7Ex+EZJhJ2Gni6cTaYpSMmU/cT9RmlfYY=
 modernc.org/goabi0 v0.2.0 h1:HvEowk7LxcPd0eq6mVOAEMai46V+i7Jrj13t4AzuNks=
 modernc.org/goabi0 v0.2.0/go.mod h1:CEFRnnJhKvWT1c1JTI3Avm+tgOWbkOu5oPA8eH8LnMI=
-modernc.org/libc v1.66.10 h1:yZkb3YeLx4oynyR+iUsXsybsX4Ubx7MQlSYEw4yj59A=
-modernc.org/libc v1.66.10/go.mod h1:8vGSEwvoUoltr4dlywvHqjtAqHBaw0j1jI7iFBTAr2I=
+modernc.org/libc v1.67.6 h1:eVOQvpModVLKOdT+LvBPjdQqfrZq+pC39BygcT+E7OI=
+modernc.org/libc v1.67.6/go.mod h1:JAhxUVlolfYDErnwiqaLvUqc8nfb2r6S6slAgZOnaiE=
 modernc.org/mathutil v1.7.1 h1:GCZVGXdaN8gTqB1Mf/usp1Y/hSqgI2vAGGP4jZMCxOU=
 modernc.org/mathutil v1.7.1/go.mod h1:4p5IwJITfppl0G4sUEDtCr4DthTaT47/N3aT6MhfgJg=
 modernc.org/memory v1.11.0 h1:o4QC8aMQzmcwCK3t3Ux/ZHmwFPzE6hf2Y5LbkRs+hbI=
@@ -532,8 +536,8 @@ modernc.org/opt v0.1.4 h1:2kNGMRiUjrp4LcaPuLY2PzUfqM/w9N23quVwhKt5Qm8=
 modernc.org/opt v0.1.4/go.mod h1:03fq9lsNfvkYSfxrfUhZCWPk1lm4cq4N+Bh//bEtgns=
 modernc.org/sortutil v1.2.1 h1:+xyoGf15mM3NMlPDnFqrteY07klSFxLElE2PVuWIJ7w=
 modernc.org/sortutil v1.2.1/go.mod h1:7ZI3a3REbai7gzCLcotuw9AC4VZVpYMjDzETGsSMqJE=
-modernc.org/sqlite v1.43.0 h1:8YqiFx3G1VhHTXO2Q00bl1Wz9KhS9Q5okwfp9Y97VnA=
-modernc.org/sqlite v1.43.0/go.mod h1:+VkC6v3pLOAE0A0uVucQEcbVW0I5nHCeDaBf+DpsQT8=
+modernc.org/sqlite v1.44.2 h1:EdYqXeBpKFJjg8QYnw6E71MpANkoxyuYi+g68ugOL8g=
+modernc.org/sqlite v1.44.2/go.mod h1:CzbrU2lSB1DKUusvwGz7rqEKIq+NUd8GWuBBZDs9/nA=
 modernc.org/strutil v1.2.1 h1:UneZBkQA+DX2Rp35KcM69cSsNES9ly8mQWD71HKlOA0=
 modernc.org/strutil v1.2.1/go.mod h1:EHkiggD70koQxjVdSBM3JKM7k6L0FbGE5eymy9i3B9A=
 modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y=

internal/agent/agent.go 🔗

@@ -38,9 +38,17 @@ import (
 	"github.com/charmbracelet/crush/internal/permission"
 	"github.com/charmbracelet/crush/internal/session"
 	"github.com/charmbracelet/crush/internal/stringext"
+	"github.com/charmbracelet/x/exp/charmtone"
 )
 
-const defaultSessionName = "Untitled Session"
+const (
+	defaultSessionName = "Untitled Session"
+
+	// Constants for auto-summarization thresholds
+	largeContextWindowThreshold = 200_000
+	largeContextWindowBuffer    = 20_000
+	smallContextWindowRatio     = 0.2
+)
 
 //go:embed templates/title.md
 var titlePrompt []byte
@@ -383,10 +391,10 @@ func (a *sessionAgent) Run(ctx context.Context, call SessionAgentCall) (*fantasy
 				tokens := currentSession.CompletionTokens + currentSession.PromptTokens
 				remaining := cw - tokens
 				var threshold int64
-				if cw > 200_000 {
-					threshold = 20_000
+				if cw > largeContextWindowThreshold {
+					threshold = largeContextWindowBuffer
 				} else {
-					threshold = int64(float64(cw) * 0.2)
+					threshold = int64(float64(cw) * smallContextWindowRatio)
 				}
 				if (remaining <= threshold) && !a.disableAutoSummarize {
 					shouldSummarize = true
@@ -466,18 +474,19 @@ func (a *sessionAgent) Run(ctx context.Context, call SessionAgentCall) (*fantasy
 		var fantasyErr *fantasy.Error
 		var providerErr *fantasy.ProviderError
 		const defaultTitle = "Provider Error"
+		linkStyle := lipgloss.NewStyle().Foreground(charmtone.Guac).Underline(true)
 		if isCancelErr {
 			currentAssistant.AddFinish(message.FinishReasonCanceled, "User canceled request", "")
 		} else if isPermissionErr {
 			currentAssistant.AddFinish(message.FinishReasonPermissionDenied, "User denied permission", "")
 		} else if errors.Is(err, hyper.ErrNoCredits) {
 			url := hyper.BaseURL()
-			link := lipgloss.NewStyle().Hyperlink(url, "id=hyper").Render(url)
+			link := linkStyle.Hyperlink(url, "id=hyper").Render(url)
 			currentAssistant.AddFinish(message.FinishReasonError, "No credits", "You're out of credits. Add more at "+link)
 		} else if errors.As(err, &providerErr) {
 			if providerErr.Message == "The requested model is not supported." {
 				url := "https://github.com/settings/copilot/features"
-				link := lipgloss.NewStyle().Hyperlink(url, "id=hyper").Render(url)
+				link := linkStyle.Hyperlink(url, "id=copilot").Render(url)
 				currentAssistant.AddFinish(
 					message.FinishReasonError,
 					"Copilot model not enabled",
@@ -720,15 +729,15 @@ func (a *sessionAgent) getSessionMessages(ctx context.Context, session session.S
 	}
 
 	if session.SummaryMessageID != "" {
-		summaryMsgInex := -1
+		summaryMsgIndex := -1
 		for i, msg := range msgs {
 			if msg.ID == session.SummaryMessageID {
-				summaryMsgInex = i
+				summaryMsgIndex = i
 				break
 			}
 		}
-		if summaryMsgInex != -1 {
-			msgs = msgs[summaryMsgInex:]
+		if summaryMsgIndex != -1 {
+			msgs = msgs[summaryMsgIndex:]
 			msgs[0].Role = message.User
 		}
 	}
@@ -811,7 +820,6 @@ func (a *sessionAgent) generateTitle(ctx context.Context, sessionID string, user
 	// Clean up title.
 	var title string
 	title = strings.ReplaceAll(resp.Response.Content.Text(), "\n", " ")
-	slog.Info("generated title", "title", title)
 
 	// Remove thinking tags if present.
 	title = thinkTagRegex.ReplaceAllString(title, "")

internal/agent/agent_test.go 🔗

@@ -455,10 +455,6 @@ func TestCoderAgent(t *testing.T) {
 				require.Contains(t, string(content), "Hello, Crush!", "Expected file to contain 'Hello, Crush!'")
 			})
 			t.Run("sourcegraph tool", func(t *testing.T) {
-				if runtime.GOOS == "darwin" {
-					t.Skip("skipping flacky test on macos for now")
-				}
-
 				agent, env := setupAgent(t, pair)
 
 				session, err := env.sessions.Create(t.Context(), "New Session")

internal/agent/coordinator.go 🔗

@@ -489,7 +489,7 @@ func (c *coordinator) buildAgentModels(ctx context.Context, isSubAgent bool) (Mo
 	}
 
 	if smallCatwalkModel == nil {
-		return Model{}, Model{}, errors.New("snall model not found in provider config")
+		return Model{}, Model{}, errors.New("small model not found in provider config")
 	}
 
 	largeModelID := largeModelCfg.Model

internal/agent/hyper/provider.go 🔗

@@ -326,5 +326,5 @@ func retryAfter(resp *http.Response) string {
 		d := time.Duration(after) * time.Second
 		return "Try again in " + d.String()
 	}
-	return "Try again in later"
+	return "Try again later"
 }

internal/agent/templates/coder.md.tpl 🔗

@@ -15,6 +15,7 @@ These rules override everything else. Follow them strictly:
 10. **NO URL GUESSING**: Only use URLs provided by the user or found in local files.
 11. **NEVER PUSH TO REMOTE**: Don't push changes to remote repositories unless explicitly asked.
 12. **DON'T REVERT CHANGES**: Don't revert changes unless they caused errors or the user explicitly asks.
+13. **TOOL CONSTRAINTS**: Only use documented tools. Never attempt 'apply_patch' or 'apply_diff' - they don't exist. Use 'edit' or 'multiedit' instead.
 </critical_rules>
 
 <communication_style>
@@ -130,6 +131,13 @@ Examples of autonomous decisions:
 </decision_making>
 
 <editing_files>
+**Available edit tools:**
+- `edit` - Single find/replace in a file
+- `multiedit` - Multiple find/replace operations in one file
+- `write` - Create/overwrite entire file
+
+Never use `apply_patch` or similar - those tools don't exist.
+
 Critical: ALWAYS read files before editing them in this conversation.
 
 When using edit tools:
@@ -290,6 +298,8 @@ After significant changes:
 - Only use the tools you know exist.
 
 <bash_commands>
+**CRITICAL**: The `description` parameter is REQUIRED for all bash tool calls. Always provide it.
+
 When running non-trivial bash commands (especially those that modify the system):
 - Briefly explain what the command does and why you're running it
 - This ensures the user understands potentially dangerous operations

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

@@ -25,52 +25,52 @@ interactions:
     content_length: -1
     body: |+
       event: message_start
-      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_01Ca5xhYzdyJq1rP5TwDth2W","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":152,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":3,"service_tier":"standard"}}          }
+      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_01Lij7hAdrqXtCCiddzXdoGK","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":152,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":2,"service_tier":"standard"}}}
 
       event: content_block_start
-      data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}      }
+      data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}       }
 
-      event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Bash File"}         }
+      event: ping
+      data: {"type": "ping"}
 
       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":"Bash"} }
 
-      event: ping
-      data: {"type": "ping"}
+      event: content_block_delta
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" File"}              }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" with"}       }
+      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":" Hello"} }
+      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":" Content"}               }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"d"}    }
 
       event: content_block_stop
-      data: {"type":"content_block_stop","index":0            }
+      data: {"type":"content_block_stop","index":0       }
 
       event: message_delta
-      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":152,"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":152,"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: 734.910625ms
+    duration: 811.339375ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 51899
+    content_length: 52393
     host: ""

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

@@ -25,46 +25,49 @@ interactions:
     content_length: -1
     body: |+
       event: message_start
-      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_012dSg4T5MVDEgj8PUhB7ihp","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":160,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":1,"service_tier":"standard"}}       }
+      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_011YAinXEYrTqbpsq4sBCjxA","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":160,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":1,"service_tier":"standard"}}        }
 
       event: content_block_start
-      data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}             }
+      data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}       }
+
+      event: ping
+      data: {"type": "ping"}
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Downloa"}     }
+      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 File"}          }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"d File"}         }
 
-      event: ping
-      data: {"type": "ping"}
+      event: content_block_delta
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" from Example"}       }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" from Example URL"}          }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" URL"}              }
 
       event: content_block_stop
-      data: {"type":"content_block_stop","index":0   }
+      data: {"type":"content_block_stop","index":0 }
 
       event: message_delta
-      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":160,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":8}             }
+      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":160,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":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: 733.403208ms
+    duration: 640.901ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 51924
+    content_length: 52418
     host: ""

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

@@ -25,52 +25,55 @@ interactions:
     content_length: -1
     body: |+
       event: message_start
-      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_0143Jw7v3wgt2bpCFEtGkuHv","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":167,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":1,"service_tier":"standard"}} }
+      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_01QHs42eeZPJbxjrFBiaSQu3","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":167,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":1,"service_tier":"standard"}}              }
 
       event: content_block_start
-      data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}         }
+      data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}             }
+
+      event: ping
+      data: {"type": "ping"}
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Web"}           }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Website"}       }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Page Search"} }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Content"}         }
 
-      event: ping
-      data: {"type": "ping"}
+      event: content_block_delta
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Check"}      }
 
       event: content_block_delta
       data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" for"}   }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" John"}         }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" 'John Doe"}              }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Doe"}             }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"'"}           }
 
       event: content_block_stop
-      data: {"type":"content_block_stop","index":0            }
+      data: {"type":"content_block_stop","index":0        }
 
       event: message_delta
-      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":167,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":10}    }
+      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":167,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":13}       }
 
       event: message_stop
-      data: {"type":"message_stop"             }
+      data: {"type":"message_stop"               }
 
     headers:
       Content-Type:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 1.120772708s
+    duration: 601.885125ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 51942
+    content_length: 52436
     host: ""

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

@@ -25,49 +25,52 @@ interactions:
     content_length: -1
     body: |+
       event: message_start
-      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_01UJrSNzeuTRKfD6edRAnioA","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":142,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":3,"service_tier":"standard"}}          }
+      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_016WcJGfCcpgVqfScPMNdmBp","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":142,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":1,"service_tier":"standard"}}              }
 
       event: content_block_start
-      data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}   }
+      data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}    }
+
+      event: ping
+      data: {"type": "ping"}
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Glob Go"}        }
+      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":" Files"}     }
+      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"}     }
 
       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":" with"}            }
 
       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":" Glob"}       }
 
       event: content_block_stop
-      data: {"type":"content_block_stop","index":0              }
+      data: {"type":"content_block_stop","index":0             }
 
       event: message_delta
-      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":142,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":10}     }
+      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":142,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":9}            }
 
       event: message_stop
-      data: {"type":"message_stop"           }
+      data: {"type":"message_stop"         }
 
     headers:
       Content-Type:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 596.908916ms
+    duration: 683.862917ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 51860
+    content_length: 52354
     host: ""

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

@@ -25,52 +25,52 @@ interactions:
     content_length: -1
     body: |+
       event: message_start
-      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_01EPKmtSyVdvAn6uZoDUPvmm","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":144,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":2,"service_tier":"standard"}}        }
+      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_0181LpjAHqcVep2LP8kMttkT","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":144,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":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":"Searching"}      }
+      event: ping
+      data: {"type": "ping"}
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" for "}          }
+      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":" Files"}        }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"'package' in Go"}           }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Package"} }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" files with"}            }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Search with"}              }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" grep"}}
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Grep"}        }
 
       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":144,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":15}           }
+      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":144,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":10}         }
 
       event: message_stop
-      data: {"type":"message_stop"            }
+      data: {"type":"message_stop"  }
 
     headers:
       Content-Type:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 669.560167ms
+    duration: 647.254041ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 51858
+    content_length: 52352
     host: ""

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

@@ -25,37 +25,46 @@ interactions:
     content_length: -1
     body: |+
       event: message_start
-      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_01GS9L44gUzv4ei1fm9E5B1T","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":140,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":6,"service_tier":"standard"}}}
+      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_01MFyJCeDt5XVr7qQrdbfQ3Z","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":140,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":1,"service_tier":"standard"}}  }
 
       event: content_block_start
-      data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}         }
+      data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}               }
+
+      event: ping
+      data: {"type": "ping"}
+
+      event: content_block_delta
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"List"}      }
+
+      event: content_block_delta
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Files"}      }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Listing Files in Current Directory"}             }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" in Current Directory"}        }
 
       event: content_block_stop
-      data: {"type":"content_block_stop","index":0          }
+      data: {"type":"content_block_stop","index":0           }
 
       event: message_delta
-      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":140,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":9}             }
+      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":140,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":8} }
 
       event: message_stop
-      data: {"type":"message_stop"   }
+      data: {"type":"message_stop"          }
 
     headers:
       Content-Type:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 588.114167ms
+    duration: 539.973208ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 51852
+    content_length: 52346
     host: ""

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

@@ -25,49 +25,52 @@ interactions:
     content_length: -1
     body: |+
       event: message_start
-      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_01Vi9HRV9KsgZmVqi14RD4Qd","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":170,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":1,"service_tier":"standard"}}       }
+      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_01MWKFC4YJpdfdLd6h1kfcfd","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":170,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":2,"service_tier":"standard"}}   }
 
       event: content_block_start
-      data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}  }
+      data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}        }
+
+      event: ping
+      data: {"type": "ping"}
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Edit"}      }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Modify"}     }
 
       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":" Hello"}              }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Code"}    }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Worl"}  }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Greeting"}        }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"d Greeting"}           }
 
       event: content_block_stop
-      data: {"type":"content_block_stop","index":0        }
+      data: {"type":"content_block_stop","index":0           }
 
       event: message_delta
-      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":170,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":8}   }
+      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":170,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":10}               }
 
       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: 672.068792ms
+    duration: 664.226709ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 51938
+    content_length: 52432
     host: ""

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

@@ -25,49 +25,49 @@ interactions:
     content_length: -1
     body: |+
       event: message_start
-      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_01MvZPBgrJ1PxooW6vcTNgTP","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":159,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":2,"service_tier":"standard"}}  }
+      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_011AxTk6fRGrP3MaJPbdM1kh","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":159,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":2,"service_tier":"standard"}}               }
 
       event: content_block_start
-      data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}         }
+      data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}}
 
-      event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Parallel"}    }
+      event: ping
+      data: {"type": "ping"}
 
       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":"Parallel"}}
 
-      event: ping
-      data: {"type": "ping"}
+      event: content_block_delta
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Go File"}       }
 
       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":" an"}             }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" and Listing"}      }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"d Directory Listing"}            }
 
       event: content_block_stop
-      data: {"type":"content_block_stop","index":0 }
+      data: {"type":"content_block_stop","index":0        }
 
       event: message_delta
-      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":159,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":11} }
+      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":159,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":11}         }
 
       event: message_stop
-      data: {"type":"message_stop"              }
+      data: {"type":"message_stop" }
 
     headers:
       Content-Type:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 643.790917ms
+    duration: 636.447167ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 51949
+    content_length: 52443
     host: ""

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

@@ -25,49 +25,49 @@ interactions:
     content_length: -1
     body: |+
       event: message_start
-      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_01WSfpakrUTZru3pucFjjWmQ","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":134,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":1,"service_tier":"standard"}}       }
+      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_01BS8RX55UAXGbe4XdL5VxK5","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":134,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":1,"service_tier":"standard"}}          }
 
       event: content_block_start
-      data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}      }
+      data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}}
 
-      event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Rea"}    }
+      event: ping
+      data: {"type": "ping"}
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"d Go"}     }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Rea"}     }
 
-      event: ping
-      data: {"type": "ping"}
+      event: content_block_delta
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"d Go"}          }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Module"}     }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Module"}               }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Dependencies"}        }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Details"}     }
 
       event: content_block_stop
-      data: {"type":"content_block_stop","index":0               }
+      data: {"type":"content_block_stop","index":0            }
 
       event: message_delta
-      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":134,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":7}          }
+      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":134,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":7}       }
 
       event: message_stop
-      data: {"type":"message_stop"            }
+      data: {"type":"message_stop"         }
 
     headers:
       Content-Type:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 987.366375ms
+    duration: 589.305792ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 51822
+    content_length: 52316
     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":{"model":"claude-3-5-haiku-20241022","id":"msg_01TxmeH5H2NGkxM58ZrqhuU1","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":131,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":1,"service_tier":"standard"}}        }
+      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_01RhwrPwqgU78kv4XsoesFPF","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":131,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":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: ping
+      data: {"type": "ping"}
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Quick"}        }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Quick"}              }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Greeting"}      }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Chat"}        }
 
-      event: ping
-      data: {"type": "ping"}
+      event: content_block_delta
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Opener"}   }
 
       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":131,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":6}    }
+      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":131,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":7}}
 
       event: message_stop
-      data: {"type":"message_stop"             }
+      data: {"type":"message_stop"  }
 
     headers:
       Content-Type:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 700.496625ms
+    duration: 705.524375ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 51812
+    content_length: 52306
     host: ""

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

@@ -25,49 +25,49 @@ interactions:
     content_length: -1
     body: |+
       event: message_start
-      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_014dxeWmvWs82uYJw8q11pgi","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":145,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":3,"service_tier":"standard"}}               }
+      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_01FkLqqw1crC8WC9dAUtwxqu","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":145,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":3,"service_tier":"standard"}}          }
 
       event: content_block_start
-      data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}    }
+      data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}         }
 
-      event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Searching Go"}          }
+      event: ping
+      data: {"type": "ping"}
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Repos"}       }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Searching Go"}        }
 
-      event: ping
-      data: {"type": "ping"}
+      event: content_block_delta
+      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":" for Main"}      }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" for Main"}            }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Function"}}
+      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":145,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":11}   }
+      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":145,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":11}           }
 
       event: message_stop
-      data: {"type":"message_stop"       }
+      data: {"type":"message_stop"            }
 
     headers:
       Content-Type:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 720.76ms
+    duration: 640.628291ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 51872
+    content_length: 52366
     host: ""

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

@@ -25,49 +25,49 @@ interactions:
     content_length: -1
     body: |+
       event: message_start
-      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_018Kk1bqYYWgiDzM5DRrtHhL","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":145,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":1,"service_tier":"standard"}}    }
+      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_0198CQ2JnP8dYvrKr27saGVX","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":145,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":1,"service_tier":"standard"}}    }
 
       event: content_block_start
-      data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""} }
+      data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}          }
 
-      event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Update"}  }
+      event: ping
+      data: {"type": "ping"}
 
       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":"Update"}      }
 
-      event: ping
-      data: {"type": "ping"}
+      event: content_block_delta
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" main"}               }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":".go Hello"}            }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":".go print"}        }
 
       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":" message"}           }
 
       event: content_block_stop
       data: {"type":"content_block_stop","index":0       }
 
       event: message_delta
-      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":145,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":9}           }
+      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":145,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":9}             }
 
       event: message_stop
-      data: {"type":"message_stop"       }
+      data: {"type":"message_stop"    }
 
     headers:
       Content-Type:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 694.563833ms
+    duration: 557.108833ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 51878
+    content_length: 52372
     host: ""

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

@@ -24,39 +24,23 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-ClYsFUmhoDNbyWMbB2NUY9x4VTTUz","object":"chat.completion.chunk","created":1765451507,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Td2HKw2IKaNJr9"}
+      data: {"id":"chatcmpl-Czjp9999VWZzcDOifgxBIBqcSm4HT","object":"chat.completion.chunk","created":1768830191,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"bUV63yG95BqGXw"}
 
-      data: {"id":"chatcmpl-ClYsFUmhoDNbyWMbB2NUY9x4VTTUz","object":"chat.completion.chunk","created":1765451507,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":"Create"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Ey6L7K1jHN"}
+      data: {"id":"chatcmpl-Czjp9999VWZzcDOifgxBIBqcSm4HT","object":"chat.completion.chunk","created":1768830191,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":"Create"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"1z0Fv3Tkd6"}
 
-      data: {"id":"chatcmpl-ClYsFUmhoDNbyWMbB2NUY9x4VTTUz","object":"chat.completion.chunk","created":1765451507,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":" '"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"fxtu1PxLkFzDn0"}
+      data: {"id":"chatcmpl-Czjp9999VWZzcDOifgxBIBqcSm4HT","object":"chat.completion.chunk","created":1768830191,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" File"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"C426rRcRvG6"}
 
-      data: {"id":"chatcmpl-ClYsFUmhoDNbyWMbB2NUY9x4VTTUz","object":"chat.completion.chunk","created":1765451507,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":"test"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"qLh2W9DjfN9T"}
+      data: {"id":"chatcmpl-Czjp9999VWZzcDOifgxBIBqcSm4HT","object":"chat.completion.chunk","created":1768830191,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"FngAUBvZG3n71"}
 
-      data: {"id":"chatcmpl-ClYsFUmhoDNbyWMbB2NUY9x4VTTUz","object":"chat.completion.chunk","created":1765451507,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":".txt"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"sYxRQ6oIdl88"}
+      data: {"id":"chatcmpl-Czjp9999VWZzcDOifgxBIBqcSm4HT","object":"chat.completion.chunk","created":1768830191,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" Bash"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"k82T3NyIeZn"}
 
-      data: {"id":"chatcmpl-ClYsFUmhoDNbyWMbB2NUY9x4VTTUz","object":"chat.completion.chunk","created":1765451507,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":"'"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"izmAYTbsu7SDTrw"}
+      data: {"id":"chatcmpl-Czjp9999VWZzcDOifgxBIBqcSm4HT","object":"chat.completion.chunk","created":1768830191,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" Without"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Vbe4EU54"}
 
-      data: {"id":"chatcmpl-ClYsFUmhoDNbyWMbB2NUY9x4VTTUz","object":"chat.completion.chunk","created":1765451507,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":" with"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"eQKZqQvnykY"}
+      data: {"id":"chatcmpl-Czjp9999VWZzcDOifgxBIBqcSm4HT","object":"chat.completion.chunk","created":1768830191,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" Timestamp"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"yGQZi2"}
 
-      data: {"id":"chatcmpl-ClYsFUmhoDNbyWMbB2NUY9x4VTTUz","object":"chat.completion.chunk","created":1765451507,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":" '"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"CfOJWpN6vzSRL6"}
+      data: {"id":"chatcmpl-Czjp9999VWZzcDOifgxBIBqcSm4HT","object":"chat.completion.chunk","created":1768830191,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"fC0Xm5I8zq"}
 
-      data: {"id":"chatcmpl-ClYsFUmhoDNbyWMbB2NUY9x4VTTUz","object":"chat.completion.chunk","created":1765451507,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":"hello"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"AKmZ7DtXoX1"}
-
-      data: {"id":"chatcmpl-ClYsFUmhoDNbyWMbB2NUY9x4VTTUz","object":"chat.completion.chunk","created":1765451507,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":" bash"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"0jL8W258MN9"}
-
-      data: {"id":"chatcmpl-ClYsFUmhoDNbyWMbB2NUY9x4VTTUz","object":"chat.completion.chunk","created":1765451507,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":"'"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"hrqjW9CeiV7hZV3"}
-
-      data: {"id":"chatcmpl-ClYsFUmhoDNbyWMbB2NUY9x4VTTUz","object":"chat.completion.chunk","created":1765451507,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":" ("},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"vNmpaJaHqND1Zq"}
-
-      data: {"id":"chatcmpl-ClYsFUmhoDNbyWMbB2NUY9x4VTTUz","object":"chat.completion.chunk","created":1765451507,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":"No"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"MIhLl8PruYZSZ4"}
-
-      data: {"id":"chatcmpl-ClYsFUmhoDNbyWMbB2NUY9x4VTTUz","object":"chat.completion.chunk","created":1765451507,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":" Timestamp"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"mawxsP"}
-
-      data: {"id":"chatcmpl-ClYsFUmhoDNbyWMbB2NUY9x4VTTUz","object":"chat.completion.chunk","created":1765451507,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":")"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"mXXHjOhPYNysGmp"}
-
-      data: {"id":"chatcmpl-ClYsFUmhoDNbyWMbB2NUY9x4VTTUz","object":"chat.completion.chunk","created":1765451507,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"ychGSlZNPt"}
-
-      data: {"id":"chatcmpl-ClYsFUmhoDNbyWMbB2NUY9x4VTTUz","object":"chat.completion.chunk","created":1765451507,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[],"usage":{"prompt_tokens":145,"completion_tokens":14,"total_tokens":159,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"G55W87gCWryQY"}
+      data: {"id":"chatcmpl-Czjp9999VWZzcDOifgxBIBqcSm4HT","object":"chat.completion.chunk","created":1768830191,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[],"usage":{"prompt_tokens":145,"completion_tokens":6,"total_tokens":151,"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":"PJLKHqx144Bd0A"}
 
       data: [DONE]
 
@@ -65,15 +49,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 868.570625ms
+    duration: 462.517083ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50240
+    content_length: 50734
     host: ""

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

@@ -24,23 +24,23 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-ClYUKarTNIqX0Kpv3s4rrlesi91DJ","object":"chat.completion.chunk","created":1765450024,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_ed643dde95","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"SBHFH8rdbeYWL0"}
+      data: {"id":"chatcmpl-CzjpMASHGa0KE7gogMQsoEw5kBkKm","object":"chat.completion.chunk","created":1768830204,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_deacdd5f6f","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"tc5dsBZDiWj1KC"}
 
-      data: {"id":"chatcmpl-ClYUKarTNIqX0Kpv3s4rrlesi91DJ","object":"chat.completion.chunk","created":1765450024,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_ed643dde95","choices":[{"index":0,"delta":{"content":"Download"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"bPE41kWI"}
+      data: {"id":"chatcmpl-CzjpMASHGa0KE7gogMQsoEw5kBkKm","object":"chat.completion.chunk","created":1768830204,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_deacdd5f6f","choices":[{"index":0,"delta":{"content":"Download"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"5EIK1K0G"}
 
-      data: {"id":"chatcmpl-ClYUKarTNIqX0Kpv3s4rrlesi91DJ","object":"chat.completion.chunk","created":1765450024,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_ed643dde95","choices":[{"index":0,"delta":{"content":" and"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"5ATvd6pCxOj1"}
+      data: {"id":"chatcmpl-CzjpMASHGa0KE7gogMQsoEw5kBkKm","object":"chat.completion.chunk","created":1768830204,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_deacdd5f6f","choices":[{"index":0,"delta":{"content":" and"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"iZvzUc95rMPu"}
 
-      data: {"id":"chatcmpl-ClYUKarTNIqX0Kpv3s4rrlesi91DJ","object":"chat.completion.chunk","created":1765450024,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_ed643dde95","choices":[{"index":0,"delta":{"content":" Save"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"k8YyVLEJsFk"}
+      data: {"id":"chatcmpl-CzjpMASHGa0KE7gogMQsoEw5kBkKm","object":"chat.completion.chunk","created":1768830204,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_deacdd5f6f","choices":[{"index":0,"delta":{"content":" Save"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"c4VqjRgTgUo"}
 
-      data: {"id":"chatcmpl-ClYUKarTNIqX0Kpv3s4rrlesi91DJ","object":"chat.completion.chunk","created":1765450024,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_ed643dde95","choices":[{"index":0,"delta":{"content":" Example"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"4hxPHL2k"}
+      data: {"id":"chatcmpl-CzjpMASHGa0KE7gogMQsoEw5kBkKm","object":"chat.completion.chunk","created":1768830204,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_deacdd5f6f","choices":[{"index":0,"delta":{"content":" Example"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"90hZHZYg"}
 
-      data: {"id":"chatcmpl-ClYUKarTNIqX0Kpv3s4rrlesi91DJ","object":"chat.completion.chunk","created":1765450024,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_ed643dde95","choices":[{"index":0,"delta":{"content":".txt"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"jBNwgbcsI5wb"}
+      data: {"id":"chatcmpl-CzjpMASHGa0KE7gogMQsoEw5kBkKm","object":"chat.completion.chunk","created":1768830204,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_deacdd5f6f","choices":[{"index":0,"delta":{"content":".txt"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"99FcHSsVLzva"}
 
-      data: {"id":"chatcmpl-ClYUKarTNIqX0Kpv3s4rrlesi91DJ","object":"chat.completion.chunk","created":1765450024,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_ed643dde95","choices":[{"index":0,"delta":{"content":" File"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"mEEqjnrY9iu"}
+      data: {"id":"chatcmpl-CzjpMASHGa0KE7gogMQsoEw5kBkKm","object":"chat.completion.chunk","created":1768830204,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_deacdd5f6f","choices":[{"index":0,"delta":{"content":" File"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"cdp2a07T0OB"}
 
-      data: {"id":"chatcmpl-ClYUKarTNIqX0Kpv3s4rrlesi91DJ","object":"chat.completion.chunk","created":1765450024,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_ed643dde95","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"mF3cv51yHC"}
+      data: {"id":"chatcmpl-CzjpMASHGa0KE7gogMQsoEw5kBkKm","object":"chat.completion.chunk","created":1768830204,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_deacdd5f6f","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"ijDn66iVAI"}
 
-      data: {"id":"chatcmpl-ClYUKarTNIqX0Kpv3s4rrlesi91DJ","object":"chat.completion.chunk","created":1765450024,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_ed643dde95","choices":[],"usage":{"prompt_tokens":148,"completion_tokens":6,"total_tokens":154,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"645bmFBdewh6aK"}
+      data: {"id":"chatcmpl-CzjpMASHGa0KE7gogMQsoEw5kBkKm","object":"chat.completion.chunk","created":1768830204,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_deacdd5f6f","choices":[],"usage":{"prompt_tokens":148,"completion_tokens":6,"total_tokens":154,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"C9d9Vz5rJwg0pZ"}
 
       data: [DONE]
 
@@ -49,15 +49,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 2.300206458s
+    duration: 1.09768275s
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50265
+    content_length: 50759
     host: ""

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

@@ -24,29 +24,29 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-ClYURxJKlkr2y8aUeB1zPKa2nZofo","object":"chat.completion.chunk","created":1765450031,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_37d212baff","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"5yRyROJJtY3tB1"}
+      data: {"id":"chatcmpl-CzjpXY0NnY3HE3lqVJsX1E0QZnClg","object":"chat.completion.chunk","created":1768830215,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"VhKLdJMzPv4zTF"}
 
-      data: {"id":"chatcmpl-ClYURxJKlkr2y8aUeB1zPKa2nZofo","object":"chat.completion.chunk","created":1765450031,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_37d212baff","choices":[{"index":0,"delta":{"content":"Check"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"yKEWMPUcA8L"}
+      data: {"id":"chatcmpl-CzjpXY0NnY3HE3lqVJsX1E0QZnClg","object":"chat.completion.chunk","created":1768830215,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":"Check"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"hrg10QzQcmP"}
 
-      data: {"id":"chatcmpl-ClYURxJKlkr2y8aUeB1zPKa2nZofo","object":"chat.completion.chunk","created":1765450031,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_37d212baff","choices":[{"index":0,"delta":{"content":" HTML"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"5BVjTNgwxGF"}
+      data: {"id":"chatcmpl-CzjpXY0NnY3HE3lqVJsX1E0QZnClg","object":"chat.completion.chunk","created":1768830215,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" HTML"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"NAFAT7HZQQx"}
 
-      data: {"id":"chatcmpl-ClYURxJKlkr2y8aUeB1zPKa2nZofo","object":"chat.completion.chunk","created":1765450031,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_37d212baff","choices":[{"index":0,"delta":{"content":" for"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"kp7eosJWJN8K"}
+      data: {"id":"chatcmpl-CzjpXY0NnY3HE3lqVJsX1E0QZnClg","object":"chat.completion.chunk","created":1768830215,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" for"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"9R8aoN7LrXit"}
 
-      data: {"id":"chatcmpl-ClYURxJKlkr2y8aUeB1zPKa2nZofo","object":"chat.completion.chunk","created":1765450031,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_37d212baff","choices":[{"index":0,"delta":{"content":" '"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"EI6mQF37usHe1k"}
+      data: {"id":"chatcmpl-CzjpXY0NnY3HE3lqVJsX1E0QZnClg","object":"chat.completion.chunk","created":1768830215,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" '"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"mDowc6tWWiEJXY"}
 
-      data: {"id":"chatcmpl-ClYURxJKlkr2y8aUeB1zPKa2nZofo","object":"chat.completion.chunk","created":1765450031,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_37d212baff","choices":[{"index":0,"delta":{"content":"John"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ABTUDL8cGfX4"}
+      data: {"id":"chatcmpl-CzjpXY0NnY3HE3lqVJsX1E0QZnClg","object":"chat.completion.chunk","created":1768830215,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":"John"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"wabcvWDKuvBw"}
 
-      data: {"id":"chatcmpl-ClYURxJKlkr2y8aUeB1zPKa2nZofo","object":"chat.completion.chunk","created":1765450031,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_37d212baff","choices":[{"index":0,"delta":{"content":" Doe"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"wkDSMVE1HEGV"}
+      data: {"id":"chatcmpl-CzjpXY0NnY3HE3lqVJsX1E0QZnClg","object":"chat.completion.chunk","created":1768830215,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" Doe"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"p6l0NKowhtjv"}
 
-      data: {"id":"chatcmpl-ClYURxJKlkr2y8aUeB1zPKa2nZofo","object":"chat.completion.chunk","created":1765450031,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_37d212baff","choices":[{"index":0,"delta":{"content":"'"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"WGqcOyHkVBUn3GN"}
+      data: {"id":"chatcmpl-CzjpXY0NnY3HE3lqVJsX1E0QZnClg","object":"chat.completion.chunk","created":1768830215,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":"'"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"kDCOIpSDBsg27ap"}
 
-      data: {"id":"chatcmpl-ClYURxJKlkr2y8aUeB1zPKa2nZofo","object":"chat.completion.chunk","created":1765450031,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_37d212baff","choices":[{"index":0,"delta":{"content":" Occ"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"jRNw7JwV0CjM"}
+      data: {"id":"chatcmpl-CzjpXY0NnY3HE3lqVJsX1E0QZnClg","object":"chat.completion.chunk","created":1768830215,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" Occ"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"hlKaj6olmcVp"}
 
-      data: {"id":"chatcmpl-ClYURxJKlkr2y8aUeB1zPKa2nZofo","object":"chat.completion.chunk","created":1765450031,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_37d212baff","choices":[{"index":0,"delta":{"content":"urrence"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"BUi0S3QiX"}
+      data: {"id":"chatcmpl-CzjpXY0NnY3HE3lqVJsX1E0QZnClg","object":"chat.completion.chunk","created":1768830215,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":"urrence"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"bK6IboJu4"}
 
-      data: {"id":"chatcmpl-ClYURxJKlkr2y8aUeB1zPKa2nZofo","object":"chat.completion.chunk","created":1765450031,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_37d212baff","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"8eZz7vsWF5"}
+      data: {"id":"chatcmpl-CzjpXY0NnY3HE3lqVJsX1E0QZnClg","object":"chat.completion.chunk","created":1768830215,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"jz37ZuJ2Cs"}
 
-      data: {"id":"chatcmpl-ClYURxJKlkr2y8aUeB1zPKa2nZofo","object":"chat.completion.chunk","created":1765450031,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_37d212baff","choices":[],"usage":{"prompt_tokens":153,"completion_tokens":9,"total_tokens":162,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"xh04QkW7pY8HBI"}
+      data: {"id":"chatcmpl-CzjpXY0NnY3HE3lqVJsX1E0QZnClg","object":"chat.completion.chunk","created":1768830215,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[],"usage":{"prompt_tokens":153,"completion_tokens":9,"total_tokens":162,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"oGOHC8f5F7ED98"}
 
       data: [DONE]
 
@@ -55,15 +55,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 685.04625ms
+    duration: 485.428208ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50283
+    content_length: 50777
     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-ClYUaN1fZ88qHwOrCQkkOMgziqdJE","object":"chat.completion.chunk","created":1765450040,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"OJxEBFRUQsMFtg"}
+      data: {"id":"chatcmpl-Czjpfn0duo3n07ZV2M1UoetlL84LL","object":"chat.completion.chunk","created":1768830223,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"AN8kcBopW7413w"}
 
-      data: {"id":"chatcmpl-ClYUaN1fZ88qHwOrCQkkOMgziqdJE","object":"chat.completion.chunk","created":1765450040,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":"Finding"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"JOYRZ62s3"}
+      data: {"id":"chatcmpl-Czjpfn0duo3n07ZV2M1UoetlL84LL","object":"chat.completion.chunk","created":1768830223,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":"Finding"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"s9ELbRDAV"}
 
-      data: {"id":"chatcmpl-ClYUaN1fZ88qHwOrCQkkOMgziqdJE","object":"chat.completion.chunk","created":1765450040,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":" ."},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"j6Tj6K3c90Yt3W"}
+      data: {"id":"chatcmpl-Czjpfn0duo3n07ZV2M1UoetlL84LL","object":"chat.completion.chunk","created":1768830223,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" ."},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"O9h76mLSPhdkPa"}
 
-      data: {"id":"chatcmpl-ClYUaN1fZ88qHwOrCQkkOMgziqdJE","object":"chat.completion.chunk","created":1765450040,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":"go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"7tEx9wpgaAxzdu"}
+      data: {"id":"chatcmpl-Czjpfn0duo3n07ZV2M1UoetlL84LL","object":"chat.completion.chunk","created":1768830223,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":"go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"uzz6sXLNppHb1H"}
 
-      data: {"id":"chatcmpl-ClYUaN1fZ88qHwOrCQkkOMgziqdJE","object":"chat.completion.chunk","created":1765450040,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":" Files"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"w8uoytyqQX"}
+      data: {"id":"chatcmpl-Czjpfn0duo3n07ZV2M1UoetlL84LL","object":"chat.completion.chunk","created":1768830223,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" Files"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"clQKAC0BtS"}
 
-      data: {"id":"chatcmpl-ClYUaN1fZ88qHwOrCQkkOMgziqdJE","object":"chat.completion.chunk","created":1765450040,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":" with"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"WoTpGAB81rR"}
+      data: {"id":"chatcmpl-Czjpfn0duo3n07ZV2M1UoetlL84LL","object":"chat.completion.chunk","created":1768830223,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" with"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"iMDIUEkMuf4"}
 
-      data: {"id":"chatcmpl-ClYUaN1fZ88qHwOrCQkkOMgziqdJE","object":"chat.completion.chunk","created":1765450040,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":" Glob"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"PhwR6Lr1W2b"}
+      data: {"id":"chatcmpl-Czjpfn0duo3n07ZV2M1UoetlL84LL","object":"chat.completion.chunk","created":1768830223,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" Glob"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"N6NRkYKNrMR"}
 
-      data: {"id":"chatcmpl-ClYUaN1fZ88qHwOrCQkkOMgziqdJE","object":"chat.completion.chunk","created":1765450040,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"wGYtTunHNFOqz"}
+      data: {"id":"chatcmpl-Czjpfn0duo3n07ZV2M1UoetlL84LL","object":"chat.completion.chunk","created":1768830223,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"phy8zvhGTaAdn"}
 
-      data: {"id":"chatcmpl-ClYUaN1fZ88qHwOrCQkkOMgziqdJE","object":"chat.completion.chunk","created":1765450040,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":" Current"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"GmUMW63r"}
+      data: {"id":"chatcmpl-Czjpfn0duo3n07ZV2M1UoetlL84LL","object":"chat.completion.chunk","created":1768830223,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" Current"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"M4ITICZy"}
 
-      data: {"id":"chatcmpl-ClYUaN1fZ88qHwOrCQkkOMgziqdJE","object":"chat.completion.chunk","created":1765450040,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":" Directory"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"gl03qy"}
+      data: {"id":"chatcmpl-Czjpfn0duo3n07ZV2M1UoetlL84LL","object":"chat.completion.chunk","created":1768830223,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" Directory"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"1tNMzp"}
 
-      data: {"id":"chatcmpl-ClYUaN1fZ88qHwOrCQkkOMgziqdJE","object":"chat.completion.chunk","created":1765450040,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"UIlF9C9uHC"}
+      data: {"id":"chatcmpl-Czjpfn0duo3n07ZV2M1UoetlL84LL","object":"chat.completion.chunk","created":1768830223,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"bPVsxaKeA3"}
 
-      data: {"id":"chatcmpl-ClYUaN1fZ88qHwOrCQkkOMgziqdJE","object":"chat.completion.chunk","created":1765450040,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[],"usage":{"prompt_tokens":137,"completion_tokens":9,"total_tokens":146,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"oFQUOYK96zZmPi"}
+      data: {"id":"chatcmpl-Czjpfn0duo3n07ZV2M1UoetlL84LL","object":"chat.completion.chunk","created":1768830223,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[],"usage":{"prompt_tokens":137,"completion_tokens":9,"total_tokens":146,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"pCeZlHbKDEb9MQ"}
 
       data: [DONE]
 
@@ -55,15 +55,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 947.669917ms
+    duration: 565.294416ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50201
+    content_length: 50695
     host: ""

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

@@ -24,31 +24,33 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-ClYUe1xFnvcKQKG4RuOQ7N6udiviD","object":"chat.completion.chunk","created":1765450044,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"POqwkKG8YiDyy0"}
+      data: {"id":"chatcmpl-CzjpkEXSYoFaA6TqesglhFgtKBe5E","object":"chat.completion.chunk","created":1768830228,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"TvvAs6UXCKtJpO"}
 
-      data: {"id":"chatcmpl-ClYUe1xFnvcKQKG4RuOQ7N6udiviD","object":"chat.completion.chunk","created":1765450044,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":"Search"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"2btCOIXhWM"}
+      data: {"id":"chatcmpl-CzjpkEXSYoFaA6TqesglhFgtKBe5E","object":"chat.completion.chunk","created":1768830228,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":"Using"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"8mJifko0V1D"}
 
-      data: {"id":"chatcmpl-ClYUe1xFnvcKQKG4RuOQ7N6udiviD","object":"chat.completion.chunk","created":1765450044,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":" for"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"BwZPah5cfikl"}
+      data: {"id":"chatcmpl-CzjpkEXSYoFaA6TqesglhFgtKBe5E","object":"chat.completion.chunk","created":1768830228,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" Gre"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"7Gbs6dE1n9QQ"}
 
-      data: {"id":"chatcmpl-ClYUe1xFnvcKQKG4RuOQ7N6udiviD","object":"chat.completion.chunk","created":1765450044,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":" '"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"qyBZswbttoUeIY"}
+      data: {"id":"chatcmpl-CzjpkEXSYoFaA6TqesglhFgtKBe5E","object":"chat.completion.chunk","created":1768830228,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":"p"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"gsKuzPEBBzSDIgF"}
 
-      data: {"id":"chatcmpl-ClYUe1xFnvcKQKG4RuOQ7N6udiviD","object":"chat.completion.chunk","created":1765450044,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":"package"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"dsDpObmN7"}
+      data: {"id":"chatcmpl-CzjpkEXSYoFaA6TqesglhFgtKBe5E","object":"chat.completion.chunk","created":1768830228,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" to"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Jd1M7N6pYuirn"}
 
-      data: {"id":"chatcmpl-ClYUe1xFnvcKQKG4RuOQ7N6udiviD","object":"chat.completion.chunk","created":1765450044,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":"'"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ADkAO80x66rXmxm"}
+      data: {"id":"chatcmpl-CzjpkEXSYoFaA6TqesglhFgtKBe5E","object":"chat.completion.chunk","created":1768830228,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" Search"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"WPPnJsnrD"}
 
-      data: {"id":"chatcmpl-ClYUe1xFnvcKQKG4RuOQ7N6udiviD","object":"chat.completion.chunk","created":1765450044,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Dp6aKDV1Z4jnQ"}
+      data: {"id":"chatcmpl-CzjpkEXSYoFaA6TqesglhFgtKBe5E","object":"chat.completion.chunk","created":1768830228,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" '"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"3FD4N3lDA8dIIq"}
 
-      data: {"id":"chatcmpl-ClYUe1xFnvcKQKG4RuOQ7N6udiviD","object":"chat.completion.chunk","created":1765450044,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":" Go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"4UyYDdU3Cadkf"}
+      data: {"id":"chatcmpl-CzjpkEXSYoFaA6TqesglhFgtKBe5E","object":"chat.completion.chunk","created":1768830228,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":"Package"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"sYRitOpVY"}
 
-      data: {"id":"chatcmpl-ClYUe1xFnvcKQKG4RuOQ7N6udiviD","object":"chat.completion.chunk","created":1765450044,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":" files"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"xyLaxPFI4m"}
+      data: {"id":"chatcmpl-CzjpkEXSYoFaA6TqesglhFgtKBe5E","object":"chat.completion.chunk","created":1768830228,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":"'"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Psh8uHyftKu9OaD"}
 
-      data: {"id":"chatcmpl-ClYUe1xFnvcKQKG4RuOQ7N6udiviD","object":"chat.completion.chunk","created":1765450044,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":" using"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"dlRVu0jf49"}
+      data: {"id":"chatcmpl-CzjpkEXSYoFaA6TqesglhFgtKBe5E","object":"chat.completion.chunk","created":1768830228,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"uB9fseVHm8Qq9"}
 
-      data: {"id":"chatcmpl-ClYUe1xFnvcKQKG4RuOQ7N6udiviD","object":"chat.completion.chunk","created":1765450044,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":" grep"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"odbXZTumUQi"}
+      data: {"id":"chatcmpl-CzjpkEXSYoFaA6TqesglhFgtKBe5E","object":"chat.completion.chunk","created":1768830228,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" Go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"toOBGh8cblQKy"}
 
-      data: {"id":"chatcmpl-ClYUe1xFnvcKQKG4RuOQ7N6udiviD","object":"chat.completion.chunk","created":1765450044,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"sLpASQkyNb"}
+      data: {"id":"chatcmpl-CzjpkEXSYoFaA6TqesglhFgtKBe5E","object":"chat.completion.chunk","created":1768830228,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" Files"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Px8UAjDQ1Y"}
 
-      data: {"id":"chatcmpl-ClYUe1xFnvcKQKG4RuOQ7N6udiviD","object":"chat.completion.chunk","created":1765450044,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[],"usage":{"prompt_tokens":138,"completion_tokens":10,"total_tokens":148,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"Tdzb4OOwUXRLi"}
+      data: {"id":"chatcmpl-CzjpkEXSYoFaA6TqesglhFgtKBe5E","object":"chat.completion.chunk","created":1768830228,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"WEiddfZXsi"}
+
+      data: {"id":"chatcmpl-CzjpkEXSYoFaA6TqesglhFgtKBe5E","object":"chat.completion.chunk","created":1768830228,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[],"usage":{"prompt_tokens":138,"completion_tokens":11,"total_tokens":149,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"fyOv9URDB7WPO"}
 
       data: [DONE]
 
@@ -57,15 +59,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 518.165708ms
+    duration: 529.456125ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50199
+    content_length: 50693
     host: ""

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

@@ -24,25 +24,23 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-ClYUlAU7xGXiwlwnygOdjHO2xgdO6","object":"chat.completion.chunk","created":1765450051,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"UMEDmK4bRTEHog"}
+      data: {"id":"chatcmpl-Czjpp21JrAlDsrAmzS6iFO2WfXAXE","object":"chat.completion.chunk","created":1768830233,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"n0nG28t5ZBF6ER"}
 
-      data: {"id":"chatcmpl-ClYUlAU7xGXiwlwnygOdjHO2xgdO6","object":"chat.completion.chunk","created":1765450051,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":"List"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"wU2AW7M98xeA"}
+      data: {"id":"chatcmpl-Czjpp21JrAlDsrAmzS6iFO2WfXAXE","object":"chat.completion.chunk","created":1768830233,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":"Listing"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Qy6L2dEVd"}
 
-      data: {"id":"chatcmpl-ClYUlAU7xGXiwlwnygOdjHO2xgdO6","object":"chat.completion.chunk","created":1765450051,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":" Files"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"caiI3nEYPC"}
+      data: {"id":"chatcmpl-Czjpp21JrAlDsrAmzS6iFO2WfXAXE","object":"chat.completion.chunk","created":1768830233,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" Files"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"OGWA86hnC9"}
 
-      data: {"id":"chatcmpl-ClYUlAU7xGXiwlwnygOdjHO2xgdO6","object":"chat.completion.chunk","created":1765450051,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":" Using"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"LcoGEjOXBA"}
+      data: {"id":"chatcmpl-Czjpp21JrAlDsrAmzS6iFO2WfXAXE","object":"chat.completion.chunk","created":1768830233,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" with"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"d0UrCtvqjuH"}
 
-      data: {"id":"chatcmpl-ClYUlAU7xGXiwlwnygOdjHO2xgdO6","object":"chat.completion.chunk","created":1765450051,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":" '"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"olW4ETtXnechmp"}
+      data: {"id":"chatcmpl-Czjpp21JrAlDsrAmzS6iFO2WfXAXE","object":"chat.completion.chunk","created":1768830233,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" the"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"KJia9s0n7rDV"}
 
-      data: {"id":"chatcmpl-ClYUlAU7xGXiwlwnygOdjHO2xgdO6","object":"chat.completion.chunk","created":1765450051,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":"ls"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"YY41B40ymUy5c5"}
+      data: {"id":"chatcmpl-Czjpp21JrAlDsrAmzS6iFO2WfXAXE","object":"chat.completion.chunk","created":1768830233,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" ls"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"3rzKom80l93ug"}
 
-      data: {"id":"chatcmpl-ClYUlAU7xGXiwlwnygOdjHO2xgdO6","object":"chat.completion.chunk","created":1765450051,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":"'"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"I2np6t9M3AUO0SA"}
+      data: {"id":"chatcmpl-Czjpp21JrAlDsrAmzS6iFO2WfXAXE","object":"chat.completion.chunk","created":1768830233,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" Command"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"lyiPHQGe"}
 
-      data: {"id":"chatcmpl-ClYUlAU7xGXiwlwnygOdjHO2xgdO6","object":"chat.completion.chunk","created":1765450051,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":" Command"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"RxCH1Yjt"}
+      data: {"id":"chatcmpl-Czjpp21JrAlDsrAmzS6iFO2WfXAXE","object":"chat.completion.chunk","created":1768830233,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"JDQYzoRO2P"}
 
-      data: {"id":"chatcmpl-ClYUlAU7xGXiwlwnygOdjHO2xgdO6","object":"chat.completion.chunk","created":1765450051,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"zaOmpwBTYJ"}
-
-      data: {"id":"chatcmpl-ClYUlAU7xGXiwlwnygOdjHO2xgdO6","object":"chat.completion.chunk","created":1765450051,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[],"usage":{"prompt_tokens":135,"completion_tokens":7,"total_tokens":142,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"pORiHZ6J2hI91j"}
+      data: {"id":"chatcmpl-Czjpp21JrAlDsrAmzS6iFO2WfXAXE","object":"chat.completion.chunk","created":1768830233,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[],"usage":{"prompt_tokens":135,"completion_tokens":6,"total_tokens":141,"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":"EPoJDe4VnXLh1e"}
 
       data: [DONE]
 
@@ -51,15 +49,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 599.728125ms
+    duration: 411.950625ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50193
+    content_length: 50687
     host: ""

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

@@ -24,41 +24,41 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-ClYUpspfYf2HGT5ZUcnlU3k3uhnSu","object":"chat.completion.chunk","created":1765450055,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"iortuQUqIPUoEk"}
+      data: {"id":"chatcmpl-CzjptZarMAkGsZTFKUM0EMMzEmTkf","object":"chat.completion.chunk","created":1768830237,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"w8sqWhzpcnHs6W"}
 
-      data: {"id":"chatcmpl-ClYUpspfYf2HGT5ZUcnlU3k3uhnSu","object":"chat.completion.chunk","created":1765450055,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":"Editing"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"fI3ZmnsiJ"}
+      data: {"id":"chatcmpl-CzjptZarMAkGsZTFKUM0EMMzEmTkf","object":"chat.completion.chunk","created":1768830237,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":"Edit"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ctpbhoqwzTZz"}
 
-      data: {"id":"chatcmpl-ClYUpspfYf2HGT5ZUcnlU3k3uhnSu","object":"chat.completion.chunk","created":1765450055,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":" '"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ID4EbExPHpfF1A"}
+      data: {"id":"chatcmpl-CzjptZarMAkGsZTFKUM0EMMzEmTkf","object":"chat.completion.chunk","created":1768830237,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" '"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"TGykGuKGPdZeN0"}
 
-      data: {"id":"chatcmpl-ClYUpspfYf2HGT5ZUcnlU3k3uhnSu","object":"chat.completion.chunk","created":1765450055,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":"Hello"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"1LU3dm8Zp8x"}
+      data: {"id":"chatcmpl-CzjptZarMAkGsZTFKUM0EMMzEmTkf","object":"chat.completion.chunk","created":1768830237,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":"Hello"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"61NaUxH95hU"}
 
-      data: {"id":"chatcmpl-ClYUpspfYf2HGT5ZUcnlU3k3uhnSu","object":"chat.completion.chunk","created":1765450055,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"B5PW7DIW7rSFGwV"}
+      data: {"id":"chatcmpl-CzjptZarMAkGsZTFKUM0EMMzEmTkf","object":"chat.completion.chunk","created":1768830237,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"eDLlGtoT0ySeGqD"}
 
-      data: {"id":"chatcmpl-ClYUpspfYf2HGT5ZUcnlU3k3uhnSu","object":"chat.completion.chunk","created":1765450055,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":" World"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"mUjyCOBM3T"}
+      data: {"id":"chatcmpl-CzjptZarMAkGsZTFKUM0EMMzEmTkf","object":"chat.completion.chunk","created":1768830237,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" World"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"8EscbuFp3X"}
 
-      data: {"id":"chatcmpl-ClYUpspfYf2HGT5ZUcnlU3k3uhnSu","object":"chat.completion.chunk","created":1765450055,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":"!'"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"mcUf35wIefGwCd"}
+      data: {"id":"chatcmpl-CzjptZarMAkGsZTFKUM0EMMzEmTkf","object":"chat.completion.chunk","created":1768830237,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":"!'"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"FDQCMsLNraJW6l"}
 
-      data: {"id":"chatcmpl-ClYUpspfYf2HGT5ZUcnlU3k3uhnSu","object":"chat.completion.chunk","created":1765450055,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":" to"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Ks0QkMtefblaP"}
+      data: {"id":"chatcmpl-CzjptZarMAkGsZTFKUM0EMMzEmTkf","object":"chat.completion.chunk","created":1768830237,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" to"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"PZtbSLH8ktyFq"}
 
-      data: {"id":"chatcmpl-ClYUpspfYf2HGT5ZUcnlU3k3uhnSu","object":"chat.completion.chunk","created":1765450055,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":" '"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"MAPEiKXCsBi2Is"}
+      data: {"id":"chatcmpl-CzjptZarMAkGsZTFKUM0EMMzEmTkf","object":"chat.completion.chunk","created":1768830237,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" '"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"31dms5V3FvO5X1"}
 
-      data: {"id":"chatcmpl-ClYUpspfYf2HGT5ZUcnlU3k3uhnSu","object":"chat.completion.chunk","created":1765450055,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":"Hello"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Vr3FLHbug8i"}
+      data: {"id":"chatcmpl-CzjptZarMAkGsZTFKUM0EMMzEmTkf","object":"chat.completion.chunk","created":1768830237,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":"Hello"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"oLxfEtBAmAi"}
 
-      data: {"id":"chatcmpl-ClYUpspfYf2HGT5ZUcnlU3k3uhnSu","object":"chat.completion.chunk","created":1765450055,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"cZSoyKBYFddeRAh"}
+      data: {"id":"chatcmpl-CzjptZarMAkGsZTFKUM0EMMzEmTkf","object":"chat.completion.chunk","created":1768830237,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"YCAS81ZDASz7hmB"}
 
-      data: {"id":"chatcmpl-ClYUpspfYf2HGT5ZUcnlU3k3uhnSu","object":"chat.completion.chunk","created":1765450055,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":" Crush"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"EICPMZXFtU"}
+      data: {"id":"chatcmpl-CzjptZarMAkGsZTFKUM0EMMzEmTkf","object":"chat.completion.chunk","created":1768830237,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" Crush"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ZBh8BjoPYS"}
 
-      data: {"id":"chatcmpl-ClYUpspfYf2HGT5ZUcnlU3k3uhnSu","object":"chat.completion.chunk","created":1765450055,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":"!'"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"g0XbhchmFYu4Bq"}
+      data: {"id":"chatcmpl-CzjptZarMAkGsZTFKUM0EMMzEmTkf","object":"chat.completion.chunk","created":1768830237,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":"!'"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"LCOdBS6YPqpvye"}
 
-      data: {"id":"chatcmpl-ClYUpspfYf2HGT5ZUcnlU3k3uhnSu","object":"chat.completion.chunk","created":1765450055,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"nTuUNUj4KNN7H"}
+      data: {"id":"chatcmpl-CzjptZarMAkGsZTFKUM0EMMzEmTkf","object":"chat.completion.chunk","created":1768830237,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"woB21MizPF1qF"}
 
-      data: {"id":"chatcmpl-ClYUpspfYf2HGT5ZUcnlU3k3uhnSu","object":"chat.completion.chunk","created":1765450055,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":" main"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ZXpEc8NVrI6"}
+      data: {"id":"chatcmpl-CzjptZarMAkGsZTFKUM0EMMzEmTkf","object":"chat.completion.chunk","created":1768830237,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" main"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"3vlYGdke04Q"}
 
-      data: {"id":"chatcmpl-ClYUpspfYf2HGT5ZUcnlU3k3uhnSu","object":"chat.completion.chunk","created":1765450055,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":".go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ka0oJF0AxZj94"}
+      data: {"id":"chatcmpl-CzjptZarMAkGsZTFKUM0EMMzEmTkf","object":"chat.completion.chunk","created":1768830237,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":".go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"n2Zprwwja22n4"}
 
-      data: {"id":"chatcmpl-ClYUpspfYf2HGT5ZUcnlU3k3uhnSu","object":"chat.completion.chunk","created":1765450055,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"RchQvTbfGH"}
+      data: {"id":"chatcmpl-CzjptZarMAkGsZTFKUM0EMMzEmTkf","object":"chat.completion.chunk","created":1768830237,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"syai28mVpc"}
 
-      data: {"id":"chatcmpl-ClYUpspfYf2HGT5ZUcnlU3k3uhnSu","object":"chat.completion.chunk","created":1765450055,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[],"usage":{"prompt_tokens":157,"completion_tokens":15,"total_tokens":172,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"AJG47qP3jlKeV"}
+      data: {"id":"chatcmpl-CzjptZarMAkGsZTFKUM0EMMzEmTkf","object":"chat.completion.chunk","created":1768830237,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[],"usage":{"prompt_tokens":157,"completion_tokens":15,"total_tokens":172,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"52ea3nLBvH3wB"}
 
       data: [DONE]
 
@@ -67,15 +67,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 499.534ms
+    duration: 469.62075ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50279
+    content_length: 50773
     host: ""

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

@@ -24,27 +24,27 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-ClYVxXKuDow1gLUqqlvhn6DL3K5CC","object":"chat.completion.chunk","created":1765450125,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"yzhS59uRUu511k"}
+      data: {"id":"chatcmpl-CzjqSIDKk0IIoCdj8CTB9GrShYjL0","object":"chat.completion.chunk","created":1768830272,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Thp3GWPBtcfpFl"}
 
-      data: {"id":"chatcmpl-ClYVxXKuDow1gLUqqlvhn6DL3K5CC","object":"chat.completion.chunk","created":1765450125,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":"Parallel"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"g3jeuGmp"}
+      data: {"id":"chatcmpl-CzjqSIDKk0IIoCdj8CTB9GrShYjL0","object":"chat.completion.chunk","created":1768830272,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":"Parallel"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"WE3oG6Dc"}
 
-      data: {"id":"chatcmpl-ClYVxXKuDow1gLUqqlvhn6DL3K5CC","object":"chat.completion.chunk","created":1765450125,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":" ."},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"zPlid6EaNGItod"}
+      data: {"id":"chatcmpl-CzjqSIDKk0IIoCdj8CTB9GrShYjL0","object":"chat.completion.chunk","created":1768830272,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" Execution"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"BhxBUy"}
 
-      data: {"id":"chatcmpl-ClYVxXKuDow1gLUqqlvhn6DL3K5CC","object":"chat.completion.chunk","created":1765450125,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":"go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"XxLnCUgnqeu8Hd"}
+      data: {"id":"chatcmpl-CzjqSIDKk0IIoCdj8CTB9GrShYjL0","object":"chat.completion.chunk","created":1768830272,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" of"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"CerEoaZkPYIr3"}
 
-      data: {"id":"chatcmpl-ClYVxXKuDow1gLUqqlvhn6DL3K5CC","object":"chat.completion.chunk","created":1765450125,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":" File"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ktg1VgFlUwJ"}
+      data: {"id":"chatcmpl-CzjqSIDKk0IIoCdj8CTB9GrShYjL0","object":"chat.completion.chunk","created":1768830272,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" File"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"njaky8RPXtu"}
 
-      data: {"id":"chatcmpl-ClYVxXKuDow1gLUqqlvhn6DL3K5CC","object":"chat.completion.chunk","created":1765450125,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":" Search"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"yx3P32Awb"}
+      data: {"id":"chatcmpl-CzjqSIDKk0IIoCdj8CTB9GrShYjL0","object":"chat.completion.chunk","created":1768830272,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" Search"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ShEOqgaKt"}
 
-      data: {"id":"chatcmpl-ClYVxXKuDow1gLUqqlvhn6DL3K5CC","object":"chat.completion.chunk","created":1765450125,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":" and"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"GmBe64s4mBbQ"}
+      data: {"id":"chatcmpl-CzjqSIDKk0IIoCdj8CTB9GrShYjL0","object":"chat.completion.chunk","created":1768830272,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" and"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"yRmX9ZfGFg03"}
 
-      data: {"id":"chatcmpl-ClYVxXKuDow1gLUqqlvhn6DL3K5CC","object":"chat.completion.chunk","created":1765450125,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":" Directory"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"eUHrBf"}
+      data: {"id":"chatcmpl-CzjqSIDKk0IIoCdj8CTB9GrShYjL0","object":"chat.completion.chunk","created":1768830272,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" Directory"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"R5Yuho"}
 
-      data: {"id":"chatcmpl-ClYVxXKuDow1gLUqqlvhn6DL3K5CC","object":"chat.completion.chunk","created":1765450125,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":" Listing"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"CkE7ZUS2"}
+      data: {"id":"chatcmpl-CzjqSIDKk0IIoCdj8CTB9GrShYjL0","object":"chat.completion.chunk","created":1768830272,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" Listing"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"XV9SCefj"}
 
-      data: {"id":"chatcmpl-ClYVxXKuDow1gLUqqlvhn6DL3K5CC","object":"chat.completion.chunk","created":1765450125,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"UOzkyErMbp"}
+      data: {"id":"chatcmpl-CzjqSIDKk0IIoCdj8CTB9GrShYjL0","object":"chat.completion.chunk","created":1768830272,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"ChtzpEnrlI"}
 
-      data: {"id":"chatcmpl-ClYVxXKuDow1gLUqqlvhn6DL3K5CC","object":"chat.completion.chunk","created":1765450125,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[],"usage":{"prompt_tokens":154,"completion_tokens":8,"total_tokens":162,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"IbYbUzxWouLTaX"}
+      data: {"id":"chatcmpl-CzjqSIDKk0IIoCdj8CTB9GrShYjL0","object":"chat.completion.chunk","created":1768830272,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[],"usage":{"prompt_tokens":154,"completion_tokens":8,"total_tokens":162,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"Cnz16IJuNPSTX6"}
 
       data: [DONE]
 
@@ -53,15 +53,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 433.644542ms
+    duration: 743.282416ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50290
+    content_length: 50784
     host: ""

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

@@ -24,21 +24,19 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-ClYTQhlPOe5tl5pF1iOgF0DBvE8Yz","object":"chat.completion.chunk","created":1765449968,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_83554c687e","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Td83oWSapyD29H"}
+      data: {"id":"chatcmpl-CzjouBic6rLxQKHupRoN2PEBP7e5B","object":"chat.completion.chunk","created":1768830176,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_deacdd5f6f","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"FDQDoWDckcMAqF"}
 
-      data: {"id":"chatcmpl-ClYTQhlPOe5tl5pF1iOgF0DBvE8Yz","object":"chat.completion.chunk","created":1765449968,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_83554c687e","choices":[{"index":0,"delta":{"content":"Understanding"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Bh7"}
+      data: {"id":"chatcmpl-CzjouBic6rLxQKHupRoN2PEBP7e5B","object":"chat.completion.chunk","created":1768830176,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_deacdd5f6f","choices":[{"index":0,"delta":{"content":"Reading"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"SU89d8sKD"}
 
-      data: {"id":"chatcmpl-ClYTQhlPOe5tl5pF1iOgF0DBvE8Yz","object":"chat.completion.chunk","created":1765449968,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_83554c687e","choices":[{"index":0,"delta":{"content":" the"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"jRFD2MUbYjEi"}
+      data: {"id":"chatcmpl-CzjouBic6rLxQKHupRoN2PEBP7e5B","object":"chat.completion.chunk","created":1768830176,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_deacdd5f6f","choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"W3MgsDujc3Eaul"}
 
-      data: {"id":"chatcmpl-ClYTQhlPOe5tl5pF1iOgF0DBvE8Yz","object":"chat.completion.chunk","created":1765449968,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_83554c687e","choices":[{"index":0,"delta":{"content":" Go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"SlRY6qmk8zOaT"}
+      data: {"id":"chatcmpl-CzjouBic6rLxQKHupRoN2PEBP7e5B","object":"chat.completion.chunk","created":1768830176,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_deacdd5f6f","choices":[{"index":0,"delta":{"content":" Go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"fgaFCwoo9EflX"}
 
-      data: {"id":"chatcmpl-ClYTQhlPOe5tl5pF1iOgF0DBvE8Yz","object":"chat.completion.chunk","created":1765449968,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_83554c687e","choices":[{"index":0,"delta":{"content":" Mod"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"kgvSLP9N0drN"}
+      data: {"id":"chatcmpl-CzjouBic6rLxQKHupRoN2PEBP7e5B","object":"chat.completion.chunk","created":1768830176,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_deacdd5f6f","choices":[{"index":0,"delta":{"content":" Module"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"OembTm90U"}
 
-      data: {"id":"chatcmpl-ClYTQhlPOe5tl5pF1iOgF0DBvE8Yz","object":"chat.completion.chunk","created":1765449968,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_83554c687e","choices":[{"index":0,"delta":{"content":" File"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"PimRARifiZA"}
+      data: {"id":"chatcmpl-CzjouBic6rLxQKHupRoN2PEBP7e5B","object":"chat.completion.chunk","created":1768830176,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_deacdd5f6f","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"fz77ZNNj1l"}
 
-      data: {"id":"chatcmpl-ClYTQhlPOe5tl5pF1iOgF0DBvE8Yz","object":"chat.completion.chunk","created":1765449968,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_83554c687e","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"HPqTpsItZS"}
-
-      data: {"id":"chatcmpl-ClYTQhlPOe5tl5pF1iOgF0DBvE8Yz","object":"chat.completion.chunk","created":1765449968,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_83554c687e","choices":[],"usage":{"prompt_tokens":129,"completion_tokens":5,"total_tokens":134,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"V4VlPjVdvDAOva"}
+      data: {"id":"chatcmpl-CzjouBic6rLxQKHupRoN2PEBP7e5B","object":"chat.completion.chunk","created":1768830176,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_deacdd5f6f","choices":[],"usage":{"prompt_tokens":129,"completion_tokens":4,"total_tokens":133,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"cXX7n4KtoXfrel"}
 
       data: [DONE]
 
@@ -47,15 +45,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 918.348ms
+    duration: 2.249190917s
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50163
+    content_length: 50657
     host: ""

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

@@ -24,15 +24,15 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-ClYTNmeHbTg5nOfFSj9b0PfSqnXmI","object":"chat.completion.chunk","created":1765449965,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"lYuAhHNOZyFT78"}
+      data: {"id":"chatcmpl-Czjoqy3qhdl7QlaVUezlnqVq4Su8C","object":"chat.completion.chunk","created":1768830172,"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":"TDnVpvMW88Xmde"}
 
-      data: {"id":"chatcmpl-ClYTNmeHbTg5nOfFSj9b0PfSqnXmI","object":"chat.completion.chunk","created":1765449965,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":"User"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"tEQ3xb2jGS3z"}
+      data: {"id":"chatcmpl-Czjoqy3qhdl7QlaVUezlnqVq4Su8C","object":"chat.completion.chunk","created":1768830172,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":"Friendly"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"xQaCvs2o"}
 
-      data: {"id":"chatcmpl-ClYTNmeHbTg5nOfFSj9b0PfSqnXmI","object":"chat.completion.chunk","created":1765449965,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":" Greeting"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"uf5pfnS"}
+      data: {"id":"chatcmpl-Czjoqy3qhdl7QlaVUezlnqVq4Su8C","object":"chat.completion.chunk","created":1768830172,"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":"k1WWCN6"}
 
-      data: {"id":"chatcmpl-ClYTNmeHbTg5nOfFSj9b0PfSqnXmI","object":"chat.completion.chunk","created":1765449965,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"BnHYDD4Snx"}
+      data: {"id":"chatcmpl-Czjoqy3qhdl7QlaVUezlnqVq4Su8C","object":"chat.completion.chunk","created":1768830172,"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":"mnZ0FAHYdF"}
 
-      data: {"id":"chatcmpl-ClYTNmeHbTg5nOfFSj9b0PfSqnXmI","object":"chat.completion.chunk","created":1765449965,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[],"usage":{"prompt_tokens":126,"completion_tokens":2,"total_tokens":128,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"kk9wG4HXzAC8D5"}
+      data: {"id":"chatcmpl-Czjoqy3qhdl7QlaVUezlnqVq4Su8C","object":"chat.completion.chunk","created":1768830172,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[],"usage":{"prompt_tokens":126,"completion_tokens":2,"total_tokens":128,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"DmwwbNsKumqAUt"}
 
       data: [DONE]
 
@@ -41,15 +41,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 1.16988225s
+    duration: 1.949141s
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50153
+    content_length: 50647
     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-ClYVFpJvAWVs1HZmbLJSHevY7MPdx","object":"chat.completion.chunk","created":1765450081,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"6Uwk6E5ZLxoCKu"}
+      data: {"id":"chatcmpl-Czk1rASc3CYebBgESFcb9JMKFkFn1","object":"chat.completion.chunk","created":1768830979,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"R95a3iTSrhETUb"}
 
-      data: {"id":"chatcmpl-ClYVFpJvAWVs1HZmbLJSHevY7MPdx","object":"chat.completion.chunk","created":1765450081,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":"Using"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"jmlPS4eKNlU"}
+      data: {"id":"chatcmpl-Czk1rASc3CYebBgESFcb9JMKFkFn1","object":"chat.completion.chunk","created":1768830979,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":"Search"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"5SjkmG65LN"}
 
-      data: {"id":"chatcmpl-ClYVFpJvAWVs1HZmbLJSHevY7MPdx","object":"chat.completion.chunk","created":1765450081,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":" Source"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"suyvSEUrA"}
+      data: {"id":"chatcmpl-Czk1rASc3CYebBgESFcb9JMKFkFn1","object":"chat.completion.chunk","created":1768830979,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" '"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"PuilvpfYYLgM5x"}
 
-      data: {"id":"chatcmpl-ClYVFpJvAWVs1HZmbLJSHevY7MPdx","object":"chat.completion.chunk","created":1765450081,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":"graph"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ZnkXVLS9pd9"}
+      data: {"id":"chatcmpl-Czk1rASc3CYebBgESFcb9JMKFkFn1","object":"chat.completion.chunk","created":1768830979,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":"func"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"KvyZFscXzPeq"}
 
-      data: {"id":"chatcmpl-ClYVFpJvAWVs1HZmbLJSHevY7MPdx","object":"chat.completion.chunk","created":1765450081,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":" to"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"6DDfkjVk33j2S"}
+      data: {"id":"chatcmpl-Czk1rASc3CYebBgESFcb9JMKFkFn1","object":"chat.completion.chunk","created":1768830979,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" main"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"8eYsEmg7Ldr"}
 
-      data: {"id":"chatcmpl-ClYVFpJvAWVs1HZmbLJSHevY7MPdx","object":"chat.completion.chunk","created":1765450081,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":" Find"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"wh6ozpJ0ICP"}
+      data: {"id":"chatcmpl-Czk1rASc3CYebBgESFcb9JMKFkFn1","object":"chat.completion.chunk","created":1768830979,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":"'"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"8kZnxLjyyHcmhAJ"}
 
-      data: {"id":"chatcmpl-ClYVFpJvAWVs1HZmbLJSHevY7MPdx","object":"chat.completion.chunk","created":1765450081,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":" '"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ZGNvhFcisiNv5j"}
+      data: {"id":"chatcmpl-Czk1rASc3CYebBgESFcb9JMKFkFn1","object":"chat.completion.chunk","created":1768830979,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"iNM0tkifwexEs"}
 
-      data: {"id":"chatcmpl-ClYVFpJvAWVs1HZmbLJSHevY7MPdx","object":"chat.completion.chunk","created":1765450081,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":"func"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"kPFZUGkdYwtc"}
+      data: {"id":"chatcmpl-Czk1rASc3CYebBgESFcb9JMKFkFn1","object":"chat.completion.chunk","created":1768830979,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" Go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"CVXDb6ymhmDeW"}
 
-      data: {"id":"chatcmpl-ClYVFpJvAWVs1HZmbLJSHevY7MPdx","object":"chat.completion.chunk","created":1765450081,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":" main"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"O6L966yuVgp"}
+      data: {"id":"chatcmpl-Czk1rASc3CYebBgESFcb9JMKFkFn1","object":"chat.completion.chunk","created":1768830979,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" Re"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"CQ8kNt0Llm7Uy"}
 
-      data: {"id":"chatcmpl-ClYVFpJvAWVs1HZmbLJSHevY7MPdx","object":"chat.completion.chunk","created":1765450081,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":"'"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"XcGGFGl7Nf7RuUM"}
+      data: {"id":"chatcmpl-Czk1rASc3CYebBgESFcb9JMKFkFn1","object":"chat.completion.chunk","created":1768830979,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":"positories"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"KbLwwJ"}
 
-      data: {"id":"chatcmpl-ClYVFpJvAWVs1HZmbLJSHevY7MPdx","object":"chat.completion.chunk","created":1765450081,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"2ecov1rE9ImKb"}
+      data: {"id":"chatcmpl-Czk1rASc3CYebBgESFcb9JMKFkFn1","object":"chat.completion.chunk","created":1768830979,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" Using"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"L75wF53MuD"}
 
-      data: {"id":"chatcmpl-ClYVFpJvAWVs1HZmbLJSHevY7MPdx","object":"chat.completion.chunk","created":1765450081,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":" Go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"GaBkfJFK8gAxN"}
+      data: {"id":"chatcmpl-Czk1rASc3CYebBgESFcb9JMKFkFn1","object":"chat.completion.chunk","created":1768830979,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" Source"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"MKSonEgLp"}
 
-      data: {"id":"chatcmpl-ClYVFpJvAWVs1HZmbLJSHevY7MPdx","object":"chat.completion.chunk","created":1765450081,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":" Re"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"sHG1C6ny6Us9z"}
+      data: {"id":"chatcmpl-Czk1rASc3CYebBgESFcb9JMKFkFn1","object":"chat.completion.chunk","created":1768830979,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":"graph"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"w04Ibu9PdcW"}
 
-      data: {"id":"chatcmpl-ClYVFpJvAWVs1HZmbLJSHevY7MPdx","object":"chat.completion.chunk","created":1765450081,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":"pos"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"NSChIK7VgkOQW"}
+      data: {"id":"chatcmpl-Czk1rASc3CYebBgESFcb9JMKFkFn1","object":"chat.completion.chunk","created":1768830979,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"ukXsXPKqhG"}
 
-      data: {"id":"chatcmpl-ClYVFpJvAWVs1HZmbLJSHevY7MPdx","object":"chat.completion.chunk","created":1765450081,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"RmvItLJGPu"}
-
-      data: {"id":"chatcmpl-ClYVFpJvAWVs1HZmbLJSHevY7MPdx","object":"chat.completion.chunk","created":1765450081,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[],"usage":{"prompt_tokens":138,"completion_tokens":13,"total_tokens":151,"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":"fdcSwuBLeER6h"}
+      data: {"id":"chatcmpl-Czk1rASc3CYebBgESFcb9JMKFkFn1","object":"chat.completion.chunk","created":1768830979,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[],"usage":{"prompt_tokens":138,"completion_tokens":12,"total_tokens":150,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"hPBvtCMxVf9cE"}
 
       data: [DONE]
 
@@ -63,15 +61,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 510.380208ms
+    duration: 552.732542ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50213
+    content_length: 50707
     host: ""

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

@@ -24,31 +24,25 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-ClYcUERaSodA5TcaAZi62itGcATzy","object":"chat.completion.chunk","created":1765450530,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_37d212baff","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"suhxmaLssng9GN"}
+      data: {"id":"chatcmpl-Czjp135HaPU3V24nyjS3BuWy7rZ18","object":"chat.completion.chunk","created":1768830183,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"lyN8ETBdlgol0g"}
 
-      data: {"id":"chatcmpl-ClYcUERaSodA5TcaAZi62itGcATzy","object":"chat.completion.chunk","created":1765450530,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_37d212baff","choices":[{"index":0,"delta":{"content":"Update"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"uq1N9j9GYt"}
+      data: {"id":"chatcmpl-Czjp135HaPU3V24nyjS3BuWy7rZ18","object":"chat.completion.chunk","created":1768830183,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":"Update"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"slpbVLVP2H"}
 
-      data: {"id":"chatcmpl-ClYcUERaSodA5TcaAZi62itGcATzy","object":"chat.completion.chunk","created":1765450530,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_37d212baff","choices":[{"index":0,"delta":{"content":" main"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"2yJ1XcXP92O"}
+      data: {"id":"chatcmpl-Czjp135HaPU3V24nyjS3BuWy7rZ18","object":"chat.completion.chunk","created":1768830183,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" Print"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"csnlJXHkWq"}
 
-      data: {"id":"chatcmpl-ClYcUERaSodA5TcaAZi62itGcATzy","object":"chat.completion.chunk","created":1765450530,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_37d212baff","choices":[{"index":0,"delta":{"content":".go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"o502A8HAiLze4"}
+      data: {"id":"chatcmpl-Czjp135HaPU3V24nyjS3BuWy7rZ18","object":"chat.completion.chunk","created":1768830183,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" Message"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"vgiX0tTd"}
 
-      data: {"id":"chatcmpl-ClYcUERaSodA5TcaAZi62itGcATzy","object":"chat.completion.chunk","created":1765450530,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_37d212baff","choices":[{"index":0,"delta":{"content":" to"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"vLmVOOtBoeAm7"}
+      data: {"id":"chatcmpl-Czjp135HaPU3V24nyjS3BuWy7rZ18","object":"chat.completion.chunk","created":1768830183,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"yL0ebVNjRLVaR"}
 
-      data: {"id":"chatcmpl-ClYcUERaSodA5TcaAZi62itGcATzy","object":"chat.completion.chunk","created":1765450530,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_37d212baff","choices":[{"index":0,"delta":{"content":" Print"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"qd8Oqo9S3r"}
+      data: {"id":"chatcmpl-Czjp135HaPU3V24nyjS3BuWy7rZ18","object":"chat.completion.chunk","created":1768830183,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" main"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"tnpOnQL3w8K"}
 
-      data: {"id":"chatcmpl-ClYcUERaSodA5TcaAZi62itGcATzy","object":"chat.completion.chunk","created":1765450530,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_37d212baff","choices":[{"index":0,"delta":{"content":" '"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"JlFugTEXdxERyl"}
+      data: {"id":"chatcmpl-Czjp135HaPU3V24nyjS3BuWy7rZ18","object":"chat.completion.chunk","created":1768830183,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":".go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"UYuaUVZqGFdSu"}
 
-      data: {"id":"chatcmpl-ClYcUERaSodA5TcaAZi62itGcATzy","object":"chat.completion.chunk","created":1765450530,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_37d212baff","choices":[{"index":0,"delta":{"content":"Hello"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"PSAR2b6MhBJ"}
+      data: {"id":"chatcmpl-Czjp135HaPU3V24nyjS3BuWy7rZ18","object":"chat.completion.chunk","created":1768830183,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" File"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"2sEh73qqzkE"}
 
-      data: {"id":"chatcmpl-ClYcUERaSodA5TcaAZi62itGcATzy","object":"chat.completion.chunk","created":1765450530,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_37d212baff","choices":[{"index":0,"delta":{"content":" from"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"K2DaU062cs5"}
+      data: {"id":"chatcmpl-Czjp135HaPU3V24nyjS3BuWy7rZ18","object":"chat.completion.chunk","created":1768830183,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"gf6rrszRnY"}
 
-      data: {"id":"chatcmpl-ClYcUERaSodA5TcaAZi62itGcATzy","object":"chat.completion.chunk","created":1765450530,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_37d212baff","choices":[{"index":0,"delta":{"content":" Crush"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"TGAxJqR0xe"}
-
-      data: {"id":"chatcmpl-ClYcUERaSodA5TcaAZi62itGcATzy","object":"chat.completion.chunk","created":1765450530,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_37d212baff","choices":[{"index":0,"delta":{"content":"'"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"bZ8ONMFviIS07qj"}
-
-      data: {"id":"chatcmpl-ClYcUERaSodA5TcaAZi62itGcATzy","object":"chat.completion.chunk","created":1765450530,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_37d212baff","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"MOpaEkBHwD"}
-
-      data: {"id":"chatcmpl-ClYcUERaSodA5TcaAZi62itGcATzy","object":"chat.completion.chunk","created":1765450530,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_37d212baff","choices":[],"usage":{"prompt_tokens":139,"completion_tokens":10,"total_tokens":149,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"E0DOck4Xo8KnI"}
+      data: {"id":"chatcmpl-Czjp135HaPU3V24nyjS3BuWy7rZ18","object":"chat.completion.chunk","created":1768830183,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[],"usage":{"prompt_tokens":139,"completion_tokens":7,"total_tokens":146,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"42QprxWa0oBMFL"}
 
       data: [DONE]
 
@@ -57,15 +51,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 592.698375ms
+    duration: 1.424788125s
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50219
+    content_length: 50713
     host: ""

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

@@ -24,23 +24,23 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-ClYVf4uM2U0ATW18tcIGbdzcFAqWU","object":"chat.completion.chunk","created":1765450107,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ravSmf9KF02hrZ"}
+      data: {"id":"chatcmpl-CzjqJgtYTNQ1LzNr2Vy8XQCD5uR5p","object":"chat.completion.chunk","created":1768830263,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"lbWZeXAjCgr2xM"}
 
-      data: {"id":"chatcmpl-ClYVf4uM2U0ATW18tcIGbdzcFAqWU","object":"chat.completion.chunk","created":1765450107,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":"Creating"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"gDrbOt0V"}
+      data: {"id":"chatcmpl-CzjqJgtYTNQ1LzNr2Vy8XQCD5uR5p","object":"chat.completion.chunk","created":1768830263,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":"Create"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"g2vTNiK29d"}
 
-      data: {"id":"chatcmpl-ClYVf4uM2U0ATW18tcIGbdzcFAqWU","object":"chat.completion.chunk","created":1765450107,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":" config"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ROCqtTpc5"}
+      data: {"id":"chatcmpl-CzjqJgtYTNQ1LzNr2Vy8XQCD5uR5p","object":"chat.completion.chunk","created":1768830263,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" config"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"NSDOMK424"}
 
-      data: {"id":"chatcmpl-ClYVf4uM2U0ATW18tcIGbdzcFAqWU","object":"chat.completion.chunk","created":1765450107,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":".json"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"pUfVbY4qhPb"}
+      data: {"id":"chatcmpl-CzjqJgtYTNQ1LzNr2Vy8XQCD5uR5p","object":"chat.completion.chunk","created":1768830263,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":".json"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"dfB4le0vurg"}
 
-      data: {"id":"chatcmpl-ClYVf4uM2U0ATW18tcIGbdzcFAqWU","object":"chat.completion.chunk","created":1765450107,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":" with"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"n1S6JXiKNwn"}
+      data: {"id":"chatcmpl-CzjqJgtYTNQ1LzNr2Vy8XQCD5uR5p","object":"chat.completion.chunk","created":1768830263,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" with"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"FxUaaSwfBEd"}
 
-      data: {"id":"chatcmpl-ClYVf4uM2U0ATW18tcIGbdzcFAqWU","object":"chat.completion.chunk","created":1765450107,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":" Test"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"AvqPcgoEKtb"}
+      data: {"id":"chatcmpl-CzjqJgtYTNQ1LzNr2Vy8XQCD5uR5p","object":"chat.completion.chunk","created":1768830263,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" JSON"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"pg0cGCkRGcE"}
 
-      data: {"id":"chatcmpl-ClYVf4uM2U0ATW18tcIGbdzcFAqWU","object":"chat.completion.chunk","created":1765450107,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{"content":" Details"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"rmCpDlnn"}
+      data: {"id":"chatcmpl-CzjqJgtYTNQ1LzNr2Vy8XQCD5uR5p","object":"chat.completion.chunk","created":1768830263,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{"content":" Content"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"FYNYBrua"}
 
-      data: {"id":"chatcmpl-ClYVf4uM2U0ATW18tcIGbdzcFAqWU","object":"chat.completion.chunk","created":1765450107,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"CEGO6F6IGC"}
+      data: {"id":"chatcmpl-CzjqJgtYTNQ1LzNr2Vy8XQCD5uR5p","object":"chat.completion.chunk","created":1768830263,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"VsEMoKTn2b"}
 
-      data: {"id":"chatcmpl-ClYVf4uM2U0ATW18tcIGbdzcFAqWU","object":"chat.completion.chunk","created":1765450107,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a4d13246c5","choices":[],"usage":{"prompt_tokens":153,"completion_tokens":6,"total_tokens":159,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"Lhyx4FFDmVErjw"}
+      data: {"id":"chatcmpl-CzjqJgtYTNQ1LzNr2Vy8XQCD5uR5p","object":"chat.completion.chunk","created":1768830263,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a0e9480a2f","choices":[],"usage":{"prompt_tokens":153,"completion_tokens":6,"total_tokens":159,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"SeLpiA4w7bzNvd"}
 
       data: [DONE]
 
@@ -49,15 +49,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 512.637375ms
+    duration: 481.66725ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50256
+    content_length: 50750
     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-1765450159-XJbAh4NJseOmQCFaiLUK","provider":"Novita","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450159,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":""}
+      data: {"id":"gen-1768830633-Osz1qPrYiTrZY6O7qshP","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830633,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1765450159-XJbAh4NJseOmQCFaiLUK","provider":"Novita","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450159,"choices":[{"index":0,"delta":{"role":"assistant","content":"Create"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":""}
+      data: {"id":"gen-1768830633-Osz1qPrYiTrZY6O7qshP","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830633,"choices":[{"index":0,"delta":{"role":"assistant","content":"Create"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1765450159-XJbAh4NJseOmQCFaiLUK","provider":"Novita","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450159,"choices":[{"index":0,"delta":{"role":"assistant","content":" test"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":""}
+      data: {"id":"gen-1768830633-Osz1qPrYiTrZY6O7qshP","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830633,"choices":[{"index":0,"delta":{"role":"assistant","content":" test"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1765450159-XJbAh4NJseOmQCFaiLUK","provider":"Novita","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450159,"choices":[{"index":0,"delta":{"role":"assistant","content":".txt with"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":""}
+      data: {"id":"gen-1768830633-Osz1qPrYiTrZY6O7qshP","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830633,"choices":[{"index":0,"delta":{"role":"assistant","content":".txt with"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1765450159-XJbAh4NJseOmQCFaiLUK","provider":"Novita","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450159,"choices":[{"index":0,"delta":{"role":"assistant","content":" hello bash using"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":""}
+      data: {"id":"gen-1768830633-Osz1qPrYiTrZY6O7qshP","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830633,"choices":[{"index":0,"delta":{"role":"assistant","content":" hello bash using"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1765450159-XJbAh4NJseOmQCFaiLUK","provider":"Novita","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450159,"choices":[{"index":0,"delta":{"role":"assistant","content":" bash"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":""}
+      data: {"id":"gen-1768830633-Osz1qPrYiTrZY6O7qshP","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830633,"choices":[{"index":0,"delta":{"role":"assistant","content":" bash"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1765450159-XJbAh4NJseOmQCFaiLUK","provider":"Novita","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450159,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}],"system_fingerprint":""}
+      data: {"id":"gen-1768830633-Osz1qPrYiTrZY6O7qshP","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830633,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
 
-      data: {"id":"gen-1765450159-XJbAh4NJseOmQCFaiLUK","provider":"Novita","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450159,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":151,"completion_tokens":8,"total_tokens":159,"cost":0.00002772,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.00001812,"upstream_inference_completions_cost":0.0000096},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
+      data: {"id":"gen-1768830633-Osz1qPrYiTrZY6O7qshP","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830633,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":147,"completion_tokens":9,"total_tokens":156,"cost":0.00003285,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.00002205,"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: 795.430042ms
+    duration: 627.379083ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50389
+    content_length: 50883
     host: ""

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

@@ -24,25 +24,19 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"gen-1765450178-A3nTohIO2yAJW18wsmyU","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450178,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1768830324-DpEBUpsxBtavj73Ij4Xl","provider":"GMICloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830324,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1765450178-A3nTohIO2yAJW18wsmyU","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450178,"choices":[{"index":0,"delta":{"role":"assistant","content":"Download"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1768830324-DpEBUpsxBtavj73Ij4Xl","provider":"GMICloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830324,"choices":[{"index":0,"delta":{"role":"assistant","content":"Download"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1765450178-A3nTohIO2yAJW18wsmyU","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450178,"choices":[{"index":0,"delta":{"role":"assistant","content":" example"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1768830324-DpEBUpsxBtavj73Ij4Xl","provider":"GMICloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830324,"choices":[{"index":0,"delta":{"role":"assistant","content":" and save example.txt"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1765450178-A3nTohIO2yAJW18wsmyU","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450178,"choices":[{"index":0,"delta":{"role":"assistant","content":".txt from example"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1768830324-DpEBUpsxBtavj73Ij4Xl","provider":"GMICloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830324,"choices":[{"index":0,"delta":{"role":"assistant","content":" from provided"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1765450178-A3nTohIO2yAJW18wsmyU","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450178,"choices":[{"index":0,"delta":{"role":"assistant","content":"-files"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1768830324-DpEBUpsxBtavj73Ij4Xl","provider":"GMICloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830324,"choices":[{"index":0,"delta":{"role":"assistant","content":" link"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1765450178-A3nTohIO2yAJW18wsmyU","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450178,"choices":[{"index":0,"delta":{"role":"assistant","content":".online"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1768830324-DpEBUpsxBtavj73Ij4Xl","provider":"GMICloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830324,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
 
-      data: {"id":"gen-1765450178-A3nTohIO2yAJW18wsmyU","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450178,"choices":[{"index":0,"delta":{"role":"assistant","content":"-"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1765450178-A3nTohIO2yAJW18wsmyU","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450178,"choices":[{"index":0,"delta":{"role":"assistant","content":"convert.com"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1765450178-A3nTohIO2yAJW18wsmyU","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450178,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
-
-      data: {"id":"gen-1765450178-A3nTohIO2yAJW18wsmyU","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450178,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":150,"completion_tokens":11,"total_tokens":161,"cost":0.0000357,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.0000225,"upstream_inference_completions_cost":0.0000132},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
+      data: {"id":"gen-1768830324-DpEBUpsxBtavj73Ij4Xl","provider":"GMICloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830324,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":150,"completion_tokens":9,"total_tokens":159,"cost":0.000036,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.0000225,"upstream_inference_completions_cost":0.0000135},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
 
       data: [DONE]
 
@@ -51,15 +45,15 @@ interactions:
       - text/event-stream
     status: 200 OK
     code: 200
-    duration: 411.759375ms
+    duration: 1.180815667s
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50414
+    content_length: 50908
     host: ""

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

@@ -24,25 +24,19 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"gen-1765450187-86qtDlWHSSeu17meW5QN","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450187,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1768830332-uymAi6cUGQh14tZVvvWc","provider":"Alibaba","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830332,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":null}
 
-      data: {"id":"gen-1765450187-86qtDlWHSSeu17meW5QN","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450187,"choices":[{"index":0,"delta":{"role":"assistant","content":"Check"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1768830332-uymAi6cUGQh14tZVvvWc","provider":"Alibaba","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830332,"choices":[{"index":0,"delta":{"role":"assistant","content":"Check"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":null}
 
-      data: {"id":"gen-1765450187-86qtDlWHSSeu17meW5QN","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450187,"choices":[{"index":0,"delta":{"role":"assistant","content":" if"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1768830332-uymAi6cUGQh14tZVvvWc","provider":"Alibaba","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830332,"choices":[{"index":0,"delta":{"role":"assistant","content":" if example"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":null}
 
-      data: {"id":"gen-1765450187-86qtDlWHSSeu17meW5QN","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450187,"choices":[{"index":0,"delta":{"role":"assistant","content":" example"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1768830332-uymAi6cUGQh14tZVvvWc","provider":"Alibaba","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830332,"choices":[{"index":0,"delta":{"role":"assistant","content":".html contains John"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":null}
 
-      data: {"id":"gen-1765450187-86qtDlWHSSeu17meW5QN","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450187,"choices":[{"index":0,"delta":{"role":"assistant","content":".html"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1768830332-uymAi6cUGQh14tZVvvWc","provider":"Alibaba","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830332,"choices":[{"index":0,"delta":{"role":"assistant","content":" Doe"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":null}
 
-      data: {"id":"gen-1765450187-86qtDlWHSSeu17meW5QN","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450187,"choices":[{"index":0,"delta":{"role":"assistant","content":" contains"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1768830332-uymAi6cUGQh14tZVvvWc","provider":"Alibaba","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830332,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}],"system_fingerprint":null}
 
-      data: {"id":"gen-1765450187-86qtDlWHSSeu17meW5QN","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450187,"choices":[{"index":0,"delta":{"role":"assistant","content":" John"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1765450187-86qtDlWHSSeu17meW5QN","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450187,"choices":[{"index":0,"delta":{"role":"assistant","content":" Doe"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1765450187-86qtDlWHSSeu17meW5QN","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450187,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
-
-      data: {"id":"gen-1765450187-86qtDlWHSSeu17meW5QN","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450187,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":155,"completion_tokens":8,"total_tokens":163,"cost":0.0000219,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.0000155,"upstream_inference_completions_cost":0.0000064},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
+      data: {"id":"gen-1768830332-uymAi6cUGQh14tZVvvWc","provider":"Alibaba","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830332,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":159,"completion_tokens":7,"total_tokens":166,"cost":0.00003225,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.00002385,"upstream_inference_completions_cost":0.0000084},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
 
       data: [DONE]
 
@@ -51,15 +45,15 @@ interactions:
       - text/event-stream
     status: 200 OK
     code: 200
-    duration: 1.128562167s
+    duration: 1.455522416s
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50432
+    content_length: 50926
     host: ""

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

@@ -24,31 +24,21 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"gen-1765450190-HU1ZzT0K8QtwdsvIz0S1","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450190,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1768830601-JFP8REyTpY04VjYTZEmH","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830601,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1765450190-HU1ZzT0K8QtwdsvIz0S1","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450190,"choices":[{"index":0,"delta":{"role":"assistant","content":"Find"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1768830601-JFP8REyTpY04VjYTZEmH","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830601,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1765450190-HU1ZzT0K8QtwdsvIz0S1","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450190,"choices":[{"index":0,"delta":{"role":"assistant","content":" all"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1768830601-JFP8REyTpY04VjYTZEmH","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830601,"choices":[{"index":0,"delta":{"role":"assistant","content":"Find"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1765450190-HU1ZzT0K8QtwdsvIz0S1","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450190,"choices":[{"index":0,"delta":{"role":"assistant","content":" ."},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1768830601-JFP8REyTpY04VjYTZEmH","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830601,"choices":[{"index":0,"delta":{"role":"assistant","content":" all .go files"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1765450190-HU1ZzT0K8QtwdsvIz0S1","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450190,"choices":[{"index":0,"delta":{"role":"assistant","content":"go"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1768830601-JFP8REyTpY04VjYTZEmH","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830601,"choices":[{"index":0,"delta":{"role":"assistant","content":" in current directory using"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1765450190-HU1ZzT0K8QtwdsvIz0S1","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450190,"choices":[{"index":0,"delta":{"role":"assistant","content":" files"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1768830601-JFP8REyTpY04VjYTZEmH","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830601,"choices":[{"index":0,"delta":{"role":"assistant","content":" glob"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1765450190-HU1ZzT0K8QtwdsvIz0S1","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450190,"choices":[{"index":0,"delta":{"role":"assistant","content":" in"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1768830601-JFP8REyTpY04VjYTZEmH","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830601,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
 
-      data: {"id":"gen-1765450190-HU1ZzT0K8QtwdsvIz0S1","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450190,"choices":[{"index":0,"delta":{"role":"assistant","content":" current"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1765450190-HU1ZzT0K8QtwdsvIz0S1","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450190,"choices":[{"index":0,"delta":{"role":"assistant","content":" directory"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1765450190-HU1ZzT0K8QtwdsvIz0S1","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450190,"choices":[{"index":0,"delta":{"role":"assistant","content":" using"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1765450190-HU1ZzT0K8QtwdsvIz0S1","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450190,"choices":[{"index":0,"delta":{"role":"assistant","content":" glob"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1765450190-HU1ZzT0K8QtwdsvIz0S1","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450190,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
-
-      data: {"id":"gen-1765450190-HU1ZzT0K8QtwdsvIz0S1","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450190,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":139,"completion_tokens":11,"total_tokens":150,"cost":0.000026,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.0000139,"upstream_inference_completions_cost":0.0000121},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
+      data: {"id":"gen-1768830601-JFP8REyTpY04VjYTZEmH","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830601,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":139,"completion_tokens":11,"total_tokens":150,"cost":0.00002461,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.00001251,"upstream_inference_completions_cost":0.0000121},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
 
       data: [DONE]
 
@@ -57,15 +47,15 @@ interactions:
       - text/event-stream
     status: 200 OK
     code: 200
-    duration: 436.118917ms
+    duration: 730.054792ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50350
+    content_length: 50844
     host: ""

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

@@ -6,9 +6,9 @@ interactions:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 762
+    content_length: 50842
     host: ""
-    body: '{"messages":[{"content":"you will generate a short title based on the first message a user begins a conversation with\n\n<rules>\n- ensure it is not more than 50 characters long\n- the title should be a summary of the user''s message\n- it should be one line long\n- do not use quotes or colons\n- the entire text you return will be used as the title\n- never return anything that is more than one sentence (one line) long\n</rules>\n\n /no_think","role":"system"},{"content":"Generate a concise title for the following content:\n\nuse grep to search for the word ''package'' in go files\n <think>\n\n</think>","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/multiedit_tool.yaml 🔗

@@ -24,35 +24,23 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"gen-1765450201-uCjS9MYSLxlXyzRS6nbO","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450201,"choices":[{"index":0,"delta":{"role":"assistant","content":"Use"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1768830361-KnDZJcRrhDeKwzt90zgG","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830361,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1765450201-uCjS9MYSLxlXyzRS6nbO","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450201,"choices":[{"index":0,"delta":{"role":"assistant","content":" mult"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1768830361-KnDZJcRrhDeKwzt90zgG","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830361,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1765450201-uCjS9MYSLxlXyzRS6nbO","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450201,"choices":[{"index":0,"delta":{"role":"assistant","content":"ied"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1768830361-KnDZJcRrhDeKwzt90zgG","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830361,"choices":[{"index":0,"delta":{"role":"assistant","content":"Use"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1765450201-uCjS9MYSLxlXyzRS6nbO","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450201,"choices":[{"index":0,"delta":{"role":"assistant","content":"it"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1768830361-KnDZJcRrhDeKwzt90zgG","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830361,"choices":[{"index":0,"delta":{"role":"assistant","content":" multiedit to"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1765450201-uCjS9MYSLxlXyzRS6nbO","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450201,"choices":[{"index":0,"delta":{"role":"assistant","content":" to"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1768830361-KnDZJcRrhDeKwzt90zgG","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830361,"choices":[{"index":0,"delta":{"role":"assistant","content":" update greeting"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1765450201-uCjS9MYSLxlXyzRS6nbO","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450201,"choices":[{"index":0,"delta":{"role":"assistant","content":" update"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1768830361-KnDZJcRrhDeKwzt90zgG","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830361,"choices":[{"index":0,"delta":{"role":"assistant","content":" and add comment in"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1765450201-uCjS9MYSLxlXyzRS6nbO","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450201,"choices":[{"index":0,"delta":{"role":"assistant","content":" greeting"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1768830361-KnDZJcRrhDeKwzt90zgG","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830361,"choices":[{"index":0,"delta":{"role":"assistant","content":" main.go"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1765450201-uCjS9MYSLxlXyzRS6nbO","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450201,"choices":[{"index":0,"delta":{"role":"assistant","content":" and"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1768830361-KnDZJcRrhDeKwzt90zgG","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830361,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
 
-      data: {"id":"gen-1765450201-uCjS9MYSLxlXyzRS6nbO","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450201,"choices":[{"index":0,"delta":{"role":"assistant","content":" add"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1765450201-uCjS9MYSLxlXyzRS6nbO","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450201,"choices":[{"index":0,"delta":{"role":"assistant","content":" comment"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1765450201-uCjS9MYSLxlXyzRS6nbO","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450201,"choices":[{"index":0,"delta":{"role":"assistant","content":" in"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1765450201-uCjS9MYSLxlXyzRS6nbO","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450201,"choices":[{"index":0,"delta":{"role":"assistant","content":" main"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1765450201-uCjS9MYSLxlXyzRS6nbO","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450201,"choices":[{"index":0,"delta":{"role":"assistant","content":".go"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1765450201-uCjS9MYSLxlXyzRS6nbO","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450201,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
-
-      data: {"id":"gen-1765450201-uCjS9MYSLxlXyzRS6nbO","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450201,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":160,"completion_tokens":14,"total_tokens":174,"cost":0.000045,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.000024,"upstream_inference_completions_cost":0.000021},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
+      data: {"id":"gen-1768830361-KnDZJcRrhDeKwzt90zgG","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830361,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":160,"completion_tokens":14,"total_tokens":174,"cost":0.0000298,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.0000144,"upstream_inference_completions_cost":0.0000154},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
 
       data: [DONE]
 
@@ -61,15 +49,15 @@ interactions:
       - text/event-stream
     status: 200 OK
     code: 200
-    duration: 1.045920416s
+    duration: 239.99125ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50428
+    content_length: 50922
     host: ""

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

@@ -24,21 +24,21 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"gen-1765450253-aB1ptbsaQGZNx7caoOWm","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450253,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1768830385-x9fwT8MATFhFKpxBh31a","provider":"Alibaba","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830385,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":null}
 
-      data: {"id":"gen-1765450253-aB1ptbsaQGZNx7caoOWm","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450253,"choices":[{"index":0,"delta":{"role":"assistant","content":"Find"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1768830385-x9fwT8MATFhFKpxBh31a","provider":"Alibaba","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830385,"choices":[{"index":0,"delta":{"role":"assistant","content":"Find"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":null}
 
-      data: {"id":"gen-1765450253-aB1ptbsaQGZNx7caoOWm","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450253,"choices":[{"index":0,"delta":{"role":"assistant","content":" .go files and"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1768830385-x9fwT8MATFhFKpxBh31a","provider":"Alibaba","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830385,"choices":[{"index":0,"delta":{"role":"assistant","content":" .go files and"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":null}
 
-      data: {"id":"gen-1765450253-aB1ptbsaQGZNx7caoOWm","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450253,"choices":[{"index":0,"delta":{"role":"assistant","content":" list directory"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1768830385-x9fwT8MATFhFKpxBh31a","provider":"Alibaba","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830385,"choices":[{"index":0,"delta":{"role":"assistant","content":" list directory"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":null}
 
-      data: {"id":"gen-1765450253-aB1ptbsaQGZNx7caoOWm","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450253,"choices":[{"index":0,"delta":{"role":"assistant","content":" in"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1768830385-x9fwT8MATFhFKpxBh31a","provider":"Alibaba","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830385,"choices":[{"index":0,"delta":{"role":"assistant","content":" in"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":null}
 
-      data: {"id":"gen-1765450253-aB1ptbsaQGZNx7caoOWm","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450253,"choices":[{"index":0,"delta":{"role":"assistant","content":" parallel"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1768830385-x9fwT8MATFhFKpxBh31a","provider":"Alibaba","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830385,"choices":[{"index":0,"delta":{"role":"assistant","content":" parallel"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":null}
 
-      data: {"id":"gen-1765450253-aB1ptbsaQGZNx7caoOWm","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450253,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
+      data: {"id":"gen-1768830385-x9fwT8MATFhFKpxBh31a","provider":"Alibaba","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830385,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}],"system_fingerprint":null}
 
-      data: {"id":"gen-1765450253-aB1ptbsaQGZNx7caoOWm","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450253,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":156,"completion_tokens":10,"total_tokens":166,"cost":0.0000354,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.0000234,"upstream_inference_completions_cost":0.000012},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
+      data: {"id":"gen-1768830385-x9fwT8MATFhFKpxBh31a","provider":"Alibaba","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830385,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":160,"completion_tokens":9,"total_tokens":169,"cost":0.0000348,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.000024,"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: 406.877083ms
+    duration: 832.842584ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50439
+    content_length: 50933
     host: ""

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

@@ -24,66 +24,19 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"gen-1765450141-fso4k5alZHsFg1Ss7Y5w","provider":"Alibaba","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450141,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":null}
+      data: {"id":"gen-1768830283-jqcQ1UYtDnQXJSsQIqAv","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830283,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1765450141-fso4k5alZHsFg1Ss7Y5w","provider":"Alibaba","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450141,"choices":[{"index":0,"delta":{"role":"assistant","content":"Read"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":null}
+      data: {"id":"gen-1768830283-jqcQ1UYtDnQXJSsQIqAv","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830283,"choices":[{"index":0,"delta":{"role":"assistant","content":"Read"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1765450141-fso4k5alZHsFg1Ss7Y5w","provider":"Alibaba","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450141,"choices":[{"index":0,"delta":{"role":"assistant","content":" the go mod"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":null}
+      data: {"id":"gen-1768830283-jqcQ1UYtDnQXJSsQIqAv","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830283,"choices":[{"index":0,"delta":{"role":"assistant","content":" the"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1765450141-fso4k5alZHsFg1Ss7Y5w","provider":"Alibaba","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450141,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}],"system_fingerprint":null}
+      data: {"id":"gen-1768830283-jqcQ1UYtDnQXJSsQIqAv","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830283,"choices":[{"index":0,"delta":{"role":"assistant","content":" go"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1765450141-fso4k5alZHsFg1Ss7Y5w","provider":"Alibaba","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450141,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":135,"completion_tokens":4,"total_tokens":139,"cost":0.00002505,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.00002025,"upstream_inference_completions_cost":0.0000048},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
+      data: {"id":"gen-1768830283-jqcQ1UYtDnQXJSsQIqAv","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830283,"choices":[{"index":0,"delta":{"role":"assistant","content":" mod"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: [DONE]
-
-    headers:
-      Content-Type:
-      - text/event-stream
-    status: 200 OK
-    code: 200
-    duration: 762.002208ms
-- id: 1
-  request:
-    proto: HTTP/1.1
-    proto_major: 1
-    proto_minor: 1
-    content_length: 50312
-    host: ""

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

@@ -24,13 +24,13 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"gen-1765450138-WRCaApYTil43Xf1sSzHC","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450138,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1768830280-4PCDv2pnxJ4GGNJaNBDx","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830280,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1765450138-WRCaApYTil43Xf1sSzHC","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450138,"choices":[{"index":0,"delta":{"role":"assistant","content":"Hello"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1768830280-4PCDv2pnxJ4GGNJaNBDx","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830280,"choices":[{"index":0,"delta":{"role":"assistant","content":"Hello"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1765450138-WRCaApYTil43Xf1sSzHC","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450138,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
+      data: {"id":"gen-1768830280-4PCDv2pnxJ4GGNJaNBDx","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830280,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
 
-      data: {"id":"gen-1765450138-WRCaApYTil43Xf1sSzHC","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450138,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":128,"completion_tokens":2,"total_tokens":130,"cost":0.0000144,"is_byok":false,"prompt_tokens_details":{"cached_tokens":2,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.0000128,"upstream_inference_completions_cost":0.0000016},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
+      data: {"id":"gen-1768830280-4PCDv2pnxJ4GGNJaNBDx","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830280,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":128,"completion_tokens":2,"total_tokens":130,"cost":0.0000144,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.0000128,"upstream_inference_completions_cost":0.0000016},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
 
       data: [DONE]
 
@@ -39,15 +39,15 @@ interactions:
       - text/event-stream
     status: 200 OK
     code: 200
-    duration: 1.336080084s
+    duration: 1.783372292s
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50302
+    content_length: 50796
     host: ""

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

@@ -6,9 +6,9 @@ interactions:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 769
+    content_length: 50856
     host: ""
-    body: '{"messages":[{"content":"you will generate a short title based on the first message a user begins a conversation with\n\n<rules>\n- ensure it is not more than 50 characters long\n- the title should be a summary of the user''s message\n- it should be one line long\n- do not use quotes or colons\n- the entire text you return will be used as the title\n- never return anything that is more than one sentence (one line) long\n</rules>\n\n /no_think","role":"system"},{"content":"Generate a concise title for the following content:\n\nuse sourcegraph to search for ''func main'' in Go repositories\n <think>\n\n</think>","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/update_a_file.yaml 🔗

@@ -24,19 +24,21 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"gen-1765450148-ryE7UAQTZkBmJUJaEF6T","provider":"SiliconFlow","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450148,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":""}
+      data: {"id":"gen-1768830290-g9cszM7AWBXcykR0NTwS","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830290,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1765450148-ryE7UAQTZkBmJUJaEF6T","provider":"SiliconFlow","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450148,"choices":[{"index":0,"delta":{"role":"assistant","content":"Update"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":""}
+      data: {"id":"gen-1768830290-g9cszM7AWBXcykR0NTwS","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830290,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1765450148-ryE7UAQTZkBmJUJaEF6T","provider":"SiliconFlow","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450148,"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-1768830290-g9cszM7AWBXcykR0NTwS","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830290,"choices":[{"index":0,"delta":{"role":"assistant","content":"Update"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1765450148-ryE7UAQTZkBmJUJaEF6T","provider":"SiliconFlow","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450148,"choices":[{"index":0,"delta":{"role":"assistant","content":" hello"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":""}
+      data: {"id":"gen-1768830290-g9cszM7AWBXcykR0NTwS","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830290,"choices":[{"index":0,"delta":{"role":"assistant","content":" main.go to print"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1765450148-ryE7UAQTZkBmJUJaEF6T","provider":"SiliconFlow","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450148,"choices":[{"index":0,"delta":{"role":"assistant","content":" from crush"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":""}
+      data: {"id":"gen-1768830290-g9cszM7AWBXcykR0NTwS","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830290,"choices":[{"index":0,"delta":{"role":"assistant","content":" hello"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1765450148-ryE7UAQTZkBmJUJaEF6T","provider":"SiliconFlow","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450148,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}],"system_fingerprint":""}
+      data: {"id":"gen-1768830290-g9cszM7AWBXcykR0NTwS","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830290,"choices":[{"index":0,"delta":{"role":"assistant","content":" from crush"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1765450148-ryE7UAQTZkBmJUJaEF6T","provider":"SiliconFlow","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450148,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":141,"completion_tokens":9,"total_tokens":150,"cost":0.00003234,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.00001974,"upstream_inference_completions_cost":0.0000126},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
+      data: {"id":"gen-1768830290-g9cszM7AWBXcykR0NTwS","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830290,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
+
+      data: {"id":"gen-1768830290-g9cszM7AWBXcykR0NTwS","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830290,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":141,"completion_tokens":9,"total_tokens":150,"cost":0.00002259,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.00001269,"upstream_inference_completions_cost":0.0000099},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
 
       data: [DONE]
 
@@ -45,15 +47,15 @@ interactions:
       - text/event-stream
     status: 200 OK
     code: 200
-    duration: 2.989851042s
+    duration: 982.306417ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50368
+    content_length: 50862
     host: ""

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

@@ -24,25 +24,17 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"gen-1765450247-TGHyRmlHv3hcgx1rGLqM","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450247,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1768830376-47Lo1VDfcxY5VPrlmIsL","provider":"Alibaba","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830376,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":null}
 
-      data: {"id":"gen-1765450247-TGHyRmlHv3hcgx1rGLqM","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450247,"choices":[{"index":0,"delta":{"role":"assistant","content":"Create"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1768830376-47Lo1VDfcxY5VPrlmIsL","provider":"Alibaba","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830376,"choices":[{"index":0,"delta":{"role":"assistant","content":"Create"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":null}
 
-      data: {"id":"gen-1765450247-TGHyRmlHv3hcgx1rGLqM","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450247,"choices":[{"index":0,"delta":{"role":"assistant","content":" config"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1768830376-47Lo1VDfcxY5VPrlmIsL","provider":"Alibaba","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830376,"choices":[{"index":0,"delta":{"role":"assistant","content":" config.json with test"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":null}
 
-      data: {"id":"gen-1765450247-TGHyRmlHv3hcgx1rGLqM","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450247,"choices":[{"index":0,"delta":{"role":"assistant","content":".json"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1768830376-47Lo1VDfcxY5VPrlmIsL","provider":"Alibaba","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830376,"choices":[{"index":0,"delta":{"role":"assistant","content":" data"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":null}
 
-      data: {"id":"gen-1765450247-TGHyRmlHv3hcgx1rGLqM","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450247,"choices":[{"index":0,"delta":{"role":"assistant","content":" with"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1768830376-47Lo1VDfcxY5VPrlmIsL","provider":"Alibaba","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830376,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}],"system_fingerprint":null}
 
-      data: {"id":"gen-1765450247-TGHyRmlHv3hcgx1rGLqM","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450247,"choices":[{"index":0,"delta":{"role":"assistant","content":" sample"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1765450247-TGHyRmlHv3hcgx1rGLqM","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450247,"choices":[{"index":0,"delta":{"role":"assistant","content":" JSON"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1765450247-TGHyRmlHv3hcgx1rGLqM","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450247,"choices":[{"index":0,"delta":{"role":"assistant","content":" content"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1765450247-TGHyRmlHv3hcgx1rGLqM","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450247,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
-
-      data: {"id":"gen-1765450247-TGHyRmlHv3hcgx1rGLqM","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1765450247,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":155,"completion_tokens":8,"total_tokens":163,"cost":0.0000219,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.0000155,"upstream_inference_completions_cost":0.0000064},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
+      data: {"id":"gen-1768830376-47Lo1VDfcxY5VPrlmIsL","provider":"Alibaba","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1768830376,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":159,"completion_tokens":6,"total_tokens":165,"cost":0.00003105,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.00002385,"upstream_inference_completions_cost":0.0000072},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
 
       data: [DONE]
 
@@ -51,15 +43,15 @@ interactions:
       - text/event-stream
     status: 200 OK
     code: 200
-    duration: 866.552792ms
+    duration: 401.234708ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50405
+    content_length: 50899
     host: ""

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

@@ -24,21 +24,21 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"20251211185119a522591d9348495e","created":1765450279,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","reasoning_content":"\n"}}]}
+      data: {"id":"20260119214720f5bafbb053254ba2","created":1768830440,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","reasoning_content":"\n"}}]}
 
-      data: {"id":"20251211185119a522591d9348495e","created":1765450279,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Create"}}]}
+      data: {"id":"20260119214720f5bafbb053254ba2","created":1768830440,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"B"}}]}
 
-      data: {"id":"20251211185119a522591d9348495e","created":1765450279,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" test"}}]}
+      data: {"id":"20260119214720f5bafbb053254ba2","created":1768830440,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"ash"}}]}
 
-      data: {"id":"20251211185119a522591d9348495e","created":1765450279,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":".txt"}}]}
+      data: {"id":"20260119214720f5bafbb053254ba2","created":1768830440,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" file"}}]}
 
-      data: {"id":"20251211185119a522591d9348495e","created":1765450279,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" with"}}]}
+      data: {"id":"20260119214720f5bafbb053254ba2","created":1768830440,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" creation"}}]}
 
-      data: {"id":"20251211185119a522591d9348495e","created":1765450279,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" bash"}}]}
+      data: {"id":"20260119214720f5bafbb053254ba2","created":1768830440,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" with"}}]}
 
-      data: {"id":"20251211185119a522591d9348495e","created":1765450279,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" hello"}}]}
+      data: {"id":"20260119214720f5bafbb053254ba2","created":1768830440,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" content"}}]}
 
-      data: {"id":"20251211185119a522591d9348495e","created":1765450279,"model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":140,"completion_tokens":10,"total_tokens":150,"prompt_tokens_details":{"cached_tokens":4}}}
+      data: {"id":"20260119214720f5bafbb053254ba2","created":1768830440,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":140,"completion_tokens":10,"total_tokens":150,"prompt_tokens_details":{"cached_tokens":114}}}
 
       data: [DONE]
 
@@ -47,15 +47,15 @@ interactions:
       - text/event-stream;charset=UTF-8
     status: 200 OK
     code: 200
-    duration: 1.094726334s
+    duration: 1.716247583s
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50229
+    content_length: 50723
     host: ""

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

@@ -24,19 +24,19 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"20251211185124c68048d96253469c","created":1765450284,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","reasoning_content":"\n"}}]}
+      data: {"id":"20260119214746ff0f57f2dd6f4a3c","created":1768830466,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","reasoning_content":"\n"}}]}
 
-      data: {"id":"20251211185124c68048d96253469c","created":1765450284,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Download"}}]}
+      data: {"id":"20260119214746ff0f57f2dd6f4a3c","created":1768830466,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Download"}}]}
 
-      data: {"id":"20251211185124c68048d96253469c","created":1765450284,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" example"}}]}
+      data: {"id":"20260119214746ff0f57f2dd6f4a3c","created":1768830466,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" file"}}]}
 
-      data: {"id":"20251211185124c68048d96253469c","created":1765450284,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":".txt"}}]}
+      data: {"id":"20260119214746ff0f57f2dd6f4a3c","created":1768830466,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" as"}}]}
 
-      data: {"id":"20251211185124c68048d96253469c","created":1765450284,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" from"}}]}
+      data: {"id":"20260119214746ff0f57f2dd6f4a3c","created":1768830466,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" example"}}]}
 
-      data: {"id":"20251211185124c68048d96253469c","created":1765450284,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" URL"}}]}
+      data: {"id":"20260119214746ff0f57f2dd6f4a3c","created":1768830466,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":".txt"}}]}
 
-      data: {"id":"20251211185124c68048d96253469c","created":1765450284,"model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":143,"completion_tokens":9,"total_tokens":152,"prompt_tokens_details":{"cached_tokens":4}}}
+      data: {"id":"20260119214746ff0f57f2dd6f4a3c","created":1768830466,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":143,"completion_tokens":9,"total_tokens":152,"prompt_tokens_details":{"cached_tokens":114}}}
 
       data: [DONE]
 
@@ -45,15 +45,15 @@ interactions:
       - text/event-stream;charset=UTF-8
     status: 200 OK
     code: 200
-    duration: 1.570323542s
+    duration: 1.298214334s
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50254
+    content_length: 50748
     host: ""

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

@@ -24,19 +24,17 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"20251211185134ebd9fa28ccd3461c","created":1765450294,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","reasoning_content":"\n"}}]}
+      data: {"id":"2026011921480674cd894f317040ff","created":1768830486,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","reasoning_content":"\n"}}]}
 
-      data: {"id":"20251211185134ebd9fa28ccd3461c","created":1765450294,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Find"}}]}
+      data: {"id":"2026011921480674cd894f317040ff","created":1768830486,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"glob"}}]}
 
-      data: {"id":"20251211185134ebd9fa28ccd3461c","created":1765450294,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" Go"}}]}
+      data: {"id":"2026011921480674cd894f317040ff","created":1768830486,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" find"}}]}
 
-      data: {"id":"20251211185134ebd9fa28ccd3461c","created":1765450294,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" files"}}]}
+      data: {"id":"2026011921480674cd894f317040ff","created":1768830486,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" go"}}]}
 
-      data: {"id":"20251211185134ebd9fa28ccd3461c","created":1765450294,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" with"}}]}
+      data: {"id":"2026011921480674cd894f317040ff","created":1768830486,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" files"}}]}
 
-      data: {"id":"20251211185134ebd9fa28ccd3461c","created":1765450294,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" glob"}}]}
-
-      data: {"id":"20251211185134ebd9fa28ccd3461c","created":1765450294,"model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":132,"completion_tokens":9,"total_tokens":141,"prompt_tokens_details":{"cached_tokens":114}}}
+      data: {"id":"2026011921480674cd894f317040ff","created":1768830486,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":132,"completion_tokens":8,"total_tokens":140,"prompt_tokens_details":{"cached_tokens":4}}}
 
       data: [DONE]
 
@@ -45,15 +43,15 @@ interactions:
       - text/event-stream;charset=UTF-8
     status: 200 OK
     code: 200
-    duration: 981.48325ms
+    duration: 1.183180875s
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50190
+    content_length: 50684
     host: ""

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

@@ -6,9 +6,9 @@ interactions:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 716
+    content_length: 50682
     host: ""
-    body: '{"messages":[{"content":"you will generate a short title based on the first message a user begins a conversation with\n\n<rules>\n- ensure it is not more than 50 characters long\n- the title should be a summary of the user''s message\n- it should be one line long\n- do not use quotes or colons\n- the entire text you return will be used as the title\n- never return anything that is more than one sentence (one line) long\n</rules>\n\n /no_think","role":"system"},{"content":"Generate a concise title for the following content:\n\nuse grep to search for the word ''package'' in go files\n <think>\n\n</think>","role":"user"}],"model":"glm-4.5-air","max_tokens":40,"stream_options":{"include_usage":true},"stream":true}'

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

@@ -24,19 +24,19 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"202512111851434c38af7cd171421e","created":1765450303,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","reasoning_content":"\n"}}]}
+      data: {"id":"20260119214825c9d8845a1ce84ef4","created":1768830505,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","reasoning_content":"\n"}}]}
 
-      data: {"id":"202512111851434c38af7cd171421e","created":1765450303,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"List"}}]}
+      data: {"id":"20260119214825c9d8845a1ce84ef4","created":1768830505,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"List"}}]}
 
-      data: {"id":"202512111851434c38af7cd171421e","created":1765450303,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" files"}}]}
+      data: {"id":"20260119214825c9d8845a1ce84ef4","created":1768830505,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" files"}}]}
 
-      data: {"id":"202512111851434c38af7cd171421e","created":1765450303,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" with"}}]}
+      data: {"id":"20260119214825c9d8845a1ce84ef4","created":1768830505,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" with"}}]}
 
-      data: {"id":"202512111851434c38af7cd171421e","created":1765450303,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" ls"}}]}
+      data: {"id":"20260119214825c9d8845a1ce84ef4","created":1768830505,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" ls"}}]}
 
-      data: {"id":"202512111851434c38af7cd171421e","created":1765450303,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" command"}}]}
+      data: {"id":"20260119214825c9d8845a1ce84ef4","created":1768830505,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" command"}}]}
 
-      data: {"id":"202512111851434c38af7cd171421e","created":1765450303,"model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":130,"completion_tokens":9,"total_tokens":139,"prompt_tokens_details":{"cached_tokens":115}}}
+      data: {"id":"20260119214825c9d8845a1ce84ef4","created":1768830505,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":130,"completion_tokens":9,"total_tokens":139,"prompt_tokens_details":{"cached_tokens":4}}}
 
       data: [DONE]
 
@@ -45,15 +45,15 @@ interactions:
       - text/event-stream;charset=UTF-8
     status: 200 OK
     code: 200
-    duration: 1.021628709s
+    duration: 1.619916917s
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50182
+    content_length: 50676
     host: ""

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

@@ -24,21 +24,25 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"20251211185203f1688fa8b72643cb","created":1765450323,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","reasoning_content":"\n"}}]}
+      data: {"id":"20260119214830f5b9b304dd864346","created":1768830510,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","reasoning_content":"\n"}}]}
 
-      data: {"id":"20251211185203f1688fa8b72643cb","created":1765450323,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Mult"}}]}
+      data: {"id":"20260119214830f5b9b304dd864346","created":1768830510,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Mult"}}]}
 
-      data: {"id":"20251211185203f1688fa8b72643cb","created":1765450323,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"ied"}}]}
+      data: {"id":"20260119214830f5b9b304dd864346","created":1768830510,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"ied"}}]}
 
-      data: {"id":"20251211185203f1688fa8b72643cb","created":1765450323,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"it"}}]}
+      data: {"id":"20260119214830f5b9b304dd864346","created":1768830510,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"it"}}]}
 
-      data: {"id":"20251211185203f1688fa8b72643cb","created":1765450323,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" main"}}]}
+      data: {"id":"20260119214830f5b9b304dd864346","created":1768830510,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" in"}}]}
 
-      data: {"id":"20251211185203f1688fa8b72643cb","created":1765450323,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":".go"}}]}
+      data: {"id":"20260119214830f5b9b304dd864346","created":1768830510,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" main"}}]}
 
-      data: {"id":"20251211185203f1688fa8b72643cb","created":1765450323,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" changes"}}]}
+      data: {"id":"20260119214830f5b9b304dd864346","created":1768830510,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":".go"}}]}
 
-      data: {"id":"20251211185203f1688fa8b72643cb","created":1765450323,"model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":153,"completion_tokens":10,"total_tokens":163,"prompt_tokens_details":{"cached_tokens":4}}}
+      data: {"id":"20260119214830f5b9b304dd864346","created":1768830510,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" Title"}}]}
+
+      data: {"id":"20260119214830f5b9b304dd864346","created":1768830510,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" Change"}}]}
+
+      data: {"id":"20260119214830f5b9b304dd864346","created":1768830510,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":153,"completion_tokens":12,"total_tokens":165,"prompt_tokens_details":{"cached_tokens":115}}}
 
       data: [DONE]
 
@@ -47,15 +51,15 @@ interactions:
       - text/event-stream;charset=UTF-8
     status: 200 OK
     code: 200
-    duration: 845.8035ms
+    duration: 1.904839708s
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50268
+    content_length: 50762
     host: ""

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

@@ -24,19 +24,23 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"2025121118522536db54c7dd194969","created":1765450345,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","reasoning_content":"\n"}}]}
+      data: {"id":"202601192148452cbea4d5a4814811","created":1768830525,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","reasoning_content":"\n"}}]}
 
-      data: {"id":"2025121118522536db54c7dd194969","created":1765450345,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Parallel"}}]}
+      data: {"id":"202601192148452cbea4d5a4814811","created":1768830525,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Parallel"}}]}
 
-      data: {"id":"2025121118522536db54c7dd194969","created":1765450345,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" glob"}}]}
+      data: {"id":"202601192148452cbea4d5a4814811","created":1768830525,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" glob"}}]}
 
-      data: {"id":"2025121118522536db54c7dd194969","created":1765450345,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" and"}}]}
+      data: {"id":"202601192148452cbea4d5a4814811","created":1768830525,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" and"}}]}
 
-      data: {"id":"2025121118522536db54c7dd194969","created":1765450345,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" ls"}}]}
+      data: {"id":"202601192148452cbea4d5a4814811","created":1768830525,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" ls"}}]}
 
-      data: {"id":"2025121118522536db54c7dd194969","created":1765450345,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" commands"}}]}
+      data: {"id":"202601192148452cbea4d5a4814811","created":1768830525,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" for"}}]}
 
-      data: {"id":"2025121118522536db54c7dd194969","created":1765450345,"model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":149,"completion_tokens":9,"total_tokens":158,"prompt_tokens_details":{"cached_tokens":122}}}
+      data: {"id":"202601192148452cbea4d5a4814811","created":1768830525,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" Go"}}]}
+
+      data: {"id":"202601192148452cbea4d5a4814811","created":1768830525,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" files"}}]}
+
+      data: {"id":"202601192148452cbea4d5a4814811","created":1768830525,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":149,"completion_tokens":11,"total_tokens":160,"prompt_tokens_details":{"cached_tokens":4}}}
 
       data: [DONE]
 
@@ -45,15 +49,15 @@ interactions:
       - text/event-stream;charset=UTF-8
     status: 200 OK
     code: 200
-    duration: 1.506124709s
+    duration: 1.2044225s
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50279
+    content_length: 50773
     host: ""

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

@@ -24,15 +24,15 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"20251211185106afa65805a45f4c60","created":1765450266,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","reasoning_content":"\n"}}]}
+      data: {"id":"20260119214656028e1a27796245c0","created":1768830416,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","reasoning_content":"\n"}}]}
 
-      data: {"id":"20251211185106afa65805a45f4c60","created":1765450266,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Go"}}]}
+      data: {"id":"20260119214656028e1a27796245c0","created":1768830416,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Go"}}]}
 
-      data: {"id":"20251211185106afa65805a45f4c60","created":1765450266,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" mod"}}]}
+      data: {"id":"20260119214656028e1a27796245c0","created":1768830416,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" Module"}}]}
 
-      data: {"id":"20251211185106afa65805a45f4c60","created":1765450266,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" instructions"}}]}
+      data: {"id":"20260119214656028e1a27796245c0","created":1768830416,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" Summary"}}]}
 
-      data: {"id":"20251211185106afa65805a45f4c60","created":1765450266,"model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":124,"completion_tokens":7,"total_tokens":131,"prompt_tokens_details":{"cached_tokens":114}}}
+      data: {"id":"20260119214656028e1a27796245c0","created":1768830416,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":124,"completion_tokens":7,"total_tokens":131,"prompt_tokens_details":{"cached_tokens":114}}}
 
       data: [DONE]
 
@@ -41,15 +41,15 @@ interactions:
       - text/event-stream;charset=UTF-8
     status: 200 OK
     code: 200
-    duration: 806.182667ms
+    duration: 1.35162425s
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50152
+    content_length: 50646
     host: ""

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

@@ -24,11 +24,11 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"20251211185103d5d62a07ff31425d","created":1765450263,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","reasoning_content":"\n"}}]}
+      data: {"id":"2026011921463481193bf2b83c45e5","created":1768830394,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","reasoning_content":"\n"}}]}
 
-      data: {"id":"20251211185103d5d62a07ff31425d","created":1765450263,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Hello"}}]}
+      data: {"id":"2026011921463481193bf2b83c45e5","created":1768830394,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Hello"}}]}
 
-      data: {"id":"20251211185103d5d62a07ff31425d","created":1765450263,"model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":121,"completion_tokens":5,"total_tokens":126,"prompt_tokens_details":{"cached_tokens":4}}}
+      data: {"id":"2026011921463481193bf2b83c45e5","created":1768830394,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":121,"completion_tokens":5,"total_tokens":126,"prompt_tokens_details":{"cached_tokens":4}}}
 
       data: [DONE]
 
@@ -37,15 +37,15 @@ interactions:
       - text/event-stream;charset=UTF-8
     status: 200 OK
     code: 200
-    duration: 1.195221292s
+    duration: 1.262129958s
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50142
+    content_length: 50636
     host: ""

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

@@ -24,21 +24,19 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"20251211185211c6f3ee23be6f4036","created":1765450331,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","reasoning_content":"\n"}}]}
+      data: {"id":"20260119215657a528cbba8dc945c7","created":1768831017,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","reasoning_content":"\n"}}]}
 
-      data: {"id":"20251211185211c6f3ee23be6f4036","created":1765450331,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Search"}}]}
+      data: {"id":"20260119215657a528cbba8dc945c7","created":1768831017,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Source"}}]}
 
-      data: {"id":"20251211185211c6f3ee23be6f4036","created":1765450331,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" Go"}}]}
+      data: {"id":"20260119215657a528cbba8dc945c7","created":1768831017,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"graph"}}]}
 
-      data: {"id":"20251211185211c6f3ee23be6f4036","created":1765450331,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" repos"}}]}
+      data: {"id":"20260119215657a528cbba8dc945c7","created":1768831017,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" Go"}}]}
 
-      data: {"id":"20251211185211c6f3ee23be6f4036","created":1765450331,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" with"}}]}
+      data: {"id":"20260119215657a528cbba8dc945c7","created":1768831017,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" Main"}}]}
 
-      data: {"id":"20251211185211c6f3ee23be6f4036","created":1765450331,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" Source"}}]}
+      data: {"id":"20260119215657a528cbba8dc945c7","created":1768831017,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" Search"}}]}
 
-      data: {"id":"20251211185211c6f3ee23be6f4036","created":1765450331,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"graph"}}]}
-
-      data: {"id":"20251211185211c6f3ee23be6f4036","created":1765450331,"model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":133,"completion_tokens":10,"total_tokens":143,"prompt_tokens_details":{"cached_tokens":115}}}
+      data: {"id":"20260119215657a528cbba8dc945c7","created":1768831017,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":133,"completion_tokens":9,"total_tokens":142,"prompt_tokens_details":{"cached_tokens":4}}}
 
       data: [DONE]
 
@@ -47,15 +45,15 @@ interactions:
       - text/event-stream;charset=UTF-8
     status: 200 OK
     code: 200
-    duration: 875.558166ms
+    duration: 1.964927833s
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50202
+    content_length: 50696
     host: ""

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

@@ -24,25 +24,17 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"20251211185111270976ba1e5441c9","created":1765450271,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","reasoning_content":"\n"}}]}
+      data: {"id":"2026011921470892df6a623ba442e8","created":1768830428,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","reasoning_content":"\n"}}]}
 
-      data: {"id":"20251211185111270976ba1e5441c9","created":1765450271,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Update"}}]}
+      data: {"id":"2026011921470892df6a623ba442e8","created":1768830428,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Update"}}]}
 
-      data: {"id":"20251211185111270976ba1e5441c9","created":1765450271,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" main"}}]}
+      data: {"id":"2026011921470892df6a623ba442e8","created":1768830428,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" main"}}]}
 
-      data: {"id":"20251211185111270976ba1e5441c9","created":1765450271,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":".go"}}]}
+      data: {"id":"2026011921470892df6a623ba442e8","created":1768830428,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":".go"}}]}
 
-      data: {"id":"20251211185111270976ba1e5441c9","created":1765450271,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" to"}}]}
+      data: {"id":"2026011921470892df6a623ba442e8","created":1768830428,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" greeting"}}]}
 
-      data: {"id":"20251211185111270976ba1e5441c9","created":1765450271,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" print"}}]}
-
-      data: {"id":"20251211185111270976ba1e5441c9","created":1765450271,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" hello"}}]}
-
-      data: {"id":"20251211185111270976ba1e5441c9","created":1765450271,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" from"}}]}
-
-      data: {"id":"20251211185111270976ba1e5441c9","created":1765450271,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" crush"}}]}
-
-      data: {"id":"20251211185111270976ba1e5441c9","created":1765450271,"model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":134,"completion_tokens":12,"total_tokens":146,"prompt_tokens_details":{"cached_tokens":114}}}
+      data: {"id":"2026011921470892df6a623ba442e8","created":1768830428,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":134,"completion_tokens":8,"total_tokens":142,"prompt_tokens_details":{"cached_tokens":114}}}
 
       data: [DONE]
 
@@ -51,15 +43,15 @@ interactions:
       - text/event-stream;charset=UTF-8
     status: 200 OK
     code: 200
-    duration: 812.292167ms
+    duration: 2.524076791s
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50208
+    content_length: 50702
     host: ""

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

@@ -24,23 +24,19 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"2025121118521783ded8f44859400f","created":1765450337,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","reasoning_content":"\n"}}]}
+      data: {"id":"20260119214841d5e404cbb41f4b39","created":1768830521,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","reasoning_content":"\n"}}]}
 
-      data: {"id":"2025121118521783ded8f44859400f","created":1765450337,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Create"}}]}
+      data: {"id":"20260119214841d5e404cbb41f4b39","created":1768830521,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Creating"}}]}
 
-      data: {"id":"2025121118521783ded8f44859400f","created":1765450337,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" config"}}]}
+      data: {"id":"20260119214841d5e404cbb41f4b39","created":1768830521,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" config"}}]}
 
-      data: {"id":"2025121118521783ded8f44859400f","created":1765450337,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":".json"}}]}
+      data: {"id":"20260119214841d5e404cbb41f4b39","created":1768830521,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":".json"}}]}
 
-      data: {"id":"2025121118521783ded8f44859400f","created":1765450337,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" file"}}]}
+      data: {"id":"20260119214841d5e404cbb41f4b39","created":1768830521,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" with"}}]}
 
-      data: {"id":"2025121118521783ded8f44859400f","created":1765450337,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" with"}}]}
+      data: {"id":"20260119214841d5e404cbb41f4b39","created":1768830521,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" content"}}]}
 
-      data: {"id":"2025121118521783ded8f44859400f","created":1765450337,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" JSON"}}]}
-
-      data: {"id":"2025121118521783ded8f44859400f","created":1765450337,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" content"}}]}
-
-      data: {"id":"2025121118521783ded8f44859400f","created":1765450337,"model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":148,"completion_tokens":11,"total_tokens":159,"prompt_tokens_details":{"cached_tokens":115}}}
+      data: {"id":"20260119214841d5e404cbb41f4b39","created":1768830521,"object":"chat.completion.chunk","model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":148,"completion_tokens":9,"total_tokens":157,"prompt_tokens_details":{"cached_tokens":115}}}
 
       data: [DONE]
 
@@ -49,15 +45,15 @@ interactions:
       - text/event-stream;charset=UTF-8
     status: 200 OK
     code: 200
-    duration: 1.380565417s
+    duration: 990.550333ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 50245
+    content_length: 50739
     host: ""

internal/agent/tools/diagnostics.go 🔗

@@ -16,7 +16,7 @@ import (
 )
 
 type DiagnosticsParams struct {
-	FilePath string `json:"file_path,omitempty" description:"The path to the file to get diagnostics for (leave w empty for project diagnostics)"`
+	FilePath string `json:"file_path,omitempty" description:"The path to the file to get diagnostics for (leave empty for project diagnostics)"`
 }
 
 const DiagnosticsToolName = "lsp_diagnostics"

internal/agent/tools/edit.go 🔗

@@ -44,6 +44,11 @@ type EditResponseMetadata struct {
 
 const EditToolName = "edit"
 
+var (
+	oldStringNotFoundErr        = fantasy.NewTextErrorResponse("old_string not found in file. Make sure it matches exactly, including whitespace and line breaks.")
+	oldStringMultipleMatchesErr = fantasy.NewTextErrorResponse("old_string appears multiple times in the file. Please provide more context to ensure a unique match, or set replace_all to true")
+)
+
 //go:embed edit.md
 var editDescription []byte
 
@@ -211,18 +216,16 @@ func deleteContent(edit editContext, filePath, oldString string, replaceAll bool
 	oldContent, isCrlf := fsext.ToUnixLineEndings(string(content))
 
 	var newContent string
-	var deletionCount int
 
 	if replaceAll {
 		newContent = strings.ReplaceAll(oldContent, oldString, "")
-		deletionCount = strings.Count(oldContent, oldString)
-		if deletionCount == 0 {
-			return fantasy.NewTextErrorResponse("old_string not found in file. Make sure it matches exactly, including whitespace and line breaks"), nil
+		if newContent == oldContent {
+			return oldStringNotFoundErr, nil
 		}
 	} else {
 		index := strings.Index(oldContent, oldString)
 		if index == -1 {
-			return fantasy.NewTextErrorResponse("old_string not found in file. Make sure it matches exactly, including whitespace and line breaks"), nil
+			return oldStringNotFoundErr, nil
 		}
 
 		lastIndex := strings.LastIndex(oldContent, oldString)
@@ -231,13 +234,12 @@ func deleteContent(edit editContext, filePath, oldString string, replaceAll bool
 		}
 
 		newContent = oldContent[:index] + oldContent[index+len(oldString):]
-		deletionCount = 1
 	}
 
 	sessionID := GetSessionFromContext(edit.ctx)
 
 	if sessionID == "" {
-		return fantasy.ToolResponse{}, fmt.Errorf("session ID is required for creating a new file")
+		return fantasy.ToolResponse{}, fmt.Errorf("session ID is required for deleting content")
 	}
 
 	_, additions, removals := diff.GenerateDiff(
@@ -287,14 +289,14 @@ func deleteContent(edit editContext, filePath, oldString string, replaceAll bool
 		}
 	}
 	if file.Content != oldContent {
-		// User Manually changed the content store an intermediate version
+		// User manually changed the content; store an intermediate version
 		_, err = edit.files.CreateVersion(edit.ctx, sessionID, filePath, oldContent)
 		if err != nil {
 			slog.Error("Error creating file history version", "error", err)
 		}
 	}
 	// Store the new version
-	_, err = edit.files.CreateVersion(edit.ctx, sessionID, filePath, "")
+	_, err = edit.files.CreateVersion(edit.ctx, sessionID, filePath, newContent)
 	if err != nil {
 		slog.Error("Error creating file history version", "error", err)
 	}
@@ -347,27 +349,21 @@ func replaceContent(edit editContext, filePath, oldString, newString string, rep
 	oldContent, isCrlf := fsext.ToUnixLineEndings(string(content))
 
 	var newContent string
-	var replacementCount int
 
 	if replaceAll {
 		newContent = strings.ReplaceAll(oldContent, oldString, newString)
-		replacementCount = strings.Count(oldContent, oldString)
-		if replacementCount == 0 {
-			return fantasy.NewTextErrorResponse("old_string not found in file. Make sure it matches exactly, including whitespace and line breaks"), nil
-		}
 	} else {
 		index := strings.Index(oldContent, oldString)
 		if index == -1 {
-			return fantasy.NewTextErrorResponse("old_string not found in file. Make sure it matches exactly, including whitespace and line breaks"), nil
+			return oldStringNotFoundErr, nil
 		}
 
 		lastIndex := strings.LastIndex(oldContent, oldString)
 		if index != lastIndex {
-			return fantasy.NewTextErrorResponse("old_string appears multiple times in the file. Please provide more context to ensure a unique match, or set replace_all to true"), nil
+			return oldStringMultipleMatchesErr, nil
 		}
 
 		newContent = oldContent[:index] + newString + oldContent[index+len(oldString):]
-		replacementCount = 1
 	}
 
 	if oldContent == newContent {
@@ -425,7 +421,7 @@ func replaceContent(edit editContext, filePath, oldString, newString string, rep
 		}
 	}
 	if file.Content != oldContent {
-		// User Manually changed the content store an intermediate version
+		// User manually changed the content; store an intermediate version
 		_, err = edit.files.CreateVersion(edit.ctx, sessionID, filePath, oldContent)
 		if err != nil {
 			slog.Debug("Error creating file history version", "error", err)

internal/agent/tools/fetch.go 🔗

@@ -73,12 +73,14 @@ func NewFetchTool(permissions permission.Service, workingDir string, client *htt
 				return fantasy.ToolResponse{}, permission.ErrorPermissionDenied
 			}
 
+			// maxFetchTimeoutSeconds is the maximum allowed timeout for fetch requests (2 minutes)
+			const maxFetchTimeoutSeconds = 120
+
 			// Handle timeout with context
 			requestCtx := ctx
 			if params.Timeout > 0 {
-				maxTimeout := 120 // 2 minutes
-				if params.Timeout > maxTimeout {
-					params.Timeout = maxTimeout
+				if params.Timeout > maxFetchTimeoutSeconds {
+					params.Timeout = maxFetchTimeoutSeconds
 				}
 				var cancel context.CancelFunc
 				requestCtx, cancel = context.WithTimeout(ctx, time.Duration(params.Timeout)*time.Second)
@@ -102,7 +104,10 @@ func NewFetchTool(permissions permission.Service, workingDir string, client *htt
 				return fantasy.NewTextErrorResponse(fmt.Sprintf("Request failed with status code: %d", resp.StatusCode)), nil
 			}
 
-			maxSize := int64(5 * 1024 * 1024) // 5MB
+			// maxFetchResponseSizeBytes is the maximum size of response body to read (5MB)
+			const maxFetchResponseSizeBytes = int64(5 * 1024 * 1024)
+
+			maxSize := maxFetchResponseSizeBytes
 			body, err := io.ReadAll(io.LimitReader(resp.Body, maxSize))
 			if err != nil {
 				return fantasy.NewTextErrorResponse("Failed to read response body: " + err.Error()), nil
@@ -110,8 +115,8 @@ func NewFetchTool(permissions permission.Service, workingDir string, client *htt
 
 			content := string(body)
 
-			isValidUt8 := utf8.ValidString(content)
-			if !isValidUt8 {
+			validUTF8 := utf8.ValidString(content)
+			if !validUTF8 {
 				return fantasy.NewTextErrorResponse("Response content is not valid UTF-8"), nil
 			}
 			contentType := resp.Header.Get("Content-Type")
@@ -154,9 +159,8 @@ func NewFetchTool(permissions permission.Service, workingDir string, client *htt
 					content = "<html>\n<body>\n" + body + "\n</body>\n</html>"
 				}
 			}
-			// calculate byte size of content
-			contentSize := int64(len(content))
-			if contentSize > MaxReadSize {
+			// truncate content if it exceeds max read size
+			if int64(len(content)) > MaxReadSize {
 				content = content[:MaxReadSize]
 				content += fmt.Sprintf("\n\n[Content truncated to %d bytes]", MaxReadSize)
 			}

internal/agent/tools/ls.go 🔗

@@ -28,10 +28,17 @@ type LSPermissionsParams struct {
 	Depth  int      `json:"depth"`
 }
 
+type NodeType string
+
+const (
+	NodeTypeFile      NodeType = "file"
+	NodeTypeDirectory NodeType = "directory"
+)
+
 type TreeNode struct {
 	Name     string      `json:"name"`
 	Path     string      `json:"path"`
-	Type     string      `json:"type"` // "file" or "directory"
+	Type     NodeType    `json:"type"`
 	Children []*TreeNode `json:"children,omitempty"`
 }
 
@@ -179,9 +186,9 @@ func createFileTree(sortedPaths []string, rootPath string) []*TreeNode {
 
 			isLastPart := i == len(parts)-1
 			isDir := !isLastPart || strings.HasSuffix(relativePath, string(filepath.Separator))
-			nodeType := "file"
+			nodeType := NodeTypeFile
 			if isDir {
-				nodeType = "directory"
+				nodeType = NodeTypeDirectory
 			}
 			newNode := &TreeNode{
 				Name:     part,
@@ -228,13 +235,13 @@ func printNode(builder *strings.Builder, node *TreeNode, level int) {
 	indent := strings.Repeat("  ", level)
 
 	nodeName := node.Name
-	if node.Type == "directory" {
+	if node.Type == NodeTypeDirectory {
 		nodeName = nodeName + "/"
 	}
 
 	fmt.Fprintf(builder, "%s- %s\n", indent, nodeName)
 
-	if node.Type == "directory" && len(node.Children) > 0 {
+	if node.Type == NodeTypeDirectory && len(node.Children) > 0 {
 		for _, child := range node.Children {
 			printNode(builder, child, level+1)
 		}

internal/agent/tools/mcp/init.go 🔗

@@ -29,6 +29,8 @@ var (
 	sessions = csync.NewMap[string, *mcp.ClientSession]()
 	states   = csync.NewMap[string, ClientInfo]()
 	broker   = pubsub.NewBroker[Event]()
+	initOnce sync.Once
+	initDone = make(chan struct{})
 )
 
 // State represents the current state of an MCP client
@@ -197,6 +199,18 @@ func Initialize(ctx context.Context, permissions permission.Service, cfg *config
 		}(name, m)
 	}
 	wg.Wait()
+	initOnce.Do(func() { close(initDone) })
+}
+
+// WaitForInit blocks until MCP initialization is complete.
+// If Initialize was never called, this returns immediately.
+func WaitForInit(ctx context.Context) error {
+	select {
+	case <-initDone:
+		return nil
+	case <-ctx.Done():
+		return ctx.Err()
+	}
 }
 
 func getOrRenewClient(ctx context.Context, name string) (*mcp.ClientSession, error) {

internal/agent/tools/search.go 🔗

@@ -4,10 +4,13 @@ import (
 	"context"
 	"fmt"
 	"io"
+	"math/rand/v2"
 	"net/http"
 	"net/url"
 	"slices"
 	"strings"
+	"sync"
+	"time"
 
 	"golang.org/x/net/html"
 )
@@ -20,28 +23,41 @@ type SearchResult struct {
 	Position int
 }
 
-// searchDuckDuckGo performs a web search using DuckDuckGo's HTML endpoint.
+var userAgents = []string{
+	"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36",
+	"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36",
+	"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36",
+	"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36",
+	"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36",
+	"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:133.0) Gecko/20100101 Firefox/133.0",
+	"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0",
+	"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:133.0) Gecko/20100101 Firefox/133.0",
+	"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.1 Safari/605.1.15",
+	"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.6 Safari/605.1.15",
+	"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0",
+}
+
+var acceptLanguages = []string{
+	"en-US,en;q=0.9",
+	"en-US,en;q=0.9,es;q=0.8",
+	"en-GB,en;q=0.9,en-US;q=0.8",
+	"en-US,en;q=0.5",
+	"en-CA,en;q=0.9,en-US;q=0.8",
+}
+
 func searchDuckDuckGo(ctx context.Context, client *http.Client, query string, maxResults int) ([]SearchResult, error) {
 	if maxResults <= 0 {
 		maxResults = 10
 	}
 
-	formData := url.Values{}
-	formData.Set("q", query)
-	formData.Set("b", "")
-	formData.Set("kl", "")
+	searchURL := "https://lite.duckduckgo.com/lite/?q=" + url.QueryEscape(query)
 
-	req, err := http.NewRequestWithContext(ctx, "POST", "https://html.duckduckgo.com/html", strings.NewReader(formData.Encode()))
+	req, err := http.NewRequestWithContext(ctx, "GET", searchURL, nil)
 	if err != nil {
 		return nil, fmt.Errorf("failed to create request: %w", err)
 	}
 
-	req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
-	req.Header.Set("User-Agent", BrowserUserAgent)
-	req.Header.Set("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8")
-	req.Header.Set("Accept-Language", "en-US,en;q=0.5")
-	req.Header.Set("Accept-Encoding", "gzip, deflate")
-	req.Header.Set("Referer", "https://duckduckgo.com/")
+	setRandomizedHeaders(req)
 
 	resp, err := client.Do(req)
 	if err != nil {
@@ -49,10 +65,8 @@ func searchDuckDuckGo(ctx context.Context, client *http.Client, query string, ma
 	}
 	defer resp.Body.Close()
 
-	// Accept both 200 (OK) and 202 (Accepted).
-	// DuckDuckGo may still return 202 for rate limiting or bot detection.
 	if resp.StatusCode != http.StatusOK && resp.StatusCode != http.StatusAccepted {
-		return nil, fmt.Errorf("search failed with status code: %d (DuckDuckGo may be rate limiting requests)", resp.StatusCode)
+		return nil, fmt.Errorf("search failed with status code: %d", resp.StatusCode)
 	}
 
 	body, err := io.ReadAll(resp.Body)
@@ -60,85 +74,90 @@ func searchDuckDuckGo(ctx context.Context, client *http.Client, query string, ma
 		return nil, fmt.Errorf("failed to read response: %w", err)
 	}
 
-	return parseSearchResults(string(body), maxResults)
+	return parseLiteSearchResults(string(body), maxResults)
 }
 
-// parseSearchResults extracts search results from DuckDuckGo HTML response.
-func parseSearchResults(htmlContent string, maxResults int) ([]SearchResult, error) {
+func setRandomizedHeaders(req *http.Request) {
+	req.Header.Set("User-Agent", userAgents[rand.IntN(len(userAgents))])
+	req.Header.Set("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8")
+	req.Header.Set("Accept-Language", acceptLanguages[rand.IntN(len(acceptLanguages))])
+	req.Header.Set("Accept-Encoding", "identity")
+	req.Header.Set("Connection", "keep-alive")
+	req.Header.Set("Upgrade-Insecure-Requests", "1")
+	req.Header.Set("Sec-Fetch-Dest", "document")
+	req.Header.Set("Sec-Fetch-Mode", "navigate")
+	req.Header.Set("Sec-Fetch-Site", "none")
+	req.Header.Set("Sec-Fetch-User", "?1")
+	req.Header.Set("Cache-Control", "max-age=0")
+	if rand.IntN(2) == 0 {
+		req.Header.Set("DNT", "1")
+	}
+}
+
+func parseLiteSearchResults(htmlContent string, maxResults int) ([]SearchResult, error) {
 	doc, err := html.Parse(strings.NewReader(htmlContent))
 	if err != nil {
 		return nil, fmt.Errorf("failed to parse HTML: %w", err)
 	}
 
 	var results []SearchResult
-	var traverse func(*html.Node)
+	var currentResult *SearchResult
 
+	var traverse func(*html.Node)
 	traverse = func(n *html.Node) {
-		if n.Type == html.ElementNode && n.Data == "div" && hasClass(n, "result") {
-			result := extractResult(n)
-			if result != nil && result.Link != "" && !strings.Contains(result.Link, "y.js") {
-				result.Position = len(results) + 1
-				results = append(results, *result)
-				if len(results) >= maxResults {
-					return
+		if n.Type == html.ElementNode {
+			if n.Data == "a" && hasClass(n, "result-link") {
+				if currentResult != nil && currentResult.Link != "" {
+					currentResult.Position = len(results) + 1
+					results = append(results, *currentResult)
+					if len(results) >= maxResults {
+						return
+					}
+				}
+				currentResult = &SearchResult{Title: getTextContent(n)}
+				for _, attr := range n.Attr {
+					if attr.Key == "href" {
+						currentResult.Link = cleanDuckDuckGoURL(attr.Val)
+						break
+					}
 				}
 			}
+			if n.Data == "td" && hasClass(n, "result-snippet") && currentResult != nil {
+				currentResult.Snippet = getTextContent(n)
+			}
 		}
-		for c := n.FirstChild; c != nil && len(results) < maxResults; c = c.NextSibling {
+		for c := n.FirstChild; c != nil; c = c.NextSibling {
+			if len(results) >= maxResults {
+				return
+			}
 			traverse(c)
 		}
 	}
 
 	traverse(doc)
+
+	if currentResult != nil && currentResult.Link != "" && len(results) < maxResults {
+		currentResult.Position = len(results) + 1
+		results = append(results, *currentResult)
+	}
+
 	return results, nil
 }
 
-// hasClass checks if an HTML node has a specific class.
 func hasClass(n *html.Node, class string) bool {
 	for _, attr := range n.Attr {
 		if attr.Key == "class" {
-			return slices.Contains(strings.Fields(attr.Val), class)
-		}
-	}
-	return false
-}
-
-// extractResult extracts a search result from a result div node.
-func extractResult(n *html.Node) *SearchResult {
-	result := &SearchResult{}
-
-	var traverse func(*html.Node)
-	traverse = func(node *html.Node) {
-		if node.Type == html.ElementNode {
-			// Look for title link.
-			if node.Data == "a" && hasClass(node, "result__a") {
-				result.Title = getTextContent(node)
-				for _, attr := range node.Attr {
-					if attr.Key == "href" {
-						result.Link = cleanDuckDuckGoURL(attr.Val)
-						break
-					}
-				}
-			}
-			// Look for snippet.
-			if node.Data == "a" && hasClass(node, "result__snippet") {
-				result.Snippet = getTextContent(node)
+			if slices.Contains(strings.Fields(attr.Val), class) {
+				return true
 			}
 		}
-		for c := node.FirstChild; c != nil; c = c.NextSibling {
-			traverse(c)
-		}
 	}
-
-	traverse(n)
-	return result
+	return false
 }
 
-// getTextContent extracts all text content from a node and its children.
 func getTextContent(n *html.Node) string {
 	var text strings.Builder
 	var traverse func(*html.Node)
-
 	traverse = func(node *html.Node) {
 		if node.Type == html.TextNode {
 			text.WriteString(node.Data)
@@ -147,22 +166,18 @@ func getTextContent(n *html.Node) string {
 			traverse(c)
 		}
 	}
-
 	traverse(n)
 	return strings.TrimSpace(text.String())
 }
 
-// cleanDuckDuckGoURL extracts the actual URL from DuckDuckGo's redirect URL.
 func cleanDuckDuckGoURL(rawURL string) string {
 	if strings.HasPrefix(rawURL, "//duckduckgo.com/l/?uddg=") {
-		// Extract the actual URL from the redirect.
 		if idx := strings.Index(rawURL, "uddg="); idx != -1 {
 			encoded := rawURL[idx+5:]
 			if ampIdx := strings.Index(encoded, "&"); ampIdx != -1 {
 				encoded = encoded[:ampIdx]
 			}
-			decoded, err := url.QueryUnescape(encoded)
-			if err == nil {
+			if decoded, err := url.QueryUnescape(encoded); err == nil {
 				return decoded
 			}
 		}
@@ -170,20 +185,35 @@ func cleanDuckDuckGoURL(rawURL string) string {
 	return rawURL
 }
 
-// formatSearchResults formats search results for LLM consumption.
 func formatSearchResults(results []SearchResult) string {
 	if len(results) == 0 {
-		return "No results were found for your search query. This could be due to DuckDuckGo's bot detection or the query returned no matches. Please try rephrasing your search or try again in a few minutes."
+		return "No results found. Try rephrasing your search."
 	}
 
 	var sb strings.Builder
 	sb.WriteString(fmt.Sprintf("Found %d search results:\n\n", len(results)))
-
 	for _, result := range results {
 		sb.WriteString(fmt.Sprintf("%d. %s\n", result.Position, result.Title))
 		sb.WriteString(fmt.Sprintf("   URL: %s\n", result.Link))
 		sb.WriteString(fmt.Sprintf("   Summary: %s\n\n", result.Snippet))
 	}
-
 	return sb.String()
 }
+
+var (
+	lastSearchMu   sync.Mutex
+	lastSearchTime time.Time
+)
+
+// maybeDelaySearch adds a random delay if the last search was recent.
+func maybeDelaySearch() {
+	lastSearchMu.Lock()
+	defer lastSearchMu.Unlock()
+
+	minGap := time.Duration(500+rand.IntN(1500)) * time.Millisecond
+	elapsed := time.Since(lastSearchTime)
+	if elapsed < minGap {
+		time.Sleep(minGap - elapsed)
+	}
+	lastSearchTime = time.Now()
+}

internal/agent/tools/view.go 🔗

@@ -35,13 +35,6 @@ type ViewPermissionsParams struct {
 	Limit    int    `json:"limit"`
 }
 
-type viewTool struct {
-	lspClients  *csync.Map[string, *lsp.Client]
-	workingDir  string
-	permissions permission.Service
-	skillsPaths []string
-}
-
 type ViewResponseMetadata struct {
 	FilePath string `json:"file_path"`
 	Content  string `json:"content"`

internal/agent/tools/web_search.go 🔗

@@ -3,6 +3,7 @@ package tools
 import (
 	"context"
 	_ "embed"
+	"log/slog"
 	"net/http"
 	"time"
 
@@ -41,7 +42,9 @@ func NewWebSearchTool(client *http.Client) fantasy.AgentTool {
 				maxResults = 20
 			}
 
+			maybeDelaySearch()
 			results, err := searchDuckDuckGo(ctx, client, params.Query, maxResults)
+			slog.Debug("Web search completed", "query", params.Query, "results", len(results), "err", err)
 			if err != nil {
 				return fantasy.NewTextErrorResponse("Failed to search: " + err.Error()), nil
 			}

internal/agent/tools/write.go 🔗

@@ -36,13 +36,6 @@ type WritePermissionsParams struct {
 	NewContent string `json:"new_content,omitempty"`
 }
 
-type writeTool struct {
-	lspClients  *csync.Map[string, *lsp.Client]
-	permissions permission.Service
-	files       history.Service
-	workingDir  string
-}
-
 type WriteResponseMetadata struct {
 	Diff      string `json:"diff"`
 	Additions int    `json:"additions"`
@@ -148,7 +141,7 @@ func NewWriteTool(lspClients *csync.Map[string, *lsp.Client], permissions permis
 				}
 			}
 			if file.Content != oldContent {
-				// User Manually changed the content store an intermediate version
+				// User manually changed the content; store an intermediate version
 				_, err = files.CreateVersion(ctx, sessionID, filePath, oldContent)
 				if err != nil {
 					slog.Error("Error creating file history version", "error", err)

internal/app/app.go 🔗

@@ -173,6 +173,15 @@ func (app *App) RunNonInteractive(ctx context.Context, output io.Writer, prompt
 			spinner = nil
 		}
 	}
+
+	// Wait for MCP initialization to complete before reading MCP tools.
+	if err := mcp.WaitForInit(ctx); err != nil {
+		return fmt.Errorf("failed to wait for MCP initialization: %w", err)
+	}
+
+	// force update of agent models before running so mcp tools are loaded
+	app.AgentCoordinator.UpdateModels(ctx)
+
 	defer stopSpinner()
 
 	const maxPromptLengthForTitle = 100

internal/app/lsp.go 🔗

@@ -67,7 +67,7 @@ func (app *App) createAndStartLSPClient(ctx context.Context, name string, config
 		lspClient.SetServerState(lsp.StateError)
 		updateLSPState(name, lsp.StateError, err, lspClient, 0)
 	} else {
-		// Server reached a ready state scuccessfully.
+		// Server reached a ready state successfully.
 		slog.Debug("LSP server is ready", "name", name)
 		lspClient.SetServerState(lsp.StateReady)
 		updateLSPState(name, lsp.StateReady, nil, lspClient, 0)

internal/config/load.go 🔗

@@ -177,6 +177,14 @@ func (c *Config) configureProviders(env env.Env, resolver VariableResolver, know
 		if len(config.ExtraHeaders) > 0 {
 			maps.Copy(headers, config.ExtraHeaders)
 		}
+		for k, v := range headers {
+			resolved, err := resolver.ResolveValue(v)
+			if err != nil {
+				slog.Error("Could not resolve provider header", "err", err.Error())
+				continue
+			}
+			headers[k] = resolved
+		}
 		prepared := ProviderConfig{
 			ID:                 string(p.ID),
 			Name:               p.Name,
@@ -307,6 +315,15 @@ func (c *Config) configureProviders(env env.Env, resolver VariableResolver, know
 			continue
 		}
 
+		for k, v := range providerConfig.ExtraHeaders {
+			resolved, err := resolver.ResolveValue(v)
+			if err != nil {
+				slog.Error("Could not resolve provider header", "err", err.Error())
+				continue
+			}
+			providerConfig.ExtraHeaders[k] = resolved
+		}
+
 		c.Providers.Set(id, providerConfig)
 	}
 	return nil

internal/event/event.go 🔗

@@ -7,6 +7,7 @@ import (
 	"path/filepath"
 	"reflect"
 	"runtime"
+	"time"
 
 	"github.com/charmbracelet/crush/internal/version"
 	"github.com/posthog/posthog-go"
@@ -85,19 +86,16 @@ func Error(err any, props ...any) {
 	if client == nil {
 		return
 	}
-	// The PostHog Go client does not yet support sending exceptions.
-	// We're mimicking the behavior by sending the minimal info required
-	// for PostHog to recognize this as an exception event.
-	props = append(
-		[]any{
-			"$exception_list",
-			[]map[string]string{
-				{"type": reflect.TypeOf(err).String(), "value": fmt.Sprintf("%v", err)},
-			},
-		},
-		props...,
-	)
-	send("$exception", props...)
+	posthogErr := client.Enqueue(posthog.NewDefaultException(
+		time.Now(),
+		distinctId,
+		reflect.TypeOf(err).String(),
+		fmt.Sprintf("%v", err),
+	))
+	if err != nil {
+		slog.Error("Failed to enqueue PostHog error", "err", err, "props", props, "posthogErr", posthogErr)
+		return
+	}
 }
 
 func Flush() {

internal/history/file.go 🔗

@@ -25,10 +25,14 @@ type File struct {
 	UpdatedAt int64
 }
 
+// Service manages file versions and history for sessions.
 type Service interface {
 	pubsub.Subscriber[File]
 	Create(ctx context.Context, sessionID, path, content string) (File, error)
+
+	// CreateVersion creates a new version of a file.
 	CreateVersion(ctx context.Context, sessionID, path, content string) (File, error)
+
 	Get(ctx context.Context, id string) (File, error)
 	GetByPathAndSession(ctx context.Context, path, sessionID string) (File, error)
 	ListBySession(ctx context.Context, sessionID string) ([]File, error)
@@ -55,6 +59,9 @@ func (s *service) Create(ctx context.Context, sessionID, path, content string) (
 	return s.createWithVersion(ctx, sessionID, path, content, InitialVersion)
 }
 
+// CreateVersion creates a new version of a file with auto-incremented version
+// number. If no previous versions exist for the path, it creates the initial
+// version. The provided content is stored as the new version.
 func (s *service) CreateVersion(ctx context.Context, sessionID, path, content string) (File, error) {
 	// Get the latest version for this path
 	files, err := s.q.ListFilesByPath(ctx, path)

internal/permission/permission.go 🔗

@@ -188,15 +188,6 @@ func (s *permissionService) Request(ctx context.Context, opts CreatePermissionRe
 	}
 	s.sessionPermissionsMu.RUnlock()
 
-	s.sessionPermissionsMu.RLock()
-	for _, p := range s.sessionPermissions {
-		if p.ToolName == permission.ToolName && p.Action == permission.Action && p.SessionID == permission.SessionID && p.Path == permission.Path {
-			s.sessionPermissionsMu.RUnlock()
-			return true, nil
-		}
-	}
-	s.sessionPermissionsMu.RUnlock()
-
 	s.activeRequestMu.Lock()
 	s.activeRequest = &permission
 	s.activeRequestMu.Unlock()

internal/tui/components/chat/editor/clipboard_supported.go 🔗

@@ -0,0 +1,15 @@
+//go:build (linux || darwin || windows) && !arm && !386 && !ios && !android
+
+package editor
+
+import "github.com/aymanbagabas/go-nativeclipboard"
+
+func readClipboard(f clipboardFormat) ([]byte, error) {
+	switch f {
+	case clipboardFormatText:
+		return nativeclipboard.Text.Read()
+	case clipboardFormatImage:
+		return nativeclipboard.Image.Read()
+	}
+	return nil, errClipboardUnknownFormat
+}

internal/tui/components/chat/editor/editor.go 🔗

@@ -16,7 +16,6 @@ import (
 	"charm.land/bubbles/v2/textarea"
 	tea "charm.land/bubbletea/v2"
 	"charm.land/lipgloss/v2"
-	nativeclipboard "github.com/aymanbagabas/go-nativeclipboard"
 	"github.com/charmbracelet/crush/internal/app"
 	"github.com/charmbracelet/crush/internal/filetracker"
 	"github.com/charmbracelet/crush/internal/fsext"
@@ -35,6 +34,11 @@ import (
 	"github.com/charmbracelet/x/editor"
 )
 
+var (
+	errClipboardPlatformUnsupported = fmt.Errorf("clipboard operations are not supported on this platform")
+	errClipboardUnknownFormat       = fmt.Errorf("unknown clipboard format")
+)
+
 type Editor interface {
 	util.Model
 	layout.Sizeable
@@ -341,12 +345,12 @@ func (m *editorCmp) Update(msg tea.Msg) (util.Model, tea.Cmd) {
 		}
 		// Handle image paste from clipboard
 		if key.Matches(msg, m.keyMap.PasteImage) {
-			imageData, err := nativeclipboard.Image.Read()
+			imageData, err := readClipboard(clipboardFormatImage)
 
 			if err != nil || len(imageData) == 0 {
 				// If no image data found, try to get text data (could be file path)
 				var textData []byte
-				textData, err = nativeclipboard.Text.Read()
+				textData, err = readClipboard(clipboardFormatText)
 				if err != nil || len(textData) == 0 {
 					// If clipboard is empty, show a warning
 					return m, util.ReportWarn("No data found in clipboard. Note: Some terminals may not support reading image data from clipboard directly.")

internal/update/update.go 🔗

@@ -106,7 +106,7 @@ func (c *github) Latest(ctx context.Context) (*Release, error) {
 
 	if resp.StatusCode != http.StatusOK {
 		body, _ := io.ReadAll(resp.Body)
-		return nil, fmt.Errorf("github api returned status %d: %s", resp.StatusCode, string(body))
+		return nil, fmt.Errorf("GitHub API returned status %d: %s", resp.StatusCode, string(body))
 	}
 
 	var release Release