diff --git a/providertests/anthropic_test.go b/providertests/anthropic_test.go new file mode 100644 index 0000000000000000000000000000000000000000..d238076831612c020f9283e8f388b2e27a93dd43 --- /dev/null +++ b/providertests/anthropic_test.go @@ -0,0 +1,25 @@ +package providertests + +import ( + "net/http" + "os" + "testing" + + "github.com/charmbracelet/fantasy/ai" + "github.com/charmbracelet/fantasy/anthropic" + "gopkg.in/dnaeon/go-vcr.v4/pkg/recorder" +) + +func TestAnthropicCommon(t *testing.T) { + testCommon(t, []builderPair{ + {"claude-sonnet-4", builderAnthropicClaudeSonnet4, nil}, + }) +} + +func builderAnthropicClaudeSonnet4(r *recorder.Recorder) (ai.LanguageModel, error) { + provider := anthropic.New( + anthropic.WithAPIKey(os.Getenv("ANTHROPIC_API_KEY")), + anthropic.WithHTTPClient(&http.Client{Transport: r}), + ) + return provider.LanguageModel("claude-sonnet-4-20250514") +} diff --git a/providertests/builders_test.go b/providertests/builders_test.go deleted file mode 100644 index 1460fd4f27335451ed4ebc21abaa3a7b45e3cb58..0000000000000000000000000000000000000000 --- a/providertests/builders_test.go +++ /dev/null @@ -1,101 +0,0 @@ -package providertests - -import ( - "cmp" - "net/http" - "os" - - "github.com/charmbracelet/fantasy/ai" - "github.com/charmbracelet/fantasy/anthropic" - "github.com/charmbracelet/fantasy/google" - "github.com/charmbracelet/fantasy/openai" - "github.com/charmbracelet/fantasy/openrouter" - "gopkg.in/dnaeon/go-vcr.v4/pkg/recorder" -) - -type builderFunc func(r *recorder.Recorder) (ai.LanguageModel, error) - -type builderPair struct { - name string - builder builderFunc -} - -var languageModelBuilders = []builderPair{ - {"openai-gpt-4o", builderOpenaiGpt4o}, - {"openai-gpt-4o-mini", builderOpenaiGpt4oMini}, - {"anthropic-claude-sonnet", builderAnthropicClaudeSonnet4}, - {"google-gemini-2.5-flash", builderGoogleGemini25Flash}, - {"google-gemini-2.5-pro", builderGoogleGemini25Pro}, - {"openrouter-kimi-k2", builderOpenrouterKimiK2}, -} - -var thinkingLanguageModelBuilders = []builderPair{ - {"openai-gpt-5", builderOpenaiGpt5}, - {"anthropic-claude-sonnet", builderAnthropicClaudeSonnet4}, - {"google-gemini-2.5-pro", builderGoogleGemini25Pro}, - {"openrouter-glm-4.5", builderOpenrouterGLM45}, -} - -func builderOpenaiGpt4o(r *recorder.Recorder) (ai.LanguageModel, error) { - provider := openai.New( - openai.WithAPIKey(os.Getenv("OPENAI_API_KEY")), - openai.WithHTTPClient(&http.Client{Transport: r}), - ) - return provider.LanguageModel("gpt-4o") -} - -func builderOpenaiGpt4oMini(r *recorder.Recorder) (ai.LanguageModel, error) { - provider := openai.New( - openai.WithAPIKey(os.Getenv("OPENAI_API_KEY")), - openai.WithHTTPClient(&http.Client{Transport: r}), - ) - return provider.LanguageModel("gpt-4o-mini") -} - -func builderOpenaiGpt5(r *recorder.Recorder) (ai.LanguageModel, error) { - provider := openai.New( - openai.WithAPIKey(os.Getenv("OPENAI_API_KEY")), - openai.WithHTTPClient(&http.Client{Transport: r}), - ) - return provider.LanguageModel("gpt-5") -} - -func builderAnthropicClaudeSonnet4(r *recorder.Recorder) (ai.LanguageModel, error) { - provider := anthropic.New( - anthropic.WithAPIKey(os.Getenv("ANTHROPIC_API_KEY")), - anthropic.WithHTTPClient(&http.Client{Transport: r}), - ) - return provider.LanguageModel("claude-sonnet-4-20250514") -} - -func builderGoogleGemini25Flash(r *recorder.Recorder) (ai.LanguageModel, error) { - provider := google.New( - google.WithAPIKey(cmp.Or(os.Getenv("GEMINI_API_KEY"), "(missing)")), - google.WithHTTPClient(&http.Client{Transport: r}), - ) - return provider.LanguageModel("gemini-2.5-flash") -} - -func builderGoogleGemini25Pro(r *recorder.Recorder) (ai.LanguageModel, error) { - provider := google.New( - google.WithAPIKey(cmp.Or(os.Getenv("GEMINI_API_KEY"), "(missing)")), - google.WithHTTPClient(&http.Client{Transport: r}), - ) - return provider.LanguageModel("gemini-2.5-pro") -} - -func builderOpenrouterKimiK2(r *recorder.Recorder) (ai.LanguageModel, error) { - provider := openrouter.New( - openrouter.WithAPIKey(os.Getenv("OPENROUTER_API_KEY")), - openrouter.WithHTTPClient(&http.Client{Transport: r}), - ) - return provider.LanguageModel("moonshotai/kimi-k2-0905") -} - -func builderOpenrouterGLM45(r *recorder.Recorder) (ai.LanguageModel, error) { - provider := openrouter.New( - openrouter.WithAPIKey(os.Getenv("OPENROUTER_API_KEY")), - openrouter.WithHTTPClient(&http.Client{Transport: r}), - ) - return provider.LanguageModel("z-ai/glm-4.5") -} diff --git a/providertests/common_test.go b/providertests/common_test.go new file mode 100644 index 0000000000000000000000000000000000000000..b517dcf5b442f8c64da57d526a0a4283caae3e60 --- /dev/null +++ b/providertests/common_test.go @@ -0,0 +1,226 @@ +package providertests + +import ( + "context" + "strconv" + "strings" + "testing" + + "github.com/charmbracelet/fantasy/ai" + "github.com/stretchr/testify/require" + "gopkg.in/dnaeon/go-vcr.v4/pkg/recorder" +) + +type builderFunc func(r *recorder.Recorder) (ai.LanguageModel, error) + +type builderPair struct { + name string + builder builderFunc + providerOptions ai.ProviderOptions +} + +func testCommon(t *testing.T, pairs []builderPair) { + for _, pair := range pairs { + testSimple(t, pair) + } +} + +func testSimple(t *testing.T, pair builderPair) { + checkResult := func(t *testing.T, result *ai.AgentResult) { + option1 := "Oi" + option2 := "Olá" + got := result.Response.Content.Text() + require.True(t, strings.Contains(got, option1) || strings.Contains(got, option2), "unexpected response: got %q, want %q or %q", got, option1, option2) + } + + t.Run("simple "+pair.name, func(t *testing.T) { + r := newRecorder(t) + + languageModel, err := pair.builder(r) + require.NoError(t, err, "failed to build language model") + + agent := ai.NewAgent( + languageModel, + ai.WithSystemPrompt("You are a helpful assistant"), + ) + result, err := agent.Generate(t.Context(), ai.AgentCall{ + Prompt: "Say hi in Portuguese", + ProviderOptions: pair.providerOptions, + MaxOutputTokens: ai.IntOption(4000), + }) + require.NoError(t, err, "failed to generate") + checkResult(t, result) + }) + t.Run("simple streaming "+pair.name, func(t *testing.T) { + r := newRecorder(t) + + languageModel, err := pair.builder(r) + require.NoError(t, err, "failed to build language model") + + agent := ai.NewAgent( + languageModel, + ai.WithSystemPrompt("You are a helpful assistant"), + ) + result, err := agent.Stream(t.Context(), ai.AgentStreamCall{ + Prompt: "Say hi in Portuguese", + ProviderOptions: pair.providerOptions, + MaxOutputTokens: ai.IntOption(4000), + }) + require.NoError(t, err, "failed to generate") + checkResult(t, result) + }) +} + +func testTool(t *testing.T, pair builderPair) { + type WeatherInput struct { + Location string `json:"location" description:"the city"` + } + + weatherTool := ai.NewAgentTool( + "weather", + "Get weather information for a location", + func(ctx context.Context, input WeatherInput, _ ai.ToolCall) (ai.ToolResponse, error) { + return ai.NewTextResponse("40 C"), nil + }, + ) + checkResult := func(t *testing.T, result *ai.AgentResult) { + require.Len(t, result.Steps, 2) + + var toolCalls []ai.ToolCallContent + for _, content := range result.Steps[0].Content { + if content.GetType() == ai.ContentTypeToolCall { + toolCalls = append(toolCalls, content.(ai.ToolCallContent)) + } + } + require.Len(t, toolCalls, 1) + require.Equal(t, toolCalls[0].ToolName, "weather") + + want1 := "Florence" + want2 := "40" + got := result.Response.Content.Text() + require.True(t, strings.Contains(got, want1) && strings.Contains(got, want2), "unexpected response: got %q, want %q %q", got, want1, want2) + } + + t.Run("tool "+pair.name, func(t *testing.T) { + r := newRecorder(t) + + languageModel, err := pair.builder(r) + require.NoError(t, err, "failed to build language model") + + agent := ai.NewAgent( + languageModel, + ai.WithSystemPrompt("You are a helpful assistant"), + ai.WithTools(weatherTool), + ) + result, err := agent.Generate(t.Context(), ai.AgentCall{ + Prompt: "What's the weather in Florence,Italy?", + ProviderOptions: pair.providerOptions, + MaxOutputTokens: ai.IntOption(4000), + }) + require.NoError(t, err, "failed to generate") + checkResult(t, result) + }) + t.Run("tool streaming "+pair.name, func(t *testing.T) { + r := newRecorder(t) + + languageModel, err := pair.builder(r) + require.NoError(t, err, "failed to build language model") + + agent := ai.NewAgent( + languageModel, + ai.WithSystemPrompt("You are a helpful assistant"), + ai.WithTools(weatherTool), + ) + result, err := agent.Stream(t.Context(), ai.AgentStreamCall{ + Prompt: "What's the weather in Florence,Italy?", + ProviderOptions: pair.providerOptions, + MaxOutputTokens: ai.IntOption(4000), + }) + require.NoError(t, err, "failed to generate") + checkResult(t, result) + }) +} + +func testMultiTool(t *testing.T, pair builderPair) { + type WeatherInput struct { + Location string `json:"location" description:"the city"` + } + + type CalculatorInput struct { + A int `json:"a" description:"first number"` + B int `json:"b" description:"second number"` + } + + addTool := ai.NewAgentTool( + "add", + "Add two numbers", + func(ctx context.Context, input CalculatorInput, _ ai.ToolCall) (ai.ToolResponse, error) { + result := input.A + input.B + return ai.NewTextResponse(strings.TrimSpace(strconv.Itoa(result))), nil + }, + ) + multiplyTool := ai.NewAgentTool( + "multiply", + "Multiply two numbers", + func(ctx context.Context, input CalculatorInput, _ ai.ToolCall) (ai.ToolResponse, error) { + result := input.A * input.B + return ai.NewTextResponse(strings.TrimSpace(strconv.Itoa(result))), nil + }, + ) + checkResult := func(t *testing.T, result *ai.AgentResult) { + require.Len(t, result.Steps, 2) + + var toolCalls []ai.ToolCallContent + for _, content := range result.Steps[0].Content { + if content.GetType() == ai.ContentTypeToolCall { + toolCalls = append(toolCalls, content.(ai.ToolCallContent)) + } + } + require.Len(t, toolCalls, 2) + + finalText := result.Response.Content.Text() + require.Contains(t, finalText, "5", "expected response to contain '5', got: %q", finalText) + require.Contains(t, finalText, "6", "expected response to contain '6', got: %q", finalText) + } + + t.Run("multi tool "+pair.name, func(t *testing.T) { + r := newRecorder(t) + + languageModel, err := pair.builder(r) + require.NoError(t, err, "failed to build language model") + + agent := ai.NewAgent( + languageModel, + ai.WithSystemPrompt("You are a helpful assistant. Always use both add and multiply at the same time."), + ai.WithTools(addTool), + ai.WithTools(multiplyTool), + ) + result, err := agent.Generate(t.Context(), ai.AgentCall{ + Prompt: "Add and multiply the number 2 and 3", + ProviderOptions: pair.providerOptions, + MaxOutputTokens: ai.IntOption(4000), + }) + require.NoError(t, err, "failed to generate") + checkResult(t, result) + }) + t.Run("multi tool streaming "+pair.name, func(t *testing.T) { + r := newRecorder(t) + + languageModel, err := pair.builder(r) + require.NoError(t, err, "failed to build language model") + + agent := ai.NewAgent( + languageModel, + ai.WithSystemPrompt("You are a helpful assistant. Always use both add and multiply at the same time."), + ai.WithTools(addTool), + ai.WithTools(multiplyTool), + ) + result, err := agent.Stream(t.Context(), ai.AgentStreamCall{ + Prompt: "Add and multiply the number 2 and 3", + ProviderOptions: pair.providerOptions, + MaxOutputTokens: ai.IntOption(4000), + }) + require.NoError(t, err, "failed to generate") + checkResult(t, result) + }) +} diff --git a/providertests/google_test.go b/providertests/google_test.go new file mode 100644 index 0000000000000000000000000000000000000000..41d78f0fd4955b07d3285811459239ab26d0b2b7 --- /dev/null +++ b/providertests/google_test.go @@ -0,0 +1,35 @@ +package providertests + +import ( + "cmp" + "net/http" + "os" + "testing" + + "github.com/charmbracelet/fantasy/ai" + "github.com/charmbracelet/fantasy/google" + "gopkg.in/dnaeon/go-vcr.v4/pkg/recorder" +) + +func TestGoogleCommon(t *testing.T) { + testCommon(t, []builderPair{ + {"gemini-2.5-flash", builderGoogleGemini25Flash, nil}, + {"gemini-2.5-pro", builderGoogleGemini25Pro, nil}, + }) +} + +func builderGoogleGemini25Flash(r *recorder.Recorder) (ai.LanguageModel, error) { + provider := google.New( + google.WithAPIKey(cmp.Or(os.Getenv("GEMINI_API_KEY"), "(missing)")), + google.WithHTTPClient(&http.Client{Transport: r}), + ) + return provider.LanguageModel("gemini-2.5-flash") +} + +func builderGoogleGemini25Pro(r *recorder.Recorder) (ai.LanguageModel, error) { + provider := google.New( + google.WithAPIKey(cmp.Or(os.Getenv("GEMINI_API_KEY"), "(missing)")), + google.WithHTTPClient(&http.Client{Transport: r}), + ) + return provider.LanguageModel("gemini-2.5-pro") +} diff --git a/providertests/openai_test.go b/providertests/openai_test.go new file mode 100644 index 0000000000000000000000000000000000000000..80759345ace8d91cccb319b9589c559b73c2f20d --- /dev/null +++ b/providertests/openai_test.go @@ -0,0 +1,43 @@ +package providertests + +import ( + "net/http" + "os" + "testing" + + "github.com/charmbracelet/fantasy/ai" + "github.com/charmbracelet/fantasy/openai" + "gopkg.in/dnaeon/go-vcr.v4/pkg/recorder" +) + +func TestOpenAICommon(t *testing.T) { + testCommon(t, []builderPair{ + {"gpt-4o", builderOpenaiGpt4o, nil}, + {"gpt-4o-mini", builderOpenaiGpt4oMini, nil}, + {"gpt-5", builderOpenaiGpt5, nil}, + }) +} + +func builderOpenaiGpt4o(r *recorder.Recorder) (ai.LanguageModel, error) { + provider := openai.New( + openai.WithAPIKey(os.Getenv("OPENAI_API_KEY")), + openai.WithHTTPClient(&http.Client{Transport: r}), + ) + return provider.LanguageModel("gpt-4o") +} + +func builderOpenaiGpt4oMini(r *recorder.Recorder) (ai.LanguageModel, error) { + provider := openai.New( + openai.WithAPIKey(os.Getenv("OPENAI_API_KEY")), + openai.WithHTTPClient(&http.Client{Transport: r}), + ) + return provider.LanguageModel("gpt-4o-mini") +} + +func builderOpenaiGpt5(r *recorder.Recorder) (ai.LanguageModel, error) { + provider := openai.New( + openai.WithAPIKey(os.Getenv("OPENAI_API_KEY")), + openai.WithHTTPClient(&http.Client{Transport: r}), + ) + return provider.LanguageModel("gpt-5") +} diff --git a/providertests/opernrouter_test.go b/providertests/opernrouter_test.go new file mode 100644 index 0000000000000000000000000000000000000000..ca4d81b34641aeb310807315c8523f37cfd417bc --- /dev/null +++ b/providertests/opernrouter_test.go @@ -0,0 +1,78 @@ +package providertests + +import ( + "net/http" + "os" + "testing" + + "github.com/charmbracelet/fantasy/ai" + "github.com/charmbracelet/fantasy/openrouter" + "gopkg.in/dnaeon/go-vcr.v4/pkg/recorder" +) + +type openrouterModel struct { + name string + builderFunc builderFunc + providers []string +} + +func TestOpenRouterCommon(t *testing.T) { + var pairs []builderPair + models := []openrouterModel{ + kimiK2(), + } + + for _, model := range models { + for _, provider := range model.providers { + pairs = append( + pairs, + builderPair{ + model.name + "_" + provider, + model.builderFunc, + ai.ProviderOptions{ + openrouter.Name: &openrouter.ProviderOptions{ + Provider: &openrouter.Provider{ + Only: []string{provider}, + }, + }, + }, + }) + } + } + + testCommon(t, pairs) +} + +func kimiK2() openrouterModel { + return openrouterModel{ + name: "kimi-k2", + builderFunc: func(r *recorder.Recorder) (ai.LanguageModel, error) { + provider := openrouter.New( + openrouter.WithAPIKey(os.Getenv("OPENROUTER_API_KEY")), + openrouter.WithHTTPClient(&http.Client{Transport: r}), + ) + return provider.LanguageModel("moonshotai/kimi-k2-0905") + }, + providers: []string{ + "chutes", + "deepinfra", + "siliconflow", + "fireworks", + "moonshotai", + "novita", + "baseten", + "together", + // "groq", + "moonshotai/turbo", + "wandb", + }, + } +} + +func builderOpenrouterGLM45(r *recorder.Recorder) (ai.LanguageModel, error) { + provider := openrouter.New( + openrouter.WithAPIKey(os.Getenv("OPENROUTER_API_KEY")), + openrouter.WithHTTPClient(&http.Client{Transport: r}), + ) + return provider.LanguageModel("z-ai/glm-4.5") +} diff --git a/providertests/provider_test.go b/providertests/provider_test.go deleted file mode 100644 index 714632c6b19e644c27c80365ec395c22a2ee73ba..0000000000000000000000000000000000000000 --- a/providertests/provider_test.go +++ /dev/null @@ -1,378 +0,0 @@ -package providertests - -import ( - "context" - "strconv" - "strings" - "testing" - - "github.com/charmbracelet/fantasy/ai" - "github.com/charmbracelet/fantasy/anthropic" - "github.com/charmbracelet/fantasy/google" - "github.com/charmbracelet/fantasy/openai" - "github.com/charmbracelet/fantasy/openrouter" - _ "github.com/joho/godotenv/autoload" - "github.com/stretchr/testify/require" -) - -func TestSimple(t *testing.T) { - for _, pair := range languageModelBuilders { - t.Run(pair.name, func(t *testing.T) { - r := newRecorder(t) - - languageModel, err := pair.builder(r) - require.NoError(t, err, "failed to build language model") - - agent := ai.NewAgent( - languageModel, - ai.WithSystemPrompt("You are a helpful assistant"), - ) - result, err := agent.Generate(t.Context(), ai.AgentCall{ - Prompt: "Say hi in Portuguese", - }) - require.NoError(t, err, "failed to generate") - - option1 := "Oi" - option2 := "Olá" - got := result.Response.Content.Text() - require.True(t, strings.Contains(got, option1) || strings.Contains(got, option2), "unexpected response: got %q, want %q or %q", got, option1, option2) - }) - } -} - -func TestTool(t *testing.T) { - for _, pair := range languageModelBuilders { - t.Run(pair.name, func(t *testing.T) { - r := newRecorder(t) - - languageModel, err := pair.builder(r) - require.NoError(t, err, "failed to build language model") - - type WeatherInput struct { - Location string `json:"location" description:"the city"` - } - - weatherTool := ai.NewAgentTool( - "weather", - "Get weather information for a location", - func(ctx context.Context, input WeatherInput, _ ai.ToolCall) (ai.ToolResponse, error) { - return ai.NewTextResponse("40 C"), nil - }, - ) - - agent := ai.NewAgent( - languageModel, - ai.WithSystemPrompt("You are a helpful assistant"), - ai.WithTools(weatherTool), - ) - result, err := agent.Generate(t.Context(), ai.AgentCall{ - Prompt: "What's the weather in Florence?", - }) - require.NoError(t, err, "failed to generate") - - want1 := "Florence" - want2 := "40" - got := result.Response.Content.Text() - require.True(t, strings.Contains(got, want1) && strings.Contains(got, want2), "unexpected response: got %q, want %q %q", got, want1, want2) - }) - } -} - -func TestThinking(t *testing.T) { - for _, pair := range thinkingLanguageModelBuilders { - t.Run(pair.name, func(t *testing.T) { - r := newRecorder(t) - - languageModel, err := pair.builder(r) - require.NoError(t, err, "failed to build language model") - - type WeatherInput struct { - Location string `json:"location" description:"the city"` - } - - weatherTool := ai.NewAgentTool( - "weather", - "Get weather information for a location", - func(ctx context.Context, input WeatherInput, _ ai.ToolCall) (ai.ToolResponse, error) { - return ai.NewTextResponse("40 C"), nil - }, - ) - - agent := ai.NewAgent( - languageModel, - ai.WithSystemPrompt("You are a helpful assistant"), - ai.WithTools(weatherTool), - ) - result, err := agent.Generate(t.Context(), ai.AgentCall{ - Prompt: "What's the weather in Florence, Italy?", - ProviderOptions: ai.ProviderOptions{ - "anthropic": &anthropic.ProviderOptions{ - Thinking: &anthropic.ThinkingProviderOption{ - BudgetTokens: 10_000, - }, - }, - "google": &google.ProviderOptions{ - ThinkingConfig: &google.ThinkingConfig{ - ThinkingBudget: ai.IntOption(100), - IncludeThoughts: ai.BoolOption(true), - }, - }, - "openai": &openai.ProviderOptions{ - ReasoningEffort: openai.ReasoningEffortOption(openai.ReasoningEffortMedium), - }, - "openrouter": &openrouter.ProviderOptions{ - Reasoning: &openrouter.ReasoningOptions{ - Effort: openrouter.ReasoningEffortOption(openrouter.ReasoningEffortHigh), - }, - }, - }, - }) - require.NoError(t, err, "failed to generate") - - want1 := "Florence" - want2 := "40" - got := result.Response.Content.Text() - require.True(t, strings.Contains(got, want1) && strings.Contains(got, want2), "unexpected response: got %q, want %q %q", got, want1, want2) - - testThinking(t, languageModel.Provider(), result.Steps) - }) - } -} - -func TestThinkingStreaming(t *testing.T) { - for _, pair := range thinkingLanguageModelBuilders { - t.Run(pair.name, func(t *testing.T) { - r := newRecorder(t) - - languageModel, err := pair.builder(r) - require.NoError(t, err, "failed to build language model") - - type WeatherInput struct { - Location string `json:"location" description:"the city"` - } - - weatherTool := ai.NewAgentTool( - "weather", - "Get weather information for a location", - func(ctx context.Context, input WeatherInput, _ ai.ToolCall) (ai.ToolResponse, error) { - return ai.NewTextResponse("40 C"), nil - }, - ) - - agent := ai.NewAgent( - languageModel, - ai.WithSystemPrompt("You are a helpful assistant"), - ai.WithTools(weatherTool), - ) - result, err := agent.Stream(t.Context(), ai.AgentStreamCall{ - Prompt: "What's the weather in Florence, Italy?", - ProviderOptions: ai.ProviderOptions{ - "anthropic": &anthropic.ProviderOptions{ - Thinking: &anthropic.ThinkingProviderOption{ - BudgetTokens: 10_000, - }, - }, - "google": &google.ProviderOptions{ - ThinkingConfig: &google.ThinkingConfig{ - ThinkingBudget: ai.IntOption(100), - IncludeThoughts: ai.BoolOption(true), - }, - }, - "openai": &openai.ProviderOptions{ - ReasoningEffort: openai.ReasoningEffortOption(openai.ReasoningEffortMedium), - }, - }, - }) - require.NoError(t, err, "failed to generate") - - want1 := "Florence" - want2 := "40" - got := result.Response.Content.Text() - require.True(t, strings.Contains(got, want1) && strings.Contains(got, want2), "unexpected response: got %q, want %q %q", got, want1, want2) - - testThinking(t, languageModel.Provider(), result.Steps) - }) - } -} - -func TestStream(t *testing.T) { - for _, pair := range languageModelBuilders { - t.Run(pair.name, func(t *testing.T) { - r := newRecorder(t) - - languageModel, err := pair.builder(r) - require.NoError(t, err, "failed to build language model") - - agent := ai.NewAgent( - languageModel, - ai.WithSystemPrompt("You are a helpful assistant"), - ) - - var collectedText strings.Builder - textDeltaCount := 0 - stepCount := 0 - - streamCall := ai.AgentStreamCall{ - Prompt: "Count from 1 to 3 in Spanish", - OnTextDelta: func(id, text string) error { - textDeltaCount++ - collectedText.WriteString(text) - return nil - }, - OnStepFinish: func(step ai.StepResult) error { - stepCount++ - return nil - }, - } - - result, err := agent.Stream(t.Context(), streamCall) - require.NoError(t, err, "failed to stream") - - finalText := result.Response.Content.Text() - require.NotEmpty(t, finalText, "expected non-empty response") - - require.True(t, strings.Contains(strings.ToLower(finalText), "uno") && - strings.Contains(strings.ToLower(finalText), "dos") && - strings.Contains(strings.ToLower(finalText), "tres"), "unexpected response: %q", finalText) - - require.Greater(t, textDeltaCount, 0, "expected at least one text delta callback") - - require.Greater(t, stepCount, 0, "expected at least one step finish callback") - - require.NotEmpty(t, collectedText.String(), "expected collected text from deltas to be non-empty") - }) - } -} - -func TestStreamWithTools(t *testing.T) { - for _, pair := range languageModelBuilders { - t.Run(pair.name, func(t *testing.T) { - r := newRecorder(t) - - languageModel, err := pair.builder(r) - require.NoError(t, err, "failed to build language model") - - type CalculatorInput struct { - A int `json:"a" description:"first number"` - B int `json:"b" description:"second number"` - } - - calculatorTool := ai.NewAgentTool( - "add", - "Add two numbers", - func(ctx context.Context, input CalculatorInput, _ ai.ToolCall) (ai.ToolResponse, error) { - result := input.A + input.B - return ai.NewTextResponse(strings.TrimSpace(strconv.Itoa(result))), nil - }, - ) - - agent := ai.NewAgent( - languageModel, - ai.WithSystemPrompt("You are a helpful assistant. Use the add tool to perform calculations."), - ai.WithTools(calculatorTool), - ) - - toolCallCount := 0 - toolResultCount := 0 - var collectedText strings.Builder - - streamCall := ai.AgentStreamCall{ - Prompt: "What is 15 + 27?", - OnTextDelta: func(id, text string) error { - collectedText.WriteString(text) - return nil - }, - OnToolCall: func(toolCall ai.ToolCallContent) error { - toolCallCount++ - require.Equal(t, "add", toolCall.ToolName, "unexpected tool name") - return nil - }, - OnToolResult: func(result ai.ToolResultContent) error { - toolResultCount++ - return nil - }, - } - - result, err := agent.Stream(t.Context(), streamCall) - require.NoError(t, err, "failed to stream") - - finalText := result.Response.Content.Text() - require.Contains(t, finalText, "42", "expected response to contain '42', got: %q", finalText) - - require.Greater(t, toolCallCount, 0, "expected at least one tool call") - - require.Greater(t, toolResultCount, 0, "expected at least one tool result") - }) - } -} - -func TestStreamWithMultipleTools(t *testing.T) { - for _, pair := range languageModelBuilders { - t.Run(pair.name, func(t *testing.T) { - r := newRecorder(t) - - languageModel, err := pair.builder(r) - require.NoError(t, err, "failed to build language model") - - type CalculatorInput struct { - A int `json:"a" description:"first number"` - B int `json:"b" description:"second number"` - } - - addTool := ai.NewAgentTool( - "add", - "Add two numbers", - func(ctx context.Context, input CalculatorInput, _ ai.ToolCall) (ai.ToolResponse, error) { - result := input.A + input.B - return ai.NewTextResponse(strings.TrimSpace(strconv.Itoa(result))), nil - }, - ) - multiplyTool := ai.NewAgentTool( - "multiply", - "Multiply two numbers", - func(ctx context.Context, input CalculatorInput, _ ai.ToolCall) (ai.ToolResponse, error) { - result := input.A * input.B - return ai.NewTextResponse(strings.TrimSpace(strconv.Itoa(result))), nil - }, - ) - - agent := ai.NewAgent( - languageModel, - ai.WithSystemPrompt("You are a helpful assistant. Always use both add and multiply at the same time."), - ai.WithTools(addTool), - ai.WithTools(multiplyTool), - ) - - toolCallCount := 0 - toolResultCount := 0 - var collectedText strings.Builder - - streamCall := ai.AgentStreamCall{ - Prompt: "Add and multiply the number 2 and 3", - OnTextDelta: func(id, text string) error { - collectedText.WriteString(text) - return nil - }, - OnToolCall: func(toolCall ai.ToolCallContent) error { - toolCallCount++ - return nil - }, - OnToolResult: func(result ai.ToolResultContent) error { - toolResultCount++ - return nil - }, - } - - result, err := agent.Stream(t.Context(), streamCall) - require.NoError(t, err, "failed to stream") - require.Equal(t, len(result.Steps), 2, "expected all tool calls in step 1") - finalText := result.Response.Content.Text() - require.Contains(t, finalText, "5", "expected response to contain '5', got: %q", finalText) - require.Contains(t, finalText, "6", "expected response to contain '5', got: %q", finalText) - - require.Greater(t, toolCallCount, 0, "expected at least one tool call") - - require.Greater(t, toolResultCount, 0, "expected at least one tool result") - }) - } -} diff --git a/providertests/testdata/TestAnthropicCommon/simple_claude-sonnet-4.yaml b/providertests/testdata/TestAnthropicCommon/simple_claude-sonnet-4.yaml new file mode 100644 index 0000000000000000000000000000000000000000..65729cc9421904b0734721de4e7b89f3fb038ad5 --- /dev/null +++ b/providertests/testdata/TestAnthropicCommon/simple_claude-sonnet-4.yaml @@ -0,0 +1,33 @@ +--- +version: 2 +interactions: + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 205 + host: "" + body: '{"max_tokens":4000,"messages":[{"content":[{"text":"Say hi in Portuguese","type":"text"}],"role":"user"}],"model":"claude-sonnet-4-20250514","system":[{"text":"You are a helpful assistant","type":"text"}]}' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - Anthropic/Go 1.10.0 + url: https://api.anthropic.com/v1/messages + method: POST + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: -1 + uncompressed: true + body: '{"id":"msg_017KTuKXoM4C6SAss2KSxPAK","type":"message","role":"assistant","model":"claude-sonnet-4-20250514","content":[{"type":"text","text":"Oi! \n\n(That''s an informal \"hi\" in Portuguese. You could also say \"Olá\" for a slightly more formal greeting.)"}],"stop_reason":"end_turn","stop_sequence":null,"usage":{"input_tokens":16,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":36,"service_tier":"standard"}}' + headers: + Content-Type: + - application/json + status: 200 OK + code: 200 + duration: 4.631234083s diff --git a/providertests/testdata/TestAnthropicCommon/simple_streaming_claude-sonnet-4.yaml b/providertests/testdata/TestAnthropicCommon/simple_streaming_claude-sonnet-4.yaml new file mode 100644 index 0000000000000000000000000000000000000000..df4a40ee0ac30b647ca94a2da83ed037f6178e3a --- /dev/null +++ b/providertests/testdata/TestAnthropicCommon/simple_streaming_claude-sonnet-4.yaml @@ -0,0 +1,62 @@ +--- +version: 2 +interactions: + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 219 + host: "" + body: '{"max_tokens":4000,"messages":[{"content":[{"text":"Say hi in Portuguese","type":"text"}],"role":"user"}],"model":"claude-sonnet-4-20250514","system":[{"text":"You are a helpful assistant","type":"text"}],"stream":true}' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - Anthropic/Go 1.10.0 + url: https://api.anthropic.com/v1/messages + method: POST + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: -1 + body: |+ + event: message_start + data: {"type":"message_start","message":{"id":"msg_01RFuVPPnYCFGL9ucejc3Rd4","type":"message","role":"assistant","model":"claude-sonnet-4-20250514","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":16,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":5,"service_tier":"standard"}} } + + 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":"Olá! "} } + + event: content_block_delta + data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"\n\n(That's \"hi\" in Portuguese!)"} } + + event: ping + data: {"type": "ping"} + + event: content_block_stop + 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":16,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":18} } + + event: message_stop + data: {"type":"message_stop" } + + headers: + Content-Type: + - text/event-stream; charset=utf-8 + status: 200 OK + code: 200 + duration: 1.141609875s diff --git a/providertests/testdata/TestGoogleCommon/simple_gemini-2.5-flash.yaml b/providertests/testdata/TestGoogleCommon/simple_gemini-2.5-flash.yaml new file mode 100644 index 0000000000000000000000000000000000000000..a1183083a1a44d339fd52108cd30e8d316de5f80 --- /dev/null +++ b/providertests/testdata/TestGoogleCommon/simple_gemini-2.5-flash.yaml @@ -0,0 +1,62 @@ +--- +version: 2 +interactions: + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 202 + host: generativelanguage.googleapis.com + body: | + {"contents":[{"parts":[{"text":"Say hi in Portuguese"}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"systemInstruction":{"parts":[{"text":"You are a helpful assistant"}],"role":"user"}} + headers: + Content-Type: + - application/json + User-Agent: + - google-genai-sdk/1.23.0 gl-go/go1.25.1 + url: https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent + method: POST + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: -1 + uncompressed: true + body: | + { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "Olá!" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 11, + "candidatesTokenCount": 2, + "totalTokenCount": 38, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 11 + } + ], + "thoughtsTokenCount": 25 + }, + "modelVersion": "gemini-2.5-flash", + "responseId": "j7HSaNb8E-fknsEPzczo4QI" + } + headers: + Content-Type: + - application/json; charset=UTF-8 + status: 200 OK + code: 200 + duration: 687.882791ms diff --git a/providertests/testdata/TestGoogleCommon/simple_gemini-2.5-pro.yaml b/providertests/testdata/TestGoogleCommon/simple_gemini-2.5-pro.yaml new file mode 100644 index 0000000000000000000000000000000000000000..19fcedbe09f0158e1250a8b3e21addf2c8c32085 --- /dev/null +++ b/providertests/testdata/TestGoogleCommon/simple_gemini-2.5-pro.yaml @@ -0,0 +1,62 @@ +--- +version: 2 +interactions: + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 202 + host: generativelanguage.googleapis.com + body: | + {"contents":[{"parts":[{"text":"Say hi in Portuguese"}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"systemInstruction":{"parts":[{"text":"You are a helpful assistant"}],"role":"user"}} + headers: + Content-Type: + - application/json + User-Agent: + - google-genai-sdk/1.23.0 gl-go/go1.25.1 + url: https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-pro:generateContent + method: POST + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: -1 + uncompressed: true + body: | + { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "Of course!\n\nThe most common ways to say \"hi\" in Portuguese are:\n\n* **Oi** (more informal and very common, especially in Brazil)\n* **Olá** (a bit more formal, like \"hello\")" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 11, + "candidatesTokenCount": 50, + "totalTokenCount": 667, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 11 + } + ], + "thoughtsTokenCount": 606 + }, + "modelVersion": "gemini-2.5-pro", + "responseId": "mLHSaNy4DqeunsEPy_THqAY" + } + headers: + Content-Type: + - application/json; charset=UTF-8 + status: 200 OK + code: 200 + duration: 7.978276458s diff --git a/providertests/testdata/TestGoogleCommon/simple_streaming_gemini-2.5-flash.yaml b/providertests/testdata/TestGoogleCommon/simple_streaming_gemini-2.5-flash.yaml new file mode 100644 index 0000000000000000000000000000000000000000..0246454c523aaf8cf1fc92d9d0048ca1835e6a8a --- /dev/null +++ b/providertests/testdata/TestGoogleCommon/simple_streaming_gemini-2.5-flash.yaml @@ -0,0 +1,34 @@ +--- +version: 2 +interactions: + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 202 + host: generativelanguage.googleapis.com + body: | + {"contents":[{"parts":[{"text":"Say hi in Portuguese"}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"systemInstruction":{"parts":[{"text":"You are a helpful assistant"}],"role":"user"}} + form: + alt: + - sse + headers: + Content-Type: + - application/json + User-Agent: + - google-genai-sdk/1.23.0 gl-go/go1.25.1 + url: https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:streamGenerateContent?alt=sse + method: POST + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: -1 + body: "data: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \"Olá!\"}],\"role\": \"model\"},\"finishReason\": \"STOP\",\"index\": 0}],\"usageMetadata\": {\"promptTokenCount\": 11,\"candidatesTokenCount\": 2,\"totalTokenCount\": 32,\"promptTokensDetails\": [{\"modality\": \"TEXT\",\"tokenCount\": 11}],\"thoughtsTokenCount\": 19},\"modelVersion\": \"gemini-2.5-flash\",\"responseId\": \"kLHSaLKrBOm1nsEPkOi30AM\"}\r\n\r\n" + headers: + Content-Type: + - text/event-stream + status: 200 OK + code: 200 + duration: 903.535375ms diff --git a/providertests/testdata/TestGoogleCommon/simple_streaming_gemini-2.5-pro.yaml b/providertests/testdata/TestGoogleCommon/simple_streaming_gemini-2.5-pro.yaml new file mode 100644 index 0000000000000000000000000000000000000000..fff06b912c21c69d484ab07e2cc9ff6d0de05bea --- /dev/null +++ b/providertests/testdata/TestGoogleCommon/simple_streaming_gemini-2.5-pro.yaml @@ -0,0 +1,34 @@ +--- +version: 2 +interactions: + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 202 + host: generativelanguage.googleapis.com + body: | + {"contents":[{"parts":[{"text":"Say hi in Portuguese"}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"systemInstruction":{"parts":[{"text":"You are a helpful assistant"}],"role":"user"}} + form: + alt: + - sse + headers: + Content-Type: + - application/json + User-Agent: + - google-genai-sdk/1.23.0 gl-go/go1.25.1 + url: https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-pro:streamGenerateContent?alt=sse + method: POST + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: -1 + body: "data: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \"Of course!\\n\\nThe most common ways to say \\\"hi\\\" in Portuguese are:\\n\\n* **Oi** (\"}],\"role\": \"model\"},\"index\": 0}],\"usageMetadata\": {\"promptTokenCount\": 11,\"candidatesTokenCount\": 24,\"totalTokenCount\": 528,\"promptTokensDetails\": [{\"modality\": \"TEXT\",\"tokenCount\": 11}],\"thoughtsTokenCount\": 493},\"modelVersion\": \"gemini-2.5-pro\",\"responseId\": \"nLHSaIr8FMTqnsEP6JadkAY\"}\r\n\r\ndata: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \"more informal, like \\\"hi\\\")\\n* **Olá** (a bit more formal, like \\\"hello\\\")\\n\\nYou can also\"}],\"role\": \"model\"},\"index\": 0}],\"usageMetadata\": {\"promptTokenCount\": 11,\"candidatesTokenCount\": 51,\"totalTokenCount\": 555,\"promptTokensDetails\": [{\"modality\": \"TEXT\",\"tokenCount\": 11}],\"thoughtsTokenCount\": 493},\"modelVersion\": \"gemini-2.5-pro\",\"responseId\": \"nLHSaIr8FMTqnsEP6JadkAY\"}\r\n\r\ndata: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \" use greetings like:\\n\\n* **Tudo bem?** (How are you?)\\n* **Bom dia** (Good\"}],\"role\": \"model\"},\"index\": 0}],\"usageMetadata\": {\"promptTokenCount\": 11,\"candidatesTokenCount\": 78,\"totalTokenCount\": 582,\"promptTokensDetails\": [{\"modality\": \"TEXT\",\"tokenCount\": 11}],\"thoughtsTokenCount\": 493},\"modelVersion\": \"gemini-2.5-pro\",\"responseId\": \"nLHSaIr8FMTqnsEP6JadkAY\"}\r\n\r\ndata: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \" morning)\\n* **Boa tarde** (Good afternoon)\\n* **Boa noite** (Good evening /\"}],\"role\": \"model\"},\"index\": 0}],\"usageMetadata\": {\"promptTokenCount\": 11,\"candidatesTokenCount\": 102,\"totalTokenCount\": 606,\"promptTokensDetails\": [{\"modality\": \"TEXT\",\"tokenCount\": 11}],\"thoughtsTokenCount\": 493},\"modelVersion\": \"gemini-2.5-pro\",\"responseId\": \"nLHSaIr8FMTqnsEP6JadkAY\"}\r\n\r\ndata: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \" Good night)\"}],\"role\": \"model\"},\"finishReason\": \"STOP\",\"index\": 0}],\"usageMetadata\": {\"promptTokenCount\": 11,\"candidatesTokenCount\": 105,\"totalTokenCount\": 609,\"promptTokensDetails\": [{\"modality\": \"TEXT\",\"tokenCount\": 11}],\"thoughtsTokenCount\": 493},\"modelVersion\": \"gemini-2.5-pro\",\"responseId\": \"nLHSaIr8FMTqnsEP6JadkAY\"}\r\n\r\n" + headers: + Content-Type: + - text/event-stream + status: 200 OK + code: 200 + duration: 8.837368541s diff --git a/providertests/testdata/TestOpenAICommon/simple_gpt-4o-mini.yaml b/providertests/testdata/TestOpenAICommon/simple_gpt-4o-mini.yaml new file mode 100644 index 0000000000000000000000000000000000000000..406374e4c36c56c79fcdfef0b8c285457f3a96f1 --- /dev/null +++ b/providertests/testdata/TestOpenAICommon/simple_gpt-4o-mini.yaml @@ -0,0 +1,69 @@ +--- +version: 2 +interactions: + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 161 + host: "" + body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"Say hi in Portuguese","role":"user"}],"model":"gpt-4o-mini","max_tokens":4000}' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - OpenAI/Go 2.3.0 + url: https://api.openai.com/v1/chat/completions + method: POST + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: -1 + uncompressed: true + body: | + { + "id": "chatcmpl-CIyJYqz8D13qvLHrzmPDBgcLI2yis", + "object": "chat.completion", + "created": 1758637788, + "model": "gpt-4o-mini-2024-07-18", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "Hi! In Portuguese, you would say \"Oi!\"", + "refusal": null, + "annotations": [] + }, + "logprobs": null, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 20, + "completion_tokens": 11, + "total_tokens": 31, + "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 + } + }, + "service_tier": "default", + "system_fingerprint": "fp_560af6e559" + } + headers: + Content-Type: + - application/json + status: 200 OK + code: 200 + duration: 1.50388225s diff --git a/providertests/testdata/TestOpenAICommon/simple_gpt-4o.yaml b/providertests/testdata/TestOpenAICommon/simple_gpt-4o.yaml new file mode 100644 index 0000000000000000000000000000000000000000..a6b84670e1128fadaa25b988f20b114101db6fc9 --- /dev/null +++ b/providertests/testdata/TestOpenAICommon/simple_gpt-4o.yaml @@ -0,0 +1,69 @@ +--- +version: 2 +interactions: + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 156 + host: "" + body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"Say hi in Portuguese","role":"user"}],"model":"gpt-4o","max_tokens":4000}' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - OpenAI/Go 2.3.0 + url: https://api.openai.com/v1/chat/completions + method: POST + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: -1 + uncompressed: true + body: | + { + "id": "chatcmpl-CIyJWzUZJShy0RouHvhJJ2Hy2UAfY", + "object": "chat.completion", + "created": 1758637786, + "model": "gpt-4o-2024-08-06", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "Olá!", + "refusal": null, + "annotations": [] + }, + "logprobs": null, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 20, + "completion_tokens": 2, + "total_tokens": 22, + "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 + } + }, + "service_tier": "default", + "system_fingerprint": "fp_f33640a400" + } + headers: + Content-Type: + - application/json + status: 200 OK + code: 200 + duration: 1.153691459s diff --git a/providertests/testdata/TestOpenAICommon/simple_gpt-5.yaml b/providertests/testdata/TestOpenAICommon/simple_gpt-5.yaml new file mode 100644 index 0000000000000000000000000000000000000000..cd31252a95359b43108c7a8511d4b44606763684 --- /dev/null +++ b/providertests/testdata/TestOpenAICommon/simple_gpt-5.yaml @@ -0,0 +1,68 @@ +--- +version: 2 +interactions: + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 166 + host: "" + body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"Say hi in Portuguese","role":"user"}],"model":"gpt-5","max_completion_tokens":4000}' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - OpenAI/Go 2.3.0 + url: https://api.openai.com/v1/chat/completions + method: POST + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: -1 + uncompressed: true + body: | + { + "id": "chatcmpl-CIyJdVnMfKeENR9RRovE2NBB00W7o", + "object": "chat.completion", + "created": 1758637793, + "model": "gpt-5-2025-08-07", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "Olá!", + "refusal": null, + "annotations": [] + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 19, + "completion_tokens": 139, + "total_tokens": 158, + "prompt_tokens_details": { + "cached_tokens": 0, + "audio_tokens": 0 + }, + "completion_tokens_details": { + "reasoning_tokens": 128, + "audio_tokens": 0, + "accepted_prediction_tokens": 0, + "rejected_prediction_tokens": 0 + } + }, + "service_tier": "default", + "system_fingerprint": null + } + headers: + Content-Type: + - application/json + status: 200 OK + code: 200 + duration: 7.150942875s diff --git a/providertests/testdata/TestOpenAICommon/simple_streaming_gpt-4o-mini.yaml b/providertests/testdata/TestOpenAICommon/simple_streaming_gpt-4o-mini.yaml new file mode 100644 index 0000000000000000000000000000000000000000..6c0726d9793355c1032b3b077fd44b6290c83501 --- /dev/null +++ b/providertests/testdata/TestOpenAICommon/simple_streaming_gpt-4o-mini.yaml @@ -0,0 +1,44 @@ +--- +version: 2 +interactions: + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 215 + host: "" + body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"Say hi in Portuguese","role":"user"}],"model":"gpt-4o-mini","max_tokens":4000,"stream_options":{"include_usage":true},"stream":true}' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - OpenAI/Go 2.3.0 + url: https://api.openai.com/v1/chat/completions + method: POST + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: -1 + body: |+ + data: {"id":"chatcmpl-CIyJaOZW1cSN0oFzR0KNpr0DEQdxO","object":"chat.completion.chunk","created":1758637790,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_560af6e559","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"qa8IO7ML3"} + + data: {"id":"chatcmpl-CIyJaOZW1cSN0oFzR0KNpr0DEQdxO","object":"chat.completion.chunk","created":1758637790,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_560af6e559","choices":[{"index":0,"delta":{"content":"Oi"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"epi9ETo8G"} + + data: {"id":"chatcmpl-CIyJaOZW1cSN0oFzR0KNpr0DEQdxO","object":"chat.completion.chunk","created":1758637790,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_560af6e559","choices":[{"index":0,"delta":{"content":"!"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"BVCz1VPweF"} + + data: {"id":"chatcmpl-CIyJaOZW1cSN0oFzR0KNpr0DEQdxO","object":"chat.completion.chunk","created":1758637790,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_560af6e559","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"VS66Q"} + + data: {"id":"chatcmpl-CIyJaOZW1cSN0oFzR0KNpr0DEQdxO","object":"chat.completion.chunk","created":1758637790,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_560af6e559","choices":[],"usage":{"prompt_tokens":20,"completion_tokens":2,"total_tokens":22,"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":"nek2YcQCjRz"} + + data: [DONE] + + headers: + Content-Type: + - text/event-stream; charset=utf-8 + status: 200 OK + code: 200 + duration: 3.206862375s diff --git a/providertests/testdata/TestOpenAICommon/simple_streaming_gpt-4o.yaml b/providertests/testdata/TestOpenAICommon/simple_streaming_gpt-4o.yaml new file mode 100644 index 0000000000000000000000000000000000000000..cb695558f09dd08978f0db75511f2b26df258f59 --- /dev/null +++ b/providertests/testdata/TestOpenAICommon/simple_streaming_gpt-4o.yaml @@ -0,0 +1,44 @@ +--- +version: 2 +interactions: + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 210 + host: "" + body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"Say hi in Portuguese","role":"user"}],"model":"gpt-4o","max_tokens":4000,"stream_options":{"include_usage":true},"stream":true}' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - OpenAI/Go 2.3.0 + url: https://api.openai.com/v1/chat/completions + method: POST + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: -1 + body: |+ + data: {"id":"chatcmpl-CIyJXHI3WU565cXirytCPOLgRqHly","object":"chat.completion.chunk","created":1758637787,"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":"yWAz3isSyfZvUk"} + + data: {"id":"chatcmpl-CIyJXHI3WU565cXirytCPOLgRqHly","object":"chat.completion.chunk","created":1758637787,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":"Olá"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"DFLb9RhUI6jN1"} + + data: {"id":"chatcmpl-CIyJXHI3WU565cXirytCPOLgRqHly","object":"chat.completion.chunk","created":1758637787,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":"!"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Lp6KWcGxa5knPEU"} + + data: {"id":"chatcmpl-CIyJXHI3WU565cXirytCPOLgRqHly","object":"chat.completion.chunk","created":1758637787,"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":"TPrEUpV8Bn"} + + data: {"id":"chatcmpl-CIyJXHI3WU565cXirytCPOLgRqHly","object":"chat.completion.chunk","created":1758637787,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[],"usage":{"prompt_tokens":20,"completion_tokens":2,"total_tokens":22,"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":""} + + data: [DONE] + + headers: + Content-Type: + - text/event-stream; charset=utf-8 + status: 200 OK + code: 200 + duration: 818.509375ms diff --git a/providertests/testdata/TestOpenAICommon/simple_streaming_gpt-5.yaml b/providertests/testdata/TestOpenAICommon/simple_streaming_gpt-5.yaml new file mode 100644 index 0000000000000000000000000000000000000000..fd894b2a4ce46a0c04f1d6adaca5d130cfba00cc --- /dev/null +++ b/providertests/testdata/TestOpenAICommon/simple_streaming_gpt-5.yaml @@ -0,0 +1,44 @@ +--- +version: 2 +interactions: + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 220 + host: "" + body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"Say hi in Portuguese","role":"user"}],"model":"gpt-5","max_completion_tokens":4000,"stream_options":{"include_usage":true},"stream":true}' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - OpenAI/Go 2.3.0 + url: https://api.openai.com/v1/chat/completions + method: POST + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: -1 + body: |+ + data: {"id":"chatcmpl-CIyJk1jvLtm20C4X3sbgJxP3jPduL","object":"chat.completion.chunk","created":1758637800,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"finish_reason":null}],"usage":null,"obfuscation":"uHhgO9zaTG"} + + data: {"id":"chatcmpl-CIyJk1jvLtm20C4X3sbgJxP3jPduL","object":"chat.completion.chunk","created":1758637800,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"Olá"},"finish_reason":null}],"usage":null,"obfuscation":"CDpyKFZPF"} + + data: {"id":"chatcmpl-CIyJk1jvLtm20C4X3sbgJxP3jPduL","object":"chat.completion.chunk","created":1758637800,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"!"},"finish_reason":null}],"usage":null,"obfuscation":"16B86R3N6bM"} + + data: {"id":"chatcmpl-CIyJk1jvLtm20C4X3sbgJxP3jPduL","object":"chat.completion.chunk","created":1758637800,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{},"finish_reason":"stop"}],"usage":null,"obfuscation":"OzkKXU"} + + data: {"id":"chatcmpl-CIyJk1jvLtm20C4X3sbgJxP3jPduL","object":"chat.completion.chunk","created":1758637800,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[],"usage":{"prompt_tokens":19,"completion_tokens":139,"total_tokens":158,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":128,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"ECuqld8"} + + data: [DONE] + + headers: + Content-Type: + - text/event-stream; charset=utf-8 + status: 200 OK + code: 200 + duration: 5.437192459s diff --git a/providertests/testdata/TestOpenRouterCommon/simple_kimi-k2_baseten.yaml b/providertests/testdata/TestOpenRouterCommon/simple_kimi-k2_baseten.yaml new file mode 100644 index 0000000000000000000000000000000000000000..7ed8837aa4fef59f3367941da63ff47940128008 --- /dev/null +++ b/providertests/testdata/TestOpenRouterCommon/simple_kimi-k2_baseten.yaml @@ -0,0 +1,33 @@ +--- +version: 2 +interactions: + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 230 + host: "" + body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"Say hi in Portuguese","role":"user"}],"model":"moonshotai/kimi-k2-0905","max_tokens":4000,"provider":{"only":["baseten"]},"usage":{"include":true}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - OpenAI/Go 2.3.0 + url: https://openrouter.ai/api/v1/chat/completions + method: POST + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: -1 + uncompressed: true + body: "\n \n\n \n\n \n\n \n\n \n\n \n\n \n{\"id\":\"gen-1758639328-AzATqlbuJcP77p24ALVP\",\"provider\":\"BaseTen\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion\",\"created\":1758639328,\"choices\":[{\"logprobs\":null,\"finish_reason\":\"stop\",\"native_finish_reason\":\"stop\",\"index\":0,\"message\":{\"role\":\"assistant\",\"content\":\"Olá!\",\"refusal\":null,\"reasoning\":null}}],\"system_fingerprint\":null,\"usage\":{\"prompt_tokens\":21,\"completion_tokens\":4,\"total_tokens\":25,\"cost\":0.0000226,\"is_byok\":false,\"prompt_tokens_details\":{\"cached_tokens\":0,\"audio_tokens\":0},\"cost_details\":{\"upstream_inference_cost\":null,\"upstream_inference_prompt_cost\":0.0000126,\"upstream_inference_completions_cost\":0.00001},\"completion_tokens_details\":{\"reasoning_tokens\":0,\"image_tokens\":0}}}" + headers: + Content-Type: + - application/json + status: 200 OK + code: 200 + duration: 3.172332875s diff --git a/providertests/testdata/TestOpenRouterCommon/simple_kimi-k2_chutes.yaml b/providertests/testdata/TestOpenRouterCommon/simple_kimi-k2_chutes.yaml new file mode 100644 index 0000000000000000000000000000000000000000..b40371a5f861620829317f153ac0552ffae8790f --- /dev/null +++ b/providertests/testdata/TestOpenRouterCommon/simple_kimi-k2_chutes.yaml @@ -0,0 +1,33 @@ +--- +version: 2 +interactions: + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 229 + host: "" + body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"Say hi in Portuguese","role":"user"}],"model":"moonshotai/kimi-k2-0905","max_tokens":4000,"usage":{"include":true},"provider":{"only":["chutes"]}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - OpenAI/Go 2.3.0 + url: https://openrouter.ai/api/v1/chat/completions + method: POST + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: -1 + uncompressed: true + body: "\n \n\n \n{\"id\":\"gen-1758639299-GKSxis3jImn2oU1Eh6ny\",\"provider\":\"Chutes\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion\",\"created\":1758639299,\"choices\":[{\"logprobs\":null,\"finish_reason\":\"stop\",\"native_finish_reason\":\"stop\",\"index\":0,\"message\":{\"role\":\"assistant\",\"content\":\"Olá!\",\"refusal\":null,\"reasoning\":null}}],\"usage\":{\"prompt_tokens\":21,\"completion_tokens\":4,\"total_tokens\":25,\"cost\":0.00001406,\"is_byok\":false,\"prompt_tokens_details\":{\"cached_tokens\":0,\"audio_tokens\":0},\"cost_details\":{\"upstream_inference_cost\":null,\"upstream_inference_prompt_cost\":0.00000798,\"upstream_inference_completions_cost\":0.00000608},\"completion_tokens_details\":{\"reasoning_tokens\":0,\"image_tokens\":0}}}" + headers: + Content-Type: + - application/json + status: 200 OK + code: 200 + duration: 917.195084ms diff --git a/providertests/testdata/TestOpenRouterCommon/simple_kimi-k2_deepinfra.yaml b/providertests/testdata/TestOpenRouterCommon/simple_kimi-k2_deepinfra.yaml new file mode 100644 index 0000000000000000000000000000000000000000..b354d23acb2a8db3840403ec7f5daac7efc2f3bc --- /dev/null +++ b/providertests/testdata/TestOpenRouterCommon/simple_kimi-k2_deepinfra.yaml @@ -0,0 +1,33 @@ +--- +version: 2 +interactions: + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 232 + host: "" + body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"Say hi in Portuguese","role":"user"}],"model":"moonshotai/kimi-k2-0905","max_tokens":4000,"provider":{"only":["deepinfra"]},"usage":{"include":true}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - OpenAI/Go 2.3.0 + url: https://openrouter.ai/api/v1/chat/completions + method: POST + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: -1 + uncompressed: true + body: "\n \n{\"id\":\"gen-1758639301-0fTwU9jWsZMToUgKXztP\",\"provider\":\"DeepInfra\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion\",\"created\":1758639301,\"choices\":[{\"logprobs\":null,\"finish_reason\":\"stop\",\"native_finish_reason\":\"stop\",\"index\":0,\"message\":{\"role\":\"assistant\",\"content\":\"Olá!\",\"refusal\":null,\"reasoning\":null}}],\"usage\":{\"prompt_tokens\":20,\"completion_tokens\":3,\"total_tokens\":23,\"cost\":0.000016,\"is_byok\":false,\"prompt_tokens_details\":{\"cached_tokens\":0,\"audio_tokens\":0},\"cost_details\":{\"upstream_inference_cost\":null,\"upstream_inference_prompt_cost\":0.00001,\"upstream_inference_completions_cost\":0.000006},\"completion_tokens_details\":{\"reasoning_tokens\":0,\"image_tokens\":0}}}" + headers: + Content-Type: + - application/json + status: 200 OK + code: 200 + duration: 594.821083ms diff --git a/providertests/testdata/TestOpenRouterCommon/simple_kimi-k2_fireworks.yaml b/providertests/testdata/TestOpenRouterCommon/simple_kimi-k2_fireworks.yaml new file mode 100644 index 0000000000000000000000000000000000000000..8ac06c36985e6b44ebe7bebb0b365f539326b00e --- /dev/null +++ b/providertests/testdata/TestOpenRouterCommon/simple_kimi-k2_fireworks.yaml @@ -0,0 +1,33 @@ +--- +version: 2 +interactions: + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 232 + host: "" + body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"Say hi in Portuguese","role":"user"}],"model":"moonshotai/kimi-k2-0905","max_tokens":4000,"provider":{"only":["fireworks"]},"usage":{"include":true}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - OpenAI/Go 2.3.0 + url: https://openrouter.ai/api/v1/chat/completions + method: POST + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: -1 + uncompressed: true + body: "\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n{\"id\":\"gen-1758639309-qCggMDPpsQR5a2CyF7YY\",\"provider\":\"Fireworks\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion\",\"created\":1758639309,\"choices\":[{\"logprobs\":null,\"finish_reason\":\"stop\",\"native_finish_reason\":\"stop\",\"index\":0,\"message\":{\"role\":\"assistant\",\"content\":\"Olá!\",\"refusal\":null,\"reasoning\":null}}],\"usage\":{\"prompt_tokens\":20,\"completion_tokens\":4,\"total_tokens\":24,\"cost\":0.000022,\"is_byok\":false,\"prompt_tokens_details\":{\"cached_tokens\":0,\"audio_tokens\":0},\"cost_details\":{\"upstream_inference_cost\":null,\"upstream_inference_prompt_cost\":0.000012,\"upstream_inference_completions_cost\":0.00001},\"completion_tokens_details\":{\"reasoning_tokens\":0,\"image_tokens\":0}}}" + headers: + Content-Type: + - application/json + status: 200 OK + code: 200 + duration: 9.905739s diff --git a/providertests/testdata/TestOpenRouterCommon/simple_kimi-k2_moonshotai.yaml b/providertests/testdata/TestOpenRouterCommon/simple_kimi-k2_moonshotai.yaml new file mode 100644 index 0000000000000000000000000000000000000000..f5ab16fec17b84906e667f8aa12a3897efab5119 --- /dev/null +++ b/providertests/testdata/TestOpenRouterCommon/simple_kimi-k2_moonshotai.yaml @@ -0,0 +1,33 @@ +--- +version: 2 +interactions: + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 233 + host: "" + body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"Say hi in Portuguese","role":"user"}],"model":"moonshotai/kimi-k2-0905","max_tokens":4000,"usage":{"include":true},"provider":{"only":["moonshotai"]}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - OpenAI/Go 2.3.0 + url: https://openrouter.ai/api/v1/chat/completions + method: POST + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: -1 + uncompressed: true + body: "\n \n\n \n\n \n\n \n{\"id\":\"gen-1758639321-VwBlIANQZ6xzs4I5czRO\",\"provider\":\"Moonshot AI\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion\",\"created\":1758639321,\"choices\":[{\"logprobs\":null,\"finish_reason\":\"stop\",\"native_finish_reason\":\"stop\",\"index\":0,\"message\":{\"role\":\"assistant\",\"content\":\"Oi!\",\"refusal\":null,\"reasoning\":null}}],\"system_fingerprint\":\"fpv0_ef28f882\",\"usage\":{\"prompt_tokens\":20,\"completion_tokens\":3,\"total_tokens\":23,\"cost\":0.0000195,\"is_byok\":false,\"prompt_tokens_details\":{\"cached_tokens\":0,\"audio_tokens\":0},\"cost_details\":{\"upstream_inference_cost\":null,\"upstream_inference_prompt_cost\":0.000012,\"upstream_inference_completions_cost\":0.0000075},\"completion_tokens_details\":{\"reasoning_tokens\":0,\"image_tokens\":0}}}" + headers: + Content-Type: + - application/json + status: 200 OK + code: 200 + duration: 1.853341958s diff --git a/providertests/testdata/TestOpenRouterCommon/simple_kimi-k2_moonshotai/turbo.yaml b/providertests/testdata/TestOpenRouterCommon/simple_kimi-k2_moonshotai/turbo.yaml new file mode 100644 index 0000000000000000000000000000000000000000..d743165e0b36acf2e03edd5552a257620907a894 --- /dev/null +++ b/providertests/testdata/TestOpenRouterCommon/simple_kimi-k2_moonshotai/turbo.yaml @@ -0,0 +1,33 @@ +--- +version: 2 +interactions: + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 239 + host: "" + body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"Say hi in Portuguese","role":"user"}],"model":"moonshotai/kimi-k2-0905","max_tokens":4000,"provider":{"only":["moonshotai/turbo"]},"usage":{"include":true}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - OpenAI/Go 2.3.0 + url: https://openrouter.ai/api/v1/chat/completions + method: POST + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: -1 + uncompressed: true + body: "\n \n\n \n\n \n{\"id\":\"gen-1758639334-hxwi7fkQWt0putQK0ABp\",\"provider\":\"Moonshot AI\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion\",\"created\":1758639334,\"choices\":[{\"logprobs\":null,\"finish_reason\":\"stop\",\"native_finish_reason\":\"stop\",\"index\":0,\"message\":{\"role\":\"assistant\",\"content\":\"Olá!\",\"refusal\":null,\"reasoning\":null}}],\"system_fingerprint\":\"fpv0_ec889fbb\",\"usage\":{\"prompt_tokens\":20,\"completion_tokens\":4,\"total_tokens\":24,\"cost\":0.000044,\"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.00002},\"completion_tokens_details\":{\"reasoning_tokens\":0,\"image_tokens\":0}}}" + headers: + Content-Type: + - application/json + status: 200 OK + code: 200 + duration: 1.365624167s diff --git a/providertests/testdata/TestOpenRouterCommon/simple_kimi-k2_novita.yaml b/providertests/testdata/TestOpenRouterCommon/simple_kimi-k2_novita.yaml new file mode 100644 index 0000000000000000000000000000000000000000..b244a9a5f71c32871a4b52bceff0d0e68bfb2bb7 --- /dev/null +++ b/providertests/testdata/TestOpenRouterCommon/simple_kimi-k2_novita.yaml @@ -0,0 +1,33 @@ +--- +version: 2 +interactions: + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 229 + host: "" + body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"Say hi in Portuguese","role":"user"}],"model":"moonshotai/kimi-k2-0905","max_tokens":4000,"provider":{"only":["novita"]},"usage":{"include":true}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - OpenAI/Go 2.3.0 + url: https://openrouter.ai/api/v1/chat/completions + method: POST + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: -1 + uncompressed: true + body: "\n \n\n \n\n \n{\"id\":\"gen-1758639324-If4icmPpJg9xF7NBFIL9\",\"provider\":\"Novita\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion\",\"created\":1758639324,\"choices\":[{\"logprobs\":null,\"finish_reason\":\"stop\",\"native_finish_reason\":\"stop\",\"index\":0,\"message\":{\"role\":\"assistant\",\"content\":\"Oi!\",\"refusal\":null,\"reasoning\":null}}],\"system_fingerprint\":\"fpv0_ef28f882\",\"usage\":{\"prompt_tokens\":20,\"completion_tokens\":3,\"total_tokens\":23,\"cost\":0.0000195,\"is_byok\":false,\"prompt_tokens_details\":{\"cached_tokens\":0,\"audio_tokens\":0},\"cost_details\":{\"upstream_inference_cost\":null,\"upstream_inference_prompt_cost\":0.000012,\"upstream_inference_completions_cost\":0.0000075},\"completion_tokens_details\":{\"reasoning_tokens\":0,\"image_tokens\":0}}}" + headers: + Content-Type: + - application/json + status: 200 OK + code: 200 + duration: 1.467689625s diff --git a/providertests/testdata/TestOpenRouterCommon/simple_kimi-k2_siliconflow.yaml b/providertests/testdata/TestOpenRouterCommon/simple_kimi-k2_siliconflow.yaml new file mode 100644 index 0000000000000000000000000000000000000000..7842051e1caca279b5be87e7aad63186c0673220 --- /dev/null +++ b/providertests/testdata/TestOpenRouterCommon/simple_kimi-k2_siliconflow.yaml @@ -0,0 +1,62 @@ +--- +version: 2 +interactions: + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 234 + host: "" + body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"Say hi in Portuguese","role":"user"}],"model":"moonshotai/kimi-k2-0905","max_tokens":4000,"provider":{"only":["siliconflow"]},"usage":{"include":true}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - OpenAI/Go 2.3.0 + 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: '{"error":{"message":"Provider returned error","code":429,"metadata":{"raw":"moonshotai/kimi-k2-0905 is temporarily rate-limited upstream. Please retry shortly, or add your own key to accumulate your rate limits: https://openrouter.ai/settings/integrations","provider_name":"SiliconFlow"}},"user_id":"user_2zMGmKqlf4zmAvL9snVImB1Z1ZQ"}' + headers: + Content-Type: + - application/json + status: 429 Too Many Requests + code: 429 + duration: 3.401816333s + - id: 1 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 234 + host: "" + body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"Say hi in Portuguese","role":"user"}],"model":"moonshotai/kimi-k2-0905","max_tokens":4000,"provider":{"only":["siliconflow"]},"usage":{"include":true}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - OpenAI/Go 2.3.0 + url: https://openrouter.ai/api/v1/chat/completions + method: POST + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: -1 + uncompressed: true + body: "\n \n\n \n\n \n{\"id\":\"gen-1758639306-G4HkxVEjJmlvSXb92TQJ\",\"provider\":\"SiliconFlow\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion\",\"created\":1758639306,\"choices\":[{\"logprobs\":null,\"finish_reason\":\"stop\",\"native_finish_reason\":\"stop\",\"index\":0,\"message\":{\"role\":\"assistant\",\"content\":\"Oi!\",\"refusal\":null,\"reasoning\":null}}],\"system_fingerprint\":\"\",\"usage\":{\"prompt_tokens\":21,\"completion_tokens\":2,\"total_tokens\":23,\"cost\":0.00001676,\"is_byok\":false,\"prompt_tokens_details\":{\"cached_tokens\":0,\"audio_tokens\":0},\"cost_details\":{\"upstream_inference_cost\":null,\"upstream_inference_prompt_cost\":0.00001218,\"upstream_inference_completions_cost\":0.00000458},\"completion_tokens_details\":{\"reasoning_tokens\":0,\"image_tokens\":0}}}" + headers: + Content-Type: + - application/json + status: 200 OK + code: 200 + duration: 1.323651459s diff --git a/providertests/testdata/TestOpenRouterCommon/simple_kimi-k2_together.yaml b/providertests/testdata/TestOpenRouterCommon/simple_kimi-k2_together.yaml new file mode 100644 index 0000000000000000000000000000000000000000..8c75b7d79e5dd1187ed89d696b916b3ba5c0249d --- /dev/null +++ b/providertests/testdata/TestOpenRouterCommon/simple_kimi-k2_together.yaml @@ -0,0 +1,33 @@ +--- +version: 2 +interactions: + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 231 + host: "" + body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"Say hi in Portuguese","role":"user"}],"model":"moonshotai/kimi-k2-0905","max_tokens":4000,"usage":{"include":true},"provider":{"only":["together"]}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - OpenAI/Go 2.3.0 + url: https://openrouter.ai/api/v1/chat/completions + method: POST + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: -1 + uncompressed: true + body: "\n \n\n \n\n \n{\"id\":\"gen-1758639332-Tug4bmqaH3ANNQGKvKml\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion\",\"created\":1758639332,\"choices\":[{\"logprobs\":null,\"finish_reason\":\"stop\",\"native_finish_reason\":\"stop\",\"index\":0,\"message\":{\"role\":\"assistant\",\"content\":\"Olá!\",\"refusal\":null,\"reasoning\":null}}],\"usage\":{\"prompt_tokens\":21,\"completion_tokens\":4,\"total_tokens\":25,\"cost\":0.000033,\"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.000012},\"completion_tokens_details\":{\"reasoning_tokens\":0,\"image_tokens\":0}}}" + headers: + Content-Type: + - application/json + status: 200 OK + code: 200 + duration: 1.274655375s diff --git a/providertests/testdata/TestOpenRouterCommon/simple_kimi-k2_wandb.yaml b/providertests/testdata/TestOpenRouterCommon/simple_kimi-k2_wandb.yaml new file mode 100644 index 0000000000000000000000000000000000000000..6a04c51afc9a1c331b55ba5a3dda0a5d5b531b57 --- /dev/null +++ b/providertests/testdata/TestOpenRouterCommon/simple_kimi-k2_wandb.yaml @@ -0,0 +1,62 @@ +--- +version: 2 +interactions: + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 228 + host: "" + body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"Say hi in Portuguese","role":"user"}],"model":"moonshotai/kimi-k2-0905","max_tokens":4000,"usage":{"include":true},"provider":{"only":["wandb"]}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - OpenAI/Go 2.3.0 + 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: '{"error":{"message":"Provider returned error","code":429,"metadata":{"raw":"moonshotai/kimi-k2-0905 is temporarily rate-limited upstream. Please retry shortly, or add your own key to accumulate your rate limits: https://openrouter.ai/settings/integrations","provider_name":"WandB"}},"user_id":"user_2zMGmKqlf4zmAvL9snVImB1Z1ZQ"}' + headers: + Content-Type: + - application/json + status: 429 Too Many Requests + code: 429 + duration: 380.91475ms + - id: 1 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 228 + host: "" + body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"Say hi in Portuguese","role":"user"}],"model":"moonshotai/kimi-k2-0905","max_tokens":4000,"usage":{"include":true},"provider":{"only":["wandb"]}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - OpenAI/Go 2.3.0 + url: https://openrouter.ai/api/v1/chat/completions + method: POST + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + content_length: -1 + uncompressed: true + body: "\n \n{\"id\":\"gen-1758639338-u2WBkAEXgqR4CVf9CEDs\",\"provider\":\"WandB\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion\",\"created\":1758639338,\"choices\":[{\"logprobs\":null,\"finish_reason\":\"stop\",\"native_finish_reason\":\"stop\",\"index\":0,\"message\":{\"role\":\"assistant\",\"content\":\"Olá!\",\"refusal\":null,\"reasoning\":null}}],\"usage\":{\"prompt_tokens\":20,\"completion_tokens\":4,\"total_tokens\":24,\"cost\":0.000043,\"is_byok\":false,\"prompt_tokens_details\":{\"cached_tokens\":0,\"audio_tokens\":0},\"cost_details\":{\"upstream_inference_cost\":null,\"upstream_inference_prompt_cost\":0.000027,\"upstream_inference_completions_cost\":0.000016},\"completion_tokens_details\":{\"reasoning_tokens\":0,\"image_tokens\":0}}}" + headers: + Content-Type: + - application/json + status: 200 OK + code: 200 + duration: 693.287417ms diff --git a/providertests/testdata/TestOpenRouterCommon/simple_streaming_kimi-k2_baseten.yaml b/providertests/testdata/TestOpenRouterCommon/simple_streaming_kimi-k2_baseten.yaml new file mode 100644 index 0000000000000000000000000000000000000000..75b991c571823e10649409e6733979149430f835 --- /dev/null +++ b/providertests/testdata/TestOpenRouterCommon/simple_streaming_kimi-k2_baseten.yaml @@ -0,0 +1,44 @@ +--- +version: 2 +interactions: + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 284 + host: "" + body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"Say hi in Portuguese","role":"user"}],"model":"moonshotai/kimi-k2-0905","max_tokens":4000,"stream_options":{"include_usage":true},"provider":{"only":["baseten"]},"usage":{"include":true},"stream":true}' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - OpenAI/Go 2.3.0 + 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-1758639331-sFEtjceKZgX1JHdtpEWL","provider":"BaseTen","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639331,"choices":[{"index":0,"delta":{"role":"assistant","content":"Ol"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":null} + + data: {"id":"gen-1758639331-sFEtjceKZgX1JHdtpEWL","provider":"BaseTen","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639331,"choices":[{"index":0,"delta":{"role":"assistant","content":"á"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":null} + + data: {"id":"gen-1758639331-sFEtjceKZgX1JHdtpEWL","provider":"BaseTen","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639331,"choices":[{"index":0,"delta":{"role":"assistant","content":"!"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":null} + + data: {"id":"gen-1758639331-sFEtjceKZgX1JHdtpEWL","provider":"BaseTen","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639331,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}],"system_fingerprint":null} + + data: {"id":"gen-1758639331-sFEtjceKZgX1JHdtpEWL","provider":"BaseTen","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639331,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":21,"completion_tokens":4,"total_tokens":25,"cost":0.0000226,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.0000126,"upstream_inference_completions_cost":0.00001},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}} + + data: [DONE] + + headers: + Content-Type: + - text/event-stream + status: 200 OK + code: 200 + duration: 568.780375ms diff --git a/providertests/testdata/TestOpenRouterCommon/simple_streaming_kimi-k2_chutes.yaml b/providertests/testdata/TestOpenRouterCommon/simple_streaming_kimi-k2_chutes.yaml new file mode 100644 index 0000000000000000000000000000000000000000..cde0b9d7ded9af316377bdd8cc65ec1c14f18f16 --- /dev/null +++ b/providertests/testdata/TestOpenRouterCommon/simple_streaming_kimi-k2_chutes.yaml @@ -0,0 +1,46 @@ +--- +version: 2 +interactions: + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 283 + host: "" + body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"Say hi in Portuguese","role":"user"}],"model":"moonshotai/kimi-k2-0905","max_tokens":4000,"stream_options":{"include_usage":true},"provider":{"only":["chutes"]},"usage":{"include":true},"stream":true}' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - OpenAI/Go 2.3.0 + 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-1758639300-DbIGuRk5TqxyMyDeicfb","provider":"Chutes","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639300,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]} + + data: {"id":"gen-1758639300-DbIGuRk5TqxyMyDeicfb","provider":"Chutes","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639300,"choices":[{"index":0,"delta":{"role":"assistant","content":"Ol"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]} + + data: {"id":"gen-1758639300-DbIGuRk5TqxyMyDeicfb","provider":"Chutes","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639300,"choices":[{"index":0,"delta":{"role":"assistant","content":"á"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]} + + data: {"id":"gen-1758639300-DbIGuRk5TqxyMyDeicfb","provider":"Chutes","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639300,"choices":[{"index":0,"delta":{"role":"assistant","content":"!"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]} + + data: {"id":"gen-1758639300-DbIGuRk5TqxyMyDeicfb","provider":"Chutes","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639300,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]} + + data: {"id":"gen-1758639300-DbIGuRk5TqxyMyDeicfb","provider":"Chutes","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639300,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":21,"completion_tokens":4,"total_tokens":25,"cost":0.00001406,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.00000798,"upstream_inference_completions_cost":0.00000608},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}} + + data: [DONE] + + headers: + Content-Type: + - text/event-stream + status: 200 OK + code: 200 + duration: 704.728291ms diff --git a/providertests/testdata/TestOpenRouterCommon/simple_streaming_kimi-k2_deepinfra.yaml b/providertests/testdata/TestOpenRouterCommon/simple_streaming_kimi-k2_deepinfra.yaml new file mode 100644 index 0000000000000000000000000000000000000000..9f01dcb8523b052fc0de41354a5001c749844a8a --- /dev/null +++ b/providertests/testdata/TestOpenRouterCommon/simple_streaming_kimi-k2_deepinfra.yaml @@ -0,0 +1,44 @@ +--- +version: 2 +interactions: + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 286 + host: "" + body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"Say hi in Portuguese","role":"user"}],"model":"moonshotai/kimi-k2-0905","max_tokens":4000,"stream_options":{"include_usage":true},"provider":{"only":["deepinfra"]},"usage":{"include":true},"stream":true}' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - OpenAI/Go 2.3.0 + 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-1758639301-oQimFucmUUib7SCHhV0q","provider":"DeepInfra","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639302,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]} + + data: {"id":"gen-1758639301-oQimFucmUUib7SCHhV0q","provider":"DeepInfra","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639302,"choices":[{"index":0,"delta":{"role":"assistant","content":"Oi"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]} + + data: {"id":"gen-1758639301-oQimFucmUUib7SCHhV0q","provider":"DeepInfra","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639302,"choices":[{"index":0,"delta":{"role":"assistant","content":"!"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]} + + data: {"id":"gen-1758639301-oQimFucmUUib7SCHhV0q","provider":"DeepInfra","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639302,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]} + + data: {"id":"gen-1758639301-oQimFucmUUib7SCHhV0q","provider":"DeepInfra","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639302,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":20,"completion_tokens":2,"total_tokens":22,"cost":0.000014,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.00001,"upstream_inference_completions_cost":0.000004},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}} + + data: [DONE] + + headers: + Content-Type: + - text/event-stream + status: 200 OK + code: 200 + duration: 609.997125ms diff --git a/providertests/testdata/TestOpenRouterCommon/simple_streaming_kimi-k2_fireworks.yaml b/providertests/testdata/TestOpenRouterCommon/simple_streaming_kimi-k2_fireworks.yaml new file mode 100644 index 0000000000000000000000000000000000000000..9bc17491db0c4dce8465f8a61f2ea17a7e35403a --- /dev/null +++ b/providertests/testdata/TestOpenRouterCommon/simple_streaming_kimi-k2_fireworks.yaml @@ -0,0 +1,42 @@ +--- +version: 2 +interactions: + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 286 + host: "" + body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"Say hi in Portuguese","role":"user"}],"model":"moonshotai/kimi-k2-0905","max_tokens":4000,"stream_options":{"include_usage":true},"provider":{"only":["fireworks"]},"usage":{"include":true},"stream":true}' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - OpenAI/Go 2.3.0 + 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-1758639319-3YvVwuDwqwthyWXlQVFY","provider":"Fireworks","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639319,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]} + + data: {"id":"gen-1758639319-3YvVwuDwqwthyWXlQVFY","provider":"Fireworks","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639319,"choices":[{"index":0,"delta":{"role":"assistant","content":"Oi!"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]} + + data: {"id":"gen-1758639319-3YvVwuDwqwthyWXlQVFY","provider":"Fireworks","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639319,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]} + + data: {"id":"gen-1758639319-3YvVwuDwqwthyWXlQVFY","provider":"Fireworks","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639319,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":20,"completion_tokens":3,"total_tokens":23,"cost":0.0000195,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.000012,"upstream_inference_completions_cost":0.0000075},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}} + + data: [DONE] + + headers: + Content-Type: + - text/event-stream + status: 200 OK + code: 200 + duration: 1.570646291s diff --git a/providertests/testdata/TestOpenRouterCommon/simple_streaming_kimi-k2_moonshotai.yaml b/providertests/testdata/TestOpenRouterCommon/simple_streaming_kimi-k2_moonshotai.yaml new file mode 100644 index 0000000000000000000000000000000000000000..7948ac60d3476bd2aed66f6d550d9c514f5a3245 --- /dev/null +++ b/providertests/testdata/TestOpenRouterCommon/simple_streaming_kimi-k2_moonshotai.yaml @@ -0,0 +1,46 @@ +--- +version: 2 +interactions: + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 287 + host: "" + body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"Say hi in Portuguese","role":"user"}],"model":"moonshotai/kimi-k2-0905","max_tokens":4000,"stream_options":{"include_usage":true},"usage":{"include":true},"provider":{"only":["moonshotai"]},"stream":true}' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - OpenAI/Go 2.3.0 + 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-1758639323-AYoeSaD2V0lFcYlfea27","provider":"Moonshot AI","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639323,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":"fpv0_ef28f882"} + + data: {"id":"gen-1758639323-AYoeSaD2V0lFcYlfea27","provider":"Moonshot AI","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639323,"choices":[{"index":0,"delta":{"role":"assistant","content":"Ol"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":"fpv0_ef28f882"} + + data: {"id":"gen-1758639323-AYoeSaD2V0lFcYlfea27","provider":"Moonshot AI","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639323,"choices":[{"index":0,"delta":{"role":"assistant","content":"á"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":"fpv0_ef28f882"} + + data: {"id":"gen-1758639323-AYoeSaD2V0lFcYlfea27","provider":"Moonshot AI","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639323,"choices":[{"index":0,"delta":{"role":"assistant","content":"!"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":"fpv0_ef28f882"} + + data: {"id":"gen-1758639323-AYoeSaD2V0lFcYlfea27","provider":"Moonshot AI","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639323,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}],"system_fingerprint":"fpv0_ef28f882"} + + data: {"id":"gen-1758639323-AYoeSaD2V0lFcYlfea27","provider":"Moonshot AI","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639323,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":20,"completion_tokens":4,"total_tokens":24,"cost":0.000022,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.000012,"upstream_inference_completions_cost":0.00001},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}} + + data: [DONE] + + headers: + Content-Type: + - text/event-stream + status: 200 OK + code: 200 + duration: 1.609822667s diff --git a/providertests/testdata/TestOpenRouterCommon/simple_streaming_kimi-k2_moonshotai/turbo.yaml b/providertests/testdata/TestOpenRouterCommon/simple_streaming_kimi-k2_moonshotai/turbo.yaml new file mode 100644 index 0000000000000000000000000000000000000000..51aa2964e0779f91159b06dfb6d549f76798f1a1 --- /dev/null +++ b/providertests/testdata/TestOpenRouterCommon/simple_streaming_kimi-k2_moonshotai/turbo.yaml @@ -0,0 +1,46 @@ +--- +version: 2 +interactions: + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 293 + host: "" + body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"Say hi in Portuguese","role":"user"}],"model":"moonshotai/kimi-k2-0905","max_tokens":4000,"stream_options":{"include_usage":true},"provider":{"only":["moonshotai/turbo"]},"usage":{"include":true},"stream":true}' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - OpenAI/Go 2.3.0 + 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-1758639335-6tKyMLfjzFV2qR97Acz8","provider":"Moonshot AI","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639335,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":"fpv0_ec889fbb"} + + data: {"id":"gen-1758639335-6tKyMLfjzFV2qR97Acz8","provider":"Moonshot AI","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639335,"choices":[{"index":0,"delta":{"role":"assistant","content":"Ol"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":"fpv0_ec889fbb"} + + data: {"id":"gen-1758639335-6tKyMLfjzFV2qR97Acz8","provider":"Moonshot AI","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639335,"choices":[{"index":0,"delta":{"role":"assistant","content":"á"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":"fpv0_ec889fbb"} + + data: {"id":"gen-1758639335-6tKyMLfjzFV2qR97Acz8","provider":"Moonshot AI","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639335,"choices":[{"index":0,"delta":{"role":"assistant","content":"!"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":"fpv0_ec889fbb"} + + data: {"id":"gen-1758639335-6tKyMLfjzFV2qR97Acz8","provider":"Moonshot AI","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639335,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}],"system_fingerprint":"fpv0_ec889fbb"} + + data: {"id":"gen-1758639335-6tKyMLfjzFV2qR97Acz8","provider":"Moonshot AI","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639335,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":20,"completion_tokens":4,"total_tokens":24,"cost":0.000044,"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.00002},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}} + + data: [DONE] + + headers: + Content-Type: + - text/event-stream + status: 200 OK + code: 200 + duration: 1.289811792s diff --git a/providertests/testdata/TestOpenRouterCommon/simple_streaming_kimi-k2_novita.yaml b/providertests/testdata/TestOpenRouterCommon/simple_streaming_kimi-k2_novita.yaml new file mode 100644 index 0000000000000000000000000000000000000000..bff6e39f006b2ddb510c885f668c8f44af0d785f --- /dev/null +++ b/providertests/testdata/TestOpenRouterCommon/simple_streaming_kimi-k2_novita.yaml @@ -0,0 +1,44 @@ +--- +version: 2 +interactions: + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 283 + host: "" + body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"Say hi in Portuguese","role":"user"}],"model":"moonshotai/kimi-k2-0905","max_tokens":4000,"stream_options":{"include_usage":true},"provider":{"only":["novita"]},"usage":{"include":true},"stream":true}' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - OpenAI/Go 2.3.0 + 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-1758639326-mMzrivCI9J10CUf45IMq","provider":"Novita","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639326,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":""} + + data: {"id":"gen-1758639326-mMzrivCI9J10CUf45IMq","provider":"Novita","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639326,"choices":[{"index":0,"delta":{"role":"assistant","content":"Oi"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":""} + + data: {"id":"gen-1758639326-mMzrivCI9J10CUf45IMq","provider":"Novita","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639326,"choices":[{"index":0,"delta":{"role":"assistant","content":"!"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":""} + + data: {"id":"gen-1758639326-mMzrivCI9J10CUf45IMq","provider":"Novita","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639326,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}],"system_fingerprint":""} + + data: {"id":"gen-1758639326-mMzrivCI9J10CUf45IMq","provider":"Novita","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639326,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":21,"completion_tokens":2,"total_tokens":23,"cost":0.0000176,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.0000126,"upstream_inference_completions_cost":0.000005},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}} + + data: [DONE] + + headers: + Content-Type: + - text/event-stream + status: 200 OK + code: 200 + duration: 1.952843334s diff --git a/providertests/testdata/TestOpenRouterCommon/simple_streaming_kimi-k2_siliconflow.yaml b/providertests/testdata/TestOpenRouterCommon/simple_streaming_kimi-k2_siliconflow.yaml new file mode 100644 index 0000000000000000000000000000000000000000..bbefef9b71e76429b72407f189697e20b6b95c52 --- /dev/null +++ b/providertests/testdata/TestOpenRouterCommon/simple_streaming_kimi-k2_siliconflow.yaml @@ -0,0 +1,44 @@ +--- +version: 2 +interactions: + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 288 + host: "" + body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"Say hi in Portuguese","role":"user"}],"model":"moonshotai/kimi-k2-0905","max_tokens":4000,"stream_options":{"include_usage":true},"provider":{"only":["siliconflow"]},"usage":{"include":true},"stream":true}' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - OpenAI/Go 2.3.0 + 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-1758639308-HFBLo1Zjk56YcERtInn9","provider":"SiliconFlow","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639308,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":""} + + data: {"id":"gen-1758639308-HFBLo1Zjk56YcERtInn9","provider":"SiliconFlow","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639308,"choices":[{"index":0,"delta":{"role":"assistant","content":"Oi"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":""} + + data: {"id":"gen-1758639308-HFBLo1Zjk56YcERtInn9","provider":"SiliconFlow","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639308,"choices":[{"index":0,"delta":{"role":"assistant","content":"!"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"system_fingerprint":""} + + data: {"id":"gen-1758639308-HFBLo1Zjk56YcERtInn9","provider":"SiliconFlow","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639308,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}],"system_fingerprint":""} + + data: {"id":"gen-1758639308-HFBLo1Zjk56YcERtInn9","provider":"SiliconFlow","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639308,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":21,"completion_tokens":2,"total_tokens":23,"cost":0.00001676,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.00001218,"upstream_inference_completions_cost":0.00000458},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}} + + data: [DONE] + + headers: + Content-Type: + - text/event-stream + status: 200 OK + code: 200 + duration: 1.296429666s diff --git a/providertests/testdata/TestOpenRouterCommon/simple_streaming_kimi-k2_together.yaml b/providertests/testdata/TestOpenRouterCommon/simple_streaming_kimi-k2_together.yaml new file mode 100644 index 0000000000000000000000000000000000000000..9caf8e4daab62cd5d4e1d3ca880436eebc8236f9 --- /dev/null +++ b/providertests/testdata/TestOpenRouterCommon/simple_streaming_kimi-k2_together.yaml @@ -0,0 +1,46 @@ +--- +version: 2 +interactions: + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 285 + host: "" + body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"Say hi in Portuguese","role":"user"}],"model":"moonshotai/kimi-k2-0905","max_tokens":4000,"stream_options":{"include_usage":true},"provider":{"only":["together"]},"usage":{"include":true},"stream":true}' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - OpenAI/Go 2.3.0 + 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-1758639333-BByAqWD42pHSJWup3zEp","provider":"Together","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639333,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]} + + data: {"id":"gen-1758639333-BByAqWD42pHSJWup3zEp","provider":"Together","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639333,"choices":[{"index":0,"delta":{"role":"assistant","content":"Ol"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]} + + data: {"id":"gen-1758639333-BByAqWD42pHSJWup3zEp","provider":"Together","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639333,"choices":[{"index":0,"delta":{"role":"assistant","content":"á"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]} + + data: {"id":"gen-1758639333-BByAqWD42pHSJWup3zEp","provider":"Together","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639333,"choices":[{"index":0,"delta":{"role":"assistant","content":"!"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]} + + data: {"id":"gen-1758639333-BByAqWD42pHSJWup3zEp","provider":"Together","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639333,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]} + + data: {"id":"gen-1758639333-BByAqWD42pHSJWup3zEp","provider":"Together","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639333,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":21,"completion_tokens":4,"total_tokens":25,"cost":0.000033,"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.000012},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}} + + data: [DONE] + + headers: + Content-Type: + - text/event-stream + status: 200 OK + code: 200 + duration: 630.269125ms diff --git a/providertests/testdata/TestOpenRouterCommon/simple_streaming_kimi-k2_wandb.yaml b/providertests/testdata/TestOpenRouterCommon/simple_streaming_kimi-k2_wandb.yaml new file mode 100644 index 0000000000000000000000000000000000000000..b5adf4e0ceab6d66c8421ea366c309817eb070e1 --- /dev/null +++ b/providertests/testdata/TestOpenRouterCommon/simple_streaming_kimi-k2_wandb.yaml @@ -0,0 +1,46 @@ +--- +version: 2 +interactions: + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 282 + host: "" + body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"Say hi in Portuguese","role":"user"}],"model":"moonshotai/kimi-k2-0905","max_tokens":4000,"stream_options":{"include_usage":true},"provider":{"only":["wandb"]},"usage":{"include":true},"stream":true}' + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - OpenAI/Go 2.3.0 + 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-1758639338-aZHT7rLqW05Vh35xd7ga","provider":"WandB","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639338,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]} + + data: {"id":"gen-1758639338-aZHT7rLqW05Vh35xd7ga","provider":"WandB","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639338,"choices":[{"index":0,"delta":{"role":"assistant","content":"Ol"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]} + + data: {"id":"gen-1758639338-aZHT7rLqW05Vh35xd7ga","provider":"WandB","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639338,"choices":[{"index":0,"delta":{"role":"assistant","content":"á"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]} + + data: {"id":"gen-1758639338-aZHT7rLqW05Vh35xd7ga","provider":"WandB","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639338,"choices":[{"index":0,"delta":{"role":"assistant","content":"!"},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]} + + data: {"id":"gen-1758639338-aZHT7rLqW05Vh35xd7ga","provider":"WandB","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639338,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]} + + data: {"id":"gen-1758639338-aZHT7rLqW05Vh35xd7ga","provider":"WandB","model":"moonshotai/kimi-k2-0905","object":"chat.completion.chunk","created":1758639338,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":20,"completion_tokens":4,"total_tokens":24,"cost":0.000043,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.000027,"upstream_inference_completions_cost":0.000016},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}} + + data: [DONE] + + headers: + Content-Type: + - text/event-stream + status: 200 OK + code: 200 + duration: 320.202417ms diff --git a/providertests/testdata/TestSimple/anthropic-claude-sonnet.yaml b/providertests/testdata/TestSimple/anthropic-claude-sonnet.yaml deleted file mode 100644 index 00c4970125fd011cd782733a01411adcb151834c..0000000000000000000000000000000000000000 --- a/providertests/testdata/TestSimple/anthropic-claude-sonnet.yaml +++ /dev/null @@ -1,33 +0,0 @@ ---- -version: 2 -interactions: -- id: 0 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 205 - host: "" - body: "{\"max_tokens\":4096,\"messages\":[{\"content\":[{\"text\":\"Say hi in Portuguese\",\"type\":\"text\"}],\"role\":\"user\"}],\"model\":\"claude-sonnet-4-20250514\",\"system\":[{\"text\":\"You are a helpful assistant\",\"type\":\"text\"}]}" - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - Anthropic/Go 1.10.0 - url: https://api.anthropic.com/v1/messages - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - uncompressed: true - body: "{\"id\":\"msg_014AQFTJZeZ1KNGT5y9TSMSs\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"claude-sonnet-4-20250514\",\"content\":[{\"type\":\"text\",\"text\":\"Oi! or Olá!\\n\\nBoth are common ways to say \\\"hi\\\" in Portuguese. \\\"Oi\\\" is more casual and commonly used in Brazilian Portuguese, while \\\"Olá\\\" is a bit more formal and used in both Brazilian and European Portuguese.\"}],\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"usage\":{\"input_tokens\":16,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":60,\"service_tier\":\"standard\"}}" - headers: - Content-Type: - - application/json - status: 200 OK - code: 200 - duration: 2.412166125s diff --git a/providertests/testdata/TestSimple/google-gemini-2.5-flash.yaml b/providertests/testdata/TestSimple/google-gemini-2.5-flash.yaml deleted file mode 100644 index 6c14a2a7c570877f02aa5e7de77c9d0b98f5ea95..0000000000000000000000000000000000000000 --- a/providertests/testdata/TestSimple/google-gemini-2.5-flash.yaml +++ /dev/null @@ -1,31 +0,0 @@ ---- -version: 2 -interactions: -- id: 0 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 180 - host: generativelanguage.googleapis.com - body: "{\"contents\":[{\"parts\":[{\"text\":\"Say hi in Portuguese\"}],\"role\":\"user\"}],\"generationConfig\":{},\"systemInstruction\":{\"parts\":[{\"text\":\"You are a helpful assistant\"}],\"role\":\"user\"}}\n" - headers: - Content-Type: - - application/json - User-Agent: - - google-genai-sdk/1.23.0 gl-go/go1.24.5 - url: https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - uncompressed: true - body: "{\n \"candidates\": [\n {\n \"content\": {\n \"parts\": [\n {\n \"text\": \"Olá!\"\n }\n ],\n \"role\": \"model\"\n },\n \"finishReason\": \"STOP\",\n \"index\": 0\n }\n ],\n \"usageMetadata\": {\n \"promptTokenCount\": 11,\n \"candidatesTokenCount\": 2,\n \"totalTokenCount\": 39,\n \"promptTokensDetails\": [\n {\n \"modality\": \"TEXT\",\n \"tokenCount\": 11\n }\n ],\n \"thoughtsTokenCount\": 26\n },\n \"modelVersion\": \"gemini-2.5-flash\",\n \"responseId\": \"_Ei7aJ_lFZ7nz7IPwKK82Qw\"\n}\n" - headers: - Content-Type: - - application/json; charset=UTF-8 - status: 200 OK - code: 200 - duration: 1.683615083s diff --git a/providertests/testdata/TestSimple/google-gemini-2.5-pro.yaml b/providertests/testdata/TestSimple/google-gemini-2.5-pro.yaml deleted file mode 100644 index 46fc97e4c405d48b41dabfeb43dd21c271f5f68f..0000000000000000000000000000000000000000 --- a/providertests/testdata/TestSimple/google-gemini-2.5-pro.yaml +++ /dev/null @@ -1,31 +0,0 @@ ---- -version: 2 -interactions: -- id: 0 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 180 - host: generativelanguage.googleapis.com - body: "{\"contents\":[{\"parts\":[{\"text\":\"Say hi in Portuguese\"}],\"role\":\"user\"}],\"generationConfig\":{},\"systemInstruction\":{\"parts\":[{\"text\":\"You are a helpful assistant\"}],\"role\":\"user\"}}\n" - headers: - Content-Type: - - application/json - User-Agent: - - google-genai-sdk/1.23.0 gl-go/go1.24.5 - url: https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-pro:generateContent - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - uncompressed: true - body: "{\n \"candidates\": [\n {\n \"content\": {\n \"parts\": [\n {\n \"text\": \"Of course!\\n\\nThe most common ways to say \\\"hi\\\" in Portuguese are:\\n\\n* **Oi** (more informal, like \\\"hi\\\")\\n* **Olá** (a bit more standard, like \\\"hello\\\")\\n\\nYou can also use greetings that depend on the time of day:\\n\\n* **Bom dia** (Good morning)\\n* **Boa tarde** (Good afternoon)\\n* **Boa noite** (Good evening / Good night)\"\n }\n ],\n \"role\": \"model\"\n },\n \"finishReason\": \"STOP\",\n \"index\": 0\n }\n ],\n \"usageMetadata\": {\n \"promptTokenCount\": 11,\n \"candidatesTokenCount\": 97,\n \"totalTokenCount\": 830,\n \"promptTokensDetails\": [\n {\n \"modality\": \"TEXT\",\n \"tokenCount\": 11\n }\n ],\n \"thoughtsTokenCount\": 722\n },\n \"modelVersion\": \"gemini-2.5-pro\",\n \"responseId\": \"ZovAaND9LPiK6dkPtrLnqQM\"\n}\n" - headers: - Content-Type: - - application/json; charset=UTF-8 - status: 200 OK - code: 200 - duration: 7.97170275s diff --git a/providertests/testdata/TestSimple/openai-gpt-4o-mini.yaml b/providertests/testdata/TestSimple/openai-gpt-4o-mini.yaml deleted file mode 100644 index 662adf566db7182adec747e3b5ac6f1de2ef58a2..0000000000000000000000000000000000000000 --- a/providertests/testdata/TestSimple/openai-gpt-4o-mini.yaml +++ /dev/null @@ -1,33 +0,0 @@ ---- -version: 2 -interactions: -- id: 0 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 143 - host: "" - body: "{\"messages\":[{\"content\":\"You are a helpful assistant\",\"role\":\"system\"},{\"content\":\"Say hi in Portuguese\",\"role\":\"user\"}],\"model\":\"gpt-4o-mini\"}" - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - OpenAI/Go 2.3.0 - url: https://api.openai.com/v1/chat/completions - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - uncompressed: true - body: "{\n \"id\": \"chatcmpl-CC86Cz7oEjbaC9INACjv4rZgUqkui\",\n \"object\": \"chat.completion\",\n \"created\": 1757007104,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": \"Olá!\",\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 20,\n \"completion_tokens\": 2,\n \"total_tokens\": 22,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_e665f7564b\"\n}\n" - headers: - Content-Type: - - application/json - status: 200 OK - code: 200 - duration: 1.377235042s diff --git a/providertests/testdata/TestSimple/openai-gpt-4o.yaml b/providertests/testdata/TestSimple/openai-gpt-4o.yaml deleted file mode 100644 index 72b7135ec8807e5c293ed3cbb6f4a43ac33f7da3..0000000000000000000000000000000000000000 --- a/providertests/testdata/TestSimple/openai-gpt-4o.yaml +++ /dev/null @@ -1,33 +0,0 @@ ---- -version: 2 -interactions: -- id: 0 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 138 - host: "" - body: "{\"messages\":[{\"content\":\"You are a helpful assistant\",\"role\":\"system\"},{\"content\":\"Say hi in Portuguese\",\"role\":\"user\"}],\"model\":\"gpt-4o\"}" - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - OpenAI/Go 2.3.0 - url: https://api.openai.com/v1/chat/completions - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - uncompressed: true - body: "{\n \"id\": \"chatcmpl-CBolfurp0H2jFXSwJHVGbLWOYHhbM\",\n \"object\": \"chat.completion\",\n \"created\": 1756932795,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": \"Olá! Como posso ajudar você hoje?\",\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 20,\n \"completion_tokens\": 8,\n \"total_tokens\": 28,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_f33640a400\"\n}\n" - headers: - Content-Type: - - application/json - status: 200 OK - code: 200 - duration: 3.363218s diff --git a/providertests/testdata/TestSimple/openrouter-kimi-k2.yaml b/providertests/testdata/TestSimple/openrouter-kimi-k2.yaml deleted file mode 100644 index f4cb92cea21d802469d2ddec3dbc691a336cfbeb..0000000000000000000000000000000000000000 --- a/providertests/testdata/TestSimple/openrouter-kimi-k2.yaml +++ /dev/null @@ -1,33 +0,0 @@ ---- -version: 2 -interactions: - - id: 0 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 180 - host: "" - body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"Say hi in Portuguese","role":"user"}],"model":"moonshotai/kimi-k2-0905","usage":{"include":true}}' - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - OpenAI/Go 2.3.0 - url: https://openrouter.ai/api/v1/chat/completions - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - uncompressed: true - body: '{"id":"gen-1758536663-isAYACl4o5P2svHApNjR","provider":"DeepInfra","model":"moonshotai/kimi-k2-0905","object":"chat.completion","created":1758536663,"choices":[{"logprobs":null,"finish_reason":"stop","native_finish_reason":"stop","index":0,"message":{"role":"assistant","content":"Olá!","refusal":null,"reasoning":null}}],"usage":{"prompt_tokens":20,"completion_tokens":3,"total_tokens":23,"cost":0.000016,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.00001,"upstream_inference_completions_cost":0.000006},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}' - headers: - Content-Type: - - application/json - status: 200 OK - code: 200 - duration: 937.162041ms diff --git a/providertests/testdata/TestStream/anthropic-claude-sonnet.yaml b/providertests/testdata/TestStream/anthropic-claude-sonnet.yaml deleted file mode 100644 index a5ece02f5e096e81ccff49add8bd61a1e2b32e1e..0000000000000000000000000000000000000000 --- a/providertests/testdata/TestStream/anthropic-claude-sonnet.yaml +++ /dev/null @@ -1,32 +0,0 @@ ---- -version: 2 -interactions: -- id: 0 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 227 - host: "" - body: "{\"max_tokens\":4096,\"messages\":[{\"content\":[{\"text\":\"Count from 1 to 3 in Spanish\",\"type\":\"text\"}],\"role\":\"user\"}],\"model\":\"claude-sonnet-4-20250514\",\"system\":[{\"text\":\"You are a helpful assistant\",\"type\":\"text\"}],\"stream\":true}" - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - Anthropic/Go 1.10.0 - url: https://api.anthropic.com/v1/messages - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - body: "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"msg_01LC9keN4A55kbF4ZSERTbqh\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"claude-sonnet-4-20250514\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":23,\"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\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"1 - uno\"} }\n\nevent: ping\ndata: {\"type\": \"ping\"}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"\\n2 - dos \\n3\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" - tres\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":23,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":19} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n" - headers: - Content-Type: - - text/event-stream; charset=utf-8 - status: 200 OK - code: 200 - duration: 924.937333ms diff --git a/providertests/testdata/TestStream/google-gemini-2.5-flash.yaml b/providertests/testdata/TestStream/google-gemini-2.5-flash.yaml deleted file mode 100644 index a387948b1675c09b7ff26ae42a53affe3cc5c7bd..0000000000000000000000000000000000000000 --- a/providertests/testdata/TestStream/google-gemini-2.5-flash.yaml +++ /dev/null @@ -1,33 +0,0 @@ ---- -version: 2 -interactions: -- id: 0 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 188 - host: generativelanguage.googleapis.com - body: "{\"contents\":[{\"parts\":[{\"text\":\"Count from 1 to 3 in Spanish\"}],\"role\":\"user\"}],\"generationConfig\":{},\"systemInstruction\":{\"parts\":[{\"text\":\"You are a helpful assistant\"}],\"role\":\"user\"}}\n" - form: - alt: - - sse - headers: - Content-Type: - - application/json - User-Agent: - - google-genai-sdk/1.23.0 gl-go/go1.24.5 - url: https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:streamGenerateContent?alt=sse - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - body: "data: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \"Here you go:\\n\\n1. **Uno**\\n2. **Dos**\\n3. **Tres**\"}],\"role\": \"model\"},\"finishReason\": \"STOP\",\"index\": 0}],\"usageMetadata\": {\"promptTokenCount\": 16,\"candidatesTokenCount\": 25,\"totalTokenCount\": 74,\"promptTokensDetails\": [{\"modality\": \"TEXT\",\"tokenCount\": 16}],\"thoughtsTokenCount\": 33},\"modelVersion\": \"gemini-2.5-flash\",\"responseId\": \"jl3AaOWjGefyqtsPi_C6sAM\"}\r\n\r\n" - headers: - Content-Type: - - text/event-stream - status: 200 OK - code: 200 - duration: 1.178272625s diff --git a/providertests/testdata/TestStream/google-gemini-2.5-pro.yaml b/providertests/testdata/TestStream/google-gemini-2.5-pro.yaml deleted file mode 100644 index 496d788e27ca4cc40223f3b7844ab6acd39ac797..0000000000000000000000000000000000000000 --- a/providertests/testdata/TestStream/google-gemini-2.5-pro.yaml +++ /dev/null @@ -1,33 +0,0 @@ ---- -version: 2 -interactions: -- id: 0 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 188 - host: generativelanguage.googleapis.com - body: "{\"contents\":[{\"parts\":[{\"text\":\"Count from 1 to 3 in Spanish\"}],\"role\":\"user\"}],\"generationConfig\":{},\"systemInstruction\":{\"parts\":[{\"text\":\"You are a helpful assistant\"}],\"role\":\"user\"}}\n" - form: - alt: - - sse - headers: - Content-Type: - - application/json - User-Agent: - - google-genai-sdk/1.23.0 gl-go/go1.24.5 - url: https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-pro:streamGenerateContent?alt=sse - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - body: "data: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \"Of course! Here is how you count from 1 to 3 in Spanish:\\n\\n1. **Uno**\"}],\"role\": \"model\"},\"index\": 0}],\"usageMetadata\": {\"promptTokenCount\": 16,\"candidatesTokenCount\": 24,\"totalTokenCount\": 717,\"promptTokensDetails\": [{\"modality\": \"TEXT\",\"tokenCount\": 16}],\"thoughtsTokenCount\": 677},\"modelVersion\": \"gemini-2.5-pro\",\"responseId\": \"IIvAaJnINPn6qtsPoq_lgQM\"}\r\n\r\ndata: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \"\\n2. **Dos**\\n3. **Tres**\"}],\"role\": \"model\"},\"finishReason\": \"STOP\",\"index\": 0}],\"usageMetadata\": {\"promptTokenCount\": 16,\"candidatesTokenCount\": 37,\"totalTokenCount\": 730,\"promptTokensDetails\": [{\"modality\": \"TEXT\",\"tokenCount\": 16}],\"thoughtsTokenCount\": 677},\"modelVersion\": \"gemini-2.5-pro\",\"responseId\": \"IIvAaJnINPn6qtsPoq_lgQM\"}\r\n\r\n" - headers: - Content-Type: - - text/event-stream - status: 200 OK - code: 200 - duration: 6.777174625s diff --git a/providertests/testdata/TestStream/openai-gpt-4o-mini.yaml b/providertests/testdata/TestStream/openai-gpt-4o-mini.yaml deleted file mode 100644 index f033bf5dd1900b4e7cf3ce0223f563d7ef18cfce..0000000000000000000000000000000000000000 --- a/providertests/testdata/TestStream/openai-gpt-4o-mini.yaml +++ /dev/null @@ -1,32 +0,0 @@ ---- -version: 2 -interactions: -- id: 0 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 205 - host: "" - body: "{\"messages\":[{\"content\":\"You are a helpful assistant\",\"role\":\"system\"},{\"content\":\"Count from 1 to 3 in Spanish\",\"role\":\"user\"}],\"model\":\"gpt-4o-mini\",\"stream_options\":{\"include_usage\":true},\"stream\":true}" - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - OpenAI/Go 2.3.0 - url: https://api.openai.com/v1/chat/completions - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - body: "data: {\"id\":\"chatcmpl-CC86GJzAnNH4KeIucQvSjcw9ApvP1\",\"object\":\"chat.completion.chunk\",\"created\":1757007108,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_e665f7564b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"MdM0iUdCi\"}\n\ndata: {\"id\":\"chatcmpl-CC86GJzAnNH4KeIucQvSjcw9ApvP1\",\"object\":\"chat.completion.chunk\",\"created\":1757007108,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_e665f7564b\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"Sure\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"0WYvyGg\"}\n\ndata: {\"id\":\"chatcmpl-CC86GJzAnNH4KeIucQvSjcw9ApvP1\",\"object\":\"chat.completion.chunk\",\"created\":1757007108,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_e665f7564b\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"!\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"O4x0jEzy77\"}\n\ndata: {\"id\":\"chatcmpl-CC86GJzAnNH4KeIucQvSjcw9ApvP1\",\"object\":\"chat.completion.chunk\",\"created\":1757007108,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_e665f7564b\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" Here\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"hFhgoZ\"}\n\ndata: {\"id\":\"chatcmpl-CC86GJzAnNH4KeIucQvSjcw9ApvP1\",\"object\":\"chat.completion.chunk\",\"created\":1757007108,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_e665f7564b\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" is\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"21niu3eg\"}\n\ndata: {\"id\":\"chatcmpl-CC86GJzAnNH4KeIucQvSjcw9ApvP1\",\"object\":\"chat.completion.chunk\",\"created\":1757007108,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_e665f7564b\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" the\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"Q1U79RV\"}\n\ndata: {\"id\":\"chatcmpl-CC86GJzAnNH4KeIucQvSjcw9ApvP1\",\"object\":\"chat.completion.chunk\",\"created\":1757007108,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_e665f7564b\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" counting\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"n3\"}\n\ndata: {\"id\":\"chatcmpl-CC86GJzAnNH4KeIucQvSjcw9ApvP1\",\"object\":\"chat.completion.chunk\",\"created\":1757007108,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_e665f7564b\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" from\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"m8aW0r\"}\n\ndata: {\"id\":\"chatcmpl-CC86GJzAnNH4KeIucQvSjcw9ApvP1\",\"object\":\"chat.completion.chunk\",\"created\":1757007108,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_e665f7564b\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"SoH0gBsrYI\"}\n\ndata: {\"id\":\"chatcmpl-CC86GJzAnNH4KeIucQvSjcw9ApvP1\",\"object\":\"chat.completion.chunk\",\"created\":1757007108,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_e665f7564b\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"1\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"RDpov9RJ21\"}\n\ndata: {\"id\":\"chatcmpl-CC86GJzAnNH4KeIucQvSjcw9ApvP1\",\"object\":\"chat.completion.chunk\",\"created\":1757007108,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_e665f7564b\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" to\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"Pd02xohG\"}\n\ndata: {\"id\":\"chatcmpl-CC86GJzAnNH4KeIucQvSjcw9ApvP1\",\"object\":\"chat.completion.chunk\",\"created\":1757007108,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_e665f7564b\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"YEupeYkvgT\"}\n\ndata: {\"id\":\"chatcmpl-CC86GJzAnNH4KeIucQvSjcw9ApvP1\",\"object\":\"chat.completion.chunk\",\"created\":1757007108,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_e665f7564b\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"3\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"xPQZkPJmmD\"}\n\ndata: {\"id\":\"chatcmpl-CC86GJzAnNH4KeIucQvSjcw9ApvP1\",\"object\":\"chat.completion.chunk\",\"created\":1757007108,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_e665f7564b\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" in\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"x8LjLQvm\"}\n\ndata: {\"id\":\"chatcmpl-CC86GJzAnNH4KeIucQvSjcw9ApvP1\",\"object\":\"chat.completion.chunk\",\"created\":1757007108,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_e665f7564b\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" Spanish\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"HXj\"}\n\ndata: {\"id\":\"chatcmpl-CC86GJzAnNH4KeIucQvSjcw9ApvP1\",\"object\":\"chat.completion.chunk\",\"created\":1757007108,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_e665f7564b\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\":\\n\\n\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"6GrBPJ\"}\n\ndata: {\"id\":\"chatcmpl-CC86GJzAnNH4KeIucQvSjcw9ApvP1\",\"object\":\"chat.completion.chunk\",\"created\":1757007108,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_e665f7564b\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"1\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"dmyuaXYXjr\"}\n\ndata: {\"id\":\"chatcmpl-CC86GJzAnNH4KeIucQvSjcw9ApvP1\",\"object\":\"chat.completion.chunk\",\"created\":1757007108,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_e665f7564b\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"XXstNKfoS7\"}\n\ndata: {\"id\":\"chatcmpl-CC86GJzAnNH4KeIucQvSjcw9ApvP1\",\"object\":\"chat.completion.chunk\",\"created\":1757007108,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_e665f7564b\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" Uno\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"Z38XQzw\"}\n\ndata: {\"id\":\"chatcmpl-CC86GJzAnNH4KeIucQvSjcw9ApvP1\",\"object\":\"chat.completion.chunk\",\"created\":1757007108,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_e665f7564b\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"\\n\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"L5vhFF9y7\"}\n\ndata: {\"id\":\"chatcmpl-CC86GJzAnNH4KeIucQvSjcw9ApvP1\",\"object\":\"chat.completion.chunk\",\"created\":1757007108,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_e665f7564b\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"2\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"Q2P9ThvZgh\"}\n\ndata: {\"id\":\"chatcmpl-CC86GJzAnNH4KeIucQvSjcw9ApvP1\",\"object\":\"chat.completion.chunk\",\"created\":1757007108,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_e665f7564b\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"WIIywHPwle\"}\n\ndata: {\"id\":\"chatcmpl-CC86GJzAnNH4KeIucQvSjcw9ApvP1\",\"object\":\"chat.completion.chunk\",\"created\":1757007108,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_e665f7564b\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" Dos\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"c3CsgGA\"}\n\ndata: {\"id\":\"chatcmpl-CC86GJzAnNH4KeIucQvSjcw9ApvP1\",\"object\":\"chat.completion.chunk\",\"created\":1757007108,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_e665f7564b\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"\\n\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"CNPc8eacZ\"}\n\ndata: {\"id\":\"chatcmpl-CC86GJzAnNH4KeIucQvSjcw9ApvP1\",\"object\":\"chat.completion.chunk\",\"created\":1757007108,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_e665f7564b\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"3\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"eFqdAD3vb8\"}\n\ndata: {\"id\":\"chatcmpl-CC86GJzAnNH4KeIucQvSjcw9ApvP1\",\"object\":\"chat.completion.chunk\",\"created\":1757007108,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_e665f7564b\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"pc8kDYYOmv\"}\n\ndata: {\"id\":\"chatcmpl-CC86GJzAnNH4KeIucQvSjcw9ApvP1\",\"object\":\"chat.completion.chunk\",\"created\":1757007108,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_e665f7564b\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" Tres\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"NjLFvL\"}\n\ndata: {\"id\":\"chatcmpl-CC86GJzAnNH4KeIucQvSjcw9ApvP1\",\"object\":\"chat.completion.chunk\",\"created\":1757007108,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_e665f7564b\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}],\"usage\":null,\"obfuscation\":\"BMBVR\"}\n\ndata: {\"id\":\"chatcmpl-CC86GJzAnNH4KeIucQvSjcw9ApvP1\",\"object\":\"chat.completion.chunk\",\"created\":1757007108,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_e665f7564b\",\"choices\":[],\"usage\":{\"prompt_tokens\":25,\"completion_tokens\":26,\"total_tokens\":51,\"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\":\"WnRGyJ1PLM\"}\n\ndata: [DONE]\n\n" - headers: - Content-Type: - - text/event-stream; charset=utf-8 - status: 200 OK - code: 200 - duration: 1.171848125s diff --git a/providertests/testdata/TestStream/openai-gpt-4o.yaml b/providertests/testdata/TestStream/openai-gpt-4o.yaml deleted file mode 100644 index ac47d448270599f6b3e55bb8729eb2460df89433..0000000000000000000000000000000000000000 --- a/providertests/testdata/TestStream/openai-gpt-4o.yaml +++ /dev/null @@ -1,32 +0,0 @@ ---- -version: 2 -interactions: -- id: 0 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 200 - host: "" - body: "{\"messages\":[{\"content\":\"You are a helpful assistant\",\"role\":\"system\"},{\"content\":\"Count from 1 to 3 in Spanish\",\"role\":\"user\"}],\"model\":\"gpt-4o\",\"stream_options\":{\"include_usage\":true},\"stream\":true}" - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - OpenAI/Go 2.3.0 - url: https://api.openai.com/v1/chat/completions - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - body: "data: {\"id\":\"chatcmpl-CC7KTblMWEfVKNHjLNnFwvi0m8DFE\",\"object\":\"chat.completion.chunk\",\"created\":1757004145,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"iussH0LBg1XxJN\"}\n\ndata: {\"id\":\"chatcmpl-CC7KTblMWEfVKNHjLNnFwvi0m8DFE\",\"object\":\"chat.completion.chunk\",\"created\":1757004145,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"Sure\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"Ut9uBKsz3oTx\"}\n\ndata: {\"id\":\"chatcmpl-CC7KTblMWEfVKNHjLNnFwvi0m8DFE\",\"object\":\"chat.completion.chunk\",\"created\":1757004145,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"!\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"7GBuOOfjVIPLjDY\"}\n\ndata: {\"id\":\"chatcmpl-CC7KTblMWEfVKNHjLNnFwvi0m8DFE\",\"object\":\"chat.completion.chunk\",\"created\":1757004145,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" In\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"d9GWSSttWv8lN\"}\n\ndata: {\"id\":\"chatcmpl-CC7KTblMWEfVKNHjLNnFwvi0m8DFE\",\"object\":\"chat.completion.chunk\",\"created\":1757004145,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" Spanish\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"ptr1Mq2J\"}\n\ndata: {\"id\":\"chatcmpl-CC7KTblMWEfVKNHjLNnFwvi0m8DFE\",\"object\":\"chat.completion.chunk\",\"created\":1757004145,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\",\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"KrKRxanTn8EuWAe\"}\n\ndata: {\"id\":\"chatcmpl-CC7KTblMWEfVKNHjLNnFwvi0m8DFE\",\"object\":\"chat.completion.chunk\",\"created\":1757004145,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" counting\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"KzaUquV\"}\n\ndata: {\"id\":\"chatcmpl-CC7KTblMWEfVKNHjLNnFwvi0m8DFE\",\"object\":\"chat.completion.chunk\",\"created\":1757004145,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" from\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"FkX07hTx3TF\"}\n\ndata: {\"id\":\"chatcmpl-CC7KTblMWEfVKNHjLNnFwvi0m8DFE\",\"object\":\"chat.completion.chunk\",\"created\":1757004145,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"2ZMZIj2oiXvLcxn\"}\n\ndata: {\"id\":\"chatcmpl-CC7KTblMWEfVKNHjLNnFwvi0m8DFE\",\"object\":\"chat.completion.chunk\",\"created\":1757004145,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"1\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"UX1rge5Ob1J0kOI\"}\n\ndata: {\"id\":\"chatcmpl-CC7KTblMWEfVKNHjLNnFwvi0m8DFE\",\"object\":\"chat.completion.chunk\",\"created\":1757004145,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" to\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"BAGM5tj5WkNjW\"}\n\ndata: {\"id\":\"chatcmpl-CC7KTblMWEfVKNHjLNnFwvi0m8DFE\",\"object\":\"chat.completion.chunk\",\"created\":1757004145,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"qQ0ETIlKihAOAE7\"}\n\ndata: {\"id\":\"chatcmpl-CC7KTblMWEfVKNHjLNnFwvi0m8DFE\",\"object\":\"chat.completion.chunk\",\"created\":1757004145,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"3\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"Gl1TPKRizlWwiwI\"}\n\ndata: {\"id\":\"chatcmpl-CC7KTblMWEfVKNHjLNnFwvi0m8DFE\",\"object\":\"chat.completion.chunk\",\"created\":1757004145,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" is\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"SF4BgD7Pw39gI\"}\n\ndata: {\"id\":\"chatcmpl-CC7KTblMWEfVKNHjLNnFwvi0m8DFE\",\"object\":\"chat.completion.chunk\",\"created\":1757004145,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\":\\n\\n\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"B40X3SCV1tv\"}\n\ndata: {\"id\":\"chatcmpl-CC7KTblMWEfVKNHjLNnFwvi0m8DFE\",\"object\":\"chat.completion.chunk\",\"created\":1757004145,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"1\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"ZUpUw67SCpRAtht\"}\n\ndata: {\"id\":\"chatcmpl-CC7KTblMWEfVKNHjLNnFwvi0m8DFE\",\"object\":\"chat.completion.chunk\",\"created\":1757004145,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"3bNT0rvK44BGeqi\"}\n\ndata: {\"id\":\"chatcmpl-CC7KTblMWEfVKNHjLNnFwvi0m8DFE\",\"object\":\"chat.completion.chunk\",\"created\":1757004145,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" Uno\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"L6bruBJ5A7fA\"}\n\ndata: {\"id\":\"chatcmpl-CC7KTblMWEfVKNHjLNnFwvi0m8DFE\",\"object\":\"chat.completion.chunk\",\"created\":1757004145,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"\\n\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"tPHymjAuf4HtlD\"}\n\ndata: {\"id\":\"chatcmpl-CC7KTblMWEfVKNHjLNnFwvi0m8DFE\",\"object\":\"chat.completion.chunk\",\"created\":1757004145,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"2\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"C4lbztDMhus6xvv\"}\n\ndata: {\"id\":\"chatcmpl-CC7KTblMWEfVKNHjLNnFwvi0m8DFE\",\"object\":\"chat.completion.chunk\",\"created\":1757004145,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"JBrRK1Ly6feOSPa\"}\n\ndata: {\"id\":\"chatcmpl-CC7KTblMWEfVKNHjLNnFwvi0m8DFE\",\"object\":\"chat.completion.chunk\",\"created\":1757004145,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" Dos\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"zMXBzcxHyuX6\"}\n\ndata: {\"id\":\"chatcmpl-CC7KTblMWEfVKNHjLNnFwvi0m8DFE\",\"object\":\"chat.completion.chunk\",\"created\":1757004145,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"\\n\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"6YPK2aWh7M9ACK\"}\n\ndata: {\"id\":\"chatcmpl-CC7KTblMWEfVKNHjLNnFwvi0m8DFE\",\"object\":\"chat.completion.chunk\",\"created\":1757004145,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"3\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"V8BqeMEkcu7GvU5\"}\n\ndata: {\"id\":\"chatcmpl-CC7KTblMWEfVKNHjLNnFwvi0m8DFE\",\"object\":\"chat.completion.chunk\",\"created\":1757004145,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"nfRygsLG3J6zfnG\"}\n\ndata: {\"id\":\"chatcmpl-CC7KTblMWEfVKNHjLNnFwvi0m8DFE\",\"object\":\"chat.completion.chunk\",\"created\":1757004145,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" Tres\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"23HCbgMjAso\"}\n\ndata: {\"id\":\"chatcmpl-CC7KTblMWEfVKNHjLNnFwvi0m8DFE\",\"object\":\"chat.completion.chunk\",\"created\":1757004145,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}],\"usage\":null,\"obfuscation\":\"q71xDuvFhX\"}\n\ndata: {\"id\":\"chatcmpl-CC7KTblMWEfVKNHjLNnFwvi0m8DFE\",\"object\":\"chat.completion.chunk\",\"created\":1757004145,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[],\"usage\":{\"prompt_tokens\":25,\"completion_tokens\":25,\"total_tokens\":50,\"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\":\"EBBsHlGQYAdi5Z6\"}\n\ndata: [DONE]\n\n" - headers: - Content-Type: - - text/event-stream; charset=utf-8 - status: 200 OK - code: 200 - duration: 1.619950917s diff --git a/providertests/testdata/TestStream/openrouter-kimi-k2.yaml b/providertests/testdata/TestStream/openrouter-kimi-k2.yaml deleted file mode 100644 index 825246a0b1f762710dee1c4f61a913d5731b95ee..0000000000000000000000000000000000000000 --- a/providertests/testdata/TestStream/openrouter-kimi-k2.yaml +++ /dev/null @@ -1,32 +0,0 @@ ---- -version: 2 -interactions: -- id: 0 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 242 - host: "" - body: "{\"messages\":[{\"content\":\"You are a helpful assistant\",\"role\":\"system\"},{\"content\":\"Count from 1 to 3 in Spanish\",\"role\":\"user\"}],\"model\":\"moonshotai/kimi-k2-0905\",\"stream_options\":{\"include_usage\":true},\"usage\":{\"include\":true},\"stream\":true}" - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - OpenAI/Go 2.3.0 - 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-1758536685-uqiifVIp9XhYrjFSvssK\",\"provider\":\"SiliconFlow\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758536685,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}],\"system_fingerprint\":\"\"}\n\ndata: {\"id\":\"gen-1758536685-uqiifVIp9XhYrjFSvssK\",\"provider\":\"SiliconFlow\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758536685,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"Un\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}],\"system_fingerprint\":\"\"}\n\ndata: {\"id\":\"gen-1758536685-uqiifVIp9XhYrjFSvssK\",\"provider\":\"SiliconFlow\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758536685,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"o\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}],\"system_fingerprint\":\"\"}\n\ndata: {\"id\":\"gen-1758536685-uqiifVIp9XhYrjFSvssK\",\"provider\":\"SiliconFlow\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758536685,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\",\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}],\"system_fingerprint\":\"\"}\n\ndata: {\"id\":\"gen-1758536685-uqiifVIp9XhYrjFSvssK\",\"provider\":\"SiliconFlow\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758536685,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" dos\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}],\"system_fingerprint\":\"\"}\n\ndata: {\"id\":\"gen-1758536685-uqiifVIp9XhYrjFSvssK\",\"provider\":\"SiliconFlow\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758536685,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\",\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}],\"system_fingerprint\":\"\"}\n\ndata: {\"id\":\"gen-1758536685-uqiifVIp9XhYrjFSvssK\",\"provider\":\"SiliconFlow\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758536685,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" tres\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}],\"system_fingerprint\":\"\"}\n\ndata: {\"id\":\"gen-1758536685-uqiifVIp9XhYrjFSvssK\",\"provider\":\"SiliconFlow\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758536685,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\".\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}],\"system_fingerprint\":\"\"}\n\ndata: {\"id\":\"gen-1758536685-uqiifVIp9XhYrjFSvssK\",\"provider\":\"SiliconFlow\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758536685,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\"},\"finish_reason\":\"stop\",\"native_finish_reason\":\"stop\",\"logprobs\":null}],\"system_fingerprint\":\"\"}\n\ndata: {\"id\":\"gen-1758536685-uqiifVIp9XhYrjFSvssK\",\"provider\":\"SiliconFlow\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758536685,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}],\"usage\":{\"prompt_tokens\":26,\"completion_tokens\":7,\"total_tokens\":33,\"cost\":0.00003111,\"is_byok\":false,\"prompt_tokens_details\":{\"cached_tokens\":0,\"audio_tokens\":0},\"cost_details\":{\"upstream_inference_cost\":null,\"upstream_inference_prompt_cost\":0.00001508,\"upstream_inference_completions_cost\":0.00001603},\"completion_tokens_details\":{\"reasoning_tokens\":0,\"image_tokens\":0}}}\n\ndata: [DONE]\n\n" - headers: - Content-Type: - - text/event-stream - status: 200 OK - code: 200 - duration: 1.936039959s diff --git a/providertests/testdata/TestStreamWithMultipleTools/anthropic-claude-sonnet.yaml b/providertests/testdata/TestStreamWithMultipleTools/anthropic-claude-sonnet.yaml deleted file mode 100644 index c4d587900cdabca2d021e3827de88f9086a97303..0000000000000000000000000000000000000000 --- a/providertests/testdata/TestStreamWithMultipleTools/anthropic-claude-sonnet.yaml +++ /dev/null @@ -1,61 +0,0 @@ ---- -version: 2 -interactions: -- id: 0 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 812 - host: "" - body: "{\"max_tokens\":4096,\"messages\":[{\"content\":[{\"text\":\"Add and multiply the number 2 and 3\",\"type\":\"text\"}],\"role\":\"user\"}],\"model\":\"claude-sonnet-4-20250514\",\"system\":[{\"text\":\"You are a helpful assistant. Always use both add and multiply at the same time.\",\"type\":\"text\"}],\"tool_choice\":{\"disable_parallel_tool_use\":false,\"type\":\"auto\"},\"tools\":[{\"input_schema\":{\"properties\":{\"a\":{\"description\":\"first number\",\"type\":\"integer\"},\"b\":{\"description\":\"second number\",\"type\":\"integer\"}},\"required\":[\"a\",\"b\"],\"type\":\"object\"},\"name\":\"add\",\"description\":\"Add two numbers\"},{\"input_schema\":{\"properties\":{\"a\":{\"description\":\"first number\",\"type\":\"integer\"},\"b\":{\"description\":\"second number\",\"type\":\"integer\"}},\"required\":[\"a\",\"b\"],\"type\":\"object\"},\"name\":\"multiply\",\"description\":\"Multiply two numbers\"}],\"stream\":true}" - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - Anthropic/Go 1.10.0 - url: https://api.anthropic.com/v1/messages - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - body: "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"msg_01PUw9RoW7BhRqa5rFEW1Y4c\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"claude-sonnet-4-20250514\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":502,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":4,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"I'll add an\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"d multiply 2 and 3 \"} }\n\nevent: ping\ndata: {\"type\": \"ping\"}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"for you.\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":1,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_01MBZvm8gNZSTuJCkVy49PiF\",\"name\":\"add\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":1,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":1,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"a\\\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":1,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\": 2\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":1,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\", \\\"b\\\": 3}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":1 }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":2,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_01G7Ju4HLQV7pfMc5KTwztJ3\",\"name\":\"multiply\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":2,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":2,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"a\\\":\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":2,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\" 2\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":2,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\", \\\"b\\\": 3}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":2 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":502,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":135} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n" - headers: - Content-Type: - - text/event-stream; charset=utf-8 - status: 200 OK - code: 200 - duration: 925.170625ms -- id: 1 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 1346 - host: "" - body: "{\"max_tokens\":4096,\"messages\":[{\"content\":[{\"text\":\"Add and multiply the number 2 and 3\",\"type\":\"text\"}],\"role\":\"user\"},{\"content\":[{\"text\":\"I'll add and multiply 2 and 3 for you.\",\"type\":\"text\"},{\"id\":\"toolu_01MBZvm8gNZSTuJCkVy49PiF\",\"input\":{\"a\":2,\"b\":3},\"name\":\"add\",\"type\":\"tool_use\"},{\"id\":\"toolu_01G7Ju4HLQV7pfMc5KTwztJ3\",\"input\":{\"a\":2,\"b\":3},\"name\":\"multiply\",\"type\":\"tool_use\"}],\"role\":\"assistant\"},{\"content\":[{\"tool_use_id\":\"toolu_01MBZvm8gNZSTuJCkVy49PiF\",\"content\":[{\"text\":\"5\",\"type\":\"text\"}],\"type\":\"tool_result\"},{\"tool_use_id\":\"toolu_01G7Ju4HLQV7pfMc5KTwztJ3\",\"content\":[{\"text\":\"6\",\"type\":\"text\"}],\"type\":\"tool_result\"}],\"role\":\"user\"}],\"model\":\"claude-sonnet-4-20250514\",\"system\":[{\"text\":\"You are a helpful assistant. Always use both add and multiply at the same time.\",\"type\":\"text\"}],\"tool_choice\":{\"disable_parallel_tool_use\":false,\"type\":\"auto\"},\"tools\":[{\"input_schema\":{\"properties\":{\"a\":{\"description\":\"first number\",\"type\":\"integer\"},\"b\":{\"description\":\"second number\",\"type\":\"integer\"}},\"required\":[\"a\",\"b\"],\"type\":\"object\"},\"name\":\"add\",\"description\":\"Add two numbers\"},{\"input_schema\":{\"properties\":{\"a\":{\"description\":\"first number\",\"type\":\"integer\"},\"b\":{\"description\":\"second number\",\"type\":\"integer\"}},\"required\":[\"a\",\"b\"],\"type\":\"object\"},\"name\":\"multiply\",\"description\":\"Multiply two numbers\"}],\"stream\":true}" - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - Anthropic/Go 1.10.0 - url: https://api.anthropic.com/v1/messages - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - body: "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"msg_01MjN2ypP8MpRWywCioDtA38\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"claude-sonnet-4-20250514\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":698,\"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\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"The\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" results are:\\n- Adding\"} }\n\nevent: ping\ndata: {\"type\": \"ping\"}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" 2 and 3: **\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"5**\\n- Multiplying \"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"2 and 3: **6\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"**\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":698,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":35} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n" - headers: - Content-Type: - - text/event-stream; charset=utf-8 - status: 200 OK - code: 200 - duration: 1.137101375s diff --git a/providertests/testdata/TestStreamWithMultipleTools/google-gemini-2.5-flash.yaml b/providertests/testdata/TestStreamWithMultipleTools/google-gemini-2.5-flash.yaml deleted file mode 100644 index 8eb86a7d35903b405c33182048168064f4f459d9..0000000000000000000000000000000000000000 --- a/providertests/testdata/TestStreamWithMultipleTools/google-gemini-2.5-flash.yaml +++ /dev/null @@ -1,63 +0,0 @@ ---- -version: 2 -interactions: -- id: 0 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 787 - host: generativelanguage.googleapis.com - body: "{\"contents\":[{\"parts\":[{\"text\":\"Add and multiply the number 2 and 3\"}],\"role\":\"user\"}],\"generationConfig\":{},\"systemInstruction\":{\"parts\":[{\"text\":\"You are a helpful assistant. Always use both add and multiply at the same time.\"}],\"role\":\"user\"},\"toolConfig\":{\"functionCallingConfig\":{\"mode\":\"AUTO\"}},\"tools\":[{\"functionDeclarations\":[{\"description\":\"Add two numbers\",\"name\":\"add\",\"parameters\":{\"properties\":{\"a\":{\"description\":\"first number\",\"type\":\"INTEGER\"},\"b\":{\"description\":\"second number\",\"type\":\"INTEGER\"}},\"required\":[\"a\",\"b\"],\"type\":\"OBJECT\"}},{\"description\":\"Multiply two numbers\",\"name\":\"multiply\",\"parameters\":{\"properties\":{\"a\":{\"description\":\"first number\",\"type\":\"INTEGER\"},\"b\":{\"description\":\"second number\",\"type\":\"INTEGER\"}},\"required\":[\"a\",\"b\"],\"type\":\"OBJECT\"}}]}]}\n" - form: - alt: - - sse - headers: - Content-Type: - - application/json - User-Agent: - - google-genai-sdk/1.23.0 gl-go/go1.25.1 - url: https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:streamGenerateContent?alt=sse - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - body: "data: {\"candidates\": [{\"content\": {\"parts\": [{\"functionCall\": {\"name\": \"add\",\"args\": {\"a\": 2,\"b\": 3}},\"thoughtSignature\": \"CikB0e2Kb9Cbo981mR8v4MhGuu8kkazE7e5W2Yaehwjb6iqXgIQTnlkiEQptAdHtim/2wYeqmL8JTZVWRWzYrj1Yh72I2/C1joGgI7SMVWgEv1EcSoryWwxuWg8XnVTwE8etvpuv42AzaAjwdyTHeRpMZRFTwCsbs72ZcfZaNp5fGcdsULLk8ofUEgdjv3traQpoVe6f8gwCqgpnAdHtim8gitawv43Dk2C2hFdN2eoi7yDLD4TzcSJlI30wo3U2t3dO08m4RSdj9n8cItxy0Xgr2oMrYlx0gxObVepGmwdc0JVLiruE9sWE8FC/Jr4nq9avS6jXag4yzb1cmWSb9jqdmA==\"},{\"functionCall\": {\"name\": \"multiply\",\"args\": {\"a\": 2,\"b\": 3}}}],\"role\": \"model\"},\"finishReason\": \"STOP\",\"index\": 0}],\"usageMetadata\": {\"promptTokenCount\": 121,\"candidatesTokenCount\": 36,\"totalTokenCount\": 195,\"promptTokensDetails\": [{\"modality\": \"TEXT\",\"tokenCount\": 121}],\"thoughtsTokenCount\": 38},\"modelVersion\": \"gemini-2.5-flash\",\"responseId\": \"Cy7RaKyyIPGO28oPouv7mAg\"}\r\n\r\n" - headers: - Content-Type: - - text/event-stream - status: 200 OK - code: 200 - duration: 974.596292ms -- id: 1 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 1134 - host: generativelanguage.googleapis.com - body: "{\"contents\":[{\"parts\":[{\"text\":\"Add and multiply the number 2 and 3\"}],\"role\":\"user\"},{\"parts\":[{\"functionCall\":{\"args\":{\"a\":2,\"b\":3},\"id\":\"add\",\"name\":\"add\"}},{\"functionCall\":{\"args\":{\"a\":2,\"b\":3},\"id\":\"multiply\",\"name\":\"multiply\"}}],\"role\":\"model\"},{\"parts\":[{\"functionResponse\":{\"id\":\"add\",\"name\":\"add\",\"response\":{\"result\":\"5\"}}},{\"functionResponse\":{\"id\":\"multiply\",\"name\":\"multiply\",\"response\":{\"result\":\"6\"}}}],\"role\":\"user\"}],\"generationConfig\":{},\"systemInstruction\":{\"parts\":[{\"text\":\"You are a helpful assistant. Always use both add and multiply at the same time.\"}],\"role\":\"user\"},\"toolConfig\":{\"functionCallingConfig\":{\"mode\":\"AUTO\"}},\"tools\":[{\"functionDeclarations\":[{\"description\":\"Add two numbers\",\"name\":\"add\",\"parameters\":{\"properties\":{\"a\":{\"description\":\"first number\",\"type\":\"INTEGER\"},\"b\":{\"description\":\"second number\",\"type\":\"INTEGER\"}},\"required\":[\"a\",\"b\"],\"type\":\"OBJECT\"}},{\"description\":\"Multiply two numbers\",\"name\":\"multiply\",\"parameters\":{\"properties\":{\"a\":{\"description\":\"first number\",\"type\":\"INTEGER\"},\"b\":{\"description\":\"second number\",\"type\":\"INTEGER\"}},\"required\":[\"a\",\"b\"],\"type\":\"OBJECT\"}}]}]}\n" - form: - alt: - - sse - headers: - Content-Type: - - application/json - User-Agent: - - google-genai-sdk/1.23.0 gl-go/go1.25.1 - url: https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:streamGenerateContent?alt=sse - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - body: "data: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \"The\"}],\"role\": \"model\"},\"index\": 0}],\"usageMetadata\": {\"promptTokenCount\": 181,\"candidatesTokenCount\": 1,\"totalTokenCount\": 182,\"promptTokensDetails\": [{\"modality\": \"TEXT\",\"tokenCount\": 181}]},\"modelVersion\": \"gemini-2.5-flash\",\"responseId\": \"DC7RaMP8CduFxN8P18bViQQ\"}\r\n\r\ndata: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \" sum of 2 and 3 is 5. The product of 2\"}],\"role\": \"model\"},\"index\": 0}],\"usageMetadata\": {\"promptTokenCount\": 181,\"candidatesTokenCount\": 17,\"totalTokenCount\": 198,\"promptTokensDetails\": [{\"modality\": \"TEXT\",\"tokenCount\": 181}]},\"modelVersion\": \"gemini-2.5-flash\",\"responseId\": \"DC7RaMP8CduFxN8P18bViQQ\"}\r\n\r\ndata: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \" and 3 is 6.\"}],\"role\": \"model\"},\"finishReason\": \"STOP\",\"index\": 0}],\"usageMetadata\": {\"promptTokenCount\": 181,\"candidatesTokenCount\": 24,\"totalTokenCount\": 205,\"promptTokensDetails\": [{\"modality\": \"TEXT\",\"tokenCount\": 181}]},\"modelVersion\": \"gemini-2.5-flash\",\"responseId\": \"DC7RaMP8CduFxN8P18bViQQ\"}\r\n\r\n" - headers: - Content-Type: - - text/event-stream - status: 200 OK - code: 200 - duration: 227.840791ms diff --git a/providertests/testdata/TestStreamWithMultipleTools/google-gemini-2.5-pro.yaml b/providertests/testdata/TestStreamWithMultipleTools/google-gemini-2.5-pro.yaml deleted file mode 100644 index 7a68832dc3be60be38ef8faed3869c8c3e503435..0000000000000000000000000000000000000000 --- a/providertests/testdata/TestStreamWithMultipleTools/google-gemini-2.5-pro.yaml +++ /dev/null @@ -1,63 +0,0 @@ ---- -version: 2 -interactions: -- id: 0 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 787 - host: generativelanguage.googleapis.com - body: "{\"contents\":[{\"parts\":[{\"text\":\"Add and multiply the number 2 and 3\"}],\"role\":\"user\"}],\"generationConfig\":{},\"systemInstruction\":{\"parts\":[{\"text\":\"You are a helpful assistant. Always use both add and multiply at the same time.\"}],\"role\":\"user\"},\"toolConfig\":{\"functionCallingConfig\":{\"mode\":\"AUTO\"}},\"tools\":[{\"functionDeclarations\":[{\"description\":\"Add two numbers\",\"name\":\"add\",\"parameters\":{\"properties\":{\"a\":{\"description\":\"first number\",\"type\":\"INTEGER\"},\"b\":{\"description\":\"second number\",\"type\":\"INTEGER\"}},\"required\":[\"a\",\"b\"],\"type\":\"OBJECT\"}},{\"description\":\"Multiply two numbers\",\"name\":\"multiply\",\"parameters\":{\"properties\":{\"a\":{\"description\":\"first number\",\"type\":\"INTEGER\"},\"b\":{\"description\":\"second number\",\"type\":\"INTEGER\"}},\"required\":[\"a\",\"b\"],\"type\":\"OBJECT\"}}]}]}\n" - form: - alt: - - sse - headers: - Content-Type: - - application/json - User-Agent: - - google-genai-sdk/1.23.0 gl-go/go1.25.1 - url: https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-pro:streamGenerateContent?alt=sse - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - body: "data: {\"candidates\": [{\"content\": {\"parts\": [{\"functionCall\": {\"name\": \"add\",\"args\": {\"a\": 2,\"b\": 3}},\"thoughtSignature\": \"CiQB0e2KbyaGJkeLUxOKi+YLCbUz74UFuKTOG65mtgrcWQjsRhwKXgHR7Ypv5LPPqD0JFSBqau+IKrPMP3S0EbzrijJDrfF9JqrQs+ZJ8NjV+7viPuSK1or4jGrFZs2E/t8uzQqOtMxbAzKwU84C+LgMK3HqEAmrvCHN+HJlifBwLmSvHfEKkQEB0e2Kb6mw006U33MakwJZtMmdk/PV2iY2BuGcIvmUgTH1zL1WK+JqUQq4mTboxXNq/rJQf+zdv5sg1vtKefj/7ytmblNF/v3YxEQ7ujbJof2gHj0DJCLVn8ag7GVyTnlI7kehbKjrgFgfPo1w84Q0WYbXvPjsQhj/RrBOjYM1NlJ4NA78TGoDBMHWY3rkOIklCpYBAdHtim9Ge7yE8vCr2vWHsIoRLSVtm+SWsHNAaw7yiNfdi8jZtV8l06cE1NtrN+4MuborbIFNb6Xju1IZAa/EfB/kXlWKTwGrYNe7nX8pcTeH/iPOYKtnMa1W5/HK8bCEpw2YA5oWwGYWeSkgXHigCwV+ARkaI+LPZ6cTeZBncGuSWNXrQMMNwojq5jZ/nfNWHYyckmOoCokBAdHtim8aNfukVbH0ELr/9umaE01hY7Zlw59lyidmgcfBvvAUkqw1DMXtUqw7glI1GfAjTY4mX1LmK61NtGKSz4jxI6C5FKokaUCLccIRTekW1EKNcrbFdgjLCFjt8wVtaQZn1YHNPk96cy/CpZdMYpTat0jc9rMZ8M7IxHAV/XovkwgU+8Ptn7YKaAHR7YpvWrEgQUWE/Qgv3ZnIf0D4Q1PAX7Iql8BKIMsOdtaU2g6eDHXLXu635q0KNEgW106QibeiBKVUqvDR+hMg2vmyWW5dOBO9mDsGGXtk3W+ikQ1zAM6K3AjakAtY3IkrjTKiHC1ACnAB0e2Kb0PeC541hQ/bZsK28NY09MMgWzNl7pUGmmwfuoSKHkYlU1LRIsWzAAHZpt9n/MsIrqxnFh8oTEivc8lTIyPh12nHrz99yZv9hQLd2TyPYgF05zPkDtyp/Up63N29TlBnkEdrBj5zigMqBk41CmMB0e2Kb9X4vKO1TUZ/tMgNX/Xyjqk/v9VWsT1nEYtlPoL7yjkcliBQWQrNlqrvA5xumTBVBoT4fiZi0QQDH5RouBQJvtH2mueudZq06xxoLkOjPLClNufWAsHnkKy3tMuCldsKZQHR7Ypvr4RXX++UhiK+cFjNrf3xRG2SOxpx7eopQRRXrz4iMrqzEojTOkRlto/GYGPGAnShqRyw3VmJ/BWazwf91EXmcnavdmXaSJ7Yog6A9D+hKG5YyZSW1p8WpqQh0vCVk7jwCpgBAdHtim/27LCCUWVCGPMSfLTwFbKacnQvI6bG2mGpST9tpq6EVP2MMx/9NbTnz6G9iVzIezaE6QmokFnZt/Jk3Coyp7o70GiTnuPQp8dI31SezAaPh+KDyO0cNEyD0yOuJ5y32YfZYQy/EZSmrDhk68KiJFdanlMD4lueWpJmav8SLw/dAJpkT8swEsKXbA7iOArEp5Sw8icKVQHR7YpvCy2/5mdSW+seg8kjX/Ttw2jJz8RtZxadlNqG+qVbm1MSsgsGfPY+zDgIWMU3QcVfTFPWB4DRYwVhzGNEzSv+FDTdh4ue9lZFjLztOks11PcKgQEB0e2Kb6czsOAGBOYINL5bfJswhmg3cQUE2JHOS1gaTjNOzjmistBOqQ4MOBoVousfZJn6LBJiYFqivum+LGT9zy5yYzN4/qwS3Oo611PJBdX1mtAKvQUI+nqMvqsvyDu7+Wuo3AEQ2eLxowzqbFLhiveIwgKscChYMBDuKr1MMto=\"}],\"role\": \"model\"},\"index\": 0}],\"usageMetadata\": {\"promptTokenCount\": 121,\"candidatesTokenCount\": 18,\"totalTokenCount\": 413,\"promptTokensDetails\": [{\"modality\": \"TEXT\",\"tokenCount\": 121}],\"thoughtsTokenCount\": 274},\"modelVersion\": \"gemini-2.5-pro\",\"responseId\": \"Di7RaLaMNs-o28oPmY2ZwQU\"}\r\n\r\ndata: {\"candidates\": [{\"content\": {\"parts\": [{\"functionCall\": {\"name\": \"multiply\",\"args\": {\"b\": 3,\"a\": 2}}}],\"role\": \"model\"},\"finishReason\": \"STOP\",\"index\": 0}],\"usageMetadata\": {\"promptTokenCount\": 121,\"candidatesTokenCount\": 36,\"totalTokenCount\": 431,\"promptTokensDetails\": [{\"modality\": \"TEXT\",\"tokenCount\": 121}],\"thoughtsTokenCount\": 274},\"modelVersion\": \"gemini-2.5-pro\",\"responseId\": \"Di7RaLaMNs-o28oPmY2ZwQU\"}\r\n\r\n" - headers: - Content-Type: - - text/event-stream - status: 200 OK - code: 200 - duration: 4.7870815s -- id: 1 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 1134 - host: generativelanguage.googleapis.com - body: "{\"contents\":[{\"parts\":[{\"text\":\"Add and multiply the number 2 and 3\"}],\"role\":\"user\"},{\"parts\":[{\"functionCall\":{\"args\":{\"a\":2,\"b\":3},\"id\":\"add\",\"name\":\"add\"}},{\"functionCall\":{\"args\":{\"a\":2,\"b\":3},\"id\":\"multiply\",\"name\":\"multiply\"}}],\"role\":\"model\"},{\"parts\":[{\"functionResponse\":{\"id\":\"add\",\"name\":\"add\",\"response\":{\"result\":\"5\"}}},{\"functionResponse\":{\"id\":\"multiply\",\"name\":\"multiply\",\"response\":{\"result\":\"6\"}}}],\"role\":\"user\"}],\"generationConfig\":{},\"systemInstruction\":{\"parts\":[{\"text\":\"You are a helpful assistant. Always use both add and multiply at the same time.\"}],\"role\":\"user\"},\"toolConfig\":{\"functionCallingConfig\":{\"mode\":\"AUTO\"}},\"tools\":[{\"functionDeclarations\":[{\"description\":\"Add two numbers\",\"name\":\"add\",\"parameters\":{\"properties\":{\"a\":{\"description\":\"first number\",\"type\":\"INTEGER\"},\"b\":{\"description\":\"second number\",\"type\":\"INTEGER\"}},\"required\":[\"a\",\"b\"],\"type\":\"OBJECT\"}},{\"description\":\"Multiply two numbers\",\"name\":\"multiply\",\"parameters\":{\"properties\":{\"a\":{\"description\":\"first number\",\"type\":\"INTEGER\"},\"b\":{\"description\":\"second number\",\"type\":\"INTEGER\"}},\"required\":[\"a\",\"b\"],\"type\":\"OBJECT\"}}]}]}\n" - form: - alt: - - sse - headers: - Content-Type: - - application/json - User-Agent: - - google-genai-sdk/1.23.0 gl-go/go1.25.1 - url: https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-pro:streamGenerateContent?alt=sse - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - body: "data: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \"OK. The\"}],\"role\": \"model\"},\"index\": 0}],\"usageMetadata\": {\"promptTokenCount\": 181,\"candidatesTokenCount\": 3,\"totalTokenCount\": 184,\"promptTokensDetails\": [{\"modality\": \"TEXT\",\"tokenCount\": 181}]},\"modelVersion\": \"gemini-2.5-pro\",\"responseId\": \"FS7RaKXmIYqdvdIPg6LW2Q8\"}\r\n\r\ndata: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \" sum of 2 and 3 is 5. The product of 2 and 3\"}],\"role\": \"model\"},\"index\": 0}],\"usageMetadata\": {\"promptTokenCount\": 181,\"candidatesTokenCount\": 22,\"totalTokenCount\": 203,\"promptTokensDetails\": [{\"modality\": \"TEXT\",\"tokenCount\": 181}]},\"modelVersion\": \"gemini-2.5-pro\",\"responseId\": \"FS7RaKXmIYqdvdIPg6LW2Q8\"}\r\n\r\ndata: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \" is 6.\\n\"}],\"role\": \"model\"},\"finishReason\": \"STOP\",\"index\": 0}],\"usageMetadata\": {\"promptTokenCount\": 181,\"candidatesTokenCount\": 26,\"totalTokenCount\": 207,\"promptTokensDetails\": [{\"modality\": \"TEXT\",\"tokenCount\": 181}]},\"modelVersion\": \"gemini-2.5-pro\",\"responseId\": \"FS7RaKXmIYqdvdIPg6LW2Q8\"}\r\n\r\n" - headers: - Content-Type: - - text/event-stream - status: 200 OK - code: 200 - duration: 4.316570792s diff --git a/providertests/testdata/TestStreamWithMultipleTools/openai-gpt-4o-mini.yaml b/providertests/testdata/TestStreamWithMultipleTools/openai-gpt-4o-mini.yaml deleted file mode 100644 index 990282903f9154502cd8f61146be757a6e284b69..0000000000000000000000000000000000000000 --- a/providertests/testdata/TestStreamWithMultipleTools/openai-gpt-4o-mini.yaml +++ /dev/null @@ -1,61 +0,0 @@ ---- -version: 2 -interactions: -- id: 0 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 835 - host: "" - body: "{\"messages\":[{\"content\":\"You are a helpful assistant. Always use both add and multiply at the same time.\",\"role\":\"system\"},{\"content\":\"Add and multiply the number 2 and 3\",\"role\":\"user\"}],\"model\":\"gpt-4o-mini\",\"stream_options\":{\"include_usage\":true},\"tool_choice\":\"auto\",\"tools\":[{\"function\":{\"name\":\"add\",\"strict\":false,\"description\":\"Add two numbers\",\"parameters\":{\"properties\":{\"a\":{\"description\":\"first number\",\"type\":\"integer\"},\"b\":{\"description\":\"second number\",\"type\":\"integer\"}},\"required\":[\"a\",\"b\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"multiply\",\"strict\":false,\"description\":\"Multiply two numbers\",\"parameters\":{\"properties\":{\"a\":{\"description\":\"first number\",\"type\":\"integer\"},\"b\":{\"description\":\"second number\",\"type\":\"integer\"}},\"required\":[\"a\",\"b\"],\"type\":\"object\"}},\"type\":\"function\"}],\"stream\":true}" - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - OpenAI/Go 2.3.0 - url: https://api.openai.com/v1/chat/completions - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - body: "data: {\"id\":\"chatcmpl-CIYfO2YDNu3fisNPN7DOLBu1qP4ul\",\"object\":\"chat.completion.chunk\",\"created\":1758539198,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_560af6e559\",\"usage\":null,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"aa72v6\"}\n\ndata: {\"id\":\"chatcmpl-CIYfO2YDNu3fisNPN7DOLBu1qP4ul\",\"object\":\"chat.completion.chunk\",\"created\":1758539198,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_560af6e559\",\"usage\":null,\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"id\":\"call_AllxF2QWi0Tce38DKSdo8brT\",\"type\":\"function\",\"function\":{\"name\":\"add\",\"arguments\":\"\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"FakOnIdqvDRfm\"}\n\ndata: {\"id\":\"chatcmpl-CIYfO2YDNu3fisNPN7DOLBu1qP4ul\",\"object\":\"chat.completion.chunk\",\"created\":1758539198,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_560af6e559\",\"usage\":null,\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"a\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"RkovdZUnx1u\"}\n\ndata: {\"id\":\"chatcmpl-CIYfO2YDNu3fisNPN7DOLBu1qP4ul\",\"object\":\"chat.completion.chunk\",\"created\":1758539198,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_560af6e559\",\"usage\":null,\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\": 2, \"}}]},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"NsClYeAAzdtY\"}\n\ndata: {\"id\":\"chatcmpl-CIYfO2YDNu3fisNPN7DOLBu1qP4ul\",\"object\":\"chat.completion.chunk\",\"created\":1758539198,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_560af6e559\",\"usage\":null,\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"b\\\": 3\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"jsaZAq3C7\"}\n\ndata: {\"id\":\"chatcmpl-CIYfO2YDNu3fisNPN7DOLBu1qP4ul\",\"object\":\"chat.completion.chunk\",\"created\":1758539198,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_560af6e559\",\"usage\":null,\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"\"}\n\ndata: {\"id\":\"chatcmpl-CIYfO2YDNu3fisNPN7DOLBu1qP4ul\",\"object\":\"chat.completion.chunk\",\"created\":1758539198,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_560af6e559\",\"usage\":null,\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":1,\"id\":\"call_W9zsGJWgk7F9x7M6E0v6FpyF\",\"type\":\"function\",\"function\":{\"name\":\"multiply\",\"arguments\":\"\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"TEWXsouM\"}\n\ndata: {\"id\":\"chatcmpl-CIYfO2YDNu3fisNPN7DOLBu1qP4ul\",\"object\":\"chat.completion.chunk\",\"created\":1758539198,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_560af6e559\",\"usage\":null,\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":1,\"function\":{\"arguments\":\"{\\\"a\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"vXKmg4BNNJJ\"}\n\ndata: {\"id\":\"chatcmpl-CIYfO2YDNu3fisNPN7DOLBu1qP4ul\",\"object\":\"chat.completion.chunk\",\"created\":1758539198,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_560af6e559\",\"usage\":null,\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":1,\"function\":{\"arguments\":\": 2, \"}}]},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"2PXGEOdDuPBX\"}\n\ndata: {\"id\":\"chatcmpl-CIYfO2YDNu3fisNPN7DOLBu1qP4ul\",\"object\":\"chat.completion.chunk\",\"created\":1758539198,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_560af6e559\",\"usage\":null,\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":1,\"function\":{\"arguments\":\"\\\"b\\\": 3\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"d9aDQUpVf\"}\n\ndata: {\"id\":\"chatcmpl-CIYfO2YDNu3fisNPN7DOLBu1qP4ul\",\"object\":\"chat.completion.chunk\",\"created\":1758539198,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_560af6e559\",\"usage\":null,\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":1,\"function\":{\"arguments\":\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"\"}\n\ndata: {\"id\":\"chatcmpl-CIYfO2YDNu3fisNPN7DOLBu1qP4ul\",\"object\":\"chat.completion.chunk\",\"created\":1758539198,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_560af6e559\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"usage\":null,\"obfuscation\":\"X2i3i29n3O4W9IS\"}\n\ndata: {\"id\":\"chatcmpl-CIYfO2YDNu3fisNPN7DOLBu1qP4ul\",\"object\":\"chat.completion.chunk\",\"created\":1758539198,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_560af6e559\",\"choices\":[],\"usage\":{\"prompt_tokens\":106,\"completion_tokens\":50,\"total_tokens\":156,\"prompt_tokens_details\":{\"cached_tokens\":0,\"audio_tokens\":0},\"completion_tokens_details\":{\"reasoning_tokens\":0,\"audio_tokens\":0,\"accepted_prediction_tokens\":0,\"rejected_prediction_tokens\":0}},\"obfuscation\":\"wG0WXE1D\"}\n\ndata: [DONE]\n\n" - headers: - Content-Type: - - text/event-stream; charset=utf-8 - status: 200 OK - code: 200 - duration: 2.792789959s -- id: 1 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 1266 - host: "" - body: "{\"messages\":[{\"content\":\"You are a helpful assistant. Always use both add and multiply at the same time.\",\"role\":\"system\"},{\"content\":\"Add and multiply the number 2 and 3\",\"role\":\"user\"},{\"tool_calls\":[{\"id\":\"call_AllxF2QWi0Tce38DKSdo8brT\",\"function\":{\"arguments\":\"{\\\"a\\\": 2, \\\"b\\\": 3}\",\"name\":\"add\"},\"type\":\"function\"},{\"id\":\"call_W9zsGJWgk7F9x7M6E0v6FpyF\",\"function\":{\"arguments\":\"{\\\"a\\\": 2, \\\"b\\\": 3}\",\"name\":\"multiply\"},\"type\":\"function\"}],\"role\":\"assistant\"},{\"content\":\"5\",\"tool_call_id\":\"call_AllxF2QWi0Tce38DKSdo8brT\",\"role\":\"tool\"},{\"content\":\"6\",\"tool_call_id\":\"call_W9zsGJWgk7F9x7M6E0v6FpyF\",\"role\":\"tool\"}],\"model\":\"gpt-4o-mini\",\"stream_options\":{\"include_usage\":true},\"tool_choice\":\"auto\",\"tools\":[{\"function\":{\"name\":\"add\",\"strict\":false,\"description\":\"Add two numbers\",\"parameters\":{\"properties\":{\"a\":{\"description\":\"first number\",\"type\":\"integer\"},\"b\":{\"description\":\"second number\",\"type\":\"integer\"}},\"required\":[\"a\",\"b\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"multiply\",\"strict\":false,\"description\":\"Multiply two numbers\",\"parameters\":{\"properties\":{\"a\":{\"description\":\"first number\",\"type\":\"integer\"},\"b\":{\"description\":\"second number\",\"type\":\"integer\"}},\"required\":[\"a\",\"b\"],\"type\":\"object\"}},\"type\":\"function\"}],\"stream\":true}" - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - OpenAI/Go 2.3.0 - url: https://api.openai.com/v1/chat/completions - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - body: "data: {\"id\":\"chatcmpl-CIYfQnc4yCde1WOeJ9o7ThTkLuPiY\",\"object\":\"chat.completion.chunk\",\"created\":1758539200,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_560af6e559\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"LpXFAjoW1\"}\n\ndata: {\"id\":\"chatcmpl-CIYfQnc4yCde1WOeJ9o7ThTkLuPiY\",\"object\":\"chat.completion.chunk\",\"created\":1758539200,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_560af6e559\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"The\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"5unPoH2g\"}\n\ndata: {\"id\":\"chatcmpl-CIYfQnc4yCde1WOeJ9o7ThTkLuPiY\",\"object\":\"chat.completion.chunk\",\"created\":1758539200,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_560af6e559\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" sum\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"ZVT4FK8\"}\n\ndata: {\"id\":\"chatcmpl-CIYfQnc4yCde1WOeJ9o7ThTkLuPiY\",\"object\":\"chat.completion.chunk\",\"created\":1758539200,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_560af6e559\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" of\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"THp8TaYG\"}\n\ndata: {\"id\":\"chatcmpl-CIYfQnc4yCde1WOeJ9o7ThTkLuPiY\",\"object\":\"chat.completion.chunk\",\"created\":1758539200,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_560af6e559\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"5dGZuwSiBy\"}\n\ndata: {\"id\":\"chatcmpl-CIYfQnc4yCde1WOeJ9o7ThTkLuPiY\",\"object\":\"chat.completion.chunk\",\"created\":1758539200,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_560af6e559\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"2\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"B00dCJSOqC\"}\n\ndata: {\"id\":\"chatcmpl-CIYfQnc4yCde1WOeJ9o7ThTkLuPiY\",\"object\":\"chat.completion.chunk\",\"created\":1758539200,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_560af6e559\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" and\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"9JHeCjZ\"}\n\ndata: {\"id\":\"chatcmpl-CIYfQnc4yCde1WOeJ9o7ThTkLuPiY\",\"object\":\"chat.completion.chunk\",\"created\":1758539200,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_560af6e559\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"qLOsHITog6\"}\n\ndata: {\"id\":\"chatcmpl-CIYfQnc4yCde1WOeJ9o7ThTkLuPiY\",\"object\":\"chat.completion.chunk\",\"created\":1758539200,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_560af6e559\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"3\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"vjJFX73IrR\"}\n\ndata: {\"id\":\"chatcmpl-CIYfQnc4yCde1WOeJ9o7ThTkLuPiY\",\"object\":\"chat.completion.chunk\",\"created\":1758539200,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_560af6e559\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" is\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"8ckW2zLl\"}\n\ndata: {\"id\":\"chatcmpl-CIYfQnc4yCde1WOeJ9o7ThTkLuPiY\",\"object\":\"chat.completion.chunk\",\"created\":1758539200,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_560af6e559\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"d89PZocndQ\"}\n\ndata: {\"id\":\"chatcmpl-CIYfQnc4yCde1WOeJ9o7ThTkLuPiY\",\"object\":\"chat.completion.chunk\",\"created\":1758539200,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_560af6e559\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"5\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"YshqHR4mut\"}\n\ndata: {\"id\":\"chatcmpl-CIYfQnc4yCde1WOeJ9o7ThTkLuPiY\",\"object\":\"chat.completion.chunk\",\"created\":1758539200,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_560af6e559\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\",\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"1BhpFb6IU7\"}\n\ndata: {\"id\":\"chatcmpl-CIYfQnc4yCde1WOeJ9o7ThTkLuPiY\",\"object\":\"chat.completion.chunk\",\"created\":1758539200,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_560af6e559\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" and\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"61QA0re\"}\n\ndata: {\"id\":\"chatcmpl-CIYfQnc4yCde1WOeJ9o7ThTkLuPiY\",\"object\":\"chat.completion.chunk\",\"created\":1758539200,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_560af6e559\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" the\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"C6dswtG\"}\n\ndata: {\"id\":\"chatcmpl-CIYfQnc4yCde1WOeJ9o7ThTkLuPiY\",\"object\":\"chat.completion.chunk\",\"created\":1758539200,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_560af6e559\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" product\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"oCs\"}\n\ndata: {\"id\":\"chatcmpl-CIYfQnc4yCde1WOeJ9o7ThTkLuPiY\",\"object\":\"chat.completion.chunk\",\"created\":1758539200,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_560af6e559\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" of\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"GPryvzOA\"}\n\ndata: {\"id\":\"chatcmpl-CIYfQnc4yCde1WOeJ9o7ThTkLuPiY\",\"object\":\"chat.completion.chunk\",\"created\":1758539200,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_560af6e559\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"GBFgHFU12k\"}\n\ndata: {\"id\":\"chatcmpl-CIYfQnc4yCde1WOeJ9o7ThTkLuPiY\",\"object\":\"chat.completion.chunk\",\"created\":1758539200,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_560af6e559\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"2\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"HfJbC2MozL\"}\n\ndata: {\"id\":\"chatcmpl-CIYfQnc4yCde1WOeJ9o7ThTkLuPiY\",\"object\":\"chat.completion.chunk\",\"created\":1758539200,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_560af6e559\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" and\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"21K8iXz\"}\n\ndata: {\"id\":\"chatcmpl-CIYfQnc4yCde1WOeJ9o7ThTkLuPiY\",\"object\":\"chat.completion.chunk\",\"created\":1758539200,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_560af6e559\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"J8T4Pc31xT\"}\n\ndata: {\"id\":\"chatcmpl-CIYfQnc4yCde1WOeJ9o7ThTkLuPiY\",\"object\":\"chat.completion.chunk\",\"created\":1758539200,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_560af6e559\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"3\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"KFKLwPg06L\"}\n\ndata: {\"id\":\"chatcmpl-CIYfQnc4yCde1WOeJ9o7ThTkLuPiY\",\"object\":\"chat.completion.chunk\",\"created\":1758539200,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_560af6e559\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" is\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"6SQiypmk\"}\n\ndata: {\"id\":\"chatcmpl-CIYfQnc4yCde1WOeJ9o7ThTkLuPiY\",\"object\":\"chat.completion.chunk\",\"created\":1758539200,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_560af6e559\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"VdWZgyqxlN\"}\n\ndata: {\"id\":\"chatcmpl-CIYfQnc4yCde1WOeJ9o7ThTkLuPiY\",\"object\":\"chat.completion.chunk\",\"created\":1758539200,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_560af6e559\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"6\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"qh7my8erhh\"}\n\ndata: {\"id\":\"chatcmpl-CIYfQnc4yCde1WOeJ9o7ThTkLuPiY\",\"object\":\"chat.completion.chunk\",\"created\":1758539200,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_560af6e559\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"EdnL0n1syy\"}\n\ndata: {\"id\":\"chatcmpl-CIYfQnc4yCde1WOeJ9o7ThTkLuPiY\",\"object\":\"chat.completion.chunk\",\"created\":1758539200,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_560af6e559\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}],\"usage\":null,\"obfuscation\":\"qm3FK\"}\n\ndata: {\"id\":\"chatcmpl-CIYfQnc4yCde1WOeJ9o7ThTkLuPiY\",\"object\":\"chat.completion.chunk\",\"created\":1758539200,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_560af6e559\",\"choices\":[],\"usage\":{\"prompt_tokens\":172,\"completion_tokens\":26,\"total_tokens\":198,\"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\":\"NKBLSjTg\"}\n\ndata: [DONE]\n\n" - headers: - Content-Type: - - text/event-stream; charset=utf-8 - status: 200 OK - code: 200 - duration: 1.05307025s diff --git a/providertests/testdata/TestStreamWithMultipleTools/openai-gpt-4o.yaml b/providertests/testdata/TestStreamWithMultipleTools/openai-gpt-4o.yaml deleted file mode 100644 index e937f1463f616b3c0994e9d4305f35bae70300ed..0000000000000000000000000000000000000000 --- a/providertests/testdata/TestStreamWithMultipleTools/openai-gpt-4o.yaml +++ /dev/null @@ -1,61 +0,0 @@ ---- -version: 2 -interactions: -- id: 0 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 830 - host: "" - body: "{\"messages\":[{\"content\":\"You are a helpful assistant. Always use both add and multiply at the same time.\",\"role\":\"system\"},{\"content\":\"Add and multiply the number 2 and 3\",\"role\":\"user\"}],\"model\":\"gpt-4o\",\"stream_options\":{\"include_usage\":true},\"tool_choice\":\"auto\",\"tools\":[{\"function\":{\"name\":\"add\",\"strict\":false,\"description\":\"Add two numbers\",\"parameters\":{\"properties\":{\"a\":{\"description\":\"first number\",\"type\":\"integer\"},\"b\":{\"description\":\"second number\",\"type\":\"integer\"}},\"required\":[\"a\",\"b\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"multiply\",\"strict\":false,\"description\":\"Multiply two numbers\",\"parameters\":{\"properties\":{\"a\":{\"description\":\"first number\",\"type\":\"integer\"},\"b\":{\"description\":\"second number\",\"type\":\"integer\"}},\"required\":[\"a\",\"b\"],\"type\":\"object\"}},\"type\":\"function\"}],\"stream\":true}" - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - OpenAI/Go 2.3.0 - url: https://api.openai.com/v1/chat/completions - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - body: "data: {\"id\":\"chatcmpl-CIYfKFiz4LEais1lpygdWyr6fXzrM\",\"object\":\"chat.completion.chunk\",\"created\":1758539194,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"usage\":null,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"ml8zhwYvriy\"}\n\ndata: {\"id\":\"chatcmpl-CIYfKFiz4LEais1lpygdWyr6fXzrM\",\"object\":\"chat.completion.chunk\",\"created\":1758539194,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"usage\":null,\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"id\":\"call_c9ycbTtTLCKR4214Fv4yvbcO\",\"type\":\"function\",\"function\":{\"name\":\"add\",\"arguments\":\"\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"4Z\"}\n\ndata: {\"id\":\"chatcmpl-CIYfKFiz4LEais1lpygdWyr6fXzrM\",\"object\":\"chat.completion.chunk\",\"created\":1758539194,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"usage\":null,\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"a\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"\"}\n\ndata: {\"id\":\"chatcmpl-CIYfKFiz4LEais1lpygdWyr6fXzrM\",\"object\":\"chat.completion.chunk\",\"created\":1758539194,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"usage\":null,\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\": 2, \"}}]},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"e\"}\n\ndata: {\"id\":\"chatcmpl-CIYfKFiz4LEais1lpygdWyr6fXzrM\",\"object\":\"chat.completion.chunk\",\"created\":1758539194,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"usage\":null,\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"b\\\": 3\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"5e7srrTAkj7qW1\"}\n\ndata: {\"id\":\"chatcmpl-CIYfKFiz4LEais1lpygdWyr6fXzrM\",\"object\":\"chat.completion.chunk\",\"created\":1758539194,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"usage\":null,\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"XH6sN\"}\n\ndata: {\"id\":\"chatcmpl-CIYfKFiz4LEais1lpygdWyr6fXzrM\",\"object\":\"chat.completion.chunk\",\"created\":1758539194,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"usage\":null,\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":1,\"id\":\"call_CIlNthDS1SkYh3ep4iHDeu4Z\",\"type\":\"function\",\"function\":{\"name\":\"multiply\",\"arguments\":\"\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"n8BLeLWCiVijG\"}\n\ndata: {\"id\":\"chatcmpl-CIYfKFiz4LEais1lpygdWyr6fXzrM\",\"object\":\"chat.completion.chunk\",\"created\":1758539194,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"usage\":null,\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":1,\"function\":{\"arguments\":\"{\\\"a\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"\"}\n\ndata: {\"id\":\"chatcmpl-CIYfKFiz4LEais1lpygdWyr6fXzrM\",\"object\":\"chat.completion.chunk\",\"created\":1758539194,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"usage\":null,\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":1,\"function\":{\"arguments\":\": 2, \"}}]},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"e\"}\n\ndata: {\"id\":\"chatcmpl-CIYfKFiz4LEais1lpygdWyr6fXzrM\",\"object\":\"chat.completion.chunk\",\"created\":1758539194,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"usage\":null,\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":1,\"function\":{\"arguments\":\"\\\"b\\\": 3\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"3PBAGUvFgBPJ6m\"}\n\ndata: {\"id\":\"chatcmpl-CIYfKFiz4LEais1lpygdWyr6fXzrM\",\"object\":\"chat.completion.chunk\",\"created\":1758539194,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"usage\":null,\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":1,\"function\":{\"arguments\":\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"gsg2x\"}\n\ndata: {\"id\":\"chatcmpl-CIYfKFiz4LEais1lpygdWyr6fXzrM\",\"object\":\"chat.completion.chunk\",\"created\":1758539194,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"usage\":null,\"obfuscation\":\"SYOQ\"}\n\ndata: {\"id\":\"chatcmpl-CIYfKFiz4LEais1lpygdWyr6fXzrM\",\"object\":\"chat.completion.chunk\",\"created\":1758539194,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[],\"usage\":{\"prompt_tokens\":106,\"completion_tokens\":50,\"total_tokens\":156,\"prompt_tokens_details\":{\"cached_tokens\":0,\"audio_tokens\":0},\"completion_tokens_details\":{\"reasoning_tokens\":0,\"audio_tokens\":0,\"accepted_prediction_tokens\":0,\"rejected_prediction_tokens\":0}},\"obfuscation\":\"wTICV91saAoPW\"}\n\ndata: [DONE]\n\n" - headers: - Content-Type: - - text/event-stream; charset=utf-8 - status: 200 OK - code: 200 - duration: 1.897076542s -- id: 1 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 1261 - host: "" - body: "{\"messages\":[{\"content\":\"You are a helpful assistant. Always use both add and multiply at the same time.\",\"role\":\"system\"},{\"content\":\"Add and multiply the number 2 and 3\",\"role\":\"user\"},{\"tool_calls\":[{\"id\":\"call_c9ycbTtTLCKR4214Fv4yvbcO\",\"function\":{\"arguments\":\"{\\\"a\\\": 2, \\\"b\\\": 3}\",\"name\":\"add\"},\"type\":\"function\"},{\"id\":\"call_CIlNthDS1SkYh3ep4iHDeu4Z\",\"function\":{\"arguments\":\"{\\\"a\\\": 2, \\\"b\\\": 3}\",\"name\":\"multiply\"},\"type\":\"function\"}],\"role\":\"assistant\"},{\"content\":\"5\",\"tool_call_id\":\"call_c9ycbTtTLCKR4214Fv4yvbcO\",\"role\":\"tool\"},{\"content\":\"6\",\"tool_call_id\":\"call_CIlNthDS1SkYh3ep4iHDeu4Z\",\"role\":\"tool\"}],\"model\":\"gpt-4o\",\"stream_options\":{\"include_usage\":true},\"tool_choice\":\"auto\",\"tools\":[{\"function\":{\"name\":\"add\",\"strict\":false,\"description\":\"Add two numbers\",\"parameters\":{\"properties\":{\"a\":{\"description\":\"first number\",\"type\":\"integer\"},\"b\":{\"description\":\"second number\",\"type\":\"integer\"}},\"required\":[\"a\",\"b\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"multiply\",\"strict\":false,\"description\":\"Multiply two numbers\",\"parameters\":{\"properties\":{\"a\":{\"description\":\"first number\",\"type\":\"integer\"},\"b\":{\"description\":\"second number\",\"type\":\"integer\"}},\"required\":[\"a\",\"b\"],\"type\":\"object\"}},\"type\":\"function\"}],\"stream\":true}" - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - OpenAI/Go 2.3.0 - url: https://api.openai.com/v1/chat/completions - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - body: "data: {\"id\":\"chatcmpl-CIYfMcNCnjwH8CTVFp8exAYZ3aFuG\",\"object\":\"chat.completion.chunk\",\"created\":1758539196,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"3g2hGn6D34kt2y\"}\n\ndata: {\"id\":\"chatcmpl-CIYfMcNCnjwH8CTVFp8exAYZ3aFuG\",\"object\":\"chat.completion.chunk\",\"created\":1758539196,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"The\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"0Z3VR0erkUhmq\"}\n\ndata: {\"id\":\"chatcmpl-CIYfMcNCnjwH8CTVFp8exAYZ3aFuG\",\"object\":\"chat.completion.chunk\",\"created\":1758539196,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" result\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"0x8NdBh0i\"}\n\ndata: {\"id\":\"chatcmpl-CIYfMcNCnjwH8CTVFp8exAYZ3aFuG\",\"object\":\"chat.completion.chunk\",\"created\":1758539196,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" of\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"WbZyfzk1KTgFS\"}\n\ndata: {\"id\":\"chatcmpl-CIYfMcNCnjwH8CTVFp8exAYZ3aFuG\",\"object\":\"chat.completion.chunk\",\"created\":1758539196,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" adding\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"1f7IlODXu\"}\n\ndata: {\"id\":\"chatcmpl-CIYfMcNCnjwH8CTVFp8exAYZ3aFuG\",\"object\":\"chat.completion.chunk\",\"created\":1758539196,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"WihERktKgNeuqLs\"}\n\ndata: {\"id\":\"chatcmpl-CIYfMcNCnjwH8CTVFp8exAYZ3aFuG\",\"object\":\"chat.completion.chunk\",\"created\":1758539196,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"2\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"MVVMviEnq7qEQET\"}\n\ndata: {\"id\":\"chatcmpl-CIYfMcNCnjwH8CTVFp8exAYZ3aFuG\",\"object\":\"chat.completion.chunk\",\"created\":1758539196,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" and\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"mLf5Zd9pWVtM\"}\n\ndata: {\"id\":\"chatcmpl-CIYfMcNCnjwH8CTVFp8exAYZ3aFuG\",\"object\":\"chat.completion.chunk\",\"created\":1758539196,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"rg3gY0s7GhYr2MG\"}\n\ndata: {\"id\":\"chatcmpl-CIYfMcNCnjwH8CTVFp8exAYZ3aFuG\",\"object\":\"chat.completion.chunk\",\"created\":1758539196,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"3\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"jBJfCcnENbpRybt\"}\n\ndata: {\"id\":\"chatcmpl-CIYfMcNCnjwH8CTVFp8exAYZ3aFuG\",\"object\":\"chat.completion.chunk\",\"created\":1758539196,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" is\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"dHItIK1s6Ejre\"}\n\ndata: {\"id\":\"chatcmpl-CIYfMcNCnjwH8CTVFp8exAYZ3aFuG\",\"object\":\"chat.completion.chunk\",\"created\":1758539196,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"0pz9YyyHoQVDsM6\"}\n\ndata: {\"id\":\"chatcmpl-CIYfMcNCnjwH8CTVFp8exAYZ3aFuG\",\"object\":\"chat.completion.chunk\",\"created\":1758539196,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"5\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"DyKcIysIdChycXR\"}\n\ndata: {\"id\":\"chatcmpl-CIYfMcNCnjwH8CTVFp8exAYZ3aFuG\",\"object\":\"chat.completion.chunk\",\"created\":1758539196,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\",\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"KHDdQ8bss7RqEiE\"}\n\ndata: {\"id\":\"chatcmpl-CIYfMcNCnjwH8CTVFp8exAYZ3aFuG\",\"object\":\"chat.completion.chunk\",\"created\":1758539196,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" and\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"n6q3twKLSRZ7\"}\n\ndata: {\"id\":\"chatcmpl-CIYfMcNCnjwH8CTVFp8exAYZ3aFuG\",\"object\":\"chat.completion.chunk\",\"created\":1758539196,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" the\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"LlHxE2vHnWEv\"}\n\ndata: {\"id\":\"chatcmpl-CIYfMcNCnjwH8CTVFp8exAYZ3aFuG\",\"object\":\"chat.completion.chunk\",\"created\":1758539196,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" result\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"RomUQeGLW\"}\n\ndata: {\"id\":\"chatcmpl-CIYfMcNCnjwH8CTVFp8exAYZ3aFuG\",\"object\":\"chat.completion.chunk\",\"created\":1758539196,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" of\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"bAfSH7N7YerEq\"}\n\ndata: {\"id\":\"chatcmpl-CIYfMcNCnjwH8CTVFp8exAYZ3aFuG\",\"object\":\"chat.completion.chunk\",\"created\":1758539196,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" multiplying\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"2800\"}\n\ndata: {\"id\":\"chatcmpl-CIYfMcNCnjwH8CTVFp8exAYZ3aFuG\",\"object\":\"chat.completion.chunk\",\"created\":1758539196,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"if3X82l0Y7Ui1jn\"}\n\ndata: {\"id\":\"chatcmpl-CIYfMcNCnjwH8CTVFp8exAYZ3aFuG\",\"object\":\"chat.completion.chunk\",\"created\":1758539196,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"2\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"HT4wshBEhjRTDJ6\"}\n\ndata: {\"id\":\"chatcmpl-CIYfMcNCnjwH8CTVFp8exAYZ3aFuG\",\"object\":\"chat.completion.chunk\",\"created\":1758539196,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" and\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"rGzuNfqg4d1t\"}\n\ndata: {\"id\":\"chatcmpl-CIYfMcNCnjwH8CTVFp8exAYZ3aFuG\",\"object\":\"chat.completion.chunk\",\"created\":1758539196,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"LbslVSrgCXRJta8\"}\n\ndata: {\"id\":\"chatcmpl-CIYfMcNCnjwH8CTVFp8exAYZ3aFuG\",\"object\":\"chat.completion.chunk\",\"created\":1758539196,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"3\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"trdZhyDZP9RIBRh\"}\n\ndata: {\"id\":\"chatcmpl-CIYfMcNCnjwH8CTVFp8exAYZ3aFuG\",\"object\":\"chat.completion.chunk\",\"created\":1758539196,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" is\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"lIEPqyBOnoBUY\"}\n\ndata: {\"id\":\"chatcmpl-CIYfMcNCnjwH8CTVFp8exAYZ3aFuG\",\"object\":\"chat.completion.chunk\",\"created\":1758539196,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"5OIHswd8zK8TI90\"}\n\ndata: {\"id\":\"chatcmpl-CIYfMcNCnjwH8CTVFp8exAYZ3aFuG\",\"object\":\"chat.completion.chunk\",\"created\":1758539196,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"6\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"yqubPfg2gsLOYLp\"}\n\ndata: {\"id\":\"chatcmpl-CIYfMcNCnjwH8CTVFp8exAYZ3aFuG\",\"object\":\"chat.completion.chunk\",\"created\":1758539196,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"DbwzUBOSobogSmv\"}\n\ndata: {\"id\":\"chatcmpl-CIYfMcNCnjwH8CTVFp8exAYZ3aFuG\",\"object\":\"chat.completion.chunk\",\"created\":1758539196,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}],\"usage\":null,\"obfuscation\":\"zLJnDuuUzT\"}\n\ndata: {\"id\":\"chatcmpl-CIYfMcNCnjwH8CTVFp8exAYZ3aFuG\",\"object\":\"chat.completion.chunk\",\"created\":1758539196,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[],\"usage\":{\"prompt_tokens\":172,\"completion_tokens\":28,\"total_tokens\":200,\"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\":\"8aKUzHDU7u7QC\"}\n\ndata: [DONE]\n\n" - headers: - Content-Type: - - text/event-stream; charset=utf-8 - status: 200 OK - code: 200 - duration: 1.279416208s diff --git a/providertests/testdata/TestStreamWithMultipleTools/openrouter-kimi-k2.yaml b/providertests/testdata/TestStreamWithMultipleTools/openrouter-kimi-k2.yaml deleted file mode 100644 index 4d8e5afff065d64d76ef6162989e9ef637a0e51b..0000000000000000000000000000000000000000 --- a/providertests/testdata/TestStreamWithMultipleTools/openrouter-kimi-k2.yaml +++ /dev/null @@ -1,61 +0,0 @@ ---- -version: 2 -interactions: -- id: 0 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 872 - host: "" - body: "{\"messages\":[{\"content\":\"You are a helpful assistant. Always use both add and multiply at the same time.\",\"role\":\"system\"},{\"content\":\"Add and multiply the number 2 and 3\",\"role\":\"user\"}],\"model\":\"moonshotai/kimi-k2-0905\",\"stream_options\":{\"include_usage\":true},\"tool_choice\":\"auto\",\"tools\":[{\"function\":{\"name\":\"add\",\"strict\":false,\"description\":\"Add two numbers\",\"parameters\":{\"properties\":{\"a\":{\"description\":\"first number\",\"type\":\"integer\"},\"b\":{\"description\":\"second number\",\"type\":\"integer\"}},\"required\":[\"a\",\"b\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"multiply\",\"strict\":false,\"description\":\"Multiply two numbers\",\"parameters\":{\"properties\":{\"a\":{\"description\":\"first number\",\"type\":\"integer\"},\"b\":{\"description\":\"second number\",\"type\":\"integer\"}},\"required\":[\"a\",\"b\"],\"type\":\"object\"}},\"type\":\"function\"}],\"usage\":{\"include\":true},\"stream\":true}" - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - OpenAI/Go 2.3.0 - 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-1758539206-imjPEWEpXTKCNbw94ywy\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758539206,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"I'll\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758539206-imjPEWEpXTKCNbw94ywy\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758539206,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" perform\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758539206-imjPEWEpXTKCNbw94ywy\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758539206,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" both\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758539206-imjPEWEpXTKCNbw94ywy\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758539206,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" operations\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758539206-imjPEWEpXTKCNbw94ywy\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758539206,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" with\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758539206-imjPEWEpXTKCNbw94ywy\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758539206,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" the\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758539206-imjPEWEpXTKCNbw94ywy\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758539206,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" numbers\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758539206-imjPEWEpXTKCNbw94ywy\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758539206,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" \"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758539206-imjPEWEpXTKCNbw94ywy\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758539206,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"2\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758539206-imjPEWEpXTKCNbw94ywy\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758539206,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" and\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758539206-imjPEWEpXTKCNbw94ywy\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758539206,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" \"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758539206-imjPEWEpXTKCNbw94ywy\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758539206,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"3\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758539206-imjPEWEpXTKCNbw94ywy\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758539206,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\".\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758539206-imjPEWEpXTKCNbw94ywy\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758539206,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758539206-imjPEWEpXTKCNbw94ywy\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758539206,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_o1p1wrhufp6epnj7d8ku3n7b\",\"type\":\"function\",\"function\":{\"name\":\"add\",\"arguments\":\"\"}}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758539206-imjPEWEpXTKCNbw94ywy\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758539206,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"a\\\":2,\"},\"type\":\"function\"}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758539206-imjPEWEpXTKCNbw94ywy\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758539206,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"b\\\":3}\"},\"type\":\"function\"}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758539206-imjPEWEpXTKCNbw94ywy\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758539206,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":1,\"id\":\"call_2p8ey5itezput2hlazmx9esq\",\"type\":\"function\",\"function\":{\"name\":\"multiply\",\"arguments\":\"\"}}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758539206-imjPEWEpXTKCNbw94ywy\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758539206,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":1,\"function\":{\"arguments\":\"{\\\"a\\\":2,\"},\"type\":\"function\"}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758539206-imjPEWEpXTKCNbw94ywy\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758539206,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":1,\"function\":{\"arguments\":\"\\\"b\\\":3}\"},\"type\":\"function\"}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758539206-imjPEWEpXTKCNbw94ywy\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758539206,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\"},\"finish_reason\":\"tool_calls\",\"native_finish_reason\":\"tool_calls\",\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758539206-imjPEWEpXTKCNbw94ywy\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758539206,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}],\"usage\":{\"prompt_tokens\":218,\"completion_tokens\":54,\"total_tokens\":272,\"cost\":0.00038,\"is_byok\":false,\"prompt_tokens_details\":{\"cached_tokens\":0,\"audio_tokens\":0},\"cost_details\":{\"upstream_inference_cost\":null,\"upstream_inference_prompt_cost\":0.000218,\"upstream_inference_completions_cost\":0.000162},\"completion_tokens_details\":{\"reasoning_tokens\":0,\"image_tokens\":0}}}\n\ndata: [DONE]\n\n" - headers: - Content-Type: - - text/event-stream - status: 200 OK - code: 200 - duration: 2.540430708s -- id: 1 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 1364 - host: "" - body: "{\"messages\":[{\"content\":\"You are a helpful assistant. Always use both add and multiply at the same time.\",\"role\":\"system\"},{\"content\":\"Add and multiply the number 2 and 3\",\"role\":\"user\"},{\"content\":\"I'll perform both operations with the numbers 2 and 3.\",\"tool_calls\":[{\"id\":\"call_o1p1wrhufp6epnj7d8ku3n7b\",\"function\":{\"arguments\":\"{\\\"a\\\":2,\\\"b\\\":3}\",\"name\":\"add\"},\"type\":\"function\"},{\"id\":\"call_2p8ey5itezput2hlazmx9esq\",\"function\":{\"arguments\":\"{\\\"a\\\":2,\\\"b\\\":3}\",\"name\":\"multiply\"},\"type\":\"function\"}],\"role\":\"assistant\"},{\"content\":\"5\",\"tool_call_id\":\"call_o1p1wrhufp6epnj7d8ku3n7b\",\"role\":\"tool\"},{\"content\":\"6\",\"tool_call_id\":\"call_2p8ey5itezput2hlazmx9esq\",\"role\":\"tool\"}],\"model\":\"moonshotai/kimi-k2-0905\",\"stream_options\":{\"include_usage\":true},\"tool_choice\":\"auto\",\"tools\":[{\"function\":{\"name\":\"add\",\"strict\":false,\"description\":\"Add two numbers\",\"parameters\":{\"properties\":{\"a\":{\"description\":\"first number\",\"type\":\"integer\"},\"b\":{\"description\":\"second number\",\"type\":\"integer\"}},\"required\":[\"a\",\"b\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"multiply\",\"strict\":false,\"description\":\"Multiply two numbers\",\"parameters\":{\"properties\":{\"a\":{\"description\":\"first number\",\"type\":\"integer\"},\"b\":{\"description\":\"second number\",\"type\":\"integer\"}},\"required\":[\"a\",\"b\"],\"type\":\"object\"}},\"type\":\"function\"}],\"usage\":{\"include\":true},\"stream\":true}" - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - OpenAI/Go 2.3.0 - 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-1758539210-2a8JjOltIpd8OEhwS0bf\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758539210,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"The\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758539210-2a8JjOltIpd8OEhwS0bf\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758539210,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" results\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758539210-2a8JjOltIpd8OEhwS0bf\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758539210,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" are\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758539210-2a8JjOltIpd8OEhwS0bf\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758539210,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\":\\n\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758539210-2a8JjOltIpd8OEhwS0bf\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758539210,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"-\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758539210-2a8JjOltIpd8OEhwS0bf\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758539210,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" Addition\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758539210-2a8JjOltIpd8OEhwS0bf\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758539210,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\":\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758539210-2a8JjOltIpd8OEhwS0bf\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758539210,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" \"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758539210-2a8JjOltIpd8OEhwS0bf\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758539210,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"2\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758539210-2a8JjOltIpd8OEhwS0bf\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758539210,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" +\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758539210-2a8JjOltIpd8OEhwS0bf\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758539210,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" \"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758539210-2a8JjOltIpd8OEhwS0bf\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758539210,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"3\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758539210-2a8JjOltIpd8OEhwS0bf\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758539210,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" =\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758539210-2a8JjOltIpd8OEhwS0bf\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758539210,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" \"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758539210-2a8JjOltIpd8OEhwS0bf\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758539210,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"5\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758539210-2a8JjOltIpd8OEhwS0bf\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758539210,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" \\n\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758539210-2a8JjOltIpd8OEhwS0bf\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758539210,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"-\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758539210-2a8JjOltIpd8OEhwS0bf\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758539210,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" Multi\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758539210-2a8JjOltIpd8OEhwS0bf\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758539210,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"plication\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758539210-2a8JjOltIpd8OEhwS0bf\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758539210,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\":\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758539210-2a8JjOltIpd8OEhwS0bf\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758539210,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" \"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758539210-2a8JjOltIpd8OEhwS0bf\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758539210,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"2\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758539210-2a8JjOltIpd8OEhwS0bf\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758539210,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" ×\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758539210-2a8JjOltIpd8OEhwS0bf\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758539210,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" \"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758539210-2a8JjOltIpd8OEhwS0bf\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758539210,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"3\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758539210-2a8JjOltIpd8OEhwS0bf\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758539210,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" =\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758539210-2a8JjOltIpd8OEhwS0bf\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758539210,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" \"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758539210-2a8JjOltIpd8OEhwS0bf\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758539210,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"6\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758539210-2a8JjOltIpd8OEhwS0bf\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758539210,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\"},\"finish_reason\":\"stop\",\"native_finish_reason\":\"stop\",\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758539210-2a8JjOltIpd8OEhwS0bf\",\"provider\":\"Together\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758539210,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}],\"usage\":{\"prompt_tokens\":399,\"completion_tokens\":29,\"total_tokens\":428,\"cost\":0.000486,\"is_byok\":false,\"prompt_tokens_details\":{\"cached_tokens\":0,\"audio_tokens\":0},\"cost_details\":{\"upstream_inference_cost\":null,\"upstream_inference_prompt_cost\":0.000399,\"upstream_inference_completions_cost\":0.000087},\"completion_tokens_details\":{\"reasoning_tokens\":0,\"image_tokens\":0}}}\n\ndata: [DONE]\n\n" - headers: - Content-Type: - - text/event-stream - status: 200 OK - code: 200 - duration: 1.629816208s diff --git a/providertests/testdata/TestStreamWithTools/anthropic-claude-sonnet.yaml b/providertests/testdata/TestStreamWithTools/anthropic-claude-sonnet.yaml deleted file mode 100644 index d67c96cb5596b896e764598cf07354fc2cf84a39..0000000000000000000000000000000000000000 --- a/providertests/testdata/TestStreamWithTools/anthropic-claude-sonnet.yaml +++ /dev/null @@ -1,61 +0,0 @@ ---- -version: 2 -interactions: -- id: 0 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 553 - host: "" - body: "{\"max_tokens\":4096,\"messages\":[{\"content\":[{\"text\":\"What is 15 + 27?\",\"type\":\"text\"}],\"role\":\"user\"}],\"model\":\"claude-sonnet-4-20250514\",\"system\":[{\"text\":\"You are a helpful assistant. Use the add tool to perform calculations.\",\"type\":\"text\"}],\"tool_choice\":{\"disable_parallel_tool_use\":false,\"type\":\"auto\"},\"tools\":[{\"input_schema\":{\"properties\":{\"a\":{\"description\":\"first number\",\"type\":\"integer\"},\"b\":{\"description\":\"second number\",\"type\":\"integer\"}},\"required\":[\"a\",\"b\"],\"type\":\"object\"},\"name\":\"add\",\"description\":\"Add two numbers\"}],\"stream\":true}" - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - Anthropic/Go 1.10.0 - url: https://api.anthropic.com/v1/messages - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - body: "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"msg_01KtoJaXMqmtVtLnjtX5cPUT\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"claude-sonnet-4-20250514\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":420,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":8,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"I'll help you calculate 15 \"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"+ 27 using the add function.\"}}\n\nevent: ping\ndata: {\"type\": \"ping\"}\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\nevent: ping\ndata: {\"type\": \"ping\"}\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":1,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_015ewucD8KduCw15A5kPth7R\",\"name\":\"add\",\"input\":{}} }\n\nevent: ping\ndata: {\"type\": \"ping\"}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":1,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":1,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"a\\\":\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":1,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\" 15\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":1,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\", \\\"b\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":1,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\\\": \"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":1,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"27}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":1 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":420,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":86}}\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n" - headers: - Content-Type: - - text/event-stream; charset=utf-8 - status: 200 OK - code: 200 - duration: 1.174656584s -- id: 1 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 900 - host: "" - body: "{\"max_tokens\":4096,\"messages\":[{\"content\":[{\"text\":\"What is 15 + 27?\",\"type\":\"text\"}],\"role\":\"user\"},{\"content\":[{\"text\":\"I'll help you calculate 15 + 27 using the add function.\",\"type\":\"text\"},{\"id\":\"toolu_015ewucD8KduCw15A5kPth7R\",\"input\":{\"a\":15,\"b\":27},\"name\":\"add\",\"type\":\"tool_use\"}],\"role\":\"assistant\"},{\"content\":[{\"tool_use_id\":\"toolu_015ewucD8KduCw15A5kPth7R\",\"content\":[{\"text\":\"42\",\"type\":\"text\"}],\"type\":\"tool_result\"}],\"role\":\"user\"}],\"model\":\"claude-sonnet-4-20250514\",\"system\":[{\"text\":\"You are a helpful assistant. Use the add tool to perform calculations.\",\"type\":\"text\"}],\"tool_choice\":{\"disable_parallel_tool_use\":false,\"type\":\"auto\"},\"tools\":[{\"input_schema\":{\"properties\":{\"a\":{\"description\":\"first number\",\"type\":\"integer\"},\"b\":{\"description\":\"second number\",\"type\":\"integer\"}},\"required\":[\"a\",\"b\"],\"type\":\"object\"},\"name\":\"add\",\"description\":\"Add two numbers\"}],\"stream\":true}" - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - Anthropic/Go 1.10.0 - url: https://api.anthropic.com/v1/messages - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - body: "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"msg_01DNqLDbjh3SijUzzFvKZJYX\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"claude-sonnet-4-20250514\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":519,\"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\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"15\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" + 27 = 42\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":519,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":12} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n" - headers: - Content-Type: - - text/event-stream; charset=utf-8 - status: 200 OK - code: 200 - duration: 1.181155542s diff --git a/providertests/testdata/TestStreamWithTools/google-gemini-2.5-flash.yaml b/providertests/testdata/TestStreamWithTools/google-gemini-2.5-flash.yaml deleted file mode 100644 index 7d6b4d785c1953f8d6efb18f00a391cc37455ca5..0000000000000000000000000000000000000000 --- a/providertests/testdata/TestStreamWithTools/google-gemini-2.5-flash.yaml +++ /dev/null @@ -1,63 +0,0 @@ ---- -version: 2 -interactions: -- id: 0 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 530 - host: generativelanguage.googleapis.com - body: "{\"contents\":[{\"parts\":[{\"text\":\"What is 15 + 27?\"}],\"role\":\"user\"}],\"generationConfig\":{},\"systemInstruction\":{\"parts\":[{\"text\":\"You are a helpful assistant. Use the add tool to perform calculations.\"}],\"role\":\"user\"},\"toolConfig\":{\"functionCallingConfig\":{\"mode\":\"AUTO\"}},\"tools\":[{\"functionDeclarations\":[{\"description\":\"Add two numbers\",\"name\":\"add\",\"parameters\":{\"properties\":{\"a\":{\"description\":\"first number\",\"type\":\"INTEGER\"},\"b\":{\"description\":\"second number\",\"type\":\"INTEGER\"}},\"required\":[\"a\",\"b\"],\"type\":\"OBJECT\"}}]}]}\n" - form: - alt: - - sse - headers: - Content-Type: - - application/json - User-Agent: - - google-genai-sdk/1.23.0 gl-go/go1.24.5 - url: https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:streamGenerateContent?alt=sse - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - body: "data: {\"candidates\": [{\"content\": {\"parts\": [{\"functionCall\": {\"name\": \"add\",\"args\": {\"b\": 27,\"a\": 15}},\"thoughtSignature\": \"CikB0e2Kb8U5/pBCljebIcg2A6YS6hrbbpSZxkBqwLEtMeXSp3VgqzxFfwpSAdHtim/J3oxEa23pl45S6ILKbIk8mrvafueiUni658C3m0AydKXx96v4XZMyCKZXtlRlKF2b5cIVRXnd5FU269+k3aYUodfw4KEyM1/6k2JtywrUAQHR7YpvMSRAu6uOizYwxCivae6QRftgUArCIIrKg4//i8/rqvyXf+H6lchZbWgHqsWqUqeP83Xbr/Wn9ycSg9E3ql5I+fg02wzdoi8l1rizh0G9TB2Y6L9u7LCmNCHljEqtbyEeK6z/E0DGUOPxzg6a4F+DZgy4+CgJcv78/YDXz89snc3BfWqrtfjdOWRkF7aBzRgrjTPYPy9PlRuN0IpCcRuEVj2Z545JFd86y3fEAlNyPquEdYTZPNCRNyvfzfxe/akFsKVwoxT9n3bn042w7b9FCioB0e2Kb7hPtS/ZpcnnCkWr8yuufP007PLPpxftDTxftQLQ+8stieRLhPk=\"}],\"role\": \"model\"},\"finishReason\": \"STOP\",\"index\": 0}],\"usageMetadata\": {\"promptTokenCount\": 72,\"candidatesTokenCount\": 20,\"totalTokenCount\": 168,\"promptTokensDetails\": [{\"modality\": \"TEXT\",\"tokenCount\": 72}],\"thoughtsTokenCount\": 76},\"modelVersion\": \"gemini-2.5-flash\",\"responseId\": \"kF3AaKvWLqqvqtsPqK2DkAM\"}\r\n\r\n" - headers: - Content-Type: - - text/event-stream - status: 200 OK - code: 200 - duration: 1.43092075s -- id: 1 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 723 - host: generativelanguage.googleapis.com - body: "{\"contents\":[{\"parts\":[{\"text\":\"What is 15 + 27?\"}],\"role\":\"user\"},{\"parts\":[{\"functionCall\":{\"args\":{\"a\":15,\"b\":27},\"id\":\"add\",\"name\":\"add\"}}],\"role\":\"model\"},{\"parts\":[{\"functionResponse\":{\"id\":\"add\",\"name\":\"add\",\"response\":{\"result\":\"42\"}}}],\"role\":\"user\"}],\"generationConfig\":{},\"systemInstruction\":{\"parts\":[{\"text\":\"You are a helpful assistant. Use the add tool to perform calculations.\"}],\"role\":\"user\"},\"toolConfig\":{\"functionCallingConfig\":{\"mode\":\"AUTO\"}},\"tools\":[{\"functionDeclarations\":[{\"description\":\"Add two numbers\",\"name\":\"add\",\"parameters\":{\"properties\":{\"a\":{\"description\":\"first number\",\"type\":\"INTEGER\"},\"b\":{\"description\":\"second number\",\"type\":\"INTEGER\"}},\"required\":[\"a\",\"b\"],\"type\":\"OBJECT\"}}]}]}\n" - form: - alt: - - sse - headers: - Content-Type: - - application/json - User-Agent: - - google-genai-sdk/1.23.0 gl-go/go1.24.5 - url: https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:streamGenerateContent?alt=sse - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - body: "data: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \"1\"}],\"role\": \"model\"},\"index\": 0}],\"usageMetadata\": {\"promptTokenCount\": 106,\"candidatesTokenCount\": 1,\"totalTokenCount\": 107,\"promptTokensDetails\": [{\"modality\": \"TEXT\",\"tokenCount\": 106}]},\"modelVersion\": \"gemini-2.5-flash\",\"responseId\": \"kV3AaLLYMq-9qtsPp7ytgAM\"}\r\n\r\ndata: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \"5 + 27 = 42.\"}],\"role\": \"model\"},\"finishReason\": \"STOP\",\"index\": 0}],\"usageMetadata\": {\"promptTokenCount\": 106,\"candidatesTokenCount\": 11,\"totalTokenCount\": 117,\"promptTokensDetails\": [{\"modality\": \"TEXT\",\"tokenCount\": 106}]},\"modelVersion\": \"gemini-2.5-flash\",\"responseId\": \"kV3AaLLYMq-9qtsPp7ytgAM\"}\r\n\r\n" - headers: - Content-Type: - - text/event-stream - status: 200 OK - code: 200 - duration: 509.578042ms diff --git a/providertests/testdata/TestStreamWithTools/google-gemini-2.5-pro.yaml b/providertests/testdata/TestStreamWithTools/google-gemini-2.5-pro.yaml deleted file mode 100644 index 798dd5c468af75db1d788a0de682b4553d931e8e..0000000000000000000000000000000000000000 --- a/providertests/testdata/TestStreamWithTools/google-gemini-2.5-pro.yaml +++ /dev/null @@ -1,63 +0,0 @@ ---- -version: 2 -interactions: -- id: 0 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 530 - host: generativelanguage.googleapis.com - body: "{\"contents\":[{\"parts\":[{\"text\":\"What is 15 + 27?\"}],\"role\":\"user\"}],\"generationConfig\":{},\"systemInstruction\":{\"parts\":[{\"text\":\"You are a helpful assistant. Use the add tool to perform calculations.\"}],\"role\":\"user\"},\"toolConfig\":{\"functionCallingConfig\":{\"mode\":\"AUTO\"}},\"tools\":[{\"functionDeclarations\":[{\"description\":\"Add two numbers\",\"name\":\"add\",\"parameters\":{\"properties\":{\"a\":{\"description\":\"first number\",\"type\":\"INTEGER\"},\"b\":{\"description\":\"second number\",\"type\":\"INTEGER\"}},\"required\":[\"a\",\"b\"],\"type\":\"OBJECT\"}}]}]}\n" - form: - alt: - - sse - headers: - Content-Type: - - application/json - User-Agent: - - google-genai-sdk/1.23.0 gl-go/go1.24.5 - url: https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-pro:streamGenerateContent?alt=sse - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - body: "data: {\"candidates\": [{\"content\": {\"parts\": [{\"functionCall\": {\"name\": \"add\",\"args\": {\"a\": 15,\"b\": 27}},\"thoughtSignature\": \"CiIB0e2Kb2WCop+Zqu2/Wo6HbI76LR2pExrZuWdDHWN79KUACnQB0e2Kb9aqRpL5wNsl3ORu+0vFV3BP9ABBM4oraVuU8vqS3k62JhArdaJRm8wDAAkRx0bvWiIEWlNz0hfm0sjhAi4V79Hi3m7kJWdPcKyO6vZCwO1Xw6P+NemV2a1ls5VhlprKhvZX+ZP2S3aGtdPV7sHEuAqCAQHR7YpvR7B6hLN+zKGJOCnZ6dSa4hYHPte45veVPuY4IruZswvSNohlrDVfe8pzyiGX4RuxG3OKCTUA9lkC/t12BftGbu8eaJP9vLDvuQzBs4NODZ7QsC+zyR9+NQkM73KoV+SUqMj4W7O0Og9o+rJH/MbTGPOOBgAzOZ7eLOJjrlUKbAHR7YpvwQRxZmUkUOfB0S+vaBHLZdLLjqkCwdKdpVB0WHuFbStrkzKCnpb98vsNkEi6PIE0dAHCURCnnvGYujsMGu+3RbcbdkNbiAgf6dvILgMwwv6gr1hA7bVISzmrLucP8g+I+1iPrxaJCApmAdHtim/+e4pHd8x0iWDawyOG+CHaAZXHTGnXFC0i/q/Gq2yPcQ1zTAWHlZks+VsvZQe6rJYmQF3avaPuHK5Hc96s1InPKAU6e6w9Km7rfMuL0SWPIVw2jsmLTedRD+BB9IqJad48CmgB0e2Kb9jEN3H5P5ruCj87j9c7UJsYlYtHxCECPRL1DfUalIuhp0eER8ZhDUkuDk2Uwfm4p4kv8gUNfRUfyER3AsJQIZY3xJlhb+oQazH9BANZL+cvsQLKQekx40VCA7ZZa2oT/QYJbAqPAQHR7YpvIcbAWSIb6eUrAFH3Gu7tM/4AHJ25PmNRBPia7b4Z0vPJbEqiVhdbMDoFRqP39NT2iP14PprWBynH7Ql1+dPVAkeOI0BNvmz9A8Ssbvh23A0FLe1K09CXawDQaauP0uI87y28stJfDg/ae3JSTn06ckKpR8VPeEQa3WUMC2mai1QLGE9g1Dg98EY1CksB0e2KbzpvS3ZWRUkD7sQ5El/UIKfAPUc1e+loSXZfglBhMpJ7m4oglP9KX+X3jdtVMoSJJk2HmSBFEArERm1OUQWRB17yoXXWWrM=\"}],\"role\": \"model\"},\"finishReason\": \"STOP\",\"index\": 0}],\"usageMetadata\": {\"promptTokenCount\": 72,\"candidatesTokenCount\": 20,\"totalTokenCount\": 247,\"promptTokensDetails\": [{\"modality\": \"TEXT\",\"tokenCount\": 72}],\"thoughtsTokenCount\": 155},\"modelVersion\": \"gemini-2.5-pro\",\"responseId\": \"J4vAaIuqI5yhqtsPrIq8qAM\"}\r\n\r\n" - headers: - Content-Type: - - text/event-stream - status: 200 OK - code: 200 - duration: 3.417542166s -- id: 1 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 723 - host: generativelanguage.googleapis.com - body: "{\"contents\":[{\"parts\":[{\"text\":\"What is 15 + 27?\"}],\"role\":\"user\"},{\"parts\":[{\"functionCall\":{\"args\":{\"a\":15,\"b\":27},\"id\":\"add\",\"name\":\"add\"}}],\"role\":\"model\"},{\"parts\":[{\"functionResponse\":{\"id\":\"add\",\"name\":\"add\",\"response\":{\"result\":\"42\"}}}],\"role\":\"user\"}],\"generationConfig\":{},\"systemInstruction\":{\"parts\":[{\"text\":\"You are a helpful assistant. Use the add tool to perform calculations.\"}],\"role\":\"user\"},\"toolConfig\":{\"functionCallingConfig\":{\"mode\":\"AUTO\"}},\"tools\":[{\"functionDeclarations\":[{\"description\":\"Add two numbers\",\"name\":\"add\",\"parameters\":{\"properties\":{\"a\":{\"description\":\"first number\",\"type\":\"INTEGER\"},\"b\":{\"description\":\"second number\",\"type\":\"INTEGER\"}},\"required\":[\"a\",\"b\"],\"type\":\"OBJECT\"}}]}]}\n" - form: - alt: - - sse - headers: - Content-Type: - - application/json - User-Agent: - - google-genai-sdk/1.23.0 gl-go/go1.24.5 - url: https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-pro:streamGenerateContent?alt=sse - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - body: "data: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \"OK\"}],\"role\": \"model\"},\"index\": 0}],\"usageMetadata\": {\"promptTokenCount\": 106,\"candidatesTokenCount\": 1,\"totalTokenCount\": 107,\"promptTokensDetails\": [{\"modality\": \"TEXT\",\"tokenCount\": 106}]},\"modelVersion\": \"gemini-2.5-pro\",\"responseId\": \"K4vAaLuEFdGuqtsPk7jA2QI\"}\r\n\r\ndata: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \". 15 + 27 = 42.\\n\"}],\"role\": \"model\"},\"finishReason\": \"STOP\",\"index\": 0}],\"usageMetadata\": {\"promptTokenCount\": 106,\"candidatesTokenCount\": 14,\"totalTokenCount\": 120,\"promptTokensDetails\": [{\"modality\": \"TEXT\",\"tokenCount\": 106}]},\"modelVersion\": \"gemini-2.5-pro\",\"responseId\": \"K4vAaLuEFdGuqtsPk7jA2QI\"}\r\n\r\n" - headers: - Content-Type: - - text/event-stream - status: 200 OK - code: 200 - duration: 2.166403083s diff --git a/providertests/testdata/TestStreamWithTools/openai-gpt-4o-mini.yaml b/providertests/testdata/TestStreamWithTools/openai-gpt-4o-mini.yaml deleted file mode 100644 index 3699cbc24355fb1a2bb06f7da7348906091038f0..0000000000000000000000000000000000000000 --- a/providertests/testdata/TestStreamWithTools/openai-gpt-4o-mini.yaml +++ /dev/null @@ -1,61 +0,0 @@ ---- -version: 2 -interactions: -- id: 0 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 532 - host: "" - body: "{\"messages\":[{\"content\":\"You are a helpful assistant. Use the add tool to perform calculations.\",\"role\":\"system\"},{\"content\":\"What is 15 + 27?\",\"role\":\"user\"}],\"model\":\"gpt-4o-mini\",\"stream_options\":{\"include_usage\":true},\"tool_choice\":\"auto\",\"tools\":[{\"function\":{\"name\":\"add\",\"strict\":false,\"description\":\"Add two numbers\",\"parameters\":{\"properties\":{\"a\":{\"description\":\"first number\",\"type\":\"integer\"},\"b\":{\"description\":\"second number\",\"type\":\"integer\"}},\"required\":[\"a\",\"b\"],\"type\":\"object\"}},\"type\":\"function\"}],\"stream\":true}" - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - OpenAI/Go 2.3.0 - url: https://api.openai.com/v1/chat/completions - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - body: "data: {\"id\":\"chatcmpl-CC86HU3sn6BghCHd9nGYvSrbG8Nq6\",\"object\":\"chat.completion.chunk\",\"created\":1757007109,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_8bda4d3a2c\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_SexxPUavmIXkdPj9YCY86rAv\",\"type\":\"function\",\"function\":{\"name\":\"add\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"Bi5lh4c7wm9V\"}\n\ndata: {\"id\":\"chatcmpl-CC86HU3sn6BghCHd9nGYvSrbG8Nq6\",\"object\":\"chat.completion.chunk\",\"created\":1757007109,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_8bda4d3a2c\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"9slbQBld7uDfGx\"}\n\ndata: {\"id\":\"chatcmpl-CC86HU3sn6BghCHd9nGYvSrbG8Nq6\",\"object\":\"chat.completion.chunk\",\"created\":1757007109,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_8bda4d3a2c\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"a\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"\"}\n\ndata: {\"id\":\"chatcmpl-CC86HU3sn6BghCHd9nGYvSrbG8Nq6\",\"object\":\"chat.completion.chunk\",\"created\":1757007109,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_8bda4d3a2c\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"In7gVcr4gFp8AQ\"}\n\ndata: {\"id\":\"chatcmpl-CC86HU3sn6BghCHd9nGYvSrbG8Nq6\",\"object\":\"chat.completion.chunk\",\"created\":1757007109,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_8bda4d3a2c\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"15\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"E8J66QfDmefl0se\"}\n\ndata: {\"id\":\"chatcmpl-CC86HU3sn6BghCHd9nGYvSrbG8Nq6\",\"object\":\"chat.completion.chunk\",\"created\":1757007109,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_8bda4d3a2c\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"OQRle4Kd1hRgyU\"}\n\ndata: {\"id\":\"chatcmpl-CC86HU3sn6BghCHd9nGYvSrbG8Nq6\",\"object\":\"chat.completion.chunk\",\"created\":1757007109,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_8bda4d3a2c\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"b\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"\"}\n\ndata: {\"id\":\"chatcmpl-CC86HU3sn6BghCHd9nGYvSrbG8Nq6\",\"object\":\"chat.completion.chunk\",\"created\":1757007109,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_8bda4d3a2c\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"8Nz9jINTs9JpkR\"}\n\ndata: {\"id\":\"chatcmpl-CC86HU3sn6BghCHd9nGYvSrbG8Nq6\",\"object\":\"chat.completion.chunk\",\"created\":1757007109,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_8bda4d3a2c\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"27\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"1Qv0gJNAeyn9KCl\"}\n\ndata: {\"id\":\"chatcmpl-CC86HU3sn6BghCHd9nGYvSrbG8Nq6\",\"object\":\"chat.completion.chunk\",\"created\":1757007109,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_8bda4d3a2c\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"\"}\n\ndata: {\"id\":\"chatcmpl-CC86HU3sn6BghCHd9nGYvSrbG8Nq6\",\"object\":\"chat.completion.chunk\",\"created\":1757007109,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_8bda4d3a2c\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"usage\":null,\"obfuscation\":\"NViWjR1EBYC8EUs\"}\n\ndata: {\"id\":\"chatcmpl-CC86HU3sn6BghCHd9nGYvSrbG8Nq6\",\"object\":\"chat.completion.chunk\",\"created\":1757007109,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_8bda4d3a2c\",\"choices\":[],\"usage\":{\"prompt_tokens\":73,\"completion_tokens\":17,\"total_tokens\":90,\"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\":\"Twq5TqPXwD\"}\n\ndata: [DONE]\n\n" - headers: - Content-Type: - - text/event-stream; charset=utf-8 - status: 200 OK - code: 200 - duration: 852.636542ms -- id: 1 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 763 - host: "" - body: "{\"messages\":[{\"content\":\"You are a helpful assistant. Use the add tool to perform calculations.\",\"role\":\"system\"},{\"content\":\"What is 15 + 27?\",\"role\":\"user\"},{\"tool_calls\":[{\"id\":\"call_SexxPUavmIXkdPj9YCY86rAv\",\"function\":{\"arguments\":\"{\\\"a\\\":15,\\\"b\\\":27}\",\"name\":\"add\"},\"type\":\"function\"}],\"role\":\"assistant\"},{\"content\":\"42\",\"tool_call_id\":\"call_SexxPUavmIXkdPj9YCY86rAv\",\"role\":\"tool\"}],\"model\":\"gpt-4o-mini\",\"stream_options\":{\"include_usage\":true},\"tool_choice\":\"auto\",\"tools\":[{\"function\":{\"name\":\"add\",\"strict\":false,\"description\":\"Add two numbers\",\"parameters\":{\"properties\":{\"a\":{\"description\":\"first number\",\"type\":\"integer\"},\"b\":{\"description\":\"second number\",\"type\":\"integer\"}},\"required\":[\"a\",\"b\"],\"type\":\"object\"}},\"type\":\"function\"}],\"stream\":true}" - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - OpenAI/Go 2.3.0 - url: https://api.openai.com/v1/chat/completions - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - body: "data: {\"id\":\"chatcmpl-CC86I0sQZB3BScMjD1Vlq9r4LNG7K\",\"object\":\"chat.completion.chunk\",\"created\":1757007110,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_8bda4d3a2c\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"6dNsxDRYv\"}\n\ndata: {\"id\":\"chatcmpl-CC86I0sQZB3BScMjD1Vlq9r4LNG7K\",\"object\":\"chat.completion.chunk\",\"created\":1757007110,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_8bda4d3a2c\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"15\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"eeOggkItX\"}\n\ndata: {\"id\":\"chatcmpl-CC86I0sQZB3BScMjD1Vlq9r4LNG7K\",\"object\":\"chat.completion.chunk\",\"created\":1757007110,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_8bda4d3a2c\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" +\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"eTh8CvrQp\"}\n\ndata: {\"id\":\"chatcmpl-CC86I0sQZB3BScMjD1Vlq9r4LNG7K\",\"object\":\"chat.completion.chunk\",\"created\":1757007110,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_8bda4d3a2c\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"Y4Xvam5bns\"}\n\ndata: {\"id\":\"chatcmpl-CC86I0sQZB3BScMjD1Vlq9r4LNG7K\",\"object\":\"chat.completion.chunk\",\"created\":1757007110,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_8bda4d3a2c\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"27\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"taAs18INA\"}\n\ndata: {\"id\":\"chatcmpl-CC86I0sQZB3BScMjD1Vlq9r4LNG7K\",\"object\":\"chat.completion.chunk\",\"created\":1757007110,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_8bda4d3a2c\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" equals\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"QqWb\"}\n\ndata: {\"id\":\"chatcmpl-CC86I0sQZB3BScMjD1Vlq9r4LNG7K\",\"object\":\"chat.completion.chunk\",\"created\":1757007110,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_8bda4d3a2c\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"UKNosA2zT5\"}\n\ndata: {\"id\":\"chatcmpl-CC86I0sQZB3BScMjD1Vlq9r4LNG7K\",\"object\":\"chat.completion.chunk\",\"created\":1757007110,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_8bda4d3a2c\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"42\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"2eSH3S32n\"}\n\ndata: {\"id\":\"chatcmpl-CC86I0sQZB3BScMjD1Vlq9r4LNG7K\",\"object\":\"chat.completion.chunk\",\"created\":1757007110,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_8bda4d3a2c\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"qeXjwKLKsA\"}\n\ndata: {\"id\":\"chatcmpl-CC86I0sQZB3BScMjD1Vlq9r4LNG7K\",\"object\":\"chat.completion.chunk\",\"created\":1757007110,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_8bda4d3a2c\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}],\"usage\":null,\"obfuscation\":\"grITR\"}\n\ndata: {\"id\":\"chatcmpl-CC86I0sQZB3BScMjD1Vlq9r4LNG7K\",\"object\":\"chat.completion.chunk\",\"created\":1757007110,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_8bda4d3a2c\",\"choices\":[],\"usage\":{\"prompt_tokens\":98,\"completion_tokens\":9,\"total_tokens\":107,\"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\":\"8R73BwOCQi\"}\n\ndata: [DONE]\n\n" - headers: - Content-Type: - - text/event-stream; charset=utf-8 - status: 200 OK - code: 200 - duration: 709.664625ms diff --git a/providertests/testdata/TestStreamWithTools/openai-gpt-4o.yaml b/providertests/testdata/TestStreamWithTools/openai-gpt-4o.yaml deleted file mode 100644 index 045f3e59936f1705c272935684c336c92eedbe50..0000000000000000000000000000000000000000 --- a/providertests/testdata/TestStreamWithTools/openai-gpt-4o.yaml +++ /dev/null @@ -1,61 +0,0 @@ ---- -version: 2 -interactions: -- id: 0 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 527 - host: "" - body: "{\"messages\":[{\"content\":\"You are a helpful assistant. Use the add tool to perform calculations.\",\"role\":\"system\"},{\"content\":\"What is 15 + 27?\",\"role\":\"user\"}],\"model\":\"gpt-4o\",\"stream_options\":{\"include_usage\":true},\"tool_choice\":\"auto\",\"tools\":[{\"function\":{\"name\":\"add\",\"strict\":false,\"description\":\"Add two numbers\",\"parameters\":{\"properties\":{\"a\":{\"description\":\"first number\",\"type\":\"integer\"},\"b\":{\"description\":\"second number\",\"type\":\"integer\"}},\"required\":[\"a\",\"b\"],\"type\":\"object\"}},\"type\":\"function\"}],\"stream\":true}" - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - OpenAI/Go 2.3.0 - url: https://api.openai.com/v1/chat/completions - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - body: "data: {\"id\":\"chatcmpl-CC7KWfg68JP1ntmxrXmMcjeGwt2yf\",\"object\":\"chat.completion.chunk\",\"created\":1757004148,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_32EKgZToXJGCcoOsKGeKDBMG\",\"type\":\"function\",\"function\":{\"name\":\"add\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"G\"}\n\ndata: {\"id\":\"chatcmpl-CC7KWfg68JP1ntmxrXmMcjeGwt2yf\",\"object\":\"chat.completion.chunk\",\"created\":1757004148,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"o83\"}\n\ndata: {\"id\":\"chatcmpl-CC7KWfg68JP1ntmxrXmMcjeGwt2yf\",\"object\":\"chat.completion.chunk\",\"created\":1757004148,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"a\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"Sqazb\"}\n\ndata: {\"id\":\"chatcmpl-CC7KWfg68JP1ntmxrXmMcjeGwt2yf\",\"object\":\"chat.completion.chunk\",\"created\":1757004148,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"ytC\"}\n\ndata: {\"id\":\"chatcmpl-CC7KWfg68JP1ntmxrXmMcjeGwt2yf\",\"object\":\"chat.completion.chunk\",\"created\":1757004148,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"15\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"Jt63\"}\n\ndata: {\"id\":\"chatcmpl-CC7KWfg68JP1ntmxrXmMcjeGwt2yf\",\"object\":\"chat.completion.chunk\",\"created\":1757004148,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\",\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"UEV\"}\n\ndata: {\"id\":\"chatcmpl-CC7KWfg68JP1ntmxrXmMcjeGwt2yf\",\"object\":\"chat.completion.chunk\",\"created\":1757004148,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"b\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"lGxRz\"}\n\ndata: {\"id\":\"chatcmpl-CC7KWfg68JP1ntmxrXmMcjeGwt2yf\",\"object\":\"chat.completion.chunk\",\"created\":1757004148,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"72d\"}\n\ndata: {\"id\":\"chatcmpl-CC7KWfg68JP1ntmxrXmMcjeGwt2yf\",\"object\":\"chat.completion.chunk\",\"created\":1757004148,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"27\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"D0VY\"}\n\ndata: {\"id\":\"chatcmpl-CC7KWfg68JP1ntmxrXmMcjeGwt2yf\",\"object\":\"chat.completion.chunk\",\"created\":1757004148,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"VyN2Q\"}\n\ndata: {\"id\":\"chatcmpl-CC7KWfg68JP1ntmxrXmMcjeGwt2yf\",\"object\":\"chat.completion.chunk\",\"created\":1757004148,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"tool_calls\"}],\"usage\":null,\"obfuscation\":\"lUEs\"}\n\ndata: {\"id\":\"chatcmpl-CC7KWfg68JP1ntmxrXmMcjeGwt2yf\",\"object\":\"chat.completion.chunk\",\"created\":1757004148,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[],\"usage\":{\"prompt_tokens\":73,\"completion_tokens\":17,\"total_tokens\":90,\"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\":\"u6D1A99gV8BIvOR\"}\n\ndata: [DONE]\n\n" - headers: - Content-Type: - - text/event-stream; charset=utf-8 - status: 200 OK - code: 200 - duration: 1.275977s -- id: 1 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 758 - host: "" - body: "{\"messages\":[{\"content\":\"You are a helpful assistant. Use the add tool to perform calculations.\",\"role\":\"system\"},{\"content\":\"What is 15 + 27?\",\"role\":\"user\"},{\"tool_calls\":[{\"id\":\"call_32EKgZToXJGCcoOsKGeKDBMG\",\"function\":{\"arguments\":\"{\\\"a\\\":15,\\\"b\\\":27}\",\"name\":\"add\"},\"type\":\"function\"}],\"role\":\"assistant\"},{\"content\":\"42\",\"tool_call_id\":\"call_32EKgZToXJGCcoOsKGeKDBMG\",\"role\":\"tool\"}],\"model\":\"gpt-4o\",\"stream_options\":{\"include_usage\":true},\"tool_choice\":\"auto\",\"tools\":[{\"function\":{\"name\":\"add\",\"strict\":false,\"description\":\"Add two numbers\",\"parameters\":{\"properties\":{\"a\":{\"description\":\"first number\",\"type\":\"integer\"},\"b\":{\"description\":\"second number\",\"type\":\"integer\"}},\"required\":[\"a\",\"b\"],\"type\":\"object\"}},\"type\":\"function\"}],\"stream\":true}" - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - OpenAI/Go 2.3.0 - url: https://api.openai.com/v1/chat/completions - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - body: "data: {\"id\":\"chatcmpl-CC7KYLaQy1yokH0JcpuncBILcIrSc\",\"object\":\"chat.completion.chunk\",\"created\":1757004150,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"lHQy6EEWHTpR9e\"}\n\ndata: {\"id\":\"chatcmpl-CC7KYLaQy1yokH0JcpuncBILcIrSc\",\"object\":\"chat.completion.chunk\",\"created\":1757004150,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"15\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"4l3v3yNWlz6ezS\"}\n\ndata: {\"id\":\"chatcmpl-CC7KYLaQy1yokH0JcpuncBILcIrSc\",\"object\":\"chat.completion.chunk\",\"created\":1757004150,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" +\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"jBTpHdjr9xDqYh\"}\n\ndata: {\"id\":\"chatcmpl-CC7KYLaQy1yokH0JcpuncBILcIrSc\",\"object\":\"chat.completion.chunk\",\"created\":1757004150,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"10oJvn7BeIA3iry\"}\n\ndata: {\"id\":\"chatcmpl-CC7KYLaQy1yokH0JcpuncBILcIrSc\",\"object\":\"chat.completion.chunk\",\"created\":1757004150,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"27\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"NFNSh8QNVa9Fl5\"}\n\ndata: {\"id\":\"chatcmpl-CC7KYLaQy1yokH0JcpuncBILcIrSc\",\"object\":\"chat.completion.chunk\",\"created\":1757004150,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" is\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"ayv5ohnA1tCWD\"}\n\ndata: {\"id\":\"chatcmpl-CC7KYLaQy1yokH0JcpuncBILcIrSc\",\"object\":\"chat.completion.chunk\",\"created\":1757004150,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"B81ro7bFywRKLgj\"}\n\ndata: {\"id\":\"chatcmpl-CC7KYLaQy1yokH0JcpuncBILcIrSc\",\"object\":\"chat.completion.chunk\",\"created\":1757004150,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"42\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"lDVhH4mGOWHn0L\"}\n\ndata: {\"id\":\"chatcmpl-CC7KYLaQy1yokH0JcpuncBILcIrSc\",\"object\":\"chat.completion.chunk\",\"created\":1757004150,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"CUsaGMVGQyyqVbK\"}\n\ndata: {\"id\":\"chatcmpl-CC7KYLaQy1yokH0JcpuncBILcIrSc\",\"object\":\"chat.completion.chunk\",\"created\":1757004150,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}],\"usage\":null,\"obfuscation\":\"1lVNWlWnms\"}\n\ndata: {\"id\":\"chatcmpl-CC7KYLaQy1yokH0JcpuncBILcIrSc\",\"object\":\"chat.completion.chunk\",\"created\":1757004150,\"model\":\"gpt-4o-2024-08-06\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_f33640a400\",\"choices\":[],\"usage\":{\"prompt_tokens\":98,\"completion_tokens\":9,\"total_tokens\":107,\"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\":\"xStpLtBU1J2gDbA\"}\n\ndata: [DONE]\n\n" - headers: - Content-Type: - - text/event-stream; charset=utf-8 - status: 200 OK - code: 200 - duration: 1.835219083s diff --git a/providertests/testdata/TestStreamWithTools/openrouter-kimi-k2.yaml b/providertests/testdata/TestStreamWithTools/openrouter-kimi-k2.yaml deleted file mode 100644 index 3ce2d06ac370ec6482425512febc5ecb4fb18076..0000000000000000000000000000000000000000 --- a/providertests/testdata/TestStreamWithTools/openrouter-kimi-k2.yaml +++ /dev/null @@ -1,90 +0,0 @@ ---- -version: 2 -interactions: -- id: 0 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 569 - host: "" - body: "{\"messages\":[{\"content\":\"You are a helpful assistant. Use the add tool to perform calculations.\",\"role\":\"system\"},{\"content\":\"What is 15 + 27?\",\"role\":\"user\"}],\"model\":\"moonshotai/kimi-k2-0905\",\"stream_options\":{\"include_usage\":true},\"tool_choice\":\"auto\",\"tools\":[{\"function\":{\"name\":\"add\",\"strict\":false,\"description\":\"Add two numbers\",\"parameters\":{\"properties\":{\"a\":{\"description\":\"first number\",\"type\":\"integer\"},\"b\":{\"description\":\"second number\",\"type\":\"integer\"}},\"required\":[\"a\",\"b\"],\"type\":\"object\"}},\"type\":\"function\"}],\"usage\":{\"include\":true},\"stream\":true}" - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - OpenAI/Go 2.3.0 - 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-1758536687-GEdmyOeqMtsBHOOX9yf0\",\"provider\":\"Moonshot AI\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758536687,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}],\"system_fingerprint\":\"fpv0_ec889fbb\"}\n\ndata: {\"id\":\"gen-1758536687-GEdmyOeqMtsBHOOX9yf0\",\"provider\":\"Moonshot AI\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758536687,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"I'll\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}],\"system_fingerprint\":\"fpv0_ec889fbb\"}\n\ndata: {\"id\":\"gen-1758536687-GEdmyOeqMtsBHOOX9yf0\",\"provider\":\"Moonshot AI\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758536687,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" use\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}],\"system_fingerprint\":\"fpv0_ec889fbb\"}\n\ndata: {\"id\":\"gen-1758536687-GEdmyOeqMtsBHOOX9yf0\",\"provider\":\"Moonshot AI\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758536687,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" the\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}],\"system_fingerprint\":\"fpv0_ec889fbb\"}\n\ndata: {\"id\":\"gen-1758536687-GEdmyOeqMtsBHOOX9yf0\",\"provider\":\"Moonshot AI\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758536687,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" add\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}],\"system_fingerprint\":\"fpv0_ec889fbb\"}\n\ndata: {\"id\":\"gen-1758536687-GEdmyOeqMtsBHOOX9yf0\",\"provider\":\"Moonshot AI\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758536687,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" tool\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}],\"system_fingerprint\":\"fpv0_ec889fbb\"}\n\ndata: {\"id\":\"gen-1758536687-GEdmyOeqMtsBHOOX9yf0\",\"provider\":\"Moonshot AI\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758536687,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" to\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}],\"system_fingerprint\":\"fpv0_ec889fbb\"}\n\ndata: {\"id\":\"gen-1758536687-GEdmyOeqMtsBHOOX9yf0\",\"provider\":\"Moonshot AI\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758536687,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" calculate\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}],\"system_fingerprint\":\"fpv0_ec889fbb\"}\n\ndata: {\"id\":\"gen-1758536687-GEdmyOeqMtsBHOOX9yf0\",\"provider\":\"Moonshot AI\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758536687,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" \"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}],\"system_fingerprint\":\"fpv0_ec889fbb\"}\n\ndata: {\"id\":\"gen-1758536687-GEdmyOeqMtsBHOOX9yf0\",\"provider\":\"Moonshot AI\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758536687,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"15\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}],\"system_fingerprint\":\"fpv0_ec889fbb\"}\n\ndata: {\"id\":\"gen-1758536687-GEdmyOeqMtsBHOOX9yf0\",\"provider\":\"Moonshot AI\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758536687,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" +\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}],\"system_fingerprint\":\"fpv0_ec889fbb\"}\n\ndata: {\"id\":\"gen-1758536687-GEdmyOeqMtsBHOOX9yf0\",\"provider\":\"Moonshot AI\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758536687,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" \"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}],\"system_fingerprint\":\"fpv0_ec889fbb\"}\n\ndata: {\"id\":\"gen-1758536687-GEdmyOeqMtsBHOOX9yf0\",\"provider\":\"Moonshot AI\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758536687,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"27\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}],\"system_fingerprint\":\"fpv0_ec889fbb\"}\n\ndata: {\"id\":\"gen-1758536687-GEdmyOeqMtsBHOOX9yf0\",\"provider\":\"Moonshot AI\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758536687,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" for\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}],\"system_fingerprint\":\"fpv0_ec889fbb\"}\n\ndata: {\"id\":\"gen-1758536687-GEdmyOeqMtsBHOOX9yf0\",\"provider\":\"Moonshot AI\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758536687,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" you\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}],\"system_fingerprint\":\"fpv0_ec889fbb\"}\n\ndata: {\"id\":\"gen-1758536687-GEdmyOeqMtsBHOOX9yf0\",\"provider\":\"Moonshot AI\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758536687,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\".\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}],\"system_fingerprint\":\"fpv0_ec889fbb\"}\n\ndata: {\"id\":\"gen-1758536687-GEdmyOeqMtsBHOOX9yf0\",\"provider\":\"Moonshot AI\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758536687,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"add:0\",\"type\":\"function\",\"function\":{\"name\":\"add\",\"arguments\":\"\"}}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}],\"system_fingerprint\":\"fpv0_ec889fbb\"}\n\ndata: {\"id\":\"gen-1758536687-GEdmyOeqMtsBHOOX9yf0\",\"provider\":\"Moonshot AI\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758536687,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"},\"type\":\"function\"}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}],\"system_fingerprint\":\"fpv0_ec889fbb\"}\n\ndata: {\"id\":\"gen-1758536687-GEdmyOeqMtsBHOOX9yf0\",\"provider\":\"Moonshot AI\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758536687,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"a\"},\"type\":\"function\"}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}],\"system_fingerprint\":\"fpv0_ec889fbb\"}\n\ndata: {\"id\":\"gen-1758536687-GEdmyOeqMtsBHOOX9yf0\",\"provider\":\"Moonshot AI\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758536687,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\"},\"type\":\"function\"}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}],\"system_fingerprint\":\"fpv0_ec889fbb\"}\n\ndata: {\"id\":\"gen-1758536687-GEdmyOeqMtsBHOOX9yf0\",\"provider\":\"Moonshot AI\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758536687,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" \"},\"type\":\"function\"}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}],\"system_fingerprint\":\"fpv0_ec889fbb\"}\n\ndata: {\"id\":\"gen-1758536687-GEdmyOeqMtsBHOOX9yf0\",\"provider\":\"Moonshot AI\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758536687,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"15\"},\"type\":\"function\"}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}],\"system_fingerprint\":\"fpv0_ec889fbb\"}\n\ndata: {\"id\":\"gen-1758536687-GEdmyOeqMtsBHOOX9yf0\",\"provider\":\"Moonshot AI\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758536687,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\",\"},\"type\":\"function\"}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}],\"system_fingerprint\":\"fpv0_ec889fbb\"}\n\ndata: {\"id\":\"gen-1758536687-GEdmyOeqMtsBHOOX9yf0\",\"provider\":\"Moonshot AI\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758536687,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" \\\"\"},\"type\":\"function\"}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}],\"system_fingerprint\":\"fpv0_ec889fbb\"}\n\ndata: {\"id\":\"gen-1758536687-GEdmyOeqMtsBHOOX9yf0\",\"provider\":\"Moonshot AI\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758536687,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"b\"},\"type\":\"function\"}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}],\"system_fingerprint\":\"fpv0_ec889fbb\"}\n\ndata: {\"id\":\"gen-1758536687-GEdmyOeqMtsBHOOX9yf0\",\"provider\":\"Moonshot AI\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758536687,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\"},\"type\":\"function\"}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}],\"system_fingerprint\":\"fpv0_ec889fbb\"}\n\ndata: {\"id\":\"gen-1758536687-GEdmyOeqMtsBHOOX9yf0\",\"provider\":\"Moonshot AI\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758536687,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" \"},\"type\":\"function\"}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}],\"system_fingerprint\":\"fpv0_ec889fbb\"}\n\ndata: {\"id\":\"gen-1758536687-GEdmyOeqMtsBHOOX9yf0\",\"provider\":\"Moonshot AI\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758536687,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"27\"},\"type\":\"function\"}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}],\"system_fingerprint\":\"fpv0_ec889fbb\"}\n\ndata: {\"id\":\"gen-1758536687-GEdmyOeqMtsBHOOX9yf0\",\"provider\":\"Moonshot AI\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758536687,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"}\"},\"type\":\"function\"}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}],\"system_fingerprint\":\"fpv0_ec889fbb\"}\n\ndata: {\"id\":\"gen-1758536687-GEdmyOeqMtsBHOOX9yf0\",\"provider\":\"Moonshot AI\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758536687,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\"},\"finish_reason\":\"tool_calls\",\"native_finish_reason\":\"tool_calls\",\"logprobs\":null}],\"system_fingerprint\":\"fpv0_ec889fbb\"}\n\ndata: {\"id\":\"gen-1758536687-GEdmyOeqMtsBHOOX9yf0\",\"provider\":\"Moonshot AI\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758536687,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}],\"usage\":{\"prompt_tokens\":95,\"completion_tokens\":36,\"total_tokens\":131,\"cost\":0.000294,\"is_byok\":false,\"prompt_tokens_details\":{\"cached_tokens\":0,\"audio_tokens\":0},\"cost_details\":{\"upstream_inference_cost\":null,\"upstream_inference_prompt_cost\":0.000114,\"upstream_inference_completions_cost\":0.00018},\"completion_tokens_details\":{\"reasoning_tokens\":0,\"image_tokens\":0}}}\n\ndata: [DONE]\n\n" - headers: - Content-Type: - - text/event-stream - status: 200 OK - code: 200 - duration: 1.329810959s -- id: 1 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 819 - host: "" - body: "{\"messages\":[{\"content\":\"You are a helpful assistant. Use the add tool to perform calculations.\",\"role\":\"system\"},{\"content\":\"What is 15 + 27?\",\"role\":\"user\"},{\"content\":\"I'll use the add tool to calculate 15 + 27 for you.\",\"tool_calls\":[{\"id\":\"add:0\",\"function\":{\"arguments\":\"{\\\"a\\\": 15, \\\"b\\\": 27}\",\"name\":\"add\"},\"type\":\"function\"}],\"role\":\"assistant\"},{\"content\":\"42\",\"tool_call_id\":\"add:0\",\"role\":\"tool\"}],\"model\":\"moonshotai/kimi-k2-0905\",\"stream_options\":{\"include_usage\":true},\"tool_choice\":\"auto\",\"tools\":[{\"function\":{\"name\":\"add\",\"strict\":false,\"description\":\"Add two numbers\",\"parameters\":{\"properties\":{\"a\":{\"description\":\"first number\",\"type\":\"integer\"},\"b\":{\"description\":\"second number\",\"type\":\"integer\"}},\"required\":[\"a\",\"b\"],\"type\":\"object\"}},\"type\":\"function\"}],\"usage\":{\"include\":true},\"stream\":true}" - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - OpenAI/Go 2.3.0 - 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: "{\"error\":{\"message\":\"Provider returned error\",\"code\":429,\"metadata\":{\"raw\":\"moonshotai/kimi-k2-0905 is temporarily rate-limited upstream. Please retry shortly, or add your own key to accumulate your rate limits: https://openrouter.ai/settings/integrations\",\"provider_name\":\"GMICloud\"}},\"user_id\":\"user_2zMGmKqlf4zmAvL9snVImB1Z1ZQ\"}" - headers: - Content-Type: - - application/json - status: 429 Too Many Requests - code: 429 - duration: 1.30477125s -- id: 2 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 819 - host: "" - body: "{\"messages\":[{\"content\":\"You are a helpful assistant. Use the add tool to perform calculations.\",\"role\":\"system\"},{\"content\":\"What is 15 + 27?\",\"role\":\"user\"},{\"content\":\"I'll use the add tool to calculate 15 + 27 for you.\",\"tool_calls\":[{\"id\":\"add:0\",\"function\":{\"arguments\":\"{\\\"a\\\": 15, \\\"b\\\": 27}\",\"name\":\"add\"},\"type\":\"function\"}],\"role\":\"assistant\"},{\"content\":\"42\",\"tool_call_id\":\"add:0\",\"role\":\"tool\"}],\"model\":\"moonshotai/kimi-k2-0905\",\"stream_options\":{\"include_usage\":true},\"tool_choice\":\"auto\",\"tools\":[{\"function\":{\"name\":\"add\",\"strict\":false,\"description\":\"Add two numbers\",\"parameters\":{\"properties\":{\"a\":{\"description\":\"first number\",\"type\":\"integer\"},\"b\":{\"description\":\"second number\",\"type\":\"integer\"}},\"required\":[\"a\",\"b\"],\"type\":\"object\"}},\"type\":\"function\"}],\"usage\":{\"include\":true},\"stream\":true}" - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - OpenAI/Go 2.3.0 - 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-1758536691-22vujk3K5zhcbawSIEiY\",\"provider\":\"Novita\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758536691,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}],\"system_fingerprint\":\"fpv0_f0f625a1\"}\n\ndata: {\"id\":\"gen-1758536691-22vujk3K5zhcbawSIEiY\",\"provider\":\"Novita\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758536691,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"15\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}],\"system_fingerprint\":\"fpv0_f0f625a1\"}\n\ndata: {\"id\":\"gen-1758536691-22vujk3K5zhcbawSIEiY\",\"provider\":\"Novita\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758536691,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" +\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}],\"system_fingerprint\":\"fpv0_f0f625a1\"}\n\ndata: {\"id\":\"gen-1758536691-22vujk3K5zhcbawSIEiY\",\"provider\":\"Novita\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758536691,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" \"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}],\"system_fingerprint\":\"fpv0_f0f625a1\"}\n\ndata: {\"id\":\"gen-1758536691-22vujk3K5zhcbawSIEiY\",\"provider\":\"Novita\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758536691,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"27\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}],\"system_fingerprint\":\"fpv0_f0f625a1\"}\n\ndata: {\"id\":\"gen-1758536691-22vujk3K5zhcbawSIEiY\",\"provider\":\"Novita\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758536691,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" =\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}],\"system_fingerprint\":\"fpv0_f0f625a1\"}\n\ndata: {\"id\":\"gen-1758536691-22vujk3K5zhcbawSIEiY\",\"provider\":\"Novita\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758536691,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" \"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}],\"system_fingerprint\":\"fpv0_f0f625a1\"}\n\ndata: {\"id\":\"gen-1758536691-22vujk3K5zhcbawSIEiY\",\"provider\":\"Novita\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758536691,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"42\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}],\"system_fingerprint\":\"fpv0_f0f625a1\"}\n\ndata: {\"id\":\"gen-1758536691-22vujk3K5zhcbawSIEiY\",\"provider\":\"Novita\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758536691,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\"},\"finish_reason\":\"stop\",\"native_finish_reason\":\"stop\",\"logprobs\":null}],\"system_fingerprint\":\"fpv0_f0f625a1\"}\n\ndata: {\"id\":\"gen-1758536691-22vujk3K5zhcbawSIEiY\",\"provider\":\"Novita\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion.chunk\",\"created\":1758536691,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}],\"usage\":{\"prompt_tokens\":148,\"completion_tokens\":8,\"total_tokens\":156,\"cost\":0.0001088,\"is_byok\":false,\"prompt_tokens_details\":{\"cached_tokens\":0,\"audio_tokens\":0},\"cost_details\":{\"upstream_inference_cost\":null,\"upstream_inference_prompt_cost\":0.0000888,\"upstream_inference_completions_cost\":0.00002},\"completion_tokens_details\":{\"reasoning_tokens\":0,\"image_tokens\":0}}}\n\ndata: [DONE]\n\n" - headers: - Content-Type: - - text/event-stream - status: 200 OK - code: 200 - duration: 1.578136708s diff --git a/providertests/testdata/TestThinking/anthropic-claude-sonnet.yaml b/providertests/testdata/TestThinking/anthropic-claude-sonnet.yaml deleted file mode 100644 index 1a554d7b3d6b8265095a14259552834c6cb1f719..0000000000000000000000000000000000000000 --- a/providertests/testdata/TestThinking/anthropic-claude-sonnet.yaml +++ /dev/null @@ -1,63 +0,0 @@ ---- -version: 2 -interactions: -- id: 0 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 550 - host: "" - body: "{\"max_tokens\":14096,\"messages\":[{\"content\":[{\"text\":\"What's the weather in Florence, Italy?\",\"type\":\"text\"}],\"role\":\"user\"}],\"model\":\"claude-sonnet-4-20250514\",\"system\":[{\"text\":\"You are a helpful assistant\",\"type\":\"text\"}],\"thinking\":{\"budget_tokens\":10000,\"type\":\"enabled\"},\"tool_choice\":{\"disable_parallel_tool_use\":false,\"type\":\"auto\"},\"tools\":[{\"input_schema\":{\"properties\":{\"location\":{\"description\":\"the city\",\"type\":\"string\"}},\"required\":[\"location\"],\"type\":\"object\"},\"name\":\"weather\",\"description\":\"Get weather information for a location\"}]}" - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - Anthropic/Go 1.10.0 - url: https://api.anthropic.com/v1/messages - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - uncompressed: true - body: "{\"id\":\"msg_01NmYsbcWZbtPpmV1aMa5WWT\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"claude-sonnet-4-20250514\",\"content\":[{\"type\":\"thinking\",\"thinking\":\"The user is asking for weather information for Florence, Italy. I have a weather function available that takes a location parameter. The user has provided the location as \\\"Florence, Italy\\\" which is specific enough for the weather function.\\n\\nLet me call the weather function with \\\"Florence, Italy\\\" as the location parameter.\",\"signature\":\"EuwDCkYIBxgCKkChgOvL+rOlboiQFkEOC20rmj1/Xs3mTGfMFk5lIVU0H0drGyFYAl+5JU5PoWng2ZU7J9EpJrLUonCw9KBjS78oEgzAegs6pV953eMRkQAaDKJXIOEXcqfXFXnNayIwweUSskDSybgjCXZOKTQBm5xBlvThzhK75k4zycqwZpx3zeDZrdaV/+MIjgK1GAVqKtMCWp9QcmFNxVmwMGsORlN0zS3KY+3Xgd1D489b1lMG+FT8t1Xy2HxDBLlk9XY6HUQK7nN3HNXu/liglYnLT0weuYHsrzp8QgVrmgSWKLtX2pCI6SB8Df+9oQLzppw81d9+Vm3o7aJeI4nzwMxmZRekUu2j3LJiBFq5iQEAYnaGchWJ5B60mT5dk3UhnjTJYjVfaqgTHqybIwZ0ZrkAho4cybEwmQV7fCNsVIDom3v2XwDQF2TLeOGp/uFNElP4mpzQsB7k9x4asSb/kMsW8N34E5oWevGYyWDsX6c1NkTcJ+afmVN0df8i77bzFwtkrSz7/N85vX85rUxNxXCUfUiX5RkXq1ZHEL/y34ecpa9lP2CikFATgYKTfFQfc1x84LAC2aiBsDTKZFaZZocJcTHbO/PC1Ui+n4Ef8z33epy+AmGELkXG0CPgp6cqB08+AgoFlH78GAE=\"},{\"type\":\"tool_use\",\"id\":\"toolu_01M2Zq5AL9cCGbQxtDYLVQQ4\",\"name\":\"weather\",\"input\":{\"location\":\"Florence, Italy\"}}],\"stop_reason\":\"tool_use\",\"stop_sequence\":null,\"usage\":{\"input_tokens\":423,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":125,\"service_tier\":\"standard\"}}" - headers: - Content-Type: - - application/json - status: 200 OK - code: 200 - duration: 2.398491s -- id: 1 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 1879 - host: "" - body: "{\"max_tokens\":14096,\"messages\":[{\"content\":[{\"text\":\"What's the weather in Florence, Italy?\",\"type\":\"text\"}],\"role\":\"user\"},{\"content\":[{\"signature\":\"EuwDCkYIBxgCKkChgOvL+rOlboiQFkEOC20rmj1/Xs3mTGfMFk5lIVU0H0drGyFYAl+5JU5PoWng2ZU7J9EpJrLUonCw9KBjS78oEgzAegs6pV953eMRkQAaDKJXIOEXcqfXFXnNayIwweUSskDSybgjCXZOKTQBm5xBlvThzhK75k4zycqwZpx3zeDZrdaV/+MIjgK1GAVqKtMCWp9QcmFNxVmwMGsORlN0zS3KY+3Xgd1D489b1lMG+FT8t1Xy2HxDBLlk9XY6HUQK7nN3HNXu/liglYnLT0weuYHsrzp8QgVrmgSWKLtX2pCI6SB8Df+9oQLzppw81d9+Vm3o7aJeI4nzwMxmZRekUu2j3LJiBFq5iQEAYnaGchWJ5B60mT5dk3UhnjTJYjVfaqgTHqybIwZ0ZrkAho4cybEwmQV7fCNsVIDom3v2XwDQF2TLeOGp/uFNElP4mpzQsB7k9x4asSb/kMsW8N34E5oWevGYyWDsX6c1NkTcJ+afmVN0df8i77bzFwtkrSz7/N85vX85rUxNxXCUfUiX5RkXq1ZHEL/y34ecpa9lP2CikFATgYKTfFQfc1x84LAC2aiBsDTKZFaZZocJcTHbO/PC1Ui+n4Ef8z33epy+AmGELkXG0CPgp6cqB08+AgoFlH78GAE=\",\"thinking\":\"The user is asking for weather information for Florence, Italy. I have a weather function available that takes a location parameter. The user has provided the location as \\\"Florence, Italy\\\" which is specific enough for the weather function.\\n\\nLet me call the weather function with \\\"Florence, Italy\\\" as the location parameter.\",\"type\":\"thinking\"},{\"id\":\"toolu_01M2Zq5AL9cCGbQxtDYLVQQ4\",\"input\":{\"location\":\"Florence, Italy\"},\"name\":\"weather\",\"type\":\"tool_use\"}],\"role\":\"assistant\"},{\"content\":[{\"tool_use_id\":\"toolu_01M2Zq5AL9cCGbQxtDYLVQQ4\",\"content\":[{\"text\":\"40 C\",\"type\":\"text\"}],\"type\":\"tool_result\"}],\"role\":\"user\"}],\"model\":\"claude-sonnet-4-20250514\",\"system\":[{\"text\":\"You are a helpful assistant\",\"type\":\"text\"}],\"thinking\":{\"budget_tokens\":10000,\"type\":\"enabled\"},\"tool_choice\":{\"disable_parallel_tool_use\":false,\"type\":\"auto\"},\"tools\":[{\"input_schema\":{\"properties\":{\"location\":{\"description\":\"the city\",\"type\":\"string\"}},\"required\":[\"location\"],\"type\":\"object\"},\"name\":\"weather\",\"description\":\"Get weather information for a location\"}]}" - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - Anthropic/Go 1.10.0 - url: https://api.anthropic.com/v1/messages - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - uncompressed: true - body: "{\"id\":\"msg_01DyEBuCyDtP4cjnhtqdbqrh\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"claude-sonnet-4-20250514\",\"content\":[{\"type\":\"text\",\"text\":\"The current weather in Florence, Italy is 40°C (104°F). That's quite hot! It seems like a very warm day in Florence.\"}],\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"usage\":{\"input_tokens\":563,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":35,\"service_tier\":\"standard\"}}" - headers: - Content-Type: - - application/json - status: 200 OK - code: 200 - duration: 1.744995167s diff --git a/providertests/testdata/TestThinking/google-gemini-2.5-pro.yaml b/providertests/testdata/TestThinking/google-gemini-2.5-pro.yaml deleted file mode 100644 index b927c7edd35572aac4e9337693d5fd346ac52f73..0000000000000000000000000000000000000000 --- a/providertests/testdata/TestThinking/google-gemini-2.5-pro.yaml +++ /dev/null @@ -1,59 +0,0 @@ ---- -version: 2 -interactions: -- id: 0 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 550 - host: generativelanguage.googleapis.com - body: "{\"contents\":[{\"parts\":[{\"text\":\"What's the weather in Florence, Italy?\"}],\"role\":\"user\"}],\"generationConfig\":{\"thinkingConfig\":{\"includeThoughts\":true,\"thinkingBudget\":128}},\"systemInstruction\":{\"parts\":[{\"text\":\"You are a helpful assistant\"}],\"role\":\"user\"},\"toolConfig\":{\"functionCallingConfig\":{\"mode\":\"AUTO\"}},\"tools\":[{\"functionDeclarations\":[{\"description\":\"Get weather information for a location\",\"name\":\"weather\",\"parameters\":{\"properties\":{\"location\":{\"description\":\"the city\",\"type\":\"STRING\"}},\"required\":[\"location\"],\"type\":\"OBJECT\"}}]}]}\n" - headers: - Content-Type: - - application/json - User-Agent: - - google-genai-sdk/1.23.0 gl-go/go1.25.0 - url: https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-pro:generateContent - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - uncompressed: true - body: "{\n \"candidates\": [\n {\n \"content\": {\n \"parts\": [\n {\n \"text\": \"**Getting the Weather in Florence**\\n\\nOkay, so I see the user wants the weather for \\\"Florence, Italy.\\\" My initial thought is to grab the `weather.get_weather` tool. Perfect, it has a `location` parameter, which is exactly what I need. The user has thoughtfully provided \\\"Florence, Italy,\\\" so that's a straightforward input for the `location` parameter. This is a quick and efficient request to handle.\\n\",\n \"thought\": true\n },\n {\n \"functionCall\": {\n \"name\": \"weather\",\n \"args\": {\n \"location\": \"Florence, Italy\"\n }\n },\n \"thoughtSignature\": \"CokDAdHtim93vKtHJYI78AitJBYITb44JuVhBViGlnpnj3bSPvRBDI3GF8joEA68HpEu4qw281IW11+lQD+rSyPmhuYibh1cABkgMBMnlzHWn1FyJ6Vxv14WNDQKchoHMJpJ7yvFsga1jI2ALYJ+beV+6jrJa2/yA5VAaEKFTtxisBZzxM7U2HkHsZrAhWZtVK+GBx2bYuXRRF5THFT3ilIzPOCb02cG8Ve4abqO23J/augLfoftvDn+QK+PKyj13MdD3w/f89xjLr7MH4WXn6eEWU9TENJGiMgOoEXvNyjf/ZiAoShowtBYkhXxG0IFGai+O6x42LryDImGoXCbhdNQ7/zOVwbLBzWBnLEuVVNN7KuJXhl+FrsYJj+WDhxmTxjE1MKatCG9mNFAl3BxSEqDkNtBDng2SrFLTpt80+PFR9QB0jdBoml7e/k0kNCBH+5ObGFaKAxQaSF/QHarAF9K4YmR/7OpryU/y+etlYGHYc/tGvXBZRZ8NUxbfjEBt0N99VoGUx2WXKJo\"\n }\n ],\n \"role\": \"model\"\n },\n \"finishReason\": \"STOP\",\n \"index\": 0\n }\n ],\n \"usageMetadata\": {\n \"promptTokenCount\": 54,\n \"candidatesTokenCount\": 15,\n \"totalTokenCount\": 162,\n \"promptTokensDetails\": [\n {\n \"modality\": \"TEXT\",\n \"tokenCount\": 54\n }\n ],\n \"thoughtsTokenCount\": 93\n },\n \"modelVersion\": \"gemini-2.5-pro\",\n \"responseId\": \"bpHKaMGVJc6YkdUP3fStCA\"\n}\n" - headers: - Content-Type: - - application/json; charset=UTF-8 - status: 200 OK - code: 200 - duration: 4.193896625s -- id: 1 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 776 - host: generativelanguage.googleapis.com - body: "{\"contents\":[{\"parts\":[{\"text\":\"What's the weather in Florence, Italy?\"}],\"role\":\"user\"},{\"parts\":[{\"functionCall\":{\"args\":{\"location\":\"Florence, Italy\"},\"id\":\"weather\",\"name\":\"weather\"}}],\"role\":\"model\"},{\"parts\":[{\"functionResponse\":{\"id\":\"weather\",\"name\":\"weather\",\"response\":{\"result\":\"40 C\"}}}],\"role\":\"user\"}],\"generationConfig\":{\"thinkingConfig\":{\"includeThoughts\":true,\"thinkingBudget\":128}},\"systemInstruction\":{\"parts\":[{\"text\":\"You are a helpful assistant\"}],\"role\":\"user\"},\"toolConfig\":{\"functionCallingConfig\":{\"mode\":\"AUTO\"}},\"tools\":[{\"functionDeclarations\":[{\"description\":\"Get weather information for a location\",\"name\":\"weather\",\"parameters\":{\"properties\":{\"location\":{\"description\":\"the city\",\"type\":\"STRING\"}},\"required\":[\"location\"],\"type\":\"OBJECT\"}}]}]}\n" - headers: - Content-Type: - - application/json - User-Agent: - - google-genai-sdk/1.23.0 gl-go/go1.25.0 - url: https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-pro:generateContent - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - uncompressed: true - body: "{\n \"candidates\": [\n {\n \"content\": {\n \"parts\": [\n {\n \"text\": \"It's 40 C in Florence, Italy. \\n\"\n }\n ],\n \"role\": \"model\"\n },\n \"finishReason\": \"STOP\",\n \"index\": 0\n }\n ],\n \"usageMetadata\": {\n \"promptTokenCount\": 84,\n \"candidatesTokenCount\": 12,\n \"totalTokenCount\": 96,\n \"promptTokensDetails\": [\n {\n \"modality\": \"TEXT\",\n \"tokenCount\": 84\n }\n ]\n },\n \"modelVersion\": \"gemini-2.5-pro\",\n \"responseId\": \"cJHKaOO8KfrY7M8Pg8-psQo\"\n}\n" - headers: - Content-Type: - - application/json; charset=UTF-8 - status: 200 OK - code: 200 - duration: 2.006433542s diff --git a/providertests/testdata/TestThinking/openai-gpt-5.yaml b/providertests/testdata/TestThinking/openai-gpt-5.yaml deleted file mode 100644 index 0c2ed0cd472823363484cc0d3eeb66b2605f96f7..0000000000000000000000000000000000000000 --- a/providertests/testdata/TestThinking/openai-gpt-5.yaml +++ /dev/null @@ -1,63 +0,0 @@ ---- -version: 2 -interactions: -- id: 0 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 458 - host: "" - body: "{\"messages\":[{\"content\":\"You are a helpful assistant\",\"role\":\"system\"},{\"content\":\"What's the weather in Florence, Italy?\",\"role\":\"user\"}],\"model\":\"gpt-5\",\"reasoning_effort\":\"medium\",\"tool_choice\":\"auto\",\"tools\":[{\"function\":{\"name\":\"weather\",\"strict\":false,\"description\":\"Get weather information for a location\",\"parameters\":{\"properties\":{\"location\":{\"description\":\"the city\",\"type\":\"string\"}},\"required\":[\"location\"],\"type\":\"object\"}},\"type\":\"function\"}]}" - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - OpenAI/Go 2.3.0 - url: https://api.openai.com/v1/chat/completions - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - uncompressed: true - body: "{\n \"id\": \"chatcmpl-CGjxZHxMSr7N8cRMctGQZk1GoGaeb\",\n \"object\": \"chat.completion\",\n \"created\": 1758105953,\n \"model\": \"gpt-5-2025-08-07\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_altLYQTktFAyPzFgFXA8no5D\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"weather\",\n \"arguments\": \"{\\\"location\\\":\\\"Florence, Italy\\\"}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"finish_reason\": \"tool_calls\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 145,\n \"completion_tokens\": 153,\n \"total_tokens\": 298,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 128,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": null\n}\n" - headers: - Content-Type: - - application/json - status: 200 OK - code: 200 - duration: 3.138198958s -- id: 1 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 710 - host: "" - body: "{\"messages\":[{\"content\":\"You are a helpful assistant\",\"role\":\"system\"},{\"content\":\"What's the weather in Florence, Italy?\",\"role\":\"user\"},{\"tool_calls\":[{\"id\":\"call_altLYQTktFAyPzFgFXA8no5D\",\"function\":{\"arguments\":\"{\\\"location\\\":\\\"Florence, Italy\\\"}\",\"name\":\"weather\"},\"type\":\"function\"}],\"role\":\"assistant\"},{\"content\":\"40 C\",\"tool_call_id\":\"call_altLYQTktFAyPzFgFXA8no5D\",\"role\":\"tool\"}],\"model\":\"gpt-5\",\"reasoning_effort\":\"medium\",\"tool_choice\":\"auto\",\"tools\":[{\"function\":{\"name\":\"weather\",\"strict\":false,\"description\":\"Get weather information for a location\",\"parameters\":{\"properties\":{\"location\":{\"description\":\"the city\",\"type\":\"string\"}},\"required\":[\"location\"],\"type\":\"object\"}},\"type\":\"function\"}]}" - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - OpenAI/Go 2.3.0 - url: https://api.openai.com/v1/chat/completions - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - uncompressed: true - body: "{\n \"id\": \"chatcmpl-CGjxczIS9JrgSAuyFofVReqav7T93\",\n \"object\": \"chat.completion\",\n \"created\": 1758105956,\n \"model\": \"gpt-5-2025-08-07\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": \"It’s currently about 40°C (104°F) in Florence, Italy.\\n\\nWant the forecast, humidity, or wind details as well?\",\n \"refusal\": null,\n \"annotations\": []\n },\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 176,\n \"completion_tokens\": 229,\n \"total_tokens\": 405,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 192,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": null\n}\n" - headers: - Content-Type: - - application/json - status: 200 OK - code: 200 - duration: 6.448143542s diff --git a/providertests/testdata/TestThinking/openrouter-glm-4.5.yaml b/providertests/testdata/TestThinking/openrouter-glm-4.5.yaml deleted file mode 100644 index c26da2ef9c2224d062b371c41ddbb8de805570ef..0000000000000000000000000000000000000000 --- a/providertests/testdata/TestThinking/openrouter-glm-4.5.yaml +++ /dev/null @@ -1,63 +0,0 @@ ---- -version: 2 -interactions: -- id: 0 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 492 - host: "" - body: "{\"messages\":[{\"content\":\"You are a helpful assistant\",\"role\":\"system\"},{\"content\":\"What's the weather in Florence, Italy?\",\"role\":\"user\"}],\"model\":\"z-ai/glm-4.5\",\"tool_choice\":\"auto\",\"tools\":[{\"function\":{\"name\":\"weather\",\"strict\":false,\"description\":\"Get weather information for a location\",\"parameters\":{\"properties\":{\"location\":{\"description\":\"the city\",\"type\":\"string\"}},\"required\":[\"location\"],\"type\":\"object\"}},\"type\":\"function\"}],\"reasoning\":{\"effort\":\"high\"},\"usage\":{\"include\":true}}" - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - OpenAI/Go 2.3.0 - url: https://openrouter.ai/api/v1/chat/completions - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - uncompressed: true - body: "\n \n\n \n\n \n\n \n{\"id\":\"gen-1758536669-kDbFFtgS3dhGI6ZUw7ol\",\"provider\":\"GMICloud\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion\",\"created\":1758536669,\"choices\":[{\"logprobs\":null,\"finish_reason\":\"tool_calls\",\"native_finish_reason\":\"tool_calls\",\"index\":0,\"message\":{\"role\":\"assistant\",\"content\":\"\\nI'll get the weather information for Florence, Italy for you.\\n\",\"refusal\":null,\"reasoning\":\"\\nThe user is asking for weather information for Florence, Italy. I have access to a weather function that requires a \\\"location\\\" parameter. The user has provided \\\"Florence, Italy\\\" as the location, so I have all the required parameters to make the function call.\",\"tool_calls\":[{\"id\":\"call_c6a0fd78f7464050b77daa19\",\"index\":0,\"type\":\"function\",\"function\":{\"name\":\"weather\",\"arguments\":\"{\\\"location\\\": \\\"Florence, Italy\\\"}\"}}],\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\"\\nThe user is asking for weather information for Florence, Italy. I have access to a weather function that requires a \\\"location\\\" parameter. The user has provided \\\"Florence, Italy\\\" as the location, so I have all the required parameters to make the function call.\",\"format\":\"unknown\",\"index\":0}]}}],\"usage\":{\"prompt_tokens\":178,\"completion_tokens\":87,\"total_tokens\":265,\"cost\":0.0002982,\"is_byok\":false,\"prompt_tokens_details\":{\"cached_tokens\":0,\"audio_tokens\":0},\"cost_details\":{\"upstream_inference_cost\":null,\"upstream_inference_prompt_cost\":0.0001068,\"upstream_inference_completions_cost\":0.0001914},\"completion_tokens_details\":{\"reasoning_tokens\":66,\"image_tokens\":0}}}" - headers: - Content-Type: - - application/json - status: 200 OK - code: 200 - duration: 554.67ms -- id: 1 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 823 - host: "" - body: "{\"messages\":[{\"content\":\"You are a helpful assistant\",\"role\":\"system\"},{\"content\":\"What's the weather in Florence, Italy?\",\"role\":\"user\"},{\"content\":\"\\nI'll get the weather information for Florence, Italy for you.\\n\",\"tool_calls\":[{\"id\":\"call_c6a0fd78f7464050b77daa19\",\"function\":{\"arguments\":\"{\\\"location\\\": \\\"Florence, Italy\\\"}\",\"name\":\"weather\"},\"type\":\"function\"}],\"role\":\"assistant\"},{\"content\":\"40 C\",\"tool_call_id\":\"call_c6a0fd78f7464050b77daa19\",\"role\":\"tool\"}],\"model\":\"z-ai/glm-4.5\",\"tool_choice\":\"auto\",\"tools\":[{\"function\":{\"name\":\"weather\",\"strict\":false,\"description\":\"Get weather information for a location\",\"parameters\":{\"properties\":{\"location\":{\"description\":\"the city\",\"type\":\"string\"}},\"required\":[\"location\"],\"type\":\"object\"}},\"type\":\"function\"}],\"reasoning\":{\"effort\":\"high\"},\"usage\":{\"include\":true}}" - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - OpenAI/Go 2.3.0 - url: https://openrouter.ai/api/v1/chat/completions - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - uncompressed: true - body: "\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n{\"id\":\"gen-1758536671-EDr8hEIURKuI1cJJleMd\",\"provider\":\"Novita\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion\",\"created\":1758536671,\"choices\":[{\"logprobs\":null,\"finish_reason\":\"stop\",\"native_finish_reason\":\"stop\",\"index\":0,\"message\":{\"role\":\"assistant\",\"content\":\"\\n\\nThe current weather in Florence, Italy is 40°C (104°F). That's quite hot - be sure to stay hydrated and seek shade if you're visiting!\",\"refusal\":null,\"reasoning\":\"The weather function returned \\\"40 C\\\" for Florence, Italy. This indicates that the current temperature in Florence, Italy is 40 degrees Celsius. This is quite warm/hot weather. I should provide this information to the user in a helpful way.\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\"The weather function returned \\\"40 C\\\" for Florence, Italy. This indicates that the current temperature in Florence, Italy is 40 degrees Celsius. This is quite warm/hot weather. I should provide this information to the user in a helpful way.\",\"format\":\"unknown\",\"index\":0}]}}],\"system_fingerprint\":\"\",\"usage\":{\"prompt_tokens\":220,\"completion_tokens\":88,\"total_tokens\":308,\"cost\":0.0003256,\"is_byok\":false,\"prompt_tokens_details\":{\"cached_tokens\":43,\"audio_tokens\":0},\"cost_details\":{\"upstream_inference_cost\":null,\"upstream_inference_prompt_cost\":0.000132,\"upstream_inference_completions_cost\":0.0001936},\"completion_tokens_details\":{\"reasoning_tokens\":60,\"image_tokens\":0}}}" - headers: - Content-Type: - - application/json - status: 200 OK - code: 200 - duration: 1.785684708s diff --git a/providertests/testdata/TestThinkingStreaming/anthropic-claude-sonnet.yaml b/providertests/testdata/TestThinkingStreaming/anthropic-claude-sonnet.yaml deleted file mode 100644 index eb888a85b327c81ab5c95a798ecf61916605fcee..0000000000000000000000000000000000000000 --- a/providertests/testdata/TestThinkingStreaming/anthropic-claude-sonnet.yaml +++ /dev/null @@ -1,61 +0,0 @@ ---- -version: 2 -interactions: -- id: 0 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 564 - host: "" - body: "{\"max_tokens\":14096,\"messages\":[{\"content\":[{\"text\":\"What's the weather in Florence, Italy?\",\"type\":\"text\"}],\"role\":\"user\"}],\"model\":\"claude-sonnet-4-20250514\",\"system\":[{\"text\":\"You are a helpful assistant\",\"type\":\"text\"}],\"thinking\":{\"budget_tokens\":10000,\"type\":\"enabled\"},\"tool_choice\":{\"disable_parallel_tool_use\":false,\"type\":\"auto\"},\"tools\":[{\"input_schema\":{\"properties\":{\"location\":{\"description\":\"the city\",\"type\":\"string\"}},\"required\":[\"location\"],\"type\":\"object\"},\"name\":\"weather\",\"description\":\"Get weather information for a location\"}],\"stream\":true}" - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - Anthropic/Go 1.10.0 - url: https://api.anthropic.com/v1/messages - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - body: "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"msg_01VPcbUdEoEcxp65A65U43Cq\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"claude-sonnet-4-20250514\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":423,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":6,\"service_tier\":\"standard\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"thinking\",\"thinking\":\"\",\"signature\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"thinking_delta\",\"thinking\":\"The user is asking for\"} }\n\nevent: ping\ndata: {\"type\": \"ping\"}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"thinking_delta\",\"thinking\":\" weather information for Florence, Italy. I have\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"thinking_delta\",\"thinking\":\" access to a weather function that takes a location parameter. The\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"thinking_delta\",\"thinking\":\" location is clearly specified as \\\"Florence, Italy\\\".\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"thinking_delta\",\"thinking\":\" I have all the required parameters to make this function call.\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"signature_delta\",\"signature\":\"EqUDCkYIBxgCKkA1dDHptJ2iKtWZ9sMIIJPkgaj5W1miVnddSy3skrvAjGIHqew6UE71EDjqHCF5WYgEVd4SvysajvVTcguSMxHMEgzskB/aBlt0gS1BtUkaDPJSL8B++51vZ5DHlSIw+iMxyK5JptEx7nmgVEe8qK1bXt78PF7K83woxhkziWjrJcj/kndIznLO+qELQpNNKowCh+qjLD0jAIucketOZRE4uiSegDiqlzkenv9exVlEeoFvjiN1zVdgVKpWeylvA3BZYIviwFqgUVGAXjSsWcG+RNvB6SQmNk0PA5R9NmCvckI+Q/6VA9hp2hrjIskceJIsSg3mAtRQ36Rml4ie5ttHDD8f8XevtDu0NS9ymBRf5NPfZHtBPl9AQ32v15XgGS2oYzjn+vd/S/F/hkYd2e9XRnc3hdDa/AmoWbVjS6xU46gT0haidg2LkL79QeX8/2s5FfhIMOizH0XOzlwEHgvBRVBTERGEiSlpUXziHnaUVWbPtTDe42SvwuO/b2npygBoxXkHJyRS0Dz9FCZVs5XM2CoKRN0giFX8szV0rhgB\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":1,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_01VSoSma6BM9Dhq3RxyiRmAr\",\"name\":\"weather\",\"input\":{}} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":1,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":1,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"loc\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":1,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"ation\\\": \\\"Flo\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":1,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"rence, It\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":1,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"aly\\\"}\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":1 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":423,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":110} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n" - headers: - Content-Type: - - text/event-stream; charset=utf-8 - status: 200 OK - code: 200 - duration: 1.289802542s -- id: 1 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 1721 - host: "" - body: "{\"max_tokens\":14096,\"messages\":[{\"content\":[{\"text\":\"What's the weather in Florence, Italy?\",\"type\":\"text\"}],\"role\":\"user\"},{\"content\":[{\"signature\":\"EqUDCkYIBxgCKkA1dDHptJ2iKtWZ9sMIIJPkgaj5W1miVnddSy3skrvAjGIHqew6UE71EDjqHCF5WYgEVd4SvysajvVTcguSMxHMEgzskB/aBlt0gS1BtUkaDPJSL8B++51vZ5DHlSIw+iMxyK5JptEx7nmgVEe8qK1bXt78PF7K83woxhkziWjrJcj/kndIznLO+qELQpNNKowCh+qjLD0jAIucketOZRE4uiSegDiqlzkenv9exVlEeoFvjiN1zVdgVKpWeylvA3BZYIviwFqgUVGAXjSsWcG+RNvB6SQmNk0PA5R9NmCvckI+Q/6VA9hp2hrjIskceJIsSg3mAtRQ36Rml4ie5ttHDD8f8XevtDu0NS9ymBRf5NPfZHtBPl9AQ32v15XgGS2oYzjn+vd/S/F/hkYd2e9XRnc3hdDa/AmoWbVjS6xU46gT0haidg2LkL79QeX8/2s5FfhIMOizH0XOzlwEHgvBRVBTERGEiSlpUXziHnaUVWbPtTDe42SvwuO/b2npygBoxXkHJyRS0Dz9FCZVs5XM2CoKRN0giFX8szV0rhgB\",\"thinking\":\"The user is asking for weather information for Florence, Italy. I have access to a weather function that takes a location parameter. The location is clearly specified as \\\"Florence, Italy\\\". I have all the required parameters to make this function call.\",\"type\":\"thinking\"},{\"id\":\"toolu_01VSoSma6BM9Dhq3RxyiRmAr\",\"input\":{\"location\":\"Florence, Italy\"},\"name\":\"weather\",\"type\":\"tool_use\"}],\"role\":\"assistant\"},{\"content\":[{\"tool_use_id\":\"toolu_01VSoSma6BM9Dhq3RxyiRmAr\",\"content\":[{\"text\":\"40 C\",\"type\":\"text\"}],\"type\":\"tool_result\"}],\"role\":\"user\"}],\"model\":\"claude-sonnet-4-20250514\",\"system\":[{\"text\":\"You are a helpful assistant\",\"type\":\"text\"}],\"thinking\":{\"budget_tokens\":10000,\"type\":\"enabled\"},\"tool_choice\":{\"disable_parallel_tool_use\":false,\"type\":\"auto\"},\"tools\":[{\"input_schema\":{\"properties\":{\"location\":{\"description\":\"the city\",\"type\":\"string\"}},\"required\":[\"location\"],\"type\":\"object\"},\"name\":\"weather\",\"description\":\"Get weather information for a location\"}],\"stream\":true}" - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - Anthropic/Go 1.10.0 - url: https://api.anthropic.com/v1/messages - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - body: "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"msg_01GNkVaVsDPcTec33HABjn5e\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"claude-sonnet-4-20250514\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":548,\"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\"}} }\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"The\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" weather in Florence, Italy is currently 40°C (104°F),\"} }\n\nevent: ping\ndata: {\"type\": \"ping\"}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" which is quite hot! This is typical\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" summer weather for Florence during the warmer months. Make\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" sure to stay hydrated and seek shade if you're planning to be out\"} }\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"doors.\"} }\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0 }\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":548,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":56} }\n\nevent: message_stop\ndata: {\"type\":\"message_stop\" }\n\n" - headers: - Content-Type: - - text/event-stream; charset=utf-8 - status: 200 OK - code: 200 - duration: 1.676578167s diff --git a/providertests/testdata/TestThinkingStreaming/google-gemini-2.5-pro.yaml b/providertests/testdata/TestThinkingStreaming/google-gemini-2.5-pro.yaml deleted file mode 100644 index 2292fb205a4cd24ce50c6f4a64d866176831e891..0000000000000000000000000000000000000000 --- a/providertests/testdata/TestThinkingStreaming/google-gemini-2.5-pro.yaml +++ /dev/null @@ -1,63 +0,0 @@ ---- -version: 2 -interactions: -- id: 0 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 550 - host: generativelanguage.googleapis.com - body: "{\"contents\":[{\"parts\":[{\"text\":\"What's the weather in Florence, Italy?\"}],\"role\":\"user\"}],\"generationConfig\":{\"thinkingConfig\":{\"includeThoughts\":true,\"thinkingBudget\":128}},\"systemInstruction\":{\"parts\":[{\"text\":\"You are a helpful assistant\"}],\"role\":\"user\"},\"toolConfig\":{\"functionCallingConfig\":{\"mode\":\"AUTO\"}},\"tools\":[{\"functionDeclarations\":[{\"description\":\"Get weather information for a location\",\"name\":\"weather\",\"parameters\":{\"properties\":{\"location\":{\"description\":\"the city\",\"type\":\"STRING\"}},\"required\":[\"location\"],\"type\":\"OBJECT\"}}]}]}\n" - form: - alt: - - sse - headers: - Content-Type: - - application/json - User-Agent: - - google-genai-sdk/1.23.0 gl-go/go1.25.0 - url: https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-pro:streamGenerateContent?alt=sse - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - body: "data: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \"**Determining Weather Parameters**\\n\\nI've determined that the user's request, \\\"weather in Florence, Italy,\\\" perfectly aligns with the `weather.get_weather` function. It seems the `location` parameter is the key, and I'll confidently set it to \\\"Florence, Italy\\\".\\n\\n\\n\",\"thought\": true}],\"role\": \"model\"},\"index\": 0}],\"usageMetadata\": {\"promptTokenCount\": 54,\"totalTokenCount\": 121,\"promptTokensDetails\": [{\"modality\": \"TEXT\",\"tokenCount\": 54}],\"thoughtsTokenCount\": 67},\"modelVersion\": \"gemini-2.5-pro\",\"responseId\": \"zZHKaL2DMrPTvdIP4aHWyAs\"}\r\n\r\ndata: {\"candidates\": [{\"content\": {\"parts\": [{\"functionCall\": {\"name\": \"weather\",\"args\": {\"location\": \"Florence, Italy\"}},\"thoughtSignature\": \"CiIB0e2Kb+4o560+ejjFBllU8TlXrgq4/b/tb77clkkTfKwtCmcB0e2Kb1IrE0Kd0PSfakpKlsp4JG0j3GDD1xu8po3uW1bBSFXZqOXycsUfeT7p/narEgT6HIrPBNkwA1qVwPeAj4D/jUbhIY2Oj2lS8ysNnQeqytNstgmTw32h9vbrhhvOcaH6IH1dCocBAdHtim8NodjIJ2/KTN7Ujms6FtiMUYBQHquMPWyGvJlCrwy2HjucHBKXc4u9og3+2Sd1BKC06BSuzCMiAIF5WqLBhnpTQSBqAoJQmpa856a1FUdmusVWLunaMM1HOuLlZCGNp0KYekg5i6swmIVyAzYOn/4HrEant/3HN8U0q7cPpyfFulYZCnAB0e2Kbxs+yhyWd5uvIZBXkefbF2xrggIwwWmG5FoCMXkhf9fTrrT24QGyHtBDZtjO/+VFvchpcv3XJC11Mfx+T9NpkWFKEQ78DFVVejHgyGEDGkE41mS+da0ejxpAXnHWYsh8Nbz5w9fkGJESlaqK\"}],\"role\": \"model\"},\"finishReason\": \"STOP\",\"index\": 0}],\"usageMetadata\": {\"promptTokenCount\": 54,\"candidatesTokenCount\": 14,\"totalTokenCount\": 135,\"promptTokensDetails\": [{\"modality\": \"TEXT\",\"tokenCount\": 54}],\"thoughtsTokenCount\": 67},\"modelVersion\": \"gemini-2.5-pro\",\"responseId\": \"zZHKaL2DMrPTvdIP4aHWyAs\"}\r\n\r\n" - headers: - Content-Type: - - text/event-stream - status: 200 OK - code: 200 - duration: 3.416265375s -- id: 1 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 776 - host: generativelanguage.googleapis.com - body: "{\"contents\":[{\"parts\":[{\"text\":\"What's the weather in Florence, Italy?\"}],\"role\":\"user\"},{\"parts\":[{\"functionCall\":{\"args\":{\"location\":\"Florence, Italy\"},\"id\":\"weather\",\"name\":\"weather\"}}],\"role\":\"model\"},{\"parts\":[{\"functionResponse\":{\"id\":\"weather\",\"name\":\"weather\",\"response\":{\"result\":\"40 C\"}}}],\"role\":\"user\"}],\"generationConfig\":{\"thinkingConfig\":{\"includeThoughts\":true,\"thinkingBudget\":128}},\"systemInstruction\":{\"parts\":[{\"text\":\"You are a helpful assistant\"}],\"role\":\"user\"},\"toolConfig\":{\"functionCallingConfig\":{\"mode\":\"AUTO\"}},\"tools\":[{\"functionDeclarations\":[{\"description\":\"Get weather information for a location\",\"name\":\"weather\",\"parameters\":{\"properties\":{\"location\":{\"description\":\"the city\",\"type\":\"STRING\"}},\"required\":[\"location\"],\"type\":\"OBJECT\"}}]}]}\n" - form: - alt: - - sse - headers: - Content-Type: - - application/json - User-Agent: - - google-genai-sdk/1.23.0 gl-go/go1.25.0 - url: https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-pro:streamGenerateContent?alt=sse - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - body: "data: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \"The\"}],\"role\": \"model\"},\"index\": 0}],\"usageMetadata\": {\"promptTokenCount\": 84,\"candidatesTokenCount\": 1,\"totalTokenCount\": 85,\"promptTokensDetails\": [{\"modality\": \"TEXT\",\"tokenCount\": 84}]},\"modelVersion\": \"gemini-2.5-pro\",\"responseId\": \"0pHKaOvQBIXrvdIP44SHgAQ\"}\r\n\r\ndata: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \" weather in Florence, Italy is 40 degrees Celsius. \\n\"}],\"role\": \"model\"},\"finishReason\": \"STOP\",\"index\": 0}],\"usageMetadata\": {\"promptTokenCount\": 84,\"candidatesTokenCount\": 13,\"totalTokenCount\": 97,\"promptTokensDetails\": [{\"modality\": \"TEXT\",\"tokenCount\": 84}]},\"modelVersion\": \"gemini-2.5-pro\",\"responseId\": \"0pHKaOvQBIXrvdIP44SHgAQ\"}\r\n\r\n" - headers: - Content-Type: - - text/event-stream - status: 200 OK - code: 200 - duration: 2.557538458s diff --git a/providertests/testdata/TestThinkingStreaming/openai-gpt-5.yaml b/providertests/testdata/TestThinkingStreaming/openai-gpt-5.yaml deleted file mode 100644 index 335246cbc6102a679a0f902f5823cf0440bb0675..0000000000000000000000000000000000000000 --- a/providertests/testdata/TestThinkingStreaming/openai-gpt-5.yaml +++ /dev/null @@ -1,61 +0,0 @@ ---- -version: 2 -interactions: -- id: 0 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 512 - host: "" - body: "{\"messages\":[{\"content\":\"You are a helpful assistant\",\"role\":\"system\"},{\"content\":\"What's the weather in Florence, Italy?\",\"role\":\"user\"}],\"model\":\"gpt-5\",\"reasoning_effort\":\"medium\",\"stream_options\":{\"include_usage\":true},\"tool_choice\":\"auto\",\"tools\":[{\"function\":{\"name\":\"weather\",\"strict\":false,\"description\":\"Get weather information for a location\",\"parameters\":{\"properties\":{\"location\":{\"description\":\"the city\",\"type\":\"string\"}},\"required\":[\"location\"],\"type\":\"object\"}},\"type\":\"function\"}],\"stream\":true}" - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - OpenAI/Go 2.3.0 - url: https://api.openai.com/v1/chat/completions - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - body: "data: {\"id\":\"chatcmpl-CGjzBr5epgv1mOg6v3d0aHGfMitxL\",\"object\":\"chat.completion.chunk\",\"created\":1758106053,\"model\":\"gpt-5-2025-08-07\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_S4PPNE1CBSTQiyVXNMhypGp9\",\"type\":\"function\",\"function\":{\"name\":\"weather\",\"arguments\":\"\"}}],\"refusal\":null},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"0xwspG0FC\"}\n\ndata: {\"id\":\"chatcmpl-CGjzBr5epgv1mOg6v3d0aHGfMitxL\",\"object\":\"chat.completion.chunk\",\"created\":1758106053,\"model\":\"gpt-5-2025-08-07\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"V1qmL7MMFxIDEJ3\"}\n\ndata: {\"id\":\"chatcmpl-CGjzBr5epgv1mOg6v3d0aHGfMitxL\",\"object\":\"chat.completion.chunk\",\"created\":1758106053,\"model\":\"gpt-5-2025-08-07\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"location\"}}]},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"AM6r08CpIx\"}\n\ndata: {\"id\":\"chatcmpl-CGjzBr5epgv1mOg6v3d0aHGfMitxL\",\"object\":\"chat.completion.chunk\",\"created\":1758106053,\"model\":\"gpt-5-2025-08-07\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"LNb7muLzepVLd\"}\n\ndata: {\"id\":\"chatcmpl-CGjzBr5epgv1mOg6v3d0aHGfMitxL\",\"object\":\"chat.completion.chunk\",\"created\":1758106053,\"model\":\"gpt-5-2025-08-07\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Flor\"}}]},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"un0Jtn9FQ9Dh7e\"}\n\ndata: {\"id\":\"chatcmpl-CGjzBr5epgv1mOg6v3d0aHGfMitxL\",\"object\":\"chat.completion.chunk\",\"created\":1758106053,\"model\":\"gpt-5-2025-08-07\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"ence\"}}]},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"PnIt3YJQ7Odcnm\"}\n\ndata: {\"id\":\"chatcmpl-CGjzBr5epgv1mOg6v3d0aHGfMitxL\",\"object\":\"chat.completion.chunk\",\"created\":1758106053,\"model\":\"gpt-5-2025-08-07\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\",\"}}]},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"J\"}\n\ndata: {\"id\":\"chatcmpl-CGjzBr5epgv1mOg6v3d0aHGfMitxL\",\"object\":\"chat.completion.chunk\",\"created\":1758106053,\"model\":\"gpt-5-2025-08-07\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\" Italy\"}}]},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"rNjAaLKtPTCR\"}\n\ndata: {\"id\":\"chatcmpl-CGjzBr5epgv1mOg6v3d0aHGfMitxL\",\"object\":\"chat.completion.chunk\",\"created\":1758106053,\"model\":\"gpt-5-2025-08-07\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"}\"}}]},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"ogKZ9Um1xvfM6Sm\"}\n\ndata: {\"id\":\"chatcmpl-CGjzBr5epgv1mOg6v3d0aHGfMitxL\",\"object\":\"chat.completion.chunk\",\"created\":1758106053,\"model\":\"gpt-5-2025-08-07\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"tool_calls\"}],\"usage\":null,\"obfuscation\":\"\"}\n\ndata: {\"id\":\"chatcmpl-CGjzBr5epgv1mOg6v3d0aHGfMitxL\",\"object\":\"chat.completion.chunk\",\"created\":1758106053,\"model\":\"gpt-5-2025-08-07\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[],\"usage\":{\"prompt_tokens\":145,\"completion_tokens\":153,\"total_tokens\":298,\"prompt_tokens_details\":{\"cached_tokens\":0,\"audio_tokens\":0},\"completion_tokens_details\":{\"reasoning_tokens\":128,\"audio_tokens\":0,\"accepted_prediction_tokens\":0,\"rejected_prediction_tokens\":0}},\"obfuscation\":\"tstpIe\"}\n\ndata: [DONE]\n\n" - headers: - Content-Type: - - text/event-stream; charset=utf-8 - status: 200 OK - code: 200 - duration: 2.807384709s -- id: 1 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 764 - host: "" - body: "{\"messages\":[{\"content\":\"You are a helpful assistant\",\"role\":\"system\"},{\"content\":\"What's the weather in Florence, Italy?\",\"role\":\"user\"},{\"tool_calls\":[{\"id\":\"call_S4PPNE1CBSTQiyVXNMhypGp9\",\"function\":{\"arguments\":\"{\\\"location\\\":\\\"Florence, Italy\\\"}\",\"name\":\"weather\"},\"type\":\"function\"}],\"role\":\"assistant\"},{\"content\":\"40 C\",\"tool_call_id\":\"call_S4PPNE1CBSTQiyVXNMhypGp9\",\"role\":\"tool\"}],\"model\":\"gpt-5\",\"reasoning_effort\":\"medium\",\"stream_options\":{\"include_usage\":true},\"tool_choice\":\"auto\",\"tools\":[{\"function\":{\"name\":\"weather\",\"strict\":false,\"description\":\"Get weather information for a location\",\"parameters\":{\"properties\":{\"location\":{\"description\":\"the city\",\"type\":\"string\"}},\"required\":[\"location\"],\"type\":\"object\"}},\"type\":\"function\"}],\"stream\":true}" - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - OpenAI/Go 2.3.0 - url: https://api.openai.com/v1/chat/completions - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - body: "data: {\"id\":\"chatcmpl-CGjzDAZcL5W9B3yoNqJ1XcCg4v4WY\",\"object\":\"chat.completion.chunk\",\"created\":1758106055,\"model\":\"gpt-5-2025-08-07\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"refusal\":null},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"3dXcrYmrOy\"}\n\ndata: {\"id\":\"chatcmpl-CGjzDAZcL5W9B3yoNqJ1XcCg4v4WY\",\"object\":\"chat.completion.chunk\",\"created\":1758106055,\"model\":\"gpt-5-2025-08-07\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\"It\"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"PqgQgdemta\"}\n\ndata: {\"id\":\"chatcmpl-CGjzDAZcL5W9B3yoNqJ1XcCg4v4WY\",\"object\":\"chat.completion.chunk\",\"created\":1758106055,\"model\":\"gpt-5-2025-08-07\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\"’s\"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"kCefUAWvH9\"}\n\ndata: {\"id\":\"chatcmpl-CGjzDAZcL5W9B3yoNqJ1XcCg4v4WY\",\"object\":\"chat.completion.chunk\",\"created\":1758106055,\"model\":\"gpt-5-2025-08-07\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\" currently\"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"R6\"}\n\ndata: {\"id\":\"chatcmpl-CGjzDAZcL5W9B3yoNqJ1XcCg4v4WY\",\"object\":\"chat.completion.chunk\",\"created\":1758106055,\"model\":\"gpt-5-2025-08-07\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\" about\"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"JzHfhJ\"}\n\ndata: {\"id\":\"chatcmpl-CGjzDAZcL5W9B3yoNqJ1XcCg4v4WY\",\"object\":\"chat.completion.chunk\",\"created\":1758106055,\"model\":\"gpt-5-2025-08-07\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\" \"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"UnOIco1wqlK\"}\n\ndata: {\"id\":\"chatcmpl-CGjzDAZcL5W9B3yoNqJ1XcCg4v4WY\",\"object\":\"chat.completion.chunk\",\"created\":1758106055,\"model\":\"gpt-5-2025-08-07\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\"40\"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"gxVfChj5p1\"}\n\ndata: {\"id\":\"chatcmpl-CGjzDAZcL5W9B3yoNqJ1XcCg4v4WY\",\"object\":\"chat.completion.chunk\",\"created\":1758106055,\"model\":\"gpt-5-2025-08-07\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\"°C\"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"1Yfx063pRL\"}\n\ndata: {\"id\":\"chatcmpl-CGjzDAZcL5W9B3yoNqJ1XcCg4v4WY\",\"object\":\"chat.completion.chunk\",\"created\":1758106055,\"model\":\"gpt-5-2025-08-07\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\" in\"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"atYPSethq\"}\n\ndata: {\"id\":\"chatcmpl-CGjzDAZcL5W9B3yoNqJ1XcCg4v4WY\",\"object\":\"chat.completion.chunk\",\"created\":1758106055,\"model\":\"gpt-5-2025-08-07\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\" Florence\"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"Hm3\"}\n\ndata: {\"id\":\"chatcmpl-CGjzDAZcL5W9B3yoNqJ1XcCg4v4WY\",\"object\":\"chat.completion.chunk\",\"created\":1758106055,\"model\":\"gpt-5-2025-08-07\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\",\"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"ZoMzHd1dUin\"}\n\ndata: {\"id\":\"chatcmpl-CGjzDAZcL5W9B3yoNqJ1XcCg4v4WY\",\"object\":\"chat.completion.chunk\",\"created\":1758106055,\"model\":\"gpt-5-2025-08-07\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\" Italy\"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"eBSjfa\"}\n\ndata: {\"id\":\"chatcmpl-CGjzDAZcL5W9B3yoNqJ1XcCg4v4WY\",\"object\":\"chat.completion.chunk\",\"created\":1758106055,\"model\":\"gpt-5-2025-08-07\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\".\"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"UuHUTv0keAz\"}\n\ndata: {\"id\":\"chatcmpl-CGjzDAZcL5W9B3yoNqJ1XcCg4v4WY\",\"object\":\"chat.completion.chunk\",\"created\":1758106055,\"model\":\"gpt-5-2025-08-07\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":null,\"obfuscation\":\"mHVZv6\"}\n\ndata: {\"id\":\"chatcmpl-CGjzDAZcL5W9B3yoNqJ1XcCg4v4WY\",\"object\":\"chat.completion.chunk\",\"created\":1758106055,\"model\":\"gpt-5-2025-08-07\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[],\"usage\":{\"prompt_tokens\":176,\"completion_tokens\":277,\"total_tokens\":453,\"prompt_tokens_details\":{\"cached_tokens\":0,\"audio_tokens\":0},\"completion_tokens_details\":{\"reasoning_tokens\":256,\"audio_tokens\":0,\"accepted_prediction_tokens\":0,\"rejected_prediction_tokens\":0}},\"obfuscation\":\"MMvL8v\"}\n\ndata: [DONE]\n\n" - headers: - Content-Type: - - text/event-stream; charset=utf-8 - status: 200 OK - code: 200 - duration: 4.36330425s diff --git a/providertests/testdata/TestThinkingStreaming/openrouter-glm-4.5.yaml b/providertests/testdata/TestThinkingStreaming/openrouter-glm-4.5.yaml deleted file mode 100644 index 2465d391b6822df94a56d4d9ebb3e3969ca70d4e..0000000000000000000000000000000000000000 --- a/providertests/testdata/TestThinkingStreaming/openrouter-glm-4.5.yaml +++ /dev/null @@ -1,61 +0,0 @@ ---- -version: 2 -interactions: -- id: 0 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 516 - host: "" - body: "{\"messages\":[{\"content\":\"You are a helpful assistant\",\"role\":\"system\"},{\"content\":\"What's the weather in Florence, Italy?\",\"role\":\"user\"}],\"model\":\"z-ai/glm-4.5\",\"stream_options\":{\"include_usage\":true},\"tool_choice\":\"auto\",\"tools\":[{\"function\":{\"name\":\"weather\",\"strict\":false,\"description\":\"Get weather information for a location\",\"parameters\":{\"properties\":{\"location\":{\"description\":\"the city\",\"type\":\"string\"}},\"required\":[\"location\"],\"type\":\"object\"}},\"type\":\"function\"}],\"usage\":{\"include\":true},\"stream\":true}" - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - OpenAI/Go 2.3.0 - 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-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":null,\"reasoning_details\":[]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\\n\",\"reasoning\":null,\"reasoning_details\":[]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\"The\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\"The\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" user\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" user\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" is\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" is\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" asking\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" asking\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" for\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" for\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" the\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" the\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" weather\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" weather\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" in\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" in\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" Florence\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" Florence\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\",\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\",\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" Italy\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" Italy\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\".\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\".\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" I\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" I\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" have\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" have\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" access\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" access\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" to\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" to\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" a\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" a\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" weather\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" weather\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" function\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" function\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" that\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" that\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" takes\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" takes\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" a\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" a\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" location\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" location\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" parameter\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" parameter\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\".\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\".\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" The\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" The\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" user\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" user\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" has\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" has\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" specified\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" specified\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" \\\"\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" \\\"\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\"Flo\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\"Flo\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\"rence\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\"rence\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\",\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\",\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" Italy\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" Italy\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\"\\\"\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\"\\\"\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" as\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" as\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" the\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" the\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" location\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" location\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\".\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\".\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" I\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" I\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" should\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" should\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" call\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" call\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" the\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" the\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" weather\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" weather\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" function\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" function\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" with\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" with\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" this\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" this\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" exact\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" exact\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" location\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" location\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\".\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\".\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\\n\",\"reasoning\":null,\"reasoning_details\":[]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":null,\"reasoning_details\":[]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":null,\"reasoning_details\":[]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":null,\"reasoning_details\":[]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":null,\"reasoning_details\":[]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":null,\"reasoning_details\":[]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":null,\"reasoning_details\":[]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":null,\"reasoning_details\":[]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":null,\"reasoning_details\":[]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":null,\"reasoning_details\":[]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":null,\"reasoning_details\":[]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":null,\"reasoning_details\":[]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":null,\"reasoning_details\":[]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":null,\"reasoning_details\":[]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":null,\"reasoning_details\":[]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"id\":\"chatcmpl-tool-61cc1c29b8e048c9b98c1defbb7117d2\",\"type\":\"function\",\"index\":0,\"function\":{\"name\":\"weather\",\"arguments\":\"{\\\"location\\\": \\\"Florence, Italy\\\"}\"}}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":null,\"reasoning_details\":[]},\"finish_reason\":\"tool_calls\",\"native_finish_reason\":\"tool_calls\",\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536678-FfvjBGpaoGzh1AiCxQuh\",\"provider\":\"WandB\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536678,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}],\"usage\":{\"prompt_tokens\":187,\"completion_tokens\":70,\"total_tokens\":257,\"cost\":0.00024285,\"is_byok\":false,\"prompt_tokens_details\":{\"cached_tokens\":32,\"audio_tokens\":0},\"cost_details\":{\"upstream_inference_cost\":null,\"upstream_inference_prompt_cost\":0.00010285,\"upstream_inference_completions_cost\":0.00014},\"completion_tokens_details\":{\"reasoning_tokens\":61,\"image_tokens\":0}}}\n\ndata: [DONE]\n\n" - headers: - Content-Type: - - text/event-stream - status: 200 OK - code: 200 - duration: 405.284125ms -- id: 1 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 820 - host: "" - body: "{\"messages\":[{\"content\":\"You are a helpful assistant\",\"role\":\"system\"},{\"content\":\"What's the weather in Florence, Italy?\",\"role\":\"user\"},{\"content\":\"\\n\\n\",\"tool_calls\":[{\"id\":\"chatcmpl-tool-61cc1c29b8e048c9b98c1defbb7117d2\",\"function\":{\"arguments\":\"{\\\"location\\\": \\\"Florence, Italy\\\"}\",\"name\":\"weather\"},\"type\":\"function\"}],\"role\":\"assistant\"},{\"content\":\"40 C\",\"tool_call_id\":\"chatcmpl-tool-61cc1c29b8e048c9b98c1defbb7117d2\",\"role\":\"tool\"}],\"model\":\"z-ai/glm-4.5\",\"stream_options\":{\"include_usage\":true},\"tool_choice\":\"auto\",\"tools\":[{\"function\":{\"name\":\"weather\",\"strict\":false,\"description\":\"Get weather information for a location\",\"parameters\":{\"properties\":{\"location\":{\"description\":\"the city\",\"type\":\"string\"}},\"required\":[\"location\"],\"type\":\"object\"}},\"type\":\"function\"}],\"usage\":{\"include\":true},\"stream\":true}" - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - OpenAI/Go 2.3.0 - 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-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\\n\",\"reasoning\":null,\"reasoning_details\":[]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\"The\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\"The\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" weather\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" weather\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" function\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" function\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" returned\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" returned\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" \\\"\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" \\\"\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\"40\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\"40\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" C\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" C\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\"\\\"\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\"\\\"\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" for\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" for\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" Florence\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" Florence\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\",\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\",\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" Italy\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" Italy\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\".\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\".\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" This\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" This\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" indicates\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" indicates\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" the\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" the\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" current\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" current\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" temperature\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" temperature\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" is\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" is\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" \",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" \",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\"40\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\"40\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" degrees\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" degrees\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" Celsius\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" Celsius\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\",\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\",\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" which\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" which\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" is\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" is\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" quite\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" quite\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" hot\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" hot\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" -\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" -\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" summer\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" summer\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" weather\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" weather\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" conditions\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" conditions\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\".\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\".\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" I\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" I\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" should\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" should\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" provide\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" provide\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" this\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" this\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" information\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" information\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" to\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" to\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" the\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" the\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" user\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" user\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" in\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" in\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" a\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" a\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" clear\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" clear\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" and\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" and\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" helpful\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" helpful\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\" way\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\" way\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":\".\",\"reasoning_details\":[{\"type\":\"reasoning.text\",\"text\":\".\",\"format\":\"unknown\",\"index\":0}]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\\n\",\"reasoning\":null,\"reasoning_details\":[]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"The\",\"reasoning\":null,\"reasoning_details\":[]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" current\",\"reasoning\":null,\"reasoning_details\":[]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" weather\",\"reasoning\":null,\"reasoning_details\":[]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" in\",\"reasoning\":null,\"reasoning_details\":[]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" Florence\",\"reasoning\":null,\"reasoning_details\":[]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\",\",\"reasoning\":null,\"reasoning_details\":[]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" Italy\",\"reasoning\":null,\"reasoning_details\":[]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" is\",\"reasoning\":null,\"reasoning_details\":[]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" \",\"reasoning\":null,\"reasoning_details\":[]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"40\",\"reasoning\":null,\"reasoning_details\":[]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"°C\",\"reasoning\":null,\"reasoning_details\":[]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\".\",\"reasoning\":null,\"reasoning_details\":[]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" That\",\"reasoning\":null,\"reasoning_details\":[]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"'s\",\"reasoning\":null,\"reasoning_details\":[]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" quite\",\"reasoning\":null,\"reasoning_details\":[]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" warm\",\"reasoning\":null,\"reasoning_details\":[]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" -\",\"reasoning\":null,\"reasoning_details\":[]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" typical\",\"reasoning\":null,\"reasoning_details\":[]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" summer\",\"reasoning\":null,\"reasoning_details\":[]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" weather\",\"reasoning\":null,\"reasoning_details\":[]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" for\",\"reasoning\":null,\"reasoning_details\":[]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\" Florence\",\"reasoning\":null,\"reasoning_details\":[]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"!\",\"reasoning\":null,\"reasoning_details\":[]},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"reasoning\":null,\"reasoning_details\":[]},\"finish_reason\":\"stop\",\"native_finish_reason\":\"stop\",\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-1758536680-9FbpzAyhRyIN0W0bUDnx\",\"provider\":\"Z.AI\",\"model\":\"z-ai/glm-4.5\",\"object\":\"chat.completion.chunk\",\"created\":1758536680,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}],\"usage\":{\"prompt_tokens\":207,\"completion_tokens\":76,\"total_tokens\":283,\"cost\":0.00027033,\"is_byok\":false,\"prompt_tokens_details\":{\"cached_tokens\":43,\"audio_tokens\":0},\"cost_details\":{\"upstream_inference_cost\":null,\"upstream_inference_prompt_cost\":0.00010313,\"upstream_inference_completions_cost\":0.0001672},\"completion_tokens_details\":{\"reasoning_tokens\":61,\"image_tokens\":0}}}\n\ndata: [DONE]\n\n" - headers: - Content-Type: - - text/event-stream - status: 200 OK - code: 200 - duration: 3.121796917s diff --git a/providertests/testdata/TestTool/anthropic-claude-sonnet.yaml b/providertests/testdata/TestTool/anthropic-claude-sonnet.yaml deleted file mode 100644 index 7babf85fe8b66b5da5d94881f083a8dd379e3069..0000000000000000000000000000000000000000 --- a/providertests/testdata/TestTool/anthropic-claude-sonnet.yaml +++ /dev/null @@ -1,63 +0,0 @@ ---- -version: 2 -interactions: -- id: 0 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 490 - host: "" - body: "{\"max_tokens\":4096,\"messages\":[{\"content\":[{\"text\":\"What's the weather in Florence?\",\"type\":\"text\"}],\"role\":\"user\"}],\"model\":\"claude-sonnet-4-20250514\",\"system\":[{\"text\":\"You are a helpful assistant\",\"type\":\"text\"}],\"tool_choice\":{\"disable_parallel_tool_use\":false,\"type\":\"auto\"},\"tools\":[{\"input_schema\":{\"properties\":{\"location\":{\"description\":\"the city\",\"type\":\"string\"}},\"required\":[\"location\"],\"type\":\"object\"},\"name\":\"weather\",\"description\":\"Get weather information for a location\"}]}" - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - Anthropic/Go 1.10.0 - url: https://api.anthropic.com/v1/messages - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - uncompressed: true - body: "{\"id\":\"msg_01EnEXYvvJsZqCkmy6JSJbmZ\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"claude-sonnet-4-20250514\",\"content\":[{\"type\":\"text\",\"text\":\"I'll get the weather information for Florence for you.\"},{\"type\":\"tool_use\",\"id\":\"toolu_01DuHpbePNYnbErjgBf5iHsF\",\"name\":\"weather\",\"input\":{\"location\":\"Florence\"}}],\"stop_reason\":\"tool_use\",\"stop_sequence\":null,\"usage\":{\"input_tokens\":392,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":63,\"service_tier\":\"standard\"}}" - headers: - Content-Type: - - application/json - status: 200 OK - code: 200 - duration: 2.213104625s -- id: 1 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 850 - host: "" - body: "{\"max_tokens\":4096,\"messages\":[{\"content\":[{\"text\":\"What's the weather in Florence?\",\"type\":\"text\"}],\"role\":\"user\"},{\"content\":[{\"text\":\"I'll get the weather information for Florence for you.\",\"type\":\"text\"},{\"id\":\"toolu_01DuHpbePNYnbErjgBf5iHsF\",\"input\":{\"location\":\"Florence\"},\"name\":\"weather\",\"type\":\"tool_use\"}],\"role\":\"assistant\"},{\"content\":[{\"tool_use_id\":\"toolu_01DuHpbePNYnbErjgBf5iHsF\",\"content\":[{\"text\":\"40 C\",\"type\":\"text\"}],\"type\":\"tool_result\"}],\"role\":\"user\"}],\"model\":\"claude-sonnet-4-20250514\",\"system\":[{\"text\":\"You are a helpful assistant\",\"type\":\"text\"}],\"tool_choice\":{\"disable_parallel_tool_use\":false,\"type\":\"auto\"},\"tools\":[{\"input_schema\":{\"properties\":{\"location\":{\"description\":\"the city\",\"type\":\"string\"}},\"required\":[\"location\"],\"type\":\"object\"},\"name\":\"weather\",\"description\":\"Get weather information for a location\"}]}" - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - Anthropic/Go 1.10.0 - url: https://api.anthropic.com/v1/messages - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - uncompressed: true - body: "{\"id\":\"msg_01HyNDRGB4Vs42jfUPPcBaak\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"claude-sonnet-4-20250514\",\"content\":[{\"type\":\"text\",\"text\":\"The current temperature in Florence is 40°C (104°F). That's quite hot! Make sure to stay hydrated and seek shade or air conditioning if you're in the area.\"}],\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"usage\":{\"input_tokens\":470,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"cache_creation\":{\"ephemeral_5m_input_tokens\":0,\"ephemeral_1h_input_tokens\":0},\"output_tokens\":42,\"service_tier\":\"standard\"}}" - headers: - Content-Type: - - application/json - status: 200 OK - code: 200 - duration: 2.306400542s diff --git a/providertests/testdata/TestTool/google-gemini-2.5-flash.yaml b/providertests/testdata/TestTool/google-gemini-2.5-flash.yaml deleted file mode 100644 index ba50fa977c18d902abdea70e640d898f1fb22e3b..0000000000000000000000000000000000000000 --- a/providertests/testdata/TestTool/google-gemini-2.5-flash.yaml +++ /dev/null @@ -1,59 +0,0 @@ ---- -version: 2 -interactions: -- id: 0 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 481 - host: generativelanguage.googleapis.com - body: "{\"contents\":[{\"parts\":[{\"text\":\"What's the weather in Florence?\"}],\"role\":\"user\"}],\"generationConfig\":{},\"systemInstruction\":{\"parts\":[{\"text\":\"You are a helpful assistant\"}],\"role\":\"user\"},\"toolConfig\":{\"functionCallingConfig\":{\"mode\":\"AUTO\"}},\"tools\":[{\"functionDeclarations\":[{\"description\":\"Get weather information for a location\",\"name\":\"weather\",\"parameters\":{\"properties\":{\"location\":{\"description\":\"the city\",\"type\":\"STRING\"}},\"required\":[\"location\"],\"type\":\"OBJECT\"}}]}]}\n" - headers: - Content-Type: - - application/json - User-Agent: - - google-genai-sdk/1.23.0 gl-go/go1.24.5 - url: https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - uncompressed: true - body: "{\n \"candidates\": [\n {\n \"content\": {\n \"parts\": [\n {\n \"functionCall\": {\n \"name\": \"weather\",\n \"args\": {\n \"location\": \"Florence\"\n }\n },\n \"thoughtSignature\": \"CuoBAdHtim8Vp9NlNShmGo0RDhWEoSVPAdPgu2WPmt3EVCgITsoxv35IRyOao5Xl6E7MOMlrQQeQu/agp4wJ2bkeEHEZbPf7Iosdec5nLrwjXwf0WRN/LFik08aPKh3VeKN1F4wcqc6eSYEHQgQdLtJ6Ke0DrXCQWUuPgykk5QR4o12ZHZrtW3Suj0xizUOWf7/vMoqRoJEHVVHL7qznMEH1OMCbwRMuR6pwCkSgthshvEvx6kpk4Nt1Ymf9M8cCQuQeM4LvdPpT0UteZ6ZLqwbaYF4OPistAL19QI5lelFaMDoGZx5Ian/aiH9j\"\n }\n ],\n \"role\": \"model\"\n },\n \"finishReason\": \"STOP\",\n \"index\": 0\n }\n ],\n \"usageMetadata\": {\n \"promptTokenCount\": 52,\n \"candidatesTokenCount\": 13,\n \"totalTokenCount\": 111,\n \"promptTokensDetails\": [\n {\n \"modality\": \"TEXT\",\n \"tokenCount\": 52\n }\n ],\n \"thoughtsTokenCount\": 46\n },\n \"modelVersion\": \"gemini-2.5-flash\",\n \"responseId\": \"-ZPAaOeBIMmtz7IP6MLh4Aw\"\n}\n" - headers: - Content-Type: - - application/json; charset=UTF-8 - status: 200 OK - code: 200 - duration: 1.84992975s -- id: 1 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 700 - host: generativelanguage.googleapis.com - body: "{\"contents\":[{\"parts\":[{\"text\":\"What's the weather in Florence?\"}],\"role\":\"user\"},{\"parts\":[{\"functionCall\":{\"args\":{\"location\":\"Florence\"},\"id\":\"weather\",\"name\":\"weather\"}}],\"role\":\"model\"},{\"parts\":[{\"functionResponse\":{\"id\":\"weather\",\"name\":\"weather\",\"response\":{\"result\":\"40 C\"}}}],\"role\":\"user\"}],\"generationConfig\":{},\"systemInstruction\":{\"parts\":[{\"text\":\"You are a helpful assistant\"}],\"role\":\"user\"},\"toolConfig\":{\"functionCallingConfig\":{\"mode\":\"AUTO\"}},\"tools\":[{\"functionDeclarations\":[{\"description\":\"Get weather information for a location\",\"name\":\"weather\",\"parameters\":{\"properties\":{\"location\":{\"description\":\"the city\",\"type\":\"STRING\"}},\"required\":[\"location\"],\"type\":\"OBJECT\"}}]}]}\n" - headers: - Content-Type: - - application/json - User-Agent: - - google-genai-sdk/1.23.0 gl-go/go1.24.5 - url: https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - uncompressed: true - body: "{\n \"candidates\": [\n {\n \"content\": {\n \"parts\": [\n {\n \"text\": \"The weather in Florence is 40 C.\"\n }\n ],\n \"role\": \"model\"\n },\n \"finishReason\": \"STOP\",\n \"index\": 0\n }\n ],\n \"usageMetadata\": {\n \"promptTokenCount\": 80,\n \"candidatesTokenCount\": 10,\n \"totalTokenCount\": 90,\n \"promptTokensDetails\": [\n {\n \"modality\": \"TEXT\",\n \"tokenCount\": 80\n }\n ]\n },\n \"modelVersion\": \"gemini-2.5-flash\",\n \"responseId\": \"-pPAaOmKDa7Vz7IPi7fmgQ0\"\n}\n" - headers: - Content-Type: - - application/json; charset=UTF-8 - status: 200 OK - code: 200 - duration: 739.748334ms diff --git a/providertests/testdata/TestTool/google-gemini-2.5-pro.yaml b/providertests/testdata/TestTool/google-gemini-2.5-pro.yaml deleted file mode 100644 index 6671cdaa35c06eb6d5f3f424b9eefad59ea2a596..0000000000000000000000000000000000000000 --- a/providertests/testdata/TestTool/google-gemini-2.5-pro.yaml +++ /dev/null @@ -1,59 +0,0 @@ ---- -version: 2 -interactions: -- id: 0 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 481 - host: generativelanguage.googleapis.com - body: "{\"contents\":[{\"parts\":[{\"text\":\"What's the weather in Florence?\"}],\"role\":\"user\"}],\"generationConfig\":{},\"systemInstruction\":{\"parts\":[{\"text\":\"You are a helpful assistant\"}],\"role\":\"user\"},\"toolConfig\":{\"functionCallingConfig\":{\"mode\":\"AUTO\"}},\"tools\":[{\"functionDeclarations\":[{\"description\":\"Get weather information for a location\",\"name\":\"weather\",\"parameters\":{\"properties\":{\"location\":{\"description\":\"the city\",\"type\":\"STRING\"}},\"required\":[\"location\"],\"type\":\"OBJECT\"}}]}]}\n" - headers: - Content-Type: - - application/json - User-Agent: - - google-genai-sdk/1.23.0 gl-go/go1.24.5 - url: https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-pro:generateContent - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - uncompressed: true - body: "{\n \"candidates\": [\n {\n \"content\": {\n \"parts\": [\n {\n \"functionCall\": {\n \"name\": \"weather\",\n \"args\": {\n \"location\": \"Florence\"\n }\n },\n \"thoughtSignature\": \"CpkEAdHtim+EtnrVkWr/1MyuKGUtmnac2ihex9vY7ws2/Y2MPtaieXMdvYOE0YwAA3oV6VELDoHoz4++dx3qGkTwnxMachj5W+EuyQ0FaXtPP/OrMZDEmGVjhQZ0ADj9Q/8BJ/J6KonretAC3baPhvUCCmnQy4/5UPoVkcmQJkusUABUnCQoXQMv1nIEoQZDa3OWw3kZzHrIlk5/1/vaWqEVPtQ76EHOeQic3C3waGzDtmbqV4f9Ygy2ImLNfB8DlPq3JBfG/gkGaxA6RiOW3yRoRBdIxpsaPmzEyt1AZpNzJR0Jv6HuzjM1bv4tcjcTQwXZagjkFC/TkJ8wwDhhG0L78rCFguZZJhBVULYWXiBpIkWzhemreSHE5q8X5nzNxV2BIddYXEMWjy31IimBPYzmH32ithFjpDuW2T5I/4MYhCB8BlBw++ii5xbIL/WfFDzJwRXaWNx2/cmcT9Un+AruUfHFDUGCFeOCqq/1daPk1qQkyZY6d3T7dx9dt1vKICqXSETtoZMfuBdre931vOmklm7oRrWROKIz/tIBXU4NvWf9wT1dDWegusxLMl76UHSb2//ArXtvj1FbY2loas7VpxSW0zIeRmsGQhY5/hskKk917ppNKNvUSqX7OlHP9rW+/OIuxQpGj3t8PNtoqGQsO1FDrYhNq/M/56jVt6rkkYzRffno0tvDiJa2fySVFo7F0m2XNgGyavbQ\"\n }\n ],\n \"role\": \"model\"\n },\n \"finishReason\": \"STOP\",\n \"index\": 0\n }\n ],\n \"usageMetadata\": {\n \"promptTokenCount\": 52,\n \"candidatesTokenCount\": 13,\n \"totalTokenCount\": 186,\n \"promptTokensDetails\": [\n {\n \"modality\": \"TEXT\",\n \"tokenCount\": 52\n }\n ],\n \"thoughtsTokenCount\": 121\n },\n \"modelVersion\": \"gemini-2.5-pro\",\n \"responseId\": \"_JPAaPK5ML_Vz7IP-4KM-QQ\"\n}\n" - headers: - Content-Type: - - application/json; charset=UTF-8 - status: 200 OK - code: 200 - duration: 2.469309625s -- id: 1 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 700 - host: generativelanguage.googleapis.com - body: "{\"contents\":[{\"parts\":[{\"text\":\"What's the weather in Florence?\"}],\"role\":\"user\"},{\"parts\":[{\"functionCall\":{\"args\":{\"location\":\"Florence\"},\"id\":\"weather\",\"name\":\"weather\"}}],\"role\":\"model\"},{\"parts\":[{\"functionResponse\":{\"id\":\"weather\",\"name\":\"weather\",\"response\":{\"result\":\"40 C\"}}}],\"role\":\"user\"}],\"generationConfig\":{},\"systemInstruction\":{\"parts\":[{\"text\":\"You are a helpful assistant\"}],\"role\":\"user\"},\"toolConfig\":{\"functionCallingConfig\":{\"mode\":\"AUTO\"}},\"tools\":[{\"functionDeclarations\":[{\"description\":\"Get weather information for a location\",\"name\":\"weather\",\"parameters\":{\"properties\":{\"location\":{\"description\":\"the city\",\"type\":\"STRING\"}},\"required\":[\"location\"],\"type\":\"OBJECT\"}}]}]}\n" - headers: - Content-Type: - - application/json - User-Agent: - - google-genai-sdk/1.23.0 gl-go/go1.24.5 - url: https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-pro:generateContent - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - uncompressed: true - body: "{\n \"candidates\": [\n {\n \"content\": {\n \"parts\": [\n {\n \"text\": \"The weather in Florence is 40 C. \\n\"\n }\n ],\n \"role\": \"model\"\n },\n \"finishReason\": \"STOP\",\n \"index\": 0\n }\n ],\n \"usageMetadata\": {\n \"promptTokenCount\": 80,\n \"candidatesTokenCount\": 10,\n \"totalTokenCount\": 90,\n \"promptTokensDetails\": [\n {\n \"modality\": \"TEXT\",\n \"tokenCount\": 80\n }\n ]\n },\n \"modelVersion\": \"gemini-2.5-pro\",\n \"responseId\": \"_pPAaJuZF-itz7IP-rWq8Aw\"\n}\n" - headers: - Content-Type: - - application/json; charset=UTF-8 - status: 200 OK - code: 200 - duration: 1.571857334s diff --git a/providertests/testdata/TestTool/openai-gpt-4o-mini.yaml b/providertests/testdata/TestTool/openai-gpt-4o-mini.yaml deleted file mode 100644 index 0e0310b933061055088c14d5e6693f108bcaf1d6..0000000000000000000000000000000000000000 --- a/providertests/testdata/TestTool/openai-gpt-4o-mini.yaml +++ /dev/null @@ -1,63 +0,0 @@ ---- -version: 2 -interactions: -- id: 0 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 429 - host: "" - body: "{\"messages\":[{\"content\":\"You are a helpful assistant\",\"role\":\"system\"},{\"content\":\"What's the weather in Florence?\",\"role\":\"user\"}],\"model\":\"gpt-4o-mini\",\"tool_choice\":\"auto\",\"tools\":[{\"function\":{\"name\":\"weather\",\"strict\":false,\"description\":\"Get weather information for a location\",\"parameters\":{\"properties\":{\"location\":{\"description\":\"the city\",\"type\":\"string\"}},\"required\":[\"location\"],\"type\":\"object\"}},\"type\":\"function\"}]}" - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - OpenAI/Go 2.3.0 - url: https://api.openai.com/v1/chat/completions - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - uncompressed: true - body: "{\n \"id\": \"chatcmpl-CC86DuEym05aNFxLlzEELyWrWahas\",\n \"object\": \"chat.completion\",\n \"created\": 1757007105,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_P1Q6WfBaX0ZdGvLJC4TacMGY\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"weather\",\n \"arguments\": \"{\\\"location\\\":\\\"Florence\\\"}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"tool_calls\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 59,\n \"completion_tokens\": 14,\n \"total_tokens\": 73,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_8bda4d3a2c\"\n}\n" - headers: - Content-Type: - - application/json - status: 200 OK - code: 200 - duration: 1.524888209s -- id: 1 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 674 - host: "" - body: "{\"messages\":[{\"content\":\"You are a helpful assistant\",\"role\":\"system\"},{\"content\":\"What's the weather in Florence?\",\"role\":\"user\"},{\"tool_calls\":[{\"id\":\"call_P1Q6WfBaX0ZdGvLJC4TacMGY\",\"function\":{\"arguments\":\"{\\\"location\\\":\\\"Florence\\\"}\",\"name\":\"weather\"},\"type\":\"function\"}],\"role\":\"assistant\"},{\"content\":\"40 C\",\"tool_call_id\":\"call_P1Q6WfBaX0ZdGvLJC4TacMGY\",\"role\":\"tool\"}],\"model\":\"gpt-4o-mini\",\"tool_choice\":\"auto\",\"tools\":[{\"function\":{\"name\":\"weather\",\"strict\":false,\"description\":\"Get weather information for a location\",\"parameters\":{\"properties\":{\"location\":{\"description\":\"the city\",\"type\":\"string\"}},\"required\":[\"location\"],\"type\":\"object\"}},\"type\":\"function\"}]}" - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - OpenAI/Go 2.3.0 - url: https://api.openai.com/v1/chat/completions - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - uncompressed: true - body: "{\n \"id\": \"chatcmpl-CC86FlWw0t13MgwmVeuzu5irpjyS2\",\n \"object\": \"chat.completion\",\n \"created\": 1757007107,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": \"The weather in Florence is currently 40°C.\",\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 82,\n \"completion_tokens\": 11,\n \"total_tokens\": 93,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_8bda4d3a2c\"\n}\n" - headers: - Content-Type: - - application/json - status: 200 OK - code: 200 - duration: 1.421106917s diff --git a/providertests/testdata/TestTool/openai-gpt-4o.yaml b/providertests/testdata/TestTool/openai-gpt-4o.yaml deleted file mode 100644 index 3a2a9ad710e878cc484ee246cd521fb49616b516..0000000000000000000000000000000000000000 --- a/providertests/testdata/TestTool/openai-gpt-4o.yaml +++ /dev/null @@ -1,63 +0,0 @@ ---- -version: 2 -interactions: -- id: 0 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 424 - host: "" - body: "{\"messages\":[{\"content\":\"You are a helpful assistant\",\"role\":\"system\"},{\"content\":\"What's the weather in Florence?\",\"role\":\"user\"}],\"model\":\"gpt-4o\",\"tool_choice\":\"auto\",\"tools\":[{\"function\":{\"name\":\"weather\",\"strict\":false,\"description\":\"Get weather information for a location\",\"parameters\":{\"properties\":{\"location\":{\"description\":\"the city\",\"type\":\"string\"}},\"required\":[\"location\"],\"type\":\"object\"}},\"type\":\"function\"}]}" - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - OpenAI/Go 2.3.0 - url: https://api.openai.com/v1/chat/completions - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - uncompressed: true - body: "{\n \"id\": \"chatcmpl-CC5MhNb2zdVtCwHG9w33J2Ht2fRLk\",\n \"object\": \"chat.completion\",\n \"created\": 1756996595,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_VDWPAXXYtOgpIp7VtHaQDlFz\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"weather\",\n \"arguments\": \"{\\\"location\\\":\\\"Florence\\\"}\"\n }\n }\n ],\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"tool_calls\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 59,\n \"completion_tokens\": 14,\n \"total_tokens\": 73,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_f33640a400\"\n}\n" - headers: - Content-Type: - - application/json - status: 200 OK - code: 200 - duration: 2.399816792s -- id: 1 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 669 - host: "" - body: "{\"messages\":[{\"content\":\"You are a helpful assistant\",\"role\":\"system\"},{\"content\":\"What's the weather in Florence?\",\"role\":\"user\"},{\"tool_calls\":[{\"id\":\"call_VDWPAXXYtOgpIp7VtHaQDlFz\",\"function\":{\"arguments\":\"{\\\"location\\\":\\\"Florence\\\"}\",\"name\":\"weather\"},\"type\":\"function\"}],\"role\":\"assistant\"},{\"content\":\"40 C\",\"tool_call_id\":\"call_VDWPAXXYtOgpIp7VtHaQDlFz\",\"role\":\"tool\"}],\"model\":\"gpt-4o\",\"tool_choice\":\"auto\",\"tools\":[{\"function\":{\"name\":\"weather\",\"strict\":false,\"description\":\"Get weather information for a location\",\"parameters\":{\"properties\":{\"location\":{\"description\":\"the city\",\"type\":\"string\"}},\"required\":[\"location\"],\"type\":\"object\"}},\"type\":\"function\"}]}" - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - OpenAI/Go 2.3.0 - url: https://api.openai.com/v1/chat/completions - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - uncompressed: true - body: "{\n \"id\": \"chatcmpl-CC5MmCn0b4nV6e0m4ZGC7tX1t0JhL\",\n \"object\": \"chat.completion\",\n \"created\": 1756996600,\n \"model\": \"gpt-4o-2024-08-06\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": \"The current temperature in Florence is 40°C.\",\n \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 82,\n \"completion_tokens\": 11,\n \"total_tokens\": 93,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": \"fp_f33640a400\"\n}\n" - headers: - Content-Type: - - application/json - status: 200 OK - code: 200 - duration: 2.093890917s diff --git a/providertests/testdata/TestTool/openrouter-kimi-k2.yaml b/providertests/testdata/TestTool/openrouter-kimi-k2.yaml deleted file mode 100644 index 2f9465a7a352b1a26d1720b3a059b116b256180a..0000000000000000000000000000000000000000 --- a/providertests/testdata/TestTool/openrouter-kimi-k2.yaml +++ /dev/null @@ -1,63 +0,0 @@ ---- -version: 2 -interactions: - - id: 0 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 466 - host: "" - body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"What''s the weather in Florence?","role":"user"}],"model":"moonshotai/kimi-k2-0905","tool_choice":"auto","tools":[{"function":{"name":"weather","strict":false,"description":"Get weather information for a location","parameters":{"properties":{"location":{"description":"the city","type":"string"}},"required":["location"],"type":"object"}},"type":"function"}],"usage":{"include":true}}' - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - OpenAI/Go 2.3.0 - url: https://openrouter.ai/api/v1/chat/completions - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - uncompressed: true - body: "\n \n\n \n\n \n\n \n\n \n\n \n{\"id\":\"gen-1758536664-UaCYJMs4TUDzzENXVnwe\",\"provider\":\"Moonshot AI\",\"model\":\"moonshotai/kimi-k2-0905\",\"object\":\"chat.completion\",\"created\":1758536664,\"choices\":[{\"logprobs\":null,\"finish_reason\":\"tool_calls\",\"native_finish_reason\":\"tool_calls\",\"index\":0,\"message\":{\"role\":\"assistant\",\"content\":\"I'll check the weather in Florence for you.\",\"refusal\":null,\"reasoning\":null,\"tool_calls\":[{\"index\":0,\"id\":\"weather:0\",\"type\":\"function\",\"function\":{\"name\":\"weather\",\"arguments\":\"{\\\"location\\\": \\\"Florence\\\"}\"}}]}}],\"system_fingerprint\":\"fpv0_f0f625a1\",\"usage\":{\"prompt_tokens\":74,\"completion_tokens\":27,\"total_tokens\":101,\"cost\":0.0001119,\"is_byok\":false,\"prompt_tokens_details\":{\"cached_tokens\":0,\"audio_tokens\":0},\"cost_details\":{\"upstream_inference_cost\":null,\"upstream_inference_prompt_cost\":0.0000444,\"upstream_inference_completions_cost\":0.0000675},\"completion_tokens_details\":{\"reasoning_tokens\":0,\"image_tokens\":0}}}" - headers: - Content-Type: - - application/json - status: 200 OK - code: 200 - duration: 1.69516625s - - id: 1 - request: - proto: HTTP/1.1 - proto_major: 1 - proto_minor: 1 - content_length: 728 - host: "" - body: "{\"messages\":[{\"content\":\"You are a helpful assistant\",\"role\":\"system\"},{\"content\":\"What's the weather in Florence?\",\"role\":\"user\"},{\"content\":\"I'll check the weather in Florence for you.\",\"tool_calls\":[{\"id\":\"weather:0\",\"function\":{\"arguments\":\"{\\\"location\\\": \\\"Florence\\\"}\",\"name\":\"weather\"},\"type\":\"function\"}],\"role\":\"assistant\"},{\"content\":\"40 C\",\"tool_call_id\":\"weather:0\",\"role\":\"tool\"}],\"model\":\"moonshotai/kimi-k2-0905\",\"tool_choice\":\"auto\",\"tools\":[{\"function\":{\"name\":\"weather\",\"strict\":false,\"description\":\"Get weather information for a location\",\"parameters\":{\"properties\":{\"location\":{\"description\":\"the city\",\"type\":\"string\"}},\"required\":[\"location\"],\"type\":\"object\"}},\"type\":\"function\"}],\"usage\":{\"include\":true}}" - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - OpenAI/Go 2.3.0 - url: https://openrouter.ai/api/v1/chat/completions - method: POST - response: - proto: HTTP/2.0 - proto_major: 2 - proto_minor: 0 - content_length: -1 - uncompressed: true - body: '{"id":"gen-1758536667-pQdDoWxSJHoNqbKNl5gW","provider":"Novita","model":"moonshotai/kimi-k2-0905","object":"chat.completion","created":1758536667,"choices":[{"logprobs":null,"finish_reason":"stop","native_finish_reason":"stop","index":0,"message":{"role":"assistant","content":"The weather in Florence is currently 40°C (104°F). It`s quite hot there!","refusal":null,"reasoning":null}}],"system_fingerprint":"fpv0_f0f625a1","usage":{"prompt_tokens":120,"completion_tokens":19,"total_tokens":139,"cost":0.0001195,"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.0000475},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}' - headers: - Content-Type: - - application/json - status: 200 OK - code: 200 - duration: 1.608302625s