diff --git a/providers/anthropic/anthropic.go b/providers/anthropic/anthropic.go index e0158174c..24c5be0ee 100644 --- a/providers/anthropic/anthropic.go +++ b/providers/anthropic/anthropic.go @@ -976,15 +976,20 @@ func (a languageModel) toTools(tools []fantasy.Tool, toolChoice *fantasy.ToolCho if !ok { continue } - required := []string{} var properties any if props, ok := ft.InputSchema["properties"]; ok { properties = props } - if req, ok := ft.InputSchema["required"]; ok { - if reqArr, ok := req.([]string); ok { - required = reqArr + // ToolInputSchemaParam types only "properties" and "required". + // Forward every other keyword ($defs, additionalProperties, + // descriptions) so references in the schema keep resolving. + extraFields := make(map[string]any) + for key, value := range ft.InputSchema { + switch key { + case "type", "properties", "required": + continue } + extraFields[key] = value } cacheControl := GetCacheControl(ft.ProviderOptions) @@ -992,8 +997,9 @@ func (a languageModel) toTools(tools []fantasy.Tool, toolChoice *fantasy.ToolCho Name: ft.Name, Description: anthropic.String(ft.Description), InputSchema: anthropic.ToolInputSchemaParam{ - Properties: properties, - Required: required, + Properties: properties, + Required: anyToStringSlice(ft.InputSchema["required"]), + ExtraFields: extraFields, }, } if cacheControl != nil { diff --git a/providers/anthropic/anthropic_test.go b/providers/anthropic/anthropic_test.go index 7a6eab17b..9a2578bf1 100644 --- a/providers/anthropic/anthropic_test.go +++ b/providers/anthropic/anthropic_test.go @@ -3263,6 +3263,47 @@ func TestToTools_RawJSON(t *testing.T) { require.Equal(t, "computer", cuToolJSON["name"]) } +func TestToTools_PreservesFunctionInputSchema(t *testing.T) { + t.Parallel() + + lm := languageModel{options: options{}} + tools := []fantasy.Tool{ + fantasy.FunctionTool{ + Name: "schema_test", + InputSchema: map[string]any{ + "type": "object", + "description": "Tool input", + "$defs": map[string]any{ + "value": map[string]any{"type": "string"}, + }, + "properties": map[string]any{ + "x": map[string]any{"$ref": "#/$defs/value"}, + }, + "required": []any{"x"}, + "additionalProperties": false, + }, + }, + } + + rawTools, _, warnings, _ := lm.toTools(tools, nil, false) + require.Empty(t, warnings) + require.Len(t, rawTools, 1) + + var wireTool map[string]any + require.NoError(t, json.Unmarshal(rawTools[0], &wireTool)) + inputSchema, ok := wireTool["input_schema"].(map[string]any) + require.True(t, ok) + require.Equal(t, "Tool input", inputSchema["description"]) + require.Equal(t, false, inputSchema["additionalProperties"]) + require.Equal(t, []any{"x"}, inputSchema["required"]) + require.Equal(t, map[string]any{ + "value": map[string]any{"type": "string"}, + }, inputSchema["$defs"]) + require.Equal(t, map[string]any{ + "x": map[string]any{"$ref": "#/$defs/value"}, + }, inputSchema["properties"]) +} + func TestGenerate_BetaAPI(t *testing.T) { t.Parallel() diff --git a/providers/google/google.go b/providers/google/google.go index 6508af16c..71ada306f 100644 --- a/providers/google/google.go +++ b/providers/google/google.go @@ -1238,24 +1238,17 @@ func toGoogleTools(tools []fantasy.Tool, toolChoice *fantasy.ToolChoice) (google continue } - var required []string - var properties map[string]any - if props, ok := ft.InputSchema["properties"]; ok { - properties, _ = props.(map[string]any) - } - if req, ok := ft.InputSchema["required"]; ok { - if reqArr, ok := req.([]string); ok { - required = reqArr - } - } declaration := &genai.FunctionDeclaration{ Name: ft.Name, Description: ft.Description, - Parameters: &genai.Schema{ - Type: genai.TypeObject, - Properties: convertSchemaProperties(properties), - Required: required, - }, + } + // ParametersJsonSchema takes JSON Schema as is. The + // OpenAPI-style Parameters field cannot express keywords such + // as "$ref" and "$defs", so converting into it loses or + // corrupts tool arguments. A nil map inside the interface + // would serialize as null, so leave the field unset instead. + if ft.InputSchema != nil { + declaration.ParametersJsonSchema = ft.InputSchema } googleTools = append(googleTools, declaration) continue @@ -1302,80 +1295,6 @@ func toGoogleTools(tools []fantasy.Tool, toolChoice *fantasy.ToolChoice) (google return googleTools, googleToolChoice, warnings } -func convertSchemaProperties(parameters map[string]any) map[string]*genai.Schema { - properties := make(map[string]*genai.Schema) - - for name, param := range parameters { - properties[name] = convertToSchema(param) - } - - return properties -} - -func convertToSchema(param any) *genai.Schema { - schema := &genai.Schema{Type: genai.TypeString} - - paramMap, ok := param.(map[string]any) - if !ok { - return schema - } - - if desc, ok := paramMap["description"].(string); ok { - schema.Description = desc - } - - typeVal, hasType := paramMap["type"] - if !hasType { - return schema - } - - typeStr, ok := typeVal.(string) - if !ok { - return schema - } - - schema.Type = mapJSONTypeToGoogle(typeStr) - - switch typeStr { - case "array": - schema.Items = processArrayItems(paramMap) - case "object": - if props, ok := paramMap["properties"].(map[string]any); ok { - schema.Properties = convertSchemaProperties(props) - } - } - - return schema -} - -func processArrayItems(paramMap map[string]any) *genai.Schema { - items, ok := paramMap["items"].(map[string]any) - if !ok { - return nil - } - - return convertToSchema(items) -} - -func mapJSONTypeToGoogle(jsonType string) genai.Type { - switch jsonType { - case "string": - return genai.TypeString - case "number": - return genai.TypeNumber - case "integer": - return genai.TypeInteger - case "boolean": - return genai.TypeBoolean - case "array": - return genai.TypeArray - case "object": - return genai.TypeObject - default: - return genai.TypeString // Default to string for unknown types - } -} - func (g languageModel) mapResponse(response *genai.GenerateContentResponse, warnings []fantasy.CallWarning) (*fantasy.Response, error) { if len(response.Candidates) == 0 || response.Candidates[0].Content == nil { return nil, errors.New("no response from model") diff --git a/providers/google/google_test.go b/providers/google/google_test.go new file mode 100644 index 000000000..5fcae68ca --- /dev/null +++ b/providers/google/google_test.go @@ -0,0 +1,104 @@ +package google + +import ( + "encoding/json" + "io" + "net/http" + "net/http/httptest" + "testing" + + "charm.land/fantasy" + "github.com/stretchr/testify/require" +) + +func TestToolInputSchemaReachesRequest(t *testing.T) { + t.Parallel() + + // Each part of this schema is something the OpenAPI-style + // "parameters" field cannot carry: an untyped object root, local + // references with sibling keywords, a recursive definition, a + // numeric enum, a null alternative behind a reference, and + // additionalProperties. + const schemaJSON = `{ + "properties": { + "filter": {"$ref": "#/$defs/Filter", "required": ["term"]}, + "limit": {"type": "integer", "enum": [10, 20]}, + "cursor": {"anyOf": [{"type": "string"}, {"$ref": "#/$defs/Null"}]} + }, + "required": ["filter"], + "additionalProperties": false, + "$defs": { + "Filter": { + "type": "object", + "properties": { + "term": {"type": "string"}, + "and": {"type": "array", "items": {"$ref": "#/$defs/Filter"}} + } + }, + "Null": {"type": "null"} + } + }` + + for _, tc := range []struct { + name string + options []Option + }{ + {name: "gemini", options: []Option{WithGeminiAPIKey("test-key")}}, + {name: "vertex", options: []Option{WithVertex("test-project", "us-central1"), WithSkipAuth(true)}}, + } { + t.Run(tc.name, func(t *testing.T) { + t.Parallel() + + var inputSchema map[string]any + require.NoError(t, json.Unmarshal([]byte(schemaJSON), &inputSchema)) + + bodies := make(chan []byte, 1) + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + body, err := io.ReadAll(r.Body) + if err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + bodies <- body + w.Header().Set("Content-Type", "application/json") + _, _ = io.WriteString(w, `{"candidates":[{"content":{"role":"model","parts":[{"text":"ok"}]},"finishReason":"STOP"}],"usageMetadata":{"promptTokenCount":1,"candidatesTokenCount":1,"totalTokenCount":2}}`) + })) + defer server.Close() + + provider, err := New(append(tc.options, WithBaseURL(server.URL))...) + require.NoError(t, err) + model, err := provider.LanguageModel(t.Context(), "gemini-2.5-flash") + require.NoError(t, err) + + _, err = model.Generate(t.Context(), fantasy.Call{ + Prompt: fantasy.Prompt{{ + Role: fantasy.MessageRoleUser, + Content: []fantasy.MessagePart{fantasy.TextPart{Text: "search"}}, + }}, + Tools: []fantasy.Tool{ + fantasy.FunctionTool{Name: "search", InputSchema: inputSchema}, + fantasy.FunctionTool{Name: "ping"}, + }, + }) + require.NoError(t, err) + + var request struct { + Tools []struct { + FunctionDeclarations []map[string]json.RawMessage `json:"functionDeclarations"` + } `json:"tools"` + } + require.NoError(t, json.Unmarshal(<-bodies, &request)) + require.Len(t, request.Tools, 1) + declarations := request.Tools[0].FunctionDeclarations + require.Len(t, declarations, 2) + + require.NotContains(t, declarations[0], "parameters") + require.JSONEq(t, schemaJSON, string(declarations[0]["parametersJsonSchema"])) + + // A tool without a schema declares no parameters rather than + // a null schema. + require.NotContains(t, declarations[1], "parameters") + require.NotContains(t, declarations[1], "parametersJsonSchema") + }) + } +} diff --git a/providertests/testdata/TestGoogleCommon/gemini-2.5-flash/multi_tool.yaml b/providertests/testdata/TestGoogleCommon/gemini-2.5-flash/multi_tool.yaml index bbeac785c..0bf8ada41 100644 --- a/providertests/testdata/TestGoogleCommon/gemini-2.5-flash/multi_tool.yaml +++ b/providertests/testdata/TestGoogleCommon/gemini-2.5-flash/multi_tool.yaml @@ -6,10 +6,10 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 826 + content_length: 846 host: generativelanguage.googleapis.com body: | - {"contents":[{"parts":[{"text":"Add and multiply the number 2 and 3"}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"systemInstruction":{"parts":[{"text":"You are a helpful assistant. CRITICAL: Always use both add and multiply at the same time ALWAYS."}],"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"}}]}]} + {"contents":[{"parts":[{"text":"Add and multiply the number 2 and 3"}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"systemInstruction":{"parts":[{"text":"You are a helpful assistant. CRITICAL: Always use both add and multiply at the same time ALWAYS."}],"role":"user"},"toolConfig":{"functionCallingConfig":{"mode":"AUTO"}},"tools":[{"functionDeclarations":[{"description":"Add two numbers","name":"add","parametersJsonSchema":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}},{"description":"Multiply two numbers","name":"multiply","parametersJsonSchema":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}}]}]} headers: Content-Type: - application/json @@ -83,10 +83,10 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 1497 + content_length: 1517 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":"1","name":"add"},"thoughtSignature":"CuwBAb4+9vtZI+lrRvvljZUdJ6DU+6mx0MOBuaHeyYvynuM3jWA6+2QLszYeEbDE8DiwXn/ZAT193VbikJsMKQhtnfKfRBEBOX0+ubVHHOFBFJQtdbOgB/rUa60EsYG3tEz3IfShPYThhVkawFMK6pypIEeFkR6fz4ORTLkqD2LIDzASds2DgReWzjuQ5TxX2rVB/ZyGarvY5Wvg2TkeK2hAcVdJIjwLZFtxTKnd2DU6smy4Elld36CV8HsEd1P+qbChmOc7V473H9RyZbkojG0ItvQepZX7c0qcJRs2xGpz68rno2xpy+XlQOfnUXg="},{"functionCall":{"args":{"a":2,"b":3},"id":"2","name":"multiply"}}],"role":"model"},{"parts":[{"functionResponse":{"id":"1","name":"add","response":{"result":"5"}}},{"functionResponse":{"id":"2","name":"multiply","response":{"result":"6"}}}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"systemInstruction":{"parts":[{"text":"You are a helpful assistant. CRITICAL: Always use both add and multiply at the same time ALWAYS."}],"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"}}]}]} + {"contents":[{"parts":[{"text":"Add and multiply the number 2 and 3"}],"role":"user"},{"parts":[{"functionCall":{"args":{"a":2,"b":3},"id":"1","name":"add"},"thoughtSignature":"CuwBAb4+9vtZI+lrRvvljZUdJ6DU+6mx0MOBuaHeyYvynuM3jWA6+2QLszYeEbDE8DiwXn/ZAT193VbikJsMKQhtnfKfRBEBOX0+ubVHHOFBFJQtdbOgB/rUa60EsYG3tEz3IfShPYThhVkawFMK6pypIEeFkR6fz4ORTLkqD2LIDzASds2DgReWzjuQ5TxX2rVB/ZyGarvY5Wvg2TkeK2hAcVdJIjwLZFtxTKnd2DU6smy4Elld36CV8HsEd1P+qbChmOc7V473H9RyZbkojG0ItvQepZX7c0qcJRs2xGpz68rno2xpy+XlQOfnUXg="},{"functionCall":{"args":{"a":2,"b":3},"id":"2","name":"multiply"}}],"role":"model"},{"parts":[{"functionResponse":{"id":"1","name":"add","response":{"result":"5"}}},{"functionResponse":{"id":"2","name":"multiply","response":{"result":"6"}}}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"systemInstruction":{"parts":[{"text":"You are a helpful assistant. CRITICAL: Always use both add and multiply at the same time ALWAYS."}],"role":"user"},"toolConfig":{"functionCallingConfig":{"mode":"AUTO"}},"tools":[{"functionDeclarations":[{"description":"Add two numbers","name":"add","parametersJsonSchema":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}},{"description":"Multiply two numbers","name":"multiply","parametersJsonSchema":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}}]}]} headers: Content-Type: - application/json diff --git a/providertests/testdata/TestGoogleCommon/gemini-2.5-flash/multi_tool_streaming.yaml b/providertests/testdata/TestGoogleCommon/gemini-2.5-flash/multi_tool_streaming.yaml index 04c8ca666..624f2aaf9 100644 --- a/providertests/testdata/TestGoogleCommon/gemini-2.5-flash/multi_tool_streaming.yaml +++ b/providertests/testdata/TestGoogleCommon/gemini-2.5-flash/multi_tool_streaming.yaml @@ -6,10 +6,10 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 809 + content_length: 829 host: generativelanguage.googleapis.com body: | - {"contents":[{"parts":[{"text":"Add and multiply the number 2 and 3"}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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"}}]}]} + {"contents":[{"parts":[{"text":"Add and multiply the number 2 and 3"}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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","parametersJsonSchema":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}},{"description":"Multiply two numbers","name":"multiply","parametersJsonSchema":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}}]}]} form: alt: - sse @@ -38,10 +38,10 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 1464 + content_length: 1484 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":"1","name":"add"},"thoughtSignature":"CloBvj72+4/aTlyeodvVsF6WQseQLaqynO0Ocu6hCxSIV1rJCGFv67dtpjtFqWaborKte+82ZXWG2DaoPZaL+k7ONU3tUVwUXH0yI3ADtb46NJAqGWp2V/Ht3uMKhQEBvj72+53r7rtJS2JS+RSr/gNHTgRy4DDPTPtEEj+K6F4GFNMQEXVmXPYPa87j/74GGwi14Qwvde1kfemWz/+cRwpf2EDDKELVYuZ56LWb6pmPj4kyXPBERjn3dCiTrAhaysdd21dD0/t3xSXCKNFbPTDjK6IeGzqAGRFeL5D37oKPrh2N"},{"functionCall":{"args":{"a":2,"b":3},"id":"2","name":"multiply"}}],"role":"model"},{"parts":[{"functionResponse":{"id":"1","name":"add","response":{"result":"5"}}},{"functionResponse":{"id":"2","name":"multiply","response":{"result":"6"}}}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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"}}]}]} + {"contents":[{"parts":[{"text":"Add and multiply the number 2 and 3"}],"role":"user"},{"parts":[{"functionCall":{"args":{"a":2,"b":3},"id":"1","name":"add"},"thoughtSignature":"CloBvj72+4/aTlyeodvVsF6WQseQLaqynO0Ocu6hCxSIV1rJCGFv67dtpjtFqWaborKte+82ZXWG2DaoPZaL+k7ONU3tUVwUXH0yI3ADtb46NJAqGWp2V/Ht3uMKhQEBvj72+53r7rtJS2JS+RSr/gNHTgRy4DDPTPtEEj+K6F4GFNMQEXVmXPYPa87j/74GGwi14Qwvde1kfemWz/+cRwpf2EDDKELVYuZ56LWb6pmPj4kyXPBERjn3dCiTrAhaysdd21dD0/t3xSXCKNFbPTDjK6IeGzqAGRFeL5D37oKPrh2N"},{"functionCall":{"args":{"a":2,"b":3},"id":"2","name":"multiply"}}],"role":"model"},{"parts":[{"functionResponse":{"id":"1","name":"add","response":{"result":"5"}}},{"functionResponse":{"id":"2","name":"multiply","response":{"result":"6"}}}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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","parametersJsonSchema":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}},{"description":"Multiply two numbers","name":"multiply","parametersJsonSchema":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}}]}]} form: alt: - sse diff --git a/providertests/testdata/TestGoogleCommon/gemini-2.5-flash/tool.yaml b/providertests/testdata/TestGoogleCommon/gemini-2.5-flash/tool.yaml index 95e7b2443..ee074fe63 100644 --- a/providertests/testdata/TestGoogleCommon/gemini-2.5-flash/tool.yaml +++ b/providertests/testdata/TestGoogleCommon/gemini-2.5-flash/tool.yaml @@ -6,10 +6,10 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 509 + content_length: 519 host: generativelanguage.googleapis.com body: | - {"contents":[{"parts":[{"text":"What's the weather in Florence,Italy?"}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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"}}]}]} + {"contents":[{"parts":[{"text":"What's the weather in Florence,Italy?"}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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","parametersJsonSchema":{"properties":{"location":{"description":"the city","type":"string"}},"required":["location"],"type":"object"}}]}]} headers: Content-Type: - application/json @@ -73,10 +73,10 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 1072 + content_length: 1082 host: generativelanguage.googleapis.com body: | - {"contents":[{"parts":[{"text":"What's the weather in Florence,Italy?"}],"role":"user"},{"parts":[{"functionCall":{"args":{"location":"Florence,Italy"},"id":"1","name":"weather"},"thoughtSignature":"CvMBAb4+9vvZC/KtDBiEfP1WF+wUiObd6G6yg5vTA8dfeleB3pTysSfmipkwxCrjEL9Y29JxnkMMXZvzkVMlyiK01pvWtZ++SnHMyuy9J04IrT/6oDhaDculJL+1gJhI+4i1UlPgJBXlUnpkPcznVuYKh6YEvWhNQc3Wrz305DeBdPIb2WmZmGv2gOVlhL3yjUrmxVWuRrtt9bQHX9B29bKtvY6L5QnE+iXEDpDlB6N5Qoe0JDqjJMn2K4WmVbxXivQN+XcYrEeRbV8v0A3yKIIxozry6h8C5cWiqMcXdaPK+tDNq4+tljWouipUhKvSkQY1yQ3K"}],"role":"model"},{"parts":[{"functionResponse":{"id":"1","name":"weather","response":{"result":"40 C"}}}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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"}}]}]} + {"contents":[{"parts":[{"text":"What's the weather in Florence,Italy?"}],"role":"user"},{"parts":[{"functionCall":{"args":{"location":"Florence,Italy"},"id":"1","name":"weather"},"thoughtSignature":"CvMBAb4+9vvZC/KtDBiEfP1WF+wUiObd6G6yg5vTA8dfeleB3pTysSfmipkwxCrjEL9Y29JxnkMMXZvzkVMlyiK01pvWtZ++SnHMyuy9J04IrT/6oDhaDculJL+1gJhI+4i1UlPgJBXlUnpkPcznVuYKh6YEvWhNQc3Wrz305DeBdPIb2WmZmGv2gOVlhL3yjUrmxVWuRrtt9bQHX9B29bKtvY6L5QnE+iXEDpDlB6N5Qoe0JDqjJMn2K4WmVbxXivQN+XcYrEeRbV8v0A3yKIIxozry6h8C5cWiqMcXdaPK+tDNq4+tljWouipUhKvSkQY1yQ3K"}],"role":"model"},{"parts":[{"functionResponse":{"id":"1","name":"weather","response":{"result":"40 C"}}}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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","parametersJsonSchema":{"properties":{"location":{"description":"the city","type":"string"}},"required":["location"],"type":"object"}}]}]} headers: Content-Type: - application/json diff --git a/providertests/testdata/TestGoogleCommon/gemini-2.5-flash/tool_streaming.yaml b/providertests/testdata/TestGoogleCommon/gemini-2.5-flash/tool_streaming.yaml index f2be3f88f..8a22fed8a 100644 --- a/providertests/testdata/TestGoogleCommon/gemini-2.5-flash/tool_streaming.yaml +++ b/providertests/testdata/TestGoogleCommon/gemini-2.5-flash/tool_streaming.yaml @@ -6,10 +6,10 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 509 + content_length: 519 host: generativelanguage.googleapis.com body: | - {"contents":[{"parts":[{"text":"What's the weather in Florence,Italy?"}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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"}}]}]} + {"contents":[{"parts":[{"text":"What's the weather in Florence,Italy?"}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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","parametersJsonSchema":{"properties":{"location":{"description":"the city","type":"string"}},"required":["location"],"type":"object"}}]}]} form: alt: - sse @@ -38,10 +38,10 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 1144 + content_length: 1154 host: generativelanguage.googleapis.com body: | - {"contents":[{"parts":[{"text":"What's the weather in Florence,Italy?"}],"role":"user"},{"parts":[{"functionCall":{"args":{"location":"Florence,Italy"},"id":"1","name":"weather"},"thoughtSignature":"CiQBvj72+xCKZ6n2ewHIHg3nIWfu6zy4Znh/TJTlgZMDBj7UcfoKZwG+Pvb7HC0+ds8yTx13X71T68CdLhgHBq/EHSe1cdetUYt/hbcv5aJy5o7Bhux5fWqkmSsGNBs9HiMdsbRqRN4YXh9UR3LTnYuV7Bp0gR8nIE/QLK2BQtGNxrxaD8scXwvrZ2q3izMKmgEBvj72++/EmTKY6Vq77EISxk0GbpbjN6ypU29fapjcLCRtNSNfgpdcqgMgWIGqH6E9d20r2UYGXgyGsx5cdtWBvI0q5dQwy2xATovEZNRPNJC/+vY0yBsTojt61TKhp26PJ5fIdu02X8RN89S15Xr3egRayx72aPeUzfheqRxqGWjiMcbK4EWyiX+UxHHFqKTppeSRhBjtMdse"}],"role":"model"},{"parts":[{"functionResponse":{"id":"1","name":"weather","response":{"result":"40 C"}}}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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"}}]}]} + {"contents":[{"parts":[{"text":"What's the weather in Florence,Italy?"}],"role":"user"},{"parts":[{"functionCall":{"args":{"location":"Florence,Italy"},"id":"1","name":"weather"},"thoughtSignature":"CiQBvj72+xCKZ6n2ewHIHg3nIWfu6zy4Znh/TJTlgZMDBj7UcfoKZwG+Pvb7HC0+ds8yTx13X71T68CdLhgHBq/EHSe1cdetUYt/hbcv5aJy5o7Bhux5fWqkmSsGNBs9HiMdsbRqRN4YXh9UR3LTnYuV7Bp0gR8nIE/QLK2BQtGNxrxaD8scXwvrZ2q3izMKmgEBvj72++/EmTKY6Vq77EISxk0GbpbjN6ypU29fapjcLCRtNSNfgpdcqgMgWIGqH6E9d20r2UYGXgyGsx5cdtWBvI0q5dQwy2xATovEZNRPNJC/+vY0yBsTojt61TKhp26PJ5fIdu02X8RN89S15Xr3egRayx72aPeUzfheqRxqGWjiMcbK4EWyiX+UxHHFqKTppeSRhBjtMdse"}],"role":"model"},{"parts":[{"functionResponse":{"id":"1","name":"weather","response":{"result":"40 C"}}}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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","parametersJsonSchema":{"properties":{"location":{"description":"the city","type":"string"}},"required":["location"],"type":"object"}}]}]} form: alt: - sse diff --git a/providertests/testdata/TestGoogleCommon/gemini-2.5-pro/multi_tool.yaml b/providertests/testdata/TestGoogleCommon/gemini-2.5-pro/multi_tool.yaml index 17a56cf21..e5f572d40 100644 --- a/providertests/testdata/TestGoogleCommon/gemini-2.5-pro/multi_tool.yaml +++ b/providertests/testdata/TestGoogleCommon/gemini-2.5-pro/multi_tool.yaml @@ -6,10 +6,10 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 826 + content_length: 846 host: generativelanguage.googleapis.com body: | - {"contents":[{"parts":[{"text":"Add and multiply the number 2 and 3"}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"systemInstruction":{"parts":[{"text":"You are a helpful assistant. CRITICAL: Always use both add and multiply at the same time ALWAYS."}],"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"}}]}]} + {"contents":[{"parts":[{"text":"Add and multiply the number 2 and 3"}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"systemInstruction":{"parts":[{"text":"You are a helpful assistant. CRITICAL: Always use both add and multiply at the same time ALWAYS."}],"role":"user"},"toolConfig":{"functionCallingConfig":{"mode":"AUTO"}},"tools":[{"functionDeclarations":[{"description":"Add two numbers","name":"add","parametersJsonSchema":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}},{"description":"Multiply two numbers","name":"multiply","parametersJsonSchema":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}}]}]} headers: Content-Type: - application/json @@ -83,10 +83,10 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 2785 + content_length: 2805 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":"1","name":"add"},"thoughtSignature":"CrIJAb4+9vsevRLWMg/DbSUUnH+a5Hr8Vg5V+4qx3ROznUuRtiK4FNftUpY7Z9qgj1VA1q0/8pOlUG379d3XIV9dn8iAI0xwobN3c861BdSYjwL1Gvsbx5SKTDbDWuLTReZOPWjQQsuEoC5Y7s5kWt9MWvnmdbS27H6Sb3Q1mWyqncoDsztgRo2lLdnDHqZkxfaYTEmVpxzHqgigcrkdfSh+hHS9EAOfZKWsE9+XynQsbHPUXmpae/i5AkL873FDn5B0WuybY8mKTShyZ8rdv03C/DUpTarD7LVuLGNy3qxWGzxjyyGMlM5s0dZ+LTYrHCqseEKDXgnI/gR9gCjChgvOI91wuU4AxJtMrexhQe3acRF6GswPKhhmmnM23+0MIv7pj9gQ8NC1CJ8fp7lOtxM09Gb8agpSMOxbGulUsTWdHnT8XVS4u8VLygIWgQUBZryES0Cs+YwnUCZvrFTWwy/KnkoZkcLw9owlHMnGO6uNGdm3DiN4ISAux1AdwVzCQ2VshLXMfDk4Q2ZSIRtcyEwdth1G+lBVX8LhQ6LETNiaFVbwbIwMfVlUnrHvcMQ5fxccLzyzE/BFiaMcTun5juo8+DTKb/j0hBEu+z0HMywhBjck1lV+5DCRBuJIE5XPCjh2vE+wHjNLC9h0PAhNEAJ6wYp+27jS362Is7BwuFe6I7kDTkhtPrtkrSHrG5ANIkb/XHw//lfsErV1/4I+VZLmVwgU2rFXyuIVIDngmJ4c4HlDkhsgTH1/Xmihd9SDwD/Av3HkbrdOQ9+L3tsZt3r5VD1BVsG/IcQ00rR695L9G2eP1T2kmSctDr7vYMPNZsdeKUiPupqRr/e45tW3HqbDAydK1C4zYfJnyAlBtiuoIoFEyr1l2mnPPkJU+jv8EhEHpZcpCyhpDCvUno7D2wGA0JDlc8ewN5tXgLRulIX8fjG1CoztJCZJb6otUm5SITdo3jZ/NCN8TwzGAkOb3tcI/P9zaztVqr4mwNYBPGuelHBBE6BwZQYP31rWGRBNLXdZb4NUoRq5ijObMAN6kjV0tPTt7uoRNgAT4gPD2+xXsU7OvKlCG62jFS230vJ6ZiO63hPTG5LYYWlcoYLE/Gp0NpeZNmRo7Wwpat2UGJ9GqCEaRXMeWvBnGk2SzvM7lVlVtXRfdrsHwPrbo3WGwxU+P3FuldzoWYmkbUwN7P6Ib2uFO4FzdsOy16G/fNY095GOaTz+XYYVMnQx8nFOLke25RCz82ITeAK4dwao+fN0Pn7eFRyFXr5IYGe/gbg5mH+n39enkoBKkKDOes3RsCeFmabm8bbltIq1sLchA1TqZ0JJnVHqTq2syQLWbo40s6Yiz5yOT8mYnIjSsUeJaP244zbUckJudOAAhOoOUJJyTH69Ns5iVg3//6mMsHnbwfDIRhsoujKqnd/YIYoZgQefGvMKsbNRGF3LASN2v52fFOXo5e95j5HU8cvuMGabw0wjcQlmWaQ40FTJ1lQFjCF/KTi5ZoHT6kCmUpzgae5sIKubNIs3x24Y9rwwjydTNYgjeICeqky0JirHP+lYZQai6D5vVu/nLMFCnqpbt4eSsdFz/YV8Ok7vOEMLRX7vyhldEnk="},{"functionCall":{"args":{"a":2,"b":3},"id":"2","name":"multiply"}}],"role":"model"},{"parts":[{"functionResponse":{"id":"1","name":"add","response":{"result":"5"}}},{"functionResponse":{"id":"2","name":"multiply","response":{"result":"6"}}}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"systemInstruction":{"parts":[{"text":"You are a helpful assistant. CRITICAL: Always use both add and multiply at the same time ALWAYS."}],"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"}}]}]} + {"contents":[{"parts":[{"text":"Add and multiply the number 2 and 3"}],"role":"user"},{"parts":[{"functionCall":{"args":{"a":2,"b":3},"id":"1","name":"add"},"thoughtSignature":"CrIJAb4+9vsevRLWMg/DbSUUnH+a5Hr8Vg5V+4qx3ROznUuRtiK4FNftUpY7Z9qgj1VA1q0/8pOlUG379d3XIV9dn8iAI0xwobN3c861BdSYjwL1Gvsbx5SKTDbDWuLTReZOPWjQQsuEoC5Y7s5kWt9MWvnmdbS27H6Sb3Q1mWyqncoDsztgRo2lLdnDHqZkxfaYTEmVpxzHqgigcrkdfSh+hHS9EAOfZKWsE9+XynQsbHPUXmpae/i5AkL873FDn5B0WuybY8mKTShyZ8rdv03C/DUpTarD7LVuLGNy3qxWGzxjyyGMlM5s0dZ+LTYrHCqseEKDXgnI/gR9gCjChgvOI91wuU4AxJtMrexhQe3acRF6GswPKhhmmnM23+0MIv7pj9gQ8NC1CJ8fp7lOtxM09Gb8agpSMOxbGulUsTWdHnT8XVS4u8VLygIWgQUBZryES0Cs+YwnUCZvrFTWwy/KnkoZkcLw9owlHMnGO6uNGdm3DiN4ISAux1AdwVzCQ2VshLXMfDk4Q2ZSIRtcyEwdth1G+lBVX8LhQ6LETNiaFVbwbIwMfVlUnrHvcMQ5fxccLzyzE/BFiaMcTun5juo8+DTKb/j0hBEu+z0HMywhBjck1lV+5DCRBuJIE5XPCjh2vE+wHjNLC9h0PAhNEAJ6wYp+27jS362Is7BwuFe6I7kDTkhtPrtkrSHrG5ANIkb/XHw//lfsErV1/4I+VZLmVwgU2rFXyuIVIDngmJ4c4HlDkhsgTH1/Xmihd9SDwD/Av3HkbrdOQ9+L3tsZt3r5VD1BVsG/IcQ00rR695L9G2eP1T2kmSctDr7vYMPNZsdeKUiPupqRr/e45tW3HqbDAydK1C4zYfJnyAlBtiuoIoFEyr1l2mnPPkJU+jv8EhEHpZcpCyhpDCvUno7D2wGA0JDlc8ewN5tXgLRulIX8fjG1CoztJCZJb6otUm5SITdo3jZ/NCN8TwzGAkOb3tcI/P9zaztVqr4mwNYBPGuelHBBE6BwZQYP31rWGRBNLXdZb4NUoRq5ijObMAN6kjV0tPTt7uoRNgAT4gPD2+xXsU7OvKlCG62jFS230vJ6ZiO63hPTG5LYYWlcoYLE/Gp0NpeZNmRo7Wwpat2UGJ9GqCEaRXMeWvBnGk2SzvM7lVlVtXRfdrsHwPrbo3WGwxU+P3FuldzoWYmkbUwN7P6Ib2uFO4FzdsOy16G/fNY095GOaTz+XYYVMnQx8nFOLke25RCz82ITeAK4dwao+fN0Pn7eFRyFXr5IYGe/gbg5mH+n39enkoBKkKDOes3RsCeFmabm8bbltIq1sLchA1TqZ0JJnVHqTq2syQLWbo40s6Yiz5yOT8mYnIjSsUeJaP244zbUckJudOAAhOoOUJJyTH69Ns5iVg3//6mMsHnbwfDIRhsoujKqnd/YIYoZgQefGvMKsbNRGF3LASN2v52fFOXo5e95j5HU8cvuMGabw0wjcQlmWaQ40FTJ1lQFjCF/KTi5ZoHT6kCmUpzgae5sIKubNIs3x24Y9rwwjydTNYgjeICeqky0JirHP+lYZQai6D5vVu/nLMFCnqpbt4eSsdFz/YV8Ok7vOEMLRX7vyhldEnk="},{"functionCall":{"args":{"a":2,"b":3},"id":"2","name":"multiply"}}],"role":"model"},{"parts":[{"functionResponse":{"id":"1","name":"add","response":{"result":"5"}}},{"functionResponse":{"id":"2","name":"multiply","response":{"result":"6"}}}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"systemInstruction":{"parts":[{"text":"You are a helpful assistant. CRITICAL: Always use both add and multiply at the same time ALWAYS."}],"role":"user"},"toolConfig":{"functionCallingConfig":{"mode":"AUTO"}},"tools":[{"functionDeclarations":[{"description":"Add two numbers","name":"add","parametersJsonSchema":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}},{"description":"Multiply two numbers","name":"multiply","parametersJsonSchema":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}}]}]} headers: Content-Type: - application/json diff --git a/providertests/testdata/TestGoogleCommon/gemini-2.5-pro/multi_tool_streaming.yaml b/providertests/testdata/TestGoogleCommon/gemini-2.5-pro/multi_tool_streaming.yaml index 641caea24..2ada8a8ba 100644 --- a/providertests/testdata/TestGoogleCommon/gemini-2.5-pro/multi_tool_streaming.yaml +++ b/providertests/testdata/TestGoogleCommon/gemini-2.5-pro/multi_tool_streaming.yaml @@ -6,10 +6,10 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 809 + content_length: 829 host: generativelanguage.googleapis.com body: | - {"contents":[{"parts":[{"text":"Add and multiply the number 2 and 3"}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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"}}]}]} + {"contents":[{"parts":[{"text":"Add and multiply the number 2 and 3"}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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","parametersJsonSchema":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}},{"description":"Multiply two numbers","name":"multiply","parametersJsonSchema":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}}]}]} form: alt: - sse @@ -38,10 +38,10 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 2596 + content_length: 2616 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":"1","name":"add"},"thoughtSignature":"CiQBvj72+/5mzhxPMHPnuLp75uv0yLiXlilHJLAP+kJiaYBuOWMKXgG+Pvb7cVVqLAomoUlGHWT11Qpw9y385/61+scbxb8OIInn4iCkBmjAGUZRQzLepGleNqs5cgSE0aU7tHEqK+VFg8NkWslo6qK56AfAV92M56MTL4W2paG5/3y83G8KiwEBvj72+5i8WiXe1K5jKOI8hwA2av98K2GygjwYmqRU4cLlRqUC22+iVRdyP+8aL7LdrZ10IskKtQTiHLI52oSYRDOhAg5EvZfdwafQTsgcx1IInXYJuwe2yzeXUHZvFoacZTO2dxi4Z6JlUSUWFF1HMOhKuAAYeEQxSkX1dEbYVu8IC2Qit0JByARSCocBAb4+9vtGE2otvUtKcRXW/SSI15YSb2JZ6w9A5T+WYdHW+MAOuQm9CgtSfMKrzzXMr9UmEbHbwlVOEiW3abzN2AFojZPi6XqHyXRHBvP/8MF7nkOJDOJbO7emTzV9RVazpZPYEXqUoo2sNc59iypviQcmIulZMb0taC7WlG50gryqguU+qb5BCnABvj72+2ATXsihLeTacbu6hu7eAvbkLIYbTO0wGbeXgz7oOgYV8x8rXSHL/mIjYZH71F62NrXEYbKCZ4Od90fDb+NhnQVnGGwxyHhwn2umg6SFMO4PT/o+zJ27TprRm2PLpWopSje7GQANxH824e6NCmcBvj72+4EH9/SSwSSHoKKCfLyFentqtyuBjtmhbeeIoyED8cSb4BGrk+f/B61G38KAziEwzOvi3wKB1T6GVgVptx25df4yO7r9qJ1YcAaeh4VRF/ynpMwn9I5YiHjPdHs/uoPmn4XmCmUBvj72+0YYsEi4h6bKy5Tw8FBnsvdL0vMZBt7WBoK1NvnIGRqXL4wIDu1I/5jPBk1z/1k9zh6F6vmBjXkjN2lqPhET130bSGTY9KdAbBOMEnuVj06r8Hn4AgsdWSTx7bs8B2yn8wqTAQG+Pvb7T6xeLfI61h/hxHameQM8Hkcv0VsgZHZzJlTVfZ19G/WyZQ56NngYuaorVyscil5FilTskmPkUwlml7TWPUnZcH2H274SN0ErLS5xPPOhNMDXoNVI5IfuXCwgGQQ0q8/SQMkmTsdLhKj0l+h6Sbxj8JOR0QV8bDzLdJJc5xgnsDK1sjWqYaLU+XTajQcxAQqCAQG+Pvb7mWy6L8k7foZKaqbqbjtwr54V4QB2cf9u9co60/UFJvvtlAZ+2vt1i7OLSQOE4tb6AJ3n6BG6tGTCl855QAy4BsozAmTUacfBju7NpvFP6jyaSBydTezN/07gy2Sy8i9xLGhEslI++rQ70JckuuD/J1XFX1+9xc2k/MwgpJgKNwG+Pvb79q0WkumGwUdgGKyG0srSCxFua+rIg3C0wRHQLc/Q5Wt2ff6dhi/ni0JLeDqT2BMpVlA="},{"functionCall":{"args":{"a":2,"b":3},"id":"2","name":"multiply"}}],"role":"model"},{"parts":[{"functionResponse":{"id":"1","name":"add","response":{"result":"5"}}},{"functionResponse":{"id":"2","name":"multiply","response":{"result":"6"}}}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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"}}]}]} + {"contents":[{"parts":[{"text":"Add and multiply the number 2 and 3"}],"role":"user"},{"parts":[{"functionCall":{"args":{"a":2,"b":3},"id":"1","name":"add"},"thoughtSignature":"CiQBvj72+/5mzhxPMHPnuLp75uv0yLiXlilHJLAP+kJiaYBuOWMKXgG+Pvb7cVVqLAomoUlGHWT11Qpw9y385/61+scbxb8OIInn4iCkBmjAGUZRQzLepGleNqs5cgSE0aU7tHEqK+VFg8NkWslo6qK56AfAV92M56MTL4W2paG5/3y83G8KiwEBvj72+5i8WiXe1K5jKOI8hwA2av98K2GygjwYmqRU4cLlRqUC22+iVRdyP+8aL7LdrZ10IskKtQTiHLI52oSYRDOhAg5EvZfdwafQTsgcx1IInXYJuwe2yzeXUHZvFoacZTO2dxi4Z6JlUSUWFF1HMOhKuAAYeEQxSkX1dEbYVu8IC2Qit0JByARSCocBAb4+9vtGE2otvUtKcRXW/SSI15YSb2JZ6w9A5T+WYdHW+MAOuQm9CgtSfMKrzzXMr9UmEbHbwlVOEiW3abzN2AFojZPi6XqHyXRHBvP/8MF7nkOJDOJbO7emTzV9RVazpZPYEXqUoo2sNc59iypviQcmIulZMb0taC7WlG50gryqguU+qb5BCnABvj72+2ATXsihLeTacbu6hu7eAvbkLIYbTO0wGbeXgz7oOgYV8x8rXSHL/mIjYZH71F62NrXEYbKCZ4Od90fDb+NhnQVnGGwxyHhwn2umg6SFMO4PT/o+zJ27TprRm2PLpWopSje7GQANxH824e6NCmcBvj72+4EH9/SSwSSHoKKCfLyFentqtyuBjtmhbeeIoyED8cSb4BGrk+f/B61G38KAziEwzOvi3wKB1T6GVgVptx25df4yO7r9qJ1YcAaeh4VRF/ynpMwn9I5YiHjPdHs/uoPmn4XmCmUBvj72+0YYsEi4h6bKy5Tw8FBnsvdL0vMZBt7WBoK1NvnIGRqXL4wIDu1I/5jPBk1z/1k9zh6F6vmBjXkjN2lqPhET130bSGTY9KdAbBOMEnuVj06r8Hn4AgsdWSTx7bs8B2yn8wqTAQG+Pvb7T6xeLfI61h/hxHameQM8Hkcv0VsgZHZzJlTVfZ19G/WyZQ56NngYuaorVyscil5FilTskmPkUwlml7TWPUnZcH2H274SN0ErLS5xPPOhNMDXoNVI5IfuXCwgGQQ0q8/SQMkmTsdLhKj0l+h6Sbxj8JOR0QV8bDzLdJJc5xgnsDK1sjWqYaLU+XTajQcxAQqCAQG+Pvb7mWy6L8k7foZKaqbqbjtwr54V4QB2cf9u9co60/UFJvvtlAZ+2vt1i7OLSQOE4tb6AJ3n6BG6tGTCl855QAy4BsozAmTUacfBju7NpvFP6jyaSBydTezN/07gy2Sy8i9xLGhEslI++rQ70JckuuD/J1XFX1+9xc2k/MwgpJgKNwG+Pvb79q0WkumGwUdgGKyG0srSCxFua+rIg3C0wRHQLc/Q5Wt2ff6dhi/ni0JLeDqT2BMpVlA="},{"functionCall":{"args":{"a":2,"b":3},"id":"2","name":"multiply"}}],"role":"model"},{"parts":[{"functionResponse":{"id":"1","name":"add","response":{"result":"5"}}},{"functionResponse":{"id":"2","name":"multiply","response":{"result":"6"}}}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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","parametersJsonSchema":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}},{"description":"Multiply two numbers","name":"multiply","parametersJsonSchema":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}}]}]} form: alt: - sse diff --git a/providertests/testdata/TestGoogleCommon/gemini-2.5-pro/tool.yaml b/providertests/testdata/TestGoogleCommon/gemini-2.5-pro/tool.yaml index 313869ea0..35da50136 100644 --- a/providertests/testdata/TestGoogleCommon/gemini-2.5-pro/tool.yaml +++ b/providertests/testdata/TestGoogleCommon/gemini-2.5-pro/tool.yaml @@ -6,10 +6,10 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 509 + content_length: 519 host: generativelanguage.googleapis.com body: | - {"contents":[{"parts":[{"text":"What's the weather in Florence,Italy?"}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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"}}]}]} + {"contents":[{"parts":[{"text":"What's the weather in Florence,Italy?"}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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","parametersJsonSchema":{"properties":{"location":{"description":"the city","type":"string"}},"required":["location"],"type":"object"}}]}]} headers: Content-Type: - application/json @@ -73,10 +73,10 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 1580 + content_length: 1590 host: generativelanguage.googleapis.com body: | - {"contents":[{"parts":[{"text":"What's the weather in Florence,Italy?"}],"role":"user"},{"parts":[{"functionCall":{"args":{"location":"Florence,Italy"},"id":"1","name":"weather"},"thoughtSignature":"CvAEAb4+9vtxNfQaVSMvYzllmvVB1mXbjZ/qnb4x+ly3Srx40E5gyHmg0LvGfTs6yXFSywSUSD6tcGVUHOKlwVy7iG+xxOL2sBFKa2uPJYvbFIDPEbp+qxwewOczGBAe74tqcbVyy+ulV7vlMeajS1Yu/xDipVuNvKPiLr/bOlNVCtGr2dNccPdCwifE47yKkDwrKVbHjgF/T0b2757DMN7aRp2fsQN5eRCJ8z4P14MoPIsPjvnIInT//t8bz0ZgU36urTFQt9s8sRrIRYOoyh0wfLCMH+5RLoZWVOGvtVG4OasSZmWOix4cSq74VAvhk9TY3XoIDH/CTWn266rR1/OyjDImoAvcGAYF0YGNaEI9TS9OStKLBI+YAZrQC5L884F5+ry3k8xwmx3omToKECwFPx66Tg27fGAIf0T/M0abfKJhCuobRChab4MXZKJbBTfNxPpP/bOB3P7chC/S4uNoIPNU8cQs6zJECujeY5J4eFSwTsMhgOXcWnd9xUNM2zbyiTwPyiVNa8/M3TlvHYc0H32ClWTfTOUFQo2HSLNXXhTI3qZ3/PnZzOIbF2HTSgWqf5jhWDPLp+q1MGBmqBarhwwoie8yl6RKSP1XFJuEgUuW53LnP7esFSGZymfJvLynPnUDUiu3Nyf2W9YwN3FGt7cvMsO3YX34dFwbKr9Wy2ZOM5RNEP/Cf5qzDYvzQnkr4WmAQYQg5Rpt8YVoOuXJDK2z1Qb8MIQfv75RTt4CzkIjrMxIVy1q1L+iUWaSxh/b7HDkh/7CLNF/pvRnB/KjsFU5j2BeXRKF2hIVPRNC8PhnB6rbpDtrEcIrpC9lmIQA"}],"role":"model"},{"parts":[{"functionResponse":{"id":"1","name":"weather","response":{"result":"40 C"}}}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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"}}]}]} + {"contents":[{"parts":[{"text":"What's the weather in Florence,Italy?"}],"role":"user"},{"parts":[{"functionCall":{"args":{"location":"Florence,Italy"},"id":"1","name":"weather"},"thoughtSignature":"CvAEAb4+9vtxNfQaVSMvYzllmvVB1mXbjZ/qnb4x+ly3Srx40E5gyHmg0LvGfTs6yXFSywSUSD6tcGVUHOKlwVy7iG+xxOL2sBFKa2uPJYvbFIDPEbp+qxwewOczGBAe74tqcbVyy+ulV7vlMeajS1Yu/xDipVuNvKPiLr/bOlNVCtGr2dNccPdCwifE47yKkDwrKVbHjgF/T0b2757DMN7aRp2fsQN5eRCJ8z4P14MoPIsPjvnIInT//t8bz0ZgU36urTFQt9s8sRrIRYOoyh0wfLCMH+5RLoZWVOGvtVG4OasSZmWOix4cSq74VAvhk9TY3XoIDH/CTWn266rR1/OyjDImoAvcGAYF0YGNaEI9TS9OStKLBI+YAZrQC5L884F5+ry3k8xwmx3omToKECwFPx66Tg27fGAIf0T/M0abfKJhCuobRChab4MXZKJbBTfNxPpP/bOB3P7chC/S4uNoIPNU8cQs6zJECujeY5J4eFSwTsMhgOXcWnd9xUNM2zbyiTwPyiVNa8/M3TlvHYc0H32ClWTfTOUFQo2HSLNXXhTI3qZ3/PnZzOIbF2HTSgWqf5jhWDPLp+q1MGBmqBarhwwoie8yl6RKSP1XFJuEgUuW53LnP7esFSGZymfJvLynPnUDUiu3Nyf2W9YwN3FGt7cvMsO3YX34dFwbKr9Wy2ZOM5RNEP/Cf5qzDYvzQnkr4WmAQYQg5Rpt8YVoOuXJDK2z1Qb8MIQfv75RTt4CzkIjrMxIVy1q1L+iUWaSxh/b7HDkh/7CLNF/pvRnB/KjsFU5j2BeXRKF2hIVPRNC8PhnB6rbpDtrEcIrpC9lmIQA"}],"role":"model"},{"parts":[{"functionResponse":{"id":"1","name":"weather","response":{"result":"40 C"}}}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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","parametersJsonSchema":{"properties":{"location":{"description":"the city","type":"string"}},"required":["location"],"type":"object"}}]}]} headers: Content-Type: - application/json diff --git a/providertests/testdata/TestGoogleCommon/gemini-2.5-pro/tool_streaming.yaml b/providertests/testdata/TestGoogleCommon/gemini-2.5-pro/tool_streaming.yaml index 82f6c461f..5ff95f553 100644 --- a/providertests/testdata/TestGoogleCommon/gemini-2.5-pro/tool_streaming.yaml +++ b/providertests/testdata/TestGoogleCommon/gemini-2.5-pro/tool_streaming.yaml @@ -6,10 +6,10 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 509 + content_length: 519 host: generativelanguage.googleapis.com body: | - {"contents":[{"parts":[{"text":"What's the weather in Florence,Italy?"}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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"}}]}]} + {"contents":[{"parts":[{"text":"What's the weather in Florence,Italy?"}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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","parametersJsonSchema":{"properties":{"location":{"description":"the city","type":"string"}},"required":["location"],"type":"object"}}]}]} form: alt: - sse @@ -38,10 +38,10 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 2249 + content_length: 2259 host: generativelanguage.googleapis.com body: | - {"contents":[{"parts":[{"text":"What's the weather in Florence,Italy?"}],"role":"user"},{"parts":[{"functionCall":{"args":{"location":"Florence, Italy"},"id":"1","name":"weather"},"thoughtSignature":"CiIBvj72+1v4QKkYPOC2jG3Va8DRpe8ihI2ScnfIBJDY2N8fCmcBvj72+/d+0GymuiakCGulxoE09dJ4iFALSGX9PK6RqSe3jO+BC4uHmnsIENG/1ry0N/ScX9Daqn4wmWIQ6y2yl0HgVo3MCEN2nI6Fe0HOsg+Znw6NYdDxL//CixiAVrJUEe60eoxLCocBAb4+9vtOKB25uRUGO8ff8YSXhdJeXwc8HV+8WC1Hfk4rQgaRRNkgmbfUCBr4Nc9QhypeVqodo+7YV2hEsFiWRdrMGTQoHLJ1+mq1e3taKJtJGrvwnsbPJaNFcv5iF/GiZV4NJmjbZEo1Tnvo4VLcv8syybSkH5KAhgdtEs2qUjccw/sXmoRcCoABAb4+9vtHE4LrV/lmqX2OO7koVDHduhTXREfiHj8QHMSQb8f7KYxxD+hemOcozCJVmQtnd8WpaDZWKZtBO3CyHep7ag6OOqFE0IxXZ5RKB+s1zrOdfIhaJRWWisQZ37IXi0MPCpDLkLyqWolJ/mnHD+NNi4d8JXaecy8p8E7o4JMKgQEBvj72+zqAt0jZkkAsfVRWnWs/mMAcYWRcuu4QH9ayaABA8EPMmtEJ16g6XsDFACBnhvNGs1XyfUYpDVNfzg0jCw83td7wvZY5iuf2JcOeCNPcJNtNOffYb0KKPu0tmUM6chn0G3m2Ls9qo8r5pnW9BoRsofrkVI+7RKEe+w4VWXwKkwEBvj72+6AYTIrtLPVxXAVq+TnIUzttMGWkJQDH+UIqc1EG6P/YH2xJ0rw//VtjHEeuQ/vYXpwB2VqHf8zNbmiXEM50Y5glpU6nYfEy0Qpa3jMAc0/cl/xX8lPYpwihChpf0tCbR/pvHyOPVoK0QRSnbIpRsHCvyFAbhVdwc2VeNl+bsBupkUxsm2f1o4aQ7VP6pEkKmgEBvj72+xUNgiMacUJoqo/5GO3Gu9EqQ87RDkT8471x+BPuaZbCxUno4AE7P6KkjsE5UWaEzvGQtct+64XKfbXW/Xz8FDjhW1R0CUDeHchJxN0hbeUbI3CEnTx1kl9zTjJlaWGpIPe1VJr1qqWro+VAJYWf0DymNVAlKPpGe5sSBrqwpAiztFvFLWJg9nz090+BliguV5PBn2Y5CoUBAb4+9vv7rXqsVZL4DDyPOuHt8bOfjzkZl0mt9BjZWqIjtknczJuoAmFIGQrzpc2viLvumINdmxTkq9Z4F/X5TMy3ECPLtVVCi63K73k693bz2STSIrKlRepFNIX6dvrRBZPUDKZp2r3wHhvcGhFir/s/Me3TOqHhJiDT3jff7tUH643SKAqKAQG+Pvb7DVgdIzgt4wE7iwTlmQXYWbksQ/tcpEezQB3nbo9tAL3calCnINp/tN3v7XPC/T8ohtrtzOLyOIwUYRStcGmusDLjKBioNgllneaelLi3IcJTIXOREtGtY+m2X3U5q32DQHT+vHrfZS7zY0g+KPcu3gVD/YiZJJlHPbeZiZ7ikwOi74H1tg=="}],"role":"model"},{"parts":[{"functionResponse":{"id":"1","name":"weather","response":{"result":"40 C"}}}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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"}}]}]} + {"contents":[{"parts":[{"text":"What's the weather in Florence,Italy?"}],"role":"user"},{"parts":[{"functionCall":{"args":{"location":"Florence, Italy"},"id":"1","name":"weather"},"thoughtSignature":"CiIBvj72+1v4QKkYPOC2jG3Va8DRpe8ihI2ScnfIBJDY2N8fCmcBvj72+/d+0GymuiakCGulxoE09dJ4iFALSGX9PK6RqSe3jO+BC4uHmnsIENG/1ry0N/ScX9Daqn4wmWIQ6y2yl0HgVo3MCEN2nI6Fe0HOsg+Znw6NYdDxL//CixiAVrJUEe60eoxLCocBAb4+9vtOKB25uRUGO8ff8YSXhdJeXwc8HV+8WC1Hfk4rQgaRRNkgmbfUCBr4Nc9QhypeVqodo+7YV2hEsFiWRdrMGTQoHLJ1+mq1e3taKJtJGrvwnsbPJaNFcv5iF/GiZV4NJmjbZEo1Tnvo4VLcv8syybSkH5KAhgdtEs2qUjccw/sXmoRcCoABAb4+9vtHE4LrV/lmqX2OO7koVDHduhTXREfiHj8QHMSQb8f7KYxxD+hemOcozCJVmQtnd8WpaDZWKZtBO3CyHep7ag6OOqFE0IxXZ5RKB+s1zrOdfIhaJRWWisQZ37IXi0MPCpDLkLyqWolJ/mnHD+NNi4d8JXaecy8p8E7o4JMKgQEBvj72+zqAt0jZkkAsfVRWnWs/mMAcYWRcuu4QH9ayaABA8EPMmtEJ16g6XsDFACBnhvNGs1XyfUYpDVNfzg0jCw83td7wvZY5iuf2JcOeCNPcJNtNOffYb0KKPu0tmUM6chn0G3m2Ls9qo8r5pnW9BoRsofrkVI+7RKEe+w4VWXwKkwEBvj72+6AYTIrtLPVxXAVq+TnIUzttMGWkJQDH+UIqc1EG6P/YH2xJ0rw//VtjHEeuQ/vYXpwB2VqHf8zNbmiXEM50Y5glpU6nYfEy0Qpa3jMAc0/cl/xX8lPYpwihChpf0tCbR/pvHyOPVoK0QRSnbIpRsHCvyFAbhVdwc2VeNl+bsBupkUxsm2f1o4aQ7VP6pEkKmgEBvj72+xUNgiMacUJoqo/5GO3Gu9EqQ87RDkT8471x+BPuaZbCxUno4AE7P6KkjsE5UWaEzvGQtct+64XKfbXW/Xz8FDjhW1R0CUDeHchJxN0hbeUbI3CEnTx1kl9zTjJlaWGpIPe1VJr1qqWro+VAJYWf0DymNVAlKPpGe5sSBrqwpAiztFvFLWJg9nz090+BliguV5PBn2Y5CoUBAb4+9vv7rXqsVZL4DDyPOuHt8bOfjzkZl0mt9BjZWqIjtknczJuoAmFIGQrzpc2viLvumINdmxTkq9Z4F/X5TMy3ECPLtVVCi63K73k693bz2STSIrKlRepFNIX6dvrRBZPUDKZp2r3wHhvcGhFir/s/Me3TOqHhJiDT3jff7tUH643SKAqKAQG+Pvb7DVgdIzgt4wE7iwTlmQXYWbksQ/tcpEezQB3nbo9tAL3calCnINp/tN3v7XPC/T8ohtrtzOLyOIwUYRStcGmusDLjKBioNgllneaelLi3IcJTIXOREtGtY+m2X3U5q32DQHT+vHrfZS7zY0g+KPcu3gVD/YiZJJlHPbeZiZ7ikwOi74H1tg=="}],"role":"model"},{"parts":[{"functionResponse":{"id":"1","name":"weather","response":{"result":"40 C"}}}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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","parametersJsonSchema":{"properties":{"location":{"description":"the city","type":"string"}},"required":["location"],"type":"object"}}]}]} form: alt: - sse diff --git a/providertests/testdata/TestGoogleCommon/gemini-3-pro-preview/multi_tool.yaml b/providertests/testdata/TestGoogleCommon/gemini-3-pro-preview/multi_tool.yaml index 65fb8020c..56df55a72 100644 --- a/providertests/testdata/TestGoogleCommon/gemini-3-pro-preview/multi_tool.yaml +++ b/providertests/testdata/TestGoogleCommon/gemini-3-pro-preview/multi_tool.yaml @@ -6,10 +6,10 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 826 + content_length: 846 host: generativelanguage.googleapis.com body: | - {"contents":[{"parts":[{"text":"Add and multiply the number 2 and 3"}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"systemInstruction":{"parts":[{"text":"You are a helpful assistant. CRITICAL: Always use both add and multiply at the same time ALWAYS."}],"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"}}]}]} + {"contents":[{"parts":[{"text":"Add and multiply the number 2 and 3"}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"systemInstruction":{"parts":[{"text":"You are a helpful assistant. CRITICAL: Always use both add and multiply at the same time ALWAYS."}],"role":"user"},"toolConfig":{"functionCallingConfig":{"mode":"AUTO"}},"tools":[{"functionDeclarations":[{"description":"Add two numbers","name":"add","parametersJsonSchema":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}},{"description":"Multiply two numbers","name":"multiply","parametersJsonSchema":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}}]}]} headers: Content-Type: - application/json @@ -85,10 +85,10 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 3021 + content_length: 3041 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":"wxvlv0tv","name":"add"},"thoughtSignature":"Es8KCswKAb4+9vtrVmO0plQ64ERt0uQKzZonNy53D/+nFxRO1TcWH0HSxBilFjTw//xDeRj7pCIvNED3q2jhDQWHNRM4vTLAqKcGwlHjkJSQn88aU1H1O7fAsu0zLvlF1Jfoy/emXhw+YbBcYCUzZ32L+EFJNP5qVw9l97ZNqPk0vq4ZpCUMKwdWWhd0eZ4kQTPckw9e69vp9CSaf9lWlThy/KrmtxWLHijFLKQaR112BwWN/7TyzAdesZB3z5r7Cnj16o2HxJUzB+GBD1UFUNiQEVWiU4SPv1fHdR9ME6TSBDgRceBJE/AbBHVO2IDrGNxHXbrJR4GUGX+komQ7SJTD/hkF1BMnOIa2GSKf99Nv8O1jMJbMF4hUnUbZuWlvycu0CWGqx6A3Qq3DvXkX7TDXV6u6y+mA5Aox5404QzKLf1bMI6IS4zU/Zd/0AhY/tBaJgPtDTnL7Gz5Nvmtd7/7DUub+0IRSU657IZESa/UnN8A9yk+mGjE7tdfESZ2f5hMhAKAjAKBiec+H/LBI3O9ptR4wy6NzdTtqHGXJObyMkBzqPAmUDb6msoBMD0KJsH7ZYeLHCF5RPWpC+O1mpF3cK9sHHaAXkN2GjtMDc7swar3eq/JBoZMoo6N38Mwc5+oHFJlT0TcSrFaJTEeSefdIuL/hsxscQPVUY5KidWX9dZ9QQiSBxf+SgUpF+w3R++LDtcld2VW+e8bSIQwICX/PfNNRUGQ619IY5Eu53mReGV+pojgiJqDiFtLVONFJMY0oToEWZrjdkoZVRuTBXMsGAgAOQCIcmexfqs2NuzFd6vlCyGP/Lwy8ZEbkkaK2QFoSkvInsnAfCCAKt35n/SBW5tQlhlw393lsX8lRNQSL+2jQa40So32IwCE/wt6wD+6FhZWP7BKI83phPqKqz7Z9+lmbfNQPq4wRtegwhYtQTeenN69rWwB1z+zap+gRT9odg3bZaP0Do7tsIiy0Bc0rieT0C7gMWIp57wtaXTcVirLCscztBvlOlI7ZemzNWFo//HQaHBCCR4Jk5wWjyVu5sKnAHwSlmQ8tpShd3s+RWfUr2YFlf8DNCThOYy4U5iw5/TJAw2WwlpQYDPGAZpXdWmAgtjTb04QfvWJL/RX73+2Cviv3YNqWnoUln+Ppw7qSXfOhRVmVAbYLzBjxg8A/KM3rA5pSBv3bV2+9DnQHqT4xx3g+elvVM4sOvnJnfETSNUjKRG3xAnsl4rzsOJgnEVh633IiYT6TMJHIJuKforsrljN4sttp4kIafrYT9zoHXfyJLsyNf6Uj0+OshTUHYs/Suucb+ZH+HAnd9SUodCXXZtInzeo6LEm68kptq+u9QiDCXt1TkredXyNLIO6vPCUftWciCgebZ8tZ0Do7bfK0DOT8YPFSQ2Vxtb58p4gpWXVYLCb2pZ61sMkvXiKsztCPCAEJ4OTsYmeqaf1Et4NzAI0zaSAy4N4NWQBt4RUdoNNCX/WQ9gXGljw2+sERTAnhl8NzLP0+CzbMYnd/ACtHHxG2CgzHNWs7dXarz1xYzdLbQRYAoNrWQPtPacsKxt5iiYiqoyIg5w5+zgQEoUWt6CQKv9SnxFVu/jQNGB6XNJSIEhL5Wl1JkOoMnBsfyuvT4fyIT1KBBA2DZTJW5z6wspBFiRuSlBMuA04tAInhzNAeajxpitzm0czJHC8V0bMwiU/sIoJeYJ1omraxgtak7bqo7jvcp9+oksAqsqYVosaX2Shn0BwQIsfCScwKc8T8yYU3doqobL8K74gIdATos5hAHXJ3hEpabgiqCF+C+ef39KnoFtOHyqmWOn6a"},{"functionCall":{"args":{"a":2,"b":3},"id":"75p2opbh","name":"multiply"}}],"role":"model"},{"parts":[{"functionResponse":{"id":"wxvlv0tv","name":"add","response":{"result":"5"}}},{"functionResponse":{"id":"75p2opbh","name":"multiply","response":{"result":"6"}}}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"systemInstruction":{"parts":[{"text":"You are a helpful assistant. CRITICAL: Always use both add and multiply at the same time ALWAYS."}],"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"}}]}]} + {"contents":[{"parts":[{"text":"Add and multiply the number 2 and 3"}],"role":"user"},{"parts":[{"functionCall":{"args":{"a":2,"b":3},"id":"wxvlv0tv","name":"add"},"thoughtSignature":"Es8KCswKAb4+9vtrVmO0plQ64ERt0uQKzZonNy53D/+nFxRO1TcWH0HSxBilFjTw//xDeRj7pCIvNED3q2jhDQWHNRM4vTLAqKcGwlHjkJSQn88aU1H1O7fAsu0zLvlF1Jfoy/emXhw+YbBcYCUzZ32L+EFJNP5qVw9l97ZNqPk0vq4ZpCUMKwdWWhd0eZ4kQTPckw9e69vp9CSaf9lWlThy/KrmtxWLHijFLKQaR112BwWN/7TyzAdesZB3z5r7Cnj16o2HxJUzB+GBD1UFUNiQEVWiU4SPv1fHdR9ME6TSBDgRceBJE/AbBHVO2IDrGNxHXbrJR4GUGX+komQ7SJTD/hkF1BMnOIa2GSKf99Nv8O1jMJbMF4hUnUbZuWlvycu0CWGqx6A3Qq3DvXkX7TDXV6u6y+mA5Aox5404QzKLf1bMI6IS4zU/Zd/0AhY/tBaJgPtDTnL7Gz5Nvmtd7/7DUub+0IRSU657IZESa/UnN8A9yk+mGjE7tdfESZ2f5hMhAKAjAKBiec+H/LBI3O9ptR4wy6NzdTtqHGXJObyMkBzqPAmUDb6msoBMD0KJsH7ZYeLHCF5RPWpC+O1mpF3cK9sHHaAXkN2GjtMDc7swar3eq/JBoZMoo6N38Mwc5+oHFJlT0TcSrFaJTEeSefdIuL/hsxscQPVUY5KidWX9dZ9QQiSBxf+SgUpF+w3R++LDtcld2VW+e8bSIQwICX/PfNNRUGQ619IY5Eu53mReGV+pojgiJqDiFtLVONFJMY0oToEWZrjdkoZVRuTBXMsGAgAOQCIcmexfqs2NuzFd6vlCyGP/Lwy8ZEbkkaK2QFoSkvInsnAfCCAKt35n/SBW5tQlhlw393lsX8lRNQSL+2jQa40So32IwCE/wt6wD+6FhZWP7BKI83phPqKqz7Z9+lmbfNQPq4wRtegwhYtQTeenN69rWwB1z+zap+gRT9odg3bZaP0Do7tsIiy0Bc0rieT0C7gMWIp57wtaXTcVirLCscztBvlOlI7ZemzNWFo//HQaHBCCR4Jk5wWjyVu5sKnAHwSlmQ8tpShd3s+RWfUr2YFlf8DNCThOYy4U5iw5/TJAw2WwlpQYDPGAZpXdWmAgtjTb04QfvWJL/RX73+2Cviv3YNqWnoUln+Ppw7qSXfOhRVmVAbYLzBjxg8A/KM3rA5pSBv3bV2+9DnQHqT4xx3g+elvVM4sOvnJnfETSNUjKRG3xAnsl4rzsOJgnEVh633IiYT6TMJHIJuKforsrljN4sttp4kIafrYT9zoHXfyJLsyNf6Uj0+OshTUHYs/Suucb+ZH+HAnd9SUodCXXZtInzeo6LEm68kptq+u9QiDCXt1TkredXyNLIO6vPCUftWciCgebZ8tZ0Do7bfK0DOT8YPFSQ2Vxtb58p4gpWXVYLCb2pZ61sMkvXiKsztCPCAEJ4OTsYmeqaf1Et4NzAI0zaSAy4N4NWQBt4RUdoNNCX/WQ9gXGljw2+sERTAnhl8NzLP0+CzbMYnd/ACtHHxG2CgzHNWs7dXarz1xYzdLbQRYAoNrWQPtPacsKxt5iiYiqoyIg5w5+zgQEoUWt6CQKv9SnxFVu/jQNGB6XNJSIEhL5Wl1JkOoMnBsfyuvT4fyIT1KBBA2DZTJW5z6wspBFiRuSlBMuA04tAInhzNAeajxpitzm0czJHC8V0bMwiU/sIoJeYJ1omraxgtak7bqo7jvcp9+oksAqsqYVosaX2Shn0BwQIsfCScwKc8T8yYU3doqobL8K74gIdATos5hAHXJ3hEpabgiqCF+C+ef39KnoFtOHyqmWOn6a"},{"functionCall":{"args":{"a":2,"b":3},"id":"75p2opbh","name":"multiply"}}],"role":"model"},{"parts":[{"functionResponse":{"id":"wxvlv0tv","name":"add","response":{"result":"5"}}},{"functionResponse":{"id":"75p2opbh","name":"multiply","response":{"result":"6"}}}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"systemInstruction":{"parts":[{"text":"You are a helpful assistant. CRITICAL: Always use both add and multiply at the same time ALWAYS."}],"role":"user"},"toolConfig":{"functionCallingConfig":{"mode":"AUTO"}},"tools":[{"functionDeclarations":[{"description":"Add two numbers","name":"add","parametersJsonSchema":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}},{"description":"Multiply two numbers","name":"multiply","parametersJsonSchema":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}}]}]} headers: Content-Type: - application/json diff --git a/providertests/testdata/TestGoogleCommon/gemini-3-pro-preview/multi_tool_streaming.yaml b/providertests/testdata/TestGoogleCommon/gemini-3-pro-preview/multi_tool_streaming.yaml index 6d4a01d06..12248edf7 100644 --- a/providertests/testdata/TestGoogleCommon/gemini-3-pro-preview/multi_tool_streaming.yaml +++ b/providertests/testdata/TestGoogleCommon/gemini-3-pro-preview/multi_tool_streaming.yaml @@ -6,10 +6,10 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 809 + content_length: 829 host: generativelanguage.googleapis.com body: | - {"contents":[{"parts":[{"text":"Add and multiply the number 2 and 3"}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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"}}]}]} + {"contents":[{"parts":[{"text":"Add and multiply the number 2 and 3"}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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","parametersJsonSchema":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}},{"description":"Multiply two numbers","name":"multiply","parametersJsonSchema":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}}]}]} form: alt: - sse @@ -38,10 +38,10 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 3500 + content_length: 3520 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":"8hd01vsf","name":"add"},"thoughtSignature":"EsINCr8NAb4+9vvezzPlSWg3IND7j7dwH2JkUoR3rZt+a6RbNB9nGqsoixREEMcXg9XqV/2dLCt2UmjxNbHLvxwsDEvXazz6l7i6AcQCIgYhkkgaVI9OP3jEIqjEMcI5pumbK72audtKnCk+OHxy8rMITAcb2miD7TAsrdznW8MwnXVFEQR2MTOFgBi5I/pZhHLS55NLZIxxm96DMqTlIYkPZhBW7ve0KYJ2647vtMwmdFgs7NlTd8Ki6Q+hN3HzmXcrGFyYYJinaIkrj6l+KuJSny2dNkmlwyudgsnxlTh5asBhZHgHfdkokdbzPUhhYb0H0x+10d2dFsGS4C/rlCHgVaUkmjtur5wb1e/dw5oN0pV4kZJYZzoA6GpVRxEiuRZfffyV4xSEmbq6peAU//BONMvvmxaq3YXjnZEq8FjPRJ/3OzYBdSWQas7jUqP7qNHeYU9rXcKvamXzjHC1raoXdnpsS/BSbZmNY0hhb3y+TAuCEqGzQ+XsmkRWHyBJIpFqxcPn+e/TdzibuLB7tnDsNvSFkQVDXpS3x7/6Q3eVNORtFJLaD45ZPqPNfyhvpMSA6RmibpcNMtDTmdlTHjWfoEMrU9RQ/+uuuO8qBCWbAksttyqH+DFqOTljhsnQH5834QchZXif5L/Nt2iMUPlqiy32ffYLNs0QwZrlIVCdzaqmarUHJY9SUucrrrqdd2Om2ufiBRvjPX5PRdPxBKB5/CotbLBVDG5gd9cz2VtZJI1IuFjUDaj2kf1FtwzV/QPEvAqKbxPbH7uhwH5Rk4iq0p6nOwi8WKkzCNhx00jyEP6x4V4oP4Z+xCIme8YMpt+E4pq3fUqmx568CTf4Be8nfWib2lk3GEKKESp+RhMaft/JLWZwKbzhRdEHGNOEZOfePDLQ3LE8jp+sPd4SAG8hkatM4/MpHuYfYPIQkOC3MHR28rik01sDsP7LThp0EhRjRemv0ByTZFmwiIJvytKVuU4MgkiXF2U0IJN+7Vu1E2fQy33LgYcwvyGY6ec/QaHYVvj6aDq/WKwLLEbg0fC/ZDfbpvQxWn97MhabO9kO2hsUKQttE0EMhhMkL8viuoUgppxET33UQ+GdQ09vBCAyiKJS3/61ReLoF1KUQy+otGwSuEfmUCc3c2FA8uUKV8v41eO9GWeKpKnq6EnMMwxkHeZPYxOrISWyQtfiK4Ex1DJ18Qi1HRAfTnXJVQ/O3lyVVmnm8XyVp6hxE30lskbPPfPITCPa0oGlJNz9COnHdG9P74TKWjXxAYU6m1e05SacApV2wu2vtsYB3QD93mFIt6ii5vOEhQTLJkoAM+x7tASsXmDvkY1/3n7kr/dIFh5+kgOCSPSRRaX2/WFDWlyTA+oDAyaHRZcuEORkfVVAuWNcRFQ8vE7Ue8RyHOWSpVIAQGa8IZ8aRyanYfHwStNOcFFiMjV4QF70cNUI4n73ZMrXk0q0H4BT4d4oZkH2tjZxR2QGAOSzHOBsQKouvbIQRlBfZEBgkzefCLV1vOk1FmcLwyEaR3uxupa74E0PpGBn1nPD1aa8cLB8PC0VmCvCZwwp5JnmgCeVb6GIseMxL7yUKWyfmHdXiHTBMtxzut6H0gv9/8TMGbS5CZDYOtf8D20tGANsLSWACkUm3WB3Y5K11FA5Hjzo4JzLM0dFLyjh+zQyKkA5NtCCYpoJG7/hwX1yJBCoRlh3P6/vwK74EtIrWSeuyOJFl28eXIUgih+HbNEdERI6Shzds23Lt6/g2qMY6CuuRHM8v+LheuJzV3Fn1SNIbVyPyJx8pX5C8pBk4gpoATa6Ie1zfNlzAxSCLdpucPus2ccukMX6tPrWCylOG9uSDCflkQ0ZDDbqdMWpbR4l/MVHlw7+55uz1s6+LJMhOB5dNQuoMdI+tivWFI83A6ptnRgodjMRdnye9dkjdJOzRfuJJW9yqeXRkyq8+jb4ed5QDh+e5m6roNfgMo5kt+Izg0SQ9BcsF2rX75RFzXfwYQiEN18gcmmfK3stctYwzI6Wufosj/VLeX0b+v8FsBBKQ5lADqxxp3UxV7u6k7YERXytKZTzPFfyOyQ+1dXHPAfbnX5BD+JkQoSdIAKATiZeOMJ8idzZ7dB3b2ebE4Sjv6UmRYgbTQw1/fm0CYyXfh6VbPfBRfTmFEpkK1qe2KHO3/NGmbK/O9pPttd+Wk1dEQu/7h4N3BZ2k++jTAUdSn2icSN72ZidXRp/XrP0+9mr/ZmOZj3wj1HtdSLZkHymmT3jaHV+1gG4zWEfeYihyLmhpQTBbvNvWGUv6IiNtiKuCcAYx08wVRSsh5EAHUw="},{"functionCall":{"args":{"a":2,"b":3},"id":"k0srpqrc","name":"multiply"}}],"role":"model"},{"parts":[{"functionResponse":{"id":"8hd01vsf","name":"add","response":{"result":"5"}}},{"functionResponse":{"id":"k0srpqrc","name":"multiply","response":{"result":"6"}}}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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"}}]}]} + {"contents":[{"parts":[{"text":"Add and multiply the number 2 and 3"}],"role":"user"},{"parts":[{"functionCall":{"args":{"a":2,"b":3},"id":"8hd01vsf","name":"add"},"thoughtSignature":"EsINCr8NAb4+9vvezzPlSWg3IND7j7dwH2JkUoR3rZt+a6RbNB9nGqsoixREEMcXg9XqV/2dLCt2UmjxNbHLvxwsDEvXazz6l7i6AcQCIgYhkkgaVI9OP3jEIqjEMcI5pumbK72audtKnCk+OHxy8rMITAcb2miD7TAsrdznW8MwnXVFEQR2MTOFgBi5I/pZhHLS55NLZIxxm96DMqTlIYkPZhBW7ve0KYJ2647vtMwmdFgs7NlTd8Ki6Q+hN3HzmXcrGFyYYJinaIkrj6l+KuJSny2dNkmlwyudgsnxlTh5asBhZHgHfdkokdbzPUhhYb0H0x+10d2dFsGS4C/rlCHgVaUkmjtur5wb1e/dw5oN0pV4kZJYZzoA6GpVRxEiuRZfffyV4xSEmbq6peAU//BONMvvmxaq3YXjnZEq8FjPRJ/3OzYBdSWQas7jUqP7qNHeYU9rXcKvamXzjHC1raoXdnpsS/BSbZmNY0hhb3y+TAuCEqGzQ+XsmkRWHyBJIpFqxcPn+e/TdzibuLB7tnDsNvSFkQVDXpS3x7/6Q3eVNORtFJLaD45ZPqPNfyhvpMSA6RmibpcNMtDTmdlTHjWfoEMrU9RQ/+uuuO8qBCWbAksttyqH+DFqOTljhsnQH5834QchZXif5L/Nt2iMUPlqiy32ffYLNs0QwZrlIVCdzaqmarUHJY9SUucrrrqdd2Om2ufiBRvjPX5PRdPxBKB5/CotbLBVDG5gd9cz2VtZJI1IuFjUDaj2kf1FtwzV/QPEvAqKbxPbH7uhwH5Rk4iq0p6nOwi8WKkzCNhx00jyEP6x4V4oP4Z+xCIme8YMpt+E4pq3fUqmx568CTf4Be8nfWib2lk3GEKKESp+RhMaft/JLWZwKbzhRdEHGNOEZOfePDLQ3LE8jp+sPd4SAG8hkatM4/MpHuYfYPIQkOC3MHR28rik01sDsP7LThp0EhRjRemv0ByTZFmwiIJvytKVuU4MgkiXF2U0IJN+7Vu1E2fQy33LgYcwvyGY6ec/QaHYVvj6aDq/WKwLLEbg0fC/ZDfbpvQxWn97MhabO9kO2hsUKQttE0EMhhMkL8viuoUgppxET33UQ+GdQ09vBCAyiKJS3/61ReLoF1KUQy+otGwSuEfmUCc3c2FA8uUKV8v41eO9GWeKpKnq6EnMMwxkHeZPYxOrISWyQtfiK4Ex1DJ18Qi1HRAfTnXJVQ/O3lyVVmnm8XyVp6hxE30lskbPPfPITCPa0oGlJNz9COnHdG9P74TKWjXxAYU6m1e05SacApV2wu2vtsYB3QD93mFIt6ii5vOEhQTLJkoAM+x7tASsXmDvkY1/3n7kr/dIFh5+kgOCSPSRRaX2/WFDWlyTA+oDAyaHRZcuEORkfVVAuWNcRFQ8vE7Ue8RyHOWSpVIAQGa8IZ8aRyanYfHwStNOcFFiMjV4QF70cNUI4n73ZMrXk0q0H4BT4d4oZkH2tjZxR2QGAOSzHOBsQKouvbIQRlBfZEBgkzefCLV1vOk1FmcLwyEaR3uxupa74E0PpGBn1nPD1aa8cLB8PC0VmCvCZwwp5JnmgCeVb6GIseMxL7yUKWyfmHdXiHTBMtxzut6H0gv9/8TMGbS5CZDYOtf8D20tGANsLSWACkUm3WB3Y5K11FA5Hjzo4JzLM0dFLyjh+zQyKkA5NtCCYpoJG7/hwX1yJBCoRlh3P6/vwK74EtIrWSeuyOJFl28eXIUgih+HbNEdERI6Shzds23Lt6/g2qMY6CuuRHM8v+LheuJzV3Fn1SNIbVyPyJx8pX5C8pBk4gpoATa6Ie1zfNlzAxSCLdpucPus2ccukMX6tPrWCylOG9uSDCflkQ0ZDDbqdMWpbR4l/MVHlw7+55uz1s6+LJMhOB5dNQuoMdI+tivWFI83A6ptnRgodjMRdnye9dkjdJOzRfuJJW9yqeXRkyq8+jb4ed5QDh+e5m6roNfgMo5kt+Izg0SQ9BcsF2rX75RFzXfwYQiEN18gcmmfK3stctYwzI6Wufosj/VLeX0b+v8FsBBKQ5lADqxxp3UxV7u6k7YERXytKZTzPFfyOyQ+1dXHPAfbnX5BD+JkQoSdIAKATiZeOMJ8idzZ7dB3b2ebE4Sjv6UmRYgbTQw1/fm0CYyXfh6VbPfBRfTmFEpkK1qe2KHO3/NGmbK/O9pPttd+Wk1dEQu/7h4N3BZ2k++jTAUdSn2icSN72ZidXRp/XrP0+9mr/ZmOZj3wj1HtdSLZkHymmT3jaHV+1gG4zWEfeYihyLmhpQTBbvNvWGUv6IiNtiKuCcAYx08wVRSsh5EAHUw="},{"functionCall":{"args":{"a":2,"b":3},"id":"k0srpqrc","name":"multiply"}}],"role":"model"},{"parts":[{"functionResponse":{"id":"8hd01vsf","name":"add","response":{"result":"5"}}},{"functionResponse":{"id":"k0srpqrc","name":"multiply","response":{"result":"6"}}}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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","parametersJsonSchema":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}},{"description":"Multiply two numbers","name":"multiply","parametersJsonSchema":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}}]}]} form: alt: - sse diff --git a/providertests/testdata/TestGoogleCommon/gemini-3-pro-preview/tool.yaml b/providertests/testdata/TestGoogleCommon/gemini-3-pro-preview/tool.yaml index 2d283e72a..3a3f16170 100644 --- a/providertests/testdata/TestGoogleCommon/gemini-3-pro-preview/tool.yaml +++ b/providertests/testdata/TestGoogleCommon/gemini-3-pro-preview/tool.yaml @@ -6,10 +6,10 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 509 + content_length: 519 host: generativelanguage.googleapis.com body: | - {"contents":[{"parts":[{"text":"What's the weather in Florence,Italy?"}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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"}}]}]} + {"contents":[{"parts":[{"text":"What's the weather in Florence,Italy?"}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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","parametersJsonSchema":{"properties":{"location":{"description":"the city","type":"string"}},"required":["location"],"type":"object"}}]}]} headers: Content-Type: - application/json @@ -74,10 +74,10 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 1363 + content_length: 1373 host: generativelanguage.googleapis.com body: | - {"contents":[{"parts":[{"text":"What's the weather in Florence,Italy?"}],"role":"user"},{"parts":[{"functionCall":{"args":{"location":"Florence, Italy"},"id":"1wzw08fx","name":"weather"},"thoughtSignature":"EsEDCr4DAb4+9vtz3Lzm1KWmbKIe3x782+ag2WCNmnSLpPZrRIxWHAZV7clKnfj/XCOx3/6hxfzPpeu8fM/k9PMVeCS+qF0rnhNdWxzGshYizYQ1ByccUYKPb92D5ETNs/1zE7HhARHHIlj4y5R+Rci/UOWvfP/Fd64/XhmIrn8SpuZb1tnRMc4o2O+4sxlcVvOIdr3gY5gOK8Y3bB2JpopWAXQX2+CixuAilzLnO5b05TTyaTIUxOEPmvp+AjYFyvVe32jDOsQMFrvFkaWvr6Ii6sKUGmUQ61hYe2j6XhrPT9tVGSDx47Krp9itMZ7jMT+LaCyClUYp7VXeXGVrKwN5/AcOt+4bR74ovt0DZRNIyRF3pZ2xUz7eJnecJYTX/pfrt7I2atVFEg+mgcXxZKeSbsi5XKbCzms0w6TsVG9GNNkqjQmTw0zIpWO5+fIKxhuJx6bGtuZVQTJx5JIa73qKhvhvOz2EMiw4kvuyZSrWd/Z78UB4Kw3C9GFuBpjbBRZMkw0Z18ho+QKNVoLMA962yx/6iHIlR0p0Kbrk58OPmit1NjY/rnb/6HU907ytDP+n4T/FkxIaL6GJWqdGbQSnKdU="}],"role":"model"},{"parts":[{"functionResponse":{"id":"1wzw08fx","name":"weather","response":{"result":"40 C"}}}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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"}}]}]} + {"contents":[{"parts":[{"text":"What's the weather in Florence,Italy?"}],"role":"user"},{"parts":[{"functionCall":{"args":{"location":"Florence, Italy"},"id":"1wzw08fx","name":"weather"},"thoughtSignature":"EsEDCr4DAb4+9vtz3Lzm1KWmbKIe3x782+ag2WCNmnSLpPZrRIxWHAZV7clKnfj/XCOx3/6hxfzPpeu8fM/k9PMVeCS+qF0rnhNdWxzGshYizYQ1ByccUYKPb92D5ETNs/1zE7HhARHHIlj4y5R+Rci/UOWvfP/Fd64/XhmIrn8SpuZb1tnRMc4o2O+4sxlcVvOIdr3gY5gOK8Y3bB2JpopWAXQX2+CixuAilzLnO5b05TTyaTIUxOEPmvp+AjYFyvVe32jDOsQMFrvFkaWvr6Ii6sKUGmUQ61hYe2j6XhrPT9tVGSDx47Krp9itMZ7jMT+LaCyClUYp7VXeXGVrKwN5/AcOt+4bR74ovt0DZRNIyRF3pZ2xUz7eJnecJYTX/pfrt7I2atVFEg+mgcXxZKeSbsi5XKbCzms0w6TsVG9GNNkqjQmTw0zIpWO5+fIKxhuJx6bGtuZVQTJx5JIa73qKhvhvOz2EMiw4kvuyZSrWd/Z78UB4Kw3C9GFuBpjbBRZMkw0Z18ho+QKNVoLMA962yx/6iHIlR0p0Kbrk58OPmit1NjY/rnb/6HU907ytDP+n4T/FkxIaL6GJWqdGbQSnKdU="}],"role":"model"},{"parts":[{"functionResponse":{"id":"1wzw08fx","name":"weather","response":{"result":"40 C"}}}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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","parametersJsonSchema":{"properties":{"location":{"description":"the city","type":"string"}},"required":["location"],"type":"object"}}]}]} headers: Content-Type: - application/json diff --git a/providertests/testdata/TestGoogleCommon/gemini-3-pro-preview/tool_streaming.yaml b/providertests/testdata/TestGoogleCommon/gemini-3-pro-preview/tool_streaming.yaml index e92ee6c93..634f11bfb 100644 --- a/providertests/testdata/TestGoogleCommon/gemini-3-pro-preview/tool_streaming.yaml +++ b/providertests/testdata/TestGoogleCommon/gemini-3-pro-preview/tool_streaming.yaml @@ -6,10 +6,10 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 509 + content_length: 519 host: generativelanguage.googleapis.com body: | - {"contents":[{"parts":[{"text":"What's the weather in Florence,Italy?"}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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"}}]}]} + {"contents":[{"parts":[{"text":"What's the weather in Florence,Italy?"}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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","parametersJsonSchema":{"properties":{"location":{"description":"the city","type":"string"}},"required":["location"],"type":"object"}}]}]} form: alt: - sse @@ -38,10 +38,10 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 1499 + content_length: 1509 host: generativelanguage.googleapis.com body: | - {"contents":[{"parts":[{"text":"What's the weather in Florence,Italy?"}],"role":"user"},{"parts":[{"functionCall":{"args":{"location":"Florence, Italy"},"id":"89nz05jy","name":"weather"},"thoughtSignature":"EqcECqQEAb4+9vvKtw3zAyNExHKmG2Of7hrIubjtkhvACUhm5FP+RwKuFg+kEH1/e8rjdRWUPmrq3PsPjXDaHyxK2nhCb+77GeZJ9oSgw0OjytDAqq4PEouW1k6uAhQRC0DJGxdEmxL0UGzoXHm5gXdNqMaL7ulgxudloi0YK/wAZGG50TZTwxPZt6hJMFmops6VHpKLTQoBq5EAvgtl4m//r+utqyrJ2VMRoNAbmyRoE8EIs8W8S8V4Zl3EAN3kmbIoeeTTO50lbQCALesYLt0iomEhGhAfMo1HK8cByvmB+oUt9IInUV5TlIUfoYw3taRax2ZzRuJUFsTNxPNzjvZr+Bk0YbWhGKt28vXXfQtlJmb8zwd2D5SSfIQiQEgnOLL+v0YkCFxXCdPQrtsaBykl8fWyvH8jSTckkg5+fTxz3hF7oZYNF7cmbceK8JLTcAliiFlcuLjpd55JBH7TvmlwDbGZ+d5Qv7lhQfdps1yUm02G8QIGyesjyALx0m4FN73+gAYc+NbiAqXDQ+23xkVjKIQD35QaYMN5VkfI9JBlnjrT9oMtFneJATc04NA7bSox3TACuLTLLeyDNIDJtz9Kadw8II0Qumn83+b6XUPG8YFm4E0PZ+wXwxijxFdy5F6/QzUczOKNCmV98C834x6zHRhP0Wj/0jGtaV2SCw7g5qw4zdDwrBcOUO3V3CFhcr6XTWJN+i6zbOljHagBPwODlnuLinvAr9U="}],"role":"model"},{"parts":[{"functionResponse":{"id":"89nz05jy","name":"weather","response":{"result":"40 C"}}}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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"}}]}]} + {"contents":[{"parts":[{"text":"What's the weather in Florence,Italy?"}],"role":"user"},{"parts":[{"functionCall":{"args":{"location":"Florence, Italy"},"id":"89nz05jy","name":"weather"},"thoughtSignature":"EqcECqQEAb4+9vvKtw3zAyNExHKmG2Of7hrIubjtkhvACUhm5FP+RwKuFg+kEH1/e8rjdRWUPmrq3PsPjXDaHyxK2nhCb+77GeZJ9oSgw0OjytDAqq4PEouW1k6uAhQRC0DJGxdEmxL0UGzoXHm5gXdNqMaL7ulgxudloi0YK/wAZGG50TZTwxPZt6hJMFmops6VHpKLTQoBq5EAvgtl4m//r+utqyrJ2VMRoNAbmyRoE8EIs8W8S8V4Zl3EAN3kmbIoeeTTO50lbQCALesYLt0iomEhGhAfMo1HK8cByvmB+oUt9IInUV5TlIUfoYw3taRax2ZzRuJUFsTNxPNzjvZr+Bk0YbWhGKt28vXXfQtlJmb8zwd2D5SSfIQiQEgnOLL+v0YkCFxXCdPQrtsaBykl8fWyvH8jSTckkg5+fTxz3hF7oZYNF7cmbceK8JLTcAliiFlcuLjpd55JBH7TvmlwDbGZ+d5Qv7lhQfdps1yUm02G8QIGyesjyALx0m4FN73+gAYc+NbiAqXDQ+23xkVjKIQD35QaYMN5VkfI9JBlnjrT9oMtFneJATc04NA7bSox3TACuLTLLeyDNIDJtz9Kadw8II0Qumn83+b6XUPG8YFm4E0PZ+wXwxijxFdy5F6/QzUczOKNCmV98C834x6zHRhP0Wj/0jGtaV2SCw7g5qw4zdDwrBcOUO3V3CFhcr6XTWJN+i6zbOljHagBPwODlnuLinvAr9U="}],"role":"model"},{"parts":[{"functionResponse":{"id":"89nz05jy","name":"weather","response":{"result":"40 C"}}}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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","parametersJsonSchema":{"properties":{"location":{"description":"the city","type":"string"}},"required":["location"],"type":"object"}}]}]} form: alt: - sse diff --git a/providertests/testdata/TestGoogleCommon/vertex-gemini-2-5-flash/multi_tool.yaml b/providertests/testdata/TestGoogleCommon/vertex-gemini-2-5-flash/multi_tool.yaml index a9dc94946..0eadbfa1b 100644 --- a/providertests/testdata/TestGoogleCommon/vertex-gemini-2-5-flash/multi_tool.yaml +++ b/providertests/testdata/TestGoogleCommon/vertex-gemini-2-5-flash/multi_tool.yaml @@ -6,10 +6,10 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 826 + content_length: 846 host: us-east5-aiplatform.googleapis.com body: | - {"contents":[{"parts":[{"text":"Add and multiply the number 2 and 3"}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"systemInstruction":{"parts":[{"text":"You are a helpful assistant. CRITICAL: Always use both add and multiply at the same time ALWAYS."}],"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"}}]}]} + {"contents":[{"parts":[{"text":"Add and multiply the number 2 and 3"}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"systemInstruction":{"parts":[{"text":"You are a helpful assistant. CRITICAL: Always use both add and multiply at the same time ALWAYS."}],"role":"user"},"toolConfig":{"functionCallingConfig":{"mode":"AUTO"}},"tools":[{"functionDeclarations":[{"description":"Add two numbers","name":"add","parametersJsonSchema":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}},{"description":"Multiply two numbers","name":"multiply","parametersJsonSchema":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}}]}]} headers: Content-Type: - application/json @@ -90,10 +90,10 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 1549 + content_length: 1569 host: us-east5-aiplatform.googleapis.com body: | - {"contents":[{"parts":[{"text":"Add and multiply the number 2 and 3"}],"role":"user"},{"parts":[{"functionCall":{"args":{"a":2,"b":3},"name":"add"},"thoughtSignature":"CpICAY89a1+Gm+gqy5KEfxpOLwsLfsZBhMovtwfzDW0gEBgOw+bpm9YTJExW/7mXnG4xCDgpd8nOmWA92HX3KWO9umiAKQc6u+TQRe7xqOvAyCdNFjxBVUbzVh8pRroWFnwr3ceqt4+4vMSONorj6Agki5CZ0wl3XHlgxr7kEAMiVuka9Mdi2dYSBB2zfaKSZMHznl8uetDyUXnGvZj4GWPHsayBrFUqYeDko8GyzlqfpN2ZB3SjqobwjWw6L3QpABB613LYDHy52QaSbX3AFyr0YEE38lujZXqDtUmEyRs9v3I7fJ6jsTDUH9tmQ7vdvpp/pNzsfE/qnEP8PF0cGnkQg04x4nOcpK1oGzzhrs6seGYDVQ=="},{"functionCall":{"args":{"a":2,"b":3},"name":"multiply"}}],"role":"model"},{"parts":[{"functionResponse":{"name":"add","response":{"result":"5"}}},{"functionResponse":{"name":"multiply","response":{"result":"6"}}}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"systemInstruction":{"parts":[{"text":"You are a helpful assistant. CRITICAL: Always use both add and multiply at the same time ALWAYS."}],"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"}}]}]} + {"contents":[{"parts":[{"text":"Add and multiply the number 2 and 3"}],"role":"user"},{"parts":[{"functionCall":{"args":{"a":2,"b":3},"name":"add"},"thoughtSignature":"CpICAY89a1+Gm+gqy5KEfxpOLwsLfsZBhMovtwfzDW0gEBgOw+bpm9YTJExW/7mXnG4xCDgpd8nOmWA92HX3KWO9umiAKQc6u+TQRe7xqOvAyCdNFjxBVUbzVh8pRroWFnwr3ceqt4+4vMSONorj6Agki5CZ0wl3XHlgxr7kEAMiVuka9Mdi2dYSBB2zfaKSZMHznl8uetDyUXnGvZj4GWPHsayBrFUqYeDko8GyzlqfpN2ZB3SjqobwjWw6L3QpABB613LYDHy52QaSbX3AFyr0YEE38lujZXqDtUmEyRs9v3I7fJ6jsTDUH9tmQ7vdvpp/pNzsfE/qnEP8PF0cGnkQg04x4nOcpK1oGzzhrs6seGYDVQ=="},{"functionCall":{"args":{"a":2,"b":3},"name":"multiply"}}],"role":"model"},{"parts":[{"functionResponse":{"name":"add","response":{"result":"5"}}},{"functionResponse":{"name":"multiply","response":{"result":"6"}}}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"systemInstruction":{"parts":[{"text":"You are a helpful assistant. CRITICAL: Always use both add and multiply at the same time ALWAYS."}],"role":"user"},"toolConfig":{"functionCallingConfig":{"mode":"AUTO"}},"tools":[{"functionDeclarations":[{"description":"Add two numbers","name":"add","parametersJsonSchema":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}},{"description":"Multiply two numbers","name":"multiply","parametersJsonSchema":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}}]}]} headers: Content-Type: - application/json diff --git a/providertests/testdata/TestGoogleCommon/vertex-gemini-2-5-flash/multi_tool_streaming.yaml b/providertests/testdata/TestGoogleCommon/vertex-gemini-2-5-flash/multi_tool_streaming.yaml index e3f389007..02146ff0d 100644 --- a/providertests/testdata/TestGoogleCommon/vertex-gemini-2-5-flash/multi_tool_streaming.yaml +++ b/providertests/testdata/TestGoogleCommon/vertex-gemini-2-5-flash/multi_tool_streaming.yaml @@ -6,10 +6,10 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 809 + content_length: 829 host: us-east5-aiplatform.googleapis.com body: | - {"contents":[{"parts":[{"text":"Add and multiply the number 2 and 3"}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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"}}]}]} + {"contents":[{"parts":[{"text":"Add and multiply the number 2 and 3"}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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","parametersJsonSchema":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}},{"description":"Multiply two numbers","name":"multiply","parametersJsonSchema":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}}]}]} form: alt: - sse @@ -38,10 +38,10 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 1580 + content_length: 1600 host: us-east5-aiplatform.googleapis.com body: | - {"contents":[{"parts":[{"text":"Add and multiply the number 2 and 3"}],"role":"user"},{"parts":[{"functionCall":{"args":{"a":2,"b":3},"name":"add"},"thoughtSignature":"Ci8Bjz1rXzqIUO4hDWx0cIAcS3Hli+/00t0xZ4R9333aTdPmmlba6GoelrnrKuw/5QpYAY89a1+iCNlnCLeZt0CFSSVel5kXqgPJj48xE+/YrJEhlVDNA03z0nIXONvDkvD+rzRU6eVqyqW/DXnkzlDMZfPtb+fkfZAbxATyw7AZKiLraxgziRvSgAp3AY89a19GL62f0CVqxq8XDq1IDLBlTjD225ayNTwB8S84TC6uBdF/KD8K9qz5o3Zcu8F4cqUuA0b8jvyuMrjS8Wyv5ZNuUgruWTbdjpuZV+JkjU74hDoom9EwIdI3A8AavPrGZiLXAdAkKQfAksXiEQOjlPiFwGYKNAGPPWtf/eKZatmuUApeWonkTgVe57SlMCNW/afNRK3Iw/inXuM2Y5IFJV0ogxj9SUEUsT0="},{"functionCall":{"args":{"a":2,"b":3},"name":"multiply"}}],"role":"model"},{"parts":[{"functionResponse":{"name":"add","response":{"result":"5"}}},{"functionResponse":{"name":"multiply","response":{"result":"6"}}}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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"}}]}]} + {"contents":[{"parts":[{"text":"Add and multiply the number 2 and 3"}],"role":"user"},{"parts":[{"functionCall":{"args":{"a":2,"b":3},"name":"add"},"thoughtSignature":"Ci8Bjz1rXzqIUO4hDWx0cIAcS3Hli+/00t0xZ4R9333aTdPmmlba6GoelrnrKuw/5QpYAY89a1+iCNlnCLeZt0CFSSVel5kXqgPJj48xE+/YrJEhlVDNA03z0nIXONvDkvD+rzRU6eVqyqW/DXnkzlDMZfPtb+fkfZAbxATyw7AZKiLraxgziRvSgAp3AY89a19GL62f0CVqxq8XDq1IDLBlTjD225ayNTwB8S84TC6uBdF/KD8K9qz5o3Zcu8F4cqUuA0b8jvyuMrjS8Wyv5ZNuUgruWTbdjpuZV+JkjU74hDoom9EwIdI3A8AavPrGZiLXAdAkKQfAksXiEQOjlPiFwGYKNAGPPWtf/eKZatmuUApeWonkTgVe57SlMCNW/afNRK3Iw/inXuM2Y5IFJV0ogxj9SUEUsT0="},{"functionCall":{"args":{"a":2,"b":3},"name":"multiply"}}],"role":"model"},{"parts":[{"functionResponse":{"name":"add","response":{"result":"5"}}},{"functionResponse":{"name":"multiply","response":{"result":"6"}}}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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","parametersJsonSchema":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}},{"description":"Multiply two numbers","name":"multiply","parametersJsonSchema":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}}]}]} form: alt: - sse diff --git a/providertests/testdata/TestGoogleCommon/vertex-gemini-2-5-flash/tool.yaml b/providertests/testdata/TestGoogleCommon/vertex-gemini-2-5-flash/tool.yaml index 8d8a42408..0e58e0004 100644 --- a/providertests/testdata/TestGoogleCommon/vertex-gemini-2-5-flash/tool.yaml +++ b/providertests/testdata/TestGoogleCommon/vertex-gemini-2-5-flash/tool.yaml @@ -6,10 +6,10 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 509 + content_length: 519 host: us-east5-aiplatform.googleapis.com body: | - {"contents":[{"parts":[{"text":"What's the weather in Florence,Italy?"}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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"}}]}]} + {"contents":[{"parts":[{"text":"What's the weather in Florence,Italy?"}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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","parametersJsonSchema":{"properties":{"location":{"description":"the city","type":"string"}},"required":["location"],"type":"object"}}]}]} headers: Content-Type: - application/json @@ -80,10 +80,10 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 1100 + content_length: 1110 host: us-east5-aiplatform.googleapis.com body: | - {"contents":[{"parts":[{"text":"What's the weather in Florence,Italy?"}],"role":"user"},{"parts":[{"functionCall":{"args":{"location":"Florence,Italy"},"name":"weather"},"thoughtSignature":"CogCAY89a18llPaHtTc0RYmJYfqVzv67knJ0LLYW0uvvORLIbJ1go3t6f8qRUiA9NNmQPcujynZUv2T+UE/FdtglMNc4+tdvkjKNGp3YGstAa8NRco+/eUOWLdiYI793P8hzr2XCRmu7kPt6nQiLOauQseZ7Ldf/eYAHVZRVYmO1GcMtQYIpUI2n6w5eO1HIDdkB74FgZujPNJHICHGMt7nuI1M1t2yNkLh1v12Iht1NJEhu1JdkCGXQtrE9P1k6B2qlVG0+IL7el9ZsQKMs7Z0Cjqx8nIkjJnMGoBP8MQbP+mHxyNs6ClqGxQcy4gCtktP0/BB2Kh2ebnQA8Nu+W3bzKZxlx+G2IfoK"}],"role":"model"},{"parts":[{"functionResponse":{"name":"weather","response":{"result":"40 C"}}}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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"}}]}]} + {"contents":[{"parts":[{"text":"What's the weather in Florence,Italy?"}],"role":"user"},{"parts":[{"functionCall":{"args":{"location":"Florence,Italy"},"name":"weather"},"thoughtSignature":"CogCAY89a18llPaHtTc0RYmJYfqVzv67knJ0LLYW0uvvORLIbJ1go3t6f8qRUiA9NNmQPcujynZUv2T+UE/FdtglMNc4+tdvkjKNGp3YGstAa8NRco+/eUOWLdiYI793P8hzr2XCRmu7kPt6nQiLOauQseZ7Ldf/eYAHVZRVYmO1GcMtQYIpUI2n6w5eO1HIDdkB74FgZujPNJHICHGMt7nuI1M1t2yNkLh1v12Iht1NJEhu1JdkCGXQtrE9P1k6B2qlVG0+IL7el9ZsQKMs7Z0Cjqx8nIkjJnMGoBP8MQbP+mHxyNs6ClqGxQcy4gCtktP0/BB2Kh2ebnQA8Nu+W3bzKZxlx+G2IfoK"}],"role":"model"},{"parts":[{"functionResponse":{"name":"weather","response":{"result":"40 C"}}}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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","parametersJsonSchema":{"properties":{"location":{"description":"the city","type":"string"}},"required":["location"],"type":"object"}}]}]} headers: Content-Type: - application/json diff --git a/providertests/testdata/TestGoogleCommon/vertex-gemini-2-5-flash/tool_streaming.yaml b/providertests/testdata/TestGoogleCommon/vertex-gemini-2-5-flash/tool_streaming.yaml index b5c4e8e8f..713790bc9 100644 --- a/providertests/testdata/TestGoogleCommon/vertex-gemini-2-5-flash/tool_streaming.yaml +++ b/providertests/testdata/TestGoogleCommon/vertex-gemini-2-5-flash/tool_streaming.yaml @@ -6,10 +6,10 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 509 + content_length: 519 host: us-east5-aiplatform.googleapis.com body: | - {"contents":[{"parts":[{"text":"What's the weather in Florence,Italy?"}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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"}}]}]} + {"contents":[{"parts":[{"text":"What's the weather in Florence,Italy?"}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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","parametersJsonSchema":{"properties":{"location":{"description":"the city","type":"string"}},"required":["location"],"type":"object"}}]}]} form: alt: - sse @@ -38,10 +38,10 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 1236 + content_length: 1246 host: us-east5-aiplatform.googleapis.com body: | - {"contents":[{"parts":[{"text":"What's the weather in Florence,Italy?"}],"role":"user"},{"parts":[{"functionCall":{"args":{"location":"Florence,Italy"},"name":"weather"},"thoughtSignature":"CiwBjz1rX5J0Jni1UwQkH3SeTysS4TF4kGuzSS99EDy6+inHVbJu1Xo0pYpXeQprAY89a18NHhloDuIj0yld57PAo2oNpG6rOh/35G9rcOwGsXkiTJHGjRY2kvEit3Re266ZMK2YpihBVAkZllpxOWlb/QZN7Cial15OT3HGih3VCgpPirbUHnr1W3xjYncuUEWiboS9GunS2foKegGPPWtfqxLOOBCOHYMB1vAbHSWDwTHtlQmKO8gOjjB+E7rIAvoI5c/zje1zY9TIePouZwvtbh4hW0W0RkY1X0JqcVVCsdoxAa177NpMX32OsBI4ADKGIJWKfyUxHqYVTWqRPQCUm+vMMcCBkhEpQl1e4h+elfClBEXzClYBjz1rX3o0PFc+JJWTsLa7RFOQY12RaETWEvaTPmkUSJjWK0s+pMC6adOFzZMC/3NY4wPGdqSA/P5xnES40TQMQNvL9zL7G8O1sU6LExlHc9wVoyeOcw=="}],"role":"model"},{"parts":[{"functionResponse":{"name":"weather","response":{"result":"40 C"}}}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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"}}]}]} + {"contents":[{"parts":[{"text":"What's the weather in Florence,Italy?"}],"role":"user"},{"parts":[{"functionCall":{"args":{"location":"Florence,Italy"},"name":"weather"},"thoughtSignature":"CiwBjz1rX5J0Jni1UwQkH3SeTysS4TF4kGuzSS99EDy6+inHVbJu1Xo0pYpXeQprAY89a18NHhloDuIj0yld57PAo2oNpG6rOh/35G9rcOwGsXkiTJHGjRY2kvEit3Re266ZMK2YpihBVAkZllpxOWlb/QZN7Cial15OT3HGih3VCgpPirbUHnr1W3xjYncuUEWiboS9GunS2foKegGPPWtfqxLOOBCOHYMB1vAbHSWDwTHtlQmKO8gOjjB+E7rIAvoI5c/zje1zY9TIePouZwvtbh4hW0W0RkY1X0JqcVVCsdoxAa177NpMX32OsBI4ADKGIJWKfyUxHqYVTWqRPQCUm+vMMcCBkhEpQl1e4h+elfClBEXzClYBjz1rX3o0PFc+JJWTsLa7RFOQY12RaETWEvaTPmkUSJjWK0s+pMC6adOFzZMC/3NY4wPGdqSA/P5xnES40TQMQNvL9zL7G8O1sU6LExlHc9wVoyeOcw=="}],"role":"model"},{"parts":[{"functionResponse":{"name":"weather","response":{"result":"40 C"}}}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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","parametersJsonSchema":{"properties":{"location":{"description":"the city","type":"string"}},"required":["location"],"type":"object"}}]}]} form: alt: - sse diff --git a/providertests/testdata/TestGoogleCommon/vertex-gemini-2-5-pro/multi_tool.yaml b/providertests/testdata/TestGoogleCommon/vertex-gemini-2-5-pro/multi_tool.yaml index e07beedd9..405575587 100644 --- a/providertests/testdata/TestGoogleCommon/vertex-gemini-2-5-pro/multi_tool.yaml +++ b/providertests/testdata/TestGoogleCommon/vertex-gemini-2-5-pro/multi_tool.yaml @@ -6,10 +6,10 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 826 + content_length: 846 host: us-east5-aiplatform.googleapis.com body: | - {"contents":[{"parts":[{"text":"Add and multiply the number 2 and 3"}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"systemInstruction":{"parts":[{"text":"You are a helpful assistant. CRITICAL: Always use both add and multiply at the same time ALWAYS."}],"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"}}]}]} + {"contents":[{"parts":[{"text":"Add and multiply the number 2 and 3"}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"systemInstruction":{"parts":[{"text":"You are a helpful assistant. CRITICAL: Always use both add and multiply at the same time ALWAYS."}],"role":"user"},"toolConfig":{"functionCallingConfig":{"mode":"AUTO"}},"tools":[{"functionDeclarations":[{"description":"Add two numbers","name":"add","parametersJsonSchema":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}},{"description":"Multiply two numbers","name":"multiply","parametersJsonSchema":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}}]}]} headers: Content-Type: - application/json @@ -90,10 +90,10 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 1541 + content_length: 1561 host: us-east5-aiplatform.googleapis.com body: | - {"contents":[{"parts":[{"text":"Add and multiply the number 2 and 3"}],"role":"user"},{"parts":[{"functionCall":{"args":{"a":2,"b":3},"name":"add"},"thoughtSignature":"CowCAY89a1/vAaqniXrmhElp8qu3tCETdO3UfyX6GAedsXE7vdfpKTvda4xMGK9wFBEmw0aN24fmJRBi5AmBiHSc9Vo9JMEjyusxOednzWJCXbVjmyyz2e7L8Y2XN4azmNC2YVxOIP00SBFByCBSz2Ev1cqQY1UYl+u9mtAC5PvlPx6gOTGFZdnN+0C8j9DkPpTgPqE4M/tD0NVZU7kVLk25+Bz+WvGUAhdstMDl2LZQ3NiTyeMr+QUu/e5BB8ePV/BbKIlMbQFOwKPmna4kOCaQPO31HfWGA0tJ2ZT4SyQEYj7vLrgQ4TyTfBG/NPFT7Ud37LZpSFY29312jvmR3aArX4nztAlsG6hpoAGFRg=="},{"functionCall":{"args":{"a":2,"b":3},"name":"multiply"}}],"role":"model"},{"parts":[{"functionResponse":{"name":"add","response":{"result":"5"}}},{"functionResponse":{"name":"multiply","response":{"result":"6"}}}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"systemInstruction":{"parts":[{"text":"You are a helpful assistant. CRITICAL: Always use both add and multiply at the same time ALWAYS."}],"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"}}]}]} + {"contents":[{"parts":[{"text":"Add and multiply the number 2 and 3"}],"role":"user"},{"parts":[{"functionCall":{"args":{"a":2,"b":3},"name":"add"},"thoughtSignature":"CowCAY89a1/vAaqniXrmhElp8qu3tCETdO3UfyX6GAedsXE7vdfpKTvda4xMGK9wFBEmw0aN24fmJRBi5AmBiHSc9Vo9JMEjyusxOednzWJCXbVjmyyz2e7L8Y2XN4azmNC2YVxOIP00SBFByCBSz2Ev1cqQY1UYl+u9mtAC5PvlPx6gOTGFZdnN+0C8j9DkPpTgPqE4M/tD0NVZU7kVLk25+Bz+WvGUAhdstMDl2LZQ3NiTyeMr+QUu/e5BB8ePV/BbKIlMbQFOwKPmna4kOCaQPO31HfWGA0tJ2ZT4SyQEYj7vLrgQ4TyTfBG/NPFT7Ud37LZpSFY29312jvmR3aArX4nztAlsG6hpoAGFRg=="},{"functionCall":{"args":{"a":2,"b":3},"name":"multiply"}}],"role":"model"},{"parts":[{"functionResponse":{"name":"add","response":{"result":"5"}}},{"functionResponse":{"name":"multiply","response":{"result":"6"}}}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"systemInstruction":{"parts":[{"text":"You are a helpful assistant. CRITICAL: Always use both add and multiply at the same time ALWAYS."}],"role":"user"},"toolConfig":{"functionCallingConfig":{"mode":"AUTO"}},"tools":[{"functionDeclarations":[{"description":"Add two numbers","name":"add","parametersJsonSchema":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}},{"description":"Multiply two numbers","name":"multiply","parametersJsonSchema":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}}]}]} headers: Content-Type: - application/json diff --git a/providertests/testdata/TestGoogleCommon/vertex-gemini-2-5-pro/multi_tool_streaming.yaml b/providertests/testdata/TestGoogleCommon/vertex-gemini-2-5-pro/multi_tool_streaming.yaml index bc288f712..9b074a729 100644 --- a/providertests/testdata/TestGoogleCommon/vertex-gemini-2-5-pro/multi_tool_streaming.yaml +++ b/providertests/testdata/TestGoogleCommon/vertex-gemini-2-5-pro/multi_tool_streaming.yaml @@ -6,10 +6,10 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 809 + content_length: 829 host: us-east5-aiplatform.googleapis.com body: | - {"contents":[{"parts":[{"text":"Add and multiply the number 2 and 3"}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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"}}]}]} + {"contents":[{"parts":[{"text":"Add and multiply the number 2 and 3"}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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","parametersJsonSchema":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}},{"description":"Multiply two numbers","name":"multiply","parametersJsonSchema":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}}]}]} form: alt: - sse @@ -38,10 +38,10 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 1704 + content_length: 1724 host: us-east5-aiplatform.googleapis.com body: | - {"contents":[{"parts":[{"text":"Add and multiply the number 2 and 3"}],"role":"user"},{"parts":[{"functionCall":{"args":{"a":2,"b":3},"name":"add"},"thoughtSignature":"CiQBjz1rX9vXzx2kuVvHI7K1og7PRomR1HnReMQI5SRJMSPzcAIKXgGPPWtfnWtXrgO5+AzYP5pnrCj2zZQuYQN0+s8HD4ukcOblaIEB1+ol370baALNpJqz131WB7VTe7FEKvlvrDglcKIAp9nu+AFphYHm4M1jyYxVoWtN2SmsDrBzWbgKZwGPPWtfbCiEax2Ys/D5UxclK7OD6tuXVaguLSieWuIZbMLU1yx9Q1Z611Uf6Gw/IQHGuYR/muyUGA74rs7AXi+cJ38x7djHGaQR3AOaLOotrGqyGbtbrGu6hCqf1Acp/jDPLdMhnukKdgGPPWtfw7FXMbV6/HUhP8gPUid+InjyPPe7Y6yxaPYEt13mNS8LGh85JJrF6v6LyW8QlR+EnGoQxHWJzAKo1Da46RmjiSqftdKOWWFux+S5eULdHwSSp+YsdgMcEmp1I/HeqT13UiOLtlRHj3iXGAZWshN5rjwKLwGPPWtfCFqQYyE6rXmQXNrcKMx4VdDSMTkXfdt7Cz4P6h75QRfLYlBcupiVk7GR"},{"functionCall":{"args":{"a":2,"b":3},"name":"multiply"}}],"role":"model"},{"parts":[{"functionResponse":{"name":"add","response":{"result":"5"}}},{"functionResponse":{"name":"multiply","response":{"result":"6"}}}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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"}}]}]} + {"contents":[{"parts":[{"text":"Add and multiply the number 2 and 3"}],"role":"user"},{"parts":[{"functionCall":{"args":{"a":2,"b":3},"name":"add"},"thoughtSignature":"CiQBjz1rX9vXzx2kuVvHI7K1og7PRomR1HnReMQI5SRJMSPzcAIKXgGPPWtfnWtXrgO5+AzYP5pnrCj2zZQuYQN0+s8HD4ukcOblaIEB1+ol370baALNpJqz131WB7VTe7FEKvlvrDglcKIAp9nu+AFphYHm4M1jyYxVoWtN2SmsDrBzWbgKZwGPPWtfbCiEax2Ys/D5UxclK7OD6tuXVaguLSieWuIZbMLU1yx9Q1Z611Uf6Gw/IQHGuYR/muyUGA74rs7AXi+cJ38x7djHGaQR3AOaLOotrGqyGbtbrGu6hCqf1Acp/jDPLdMhnukKdgGPPWtfw7FXMbV6/HUhP8gPUid+InjyPPe7Y6yxaPYEt13mNS8LGh85JJrF6v6LyW8QlR+EnGoQxHWJzAKo1Da46RmjiSqftdKOWWFux+S5eULdHwSSp+YsdgMcEmp1I/HeqT13UiOLtlRHj3iXGAZWshN5rjwKLwGPPWtfCFqQYyE6rXmQXNrcKMx4VdDSMTkXfdt7Cz4P6h75QRfLYlBcupiVk7GR"},{"functionCall":{"args":{"a":2,"b":3},"name":"multiply"}}],"role":"model"},{"parts":[{"functionResponse":{"name":"add","response":{"result":"5"}}},{"functionResponse":{"name":"multiply","response":{"result":"6"}}}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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","parametersJsonSchema":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}},{"description":"Multiply two numbers","name":"multiply","parametersJsonSchema":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}}]}]} form: alt: - sse diff --git a/providertests/testdata/TestGoogleCommon/vertex-gemini-2-5-pro/tool.yaml b/providertests/testdata/TestGoogleCommon/vertex-gemini-2-5-pro/tool.yaml index 65e92953a..fd9452752 100644 --- a/providertests/testdata/TestGoogleCommon/vertex-gemini-2-5-pro/tool.yaml +++ b/providertests/testdata/TestGoogleCommon/vertex-gemini-2-5-pro/tool.yaml @@ -6,10 +6,10 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 509 + content_length: 519 host: us-east5-aiplatform.googleapis.com body: | - {"contents":[{"parts":[{"text":"What's the weather in Florence,Italy?"}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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"}}]}]} + {"contents":[{"parts":[{"text":"What's the weather in Florence,Italy?"}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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","parametersJsonSchema":{"properties":{"location":{"description":"the city","type":"string"}},"required":["location"],"type":"object"}}]}]} headers: Content-Type: - application/json @@ -80,10 +80,10 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 1445 + content_length: 1455 host: us-east5-aiplatform.googleapis.com body: | - {"contents":[{"parts":[{"text":"What's the weather in Florence,Italy?"}],"role":"user"},{"parts":[{"functionCall":{"args":{"location":"Florence, Italy"},"name":"weather"},"thoughtSignature":"CogEAY89a18AxcmSDT2p07Co1JRtGBB7Agd75Vj9UZkgbukirUDDeNDjpGrNB9hCvNnkXEp6Cmi1w/XoCg9ucdiWUcB3XBygzRsHEopx6+pLGO7QPFK8N+js2l+iH2YF6xjA9nTI7CAhtMS78tEdlMykkwe4tU6e1wyEDmRLYwema/Q9oaV6ziqkbYOKPix6IjZhgkJSz0rmwMXN1S1whHKC4Qd7IhOodVIp7TaNzLAxMAij6EkusUjLsCYMpuDm2NvdjlwQWsYjiZSYRDU5KNWuc6P+RgrozZj4n3bLp9g29QzPAd2qnJW8CjMsGBDVx0bTzfy2EdMkX5P0ZZre1EvkOyMTA64hDz1o4wChM6BcMKBMgs2z5Hl/yRN4eAjrC4NO/MM57kS1Lg836onZVfE5Te8vn9W0nv4M+o0NnF79xeeIXVdg9csNnfrhxlFFU300fgAk+EEQ4keVn/r4EdSsaUqdV/WUMr3GS2sbQZvP6PNJuOoc0lmLrJVpy6BEdlrofphYcFlOObgkUeYw6x9/u6zRke7PQbOiU/w2D41e0AIhrnItM3gvrQnFmjjJhj2J8aV+/MD7Vxc0OY+2DcJMhty3VUGgTvhUkTJ5gu65/waRYZcQI53hejjnmAjrmKPJzfbypYf8LLZGmNHbP88nXoEPxdL28k/2AmXq/hg7bIisyk2Q+POUhQ=="}],"role":"model"},{"parts":[{"functionResponse":{"name":"weather","response":{"result":"40 C"}}}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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"}}]}]} + {"contents":[{"parts":[{"text":"What's the weather in Florence,Italy?"}],"role":"user"},{"parts":[{"functionCall":{"args":{"location":"Florence, Italy"},"name":"weather"},"thoughtSignature":"CogEAY89a18AxcmSDT2p07Co1JRtGBB7Agd75Vj9UZkgbukirUDDeNDjpGrNB9hCvNnkXEp6Cmi1w/XoCg9ucdiWUcB3XBygzRsHEopx6+pLGO7QPFK8N+js2l+iH2YF6xjA9nTI7CAhtMS78tEdlMykkwe4tU6e1wyEDmRLYwema/Q9oaV6ziqkbYOKPix6IjZhgkJSz0rmwMXN1S1whHKC4Qd7IhOodVIp7TaNzLAxMAij6EkusUjLsCYMpuDm2NvdjlwQWsYjiZSYRDU5KNWuc6P+RgrozZj4n3bLp9g29QzPAd2qnJW8CjMsGBDVx0bTzfy2EdMkX5P0ZZre1EvkOyMTA64hDz1o4wChM6BcMKBMgs2z5Hl/yRN4eAjrC4NO/MM57kS1Lg836onZVfE5Te8vn9W0nv4M+o0NnF79xeeIXVdg9csNnfrhxlFFU300fgAk+EEQ4keVn/r4EdSsaUqdV/WUMr3GS2sbQZvP6PNJuOoc0lmLrJVpy6BEdlrofphYcFlOObgkUeYw6x9/u6zRke7PQbOiU/w2D41e0AIhrnItM3gvrQnFmjjJhj2J8aV+/MD7Vxc0OY+2DcJMhty3VUGgTvhUkTJ5gu65/waRYZcQI53hejjnmAjrmKPJzfbypYf8LLZGmNHbP88nXoEPxdL28k/2AmXq/hg7bIisyk2Q+POUhQ=="}],"role":"model"},{"parts":[{"functionResponse":{"name":"weather","response":{"result":"40 C"}}}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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","parametersJsonSchema":{"properties":{"location":{"description":"the city","type":"string"}},"required":["location"],"type":"object"}}]}]} headers: Content-Type: - application/json diff --git a/providertests/testdata/TestGoogleCommon/vertex-gemini-2-5-pro/tool_streaming.yaml b/providertests/testdata/TestGoogleCommon/vertex-gemini-2-5-pro/tool_streaming.yaml index 29fdf67e6..b70fb5389 100644 --- a/providertests/testdata/TestGoogleCommon/vertex-gemini-2-5-pro/tool_streaming.yaml +++ b/providertests/testdata/TestGoogleCommon/vertex-gemini-2-5-pro/tool_streaming.yaml @@ -6,10 +6,10 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 509 + content_length: 519 host: us-east5-aiplatform.googleapis.com body: | - {"contents":[{"parts":[{"text":"What's the weather in Florence,Italy?"}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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"}}]}]} + {"contents":[{"parts":[{"text":"What's the weather in Florence,Italy?"}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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","parametersJsonSchema":{"properties":{"location":{"description":"the city","type":"string"}},"required":["location"],"type":"object"}}]}]} form: alt: - sse @@ -38,10 +38,10 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 1677 + content_length: 1687 host: us-east5-aiplatform.googleapis.com body: | - {"contents":[{"parts":[{"text":"What's the weather in Florence,Italy?"}],"role":"user"},{"parts":[{"functionCall":{"args":{"location":"Florence, Italy"},"name":"weather"},"thoughtSignature":"CiIBjz1rXyc3Jt0wjS9Mp9TZrLGwfhh2I4z86q6IZHflISCYCmcBjz1rXx+KC1eUkDiRSogUY8M9UnL2bbN9IL9BFB99rjNJ8jKqVtrTC5SncrQnBBqYo8EuWgvrv1+5FSI9Cr2nhvTwyyTpoiqxks9Xz4OTzqCTha5hpdTkLT846P9pER0Xf5aVPOXtCmEBjz1rXwxN0lNIdN5KMrHQmICcs0vijgyfM9OW6oEZIVB3mMx8vGktc9TmDsrA2+CwjcR2l49yFw35r7XPxk/Ng0DRvD3DxUrB/okaGO/ZD4hxM3c2OrFup+zFvfHd/XCcCqcBAY89a1+CIQmUJvHDk2M4F+N7Fs0l3b3lZ9iWGGM/co8kDRr54mxTDiyfwqQ8aDUwwh9glTbmvAjoUvkf8UTN22Bhvv7wdSD31CCBpIsxs6Cdio0H3rP926aZqJBVDKDok8lxfUmDZeJjnQ0o2aIHJefPfibnqzcUhEisidSiOB6ykdSnJUc1wrCqntx0g9UTuF1+rqGk2kDQMiw7OYBl9tdBdtdJerYKqAEBjz1rX+ztDgupxPgCbZALhEbGh9rxJf+DYlYGm5Me0BtIKtOzaol4Mhmn/TeoFz+uzJuK70YK5HFCj82q2aEDNza9W5jO7aYoceFhS4YCyNFTMRIg6IEWVJxS3sUe78ELLsDtGz4/wwwmz5R7ewdNgAY3++XEMwWmNcur6M+kJo8A0Rdd05lcqI9x7bIeHK26JSFNKP0q92ueLb+nFwHj6tv0wWQixz0KdAGPPWtfJWCT44joV6wQkimuxiqvNYu/QESgs3eTypb23NNIgfv49xVM0VW7RHiqw/OXFXtxl5V9VST5DCLK8ShuRYYGDvCVtsGhK75pwJqLWMG/B781gSh9LChcF/n74RT6e21GTFtKGvMGywQTkZrYJVEe"}],"role":"model"},{"parts":[{"functionResponse":{"name":"weather","response":{"result":"40 C"}}}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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"}}]}]} + {"contents":[{"parts":[{"text":"What's the weather in Florence,Italy?"}],"role":"user"},{"parts":[{"functionCall":{"args":{"location":"Florence, Italy"},"name":"weather"},"thoughtSignature":"CiIBjz1rXyc3Jt0wjS9Mp9TZrLGwfhh2I4z86q6IZHflISCYCmcBjz1rXx+KC1eUkDiRSogUY8M9UnL2bbN9IL9BFB99rjNJ8jKqVtrTC5SncrQnBBqYo8EuWgvrv1+5FSI9Cr2nhvTwyyTpoiqxks9Xz4OTzqCTha5hpdTkLT846P9pER0Xf5aVPOXtCmEBjz1rXwxN0lNIdN5KMrHQmICcs0vijgyfM9OW6oEZIVB3mMx8vGktc9TmDsrA2+CwjcR2l49yFw35r7XPxk/Ng0DRvD3DxUrB/okaGO/ZD4hxM3c2OrFup+zFvfHd/XCcCqcBAY89a1+CIQmUJvHDk2M4F+N7Fs0l3b3lZ9iWGGM/co8kDRr54mxTDiyfwqQ8aDUwwh9glTbmvAjoUvkf8UTN22Bhvv7wdSD31CCBpIsxs6Cdio0H3rP926aZqJBVDKDok8lxfUmDZeJjnQ0o2aIHJefPfibnqzcUhEisidSiOB6ykdSnJUc1wrCqntx0g9UTuF1+rqGk2kDQMiw7OYBl9tdBdtdJerYKqAEBjz1rX+ztDgupxPgCbZALhEbGh9rxJf+DYlYGm5Me0BtIKtOzaol4Mhmn/TeoFz+uzJuK70YK5HFCj82q2aEDNza9W5jO7aYoceFhS4YCyNFTMRIg6IEWVJxS3sUe78ELLsDtGz4/wwwmz5R7ewdNgAY3++XEMwWmNcur6M+kJo8A0Rdd05lcqI9x7bIeHK26JSFNKP0q92ueLb+nFwHj6tv0wWQixz0KdAGPPWtfJWCT44joV6wQkimuxiqvNYu/QESgs3eTypb23NNIgfv49xVM0VW7RHiqw/OXFXtxl5V9VST5DCLK8ShuRYYGDvCVtsGhK75pwJqLWMG/B781gSh9LChcF/n74RT6e21GTFtKGvMGywQTkZrYJVEe"}],"role":"model"},{"parts":[{"functionResponse":{"name":"weather","response":{"result":"40 C"}}}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"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","parametersJsonSchema":{"properties":{"location":{"description":"the city","type":"string"}},"required":["location"],"type":"object"}}]}]} form: alt: - sse diff --git a/providertests/testdata/TestGoogleThinking/gemini-2.5-flash/thinking-streaming.yaml b/providertests/testdata/TestGoogleThinking/gemini-2.5-flash/thinking-streaming.yaml index 53fbca7ea..b2010a727 100644 --- a/providertests/testdata/TestGoogleThinking/gemini-2.5-flash/thinking-streaming.yaml +++ b/providertests/testdata/TestGoogleThinking/gemini-2.5-flash/thinking-streaming.yaml @@ -6,10 +6,10 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 550 + content_length: 560 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"}}]}]} + {"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","parametersJsonSchema":{"properties":{"location":{"description":"the city","type":"string"}},"required":["location"],"type":"object"}}]}]} form: alt: - sse @@ -38,10 +38,10 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 1294 + content_length: 1304 host: generativelanguage.googleapis.com body: | - {"contents":[{"parts":[{"text":"What's the weather in Florence, Italy?"}],"role":"user"},{"parts":[{"functionCall":{"args":{"location":"Florence, Italy"},"id":"1","name":"weather"},"thoughtSignature":"CiQBvj72+y6VX8BA4jMLQJOJvw+XWxadOcgaygxn/UK4Wl8SjCEKZwG+Pvb7Gfy4jPaJj0DRut6taEkNdtSZxSjfNWcnSzfOegiWPYt8ESlIwsYXa0gyK1qw8k77vXOl1efSI2IaZ+csWYLR8nNVHPDSuqIrYpqDOw2HolANfK3RhfSH7gj8KhfU/7/5MT4K6gEBvj72+0BHGlipqElObHh6c5pjNlcuG2Y10iFyHng/Gizmu18FkezguXlmR/smf3nQOuUv7wC4cOvxliBYuSEJIEOSbw5RaEFVjvwbHlOgr7Jfq0ltXOsBmpey/NK+VlQ9UMuPqwyTwlzA6qW+SGwQ4VSTQUZDzmWCJ24MHxcPoMIfeiGMsOsf3jrqLONcBrxw8YeszxFuXFg95qYOVag3Sg4WMgLq4t1e7xorL2bnCcu+faOuV2Z30nVhogr3JcBMiXhXClKxIrbFr3bUyCYlL8H3h5tg10v9a5Zca0HJki7AXxFGMI+lgsc="}],"role":"model"},{"parts":[{"functionResponse":{"id":"1","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"}}]}]} + {"contents":[{"parts":[{"text":"What's the weather in Florence, Italy?"}],"role":"user"},{"parts":[{"functionCall":{"args":{"location":"Florence, Italy"},"id":"1","name":"weather"},"thoughtSignature":"CiQBvj72+y6VX8BA4jMLQJOJvw+XWxadOcgaygxn/UK4Wl8SjCEKZwG+Pvb7Gfy4jPaJj0DRut6taEkNdtSZxSjfNWcnSzfOegiWPYt8ESlIwsYXa0gyK1qw8k77vXOl1efSI2IaZ+csWYLR8nNVHPDSuqIrYpqDOw2HolANfK3RhfSH7gj8KhfU/7/5MT4K6gEBvj72+0BHGlipqElObHh6c5pjNlcuG2Y10iFyHng/Gizmu18FkezguXlmR/smf3nQOuUv7wC4cOvxliBYuSEJIEOSbw5RaEFVjvwbHlOgr7Jfq0ltXOsBmpey/NK+VlQ9UMuPqwyTwlzA6qW+SGwQ4VSTQUZDzmWCJ24MHxcPoMIfeiGMsOsf3jrqLONcBrxw8YeszxFuXFg95qYOVag3Sg4WMgLq4t1e7xorL2bnCcu+faOuV2Z30nVhogr3JcBMiXhXClKxIrbFr3bUyCYlL8H3h5tg10v9a5Zca0HJki7AXxFGMI+lgsc="}],"role":"model"},{"parts":[{"functionResponse":{"id":"1","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","parametersJsonSchema":{"properties":{"location":{"description":"the city","type":"string"}},"required":["location"],"type":"object"}}]}]} form: alt: - sse diff --git a/providertests/testdata/TestGoogleThinking/gemini-2.5-flash/thinking.yaml b/providertests/testdata/TestGoogleThinking/gemini-2.5-flash/thinking.yaml index e37362faf..4ed0178e9 100644 --- a/providertests/testdata/TestGoogleThinking/gemini-2.5-flash/thinking.yaml +++ b/providertests/testdata/TestGoogleThinking/gemini-2.5-flash/thinking.yaml @@ -6,10 +6,10 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 550 + content_length: 560 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"}}]}]} + {"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","parametersJsonSchema":{"properties":{"location":{"description":"the city","type":"string"}},"required":["location"],"type":"object"}}]}]} headers: Content-Type: - application/json @@ -77,10 +77,10 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 1158 + content_length: 1168 host: generativelanguage.googleapis.com body: | - {"contents":[{"parts":[{"text":"What's the weather in Florence, Italy?"}],"role":"user"},{"parts":[{"functionCall":{"args":{"location":"Florence, Italy"},"id":"1","name":"weather"},"thoughtSignature":"CpQCAb4+9vsbZAixhGYxpv51LxQIXKkJ+wpEeroKwwT6flW1iLgNdkBBOXX3t0H7yY9uz1YQc/so1trK7GBhsYR0TAaVbP95Jg3a1D/XMGdR5hUvISOXptRjgpO7ieKQW4k9jpEe9+f1OrZTYKA8CZisCmn3xWBLBh+DrUJSP2rT521soXu/d7KG0aA7LIw+Bz61786v/8Ih7YWukxvIC/nli1aTivHN3Pw3pnNW5d35/5OSMA0rXlYf/ioz9+Y/jM6t1kD6HJCz6RFg2+Sck8wNNhCcL6+3dVWqnl1O8CbyT8RYL7ZFCGNWu1dpmuosLcEIvYk4zKRteCer9WaZ6CDIE4M1jcYd87H1veEsLqtV55Fyv/MY"}],"role":"model"},{"parts":[{"functionResponse":{"id":"1","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"}}]}]} + {"contents":[{"parts":[{"text":"What's the weather in Florence, Italy?"}],"role":"user"},{"parts":[{"functionCall":{"args":{"location":"Florence, Italy"},"id":"1","name":"weather"},"thoughtSignature":"CpQCAb4+9vsbZAixhGYxpv51LxQIXKkJ+wpEeroKwwT6flW1iLgNdkBBOXX3t0H7yY9uz1YQc/so1trK7GBhsYR0TAaVbP95Jg3a1D/XMGdR5hUvISOXptRjgpO7ieKQW4k9jpEe9+f1OrZTYKA8CZisCmn3xWBLBh+DrUJSP2rT521soXu/d7KG0aA7LIw+Bz61786v/8Ih7YWukxvIC/nli1aTivHN3Pw3pnNW5d35/5OSMA0rXlYf/ioz9+Y/jM6t1kD6HJCz6RFg2+Sck8wNNhCcL6+3dVWqnl1O8CbyT8RYL7ZFCGNWu1dpmuosLcEIvYk4zKRteCer9WaZ6CDIE4M1jcYd87H1veEsLqtV55Fyv/MY"}],"role":"model"},{"parts":[{"functionResponse":{"id":"1","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","parametersJsonSchema":{"properties":{"location":{"description":"the city","type":"string"}},"required":["location"],"type":"object"}}]}]} headers: Content-Type: - application/json diff --git a/providertests/testdata/TestGoogleThinking/gemini-2.5-pro/thinking-streaming.yaml b/providertests/testdata/TestGoogleThinking/gemini-2.5-pro/thinking-streaming.yaml index 6c45d6b33..229817970 100644 --- a/providertests/testdata/TestGoogleThinking/gemini-2.5-pro/thinking-streaming.yaml +++ b/providertests/testdata/TestGoogleThinking/gemini-2.5-pro/thinking-streaming.yaml @@ -6,10 +6,10 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 550 + content_length: 560 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"}}]}]} + {"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","parametersJsonSchema":{"properties":{"location":{"description":"the city","type":"string"}},"required":["location"],"type":"object"}}]}]} form: alt: - sse @@ -38,10 +38,10 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 1310 + content_length: 1320 host: generativelanguage.googleapis.com body: | - {"contents":[{"parts":[{"text":"What's the weather in Florence, Italy?"}],"role":"user"},{"parts":[{"functionCall":{"args":{"location":"Florence, Italy"},"id":"1","name":"weather"},"thoughtSignature":"CiIBvj72+9zt1F5hZ22f1eeW7Px6AYZtmGWkRn98itxeN1glCmcBvj72+7MEN/axOHSjBzj3ketZPeDZru98pfgPDRSPRire30CemwwkjWoP6Ejv0DwglpMfSVw6C7oT2xm+otusdJ8QznRot3m3zOup17INxBbQkFPAvf9kXN5U7uLCkLPNgeOfCpbJCoYBAb4+9vu+PT2opK2A1Ko4kOZ1ONsRdpEf9pvK8PCiCjiQQjIz/w5NxwrwByC/4dJtsCXdQ3lPKA4fgJjfai0O6+SP6iU4x+outZLLTY0Jxc3awfwSv9HKLN/poOW0njQMZUiMuW49hYgIMNyLfvqhHQwn4+8Xs8yoEN5yBHfJoVeHFqz5z3oKcAG+Pvb7afI/08/QqVFDQHAt7cDrXu14mBkRMbe4hqYevsbRiIOtJeK3RZVsNQHcs0WgA1zKEytXe2Pg5cEjMyRl98DeLSilEVN4ZEAkjx5jcyx3FuuUY73PQ8BYJdoU2QKr9koDZMAnZCPv21/iJpQ="}],"role":"model"},{"parts":[{"functionResponse":{"id":"1","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"}}]}]} + {"contents":[{"parts":[{"text":"What's the weather in Florence, Italy?"}],"role":"user"},{"parts":[{"functionCall":{"args":{"location":"Florence, Italy"},"id":"1","name":"weather"},"thoughtSignature":"CiIBvj72+9zt1F5hZ22f1eeW7Px6AYZtmGWkRn98itxeN1glCmcBvj72+7MEN/axOHSjBzj3ketZPeDZru98pfgPDRSPRire30CemwwkjWoP6Ejv0DwglpMfSVw6C7oT2xm+otusdJ8QznRot3m3zOup17INxBbQkFPAvf9kXN5U7uLCkLPNgeOfCpbJCoYBAb4+9vu+PT2opK2A1Ko4kOZ1ONsRdpEf9pvK8PCiCjiQQjIz/w5NxwrwByC/4dJtsCXdQ3lPKA4fgJjfai0O6+SP6iU4x+outZLLTY0Jxc3awfwSv9HKLN/poOW0njQMZUiMuW49hYgIMNyLfvqhHQwn4+8Xs8yoEN5yBHfJoVeHFqz5z3oKcAG+Pvb7afI/08/QqVFDQHAt7cDrXu14mBkRMbe4hqYevsbRiIOtJeK3RZVsNQHcs0WgA1zKEytXe2Pg5cEjMyRl98DeLSilEVN4ZEAkjx5jcyx3FuuUY73PQ8BYJdoU2QKr9koDZMAnZCPv21/iJpQ="}],"role":"model"},{"parts":[{"functionResponse":{"id":"1","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","parametersJsonSchema":{"properties":{"location":{"description":"the city","type":"string"}},"required":["location"],"type":"object"}}]}]} form: alt: - sse diff --git a/providertests/testdata/TestGoogleThinking/gemini-2.5-pro/thinking.yaml b/providertests/testdata/TestGoogleThinking/gemini-2.5-pro/thinking.yaml index 352ce3f1e..5fa613356 100644 --- a/providertests/testdata/TestGoogleThinking/gemini-2.5-pro/thinking.yaml +++ b/providertests/testdata/TestGoogleThinking/gemini-2.5-pro/thinking.yaml @@ -6,10 +6,10 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 550 + content_length: 560 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"}}]}]} + {"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","parametersJsonSchema":{"properties":{"location":{"description":"the city","type":"string"}},"required":["location"],"type":"object"}}]}]} headers: Content-Type: - application/json @@ -77,10 +77,10 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 1170 + content_length: 1180 host: generativelanguage.googleapis.com body: | - {"contents":[{"parts":[{"text":"What's the weather in Florence, Italy?"}],"role":"user"},{"parts":[{"functionCall":{"args":{"location":"Florence, Italy"},"id":"1","name":"weather"},"thoughtSignature":"CpwCAb4+9vvjWTfN/coHAtL6RNHuB/D9RcoYaEbOXifBzo42rnPBxgLXlfKKVlWjSujb7uS5VqrErCz1riiaQMDIWmUT6eO5hy397uPpmJTyuud7DY+yEa0wglfCTh+KNPlWvZlDfWGMAGhoI0sUcA1IwSGEmcLHyQ7xFZ30Ze1YxbNO+OGSyJn31RDaivuHWcBLBEPKDsHbJcHs9NJH+kIarQkNTSJAhGwNSPE6hXBtoFpGDrCfFKo7X1Psc3IaJeubv+h1Ox3FS4OErR/Q/sNj52+JUUbRWJ8G6aptVbvzNtHFZMMIeljaEMlxGiBKUiSNeudWDCoPII/q1NY/YwBExXWwxGET1pj0o0YV5vXTw81gkDiyqHrKaWAzkYg="}],"role":"model"},{"parts":[{"functionResponse":{"id":"1","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"}}]}]} + {"contents":[{"parts":[{"text":"What's the weather in Florence, Italy?"}],"role":"user"},{"parts":[{"functionCall":{"args":{"location":"Florence, Italy"},"id":"1","name":"weather"},"thoughtSignature":"CpwCAb4+9vvjWTfN/coHAtL6RNHuB/D9RcoYaEbOXifBzo42rnPBxgLXlfKKVlWjSujb7uS5VqrErCz1riiaQMDIWmUT6eO5hy397uPpmJTyuud7DY+yEa0wglfCTh+KNPlWvZlDfWGMAGhoI0sUcA1IwSGEmcLHyQ7xFZ30Ze1YxbNO+OGSyJn31RDaivuHWcBLBEPKDsHbJcHs9NJH+kIarQkNTSJAhGwNSPE6hXBtoFpGDrCfFKo7X1Psc3IaJeubv+h1Ox3FS4OErR/Q/sNj52+JUUbRWJ8G6aptVbvzNtHFZMMIeljaEMlxGiBKUiSNeudWDCoPII/q1NY/YwBExXWwxGET1pj0o0YV5vXTw81gkDiyqHrKaWAzkYg="}],"role":"model"},{"parts":[{"functionResponse":{"id":"1","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","parametersJsonSchema":{"properties":{"location":{"description":"the city","type":"string"}},"required":["location"],"type":"object"}}]}]} headers: Content-Type: - application/json diff --git a/providertests/testdata/TestGoogleThinking/gemini-3-pro-preview/thinking-streaming.yaml b/providertests/testdata/TestGoogleThinking/gemini-3-pro-preview/thinking-streaming.yaml index 6703fa394..5ed0386c3 100644 --- a/providertests/testdata/TestGoogleThinking/gemini-3-pro-preview/thinking-streaming.yaml +++ b/providertests/testdata/TestGoogleThinking/gemini-3-pro-preview/thinking-streaming.yaml @@ -6,10 +6,10 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 552 + content_length: 562 host: generativelanguage.googleapis.com body: | - {"contents":[{"parts":[{"text":"What's the weather in Florence, Italy?"}],"role":"user"}],"generationConfig":{"thinkingConfig":{"includeThoughts":true,"thinkingLevel":"HIGH"}},"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"}}]}]} + {"contents":[{"parts":[{"text":"What's the weather in Florence, Italy?"}],"role":"user"}],"generationConfig":{"thinkingConfig":{"includeThoughts":true,"thinkingLevel":"HIGH"}},"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","parametersJsonSchema":{"properties":{"location":{"description":"the city","type":"string"}},"required":["location"],"type":"object"}}]}]} form: alt: - sse @@ -38,10 +38,10 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 1466 + content_length: 1476 host: generativelanguage.googleapis.com body: | - {"contents":[{"parts":[{"text":"What's the weather in Florence, Italy?"}],"role":"user"},{"parts":[{"functionCall":{"args":{"location":"Florence, Italy"},"id":"9d532gc9","name":"weather"},"thoughtSignature":"Eu0DCuoDAb4+9vvdbiOpT/hdj5NfRT0HGI7d3Q7aVsxdntWDDSAKWXd1W9yIApz+DNkxyuQZqEvgwGM6LYZRZE/2z+fKT2HwZqDlmQRTO4vzrBPS5P0Huj7eqdBFa9+XO0oS7Yi5YB18JmoulO+EWsjqqKFj/t3MUBraxQQ8LL15aL+LH1odHwx6iVnYuDkt53RO6bAN3mXghFFajymaMQsCBgRHWiCoCMovUHP7CkMOPhWlH8QN0yuo1x+vvcToSq9c5xd1toNrGCUOziUUOxlYiCzPteckR8xVveXLw3OpCms7+rVoYME6ms/tF2rIKitwGx1GDcDs2UvtKsTCoWH63cipK+Yab1EG4pafOl0nDV8GWx7N3tufNsWD+1Wxow2zbjLJoVHsdsyEU7rmkmV2fHCH2KZug7qNaGtJMr51aMxqfVNOSXyQUhGMhaqbloGd4jFUpwptQcV/JDlREhegNuSI8asmwf0DuI/ftKXN0NlFTrBI8Ey3BCCNjh3XHYwFb5JexKmif5HoQgNDTgKsHn91PoTgXF8kviyWYYbCf78O6ipcPPqA3DKDFC3KN1NAXxw6KDjsu7RPHra8JyaxNS2xFVCaB1WjM0F38+KtI9pLBkzpqgjSc6yoLXm3jP1+V6quuL35Dm/vF6Otiw=="}],"role":"model"},{"parts":[{"functionResponse":{"id":"9d532gc9","name":"weather","response":{"result":"40 C"}}}],"role":"user"}],"generationConfig":{"thinkingConfig":{"includeThoughts":true,"thinkingLevel":"HIGH"}},"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"}}]}]} + {"contents":[{"parts":[{"text":"What's the weather in Florence, Italy?"}],"role":"user"},{"parts":[{"functionCall":{"args":{"location":"Florence, Italy"},"id":"9d532gc9","name":"weather"},"thoughtSignature":"Eu0DCuoDAb4+9vvdbiOpT/hdj5NfRT0HGI7d3Q7aVsxdntWDDSAKWXd1W9yIApz+DNkxyuQZqEvgwGM6LYZRZE/2z+fKT2HwZqDlmQRTO4vzrBPS5P0Huj7eqdBFa9+XO0oS7Yi5YB18JmoulO+EWsjqqKFj/t3MUBraxQQ8LL15aL+LH1odHwx6iVnYuDkt53RO6bAN3mXghFFajymaMQsCBgRHWiCoCMovUHP7CkMOPhWlH8QN0yuo1x+vvcToSq9c5xd1toNrGCUOziUUOxlYiCzPteckR8xVveXLw3OpCms7+rVoYME6ms/tF2rIKitwGx1GDcDs2UvtKsTCoWH63cipK+Yab1EG4pafOl0nDV8GWx7N3tufNsWD+1Wxow2zbjLJoVHsdsyEU7rmkmV2fHCH2KZug7qNaGtJMr51aMxqfVNOSXyQUhGMhaqbloGd4jFUpwptQcV/JDlREhegNuSI8asmwf0DuI/ftKXN0NlFTrBI8Ey3BCCNjh3XHYwFb5JexKmif5HoQgNDTgKsHn91PoTgXF8kviyWYYbCf78O6ipcPPqA3DKDFC3KN1NAXxw6KDjsu7RPHra8JyaxNS2xFVCaB1WjM0F38+KtI9pLBkzpqgjSc6yoLXm3jP1+V6quuL35Dm/vF6Otiw=="}],"role":"model"},{"parts":[{"functionResponse":{"id":"9d532gc9","name":"weather","response":{"result":"40 C"}}}],"role":"user"}],"generationConfig":{"thinkingConfig":{"includeThoughts":true,"thinkingLevel":"HIGH"}},"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","parametersJsonSchema":{"properties":{"location":{"description":"the city","type":"string"}},"required":["location"],"type":"object"}}]}]} form: alt: - sse diff --git a/providertests/testdata/TestGoogleThinking/gemini-3-pro-preview/thinking.yaml b/providertests/testdata/TestGoogleThinking/gemini-3-pro-preview/thinking.yaml index 0378bd1c1..70b04888e 100644 --- a/providertests/testdata/TestGoogleThinking/gemini-3-pro-preview/thinking.yaml +++ b/providertests/testdata/TestGoogleThinking/gemini-3-pro-preview/thinking.yaml @@ -6,10 +6,10 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 552 + content_length: 562 host: generativelanguage.googleapis.com body: | - {"contents":[{"parts":[{"text":"What's the weather in Florence, Italy?"}],"role":"user"}],"generationConfig":{"thinkingConfig":{"includeThoughts":true,"thinkingLevel":"HIGH"}},"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"}}]}]} + {"contents":[{"parts":[{"text":"What's the weather in Florence, Italy?"}],"role":"user"}],"generationConfig":{"thinkingConfig":{"includeThoughts":true,"thinkingLevel":"HIGH"}},"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","parametersJsonSchema":{"properties":{"location":{"description":"the city","type":"string"}},"required":["location"],"type":"object"}}]}]} headers: Content-Type: - application/json @@ -78,10 +78,10 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 1626 + content_length: 1636 host: generativelanguage.googleapis.com body: | - {"contents":[{"parts":[{"text":"What's the weather in Florence, Italy?"}],"role":"user"},{"parts":[{"functionCall":{"args":{"location":"Florence, Italy"},"id":"v3yybtcf","name":"weather"},"thoughtSignature":"EucECuQEAb4+9vsYroJyp1uieeH5kjR2slN/TtULDJ5DWhM6IAskLN0yYqxSHckqkY3CLX/sBF+KwFP44rn+BjtIaS+rgcM+omQ3YzvLnnMVdeU97IAih7VbuWqqdpqcXrtiab4vZbhun83pab1NndOKL5M/o9RMPC8IlQNnzb3KMhmzhQ6whAePjKxI1bZpRil3s9aPHjHHwIMKhGhfjtbnli4XS93vEEWCe9YM5QYhY5afbnoJUxQXMDxH8SvUzqgTWULjDZPHNsr7jA/QvI8OFosXNjEFiyYFhsvNQxeHRW2Ce9kVJRSTskO5i+MXGVGYBZ1J7FpMAkTcbqUPHqnFd3kEMrsiGSHUDE6jCcYpN6DT215y9hnhG2cs0LqSVq8gqQqlCYeWW6fDXMhuzhOkcTOaZby8GrFumJiwbvBfZW9kEY+Dp0X1mDNuFethsFI9EsQ+3Q8Xw4OI1JaBCgriDuebHOgNrQZzMECawx7x3t1ctDwOa7Ehdh3Ct7X5+ZKur6x5JsCFqTpmbqD0mEx3xlHQsYMEpO+biVZkBHz0fb/sjAd55cvU0fyXYLt9YYPraY4jLDPr7dBlmh3/5u1yWShphIUyGdWaC5k4hhsZG4BRrm5ZERlWJdGwKj0Y9B45sbeObmT4X78WrWmghagQ29dvRYBeROneeVobZ7VY52zSfvtBmvnO614/9OjOKqKVJAdrNbo3LK3lT6dhIlesFvRV1c6O4QFf3z9ZdOKouH3vvxDg6TQsIc3dkIaKdT2G1fBUjjavEIjTWhjoe70FJGSp+5y5tWVGu+ULheKsjk7+bMX1gUw1"}],"role":"model"},{"parts":[{"functionResponse":{"id":"v3yybtcf","name":"weather","response":{"result":"40 C"}}}],"role":"user"}],"generationConfig":{"thinkingConfig":{"includeThoughts":true,"thinkingLevel":"HIGH"}},"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"}}]}]} + {"contents":[{"parts":[{"text":"What's the weather in Florence, Italy?"}],"role":"user"},{"parts":[{"functionCall":{"args":{"location":"Florence, Italy"},"id":"v3yybtcf","name":"weather"},"thoughtSignature":"EucECuQEAb4+9vsYroJyp1uieeH5kjR2slN/TtULDJ5DWhM6IAskLN0yYqxSHckqkY3CLX/sBF+KwFP44rn+BjtIaS+rgcM+omQ3YzvLnnMVdeU97IAih7VbuWqqdpqcXrtiab4vZbhun83pab1NndOKL5M/o9RMPC8IlQNnzb3KMhmzhQ6whAePjKxI1bZpRil3s9aPHjHHwIMKhGhfjtbnli4XS93vEEWCe9YM5QYhY5afbnoJUxQXMDxH8SvUzqgTWULjDZPHNsr7jA/QvI8OFosXNjEFiyYFhsvNQxeHRW2Ce9kVJRSTskO5i+MXGVGYBZ1J7FpMAkTcbqUPHqnFd3kEMrsiGSHUDE6jCcYpN6DT215y9hnhG2cs0LqSVq8gqQqlCYeWW6fDXMhuzhOkcTOaZby8GrFumJiwbvBfZW9kEY+Dp0X1mDNuFethsFI9EsQ+3Q8Xw4OI1JaBCgriDuebHOgNrQZzMECawx7x3t1ctDwOa7Ehdh3Ct7X5+ZKur6x5JsCFqTpmbqD0mEx3xlHQsYMEpO+biVZkBHz0fb/sjAd55cvU0fyXYLt9YYPraY4jLDPr7dBlmh3/5u1yWShphIUyGdWaC5k4hhsZG4BRrm5ZERlWJdGwKj0Y9B45sbeObmT4X78WrWmghagQ29dvRYBeROneeVobZ7VY52zSfvtBmvnO614/9OjOKqKVJAdrNbo3LK3lT6dhIlesFvRV1c6O4QFf3z9ZdOKouH3vvxDg6TQsIc3dkIaKdT2G1fBUjjavEIjTWhjoe70FJGSp+5y5tWVGu+ULheKsjk7+bMX1gUw1"}],"role":"model"},{"parts":[{"functionResponse":{"id":"v3yybtcf","name":"weather","response":{"result":"40 C"}}}],"role":"user"}],"generationConfig":{"thinkingConfig":{"includeThoughts":true,"thinkingLevel":"HIGH"}},"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","parametersJsonSchema":{"properties":{"location":{"description":"the city","type":"string"}},"required":["location"],"type":"object"}}]}]} headers: Content-Type: - application/json