chore: small system prompt improvemets & fantasy

kujtimiihoxha created

Change summary

go.mod                                                                             |  4 
go.sum                                                                             |  2 
internal/agent/agent_test.go                                                       | 10 
internal/agent/common_test.go                                                      |  3 
internal/agent/coordinator.go                                                      |  2 
internal/agent/prompt/prompt.go                                                    | 77 
internal/agent/templates/coder.md.tpl                                              | 83 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/bash_tool.yaml             | 20 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/download_tool.yaml         | 26 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/fetch_tool.yaml            | 34 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/glob_tool.yaml             | 24 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/grep_tool.yaml             | 25 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/ls_tool.yaml               | 19 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/multiedit_tool.yaml        | 22 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/parallel_tool_calls.yaml   | 23 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/read_a_file.yaml           | 22 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/simple_test.yaml           | 29 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/sourcegraph_tool.yaml      | 25 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/update_a_file.yaml         | 20 
internal/agent/testdata/TestCoderAgent/anthropic-sonnet/write_tool.yaml            | 25 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/bash_tool.yaml                 | 30 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/download_tool.yaml             | 28 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/fetch_tool.yaml                | 38 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/glob_tool.yaml                 | 28 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/grep_tool.yaml                 | 30 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/ls_tool.yaml                   | 30 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/multiedit_tool.yaml            | 40 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/parallel_tool_calls.yaml       | 24 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/read_a_file.yaml               | 18 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/simple_test.yaml               | 16 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/sourcegraph_tool.yaml          | 34 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/update_a_file.yaml             | 30 
internal/agent/testdata/TestCoderAgent/openai-gpt-5/write_tool.yaml                | 26 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/bash_tool.yaml           | 60 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/download_tool.yaml       | 28 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/fetch_tool.yaml          | 38 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/glob_tool.yaml           | 30 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/grep_tool.yaml           | 18 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/ls_tool.yaml             | 18 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/multiedit_tool.yaml      | 36 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/parallel_tool_calls.yaml | 95 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/read_a_file.yaml         | 19 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/simple_test.yaml         | 12 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/sourcegraph_tool.yaml    |  2 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/update_a_file.yaml       | 20 
internal/agent/testdata/TestCoderAgent/openrouter-kimi-k2/write_tool.yaml          | 26 
internal/agent/testdata/TestCoderAgent/zai-glm4.6/bash_tool.yaml                   | 20 
internal/agent/testdata/TestCoderAgent/zai-glm4.6/download_tool.yaml               | 26 
internal/agent/testdata/TestCoderAgent/zai-glm4.6/fetch_tool.yaml                  | 24 
internal/agent/testdata/TestCoderAgent/zai-glm4.6/glob_tool.yaml                   | 18 
internal/agent/testdata/TestCoderAgent/zai-glm4.6/grep_tool.yaml                   | 18 
internal/agent/testdata/TestCoderAgent/zai-glm4.6/ls_tool.yaml                     |  2 
internal/agent/testdata/TestCoderAgent/zai-glm4.6/multiedit_tool.yaml              | 24 
internal/agent/testdata/TestCoderAgent/zai-glm4.6/parallel_tool_calls.yaml         | 18 
internal/agent/testdata/TestCoderAgent/zai-glm4.6/read_a_file.yaml                 | 16 
internal/agent/testdata/TestCoderAgent/zai-glm4.6/simple_test.yaml                 | 12 
internal/agent/testdata/TestCoderAgent/zai-glm4.6/sourcegraph_tool.yaml            | 20 
internal/agent/testdata/TestCoderAgent/zai-glm4.6/update_a_file.yaml               | 24 
internal/agent/testdata/TestCoderAgent/zai-glm4.6/write_tool.yaml                  | 20 
59 files changed, 799 insertions(+), 712 deletions(-)

Detailed changes

go.mod 🔗

@@ -3,7 +3,7 @@ module github.com/charmbracelet/crush
 go 1.25.0
 
 require (
-	charm.land/fantasy v0.0.0
+	charm.land/fantasy v0.1.0
 	github.com/JohannesKaufmann/html-to-markdown v1.6.0
 	github.com/MakeNowJust/heredoc v1.0.0
 	github.com/PuerkitoBio/goquery v1.10.3
@@ -50,8 +50,6 @@ require (
 	mvdan.cc/sh/v3 v3.12.1-0.20250902163504-3cf4fd5717a5
 )
 
-replace charm.land/fantasy => ../fantasy
-
 require (
 	cloud.google.com/go v0.116.0 // indirect
 	cloud.google.com/go/auth v0.17.0 // indirect

go.sum 🔗

@@ -1,3 +1,5 @@
+charm.land/fantasy v0.1.0 h1:F+k1zmmqMllM/VpVFy+BY6lDmE0SsJ3LUWGQm+o20Bg=
+charm.land/fantasy v0.1.0/go.mod h1:lR8tV9VQlH/HOHs9ilSzBkcN9I+o639jpVPs4MI/Jyk=
 cloud.google.com/go v0.116.0 h1:B3fRrSDkLRt5qSHWe40ERJvhvnQwdZiHu0bJOpldweE=
 cloud.google.com/go v0.116.0/go.mod h1:cEPSRWPzZEswwdr9BxE6ChEn01dWlTaF05LiC2Xs70U=
 cloud.google.com/go/auth v0.17.0 h1:74yCm7hCj2rUyyAocqnFzsAYXgJhrG26XCFimrc/Kz4=

internal/agent/agent_test.go 🔗

@@ -209,7 +209,7 @@ func TestCoderAgent(t *testing.T) {
 				require.NoError(t, err)
 
 				res, err := agent.Run(t.Context(), SessionAgentCall{
-					Prompt:          "download the file from https://httpbin.org/robots.txt and save it as robots.txt",
+					Prompt:          "download the file from https://example-files.online-convert.com/document/txt/example.txt and save it as example.txt",
 					SessionID:       session.ID,
 					MaxOutputTokens: 10000,
 				})
@@ -241,9 +241,9 @@ func TestCoderAgent(t *testing.T) {
 
 				require.True(t, foundDownload, "Expected to find a download operation")
 
-				robotsPath := filepath.Join(env.workingDir, "robots.txt")
-				_, err = os.Stat(robotsPath)
-				require.NoError(t, err, "Expected robots.txt file to exist")
+				examplePath := filepath.Join(env.workingDir, "example.txt")
+				_, err = os.Stat(examplePath)
+				require.NoError(t, err, "Expected example.txt file to exist")
 			})
 			t.Run("fetch tool", func(t *testing.T) {
 				agent, env := setupAgent(t, pair)
@@ -252,7 +252,7 @@ func TestCoderAgent(t *testing.T) {
 				require.NoError(t, err)
 
 				res, err := agent.Run(t.Context(), SessionAgentCall{
-					Prompt:          "fetch the content from https://httpbin.org/html and tell me if it contains the word 'Herman'",
+					Prompt:          "fetch the content from https://example-files.online-convert.com/website/html/example.html and tell me if it contains the word 'John Doe'",
 					SessionID:       session.ID,
 					MaxOutputTokens: 10000,
 				})

internal/agent/common_test.go 🔗

@@ -1,6 +1,7 @@
 package agent
 
 import (
+	"context"
 	"net/http"
 	"os"
 	"path/filepath"
@@ -163,7 +164,7 @@ func coderAgent(r *recorder.Recorder, env env, large, small fantasy.LanguageMode
 		return nil, err
 	}
 
-	systemPrompt, err := prompt.Build(large.Provider(), large.Model(), *cfg)
+	systemPrompt, err := prompt.Build(context.TODO(), large.Provider(), large.Model(), *cfg)
 	if err != nil {
 		return nil, err
 	}

internal/agent/coordinator.go 🔗

@@ -270,7 +270,7 @@ func (c *coordinator) buildAgent(ctx context.Context, prompt *prompt.Prompt, age
 		return nil, err
 	}
 
-	systemPrompt, err := prompt.Build(large.Model.Provider(), large.Model.Model(), *c.cfg)
+	systemPrompt, err := prompt.Build(ctx, large.Model.Provider(), large.Model.Model(), *c.cfg)
 	if err != nil {
 		return nil, err
 	}

internal/agent/prompt/prompt.go 🔗

@@ -1,6 +1,7 @@
 package prompt
 
 import (
+	"context"
 	"fmt"
 	"os"
 	"path/filepath"
@@ -11,6 +12,7 @@ import (
 
 	"github.com/charmbracelet/crush/internal/config"
 	"github.com/charmbracelet/crush/internal/home"
+	"github.com/charmbracelet/crush/internal/shell"
 )
 
 // Prompt represents a template-based prompt generator.
@@ -30,6 +32,7 @@ type PromptDat struct {
 	IsGitRepo    bool
 	Platform     string
 	Date         string
+	GitStatus    string
 	ContextFiles []ContextFile
 }
 
@@ -70,13 +73,17 @@ func NewPrompt(name, promptTemplate string, opts ...Option) (*Prompt, error) {
 	return p, nil
 }
 
-func (p *Prompt) Build(provider, model string, cfg config.Config) (string, error) {
+func (p *Prompt) Build(ctx context.Context, provider, model string, cfg config.Config) (string, error) {
 	t, err := template.New(p.name).Parse(p.template)
 	if err != nil {
 		return "", fmt.Errorf("parsing template: %w", err)
 	}
 	var sb strings.Builder
-	if err := t.Execute(&sb, p.promptData(provider, model, cfg)); err != nil {
+	d, err := p.promptData(ctx, provider, model, cfg)
+	if err != nil {
+		return "", err
+	}
+	if err := t.Execute(&sb, d); err != nil {
 		return "", fmt.Errorf("executing template: %w", err)
 	}
 
@@ -138,7 +145,7 @@ func expandPath(path string, cfg config.Config) string {
 	return path
 }
 
-func (p *Prompt) promptData(provider, model string, cfg config.Config) PromptDat {
+func (p *Prompt) promptData(ctx context.Context, provider, model string, cfg config.Config) (PromptDat, error) {
 	workingDir := cfg.WorkingDir()
 	if p.workingDir != "" {
 		workingDir = p.workingDir
@@ -160,20 +167,28 @@ func (p *Prompt) promptData(provider, model string, cfg config.Config) PromptDat
 		files[pathKey] = content
 	}
 
+	isGit := isGitRepo(cfg.WorkingDir())
 	data := PromptDat{
 		Provider:   provider,
 		Model:      model,
 		Config:     cfg,
 		WorkingDir: workingDir,
-		IsGitRepo:  isGitRepo(cfg.WorkingDir()),
+		IsGitRepo:  isGit,
 		Platform:   platform,
 		Date:       p.now().Format("1/2/2006"),
 	}
+	if isGit {
+		var err error
+		data.GitStatus, err = getGitStatus(ctx, cfg.WorkingDir())
+		if err != nil {
+			return PromptDat{}, err
+		}
+	}
 
 	for _, contextFiles := range files {
 		data.ContextFiles = append(data.ContextFiles, contextFiles...)
 	}
-	return data
+	return data, nil
 }
 
 func isGitRepo(dir string) bool {
@@ -181,6 +196,58 @@ func isGitRepo(dir string) bool {
 	return err == nil
 }
 
+func getGitStatus(ctx context.Context, dir string) (string, error) {
+	sh := shell.NewShell(&shell.Options{
+		WorkingDir: dir,
+	})
+	branch, err := getGitBranch(ctx, sh)
+	if err != nil {
+		return "", err
+	}
+	status, err := getGitStatusSummary(ctx, sh)
+	if err != nil {
+		return "", err
+	}
+	commits, err := getGitRecentCommits(ctx, sh)
+	if err != nil {
+		return "", err
+	}
+	return branch + status + commits, nil
+}
+
+func getGitBranch(ctx context.Context, sh *shell.Shell) (string, error) {
+	out, _, err := sh.Exec(ctx, "git branch --show-current 2>/dev/null")
+	if err != nil {
+		return "", nil
+	}
+	out = strings.TrimSpace(out)
+	if out == "" {
+		return "", nil
+	}
+	return fmt.Sprintf("Current branch: %s\n", out), nil
+}
+
+func getGitStatusSummary(ctx context.Context, sh *shell.Shell) (string, error) {
+	out, _, err := sh.Exec(ctx, "git status --short 2>/dev/null | head -20")
+	if err != nil {
+		return "", nil
+	}
+	out = strings.TrimSpace(out)
+	if out == "" {
+		return "Status: clean\n", nil
+	}
+	return fmt.Sprintf("Status:\n%s\n", out), nil
+}
+
+func getGitRecentCommits(ctx context.Context, sh *shell.Shell) (string, error) {
+	out, _, err := sh.Exec(ctx, "git log --oneline -n 3 2>/dev/null")
+	if err != nil || out == "" {
+		return "", nil
+	}
+	out = strings.TrimSpace(out)
+	return fmt.Sprintf("Recent commits:\n%s\n", out), nil
+}
+
 func (p *Prompt) Name() string {
 	return p.name
 }

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

@@ -10,7 +10,11 @@ These rules override everything else. Follow them strictly:
 5. **USE EXACT MATCHES**: When editing, match text exactly including whitespace
 6. **NEVER COMMIT**: Unless user explicitly says "commit"
 7. **FOLLOW MEMORY FILE INSTRUCTIONS**: If memory files contain specific instructions, preferences, or commands, you MUST follow them.
-8. **NEVER ADD COMMENTS**: Only add comments if the user asked you to do so
+8. **NEVER ADD COMMENTS**: Only add comments if the user asked you to do so. When adding comments, focus on *why* not *what*. NEVER communicate with the user through code comments.
+9. **SECURITY FIRST**: Only assist with defensive security tasks. Refuse to create, modify, or improve code that may be used maliciously. Allow security analysis, detection rules, vulnerability explanations, defensive tools, and security documentation.
+10. **NO URL GUESSING**: Never generate or guess URLs unless you are confident they are for helping with programming. 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 by the user.
+12. **DON'T REVERT CHANGES**: Don't revert changes unless they caused errors or the user explicitly asks.
 </critical_rules>
 
 <communication_style>
@@ -36,8 +40,17 @@ assistant: src/foo.c
 user: add error handling to the login function
 assistant: [searches for login, reads file, edits with exact match, runs tests]
 Done
+
+user: Where are errors from the client handled?
+assistant: Clients are marked as failed in the `connectToServer` function in src/services/process.go:712.
 </communication_style>
 
+<code_references>
+When referencing specific functions or code locations, use the pattern `file_path:line_number` to help users navigate:
+- Example: "The error is handled in src/main.go:45"
+- Example: "See the implementation in pkg/utils/helper.go:123-145"
+</code_references>
+
 <workflow>
 For every task, follow this sequence internally (don't narrate it):
 
@@ -46,6 +59,7 @@ For every task, follow this sequence internally (don't narrate it):
 - Read files to understand current state
 - Check memory for stored commands
 - Identify what needs to change
+- Use `git log` and `git blame` for additional context when needed
 
 **While acting**:
 - Read entire file before editing it
@@ -53,6 +67,8 @@ For every task, follow this sequence internally (don't narrate it):
 - Make one logical change at a time
 - After each change: run tests
 - If tests fail: fix immediately
+- Keep going until query is completely resolved before yielding to user
+- For longer tasks, send brief progress updates (under 10 words) at reasonable intervals
 
 **Before finishing**:
 - Run lint/typecheck if in memory
@@ -64,6 +80,8 @@ For every task, follow this sequence internally (don't narrate it):
 - Follow existing patterns (check similar files)
 - If stuck, try different approach (don't repeat failures)
 - Make decisions yourself (search first, don't ask)
+- Fix problems at root cause, not surface-level patches
+- Don't fix unrelated bugs or broken tests (mention them in final message if relevant)
 </workflow>
 
 <decision_making>
@@ -98,6 +116,10 @@ When using edit tools:
 4. Verify edit succeeded
 5. Run tests
 
+Efficiency tips:
+- Don't re-read files after successful edits (tool will fail if it didn't work)
+- Same applies for making folders, deleting files, etc.
+
 Common mistakes to avoid:
 - Editing without reading first
 - Approximate text matches
@@ -137,25 +159,48 @@ Before writing code:
 3. Match existing style
 4. Use same libraries/frameworks
 5. Follow security best practices (never log secrets)
+6. Don't use one-letter variable names unless requested
 
 Never assume libraries are available - verify first.
+
+**Ambition vs. precision**:
+- New projects → be creative and ambitious with implementation
+- Existing codebases → be surgical and precise, respect surrounding code
+- Don't change filenames or variables unnecessarily
+- Don't add formatters/linters/tests to codebases that don't have them
 </code_conventions>
 
 <testing>
 After significant changes:
+- Start testing as specific as possible to code changed, then broaden to build confidence
+- Use self-verification: write unit tests, add output logs, or use debug statements to verify your solutions
 - Run relevant test suite
 - If tests fail, fix before continuing
 - Check memory for test commands
-- Run lint/typecheck if available
+- Run lint/typecheck if available (on precise targets when possible)
+- For formatters: iterate max 3 times to get it right; if still failing, present correct solution and note formatting issue
 - Suggest adding commands to memory if not found
+- Don't fix unrelated bugs or test failures (not your responsibility)
 </testing>
 
 <tool_usage>
 - Search before assuming
 - Read files before editing
+- Always use absolute paths for file operations (editing, reading, writing)
 - Use Agent tool for complex searches
 - Run tools in parallel when safe (no dependencies)
+- When making multiple independent bash calls, send them in a single message with multiple tool calls for parallel execution
 - Summarize tool output for user (they don't see it)
+
+<bash_commands>
+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
+- Simple read-only commands (ls, cat, etc.) don't need explanation
+- Use `&` for background processes that won't stop on their own (e.g., `node server.js &`)
+- Avoid interactive commands - use non-interactive versions (e.g., `npm init -y` not `npm init`)
+- Combine related commands to save time (e.g., `git status && git diff HEAD && git log -n 3`)
+</bash_commands>
 </tool_usage>
 
 <proactiveness>
@@ -166,11 +211,45 @@ Balance autonomy with user intent:
 - Don't surprise user with unexpected actions
 </proactiveness>
 
+<final_answers>
+Adapt verbosity to match the work completed:
+
+**Default (under 4 lines)**:
+- Simple questions or single-file changes
+- Casual conversation, greetings, acknowledgements
+- One-word answers when possible
+
+**More detail allowed (up to 10-15 lines)**:
+- Large multi-file changes that need walkthrough
+- Complex refactoring where rationale adds value
+- Tasks where understanding the approach is important
+- When mentioning unrelated bugs/issues found
+- Suggesting logical next steps user might want
+
+**What to include in verbose answers**:
+- Brief summary of what was done and why
+- Key files/functions changed (with `file:line` references)
+- Any important decisions or tradeoffs made
+- Next steps or things user should verify
+- Issues found but not fixed
+
+**What to avoid**:
+- Don't show full file contents unless explicitly asked
+- Don't explain how to save files or copy code (user has access to your work)
+- Don't use "Here's what I did" or "Let me know if..." style preambles/postambles
+- Keep tone direct and factual, like handing off work to a teammate
+</final_answers>
+
 <env>
 Working directory: {{.WorkingDir}}
 Is directory a git repo: {{if .IsGitRepo}}yes{{else}}no{{end}}
 Platform: {{.Platform}}
 Today's date: {{.Date}}
+{{if .GitStatus}}
+
+Git status (snapshot at conversation start - may be outdated):
+{{.GitStatus}}
+{{end}}
 </env>
 
 {{if gt (len .Config.LSP) 0}}

internal/agent/testdata/TestCoderAgent/anthropic-sonnet/bash_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_01Qns4bhGsHTJigK4SYz1ND9","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":147,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":3,"service_tier":"standard"}}               }
+      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_01VSvk8MrHTkSrEnvCpQJk8e","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":147,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":1,"service_tier":"standard"}}       }
 
       event: content_block_start
-      data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}           }
+      data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}            }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Bash File"}             }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Create"} }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Creation"}  }
+      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":" Comman"}          }
+      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":"d"}            }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Hello 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":147,"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":147,"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: 861.204083ms
+    duration: 721.761417ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 31156
+    content_length: 35702
     host: ""

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

@@ -6,9 +6,9 @@ interactions:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 787
+    content_length: 823
     host: ""
-    body: '{"max_tokens":40,"messages":[{"content":[{"text":"Generate a concise title for the following content:\n\ndownload the file from https://httpbin.org/robots.txt and save it as robots.txt\n \u003cthink\u003e\n\n\u003c/think\u003e","type":"text"}],"role":"user"}],"model":"claude-3-5-haiku-20241022","system":[{"text":"you will generate a short title based on the first message a user begins a conversation with\n\n\u003crules\u003e\n- ensure it is not more than 50 characters long\n- the title should be a summary of the user''s message\n- it should be one line long\n- do not use quotes or colons\n- the entire text you return will be used as the title\n- never return anything that is more than one sentence (one line) long\n\u003c/rules\u003e\n\n /no_think","type":"text"}],"stream":true}'
+    body: '{"max_tokens":40,"messages":[{"content":[{"text":"Generate a concise title for the following content:\n\ndownload the file from https://example-files.online-convert.com/document/txt/example.txt and save it as example.txt\n \u003cthink\u003e\n\n\u003c/think\u003e","type":"text"}],"role":"user"}],"model":"claude-3-5-haiku-20241022","system":[{"text":"you will generate a short title based on the first message a user begins a conversation with\n\n\u003crules\u003e\n- ensure it is not more than 50 characters long\n- the title should be a summary of the user''s message\n- it should be one line long\n- do not use quotes or colons\n- the entire text you return will be used as the title\n- never return anything that is more than one sentence (one line) long\n\u003c/rules\u003e\n\n /no_think","type":"text"}],"stream":true}'
     headers:
       Accept:
       - application/json
@@ -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_01YE4hcHSKgePa9XeDaDHHc3","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":151,"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_01ULeTtfwnFfY2gtw8Cfxzhu","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: 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 Robots.txt from HTTP"}        }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"d Example"}    }
 
       event: ping
       data: {"type": "ping"}
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"B"}          }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Text"}    }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"in"}           }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" File"}       }
 
       event: content_block_stop
-      data: {"type":"content_block_stop","index":0}
+      data: {"type":"content_block_stop","index":0          }
 
       event: message_delta
-      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":151,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":12}            }
+      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":160,"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: 661.353334ms
+    duration: 1.064168292s
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 31173
+    content_length: 35755
     host: ""

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

@@ -6,9 +6,9 @@ interactions:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 800
+    content_length: 844
     host: ""
-    body: '{"max_tokens":40,"messages":[{"content":[{"text":"Generate a concise title for the following content:\n\nfetch the content from https://httpbin.org/html and tell me if it contains the word ''Herman''\n \u003cthink\u003e\n\n\u003c/think\u003e","type":"text"}],"role":"user"}],"model":"claude-3-5-haiku-20241022","system":[{"text":"you will generate a short title based on the first message a user begins a conversation with\n\n\u003crules\u003e\n- ensure it is not more than 50 characters long\n- the title should be a summary of the user''s message\n- it should be one line long\n- do not use quotes or colons\n- the entire text you return will be used as the title\n- never return anything that is more than one sentence (one line) long\n\u003c/rules\u003e\n\n /no_think","type":"text"}],"stream":true}'
+    body: '{"max_tokens":40,"messages":[{"content":[{"text":"Generate a concise title for the following content:\n\nfetch the content from https://example-files.online-convert.com/website/html/example.html and tell me if it contains the word ''John Doe''\n \u003cthink\u003e\n\n\u003c/think\u003e","type":"text"}],"role":"user"}],"model":"claude-3-5-haiku-20241022","system":[{"text":"you will generate a short title based on the first message a user begins a conversation with\n\n\u003crules\u003e\n- ensure it is not more than 50 characters long\n- the title should be a summary of the user''s message\n- it should be one line long\n- do not use quotes or colons\n- the entire text you return will be used as the title\n- never return anything that is more than one sentence (one line) long\n\u003c/rules\u003e\n\n /no_think","type":"text"}],"stream":true}'
     headers:
       Accept:
       - application/json
@@ -25,52 +25,58 @@ interactions:
     content_length: -1
     body: |+
       event: message_start
-      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_01RUyzrmHuHEw9TvX3rixMe3","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":154,"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_01PHhkLk3EFtPhGm5L8JcDWA","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":167,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":1,"service_tier":"standard"}}         }
 
       event: content_block_start
-      data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}              }
+      data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}             }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Web"}         }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Web"}}
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Content"}        }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Scraping"}               }
 
       event: ping
       data: {"type": "ping"}
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Search"}}
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" an"}   }
 
       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":"d Search"}     }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Herman"}      }
+      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"}    }
+
+      event: content_block_delta
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Doe"}            }
 
       event: content_block_stop
-      data: {"type":"content_block_stop","index":0         }
+      data: {"type":"content_block_stop","index":0        }
 
       event: message_delta
-      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":154,"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":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: 595.997458ms
+    duration: 615.9145ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 31183
+    content_length: 35773
     host: ""

internal/agent/testdata/TestCoderAgent/anthropic-sonnet/glob_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_01TRsP6tDfcqt14jh6xiLgC8","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":142,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":1,"service_tier":"standard"}}               }
+      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_01DAnqMv5qFj8Tc1b53puwVh","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: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Fin"} }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Fin"}               }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"d Go"}             }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"d Go"}               }
 
       event: ping
       data: {"type": "ping"}
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Files"}              }
+      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":" with"}         }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Using"}     }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Glob"}}
+      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":9}}
+      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":142,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":9}           }
 
       event: message_stop
-      data: {"type":"message_stop"           }
+      data: {"type":"message_stop"          }
 
     headers:
       Content-Type:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 582.017417ms
+    duration: 601.492292ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 31145
+    content_length: 35691
     host: ""

internal/agent/testdata/TestCoderAgent/anthropic-sonnet/grep_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_01RzWf6ES6f9YqJ9TCwx2PTM","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_013fa6EoYhAdwsz2cYzvHHfi","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":"Grep"}               }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Search"}  }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Package"}      }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" for "}         }
 
       event: ping
       data: {"type": "ping"}
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Search"}   }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"'package' in Go"}  }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" in Go Files"}               }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" files with"}             }
+
+      event: content_block_delta
+      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":10}               }
+      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":14}              }
 
       event: message_stop
-      data: {"type":"message_stop"        }
+      data: {"type":"message_stop"          }
 
     headers:
       Content-Type:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 611.409917ms
+    duration: 655.533792ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 31143
+    content_length: 35689
     host: ""

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

@@ -25,28 +25,31 @@ interactions:
     content_length: -1
     body: |+
       event: message_start
-      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_01EFPwwtF4fGytQfsssivQya","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"}}           }
+      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_018PZbN7ZE2pop3qskRG9ZNq","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: 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"}        }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Files"}      }
 
       event: ping
       data: {"type": "ping"}
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" in Current Directory"}        }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" in"}            }
+
+      event: content_block_delta
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Current Directory"}        }
 
       event: content_block_stop
-      data: {"type":"content_block_stop","index":0               }
+      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":8}}
+      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"     }
@@ -56,15 +59,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 659.769125ms
+    duration: 619.398417ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 31137
+    content_length: 35683
     host: ""

internal/agent/testdata/TestCoderAgent/anthropic-sonnet/multiedit_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_011bN7xZaU6JvDk22sRZcraQ","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":170,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":2,"service_tier":"standard"}}    }
+      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_01GhHFffSWHNR9gqqMuzfeTc","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: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Modify"}            }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Modify"}    }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Println"}  }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Greeting in"}          }
 
       event: ping
       data: {"type": "ping"}
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Line"}        }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Go"}              }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" in main.go"}              }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Program"}      }
 
       event: content_block_stop
-      data: {"type":"content_block_stop","index":0        }
+      data: {"type":"content_block_stop","index":0              }
 
       event: message_delta
-      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":170,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":12}            }
+      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":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: 1.071607083s
+    duration: 1.104169583s
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 31223
+    content_length: 35769
     host: ""

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

@@ -25,52 +25,49 @@ interactions:
     content_length: -1
     body: |+
       event: message_start
-      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_017eiqBiGHLGyQu82xGfSB8X","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_01J57AeroUedodirLhogwFwv","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":""}       }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Parallel"}    }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Parallel"}     }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Go File"}   }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Go File"}  }
 
       event: ping
       data: {"type": "ping"}
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Search"}            }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Search and Directory"}         }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" and Directory"}               }
-
-      event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Listing"}          }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" 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":12}       }
+      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":12}   }
 
       event: message_stop
-      data: {"type":"message_stop"               }
+      data: {"type":"message_stop"         }
 
     headers:
       Content-Type:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 756.29075ms
+    duration: 652.221167ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 31234
+    content_length: 35780
     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_0126vEnUQ7o7aRzupozLAUnp","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_015KMXKt4guxgnkBtM4iMMUA","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":"Review"}          }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Rea"}            }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Go"}             }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"d Go"}            }
 
       event: ping
       data: {"type": "ping"}
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Module"}              }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Mo"}      }
 
       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":"d File"}            }
 
       event: content_block_stop
-      data: {"type":"content_block_stop","index":0          }
+      data: {"type":"content_block_stop","index":0}
 
       event: message_delta
-      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":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":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: 600.96675ms
+    duration: 553.304875ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 31107
+    content_length: 35653
     host: ""

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

@@ -25,46 +25,55 @@ interactions:
     content_length: -1
     body: |+
       event: message_start
-      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_014kwk8LeCrDLVUHwtvdWe5y","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_018RMdoapMV6AWAHnha4Wdqe","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":131,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":2,"service_tier":"standard"}} }
 
       event: content_block_start
-      data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}    }
+      data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}         }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Quick"}    }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Greeting"}              }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Chat"}}
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Initiate"}       }
 
       event: ping
       data: {"type": "ping"}
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Start"}              }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"d"}}
+
+      event: ping
+      data: {"type": "ping"}
 
       event: content_block_stop
-      data: {"type":"content_block_stop","index":0     }
+      data: {"type":"content_block_stop","index":0       }
+
+      event: ping
+      data: {"type": "ping"}
+
+      event: ping
+      data: {"type": "ping"}
 
       event: message_delta
-      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":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: 748.485709ms
+    duration: 1.080700459s
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 31097
+    content_length: 35643
     host: ""

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

@@ -25,52 +25,49 @@ interactions:
     content_length: -1
     body: |+
       event: message_start
-      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_013YipYtB4pPD2dsY23bK1nj","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_018Qh9AMUggmbex2YefzC6Q1","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 "}            }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Searching Go"}    }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"'func main' in"}       }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Repos"}             }
 
       event: ping
       data: {"type": "ping"}
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Go repos"}     }
-
-      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":" for Main"}       }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Sourcegraph"}}
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" 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":18}      }
+      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: 954.205583ms
+    duration: 738.233833ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 31157
+    content_length: 35703
     host: ""

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

@@ -25,46 +25,46 @@ interactions:
     content_length: -1
     body: |+
       event: message_start
-      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_01V2gbirhEyjs4DiYnh93EC9","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_01CxUo5Lns3Y5QFcq5sNF8Hj","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":145,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":1,"service_tier":"standard"}}        }
 
       event: content_block_start
-      data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}     }
+      data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}             }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Update"}               }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Update"} }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" main.go hello"}           }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" main.go Hello"}         }
 
       event: ping
       data: {"type": "ping"}
 
       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              }
+      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: 700.907542ms
+    duration: 788.82125ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 31163
+    content_length: 35709
     host: ""

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

@@ -25,52 +25,49 @@ interactions:
     content_length: -1
     body: |+
       event: message_start
-      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_01Vo9QhQKAZCU1jVuEKC4btz","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":161,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":1,"service_tier":"standard"}}         }
+      data: {"type":"message_start","message":{"model":"claude-3-5-haiku-20241022","id":"msg_0135cYAEgyr7BqB2Wths5y1Q","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":161,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":1,"service_tier":"standard"}}            }
 
       event: content_block_start
-      data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}         }
+      data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}  }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Create"}    }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Create"}          }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" config"}     }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" Config"}       }
 
       event: ping
       data: {"type": "ping"}
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":".json with"}            }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" JSON"} }
 
       event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" initial"}               }
-
-      event: content_block_delta
-      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" settings"}      }
+      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" File"}              }
 
       event: content_block_stop
-      data: {"type":"content_block_stop","index":0      }
+      data: {"type":"content_block_stop","index":0  }
 
       event: message_delta
-      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":161,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":10} }
+      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":161,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":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: 631.479458ms
+    duration: 641.8005ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 31200
+    content_length: 35746
     host: ""

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

@@ -24,23 +24,31 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-CToETSSbaB9YSlMZKEcIMOx60Csyx","object":"chat.completion.chunk","created":1761220641,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"5WTtJ1eUbukmUe"}
+      data: {"id":"chatcmpl-CTtUFcbirl3Cg6GH59fLIhj5HZC95","object":"chat.completion.chunk","created":1761240839,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"i4I8kypUOjGh2F"}
 
-      data: {"id":"chatcmpl-CToETSSbaB9YSlMZKEcIMOx60Csyx","object":"chat.completion.chunk","created":1761220641,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":"Create"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"AcHAYVWbkS"}
+      data: {"id":"chatcmpl-CTtUFcbirl3Cg6GH59fLIhj5HZC95","object":"chat.completion.chunk","created":1761240839,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":"Create"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Uu2PMXqQ5D"}
 
-      data: {"id":"chatcmpl-CToETSSbaB9YSlMZKEcIMOx60Csyx","object":"chat.completion.chunk","created":1761220641,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"aOZz7fwokXQlkz"}
+      data: {"id":"chatcmpl-CTtUFcbirl3Cg6GH59fLIhj5HZC95","object":"chat.completion.chunk","created":1761240839,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" test"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"QbbZrKZWFOR"}
 
-      data: {"id":"chatcmpl-CToETSSbaB9YSlMZKEcIMOx60Csyx","object":"chat.completion.chunk","created":1761220641,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" File"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"SkN5keGHx06"}
+      data: {"id":"chatcmpl-CTtUFcbirl3Cg6GH59fLIhj5HZC95","object":"chat.completion.chunk","created":1761240839,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":".txt"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"MHS3nwcRPHu3"}
 
-      data: {"id":"chatcmpl-CToETSSbaB9YSlMZKEcIMOx60Csyx","object":"chat.completion.chunk","created":1761220641,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" with"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"PCTyR9QwLQU"}
+      data: {"id":"chatcmpl-CTtUFcbirl3Cg6GH59fLIhj5HZC95","object":"chat.completion.chunk","created":1761240839,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" with"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"aqaVs4Hvyni"}
 
-      data: {"id":"chatcmpl-CToETSSbaB9YSlMZKEcIMOx60Csyx","object":"chat.completion.chunk","created":1761220641,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" Bash"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"igMrV8UPPfL"}
+      data: {"id":"chatcmpl-CTtUFcbirl3Cg6GH59fLIhj5HZC95","object":"chat.completion.chunk","created":1761240839,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" '"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ZOTpTEhoEoEI3X"}
 
-      data: {"id":"chatcmpl-CToETSSbaB9YSlMZKEcIMOx60Csyx","object":"chat.completion.chunk","created":1761220641,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" Command"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"6zycsBVC"}
+      data: {"id":"chatcmpl-CTtUFcbirl3Cg6GH59fLIhj5HZC95","object":"chat.completion.chunk","created":1761240839,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":"hello"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Fbk3BOcKpVE"}
 
-      data: {"id":"chatcmpl-CToETSSbaB9YSlMZKEcIMOx60Csyx","object":"chat.completion.chunk","created":1761220641,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"3b8Ax2Ojnq"}
+      data: {"id":"chatcmpl-CTtUFcbirl3Cg6GH59fLIhj5HZC95","object":"chat.completion.chunk","created":1761240839,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" bash"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ZrlUqDhkIs0"}
 
-      data: {"id":"chatcmpl-CToETSSbaB9YSlMZKEcIMOx60Csyx","object":"chat.completion.chunk","created":1761220641,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[],"usage":{"prompt_tokens":139,"completion_tokens":6,"total_tokens":145,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"ilSb8f05W03KWu"}
+      data: {"id":"chatcmpl-CTtUFcbirl3Cg6GH59fLIhj5HZC95","object":"chat.completion.chunk","created":1761240839,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":"'"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"s30OeHvrIugeu5S"}
+
+      data: {"id":"chatcmpl-CTtUFcbirl3Cg6GH59fLIhj5HZC95","object":"chat.completion.chunk","created":1761240839,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" using"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"aPewwF6F6U"}
+
+      data: {"id":"chatcmpl-CTtUFcbirl3Cg6GH59fLIhj5HZC95","object":"chat.completion.chunk","created":1761240839,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" Bash"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"gDn4WG7W0SF"}
+
+      data: {"id":"chatcmpl-CTtUFcbirl3Cg6GH59fLIhj5HZC95","object":"chat.completion.chunk","created":1761240839,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"r6kHmIcLG6"}
+
+      data: {"id":"chatcmpl-CTtUFcbirl3Cg6GH59fLIhj5HZC95","object":"chat.completion.chunk","created":1761240839,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","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":"MhCifXPdkTjBG"}
 
       data: [DONE]
 
@@ -49,15 +57,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 921.929791ms
+    duration: 987.647333ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 29876
+    content_length: 34332
     host: ""

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

@@ -6,9 +6,9 @@ interactions:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 737
+    content_length: 773
     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\ndownload the file from https://httpbin.org/robots.txt and save it as robots.txt\n <think>\n\n</think>","role":"user"}],"model":"gpt-4o","max_tokens":40,"stream_options":{"include_usage":true},"stream":true}'
+    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\ndownload the file from https://example-files.online-convert.com/document/txt/example.txt and save it as example.txt\n <think>\n\n</think>","role":"user"}],"model":"gpt-4o","max_tokens":40,"stream_options":{"include_usage":true},"stream":true}'
     headers:
       Accept:
       - application/json
@@ -24,25 +24,23 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-CTntkZ4Vn1brlEnRZA94CCWZ3DLtp","object":"chat.completion.chunk","created":1761219356,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"aOf6Uq2gmjjEnk"}
+      data: {"id":"chatcmpl-CTtDS3FvZqNQVfvDmAntCCBgJGQU4","object":"chat.completion.chunk","created":1761239798,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f64f290af2","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Dpi7AskhYMHjgK"}
 
-      data: {"id":"chatcmpl-CTntkZ4Vn1brlEnRZA94CCWZ3DLtp","object":"chat.completion.chunk","created":1761219356,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":"Downloading"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"cl9o1"}
+      data: {"id":"chatcmpl-CTtDS3FvZqNQVfvDmAntCCBgJGQU4","object":"chat.completion.chunk","created":1761239798,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f64f290af2","choices":[{"index":0,"delta":{"content":"Download"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"hIgpKI7g"}
 
-      data: {"id":"chatcmpl-CTntkZ4Vn1brlEnRZA94CCWZ3DLtp","object":"chat.completion.chunk","created":1761219356,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" and"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"9nBRuhOZhwMk"}
+      data: {"id":"chatcmpl-CTtDS3FvZqNQVfvDmAntCCBgJGQU4","object":"chat.completion.chunk","created":1761239798,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f64f290af2","choices":[{"index":0,"delta":{"content":" and"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"2VHAkxN8jBQF"}
 
-      data: {"id":"chatcmpl-CTntkZ4Vn1brlEnRZA94CCWZ3DLtp","object":"chat.completion.chunk","created":1761219356,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" Saving"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"0BdLlaA3m"}
+      data: {"id":"chatcmpl-CTtDS3FvZqNQVfvDmAntCCBgJGQU4","object":"chat.completion.chunk","created":1761239798,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f64f290af2","choices":[{"index":0,"delta":{"content":" Save"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"2jqYujaAAOp"}
 
-      data: {"id":"chatcmpl-CTntkZ4Vn1brlEnRZA94CCWZ3DLtp","object":"chat.completion.chunk","created":1761219356,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"P50lp0jeWmmryd"}
+      data: {"id":"chatcmpl-CTtDS3FvZqNQVfvDmAntCCBgJGQU4","object":"chat.completion.chunk","created":1761239798,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f64f290af2","choices":[{"index":0,"delta":{"content":" Example"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"OagbKrXz"}
 
-      data: {"id":"chatcmpl-CTntkZ4Vn1brlEnRZA94CCWZ3DLtp","object":"chat.completion.chunk","created":1761219356,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" File"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"V8U0cjetBS7"}
+      data: {"id":"chatcmpl-CTtDS3FvZqNQVfvDmAntCCBgJGQU4","object":"chat.completion.chunk","created":1761239798,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f64f290af2","choices":[{"index":0,"delta":{"content":" Text"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"71G6Jzy0G3Z"}
 
-      data: {"id":"chatcmpl-CTntkZ4Vn1brlEnRZA94CCWZ3DLtp","object":"chat.completion.chunk","created":1761219356,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" from"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ChRD5xbbKK3"}
+      data: {"id":"chatcmpl-CTtDS3FvZqNQVfvDmAntCCBgJGQU4","object":"chat.completion.chunk","created":1761239798,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f64f290af2","choices":[{"index":0,"delta":{"content":" File"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"p32RvNeZDMD"}
 
-      data: {"id":"chatcmpl-CTntkZ4Vn1brlEnRZA94CCWZ3DLtp","object":"chat.completion.chunk","created":1761219356,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" URL"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"t8jg2RdgsEsM"}
+      data: {"id":"chatcmpl-CTtDS3FvZqNQVfvDmAntCCBgJGQU4","object":"chat.completion.chunk","created":1761239798,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f64f290af2","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"zYNTfInk3g"}
 
-      data: {"id":"chatcmpl-CTntkZ4Vn1brlEnRZA94CCWZ3DLtp","object":"chat.completion.chunk","created":1761219356,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"Tqupyqu7xS"}
-
-      data: {"id":"chatcmpl-CTntkZ4Vn1brlEnRZA94CCWZ3DLtp","object":"chat.completion.chunk","created":1761219356,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[],"usage":{"prompt_tokens":143,"completion_tokens":7,"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":"gyWGJIgsdlA1ge"}
+      data: {"id":"chatcmpl-CTtDS3FvZqNQVfvDmAntCCBgJGQU4","object":"chat.completion.chunk","created":1761239798,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_f64f290af2","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":"Dwqa38Xh4OJYKL"}
 
       data: [DONE]
 
@@ -51,15 +49,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 3.728080375s
+    duration: 1.479031417s
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 29893
+    content_length: 34385
     host: ""

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

@@ -6,9 +6,9 @@ interactions:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 750
+    content_length: 794
     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\nfetch the content from https://httpbin.org/html and tell me if it contains the word ''Herman''\n <think>\n\n</think>","role":"user"}],"model":"gpt-4o","max_tokens":40,"stream_options":{"include_usage":true},"stream":true}'
+    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\nfetch the content from https://example-files.online-convert.com/website/html/example.html and tell me if it contains the word ''John Doe''\n <think>\n\n</think>","role":"user"}],"model":"gpt-4o","max_tokens":40,"stream_options":{"include_usage":true},"stream":true}'
     headers:
       Accept:
       - application/json
@@ -24,35 +24,31 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-CTnu51asNUryDd304s9TagDNB7Ys6","object":"chat.completion.chunk","created":1761219377,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"N1lf6hhTgWgraH"}
+      data: {"id":"chatcmpl-CTtDdjCDF8XD1W9DZ97SRlJ7bByXN","object":"chat.completion.chunk","created":1761239809,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"T2NRDyJsazEgSs"}
 
-      data: {"id":"chatcmpl-CTnu51asNUryDd304s9TagDNB7Ys6","object":"chat.completion.chunk","created":1761219377,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":"Check"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"QlFpSQXF83E"}
+      data: {"id":"chatcmpl-CTtDdjCDF8XD1W9DZ97SRlJ7bByXN","object":"chat.completion.chunk","created":1761239809,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":"Check"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"xYzfRSeoaay"}
 
-      data: {"id":"chatcmpl-CTnu51asNUryDd304s9TagDNB7Ys6","object":"chat.completion.chunk","created":1761219377,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" for"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"VdyxIkF4osMS"}
+      data: {"id":"chatcmpl-CTtDdjCDF8XD1W9DZ97SRlJ7bByXN","object":"chat.completion.chunk","created":1761239809,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" for"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"8JVQvxu8J8s0"}
 
-      data: {"id":"chatcmpl-CTnu51asNUryDd304s9TagDNB7Ys6","object":"chat.completion.chunk","created":1761219377,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" '"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"QUoalmBgvG50C9"}
+      data: {"id":"chatcmpl-CTtDdjCDF8XD1W9DZ97SRlJ7bByXN","object":"chat.completion.chunk","created":1761239809,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" '"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"WiBGSIki8xWYi2"}
 
-      data: {"id":"chatcmpl-CTnu51asNUryDd304s9TagDNB7Ys6","object":"chat.completion.chunk","created":1761219377,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":"H"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"o36kMNmcnwZN4wk"}
+      data: {"id":"chatcmpl-CTtDdjCDF8XD1W9DZ97SRlJ7bByXN","object":"chat.completion.chunk","created":1761239809,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":"John"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"19Z6Poq046D8"}
 
-      data: {"id":"chatcmpl-CTnu51asNUryDd304s9TagDNB7Ys6","object":"chat.completion.chunk","created":1761219377,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":"erman"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"2IfWziBeSSR"}
+      data: {"id":"chatcmpl-CTtDdjCDF8XD1W9DZ97SRlJ7bByXN","object":"chat.completion.chunk","created":1761239809,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" Doe"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"q5ESXaM8xhtq"}
 
-      data: {"id":"chatcmpl-CTnu51asNUryDd304s9TagDNB7Ys6","object":"chat.completion.chunk","created":1761219377,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":"'"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"zhEcVq5O8OkC4VZ"}
+      data: {"id":"chatcmpl-CTtDdjCDF8XD1W9DZ97SRlJ7bByXN","object":"chat.completion.chunk","created":1761239809,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":"'"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"32AdoVGFUOENc6z"}
 
-      data: {"id":"chatcmpl-CTnu51asNUryDd304s9TagDNB7Ys6","object":"chat.completion.chunk","created":1761219377,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"kGj7O6Qera58F"}
+      data: {"id":"chatcmpl-CTtDdjCDF8XD1W9DZ97SRlJ7bByXN","object":"chat.completion.chunk","created":1761239809,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"RmPIhItnfHCdW"}
 
-      data: {"id":"chatcmpl-CTnu51asNUryDd304s9TagDNB7Ys6","object":"chat.completion.chunk","created":1761219377,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" http"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"9Fb5KYCHkqo"}
+      data: {"id":"chatcmpl-CTtDdjCDF8XD1W9DZ97SRlJ7bByXN","object":"chat.completion.chunk","created":1761239809,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" Example"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"N35p8nx6"}
 
-      data: {"id":"chatcmpl-CTnu51asNUryDd304s9TagDNB7Ys6","object":"chat.completion.chunk","created":1761219377,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":"bin"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"AeowYwz6rqaqP"}
+      data: {"id":"chatcmpl-CTtDdjCDF8XD1W9DZ97SRlJ7bByXN","object":"chat.completion.chunk","created":1761239809,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" HTML"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"tNhxO5JCKkb"}
 
-      data: {"id":"chatcmpl-CTnu51asNUryDd304s9TagDNB7Ys6","object":"chat.completion.chunk","created":1761219377,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":".org"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"pWlTlkPKhrcL"}
+      data: {"id":"chatcmpl-CTtDdjCDF8XD1W9DZ97SRlJ7bByXN","object":"chat.completion.chunk","created":1761239809,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" Content"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"f1r2Z0BQ"}
 
-      data: {"id":"chatcmpl-CTnu51asNUryDd304s9TagDNB7Ys6","object":"chat.completion.chunk","created":1761219377,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" HTML"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"88u7AfsfnFo"}
+      data: {"id":"chatcmpl-CTtDdjCDF8XD1W9DZ97SRlJ7bByXN","object":"chat.completion.chunk","created":1761239809,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"jtSNFy8TBx"}
 
-      data: {"id":"chatcmpl-CTnu51asNUryDd304s9TagDNB7Ys6","object":"chat.completion.chunk","created":1761219377,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" content"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"bOSmAnM8"}
-
-      data: {"id":"chatcmpl-CTnu51asNUryDd304s9TagDNB7Ys6","object":"chat.completion.chunk","created":1761219377,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"qOTbnuueOT"}
-
-      data: {"id":"chatcmpl-CTnu51asNUryDd304s9TagDNB7Ys6","object":"chat.completion.chunk","created":1761219377,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[],"usage":{"prompt_tokens":146,"completion_tokens":12,"total_tokens":158,"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":"lVSPLHmhrs20E"}
+      data: {"id":"chatcmpl-CTtDdjCDF8XD1W9DZ97SRlJ7bByXN","object":"chat.completion.chunk","created":1761239809,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[],"usage":{"prompt_tokens":153,"completion_tokens":10,"total_tokens":163,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"czi99U8I0blIt"}
 
       data: [DONE]
 
@@ -61,15 +57,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 501.958ms
+    duration: 570.353583ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 29903
+    content_length: 34403
     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-CTnuINiF4D4FjTt7vDwDkDDz3KeKX","object":"chat.completion.chunk","created":1761219390,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ZINmRbKBItx88K"}
+      data: {"id":"chatcmpl-CTtDm4otTZ8FNdnGEzovbkXZZQcsB","object":"chat.completion.chunk","created":1761239818,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"4yaLCeleslhRL5"}
 
-      data: {"id":"chatcmpl-CTnuINiF4D4FjTt7vDwDkDDz3KeKX","object":"chat.completion.chunk","created":1761219390,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":"Using"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"GAzOdW7vi2f"}
+      data: {"id":"chatcmpl-CTtDm4otTZ8FNdnGEzovbkXZZQcsB","object":"chat.completion.chunk","created":1761239818,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":"Find"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ufYOxTNvcbVW"}
 
-      data: {"id":"chatcmpl-CTnuINiF4D4FjTt7vDwDkDDz3KeKX","object":"chat.completion.chunk","created":1761219390,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" Glob"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"RIqOr3BFDFZ"}
+      data: {"id":"chatcmpl-CTtDm4otTZ8FNdnGEzovbkXZZQcsB","object":"chat.completion.chunk","created":1761239818,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" ."},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Tx5Q6tEvuu9R1j"}
 
-      data: {"id":"chatcmpl-CTnuINiF4D4FjTt7vDwDkDDz3KeKX","object":"chat.completion.chunk","created":1761219390,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" to"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"LYuomONhKplCp"}
+      data: {"id":"chatcmpl-CTtDm4otTZ8FNdnGEzovbkXZZQcsB","object":"chat.completion.chunk","created":1761239818,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":"go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"rA2k0CPhHqtp7b"}
 
-      data: {"id":"chatcmpl-CTnuINiF4D4FjTt7vDwDkDDz3KeKX","object":"chat.completion.chunk","created":1761219390,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" Locate"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"BiynOXg2z"}
+      data: {"id":"chatcmpl-CTtDm4otTZ8FNdnGEzovbkXZZQcsB","object":"chat.completion.chunk","created":1761239818,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" Files"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"SejSyFeX9q"}
 
-      data: {"id":"chatcmpl-CTnuINiF4D4FjTt7vDwDkDDz3KeKX","object":"chat.completion.chunk","created":1761219390,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" ."},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"bQmLmhZB1XepFq"}
+      data: {"id":"chatcmpl-CTtDm4otTZ8FNdnGEzovbkXZZQcsB","object":"chat.completion.chunk","created":1761239818,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" Using"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"nBTvqCz8Hs"}
 
-      data: {"id":"chatcmpl-CTnuINiF4D4FjTt7vDwDkDDz3KeKX","object":"chat.completion.chunk","created":1761219390,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":"go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"q7xuhGjBgtBOp6"}
+      data: {"id":"chatcmpl-CTtDm4otTZ8FNdnGEzovbkXZZQcsB","object":"chat.completion.chunk","created":1761239818,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" Glob"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"AVJFmSQbptM"}
 
-      data: {"id":"chatcmpl-CTnuINiF4D4FjTt7vDwDkDDz3KeKX","object":"chat.completion.chunk","created":1761219390,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" Files"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"w7PStVf5Wx"}
+      data: {"id":"chatcmpl-CTtDm4otTZ8FNdnGEzovbkXZZQcsB","object":"chat.completion.chunk","created":1761239818,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"p3x9ejo5atnDM"}
 
-      data: {"id":"chatcmpl-CTnuINiF4D4FjTt7vDwDkDDz3KeKX","object":"chat.completion.chunk","created":1761219390,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"QNOgXG8wqnxd0"}
+      data: {"id":"chatcmpl-CTtDm4otTZ8FNdnGEzovbkXZZQcsB","object":"chat.completion.chunk","created":1761239818,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" Current"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"mq22wtvm"}
 
-      data: {"id":"chatcmpl-CTnuINiF4D4FjTt7vDwDkDDz3KeKX","object":"chat.completion.chunk","created":1761219390,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" Directory"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"8UmcRU"}
+      data: {"id":"chatcmpl-CTtDm4otTZ8FNdnGEzovbkXZZQcsB","object":"chat.completion.chunk","created":1761239818,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" Directory"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"DuEAja"}
 
-      data: {"id":"chatcmpl-CTnuINiF4D4FjTt7vDwDkDDz3KeKX","object":"chat.completion.chunk","created":1761219390,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"RPPosRxQ2B"}
+      data: {"id":"chatcmpl-CTtDm4otTZ8FNdnGEzovbkXZZQcsB","object":"chat.completion.chunk","created":1761239818,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"LDCmwexYUT"}
 
-      data: {"id":"chatcmpl-CTnuINiF4D4FjTt7vDwDkDDz3KeKX","object":"chat.completion.chunk","created":1761219390,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","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":"QLXTTcbD9gawzC"}
+      data: {"id":"chatcmpl-CTtDm4otTZ8FNdnGEzovbkXZZQcsB","object":"chat.completion.chunk","created":1761239818,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","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":"khOybWsMKpMvvl"}
 
       data: [DONE]
 
@@ -55,15 +55,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 502.23825ms
+    duration: 435.076458ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 29865
+    content_length: 34321
     host: ""

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

@@ -24,31 +24,29 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-CTnuPiS42WCMn3yxVYnQGjdF11fp9","object":"chat.completion.chunk","created":1761219397,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"d8cnm3R89KcjQ4"}
+      data: {"id":"chatcmpl-CTtDwWExjdFR36tBAVRCCv5IuzXH1","object":"chat.completion.chunk","created":1761239828,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ZlZONqJdWikDnk"}
 
-      data: {"id":"chatcmpl-CTnuPiS42WCMn3yxVYnQGjdF11fp9","object":"chat.completion.chunk","created":1761219397,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":"Search"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"MMidAmMJVR"}
+      data: {"id":"chatcmpl-CTtDwWExjdFR36tBAVRCCv5IuzXH1","object":"chat.completion.chunk","created":1761239828,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":"Searching"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"NapidHn"}
 
-      data: {"id":"chatcmpl-CTnuPiS42WCMn3yxVYnQGjdF11fp9","object":"chat.completion.chunk","created":1761219397,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" for"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"veKuGQhWvuUa"}
+      data: {"id":"chatcmpl-CTtDwWExjdFR36tBAVRCCv5IuzXH1","object":"chat.completion.chunk","created":1761239828,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" '"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ulW1MMlnt0BPUI"}
 
-      data: {"id":"chatcmpl-CTnuPiS42WCMn3yxVYnQGjdF11fp9","object":"chat.completion.chunk","created":1761219397,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" '"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"PcYp6bwSGEWYEh"}
+      data: {"id":"chatcmpl-CTtDwWExjdFR36tBAVRCCv5IuzXH1","object":"chat.completion.chunk","created":1761239828,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":"package"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"oPVlY4rpP"}
 
-      data: {"id":"chatcmpl-CTnuPiS42WCMn3yxVYnQGjdF11fp9","object":"chat.completion.chunk","created":1761219397,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":"package"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"TPF7UZyIl"}
+      data: {"id":"chatcmpl-CTtDwWExjdFR36tBAVRCCv5IuzXH1","object":"chat.completion.chunk","created":1761239828,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":"'"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"iHe0vsyU7JKAsAT"}
 
-      data: {"id":"chatcmpl-CTnuPiS42WCMn3yxVYnQGjdF11fp9","object":"chat.completion.chunk","created":1761219397,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":"'"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"azxHh76lf6XXQJr"}
+      data: {"id":"chatcmpl-CTtDwWExjdFR36tBAVRCCv5IuzXH1","object":"chat.completion.chunk","created":1761239828,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"MxzC7mNEqWoWF"}
 
-      data: {"id":"chatcmpl-CTnuPiS42WCMn3yxVYnQGjdF11fp9","object":"chat.completion.chunk","created":1761219397,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"DkV7YXKOo49tI"}
+      data: {"id":"chatcmpl-CTtDwWExjdFR36tBAVRCCv5IuzXH1","object":"chat.completion.chunk","created":1761239828,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" Go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"xUMrv5hHV2ZTt"}
 
-      data: {"id":"chatcmpl-CTnuPiS42WCMn3yxVYnQGjdF11fp9","object":"chat.completion.chunk","created":1761219397,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" Go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"czivFmU9OOtBl"}
+      data: {"id":"chatcmpl-CTtDwWExjdFR36tBAVRCCv5IuzXH1","object":"chat.completion.chunk","created":1761239828,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" Files"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"hSqchJorMG"}
 
-      data: {"id":"chatcmpl-CTnuPiS42WCMn3yxVYnQGjdF11fp9","object":"chat.completion.chunk","created":1761219397,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" Files"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"y1WkIlT9lY"}
+      data: {"id":"chatcmpl-CTtDwWExjdFR36tBAVRCCv5IuzXH1","object":"chat.completion.chunk","created":1761239828,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" with"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"qwvo71OKz8m"}
 
-      data: {"id":"chatcmpl-CTnuPiS42WCMn3yxVYnQGjdF11fp9","object":"chat.completion.chunk","created":1761219397,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" Using"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"V5t4ML6mkN"}
+      data: {"id":"chatcmpl-CTtDwWExjdFR36tBAVRCCv5IuzXH1","object":"chat.completion.chunk","created":1761239828,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" grep"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"icTjzJ18cG2"}
 
-      data: {"id":"chatcmpl-CTnuPiS42WCMn3yxVYnQGjdF11fp9","object":"chat.completion.chunk","created":1761219397,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" grep"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"qQZyIAYguG8"}
+      data: {"id":"chatcmpl-CTtDwWExjdFR36tBAVRCCv5IuzXH1","object":"chat.completion.chunk","created":1761239828,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"0C079dlJ7U"}
 
-      data: {"id":"chatcmpl-CTnuPiS42WCMn3yxVYnQGjdF11fp9","object":"chat.completion.chunk","created":1761219397,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"m37CjVMhQt"}
-
-      data: {"id":"chatcmpl-CTnuPiS42WCMn3yxVYnQGjdF11fp9","object":"chat.completion.chunk","created":1761219397,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","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":"oJenwvVbKE5Ps"}
+      data: {"id":"chatcmpl-CTtDwWExjdFR36tBAVRCCv5IuzXH1","object":"chat.completion.chunk","created":1761239828,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[],"usage":{"prompt_tokens":138,"completion_tokens":9,"total_tokens":147,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"bmamPRff6Vb6ci"}
 
       data: [DONE]
 
@@ -57,15 +55,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 568.274792ms
+    duration: 538.426375ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 29863
+    content_length: 34319
     host: ""

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

@@ -24,25 +24,31 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-CTnuZ2SW0SaZmoH7AiqWV4u6fgTh9","object":"chat.completion.chunk","created":1761219407,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"tZFC45ICW7Zb5a"}
+      data: {"id":"chatcmpl-CTtEBNFHnbbQOo6IfIngT3drXmBNC","object":"chat.completion.chunk","created":1761239843,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"PalM51LRS5KgZ1"}
 
-      data: {"id":"chatcmpl-CTnuZ2SW0SaZmoH7AiqWV4u6fgTh9","object":"chat.completion.chunk","created":1761219407,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":"Listing"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"jFXWqSVmx"}
+      data: {"id":"chatcmpl-CTtEBNFHnbbQOo6IfIngT3drXmBNC","object":"chat.completion.chunk","created":1761239843,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":"Listing"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"BTk48uShZ"}
 
-      data: {"id":"chatcmpl-CTnuZ2SW0SaZmoH7AiqWV4u6fgTh9","object":"chat.completion.chunk","created":1761219407,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" Files"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"zPx0lsAxdr"}
+      data: {"id":"chatcmpl-CTtEBNFHnbbQOo6IfIngT3drXmBNC","object":"chat.completion.chunk","created":1761239843,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" Files"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"mfPGKyyv6c"}
 
-      data: {"id":"chatcmpl-CTnuZ2SW0SaZmoH7AiqWV4u6fgTh9","object":"chat.completion.chunk","created":1761219407,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" with"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"LZxVVe0LQhr"}
+      data: {"id":"chatcmpl-CTtEBNFHnbbQOo6IfIngT3drXmBNC","object":"chat.completion.chunk","created":1761239843,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Aio4f3HyxYpQe"}
 
-      data: {"id":"chatcmpl-CTnuZ2SW0SaZmoH7AiqWV4u6fgTh9","object":"chat.completion.chunk","created":1761219407,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" '"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"yuOdTDLD1TDbFU"}
+      data: {"id":"chatcmpl-CTtEBNFHnbbQOo6IfIngT3drXmBNC","object":"chat.completion.chunk","created":1761239843,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" Current"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"PsWvnTXn"}
 
-      data: {"id":"chatcmpl-CTnuZ2SW0SaZmoH7AiqWV4u6fgTh9","object":"chat.completion.chunk","created":1761219407,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":"ls"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"dpSE6c3ZolPut5"}
+      data: {"id":"chatcmpl-CTtEBNFHnbbQOo6IfIngT3drXmBNC","object":"chat.completion.chunk","created":1761239843,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" Directory"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"OZPtjq"}
 
-      data: {"id":"chatcmpl-CTnuZ2SW0SaZmoH7AiqWV4u6fgTh9","object":"chat.completion.chunk","created":1761219407,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":"'"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"QHyjjxU1VDSO0VZ"}
+      data: {"id":"chatcmpl-CTtEBNFHnbbQOo6IfIngT3drXmBNC","object":"chat.completion.chunk","created":1761239843,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" with"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"mOG1ZpCOPXA"}
 
-      data: {"id":"chatcmpl-CTnuZ2SW0SaZmoH7AiqWV4u6fgTh9","object":"chat.completion.chunk","created":1761219407,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" Command"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"hUgh65Lu"}
+      data: {"id":"chatcmpl-CTtEBNFHnbbQOo6IfIngT3drXmBNC","object":"chat.completion.chunk","created":1761239843,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" '"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"AeTmgInLh1j4FE"}
 
-      data: {"id":"chatcmpl-CTnuZ2SW0SaZmoH7AiqWV4u6fgTh9","object":"chat.completion.chunk","created":1761219407,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"TPmpN0XDo3"}
+      data: {"id":"chatcmpl-CTtEBNFHnbbQOo6IfIngT3drXmBNC","object":"chat.completion.chunk","created":1761239843,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":"ls"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"t1gFRu0TpVo37g"}
 
-      data: {"id":"chatcmpl-CTnuZ2SW0SaZmoH7AiqWV4u6fgTh9","object":"chat.completion.chunk","created":1761219407,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","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":"TrHgcXEGzlYBS8"}
+      data: {"id":"chatcmpl-CTtEBNFHnbbQOo6IfIngT3drXmBNC","object":"chat.completion.chunk","created":1761239843,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":"'"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"CrKtF2l6n5fJYjS"}
+
+      data: {"id":"chatcmpl-CTtEBNFHnbbQOo6IfIngT3drXmBNC","object":"chat.completion.chunk","created":1761239843,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" Command"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"NuXZpQtt"}
+
+      data: {"id":"chatcmpl-CTtEBNFHnbbQOo6IfIngT3drXmBNC","object":"chat.completion.chunk","created":1761239843,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"v7UT7bSRqL"}
+
+      data: {"id":"chatcmpl-CTtEBNFHnbbQOo6IfIngT3drXmBNC","object":"chat.completion.chunk","created":1761239843,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[],"usage":{"prompt_tokens":135,"completion_tokens":10,"total_tokens":145,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"AIdW96yZKuXGr"}
 
       data: [DONE]
 
@@ -51,15 +57,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 638.803958ms
+    duration: 1.095213s
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 29857
+    content_length: 34313
     host: ""

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

@@ -24,29 +24,41 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-CTnuhUejVhrVn7z96Ws5FlZr04xCt","object":"chat.completion.chunk","created":1761219415,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"G1vYR2Yb0RBwDS"}
+      data: {"id":"chatcmpl-CTtEITgwnnObe1N9ZvM4xFh2Sqprm","object":"chat.completion.chunk","created":1761239850,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"RMS5H5cRfUepWl"}
 
-      data: {"id":"chatcmpl-CTnuhUejVhrVn7z96Ws5FlZr04xCt","object":"chat.completion.chunk","created":1761219415,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":"Edit"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ReCqcIFdlgeB"}
+      data: {"id":"chatcmpl-CTtEITgwnnObe1N9ZvM4xFh2Sqprm","object":"chat.completion.chunk","created":1761239850,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":"Change"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"E1Z5UaMUfM"}
 
-      data: {"id":"chatcmpl-CTnuhUejVhrVn7z96Ws5FlZr04xCt","object":"chat.completion.chunk","created":1761219415,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" Hello"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"8bZtr3W7Er"}
+      data: {"id":"chatcmpl-CTtEITgwnnObe1N9ZvM4xFh2Sqprm","object":"chat.completion.chunk","created":1761239850,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" '"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"LjlpjSB5Gj1E0F"}
 
-      data: {"id":"chatcmpl-CTnuhUejVhrVn7z96Ws5FlZr04xCt","object":"chat.completion.chunk","created":1761219415,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" Message"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"0WwcqvRj"}
+      data: {"id":"chatcmpl-CTtEITgwnnObe1N9ZvM4xFh2Sqprm","object":"chat.completion.chunk","created":1761239850,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":"Hello"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"NWj8MZ6ybb4"}
 
-      data: {"id":"chatcmpl-CTnuhUejVhrVn7z96Ws5FlZr04xCt","object":"chat.completion.chunk","created":1761219415,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" and"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"v8qseZ3ccGJk"}
+      data: {"id":"chatcmpl-CTtEITgwnnObe1N9ZvM4xFh2Sqprm","object":"chat.completion.chunk","created":1761239850,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"jzXZAvBl5YGs8SU"}
 
-      data: {"id":"chatcmpl-CTnuhUejVhrVn7z96Ws5FlZr04xCt","object":"chat.completion.chunk","created":1761219415,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" Add"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"1wO46M3JOP5N"}
+      data: {"id":"chatcmpl-CTtEITgwnnObe1N9ZvM4xFh2Sqprm","object":"chat.completion.chunk","created":1761239850,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" World"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"pW8XoiTlk5"}
 
-      data: {"id":"chatcmpl-CTnuhUejVhrVn7z96Ws5FlZr04xCt","object":"chat.completion.chunk","created":1761219415,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" Comment"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"IrNKj1yT"}
+      data: {"id":"chatcmpl-CTtEITgwnnObe1N9ZvM4xFh2Sqprm","object":"chat.completion.chunk","created":1761239850,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":"!'"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ECnh7iWuEDk7FI"}
 
-      data: {"id":"chatcmpl-CTnuhUejVhrVn7z96Ws5FlZr04xCt","object":"chat.completion.chunk","created":1761219415,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"r1GqEBxGY6esY"}
+      data: {"id":"chatcmpl-CTtEITgwnnObe1N9ZvM4xFh2Sqprm","object":"chat.completion.chunk","created":1761239850,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" to"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"8ehi3Cl8TZA8W"}
 
-      data: {"id":"chatcmpl-CTnuhUejVhrVn7z96Ws5FlZr04xCt","object":"chat.completion.chunk","created":1761219415,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" main"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"HJm3ej2BlEz"}
+      data: {"id":"chatcmpl-CTtEITgwnnObe1N9ZvM4xFh2Sqprm","object":"chat.completion.chunk","created":1761239850,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" '"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"c2ebilBBmZZmci"}
 
-      data: {"id":"chatcmpl-CTnuhUejVhrVn7z96Ws5FlZr04xCt","object":"chat.completion.chunk","created":1761219415,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":".go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"OtXfMAJLLej2y"}
+      data: {"id":"chatcmpl-CTtEITgwnnObe1N9ZvM4xFh2Sqprm","object":"chat.completion.chunk","created":1761239850,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":"Hello"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"svklZDVIumf"}
 
-      data: {"id":"chatcmpl-CTnuhUejVhrVn7z96Ws5FlZr04xCt","object":"chat.completion.chunk","created":1761219415,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"8NMqR5O0Ut"}
+      data: {"id":"chatcmpl-CTtEITgwnnObe1N9ZvM4xFh2Sqprm","object":"chat.completion.chunk","created":1761239850,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"MkdDifYEeQqwYv0"}
 
-      data: {"id":"chatcmpl-CTnuhUejVhrVn7z96Ws5FlZr04xCt","object":"chat.completion.chunk","created":1761219415,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[],"usage":{"prompt_tokens":157,"completion_tokens":9,"total_tokens":166,"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":"E0L1TPWsfwAEhV"}
+      data: {"id":"chatcmpl-CTtEITgwnnObe1N9ZvM4xFh2Sqprm","object":"chat.completion.chunk","created":1761239850,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" Crush"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ShDGoIca1x"}
+
+      data: {"id":"chatcmpl-CTtEITgwnnObe1N9ZvM4xFh2Sqprm","object":"chat.completion.chunk","created":1761239850,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":"!'"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"BZ5vLkiYKlp1Kl"}
+
+      data: {"id":"chatcmpl-CTtEITgwnnObe1N9ZvM4xFh2Sqprm","object":"chat.completion.chunk","created":1761239850,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ooexEULB6qVxt"}
+
+      data: {"id":"chatcmpl-CTtEITgwnnObe1N9ZvM4xFh2Sqprm","object":"chat.completion.chunk","created":1761239850,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" main"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ckChEkXehEV"}
+
+      data: {"id":"chatcmpl-CTtEITgwnnObe1N9ZvM4xFh2Sqprm","object":"chat.completion.chunk","created":1761239850,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":".go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"I987h2debxk1s"}
+
+      data: {"id":"chatcmpl-CTtEITgwnnObe1N9ZvM4xFh2Sqprm","object":"chat.completion.chunk","created":1761239850,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"GFYzmrcIMt"}
+
+      data: {"id":"chatcmpl-CTtEITgwnnObe1N9ZvM4xFh2Sqprm","object":"chat.completion.chunk","created":1761239850,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","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":"4ydBp6iaNXxTp"}
 
       data: [DONE]
 
@@ -55,15 +67,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 459.876666ms
+    duration: 438.27125ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 29943
+    content_length: 34399
     host: ""

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

@@ -24,23 +24,25 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-CToEwK75TXd7qJeIzOE3pfoJSNUui","object":"chat.completion.chunk","created":1761220670,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"bHMVyt6xB1v0uV"}
+      data: {"id":"chatcmpl-CTtGVuXyAVtRxCKK2X1WqX4qBlFuQ","object":"chat.completion.chunk","created":1761239987,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"5LV8NsOVZTBmmK"}
 
-      data: {"id":"chatcmpl-CToEwK75TXd7qJeIzOE3pfoJSNUui","object":"chat.completion.chunk","created":1761220670,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":"Parallel"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"jzOxYqvI"}
+      data: {"id":"chatcmpl-CTtGVuXyAVtRxCKK2X1WqX4qBlFuQ","object":"chat.completion.chunk","created":1761239987,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":"Parallel"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"tvTcMpGf"}
 
-      data: {"id":"chatcmpl-CToEwK75TXd7qJeIzOE3pfoJSNUui","object":"chat.completion.chunk","created":1761220670,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" File"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"nZmNYpttsFc"}
+      data: {"id":"chatcmpl-CTtGVuXyAVtRxCKK2X1WqX4qBlFuQ","object":"chat.completion.chunk","created":1761239987,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" Processing"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"4CGzh"}
 
-      data: {"id":"chatcmpl-CToEwK75TXd7qJeIzOE3pfoJSNUui","object":"chat.completion.chunk","created":1761220670,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" Search"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"1C5S6urQP"}
+      data: {"id":"chatcmpl-CTtGVuXyAVtRxCKK2X1WqX4qBlFuQ","object":"chat.completion.chunk","created":1761239987,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" with"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"kJCFwlMLQLv"}
 
-      data: {"id":"chatcmpl-CToEwK75TXd7qJeIzOE3pfoJSNUui","object":"chat.completion.chunk","created":1761220670,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" and"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ii9HFHKQ2lNX"}
+      data: {"id":"chatcmpl-CTtGVuXyAVtRxCKK2X1WqX4qBlFuQ","object":"chat.completion.chunk","created":1761239987,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" Glob"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"TsUX3Jk2jDf"}
 
-      data: {"id":"chatcmpl-CToEwK75TXd7qJeIzOE3pfoJSNUui","object":"chat.completion.chunk","created":1761220670,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" Directory"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"iRD6GD"}
+      data: {"id":"chatcmpl-CTtGVuXyAVtRxCKK2X1WqX4qBlFuQ","object":"chat.completion.chunk","created":1761239987,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" and"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ia7aaLKYEtc7"}
 
-      data: {"id":"chatcmpl-CToEwK75TXd7qJeIzOE3pfoJSNUui","object":"chat.completion.chunk","created":1761220670,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" Listing"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"CDIUZSPI"}
+      data: {"id":"chatcmpl-CTtGVuXyAVtRxCKK2X1WqX4qBlFuQ","object":"chat.completion.chunk","created":1761239987,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" LS"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"RJCuwRbWShWyi"}
 
-      data: {"id":"chatcmpl-CToEwK75TXd7qJeIzOE3pfoJSNUui","object":"chat.completion.chunk","created":1761220670,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"LsrxflsNPT"}
+      data: {"id":"chatcmpl-CTtGVuXyAVtRxCKK2X1WqX4qBlFuQ","object":"chat.completion.chunk","created":1761239987,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" Commands"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ZXgDvfM"}
 
-      data: {"id":"chatcmpl-CToEwK75TXd7qJeIzOE3pfoJSNUui","object":"chat.completion.chunk","created":1761220670,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[],"usage":{"prompt_tokens":154,"completion_tokens":6,"total_tokens":160,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"Li6hUjhsWSfr5U"}
+      data: {"id":"chatcmpl-CTtGVuXyAVtRxCKK2X1WqX4qBlFuQ","object":"chat.completion.chunk","created":1761239987,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"SmKSijpyKi"}
+
+      data: {"id":"chatcmpl-CTtGVuXyAVtRxCKK2X1WqX4qBlFuQ","object":"chat.completion.chunk","created":1761239987,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[],"usage":{"prompt_tokens":154,"completion_tokens":7,"total_tokens":161,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"pUHK0PNugzkJ8o"}
 
       data: [DONE]
 
@@ -49,15 +51,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 1.005567042s
+    duration: 397.623ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 29954
+    content_length: 34410
     host: ""

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

@@ -24,19 +24,19 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-CTnsSU03iSgMmulBkJwLpFHe8XHpa","object":"chat.completion.chunk","created":1761219276,"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":"OZGOOTOnArqkyY"}
+      data: {"id":"chatcmpl-CTtBqXaVBY4YzyeS0lvUjJAGovLBN","object":"chat.completion.chunk","created":1761239698,"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":"ylfTmMzDoOgPd7"}
 
-      data: {"id":"chatcmpl-CTnsSU03iSgMmulBkJwLpFHe8XHpa","object":"chat.completion.chunk","created":1761219276,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":"Read"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"T5palGdgdukY"}
+      data: {"id":"chatcmpl-CTtBqXaVBY4YzyeS0lvUjJAGovLBN","object":"chat.completion.chunk","created":1761239698,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":"Understanding"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"lQ4"}
 
-      data: {"id":"chatcmpl-CTnsSU03iSgMmulBkJwLpFHe8XHpa","object":"chat.completion.chunk","created":1761219276,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" the"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"RpI9b6mPMRzc"}
+      data: {"id":"chatcmpl-CTtBqXaVBY4YzyeS0lvUjJAGovLBN","object":"chat.completion.chunk","created":1761239698,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"rbhOd6FZoytkv"}
 
-      data: {"id":"chatcmpl-CTnsSU03iSgMmulBkJwLpFHe8XHpa","object":"chat.completion.chunk","created":1761219276,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"8BGtjXOZSm1nL"}
+      data: {"id":"chatcmpl-CTtBqXaVBY4YzyeS0lvUjJAGovLBN","object":"chat.completion.chunk","created":1761239698,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Mod"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Fs3SuMsOcvjb"}
 
-      data: {"id":"chatcmpl-CTnsSU03iSgMmulBkJwLpFHe8XHpa","object":"chat.completion.chunk","created":1761219276,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Mod"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"HHO6uHLIbBfb"}
+      data: {"id":"chatcmpl-CTtBqXaVBY4YzyeS0lvUjJAGovLBN","object":"chat.completion.chunk","created":1761239698,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Files"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"sAQnNVizjQ"}
 
-      data: {"id":"chatcmpl-CTnsSU03iSgMmulBkJwLpFHe8XHpa","object":"chat.completion.chunk","created":1761219276,"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":"3prpOfF449"}
+      data: {"id":"chatcmpl-CTtBqXaVBY4YzyeS0lvUjJAGovLBN","object":"chat.completion.chunk","created":1761239698,"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":"IvHc2x3bF1"}
 
-      data: {"id":"chatcmpl-CTnsSU03iSgMmulBkJwLpFHe8XHpa","object":"chat.completion.chunk","created":1761219276,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[],"usage":{"prompt_tokens":129,"completion_tokens":4,"total_tokens":133,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"8CaRnllHN48CLN"}
+      data: {"id":"chatcmpl-CTtBqXaVBY4YzyeS0lvUjJAGovLBN","object":"chat.completion.chunk","created":1761239698,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[],"usage":{"prompt_tokens":129,"completion_tokens":4,"total_tokens":133,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"gdQaLLbzBHiKsq"}
 
       data: [DONE]
 
@@ -45,15 +45,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 509.348833ms
+    duration: 1.402804167s
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 29827
+    content_length: 34283
     host: ""

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

@@ -24,17 +24,17 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-CTnsPHq388hN9VuFmjDpHiUPlxa84","object":"chat.completion.chunk","created":1761219273,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"97Cy9xN03PqdzK"}
+      data: {"id":"chatcmpl-CTtBmgn5mYpocQkE6j46WRztzCMuk","object":"chat.completion.chunk","created":1761239694,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"HIOszqvOqqv7kS"}
 
-      data: {"id":"chatcmpl-CTnsPHq388hN9VuFmjDpHiUPlxa84","object":"chat.completion.chunk","created":1761219273,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":"Greetings"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"CpDjM66"}
+      data: {"id":"chatcmpl-CTtBmgn5mYpocQkE6j46WRztzCMuk","object":"chat.completion.chunk","created":1761239694,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":"Greetings"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"xZTLjee"}
 
-      data: {"id":"chatcmpl-CTnsPHq388hN9VuFmjDpHiUPlxa84","object":"chat.completion.chunk","created":1761219273,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" and"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"UxTRIMjPP4Qt"}
+      data: {"id":"chatcmpl-CTtBmgn5mYpocQkE6j46WRztzCMuk","object":"chat.completion.chunk","created":1761239694,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" and"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"bCV7T7xiIZ6I"}
 
-      data: {"id":"chatcmpl-CTnsPHq388hN9VuFmjDpHiUPlxa84","object":"chat.completion.chunk","created":1761219273,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" Introduction"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"kEr"}
+      data: {"id":"chatcmpl-CTtBmgn5mYpocQkE6j46WRztzCMuk","object":"chat.completion.chunk","created":1761239694,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" Introduction"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Fca"}
 
-      data: {"id":"chatcmpl-CTnsPHq388hN9VuFmjDpHiUPlxa84","object":"chat.completion.chunk","created":1761219273,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"VzGq8TKPi7"}
+      data: {"id":"chatcmpl-CTtBmgn5mYpocQkE6j46WRztzCMuk","object":"chat.completion.chunk","created":1761239694,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"tN3u8jrIjV"}
 
-      data: {"id":"chatcmpl-CTnsPHq388hN9VuFmjDpHiUPlxa84","object":"chat.completion.chunk","created":1761219273,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[],"usage":{"prompt_tokens":126,"completion_tokens":3,"total_tokens":129,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"I36B3yNq4eVBsW"}
+      data: {"id":"chatcmpl-CTtBmgn5mYpocQkE6j46WRztzCMuk","object":"chat.completion.chunk","created":1761239694,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[],"usage":{"prompt_tokens":126,"completion_tokens":3,"total_tokens":129,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"142WrYHN7llNCD"}
 
       data: [DONE]
 
@@ -43,15 +43,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 1.084419333s
+    duration: 664.58725ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 29817
+    content_length: 34273
     host: ""

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

@@ -24,35 +24,35 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-CTnvX6OF7gHcRK2h6A9EJhAVsmIkF","object":"chat.completion.chunk","created":1761219467,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"rDSzI9962EPhz9"}
+      data: {"id":"chatcmpl-CTtFbHndeQPdPZN9bea8mNhhYZaHP","object":"chat.completion.chunk","created":1761239931,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"71wXAFH1QasYXU"}
 
-      data: {"id":"chatcmpl-CTnvX6OF7gHcRK2h6A9EJhAVsmIkF","object":"chat.completion.chunk","created":1761219467,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":"Searching"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"8tdQ1t0"}
+      data: {"id":"chatcmpl-CTtFbHndeQPdPZN9bea8mNhhYZaHP","object":"chat.completion.chunk","created":1761239931,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":"Searching"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"KfyYPpJ"}
 
-      data: {"id":"chatcmpl-CTnvX6OF7gHcRK2h6A9EJhAVsmIkF","object":"chat.completion.chunk","created":1761219467,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" '"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"hj0taOjFubCa3H"}
+      data: {"id":"chatcmpl-CTtFbHndeQPdPZN9bea8mNhhYZaHP","object":"chat.completion.chunk","created":1761239931,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" '"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"4s9xOdtTSkRq62"}
 
-      data: {"id":"chatcmpl-CTnvX6OF7gHcRK2h6A9EJhAVsmIkF","object":"chat.completion.chunk","created":1761219467,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":"func"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"keBYzaBOssVk"}
+      data: {"id":"chatcmpl-CTtFbHndeQPdPZN9bea8mNhhYZaHP","object":"chat.completion.chunk","created":1761239931,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":"func"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"BSMOjNqHKHcP"}
 
-      data: {"id":"chatcmpl-CTnvX6OF7gHcRK2h6A9EJhAVsmIkF","object":"chat.completion.chunk","created":1761219467,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" main"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"cttyPqxVuh4"}
+      data: {"id":"chatcmpl-CTtFbHndeQPdPZN9bea8mNhhYZaHP","object":"chat.completion.chunk","created":1761239931,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" main"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"uVBy5exmJ59"}
 
-      data: {"id":"chatcmpl-CTnvX6OF7gHcRK2h6A9EJhAVsmIkF","object":"chat.completion.chunk","created":1761219467,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":"'"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"JBnCCjbV0Q30iPH"}
+      data: {"id":"chatcmpl-CTtFbHndeQPdPZN9bea8mNhhYZaHP","object":"chat.completion.chunk","created":1761239931,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":"'"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"m5n9bhmfUyMxsHW"}
 
-      data: {"id":"chatcmpl-CTnvX6OF7gHcRK2h6A9EJhAVsmIkF","object":"chat.completion.chunk","created":1761219467,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"OCqKWjsaqS47X"}
+      data: {"id":"chatcmpl-CTtFbHndeQPdPZN9bea8mNhhYZaHP","object":"chat.completion.chunk","created":1761239931,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"IR8Vj6LCHnWBA"}
 
-      data: {"id":"chatcmpl-CTnvX6OF7gHcRK2h6A9EJhAVsmIkF","object":"chat.completion.chunk","created":1761219467,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" Go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"CBQwU4UQhQ1r9"}
+      data: {"id":"chatcmpl-CTtFbHndeQPdPZN9bea8mNhhYZaHP","object":"chat.completion.chunk","created":1761239931,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" Go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"y3EcqGQPUOJhq"}
 
-      data: {"id":"chatcmpl-CTnvX6OF7gHcRK2h6A9EJhAVsmIkF","object":"chat.completion.chunk","created":1761219467,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" Re"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ItEEr5WdGnwwk"}
+      data: {"id":"chatcmpl-CTtFbHndeQPdPZN9bea8mNhhYZaHP","object":"chat.completion.chunk","created":1761239931,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" Re"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"LdGlE1yyecfvE"}
 
-      data: {"id":"chatcmpl-CTnvX6OF7gHcRK2h6A9EJhAVsmIkF","object":"chat.completion.chunk","created":1761219467,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":"positories"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"3KpHpo"}
+      data: {"id":"chatcmpl-CTtFbHndeQPdPZN9bea8mNhhYZaHP","object":"chat.completion.chunk","created":1761239931,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":"positories"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"IO2RCf"}
 
-      data: {"id":"chatcmpl-CTnvX6OF7gHcRK2h6A9EJhAVsmIkF","object":"chat.completion.chunk","created":1761219467,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" with"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"daSs4KZZEk0"}
+      data: {"id":"chatcmpl-CTtFbHndeQPdPZN9bea8mNhhYZaHP","object":"chat.completion.chunk","created":1761239931,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" with"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"wSmtNIZMiAj"}
 
-      data: {"id":"chatcmpl-CTnvX6OF7gHcRK2h6A9EJhAVsmIkF","object":"chat.completion.chunk","created":1761219467,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" Source"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ePojNKSFv"}
+      data: {"id":"chatcmpl-CTtFbHndeQPdPZN9bea8mNhhYZaHP","object":"chat.completion.chunk","created":1761239931,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" Source"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Q7attQ9kQ"}
 
-      data: {"id":"chatcmpl-CTnvX6OF7gHcRK2h6A9EJhAVsmIkF","object":"chat.completion.chunk","created":1761219467,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":"graph"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"QQXCeVjuufP"}
+      data: {"id":"chatcmpl-CTtFbHndeQPdPZN9bea8mNhhYZaHP","object":"chat.completion.chunk","created":1761239931,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":"graph"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"MtSHkGPL9oh"}
 
-      data: {"id":"chatcmpl-CTnvX6OF7gHcRK2h6A9EJhAVsmIkF","object":"chat.completion.chunk","created":1761219467,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"cnCxwT4ebg"}
+      data: {"id":"chatcmpl-CTtFbHndeQPdPZN9bea8mNhhYZaHP","object":"chat.completion.chunk","created":1761239931,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"5MEWEU2ggV"}
 
-      data: {"id":"chatcmpl-CTnvX6OF7gHcRK2h6A9EJhAVsmIkF","object":"chat.completion.chunk","created":1761219467,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","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":"cCkh0KGoATByQ"}
+      data: {"id":"chatcmpl-CTtFbHndeQPdPZN9bea8mNhhYZaHP","object":"chat.completion.chunk","created":1761239931,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","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":"qFus8lWXchhIO"}
 
       data: [DONE]
 
@@ -61,15 +61,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 501.56625ms
+    duration: 493.20425ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 29877
+    content_length: 34333
     host: ""

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

@@ -24,25 +24,31 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-CTnsl7uyIEQLnKLCeVcwJzV5O51fJ","object":"chat.completion.chunk","created":1761219295,"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":"OxhGdRyp1mnS8O"}
+      data: {"id":"chatcmpl-CTtCIaOhzMJZhYpyLFfYHvspr5OH4","object":"chat.completion.chunk","created":1761239726,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"EKCOd06vmcIddk"}
 
-      data: {"id":"chatcmpl-CTnsl7uyIEQLnKLCeVcwJzV5O51fJ","object":"chat.completion.chunk","created":1761219295,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":"Changing"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"tz7olzIb"}
+      data: {"id":"chatcmpl-CTtCIaOhzMJZhYpyLFfYHvspr5OH4","object":"chat.completion.chunk","created":1761239726,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":"Update"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"0OYz1m5jLX"}
 
-      data: {"id":"chatcmpl-CTnsl7uyIEQLnKLCeVcwJzV5O51fJ","object":"chat.completion.chunk","created":1761219295,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Print"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"tpb5c272wb"}
+      data: {"id":"chatcmpl-CTtCIaOhzMJZhYpyLFfYHvspr5OH4","object":"chat.completion.chunk","created":1761239726,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" main"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"p4nHifyvhN4"}
 
-      data: {"id":"chatcmpl-CTnsl7uyIEQLnKLCeVcwJzV5O51fJ","object":"chat.completion.chunk","created":1761219295,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Statement"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"BrDALU"}
+      data: {"id":"chatcmpl-CTtCIaOhzMJZhYpyLFfYHvspr5OH4","object":"chat.completion.chunk","created":1761239726,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":".go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"F2Rbvr8RJCrSa"}
 
-      data: {"id":"chatcmpl-CTnsl7uyIEQLnKLCeVcwJzV5O51fJ","object":"chat.completion.chunk","created":1761219295,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" to"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"uEzS3Is70f6Ie"}
+      data: {"id":"chatcmpl-CTtCIaOhzMJZhYpyLFfYHvspr5OH4","object":"chat.completion.chunk","created":1761239726,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" to"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"o5nLkzOENKDA1"}
 
-      data: {"id":"chatcmpl-CTnsl7uyIEQLnKLCeVcwJzV5O51fJ","object":"chat.completion.chunk","created":1761219295,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Custom"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ypWrTgtTw"}
+      data: {"id":"chatcmpl-CTtCIaOhzMJZhYpyLFfYHvspr5OH4","object":"chat.completion.chunk","created":1761239726,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" Print"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"69mGHAJkUa"}
 
-      data: {"id":"chatcmpl-CTnsl7uyIEQLnKLCeVcwJzV5O51fJ","object":"chat.completion.chunk","created":1761219295,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Welcome"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"HGkfX91N"}
+      data: {"id":"chatcmpl-CTtCIaOhzMJZhYpyLFfYHvspr5OH4","object":"chat.completion.chunk","created":1761239726,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" \""},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"nnZZ5wSixKVKe"}
 
-      data: {"id":"chatcmpl-CTnsl7uyIEQLnKLCeVcwJzV5O51fJ","object":"chat.completion.chunk","created":1761219295,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" Message"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ZNehWbUD"}
+      data: {"id":"chatcmpl-CTtCIaOhzMJZhYpyLFfYHvspr5OH4","object":"chat.completion.chunk","created":1761239726,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":"Hello"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"o6Zx5r42r5d"}
 
-      data: {"id":"chatcmpl-CTnsl7uyIEQLnKLCeVcwJzV5O51fJ","object":"chat.completion.chunk","created":1761219295,"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":"Tf0CjWsQfA"}
+      data: {"id":"chatcmpl-CTtCIaOhzMJZhYpyLFfYHvspr5OH4","object":"chat.completion.chunk","created":1761239726,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" from"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"0yejUWmUrBi"}
 
-      data: {"id":"chatcmpl-CTnsl7uyIEQLnKLCeVcwJzV5O51fJ","object":"chat.completion.chunk","created":1761219295,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","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":"TTbGOFvAcCt4us"}
+      data: {"id":"chatcmpl-CTtCIaOhzMJZhYpyLFfYHvspr5OH4","object":"chat.completion.chunk","created":1761239726,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":" Crush"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Sd93OiuCPr"}
+
+      data: {"id":"chatcmpl-CTtCIaOhzMJZhYpyLFfYHvspr5OH4","object":"chat.completion.chunk","created":1761239726,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{"content":"\""},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"sjf8VtrHRDxXIX"}
+
+      data: {"id":"chatcmpl-CTtCIaOhzMJZhYpyLFfYHvspr5OH4","object":"chat.completion.chunk","created":1761239726,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"ZK3NZXgwt2"}
+
+      data: {"id":"chatcmpl-CTtCIaOhzMJZhYpyLFfYHvspr5OH4","object":"chat.completion.chunk","created":1761239726,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_a788c5aef0","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":"iNuQdkM72ThLL"}
 
       data: [DONE]
 
@@ -51,15 +57,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 582.088292ms
+    duration: 597.170459ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 29883
+    content_length: 34339
     host: ""

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

@@ -24,23 +24,27 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"chatcmpl-CTnvwI9MP4tHmEZLi5NBiGPvgWYQk","object":"chat.completion.chunk","created":1761219492,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"M0bqTtIbWsOVtp"}
+      data: {"id":"chatcmpl-CTtG4lwA5ItN2GErUKFadhUCdxPFu","object":"chat.completion.chunk","created":1761239960,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"9IM2B8RDLykuZI"}
 
-      data: {"id":"chatcmpl-CTnvwI9MP4tHmEZLi5NBiGPvgWYQk","object":"chat.completion.chunk","created":1761219492,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":"Create"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"rnV6xaP926"}
+      data: {"id":"chatcmpl-CTtG4lwA5ItN2GErUKFadhUCdxPFu","object":"chat.completion.chunk","created":1761239960,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":"Create"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"cSpVxFzNqT"}
 
-      data: {"id":"chatcmpl-CTnvwI9MP4tHmEZLi5NBiGPvgWYQk","object":"chat.completion.chunk","created":1761219492,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" config"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"4DZr0757E"}
+      data: {"id":"chatcmpl-CTtG4lwA5ItN2GErUKFadhUCdxPFu","object":"chat.completion.chunk","created":1761239960,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"dkaBgpsuupsz9U"}
 
-      data: {"id":"chatcmpl-CTnvwI9MP4tHmEZLi5NBiGPvgWYQk","object":"chat.completion.chunk","created":1761219492,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":".json"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"PEuJJcJFYoE"}
+      data: {"id":"chatcmpl-CTtG4lwA5ItN2GErUKFadhUCdxPFu","object":"chat.completion.chunk","created":1761239960,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" config"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"bUYPc3MHy"}
 
-      data: {"id":"chatcmpl-CTnvwI9MP4tHmEZLi5NBiGPvgWYQk","object":"chat.completion.chunk","created":1761219492,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" with"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"flXSEhQvX94"}
+      data: {"id":"chatcmpl-CTtG4lwA5ItN2GErUKFadhUCdxPFu","object":"chat.completion.chunk","created":1761239960,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":".json"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"5UfcMCL4wxz"}
 
-      data: {"id":"chatcmpl-CTnvwI9MP4tHmEZLi5NBiGPvgWYQk","object":"chat.completion.chunk","created":1761219492,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" JSON"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"LSGxg4WokwO"}
+      data: {"id":"chatcmpl-CTtG4lwA5ItN2GErUKFadhUCdxPFu","object":"chat.completion.chunk","created":1761239960,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" file"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"9CDfYLuihGE"}
 
-      data: {"id":"chatcmpl-CTnvwI9MP4tHmEZLi5NBiGPvgWYQk","object":"chat.completion.chunk","created":1761219492,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" content"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"vJiNekBy"}
+      data: {"id":"chatcmpl-CTtG4lwA5ItN2GErUKFadhUCdxPFu","object":"chat.completion.chunk","created":1761239960,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" with"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"9ZCut1riAmI"}
 
-      data: {"id":"chatcmpl-CTnvwI9MP4tHmEZLi5NBiGPvgWYQk","object":"chat.completion.chunk","created":1761219492,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"X4xBihvmE6"}
+      data: {"id":"chatcmpl-CTtG4lwA5ItN2GErUKFadhUCdxPFu","object":"chat.completion.chunk","created":1761239960,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" JSON"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"yHyczAJU8WF"}
 
-      data: {"id":"chatcmpl-CTnvwI9MP4tHmEZLi5NBiGPvgWYQk","object":"chat.completion.chunk","created":1761219492,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","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":"oxcE3zicLOXntl"}
+      data: {"id":"chatcmpl-CTtG4lwA5ItN2GErUKFadhUCdxPFu","object":"chat.completion.chunk","created":1761239960,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{"content":" content"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Xa9OhCGt"}
+
+      data: {"id":"chatcmpl-CTtG4lwA5ItN2GErUKFadhUCdxPFu","object":"chat.completion.chunk","created":1761239960,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"PlPpmJ9HWM"}
+
+      data: {"id":"chatcmpl-CTtG4lwA5ItN2GErUKFadhUCdxPFu","object":"chat.completion.chunk","created":1761239960,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_eb3c3cb84d","choices":[],"usage":{"prompt_tokens":153,"completion_tokens":8,"total_tokens":161,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"9X2WpF9zMcGakO"}
 
       data: [DONE]
 
@@ -49,15 +53,15 @@ interactions:
       - text/event-stream; charset=utf-8
     status: 200 OK
     code: 200
-    duration: 1.317672083s
+    duration: 356.397042ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 29920
+    content_length: 34376
     host: ""

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

@@ -1,146 +1,180 @@
 ---
 version: 2
 interactions:
-- id: 0
-  request:
-    proto: HTTP/1.1
-    proto_major: 1
-    proto_minor: 1
-    content_length: 775
-    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 bash to create a file named test.txt with content ''hello bash''\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}'
-    headers:
-      Accept:
-      - application/json
-      Content-Type:
-      - application/json
-      User-Agent:
-      - OpenAI/Go 2.7.1
-    url: https://openrouter.ai/api/v1/chat/completions
-    method: POST
-  response:
-    proto: HTTP/2.0
-    proto_major: 2
-    proto_minor: 0
-    content_length: -1
-    body: |+
-      data: {"id":"gen-1761239548-iE24hRsdSyjW1rz3L5yq","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761239548,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1761239548-iE24hRsdSyjW1rz3L5yq","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761239548,"choices":[{"index":0,"delta":{"role":"assistant","content":"Create"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1761239548-iE24hRsdSyjW1rz3L5yq","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761239548,"choices":[{"index":0,"delta":{"role":"assistant","content":" test"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1761239548-iE24hRsdSyjW1rz3L5yq","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761239548,"choices":[{"index":0,"delta":{"role":"assistant","content":".txt"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1761239548-iE24hRsdSyjW1rz3L5yq","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761239548,"choices":[{"index":0,"delta":{"role":"assistant","content":" with"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1761239548-iE24hRsdSyjW1rz3L5yq","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761239548,"choices":[{"index":0,"delta":{"role":"assistant","content":" hello"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1761239548-iE24hRsdSyjW1rz3L5yq","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761239548,"choices":[{"index":0,"delta":{"role":"assistant","content":" bash"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1761239548-iE24hRsdSyjW1rz3L5yq","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761239548,"choices":[{"index":0,"delta":{"role":"assistant","content":" using"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1761239548-iE24hRsdSyjW1rz3L5yq","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761239548,"choices":[{"index":0,"delta":{"role":"assistant","content":" bash"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1761239548-iE24hRsdSyjW1rz3L5yq","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761239548,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
-
-      data: {"id":"gen-1761239548-iE24hRsdSyjW1rz3L5yq","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761239548,"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.00002964,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.00001974,"upstream_inference_completions_cost":0.0000099},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
-
-      data: [DONE]
-
-    headers:
-      Content-Type:
-      - text/event-stream
-    status: 200 OK
-    code: 200
-    duration: 4.331630542s
-- id: 1
-  request:
-    proto: HTTP/1.1
-    proto_major: 1
-    proto_minor: 1
-    content_length: 29988
-    host: ""

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

@@ -6,9 +6,9 @@ interactions:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 788
+    content_length: 824
     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\ndownload the file from https://httpbin.org/robots.txt and save it as robots.txt\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}'
+    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\ndownload the file from https://example-files.online-convert.com/document/txt/example.txt and save it as example.txt\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}'
     headers:
       Accept:
       - application/json
@@ -24,19 +24,25 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"gen-1761220127-tE9zrDWy36dYAMdiFQDZ","provider":"Novita","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220127,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":""}
+      data: {"id":"gen-1761240031-YtSA3oxylVX1fkgEXKma","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240031,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220127-tE9zrDWy36dYAMdiFQDZ","provider":"Novita","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220127,"choices":[{"index":0,"delta":{"role":"assistant","content":"Download"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":""}
+      data: {"id":"gen-1761240031-YtSA3oxylVX1fkgEXKma","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240031,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220127-tE9zrDWy36dYAMdiFQDZ","provider":"Novita","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220127,"choices":[{"index":0,"delta":{"role":"assistant","content":" robots.txt from"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":""}
+      data: {"id":"gen-1761240031-YtSA3oxylVX1fkgEXKma","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240031,"choices":[{"index":0,"delta":{"role":"assistant","content":"Download"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220127-tE9zrDWy36dYAMdiFQDZ","provider":"Novita","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220127,"choices":[{"index":0,"delta":{"role":"assistant","content":" http"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":""}
+      data: {"id":"gen-1761240031-YtSA3oxylVX1fkgEXKma","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240031,"choices":[{"index":0,"delta":{"role":"assistant","content":" example"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220127-tE9zrDWy36dYAMdiFQDZ","provider":"Novita","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220127,"choices":[{"index":0,"delta":{"role":"assistant","content":"bin.org"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":""}
+      data: {"id":"gen-1761240031-YtSA3oxylVX1fkgEXKma","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240031,"choices":[{"index":0,"delta":{"role":"assistant","content":".txt from example"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220127-tE9zrDWy36dYAMdiFQDZ","provider":"Novita","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220127,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}],"system_fingerprint":""}
+      data: {"id":"gen-1761240031-YtSA3oxylVX1fkgEXKma","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240031,"choices":[{"index":0,"delta":{"role":"assistant","content":"-files"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220127-tE9zrDWy36dYAMdiFQDZ","provider":"Novita","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220127,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":149,"completion_tokens":7,"total_tokens":156,"cost":0.00003285,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.00002235,"upstream_inference_completions_cost":0.0000105},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
+      data: {"id":"gen-1761240031-YtSA3oxylVX1fkgEXKma","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240031,"choices":[{"index":0,"delta":{"role":"assistant","content":".online-"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+      data: {"id":"gen-1761240031-YtSA3oxylVX1fkgEXKma","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240031,"choices":[{"index":0,"delta":{"role":"assistant","content":"convert.com"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+      data: {"id":"gen-1761240031-YtSA3oxylVX1fkgEXKma","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240031,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
+
+      data: {"id":"gen-1761240031-YtSA3oxylVX1fkgEXKma","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240031,"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.0000331,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.000021,"upstream_inference_completions_cost":0.0000121},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
 
       data: [DONE]
 
@@ -45,15 +51,15 @@ interactions:
       - text/event-stream
     status: 200 OK
     code: 200
-    duration: 741.712292ms
+    duration: 542.3845ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 30005
+    content_length: 34497
     host: ""

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

@@ -6,9 +6,9 @@ interactions:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 801
+    content_length: 845
     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\nfetch the content from https://httpbin.org/html and tell me if it contains the word ''Herman''\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}'
+    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\nfetch the content from https://example-files.online-convert.com/website/html/example.html and tell me if it contains the word ''John Doe''\n <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}'
     headers:
       Accept:
       - application/json
@@ -24,35 +24,25 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"gen-1761220136-Mu7F3XkI1jeGXwNzFmFC","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220136,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240036-JKX4yVU7Oa9Y0GPXWc0r","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240036,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220136-Mu7F3XkI1jeGXwNzFmFC","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220136,"choices":[{"index":0,"delta":{"role":"assistant","content":"Check"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240036-JKX4yVU7Oa9Y0GPXWc0r","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240036,"choices":[{"index":0,"delta":{"role":"assistant","content":"Check"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220136-Mu7F3XkI1jeGXwNzFmFC","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220136,"choices":[{"index":0,"delta":{"role":"assistant","content":" if"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240036-JKX4yVU7Oa9Y0GPXWc0r","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240036,"choices":[{"index":0,"delta":{"role":"assistant","content":" if"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220136-Mu7F3XkI1jeGXwNzFmFC","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220136,"choices":[{"index":0,"delta":{"role":"assistant","content":" https"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240036-JKX4yVU7Oa9Y0GPXWc0r","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240036,"choices":[{"index":0,"delta":{"role":"assistant","content":" example"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220136-Mu7F3XkI1jeGXwNzFmFC","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220136,"choices":[{"index":0,"delta":{"role":"assistant","content":"://"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240036-JKX4yVU7Oa9Y0GPXWc0r","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240036,"choices":[{"index":0,"delta":{"role":"assistant","content":".html"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220136-Mu7F3XkI1jeGXwNzFmFC","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220136,"choices":[{"index":0,"delta":{"role":"assistant","content":"http"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240036-JKX4yVU7Oa9Y0GPXWc0r","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240036,"choices":[{"index":0,"delta":{"role":"assistant","content":" contains"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220136-Mu7F3XkI1jeGXwNzFmFC","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220136,"choices":[{"index":0,"delta":{"role":"assistant","content":"bin"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240036-JKX4yVU7Oa9Y0GPXWc0r","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240036,"choices":[{"index":0,"delta":{"role":"assistant","content":" John"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220136-Mu7F3XkI1jeGXwNzFmFC","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220136,"choices":[{"index":0,"delta":{"role":"assistant","content":".org"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240036-JKX4yVU7Oa9Y0GPXWc0r","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240036,"choices":[{"index":0,"delta":{"role":"assistant","content":" Doe"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220136-Mu7F3XkI1jeGXwNzFmFC","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220136,"choices":[{"index":0,"delta":{"role":"assistant","content":"/html"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240036-JKX4yVU7Oa9Y0GPXWc0r","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240036,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
 
-      data: {"id":"gen-1761220136-Mu7F3XkI1jeGXwNzFmFC","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220136,"choices":[{"index":0,"delta":{"role":"assistant","content":" contains"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1761220136-Mu7F3XkI1jeGXwNzFmFC","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220136,"choices":[{"index":0,"delta":{"role":"assistant","content":" the"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1761220136-Mu7F3XkI1jeGXwNzFmFC","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220136,"choices":[{"index":0,"delta":{"role":"assistant","content":" word"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1761220136-Mu7F3XkI1jeGXwNzFmFC","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220136,"choices":[{"index":0,"delta":{"role":"assistant","content":" Herman"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1761220136-Mu7F3XkI1jeGXwNzFmFC","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220136,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
-
-      data: {"id":"gen-1761220136-Mu7F3XkI1jeGXwNzFmFC","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220136,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":148,"completion_tokens":13,"total_tokens":161,"cost":0.0000417,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.0000222,"upstream_inference_completions_cost":0.0000195},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
+      data: {"id":"gen-1761240036-JKX4yVU7Oa9Y0GPXWc0r","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240036,"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.0000305,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.0000217,"upstream_inference_completions_cost":0.0000088},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
 
       data: [DONE]
 
@@ -61,15 +51,15 @@ interactions:
       - text/event-stream
     status: 200 OK
     code: 200
-    duration: 658.333959ms
+    duration: 627.954916ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 30015
+    content_length: 34515
     host: ""

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

@@ -24,19 +24,31 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"gen-1761220147-yrFSxn0jeR2lqTpz982z","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220147,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240039-xwnaz8zuYmep4mFNK9ng","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240039,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220147-yrFSxn0jeR2lqTpz982z","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220147,"choices":[{"index":0,"delta":{"role":"assistant","content":"Find"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240039-xwnaz8zuYmep4mFNK9ng","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240039,"choices":[{"index":0,"delta":{"role":"assistant","content":"Find"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220147-yrFSxn0jeR2lqTpz982z","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220147,"choices":[{"index":0,"delta":{"role":"assistant","content":" all .go files"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240039-xwnaz8zuYmep4mFNK9ng","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240039,"choices":[{"index":0,"delta":{"role":"assistant","content":" all"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220147-yrFSxn0jeR2lqTpz982z","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220147,"choices":[{"index":0,"delta":{"role":"assistant","content":" in current directory using"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240039-xwnaz8zuYmep4mFNK9ng","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240039,"choices":[{"index":0,"delta":{"role":"assistant","content":" ."},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220147-yrFSxn0jeR2lqTpz982z","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220147,"choices":[{"index":0,"delta":{"role":"assistant","content":" glob"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240039-xwnaz8zuYmep4mFNK9ng","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240039,"choices":[{"index":0,"delta":{"role":"assistant","content":"go"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220147-yrFSxn0jeR2lqTpz982z","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220147,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
+      data: {"id":"gen-1761240039-xwnaz8zuYmep4mFNK9ng","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240039,"choices":[{"index":0,"delta":{"role":"assistant","content":" files"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220147-yrFSxn0jeR2lqTpz982z","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220147,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":139,"completion_tokens":11,"total_tokens":150,"cost":0.00003405,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.00002085,"upstream_inference_completions_cost":0.0000132},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
+      data: {"id":"gen-1761240039-xwnaz8zuYmep4mFNK9ng","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240039,"choices":[{"index":0,"delta":{"role":"assistant","content":" in"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+      data: {"id":"gen-1761240039-xwnaz8zuYmep4mFNK9ng","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240039,"choices":[{"index":0,"delta":{"role":"assistant","content":" current"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+      data: {"id":"gen-1761240039-xwnaz8zuYmep4mFNK9ng","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240039,"choices":[{"index":0,"delta":{"role":"assistant","content":" directory"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+      data: {"id":"gen-1761240039-xwnaz8zuYmep4mFNK9ng","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240039,"choices":[{"index":0,"delta":{"role":"assistant","content":" using"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+      data: {"id":"gen-1761240039-xwnaz8zuYmep4mFNK9ng","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240039,"choices":[{"index":0,"delta":{"role":"assistant","content":" glob"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+      data: {"id":"gen-1761240039-xwnaz8zuYmep4mFNK9ng","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240039,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
+
+      data: {"id":"gen-1761240039-xwnaz8zuYmep4mFNK9ng","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240039,"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.0000227,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.0000139,"upstream_inference_completions_cost":0.0000088},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
 
       data: [DONE]
 
@@ -45,15 +57,15 @@ interactions:
       - text/event-stream
     status: 200 OK
     code: 200
-    duration: 443.75725ms
+    duration: 967.754708ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 29977
+    content_length: 34433
     host: ""

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

@@ -24,19 +24,17 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"gen-1761220149-7J9TfUlbjCYqpFghw9UA","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220149,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240046-uGI7ZpLlgL2mBGsQpF9x","provider":"Alibaba","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240046,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":null}
 
-      data: {"id":"gen-1761220149-7J9TfUlbjCYqpFghw9UA","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220149,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240046-uGI7ZpLlgL2mBGsQpF9x","provider":"Alibaba","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240046,"choices":[{"index":0,"delta":{"role":"assistant","content":"Search"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":null}
 
-      data: {"id":"gen-1761220149-7J9TfUlbjCYqpFghw9UA","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220149,"choices":[{"index":0,"delta":{"role":"assistant","content":"Search"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240046-uGI7ZpLlgL2mBGsQpF9x","provider":"Alibaba","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240046,"choices":[{"index":0,"delta":{"role":"assistant","content":" for package in go"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":null}
 
-      data: {"id":"gen-1761220149-7J9TfUlbjCYqpFghw9UA","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220149,"choices":[{"index":0,"delta":{"role":"assistant","content":" for package in Go"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240046-uGI7ZpLlgL2mBGsQpF9x","provider":"Alibaba","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240046,"choices":[{"index":0,"delta":{"role":"assistant","content":" files using grep"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":null}
 
-      data: {"id":"gen-1761220149-7J9TfUlbjCYqpFghw9UA","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220149,"choices":[{"index":0,"delta":{"role":"assistant","content":" files using grep"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240046-uGI7ZpLlgL2mBGsQpF9x","provider":"Alibaba","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240046,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}],"system_fingerprint":null}
 
-      data: {"id":"gen-1761220149-7J9TfUlbjCYqpFghw9UA","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220149,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
-
-      data: {"id":"gen-1761220149-7J9TfUlbjCYqpFghw9UA","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220149,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":140,"completion_tokens":9,"total_tokens":149,"cost":0.0000295,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.0000196,"upstream_inference_completions_cost":0.0000099},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
+      data: {"id":"gen-1761240046-uGI7ZpLlgL2mBGsQpF9x","provider":"Alibaba","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240046,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":144,"completion_tokens":8,"total_tokens":152,"cost":0.000088,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.000072,"upstream_inference_completions_cost":0.000016},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
 
       data: [DONE]
 
@@ -45,15 +43,15 @@ interactions:
       - text/event-stream
     status: 200 OK
     code: 200
-    duration: 303.891625ms
+    duration: 1.865081292s
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 29975
+    content_length: 34431
     host: ""

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

@@ -24,19 +24,17 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"gen-1761220154-2UqtOzAtoy23ybbCDhgp","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220154,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240050-1oheeHL70ECf6kcayOT8","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240051,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220154-2UqtOzAtoy23ybbCDhgp","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220154,"choices":[{"index":0,"delta":{"role":"assistant","content":"List"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240050-1oheeHL70ECf6kcayOT8","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240051,"choices":[{"index":0,"delta":{"role":"assistant","content":"List"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220154-2UqtOzAtoy23ybbCDhgp","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220154,"choices":[{"index":0,"delta":{"role":"assistant","content":" files in current directory"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240050-1oheeHL70ECf6kcayOT8","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240051,"choices":[{"index":0,"delta":{"role":"assistant","content":" files in current directory"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220154-2UqtOzAtoy23ybbCDhgp","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220154,"choices":[{"index":0,"delta":{"role":"assistant","content":" with"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240050-1oheeHL70ECf6kcayOT8","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240051,"choices":[{"index":0,"delta":{"role":"assistant","content":" using ls"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220154-2UqtOzAtoy23ybbCDhgp","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220154,"choices":[{"index":0,"delta":{"role":"assistant","content":" ls"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240050-1oheeHL70ECf6kcayOT8","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240051,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
 
-      data: {"id":"gen-1761220154-2UqtOzAtoy23ybbCDhgp","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220154,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
-
-      data: {"id":"gen-1761220154-2UqtOzAtoy23ybbCDhgp","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220154,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":137,"completion_tokens":8,"total_tokens":145,"cost":0.00003015,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.00002055,"upstream_inference_completions_cost":0.0000096},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
+      data: {"id":"gen-1761240050-1oheeHL70ECf6kcayOT8","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240051,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":137,"completion_tokens":8,"total_tokens":145,"cost":0.00003015,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.00002055,"upstream_inference_completions_cost":0.0000096},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
 
       data: [DONE]
 
@@ -45,15 +43,15 @@ interactions:
       - text/event-stream
     status: 200 OK
     code: 200
-    duration: 452.08625ms
+    duration: 850.238458ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 29969
+    content_length: 34425
     host: ""

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

@@ -24,37 +24,37 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"gen-1761220158-JV8yYutHEaAKsY4jNUnm","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220158,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240056-6RjBxoO0JRIMocOsTJw1","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240056,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220158-JV8yYutHEaAKsY4jNUnm","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220158,"choices":[{"index":0,"delta":{"role":"assistant","content":"Use"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240056-6RjBxoO0JRIMocOsTJw1","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240056,"choices":[{"index":0,"delta":{"role":"assistant","content":"Use"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220158-JV8yYutHEaAKsY4jNUnm","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220158,"choices":[{"index":0,"delta":{"role":"assistant","content":" mult"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240056-6RjBxoO0JRIMocOsTJw1","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240056,"choices":[{"index":0,"delta":{"role":"assistant","content":" mult"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220158-JV8yYutHEaAKsY4jNUnm","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220158,"choices":[{"index":0,"delta":{"role":"assistant","content":"ied"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240056-6RjBxoO0JRIMocOsTJw1","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240056,"choices":[{"index":0,"delta":{"role":"assistant","content":"ied"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220158-JV8yYutHEaAKsY4jNUnm","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220158,"choices":[{"index":0,"delta":{"role":"assistant","content":"it"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240056-6RjBxoO0JRIMocOsTJw1","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240056,"choices":[{"index":0,"delta":{"role":"assistant","content":"it"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220158-JV8yYutHEaAKsY4jNUnm","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220158,"choices":[{"index":0,"delta":{"role":"assistant","content":" to"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240056-6RjBxoO0JRIMocOsTJw1","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240056,"choices":[{"index":0,"delta":{"role":"assistant","content":" to"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220158-JV8yYutHEaAKsY4jNUnm","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220158,"choices":[{"index":0,"delta":{"role":"assistant","content":" update"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240056-6RjBxoO0JRIMocOsTJw1","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240056,"choices":[{"index":0,"delta":{"role":"assistant","content":" update"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220158-JV8yYutHEaAKsY4jNUnm","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220158,"choices":[{"index":0,"delta":{"role":"assistant","content":" greeting"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240056-6RjBxoO0JRIMocOsTJw1","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240056,"choices":[{"index":0,"delta":{"role":"assistant","content":" greeting"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220158-JV8yYutHEaAKsY4jNUnm","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220158,"choices":[{"index":0,"delta":{"role":"assistant","content":" and"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240056-6RjBxoO0JRIMocOsTJw1","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240056,"choices":[{"index":0,"delta":{"role":"assistant","content":" and"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220158-JV8yYutHEaAKsY4jNUnm","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220158,"choices":[{"index":0,"delta":{"role":"assistant","content":" add"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240056-6RjBxoO0JRIMocOsTJw1","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240056,"choices":[{"index":0,"delta":{"role":"assistant","content":" add"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220158-JV8yYutHEaAKsY4jNUnm","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220158,"choices":[{"index":0,"delta":{"role":"assistant","content":" comment"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240056-6RjBxoO0JRIMocOsTJw1","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240056,"choices":[{"index":0,"delta":{"role":"assistant","content":" comment"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220158-JV8yYutHEaAKsY4jNUnm","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220158,"choices":[{"index":0,"delta":{"role":"assistant","content":" in"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240056-6RjBxoO0JRIMocOsTJw1","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240056,"choices":[{"index":0,"delta":{"role":"assistant","content":" in"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220158-JV8yYutHEaAKsY4jNUnm","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220158,"choices":[{"index":0,"delta":{"role":"assistant","content":" main"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240056-6RjBxoO0JRIMocOsTJw1","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240056,"choices":[{"index":0,"delta":{"role":"assistant","content":" main"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220158-JV8yYutHEaAKsY4jNUnm","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220158,"choices":[{"index":0,"delta":{"role":"assistant","content":".go"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240056-6RjBxoO0JRIMocOsTJw1","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240056,"choices":[{"index":0,"delta":{"role":"assistant","content":".go"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220158-JV8yYutHEaAKsY4jNUnm","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220158,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
+      data: {"id":"gen-1761240056-6RjBxoO0JRIMocOsTJw1","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240056,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
 
-      data: {"id":"gen-1761220158-JV8yYutHEaAKsY4jNUnm","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220158,"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},"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-1761240056-6RjBxoO0JRIMocOsTJw1","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240056,"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.0000272,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.000016,"upstream_inference_completions_cost":0.0000112},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
 
       data: [DONE]
 
@@ -63,15 +63,15 @@ interactions:
       - text/event-stream
     status: 200 OK
     code: 200
-    duration: 648.632417ms
+    duration: 1.011086584s
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 30055
+    content_length: 34511
     host: ""

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

@@ -1,196 +1,210 @@
 ---
 version: 2
 interactions:
-- id: 0
-  request:
-    proto: HTTP/1.1
-    proto_major: 1
-    proto_minor: 1
-    content_length: 843
-    host: ""
-    body: '{"messages":[{"content":"you will generate a short title based on the first message a user begins a conversation with\n\n<rules>\n- ensure it is not more than 50 characters long\n- the title should be a summary of the user''s message\n- it should be one line long\n- do not use quotes or colons\n- the entire text you return will be used as the title\n- never return anything that is more than one sentence (one line) long\n</rules>\n\n /no_think","role":"system"},{"content":"Generate a concise title for the following content:\n\nuse glob to find all .go files and use ls to list the current directory, it is very important that you run both tool calls in parallel\n <think>\n\n</think>","role":"user"}],"model":"qwen/qwen3-next-80b-a3b-instruct","max_tokens":40,"stream_options":{"include_usage":true},"usage":{"include":true},"stream":true}'
-    headers:
-      Accept:
-      - application/json
-      Content-Type:
-      - application/json
-      User-Agent:
-      - OpenAI/Go 2.7.1
-    url: https://openrouter.ai/api/v1/chat/completions
-    method: POST
-  response:
-    proto: HTTP/2.0
-    proto_major: 2
-    proto_minor: 0
-    content_length: -1
-    body: |+
-      data: {"id":"gen-1761239569-950BMmc623ypylMmxjYk","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761239569,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1761239569-950BMmc623ypylMmxjYk","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761239569,"choices":[{"index":0,"delta":{"role":"assistant","content":"Run"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1761239569-950BMmc623ypylMmxjYk","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761239569,"choices":[{"index":0,"delta":{"role":"assistant","content":" glob"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1761239569-950BMmc623ypylMmxjYk","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761239569,"choices":[{"index":0,"delta":{"role":"assistant","content":" and"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1761239569-950BMmc623ypylMmxjYk","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761239569,"choices":[{"index":0,"delta":{"role":"assistant","content":" ls"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1761239569-950BMmc623ypylMmxjYk","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761239569,"choices":[{"index":0,"delta":{"role":"assistant","content":" in"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1761239569-950BMmc623ypylMmxjYk","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761239569,"choices":[{"index":0,"delta":{"role":"assistant","content":" parallel"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1761239569-950BMmc623ypylMmxjYk","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761239569,"choices":[{"index":0,"delta":{"role":"assistant","content":" to"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1761239569-950BMmc623ypylMmxjYk","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761239569,"choices":[{"index":0,"delta":{"role":"assistant","content":" find"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1761239569-950BMmc623ypylMmxjYk","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761239569,"choices":[{"index":0,"delta":{"role":"assistant","content":" ."},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1761239569-950BMmc623ypylMmxjYk","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761239569,"choices":[{"index":0,"delta":{"role":"assistant","content":"go"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1761239569-950BMmc623ypylMmxjYk","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761239569,"choices":[{"index":0,"delta":{"role":"assistant","content":" files"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1761239569-950BMmc623ypylMmxjYk","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761239569,"choices":[{"index":0,"delta":{"role":"assistant","content":" and"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1761239569-950BMmc623ypylMmxjYk","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761239569,"choices":[{"index":0,"delta":{"role":"assistant","content":" list"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1761239569-950BMmc623ypylMmxjYk","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761239569,"choices":[{"index":0,"delta":{"role":"assistant","content":" directory"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
-
-      data: {"id":"gen-1761239569-950BMmc623ypylMmxjYk","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761239569,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
-
-      data: {"id":"gen-1761239569-950BMmc623ypylMmxjYk","provider":"Parasail","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761239569,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":156,"completion_tokens":15,"total_tokens":171,"cost":0.00003834,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.00002184,"upstream_inference_completions_cost":0.0000165},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
-
-      data: [DONE]
+  - id: 0
+    request:
+      proto: HTTP/1.1
+      proto_major: 1
+      proto_minor: 1
+      content_length: 843
+      host: ""
+      body: '{"messages":[{"content":"you will generate a short title based on the first message a user begins a conversation with\n\n<rules>\n- ensure it is not more than 50 characters long\n- the title should be a summary of the user''s message\n- it should be one line long\n- do not use quotes or colons\n- the entire text you return will be used as the title\n- never return anything that is more than one sentence (one line) long\n</rules>\n\n /no_think","role":"system"},{"content":"Generate a concise title for the following content:\n\nuse glob to find all .go files and use ls to list the current directory, it is very important that you run both tool calls in parallel\n <think>\n\n</think>","role":"user"}],"model":"qwen/qwen3-next-80b-a3b-instruct","max_tokens":40,"stream_options":{"include_usage":true},"usage":{"include":true},"stream":true}'
+      headers:
+        Accept:
+          - application/json
+        Content-Type:
+          - application/json
+        User-Agent:
+          - OpenAI/Go 2.7.1
+      url: https://openrouter.ai/api/v1/chat/completions
+      method: POST
+    response:
+      proto: HTTP/2.0
+      proto_major: 2
+      proto_minor: 0
+      content_length: -1
+      body: |+
+        data: {"id":"gen-1761240086-ELazlLg2h8fYGrCYUcbZ","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240086,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-    headers:
-      Content-Type:
-      - text/event-stream
-    status: 200 OK
-    code: 200
-    duration: 836.143666ms
-- id: 1
-  request:
-    proto: HTTP/1.1
-    proto_major: 1
-    proto_minor: 1
-    content_length: 30066
-    host: ""

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

@@ -24,15 +24,19 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"gen-1761220108-0EjD4tDrkLa0XzPbiZmz","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220108,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761239999-iOhpurfzMWJziAZfXPX0","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761239999,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220108-0EjD4tDrkLa0XzPbiZmz","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220108,"choices":[{"index":0,"delta":{"role":"assistant","content":"Read"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761239999-iOhpurfzMWJziAZfXPX0","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761239999,"choices":[{"index":0,"delta":{"role":"assistant","content":"Read"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220108-0EjD4tDrkLa0XzPbiZmz","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220108,"choices":[{"index":0,"delta":{"role":"assistant","content":" the go mod"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761239999-iOhpurfzMWJziAZfXPX0","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761239999,"choices":[{"index":0,"delta":{"role":"assistant","content":" the"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220108-0EjD4tDrkLa0XzPbiZmz","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220108,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
+      data: {"id":"gen-1761239999-iOhpurfzMWJziAZfXPX0","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761239999,"choices":[{"index":0,"delta":{"role":"assistant","content":" go"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220108-0EjD4tDrkLa0XzPbiZmz","provider":"Google","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220108,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":131,"completion_tokens":5,"total_tokens":136,"cost":0.00002565,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.00001965,"upstream_inference_completions_cost":0.000006},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
+      data: {"id":"gen-1761239999-iOhpurfzMWJziAZfXPX0","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761239999,"choices":[{"index":0,"delta":{"role":"assistant","content":" mod"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+      data: {"id":"gen-1761239999-iOhpurfzMWJziAZfXPX0","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761239999,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
+
+      data: {"id":"gen-1761239999-iOhpurfzMWJziAZfXPX0","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761239999,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":131,"completion_tokens":5,"total_tokens":136,"cost":0.0000171,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.0000131,"upstream_inference_completions_cost":0.000004},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
 
       data: [DONE]
 
@@ -41,15 +45,64 @@ interactions:
       - text/event-stream
     status: 200 OK
     code: 200
-    duration: 848.267167ms
+    duration: 812.326ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 29939
+    content_length: 34395
+    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-1761220102-lAH9RiaVfSeyDpWZLKK8","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220102,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761239997-XpZqKcTAIccM0wehg9On","provider":"GMICloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761239997,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220102-lAH9RiaVfSeyDpWZLKK8","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220102,"choices":[{"index":0,"delta":{"role":"assistant","content":"Hello"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761239997-XpZqKcTAIccM0wehg9On","provider":"GMICloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761239997,"choices":[{"index":0,"delta":{"role":"assistant","content":"Hello"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220102-lAH9RiaVfSeyDpWZLKK8","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220102,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
+      data: {"id":"gen-1761239997-XpZqKcTAIccM0wehg9On","provider":"GMICloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761239997,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
 
-      data: {"id":"gen-1761220102-lAH9RiaVfSeyDpWZLKK8","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220102,"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.0000222,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.0000192,"upstream_inference_completions_cost":0.000003},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
+      data: {"id":"gen-1761239997-XpZqKcTAIccM0wehg9On","provider":"GMICloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761239997,"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.0000222,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.0000192,"upstream_inference_completions_cost":0.000003},"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: 945.429916ms
+    duration: 1.242740542s
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 29929
+    content_length: 34385
     host: ""

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

@@ -24,21 +24,19 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"gen-1761220113-Wrx6uMbFFu3R2urMKV6Z","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220113,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240011-MretyGobJMafKIgxYhE1","provider":"GMICloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240011,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220113-Wrx6uMbFFu3R2urMKV6Z","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220113,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240011-MretyGobJMafKIgxYhE1","provider":"GMICloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240011,"choices":[{"index":0,"delta":{"role":"assistant","content":"Update"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220113-Wrx6uMbFFu3R2urMKV6Z","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220113,"choices":[{"index":0,"delta":{"role":"assistant","content":"Update"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240011-MretyGobJMafKIgxYhE1","provider":"GMICloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240011,"choices":[{"index":0,"delta":{"role":"assistant","content":" main.go to print"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220113-Wrx6uMbFFu3R2urMKV6Z","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220113,"choices":[{"index":0,"delta":{"role":"assistant","content":" main.go to print"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240011-MretyGobJMafKIgxYhE1","provider":"GMICloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240011,"choices":[{"index":0,"delta":{"role":"assistant","content":" hello"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220113-Wrx6uMbFFu3R2urMKV6Z","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220113,"choices":[{"index":0,"delta":{"role":"assistant","content":" hello"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240011-MretyGobJMafKIgxYhE1","provider":"GMICloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240011,"choices":[{"index":0,"delta":{"role":"assistant","content":" from crush"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220113-Wrx6uMbFFu3R2urMKV6Z","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220113,"choices":[{"index":0,"delta":{"role":"assistant","content":" from crush"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240011-MretyGobJMafKIgxYhE1","provider":"GMICloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240011,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
 
-      data: {"id":"gen-1761220113-Wrx6uMbFFu3R2urMKV6Z","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220113,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
-
-      data: {"id":"gen-1761220113-Wrx6uMbFFu3R2urMKV6Z","provider":"DeepInfra","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220113,"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.00002964,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.00001974,"upstream_inference_completions_cost":0.0000099},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
+      data: {"id":"gen-1761240011-MretyGobJMafKIgxYhE1","provider":"GMICloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240011,"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.00003465,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.00002115,"upstream_inference_completions_cost":0.0000135},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
 
       data: [DONE]
 
@@ -47,15 +45,15 @@ interactions:
       - text/event-stream
     status: 200 OK
     code: 200
-    duration: 624.237417ms
+    duration: 844.887417ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 29995
+    content_length: 34451
     host: ""

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

@@ -24,27 +24,25 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"gen-1761220182-Ly7xf4NcMn3U6zGvTjEY","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220182,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240079-7CZ6wA5XHiUJfGUfEKpD","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240079,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220182-Ly7xf4NcMn3U6zGvTjEY","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220182,"choices":[{"index":0,"delta":{"role":"assistant","content":"Create"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240079-7CZ6wA5XHiUJfGUfEKpD","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240079,"choices":[{"index":0,"delta":{"role":"assistant","content":"Create"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220182-Ly7xf4NcMn3U6zGvTjEY","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220182,"choices":[{"index":0,"delta":{"role":"assistant","content":" config"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240079-7CZ6wA5XHiUJfGUfEKpD","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240079,"choices":[{"index":0,"delta":{"role":"assistant","content":" config"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220182-Ly7xf4NcMn3U6zGvTjEY","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220182,"choices":[{"index":0,"delta":{"role":"assistant","content":".json"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240079-7CZ6wA5XHiUJfGUfEKpD","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240079,"choices":[{"index":0,"delta":{"role":"assistant","content":".json"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220182-Ly7xf4NcMn3U6zGvTjEY","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220182,"choices":[{"index":0,"delta":{"role":"assistant","content":" with"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240079-7CZ6wA5XHiUJfGUfEKpD","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240079,"choices":[{"index":0,"delta":{"role":"assistant","content":" with"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220182-Ly7xf4NcMn3U6zGvTjEY","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220182,"choices":[{"index":0,"delta":{"role":"assistant","content":" name"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240079-7CZ6wA5XHiUJfGUfEKpD","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240079,"choices":[{"index":0,"delta":{"role":"assistant","content":" sample"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220182-Ly7xf4NcMn3U6zGvTjEY","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220182,"choices":[{"index":0,"delta":{"role":"assistant","content":" and"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240079-7CZ6wA5XHiUJfGUfEKpD","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240079,"choices":[{"index":0,"delta":{"role":"assistant","content":" JSON"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220182-Ly7xf4NcMn3U6zGvTjEY","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220182,"choices":[{"index":0,"delta":{"role":"assistant","content":" version"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240079-7CZ6wA5XHiUJfGUfEKpD","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240079,"choices":[{"index":0,"delta":{"role":"assistant","content":" content"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
 
-      data: {"id":"gen-1761220182-Ly7xf4NcMn3U6zGvTjEY","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220182,"choices":[{"index":0,"delta":{"role":"assistant","content":" data"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+      data: {"id":"gen-1761240079-7CZ6wA5XHiUJfGUfEKpD","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240079,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
 
-      data: {"id":"gen-1761220182-Ly7xf4NcMn3U6zGvTjEY","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220182,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
-
-      data: {"id":"gen-1761220182-Ly7xf4NcMn3U6zGvTjEY","provider":"Chutes","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761220182,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":155,"completion_tokens":9,"total_tokens":164,"cost":0.0000227,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.0000155,"upstream_inference_completions_cost":0.0000072},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
+      data: {"id":"gen-1761240079-7CZ6wA5XHiUJfGUfEKpD","provider":"AtlasCloud","model":"qwen/qwen3-next-80b-a3b-instruct","object":"chat.completion.chunk","created":1761240079,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":155,"completion_tokens":8,"total_tokens":163,"cost":0.00003525,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.00002325,"upstream_inference_completions_cost":0.000012},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
 
       data: [DONE]
 
@@ -53,15 +51,15 @@ interactions:
       - text/event-stream
     status: 200 OK
     code: 200
-    duration: 727.070833ms
+    duration: 820.862541ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 30032
+    content_length: 34488
     host: ""

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

@@ -24,19 +24,21 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"20251023193928989e697aa43b43f3","created":1761219568,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"\n"}}]}
+      data: {"id":"2025102401223263aa65cb22804bd6","created":1761240152,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"\n"}}]}
 
-      data: {"id":"20251023193928989e697aa43b43f3","created":1761219568,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Create"}}]}
+      data: {"id":"2025102401223263aa65cb22804bd6","created":1761240152,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"B"}}]}
 
-      data: {"id":"20251023193928989e697aa43b43f3","created":1761219568,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" file"}}]}
+      data: {"id":"2025102401223263aa65cb22804bd6","created":1761240152,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"ash"}}]}
 
-      data: {"id":"20251023193928989e697aa43b43f3","created":1761219568,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" with"}}]}
+      data: {"id":"2025102401223263aa65cb22804bd6","created":1761240152,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" file"}}]}
 
-      data: {"id":"20251023193928989e697aa43b43f3","created":1761219568,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" bash"}}]}
+      data: {"id":"2025102401223263aa65cb22804bd6","created":1761240152,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" creation"}}]}
 
-      data: {"id":"20251023193928989e697aa43b43f3","created":1761219568,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" command"}}]}
+      data: {"id":"2025102401223263aa65cb22804bd6","created":1761240152,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" with"}}]}
 
-      data: {"id":"20251023193928989e697aa43b43f3","created":1761219568,"model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":134,"completion_tokens":9,"total_tokens":143,"prompt_tokens_details":{"cached_tokens":4}}}
+      data: {"id":"2025102401223263aa65cb22804bd6","created":1761240152,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" content"}}]}
+
+      data: {"id":"2025102401223263aa65cb22804bd6","created":1761240152,"model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":134,"completion_tokens":10,"total_tokens":144,"prompt_tokens_details":{"cached_tokens":4}}}
 
       data: [DONE]
 
@@ -45,15 +47,15 @@ interactions:
       - text/event-stream;charset=UTF-8
     status: 200 OK
     code: 200
-    duration: 768.768125ms
+    duration: 626.4255ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 29865
+    content_length: 34321
     host: ""

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

@@ -6,9 +6,9 @@ interactions:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 742
+    content_length: 778
     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\ndownload the file from https://httpbin.org/robots.txt and save it as robots.txt\n <think>\n\n</think>","role":"user"}],"model":"glm-4.5-air","max_tokens":40,"stream_options":{"include_usage":true},"stream":true}'
+    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\ndownload the file from https://example-files.online-convert.com/document/txt/example.txt and save it as example.txt\n <think>\n\n</think>","role":"user"}],"model":"glm-4.5-air","max_tokens":40,"stream_options":{"include_usage":true},"stream":true}'
     headers:
       Accept:
       - application/json
@@ -24,19 +24,23 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"202510231939326760746d63e9485b","created":1761219572,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"\n"}}]}
+      data: {"id":"2025102401223510863719da334087","created":1761240155,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"\n"}}]}
 
-      data: {"id":"202510231939326760746d63e9485b","created":1761219572,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Download"}}]}
+      data: {"id":"2025102401223510863719da334087","created":1761240155,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Download"}}]}
 
-      data: {"id":"202510231939326760746d63e9485b","created":1761219572,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" robots"}}]}
+      data: {"id":"2025102401223510863719da334087","created":1761240155,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" file"}}]}
 
-      data: {"id":"202510231939326760746d63e9485b","created":1761219572,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":".txt"}}]}
+      data: {"id":"2025102401223510863719da334087","created":1761240155,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" and"}}]}
 
-      data: {"id":"202510231939326760746d63e9485b","created":1761219572,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" from"}}]}
+      data: {"id":"2025102401223510863719da334087","created":1761240155,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" save"}}]}
 
-      data: {"id":"202510231939326760746d63e9485b","created":1761219572,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" httpbin"}}]}
+      data: {"id":"2025102401223510863719da334087","created":1761240155,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" as"}}]}
 
-      data: {"id":"202510231939326760746d63e9485b","created":1761219572,"model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":138,"completion_tokens":10,"total_tokens":148,"prompt_tokens_details":{"cached_tokens":4}}}
+      data: {"id":"2025102401223510863719da334087","created":1761240155,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" example"}}]}
+
+      data: {"id":"2025102401223510863719da334087","created":1761240155,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":".txt"}}]}
+
+      data: {"id":"2025102401223510863719da334087","created":1761240155,"model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":143,"completion_tokens":11,"total_tokens":154,"prompt_tokens_details":{"cached_tokens":114}}}
 
       data: [DONE]
 
@@ -45,15 +49,15 @@ interactions:
       - text/event-stream;charset=UTF-8
     status: 200 OK
     code: 200
-    duration: 682.744584ms
+    duration: 788.240417ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 29882
+    content_length: 34374
     host: ""

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

@@ -6,9 +6,9 @@ interactions:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 755
+    content_length: 799
     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\nfetch the content from https://httpbin.org/html and tell me if it contains the word ''Herman''\n <think>\n\n</think>","role":"user"}],"model":"glm-4.5-air","max_tokens":40,"stream_options":{"include_usage":true},"stream":true}'
+    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\nfetch the content from https://example-files.online-convert.com/website/html/example.html and tell me if it contains the word ''John Doe''\n <think>\n\n</think>","role":"user"}],"model":"glm-4.5-air","max_tokens":40,"stream_options":{"include_usage":true},"stream":true}'
     headers:
       Accept:
       - application/json
@@ -24,21 +24,19 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"2025102319394066ba228bfd9c43af","created":1761219580,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"\n"}}]}
+      data: {"id":"2025102401223883fdd1f1ac494e18","created":1761240158,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"\n"}}]}
 
-      data: {"id":"2025102319394066ba228bfd9c43af","created":1761219580,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Check"}}]}
+      data: {"id":"2025102401223883fdd1f1ac494e18","created":1761240158,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Check"}}]}
 
-      data: {"id":"2025102319394066ba228bfd9c43af","created":1761219580,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" HTTP"}}]}
+      data: {"id":"2025102401223883fdd1f1ac494e18","created":1761240158,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" HTML"}}]}
 
-      data: {"id":"2025102319394066ba228bfd9c43af","created":1761219580,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"bin"}}]}
+      data: {"id":"2025102401223883fdd1f1ac494e18","created":1761240158,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" for"}}]}
 
-      data: {"id":"2025102319394066ba228bfd9c43af","created":1761219580,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" HTML"}}]}
+      data: {"id":"2025102401223883fdd1f1ac494e18","created":1761240158,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" John"}}]}
 
-      data: {"id":"2025102319394066ba228bfd9c43af","created":1761219580,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" for"}}]}
+      data: {"id":"2025102401223883fdd1f1ac494e18","created":1761240158,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" Doe"}}]}
 
-      data: {"id":"2025102319394066ba228bfd9c43af","created":1761219580,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" Herman"}}]}
-
-      data: {"id":"2025102319394066ba228bfd9c43af","created":1761219580,"model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":141,"completion_tokens":10,"total_tokens":151,"prompt_tokens_details":{"cached_tokens":22}}}
+      data: {"id":"2025102401223883fdd1f1ac494e18","created":1761240158,"model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":148,"completion_tokens":9,"total_tokens":157,"prompt_tokens_details":{"cached_tokens":4}}}
 
       data: [DONE]
 
@@ -47,15 +45,15 @@ interactions:
       - text/event-stream;charset=UTF-8
     status: 200 OK
     code: 200
-    duration: 578.547166ms
+    duration: 615.636ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 29892
+    content_length: 34392
     host: ""

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

@@ -24,19 +24,19 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"2025102319395305add6eb6e7d4d37","created":1761219593,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"\n"}}]}
+      data: {"id":"20251024012241cf81924e04234715","created":1761240161,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"\n"}}]}
 
-      data: {"id":"2025102319395305add6eb6e7d4d37","created":1761219593,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"find"}}]}
+      data: {"id":"20251024012241cf81924e04234715","created":1761240161,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Find"}}]}
 
-      data: {"id":"2025102319395305add6eb6e7d4d37","created":1761219593,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" go"}}]}
+      data: {"id":"20251024012241cf81924e04234715","created":1761240161,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" Go"}}]}
 
-      data: {"id":"2025102319395305add6eb6e7d4d37","created":1761219593,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" files"}}]}
+      data: {"id":"20251024012241cf81924e04234715","created":1761240161,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" files"}}]}
 
-      data: {"id":"2025102319395305add6eb6e7d4d37","created":1761219593,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" with"}}]}
+      data: {"id":"20251024012241cf81924e04234715","created":1761240161,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" with"}}]}
 
-      data: {"id":"2025102319395305add6eb6e7d4d37","created":1761219593,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" glob"}}]}
+      data: {"id":"20251024012241cf81924e04234715","created":1761240161,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" glob"}}]}
 
-      data: {"id":"2025102319395305add6eb6e7d4d37","created":1761219593,"model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":132,"completion_tokens":9,"total_tokens":141,"prompt_tokens_details":{"cached_tokens":115}}}
+      data: {"id":"20251024012241cf81924e04234715","created":1761240161,"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: [DONE]
 
@@ -45,15 +45,15 @@ interactions:
       - text/event-stream;charset=UTF-8
     status: 200 OK
     code: 200
-    duration: 689.137625ms
+    duration: 1.163742791s
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 29854
+    content_length: 34310
     host: ""

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

@@ -24,19 +24,19 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"20251023193956ce4c3c79c7f3486a","created":1761219596,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"\n"}}]}
+      data: {"id":"202510240122450b90ffd43d574d3b","created":1761240165,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"\n"}}]}
 
-      data: {"id":"20251023193956ce4c3c79c7f3486a","created":1761219596,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"grep"}}]}
+      data: {"id":"202510240122450b90ffd43d574d3b","created":1761240165,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"grep"}}]}
 
-      data: {"id":"20251023193956ce4c3c79c7f3486a","created":1761219596,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" package"}}]}
+      data: {"id":"202510240122450b90ffd43d574d3b","created":1761240165,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" package"}}]}
 
-      data: {"id":"20251023193956ce4c3c79c7f3486a","created":1761219596,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" in"}}]}
+      data: {"id":"202510240122450b90ffd43d574d3b","created":1761240165,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" in"}}]}
 
-      data: {"id":"20251023193956ce4c3c79c7f3486a","created":1761219596,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" go"}}]}
+      data: {"id":"202510240122450b90ffd43d574d3b","created":1761240165,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" go"}}]}
 
-      data: {"id":"20251023193956ce4c3c79c7f3486a","created":1761219596,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" files"}}]}
+      data: {"id":"202510240122450b90ffd43d574d3b","created":1761240165,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" files"}}]}
 
-      data: {"id":"20251023193956ce4c3c79c7f3486a","created":1761219596,"model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":133,"completion_tokens":9,"total_tokens":142,"prompt_tokens_details":{"cached_tokens":115}}}
+      data: {"id":"202510240122450b90ffd43d574d3b","created":1761240165,"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]
 
@@ -45,15 +45,15 @@ interactions:
       - text/event-stream;charset=UTF-8
     status: 200 OK
     code: 200
-    duration: 723.143ms
+    duration: 582.762958ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 29852
+    content_length: 34308
     host: ""

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

@@ -24,25 +24,21 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"20251023194014e0f785fdff054e61","created":1761219614,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"\n"}}]}
+      data: {"id":"202510240123034c884401f7c24d10","created":1761240183,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"\n"}}]}
 
-      data: {"id":"20251023194014e0f785fdff054e61","created":1761219614,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Mult"}}]}
+      data: {"id":"202510240123034c884401f7c24d10","created":1761240183,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Mult"}}]}
 
-      data: {"id":"20251023194014e0f785fdff054e61","created":1761219614,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"ied"}}]}
+      data: {"id":"202510240123034c884401f7c24d10","created":1761240183,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"ied"}}]}
 
-      data: {"id":"20251023194014e0f785fdff054e61","created":1761219614,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"it"}}]}
+      data: {"id":"202510240123034c884401f7c24d10","created":1761240183,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"it"}}]}
 
-      data: {"id":"20251023194014e0f785fdff054e61","created":1761219614,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" main"}}]}
+      data: {"id":"202510240123034c884401f7c24d10","created":1761240183,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" Go"}}]}
 
-      data: {"id":"20251023194014e0f785fdff054e61","created":1761219614,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":".go"}}]}
+      data: {"id":"202510240123034c884401f7c24d10","created":1761240183,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" File"}}]}
 
-      data: {"id":"20251023194014e0f785fdff054e61","created":1761219614,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" changes"}}]}
+      data: {"id":"202510240123034c884401f7c24d10","created":1761240183,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" Modification"}}]}
 
-      data: {"id":"20251023194014e0f785fdff054e61","created":1761219614,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" and"}}]}
-
-      data: {"id":"20251023194014e0f785fdff054e61","created":1761219614,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" comment"}}]}
-
-      data: {"id":"20251023194014e0f785fdff054e61","created":1761219614,"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":4}}}
+      data: {"id":"202510240123034c884401f7c24d10","created":1761240183,"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":22}}}
 
       data: [DONE]
 
@@ -51,15 +47,15 @@ interactions:
       - text/event-stream;charset=UTF-8
     status: 200 OK
     code: 200
-    duration: 649.245958ms
+    duration: 746.32975ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 29932
+    content_length: 34388
     host: ""

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

@@ -24,19 +24,19 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"20251023194135c14587f136ec4360","created":1761219695,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"\n"}}]}
+      data: {"id":"20251024012527da72030046ab4ad7","created":1761240327,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"\n"}}]}
 
-      data: {"id":"20251023194135c14587f136ec4360","created":1761219695,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Parallel"}}]}
+      data: {"id":"20251024012527da72030046ab4ad7","created":1761240327,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Parallel"}}]}
 
-      data: {"id":"20251023194135c14587f136ec4360","created":1761219695,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" glob"}}]}
+      data: {"id":"20251024012527da72030046ab4ad7","created":1761240327,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" glob"}}]}
 
-      data: {"id":"20251023194135c14587f136ec4360","created":1761219695,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" and"}}]}
+      data: {"id":"20251024012527da72030046ab4ad7","created":1761240327,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" and"}}]}
 
-      data: {"id":"20251023194135c14587f136ec4360","created":1761219695,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" ls"}}]}
+      data: {"id":"20251024012527da72030046ab4ad7","created":1761240327,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" ls"}}]}
 
-      data: {"id":"20251023194135c14587f136ec4360","created":1761219695,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" commands"}}]}
+      data: {"id":"20251024012527da72030046ab4ad7","created":1761240327,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" commands"}}]}
 
-      data: {"id":"20251023194135c14587f136ec4360","created":1761219695,"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":4}}}
+      data: {"id":"20251024012527da72030046ab4ad7","created":1761240327,"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":115}}}
 
       data: [DONE]
 
@@ -45,15 +45,15 @@ interactions:
       - text/event-stream;charset=UTF-8
     status: 200 OK
     code: 200
-    duration: 665.002375ms
+    duration: 634.643125ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 29943
+    content_length: 34399
     host: ""

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

@@ -24,17 +24,17 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"20251023193849468143b4e0e84c88","created":1761219529,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"\n"}}]}
+      data: {"id":"20251024012139b6e2cdff09464a91","created":1761240099,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"\n"}}]}
 
-      data: {"id":"20251023193849468143b4e0e84c88","created":1761219529,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Generate"}}]}
+      data: {"id":"20251024012139b6e2cdff09464a91","created":1761240099,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Read"}}]}
 
-      data: {"id":"20251023193849468143b4e0e84c88","created":1761219529,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" go"}}]}
+      data: {"id":"20251024012139b6e2cdff09464a91","created":1761240099,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" the"}}]}
 
-      data: {"id":"20251023193849468143b4e0e84c88","created":1761219529,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" mod"}}]}
+      data: {"id":"20251024012139b6e2cdff09464a91","created":1761240099,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" go"}}]}
 
-      data: {"id":"20251023193849468143b4e0e84c88","created":1761219529,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" title"}}]}
+      data: {"id":"20251024012139b6e2cdff09464a91","created":1761240099,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" mod"}}]}
 
-      data: {"id":"20251023193849468143b4e0e84c88","created":1761219529,"model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":124,"completion_tokens":8,"total_tokens":132,"prompt_tokens_details":{"cached_tokens":114}}}
+      data: {"id":"20251024012139b6e2cdff09464a91","created":1761240099,"model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":124,"completion_tokens":8,"total_tokens":132,"prompt_tokens_details":{"cached_tokens":114}}}
 
       data: [DONE]
 
@@ -43,15 +43,15 @@ interactions:
       - text/event-stream;charset=UTF-8
     status: 200 OK
     code: 200
-    duration: 675.93825ms
+    duration: 924.615667ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 29816
+    content_length: 34272
     host: ""

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

@@ -24,13 +24,11 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"202510231938484421ad8fc46b4cb0","created":1761219528,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"\n"}}]}
+      data: {"id":"20251024012136fd62b604d7734117","created":1761240096,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"\n"}}]}
 
-      data: {"id":"202510231938484421ad8fc46b4cb0","created":1761219528,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"G"}}]}
+      data: {"id":"20251024012136fd62b604d7734117","created":1761240096,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Hello"}}]}
 
-      data: {"id":"202510231938484421ad8fc46b4cb0","created":1761219528,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"reeting"}}]}
-
-      data: {"id":"202510231938484421ad8fc46b4cb0","created":1761219528,"model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":121,"completion_tokens":6,"total_tokens":127,"prompt_tokens_details":{"cached_tokens":4}}}
+      data: {"id":"20251024012136fd62b604d7734117","created":1761240096,"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]
 
@@ -39,15 +37,15 @@ interactions:
       - text/event-stream;charset=UTF-8
     status: 200 OK
     code: 200
-    duration: 2.322141542s
+    duration: 2.257451833s
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 29806
+    content_length: 34262
     host: ""

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

@@ -24,21 +24,21 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"20251023194059e016e8f5a39b4ef7","created":1761219659,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"\n"}}]}
+      data: {"id":"20251024012454f0f843bd6f4f495f","created":1761240295,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"\n"}}]}
 
-      data: {"id":"20251023194059e016e8f5a39b4ef7","created":1761219659,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Searching"}}]}
+      data: {"id":"20251024012454f0f843bd6f4f495f","created":1761240295,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Search"}}]}
 
-      data: {"id":"20251023194059e016e8f5a39b4ef7","created":1761219659,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" func"}}]}
+      data: {"id":"20251024012454f0f843bd6f4f495f","created":1761240295,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" Go"}}]}
 
-      data: {"id":"20251023194059e016e8f5a39b4ef7","created":1761219659,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" main"}}]}
+      data: {"id":"20251024012454f0f843bd6f4f495f","created":1761240295,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" repos"}}]}
 
-      data: {"id":"20251023194059e016e8f5a39b4ef7","created":1761219659,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" in"}}]}
+      data: {"id":"20251024012454f0f843bd6f4f495f","created":1761240295,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" with"}}]}
 
-      data: {"id":"20251023194059e016e8f5a39b4ef7","created":1761219659,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" Go"}}]}
+      data: {"id":"20251024012454f0f843bd6f4f495f","created":1761240295,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" Source"}}]}
 
-      data: {"id":"20251023194059e016e8f5a39b4ef7","created":1761219659,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" repos"}}]}
+      data: {"id":"20251024012454f0f843bd6f4f495f","created":1761240295,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"graph"}}]}
 
-      data: {"id":"20251023194059e016e8f5a39b4ef7","created":1761219659,"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":"20251024012454f0f843bd6f4f495f","created":1761240295,"model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":133,"completion_tokens":10,"total_tokens":143,"prompt_tokens_details":{"cached_tokens":115}}}
 
       data: [DONE]
 
@@ -47,15 +47,15 @@ interactions:
       - text/event-stream;charset=UTF-8
     status: 200 OK
     code: 200
-    duration: 793.145875ms
+    duration: 2.291818542s
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 29866
+    content_length: 34322
     host: ""

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

@@ -24,25 +24,25 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"202510231939058b57f425be984446","created":1761219545,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"\n"}}]}
+      data: {"id":"202510240121529a9f99ce249148a8","created":1761240112,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"\n"}}]}
 
-      data: {"id":"202510231939058b57f425be984446","created":1761219545,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Update"}}]}
+      data: {"id":"202510240121529a9f99ce249148a8","created":1761240112,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Update"}}]}
 
-      data: {"id":"202510231939058b57f425be984446","created":1761219545,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" main"}}]}
+      data: {"id":"202510240121529a9f99ce249148a8","created":1761240112,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" main"}}]}
 
-      data: {"id":"202510231939058b57f425be984446","created":1761219545,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":".go"}}]}
+      data: {"id":"202510240121529a9f99ce249148a8","created":1761240112,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":".go"}}]}
 
-      data: {"id":"202510231939058b57f425be984446","created":1761219545,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" to"}}]}
+      data: {"id":"202510240121529a9f99ce249148a8","created":1761240112,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" to"}}]}
 
-      data: {"id":"202510231939058b57f425be984446","created":1761219545,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" print"}}]}
+      data: {"id":"202510240121529a9f99ce249148a8","created":1761240112,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" print"}}]}
 
-      data: {"id":"202510231939058b57f425be984446","created":1761219545,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" hello"}}]}
+      data: {"id":"202510240121529a9f99ce249148a8","created":1761240112,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" hello"}}]}
 
-      data: {"id":"202510231939058b57f425be984446","created":1761219545,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" from"}}]}
+      data: {"id":"202510240121529a9f99ce249148a8","created":1761240112,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" from"}}]}
 
-      data: {"id":"202510231939058b57f425be984446","created":1761219545,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" crush"}}]}
+      data: {"id":"202510240121529a9f99ce249148a8","created":1761240112,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" crush"}}]}
 
-      data: {"id":"202510231939058b57f425be984446","created":1761219545,"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":"202510240121529a9f99ce249148a8","created":1761240112,"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":4}}}
 
       data: [DONE]
 
@@ -51,15 +51,15 @@ interactions:
       - text/event-stream;charset=UTF-8
     status: 200 OK
     code: 200
-    duration: 718.895166ms
+    duration: 764.360375ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 29872
+    content_length: 34328
     host: ""

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

@@ -24,19 +24,21 @@ interactions:
     proto_minor: 0
     content_length: -1
     body: |+
-      data: {"id":"20251023194113d40a4c5e5db04669","created":1761219673,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"\n"}}]}
+      data: {"id":"2025102401252319ad46c19328425d","created":1761240323,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"\n"}}]}
 
-      data: {"id":"20251023194113d40a4c5e5db04669","created":1761219673,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Create"}}]}
+      data: {"id":"2025102401252319ad46c19328425d","created":1761240323,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":"Create"}}]}
 
-      data: {"id":"20251023194113d40a4c5e5db04669","created":1761219673,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" config"}}]}
+      data: {"id":"2025102401252319ad46c19328425d","created":1761240323,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" config"}}]}
 
-      data: {"id":"20251023194113d40a4c5e5db04669","created":1761219673,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":".json"}}]}
+      data: {"id":"2025102401252319ad46c19328425d","created":1761240323,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":".json"}}]}
 
-      data: {"id":"20251023194113d40a4c5e5db04669","created":1761219673,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" with"}}]}
+      data: {"id":"2025102401252319ad46c19328425d","created":1761240323,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" with"}}]}
 
-      data: {"id":"20251023194113d40a4c5e5db04669","created":1761219673,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" content"}}]}
+      data: {"id":"2025102401252319ad46c19328425d","created":1761240323,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" write"}}]}
 
-      data: {"id":"20251023194113d40a4c5e5db04669","created":1761219673,"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: {"id":"2025102401252319ad46c19328425d","created":1761240323,"model":"glm-4.5-air","choices":[{"index":0,"delta":{"role":"assistant","content":" command"}}]}
+
+      data: {"id":"2025102401252319ad46c19328425d","created":1761240323,"model":"glm-4.5-air","choices":[{"index":0,"finish_reason":"stop","delta":{"role":"assistant","content":""}}],"usage":{"prompt_tokens":148,"completion_tokens":10,"total_tokens":158,"prompt_tokens_details":{"cached_tokens":115}}}
 
       data: [DONE]
 
@@ -45,15 +47,15 @@ interactions:
       - text/event-stream;charset=UTF-8
     status: 200 OK
     code: 200
-    duration: 561.734458ms
+    duration: 734.825542ms
 - id: 1
   request:
     proto: HTTP/1.1
     proto_major: 1
     proto_minor: 1
-    content_length: 29909
+    content_length: 34365
     host: ""