test: add deepseek v3.1 free

Kujtim Hoxha created

Change summary

providertests/openrouter_test.go                                                                        |  17 
providertests/testdata/TestOpenRouterCommon/multi_tool_deepseek-chat-v3.1-free_deepinfra.yaml           |  26 
providertests/testdata/TestOpenRouterCommon/multi_tool_streaming_deepseek-chat-v3.1-free_deepinfra.yaml |  69 
providertests/testdata/TestOpenRouterCommon/simple_deepseek-chat-v3.1-free_deepinfra.yaml               |  33 
providertests/testdata/TestOpenRouterCommon/simple_streaming_deepseek-chat-v3.1-free_deepinfra.yaml     |  42 
providertests/testdata/TestOpenRouterCommon/tool_deepseek-chat-v3.1-free_deepinfra.yaml                 |  26 
providertests/testdata/TestOpenRouterCommon/tool_streaming_deepseek-chat-v3.1-free_deepinfra.yaml       | 133 
7 files changed, 346 insertions(+)

Detailed changes

providertests/openrouter_test.go ๐Ÿ”—

@@ -25,6 +25,7 @@ func TestOpenRouterCommon(t *testing.T) {
 		grok4FastFree(),
 		gemini25Flash(),
 		gemini20Flash(),
+		deepseekV31Free(),
 	}
 
 	for _, model := range models {
@@ -141,6 +142,22 @@ func gemini20Flash() openrouterModel {
 	}
 }
 
+func deepseekV31Free() openrouterModel {
+	return openrouterModel{
+		name: "deepseek-chat-v3.1-free",
+		builderFunc: func(r *recorder.Recorder) (ai.LanguageModel, error) {
+			provider := openrouter.New(
+				openrouter.WithAPIKey(os.Getenv("OPENROUTER_API_KEY")),
+				openrouter.WithHTTPClient(&http.Client{Transport: r}),
+			)
+			return provider.LanguageModel("deepseek/deepseek-chat-v3.1:free")
+		},
+		providers: []string{
+			"deepinfra",
+		},
+	}
+}
+
 func claudeSonnet4() openrouterModel {
 	return openrouterModel{
 		name: "claude-sonnet-4",

providertests/testdata/TestOpenRouterCommon/multi_tool_deepseek-chat-v3.1-free_deepinfra.yaml ๐Ÿ”—

@@ -0,0 +1,63 @@
+---
+version: 2
+interactions:
+  - id: 0
+    request:
+        proto: HTTP/1.1
+        proto_major: 1
+        proto_minor: 1
+        content_length: 879
+        host: ""
+        body: '{"messages":[{"content":"You are a helpful assistant. Always use both add and multiply at the same time.","role":"system"},{"content":"Add and multiply the number 2 and 3","role":"user"}],"model":"deepseek/deepseek-chat-v3.1:free","max_tokens":4000,"tool_choice":"auto","tools":[{"function":{"name":"add","strict":false,"description":"Add two numbers","parameters":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}},"type":"function"},{"function":{"name":"multiply","strict":false,"description":"Multiply two numbers","parameters":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}},"type":"function"}],"provider":{"only":["deepinfra"]},"usage":{"include":true}}'
+        headers:
+            Accept:
+              - application/json
+            Content-Type:
+              - application/json
+            User-Agent:
+              - OpenAI/Go 2.3.0
+        url: https://openrouter.ai/api/v1/chat/completions
+        method: POST
+    response:
+        proto: HTTP/2.0
+        proto_major: 2
+        proto_minor: 0
+        content_length: -1
+        uncompressed: true

providertests/testdata/TestOpenRouterCommon/multi_tool_streaming_deepseek-chat-v3.1-free_deepinfra.yaml ๐Ÿ”—

@@ -0,0 +1,127 @@
+---
+version: 2
+interactions:
+  - id: 0
+    request:
+        proto: HTTP/1.1
+        proto_major: 1
+        proto_minor: 1
+        content_length: 933
+        host: ""
+        body: '{"messages":[{"content":"You are a helpful assistant. Always use both add and multiply at the same time.","role":"system"},{"content":"Add and multiply the number 2 and 3","role":"user"}],"model":"deepseek/deepseek-chat-v3.1:free","max_tokens":4000,"stream_options":{"include_usage":true},"tool_choice":"auto","tools":[{"function":{"name":"add","strict":false,"description":"Add two numbers","parameters":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}},"type":"function"},{"function":{"name":"multiply","strict":false,"description":"Multiply two numbers","parameters":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}},"type":"function"}],"provider":{"only":["deepinfra"]},"usage":{"include":true},"stream":true}'
+        headers:
+            Accept:
+              - application/json
+            Content-Type:
+              - application/json
+            User-Agent:
+              - OpenAI/Go 2.3.0
+        url: https://openrouter.ai/api/v1/chat/completions
+        method: POST
+    response:
+        proto: HTTP/2.0
+        proto_major: 2
+        proto_minor: 0
+        content_length: -1
+        body: |+
+            data: {"id":"gen-1758704111-dT300jmM3hLhZq4SNDlo","provider":"DeepInfra","model":"deepseek/deepseek-chat-v3.1:free","object":"chat.completion.chunk","created":1758704111,"choices":[{"index":0,"delta":{"role":"assistant","content":"","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+            data: {"id":"gen-1758704111-dT300jmM3hLhZq4SNDlo","provider":"DeepInfra","model":"deepseek/deepseek-chat-v3.1:free","object":"chat.completion.chunk","created":1758704111,"choices":[{"index":0,"delta":{"role":"assistant","content":"I","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+            data: {"id":"gen-1758704111-dT300jmM3hLhZq4SNDlo","provider":"DeepInfra","model":"deepseek/deepseek-chat-v3.1:free","object":"chat.completion.chunk","created":1758704111,"choices":[{"index":0,"delta":{"role":"assistant","content":"'ll add","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+            data: {"id":"gen-1758704111-dT300jmM3hLhZq4SNDlo","provider":"DeepInfra","model":"deepseek/deepseek-chat-v3.1:free","object":"chat.completion.chunk","created":1758704111,"choices":[{"index":0,"delta":{"role":"assistant","content":" and multiply","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+            data: {"id":"gen-1758704111-dT300jmM3hLhZq4SNDlo","provider":"DeepInfra","model":"deepseek/deepseek-chat-v3.1:free","object":"chat.completion.chunk","created":1758704111,"choices":[{"index":0,"delta":{"role":"assistant","content":" the","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+            data: {"id":"gen-1758704111-dT300jmM3hLhZq4SNDlo","provider":"DeepInfra","model":"deepseek/deepseek-chat-v3.1:free","object":"chat.completion.chunk","created":1758704111,"choices":[{"index":0,"delta":{"role":"assistant","content":" numbers ","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+            data: {"id":"gen-1758704111-dT300jmM3hLhZq4SNDlo","provider":"DeepInfra","model":"deepseek/deepseek-chat-v3.1:free","object":"chat.completion.chunk","created":1758704111,"choices":[{"index":0,"delta":{"role":"assistant","content":"2 and","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+            data: {"id":"gen-1758704111-dT300jmM3hLhZq4SNDlo","provider":"DeepInfra","model":"deepseek/deepseek-chat-v3.1:free","object":"chat.completion.chunk","created":1758704111,"choices":[{"index":0,"delta":{"role":"assistant","content":" 3","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+            data: {"id":"gen-1758704111-dT300jmM3hLhZq4SNDlo","provider":"DeepInfra","model":"deepseek/deepseek-chat-v3.1:free","object":"chat.completion.chunk","created":1758704111,"choices":[{"index":0,"delta":{"role":"assistant","content":" simultaneously as","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+            data: {"id":"gen-1758704111-dT300jmM3hLhZq4SNDlo","provider":"DeepInfra","model":"deepseek/deepseek-chat-v3.1:free","object":"chat.completion.chunk","created":1758704111,"choices":[{"index":0,"delta":{"role":"assistant","content":" requested.","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+            data: {"id":"gen-1758704111-dT300jmM3hLhZq4SNDlo","provider":"DeepInfra","model":"deepseek/deepseek-chat-v3.1:free","object":"chat.completion.chunk","created":1758704111,"choices":[{"index":0,"delta":{"role":"assistant","content":null,"tool_calls":[{"index":0,"id":"call_1218","function":{"arguments":"{\"a\": 2, \"b\": 3}","name":"add"},"type":"function"}]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+            data: {"id":"gen-1758704111-dT300jmM3hLhZq4SNDlo","provider":"DeepInfra","model":"deepseek/deepseek-chat-v3.1:free","object":"chat.completion.chunk","created":1758704111,"choices":[{"index":0,"delta":{"role":"assistant","content":null,"tool_calls":[{"index":1,"id":"call_c6a4","function":{"arguments":"{\"a\": 2, \"b\": 3}","name":"multiply"},"type":"function"}]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+            data: {"id":"gen-1758704111-dT300jmM3hLhZq4SNDlo","provider":"DeepInfra","model":"deepseek/deepseek-chat-v3.1:free","object":"chat.completion.chunk","created":1758704111,"choices":[{"index":0,"delta":{"role":"assistant","content":"","reasoning":null,"reasoning_details":[]},"finish_reason":"tool_calls","native_finish_reason":"tool_calls","logprobs":null}]}
+
+            data: {"id":"gen-1758704111-dT300jmM3hLhZq4SNDlo","provider":"DeepInfra","model":"deepseek/deepseek-chat-v3.1:free","object":"chat.completion.chunk","created":1758704111,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":250,"completion_tokens":52,"total_tokens":302,"cost":0,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0,"upstream_inference_completions_cost":0},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
+
+            data: [DONE]
+
+        headers:
+            Content-Type:
+              - text/event-stream
+        status: 200 OK
+        code: 200
+        duration: 1.01682225s
+  - id: 1
+    request:
+        proto: HTTP/1.1
+        proto_major: 1
+        proto_minor: 1
+        content_length: 1367
+        host: ""

providertests/testdata/TestOpenRouterCommon/simple_deepseek-chat-v3.1-free_deepinfra.yaml ๐Ÿ”—

@@ -0,0 +1,33 @@
+---
+version: 2
+interactions:
+  - id: 0
+    request:
+        proto: HTTP/1.1
+        proto_major: 1
+        proto_minor: 1
+        content_length: 241
+        host: ""
+        body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"Say hi in Portuguese","role":"user"}],"model":"deepseek/deepseek-chat-v3.1:free","max_tokens":4000,"provider":{"only":["deepinfra"]},"usage":{"include":true}}'
+        headers:
+            Accept:
+              - application/json
+            Content-Type:
+              - application/json
+            User-Agent:
+              - OpenAI/Go 2.3.0
+        url: https://openrouter.ai/api/v1/chat/completions
+        method: POST
+    response:
+        proto: HTTP/2.0
+        proto_major: 2
+        proto_minor: 0
+        content_length: -1
+        uncompressed: true
+        body: "\n         \n\n         \n\n         \n\n         \n\n         \n{\"id\":\"gen-1758704085-PBobpxtP5m1abvKwulG8\",\"provider\":\"DeepInfra\",\"model\":\"deepseek/deepseek-chat-v3.1:free\",\"object\":\"chat.completion\",\"created\":1758704085,\"choices\":[{\"logprobs\":null,\"finish_reason\":\"stop\",\"native_finish_reason\":\"stop\",\"index\":0,\"message\":{\"role\":\"assistant\",\"content\":\"Olรก! (That's \\\"Hello\\\" in Portuguese.)\",\"refusal\":null,\"reasoning\":null}}],\"usage\":{\"prompt_tokens\":13,\"completion_tokens\":13,\"total_tokens\":26,\"cost\":0,\"is_byok\":false,\"prompt_tokens_details\":{\"cached_tokens\":0,\"audio_tokens\":0},\"cost_details\":{\"upstream_inference_cost\":null,\"upstream_inference_prompt_cost\":0,\"upstream_inference_completions_cost\":0},\"completion_tokens_details\":{\"reasoning_tokens\":0,\"image_tokens\":0}}}"
+        headers:
+            Content-Type:
+              - application/json
+        status: 200 OK
+        code: 200
+        duration: 1.212305625s

providertests/testdata/TestOpenRouterCommon/simple_streaming_deepseek-chat-v3.1-free_deepinfra.yaml ๐Ÿ”—

@@ -0,0 +1,42 @@
+---
+version: 2
+interactions:
+  - id: 0
+    request:
+        proto: HTTP/1.1
+        proto_major: 1
+        proto_minor: 1
+        content_length: 295
+        host: ""
+        body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"Say hi in Portuguese","role":"user"}],"model":"deepseek/deepseek-chat-v3.1:free","max_tokens":4000,"stream_options":{"include_usage":true},"provider":{"only":["deepinfra"]},"usage":{"include":true},"stream":true}'
+        headers:
+            Accept:
+              - application/json
+            Content-Type:
+              - application/json
+            User-Agent:
+              - OpenAI/Go 2.3.0
+        url: https://openrouter.ai/api/v1/chat/completions
+        method: POST
+    response:
+        proto: HTTP/2.0
+        proto_major: 2
+        proto_minor: 0
+        content_length: -1
+        body: |+
+            data: {"id":"gen-1758704087-hMyTeT1IByO3juxWOYhC","provider":"DeepInfra","model":"deepseek/deepseek-chat-v3.1:free","object":"chat.completion.chunk","created":1758704087,"choices":[{"index":0,"delta":{"role":"assistant","content":"Ol","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+            data: {"id":"gen-1758704087-hMyTeT1IByO3juxWOYhC","provider":"DeepInfra","model":"deepseek/deepseek-chat-v3.1:free","object":"chat.completion.chunk","created":1758704087,"choices":[{"index":0,"delta":{"role":"assistant","content":"รก!","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+            data: {"id":"gen-1758704087-hMyTeT1IByO3juxWOYhC","provider":"DeepInfra","model":"deepseek/deepseek-chat-v3.1:free","object":"chat.completion.chunk","created":1758704087,"choices":[{"index":0,"delta":{"role":"assistant","content":"","reasoning":null,"reasoning_details":[]},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
+
+            data: {"id":"gen-1758704087-hMyTeT1IByO3juxWOYhC","provider":"DeepInfra","model":"deepseek/deepseek-chat-v3.1:free","object":"chat.completion.chunk","created":1758704087,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":13,"completion_tokens":4,"total_tokens":17,"cost":0,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0,"upstream_inference_completions_cost":0},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
+
+            data: [DONE]
+
+        headers:
+            Content-Type:
+              - text/event-stream
+        status: 200 OK
+        code: 200
+        duration: 606.512917ms

providertests/testdata/TestOpenRouterCommon/tool_deepseek-chat-v3.1-free_deepinfra.yaml ๐Ÿ”—

@@ -0,0 +1,63 @@
+---
+version: 2
+interactions:
+  - id: 0
+    request:
+        proto: HTTP/1.1
+        proto_major: 1
+        proto_minor: 1
+        content_length: 533
+        host: ""
+        body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"What''s the weather in Florence,Italy?","role":"user"}],"model":"deepseek/deepseek-chat-v3.1:free","max_tokens":4000,"tool_choice":"auto","tools":[{"function":{"name":"weather","strict":false,"description":"Get weather information for a location","parameters":{"properties":{"location":{"description":"the city","type":"string"}},"required":["location"],"type":"object"}},"type":"function"}],"provider":{"only":["deepinfra"]},"usage":{"include":true}}'
+        headers:
+            Accept:
+              - application/json
+            Content-Type:
+              - application/json
+            User-Agent:
+              - OpenAI/Go 2.3.0
+        url: https://openrouter.ai/api/v1/chat/completions
+        method: POST
+    response:
+        proto: HTTP/2.0
+        proto_major: 2
+        proto_minor: 0
+        content_length: -1
+        uncompressed: true

providertests/testdata/TestOpenRouterCommon/tool_streaming_deepseek-chat-v3.1-free_deepinfra.yaml ๐Ÿ”—

@@ -0,0 +1,133 @@
+---
+version: 2
+interactions:
+  - id: 0
+    request:
+        proto: HTTP/1.1
+        proto_major: 1
+        proto_minor: 1
+        content_length: 587
+        host: ""
+        body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"What''s the weather in Florence,Italy?","role":"user"}],"model":"deepseek/deepseek-chat-v3.1:free","max_tokens":4000,"stream_options":{"include_usage":true},"tool_choice":"auto","tools":[{"function":{"name":"weather","strict":false,"description":"Get weather information for a location","parameters":{"properties":{"location":{"description":"the city","type":"string"}},"required":["location"],"type":"object"}},"type":"function"}],"provider":{"only":["deepinfra"]},"usage":{"include":true},"stream":true}'
+        headers:
+            Accept:
+              - application/json
+            Content-Type:
+              - application/json
+            User-Agent:
+              - OpenAI/Go 2.3.0
+        url: https://openrouter.ai/api/v1/chat/completions
+        method: POST
+    response:
+        proto: HTTP/2.0
+        proto_major: 2
+        proto_minor: 0
+        content_length: -1
+        body: |+
+            data: {"id":"gen-1758704095-gVWbFkzRub21BvJrpBdL","provider":"DeepInfra","model":"deepseek/deepseek-chat-v3.1:free","object":"chat.completion.chunk","created":1758704095,"choices":[{"index":0,"delta":{"role":"assistant","content":"","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+            data: {"id":"gen-1758704095-gVWbFkzRub21BvJrpBdL","provider":"DeepInfra","model":"deepseek/deepseek-chat-v3.1:free","object":"chat.completion.chunk","created":1758704095,"choices":[{"index":0,"delta":{"role":"assistant","content":"I","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+            data: {"id":"gen-1758704095-gVWbFkzRub21BvJrpBdL","provider":"DeepInfra","model":"deepseek/deepseek-chat-v3.1:free","object":"chat.completion.chunk","created":1758704095,"choices":[{"index":0,"delta":{"role":"assistant","content":"'ll check","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+            data: {"id":"gen-1758704095-gVWbFkzRub21BvJrpBdL","provider":"DeepInfra","model":"deepseek/deepseek-chat-v3.1:free","object":"chat.completion.chunk","created":1758704095,"choices":[{"index":0,"delta":{"role":"assistant","content":" the weather","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+            data: {"id":"gen-1758704095-gVWbFkzRub21BvJrpBdL","provider":"DeepInfra","model":"deepseek/deepseek-chat-v3.1:free","object":"chat.completion.chunk","created":1758704095,"choices":[{"index":0,"delta":{"role":"assistant","content":" in","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+            data: {"id":"gen-1758704095-gVWbFkzRub21BvJrpBdL","provider":"DeepInfra","model":"deepseek/deepseek-chat-v3.1:free","object":"chat.completion.chunk","created":1758704095,"choices":[{"index":0,"delta":{"role":"assistant","content":" Florence,","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+            data: {"id":"gen-1758704095-gVWbFkzRub21BvJrpBdL","provider":"DeepInfra","model":"deepseek/deepseek-chat-v3.1:free","object":"chat.completion.chunk","created":1758704095,"choices":[{"index":0,"delta":{"role":"assistant","content":" Italy for","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+            data: {"id":"gen-1758704095-gVWbFkzRub21BvJrpBdL","provider":"DeepInfra","model":"deepseek/deepseek-chat-v3.1:free","object":"chat.completion.chunk","created":1758704095,"choices":[{"index":0,"delta":{"role":"assistant","content":" you.","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+            data: {"id":"gen-1758704095-gVWbFkzRub21BvJrpBdL","provider":"DeepInfra","model":"deepseek/deepseek-chat-v3.1:free","object":"chat.completion.chunk","created":1758704095,"choices":[{"index":0,"delta":{"role":"assistant","content":null,"tool_calls":[{"index":0,"id":"call_1747","function":{"arguments":"{\"location\": \"Florence\"}","name":"weather"},"type":"function"}]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+            data: {"id":"gen-1758704095-gVWbFkzRub21BvJrpBdL","provider":"DeepInfra","model":"deepseek/deepseek-chat-v3.1:free","object":"chat.completion.chunk","created":1758704095,"choices":[{"index":0,"delta":{"role":"assistant","content":"","reasoning":null,"reasoning_details":[]},"finish_reason":"tool_calls","native_finish_reason":"tool_calls","logprobs":null}]}
+
+            data: {"id":"gen-1758704095-gVWbFkzRub21BvJrpBdL","provider":"DeepInfra","model":"deepseek/deepseek-chat-v3.1:free","object":"chat.completion.chunk","created":1758704095,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":160,"completion_tokens":27,"total_tokens":187,"cost":0,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0,"upstream_inference_completions_cost":0},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
+
+            data: [DONE]
+
+        headers:
+            Content-Type:
+              - text/event-stream
+        status: 200 OK
+        code: 200
+        duration: 949.799791ms
+  - id: 1
+    request:
+        proto: HTTP/1.1
+        proto_major: 1
+        proto_minor: 1
+        content_length: 856
+        host: ""
+        body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"What''s the weather in Florence,Italy?","role":"user"},{"content":"I''ll check the weather in Florence, Italy for you.","tool_calls":[{"id":"call_1747","function":{"arguments":"{\"location\": \"Florence\"}","name":"weather"},"type":"function"}],"role":"assistant"},{"content":"40 C","tool_call_id":"call_1747","role":"tool"}],"model":"deepseek/deepseek-chat-v3.1:free","max_tokens":4000,"stream_options":{"include_usage":true},"tool_choice":"auto","tools":[{"function":{"name":"weather","strict":false,"description":"Get weather information for a location","parameters":{"properties":{"location":{"description":"the city","type":"string"}},"required":["location"],"type":"object"}},"type":"function"}],"provider":{"only":["deepinfra"]},"usage":{"include":true},"stream":true}'
+        headers:
+            Accept:
+              - application/json
+            Content-Type:
+              - application/json
+            User-Agent:
+              - OpenAI/Go 2.3.0
+        url: https://openrouter.ai/api/v1/chat/completions
+        method: POST
+    response:
+        proto: HTTP/2.0
+        proto_major: 2
+        proto_minor: 0
+        content_length: -1
+        body: |+
+            data: {"id":"gen-1758704099-c4uoTxChRtWJGtMjfaVK","provider":"DeepInfra","model":"deepseek/deepseek-chat-v3.1:free","object":"chat.completion.chunk","created":1758704099,"choices":[{"index":0,"delta":{"role":"assistant","content":"","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+            data: {"id":"gen-1758704099-c4uoTxChRtWJGtMjfaVK","provider":"DeepInfra","model":"deepseek/deepseek-chat-v3.1:free","object":"chat.completion.chunk","created":1758704099,"choices":[{"index":0,"delta":{"role":"assistant","content":"The","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+            data: {"id":"gen-1758704099-c4uoTxChRtWJGtMjfaVK","provider":"DeepInfra","model":"deepseek/deepseek-chat-v3.1:free","object":"chat.completion.chunk","created":1758704099,"choices":[{"index":0,"delta":{"role":"assistant","content":" current","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+            data: {"id":"gen-1758704099-c4uoTxChRtWJGtMjfaVK","provider":"DeepInfra","model":"deepseek/deepseek-chat-v3.1:free","object":"chat.completion.chunk","created":1758704099,"choices":[{"index":0,"delta":{"role":"assistant","content":" temperature in","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+            data: {"id":"gen-1758704099-c4uoTxChRtWJGtMjfaVK","provider":"DeepInfra","model":"deepseek/deepseek-chat-v3.1:free","object":"chat.completion.chunk","created":1758704099,"choices":[{"index":0,"delta":{"role":"assistant","content":" Florence,","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+            data: {"id":"gen-1758704099-c4uoTxChRtWJGtMjfaVK","provider":"DeepInfra","model":"deepseek/deepseek-chat-v3.1:free","object":"chat.completion.chunk","created":1758704099,"choices":[{"index":0,"delta":{"role":"assistant","content":" Italy is","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+            data: {"id":"gen-1758704099-c4uoTxChRtWJGtMjfaVK","provider":"DeepInfra","model":"deepseek/deepseek-chat-v3.1:free","object":"chat.completion.chunk","created":1758704099,"choices":[{"index":0,"delta":{"role":"assistant","content":" ","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+            data: {"id":"gen-1758704099-c4uoTxChRtWJGtMjfaVK","provider":"DeepInfra","model":"deepseek/deepseek-chat-v3.1:free","object":"chat.completion.chunk","created":1758704099,"choices":[{"index":0,"delta":{"role":"assistant","content":"40ยฐ","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+            data: {"id":"gen-1758704099-c4uoTxChRtWJGtMjfaVK","provider":"DeepInfra","model":"deepseek/deepseek-chat-v3.1:free","object":"chat.completion.chunk","created":1758704099,"choices":[{"index":0,"delta":{"role":"assistant","content":"C.","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+            data: {"id":"gen-1758704099-c4uoTxChRtWJGtMjfaVK","provider":"DeepInfra","model":"deepseek/deepseek-chat-v3.1:free","object":"chat.completion.chunk","created":1758704099,"choices":[{"index":0,"delta":{"role":"assistant","content":" It's","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+            data: {"id":"gen-1758704099-c4uoTxChRtWJGtMjfaVK","provider":"DeepInfra","model":"deepseek/deepseek-chat-v3.1:free","object":"chat.completion.chunk","created":1758704099,"choices":[{"index":0,"delta":{"role":"assistant","content":" quite hot","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+            data: {"id":"gen-1758704099-c4uoTxChRtWJGtMjfaVK","provider":"DeepInfra","model":"deepseek/deepseek-chat-v3.1:free","object":"chat.completion.chunk","created":1758704099,"choices":[{"index":0,"delta":{"role":"assistant","content":" there!","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+            data: {"id":"gen-1758704099-c4uoTxChRtWJGtMjfaVK","provider":"DeepInfra","model":"deepseek/deepseek-chat-v3.1:free","object":"chat.completion.chunk","created":1758704099,"choices":[{"index":0,"delta":{"role":"assistant","content":" You","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+            data: {"id":"gen-1758704099-c4uoTxChRtWJGtMjfaVK","provider":"DeepInfra","model":"deepseek/deepseek-chat-v3.1:free","object":"chat.completion.chunk","created":1758704099,"choices":[{"index":0,"delta":{"role":"assistant","content":" might want","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+            data: {"id":"gen-1758704099-c4uoTxChRtWJGtMjfaVK","provider":"DeepInfra","model":"deepseek/deepseek-chat-v3.1:free","object":"chat.completion.chunk","created":1758704099,"choices":[{"index":0,"delta":{"role":"assistant","content":" to stay","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+            data: {"id":"gen-1758704099-c4uoTxChRtWJGtMjfaVK","provider":"DeepInfra","model":"deepseek/deepseek-chat-v3.1:free","object":"chat.completion.chunk","created":1758704099,"choices":[{"index":0,"delta":{"role":"assistant","content":" hydrated and","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+            data: {"id":"gen-1758704099-c4uoTxChRtWJGtMjfaVK","provider":"DeepInfra","model":"deepseek/deepseek-chat-v3.1:free","object":"chat.completion.chunk","created":1758704099,"choices":[{"index":0,"delta":{"role":"assistant","content":" seek shade","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+            data: {"id":"gen-1758704099-c4uoTxChRtWJGtMjfaVK","provider":"DeepInfra","model":"deepseek/deepseek-chat-v3.1:free","object":"chat.completion.chunk","created":1758704099,"choices":[{"index":0,"delta":{"role":"assistant","content":" if you","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+            data: {"id":"gen-1758704099-c4uoTxChRtWJGtMjfaVK","provider":"DeepInfra","model":"deepseek/deepseek-chat-v3.1:free","object":"chat.completion.chunk","created":1758704099,"choices":[{"index":0,"delta":{"role":"assistant","content":"'re planning","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+            data: {"id":"gen-1758704099-c4uoTxChRtWJGtMjfaVK","provider":"DeepInfra","model":"deepseek/deepseek-chat-v3.1:free","object":"chat.completion.chunk","created":1758704099,"choices":[{"index":0,"delta":{"role":"assistant","content":" to","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+            data: {"id":"gen-1758704099-c4uoTxChRtWJGtMjfaVK","provider":"DeepInfra","model":"deepseek/deepseek-chat-v3.1:free","object":"chat.completion.chunk","created":1758704099,"choices":[{"index":0,"delta":{"role":"assistant","content":" be outdoors","reasoning":null,"reasoning_details":[]},"finish_reason":null,"native_finish_reason":null,"logprobs":null}]}
+
+            data: {"id":"gen-1758704099-c4uoTxChRtWJGtMjfaVK","provider":"DeepInfra","model":"deepseek/deepseek-chat-v3.1:free","object":"chat.completion.chunk","created":1758704099,"choices":[{"index":0,"delta":{"role":"assistant","content":".","reasoning":null,"reasoning_details":[]},"finish_reason":"stop","native_finish_reason":"stop","logprobs":null}]}
+
+            data: {"id":"gen-1758704099-c4uoTxChRtWJGtMjfaVK","provider":"DeepInfra","model":"deepseek/deepseek-chat-v3.1:free","object":"chat.completion.chunk","created":1758704099,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null,"native_finish_reason":null,"logprobs":null}],"usage":{"prompt_tokens":192,"completion_tokens":37,"total_tokens":229,"cost":0,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0,"upstream_inference_completions_cost":0},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0}}}
+
+            data: [DONE]
+
+        headers:
+            Content-Type:
+              - text/event-stream
+        status: 200 OK
+        code: 200
+        duration: 866.230792ms