test: add integrations tests for llama.cpp + gpt-oss (#49)

Andrey Nering created

Change summary

providertests/common_test.go                                                                  |   3 
providertests/openaicompat_test.go                                                            |  13 
providertests/testdata/TestOpenAICompatibleCommon/llama-cpp-gpt-oss/simple.yaml               |  32 
providertests/testdata/TestOpenAICompatibleCommon/llama-cpp-gpt-oss/simple_streaming.yaml     | 146 
providertests/testdata/TestOpenAICompatibleCommon/llama-cpp-gpt-oss/tool.yaml                 |  54 
providertests/testdata/TestOpenAICompatibleCommon/llama-cpp-gpt-oss/tool_streaming.yaml       | 245 
providertests/testdata/TestOpenAICompatibleThinking/llama-cpp-gpt-oss/thinking-streaming.yaml | 327 
providertests/testdata/TestOpenAICompatibleThinking/llama-cpp-gpt-oss/thinking.yaml           |  54 
8 files changed, 874 insertions(+)

Detailed changes

providertests/common_test.go 🔗

@@ -182,6 +182,9 @@ func testMultiTool(t *testing.T, pair builderPair) {
 	if strings.Contains(pair.name, "openai") && strings.Contains(pair.name, "o4-mini") {
 		t.Skip("skipping multi-tool tests for openai o4-mini it for some reason is not doing parallel tool calls even if asked")
 	}
+	if strings.Contains(pair.name, "llama-cpp") && strings.Contains(pair.name, "gpt-oss") {
+		t.Skip("skipping multi-tool tests for llama-cpp gpt-oss as it does not support parallel multi-tool calls")
+	}
 
 	type CalculatorInput struct {
 		A int `json:"a" description:"first number"`

providertests/openaicompat_test.go 🔗

@@ -19,6 +19,7 @@ func TestOpenAICompatibleCommon(t *testing.T) {
 		{"groq-kimi-k2", builderGroq, nil, nil},
 		{"zai-glm-4.5", builderZAIGLM45, nil, nil},
 		{"huggingface-qwen3-coder", builderHuggingFace, nil, nil},
+		{"llama-cpp-gpt-oss", builderLlamaCppGptOss, nil, nil},
 	})
 }
 
@@ -31,6 +32,7 @@ func TestOpenAICompatibleThinking(t *testing.T) {
 	testThinking(t, []builderPair{
 		{"xai-grok-3-mini", builderXAIGrok3Mini, opts, nil},
 		{"zai-glm-4.5", builderZAIGLM45, opts, nil},
+		{"llama-cpp-gpt-oss", builderLlamaCppGptOss, opts, nil},
 	}, testOpenAICompatThinking)
 }
 
@@ -119,3 +121,14 @@ func builderHuggingFace(t *testing.T, r *recorder.Recorder) (fantasy.LanguageMod
 	}
 	return provider.LanguageModel(t.Context(), "Qwen/Qwen3-Coder-480B-A35B-Instruct:cerebras")
 }
+
+func builderLlamaCppGptOss(t *testing.T, r *recorder.Recorder) (fantasy.LanguageModel, error) {
+	provider, err := openaicompat.New(
+		openaicompat.WithBaseURL("http://localhost:8080/v1"),
+		openaicompat.WithHTTPClient(&http.Client{Transport: r}),
+	)
+	if err != nil {
+		return nil, err
+	}
+	return provider.LanguageModel(t.Context(), "openai/gpt-oss-20b")
+}

providertests/testdata/TestOpenAICompatibleCommon/llama-cpp-gpt-oss/simple.yaml 🔗

@@ -0,0 +1,32 @@
+---
+version: 2
+interactions:
+- id: 0
+  request:
+    proto: HTTP/1.1
+    proto_major: 1
+    proto_minor: 1
+    content_length: 179
+    host: ""
+    body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"Say hi in Portuguese","role":"user"}],"model":"openai/gpt-oss-20b","max_completion_tokens":4000}'
+    headers:
+      Accept:
+      - application/json
+      Content-Type:
+      - application/json
+      User-Agent:
+      - OpenAI/Go 2.7.1
+    url: http://localhost:8080/v1/chat/completions
+    method: POST
+  response:
+    proto: HTTP/1.1
+    proto_major: 1
+    proto_minor: 1
+    content_length: 780
+    body: '{"choices":[{"finish_reason":"stop","index":0,"message":{"role":"assistant","reasoning_content":"User says: \"Say hi in Portuguese\". So just respond with \"Olá!\" Possibly also \"Oi!\" Should I reply in Portuguese? Likely just \"Olá!\". Use friendly tone.","content":"Olá!"}}],"created":1761672364,"model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion","usage":{"completion_tokens":49,"prompt_tokens":84,"total_tokens":133},"id":"chatcmpl-e6UiQRCWY30H3zRV5s6NwP6whRuauvgL","timings":{"cache_n":62,"prompt_n":22,"prompt_ms":3021.023,"prompt_per_token_ms":137.3192272727273,"prompt_per_second":7.282301392607735,"predicted_n":49,"predicted_ms":676.643,"predicted_per_token_ms":13.809040816326531,"predicted_per_second":72.41632589120111}}'
+    headers:
+      Content-Type:
+      - application/json; charset=utf-8
+    status: 200 OK
+    code: 200
+    duration: 3.946099125s

providertests/testdata/TestOpenAICompatibleCommon/llama-cpp-gpt-oss/simple_streaming.yaml 🔗

@@ -0,0 +1,146 @@
+---
+version: 2
+interactions:
+- id: 0
+  request:
+    proto: HTTP/1.1
+    proto_major: 1
+    proto_minor: 1
+    content_length: 233
+    host: ""
+    body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"Say hi in Portuguese","role":"user"}],"model":"openai/gpt-oss-20b","max_completion_tokens":4000,"stream_options":{"include_usage":true},"stream":true}'
+    headers:
+      Accept:
+      - application/json
+      Content-Type:
+      - application/json
+      User-Agent:
+      - OpenAI/Go 2.7.1
+    url: http://localhost:8080/v1/chat/completions
+    method: POST
+  response:
+    proto: HTTP/1.1
+    proto_major: 1
+    proto_minor: 1
+    transfer_encoding:
+    - chunked
+    content_length: -1
+    body: |+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"role":"assistant","content":null}}],"created":1761672364,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":"User"}}],"created":1761672364,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":":"}}],"created":1761672364,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" \""}}],"created":1761672364,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":"Say"}}],"created":1761672364,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" hi"}}],"created":1761672364,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" in"}}],"created":1761672364,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" Portuguese"}}],"created":1761672364,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":"\"."}}],"created":1761672364,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" So"}}],"created":1761672364,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" we"}}],"created":1761672364,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" answer"}}],"created":1761672364,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" \""}}],"created":1761672364,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":"Olá"}}],"created":1761672364,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":"!\""}}],"created":1761672364,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" or"}}],"created":1761672364,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" \""}}],"created":1761672364,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":"Oi"}}],"created":1761672364,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":"!\""}}],"created":1761672364,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" We"}}],"created":1761672365,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" should"}}],"created":1761672365,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" be"}}],"created":1761672365,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" helpful"}}],"created":1761672365,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":"."}}],"created":1761672365,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" Provide"}}],"created":1761672365,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" a"}}],"created":1761672365,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" greeting"}}],"created":1761672365,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" in"}}],"created":1761672365,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" Portuguese"}}],"created":1761672365,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":"."}}],"created":1761672365,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" Possibly"}}],"created":1761672365,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" mention"}}],"created":1761672365,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" that"}}],"created":1761672365,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" \""}}],"created":1761672365,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":"Olá"}}],"created":1761672365,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":"\""}}],"created":1761672365,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" is"}}],"created":1761672365,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" formal"}}],"created":1761672365,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":","}}],"created":1761672365,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" \""}}],"created":1761672365,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":"Oi"}}],"created":1761672365,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":"\""}}],"created":1761672365,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" informal"}}],"created":1761672365,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":"."}}],"created":1761672365,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" Let's"}}],"created":1761672365,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" answer"}}],"created":1761672365,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" simply"}}],"created":1761672365,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":":"}}],"created":1761672365,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" \""}}],"created":1761672365,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":"Olá"}}],"created":1761672365,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":"!\""}}],"created":1761672365,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"content":"Olá"}}],"created":1761672365,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"content":"!"}}],"created":1761672365,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":"stop","index":0,"delta":{}}],"created":1761672365,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[],"created":1761672365,"id":"chatcmpl-5P1d7PznEZm693insxrVQc0jmEtWlHUA","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk","usage":{"completion_tokens":62,"prompt_tokens":84,"total_tokens":146},"timings":{"cache_n":83,"prompt_n":1,"prompt_ms":14.682,"prompt_per_token_ms":14.682,"prompt_per_second":68.11061163329246,"predicted_n":62,"predicted_ms":871.397,"predicted_per_token_ms":14.054790322580645,"predicted_per_second":71.15011871741582}}
+
+      data: [DONE]
+
+    headers:
+      Content-Type:
+      - text/event-stream
+    status: 200 OK
+    code: 200
+    duration: 780.083µs

providertests/testdata/TestOpenAICompatibleCommon/llama-cpp-gpt-oss/tool.yaml 🔗

@@ -0,0 +1,61 @@
+---
+version: 2
+interactions:
+- id: 0
+  request:
+    proto: HTTP/1.1
+    proto_major: 1
+    proto_minor: 1
+    content_length: 471
+    host: ""
+    body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"What''s the weather in Florence,Italy?","role":"user"}],"model":"openai/gpt-oss-20b","max_completion_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"}]}'
+    headers:
+      Accept:
+      - application/json
+      Content-Type:
+      - application/json
+      User-Agent:
+      - OpenAI/Go 2.7.1
+    url: http://localhost:8080/v1/chat/completions
+    method: POST
+  response:
+    proto: HTTP/1.1
+    proto_major: 1
+    proto_minor: 1
+    content_length: 803
+    body: '{"choices":[{"finish_reason":"tool_calls","index":0,"message":{"role":"assistant","reasoning_content":"We need to call the weather function.","content":null,"tool_calls":[{"type":"function","function":{"name":"weather","arguments":"{\"location\":\"Florence, Italy\"}"},"id":"iSI9CucmKnbtrkxFldJPg3gSXbJ3Eom9"}]}}],"created":1761672366,"model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion","usage":{"completion_tokens":34,"prompt_tokens":139,"total_tokens":173},"id":"chatcmpl-5ubBAQ1OuDgakYNl3FcW2ZzxP6PLPfv4","timings":{"cache_n":59,"prompt_n":80,"prompt_ms":292.99,"prompt_per_token_ms":3.662375,"prompt_per_second":273.0468616676337,"predicted_n":34,"predicted_ms":462.897,"predicted_per_token_ms":13.614617647058823,"predicted_per_second":73.45046522228488}}'
+    headers:
+      Content-Type:
+      - application/json; charset=utf-8
+    status: 200 OK
+    code: 200
+    duration: 760.630834ms
+- id: 1
+  request:
+    proto: HTTP/1.1
+    proto_major: 1
+    proto_minor: 1
+    content_length: 729
+    host: ""
+    body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"What''s the weather in Florence,Italy?","role":"user"},{"tool_calls":[{"id":"iSI9CucmKnbtrkxFldJPg3gSXbJ3Eom9","function":{"arguments":"{\"location\":\"Florence, Italy\"}","name":"weather"},"type":"function"}],"role":"assistant"},{"content":"40 C","tool_call_id":"iSI9CucmKnbtrkxFldJPg3gSXbJ3Eom9","role":"tool"}],"model":"openai/gpt-oss-20b","max_completion_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"}]}'
+    headers:
+      Accept:
+      - application/json
+      Content-Type:
+      - application/json
+      User-Agent:
+      - OpenAI/Go 2.7.1
+    url: http://localhost:8080/v1/chat/completions
+    method: POST
+  response:
+    proto: HTTP/1.1
+    proto_major: 1
+    proto_minor: 1
+    content_length: 1240

providertests/testdata/TestOpenAICompatibleCommon/llama-cpp-gpt-oss/tool_streaming.yaml 🔗

@@ -0,0 +1,245 @@
+---
+version: 2
+interactions:
+- id: 0
+  request:
+    proto: HTTP/1.1
+    proto_major: 1
+    proto_minor: 1
+    content_length: 525
+    host: ""
+    body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"What''s the weather in Florence,Italy?","role":"user"}],"model":"openai/gpt-oss-20b","max_completion_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"}],"stream":true}'
+    headers:
+      Accept:
+      - application/json
+      Content-Type:
+      - application/json
+      User-Agent:
+      - OpenAI/Go 2.7.1
+    url: http://localhost:8080/v1/chat/completions
+    method: POST
+  response:
+    proto: HTTP/1.1
+    proto_major: 1
+    proto_minor: 1
+    transfer_encoding:
+    - chunked
+    content_length: -1
+    body: |+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"role":"assistant","content":null}}],"created":1761672368,"id":"chatcmpl-vHnyyi5Z6RRKTtbLzBj23g4Hf8jOhXs5","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":"The"}}],"created":1761672368,"id":"chatcmpl-vHnyyi5Z6RRKTtbLzBj23g4Hf8jOhXs5","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" user"}}],"created":1761672368,"id":"chatcmpl-vHnyyi5Z6RRKTtbLzBj23g4Hf8jOhXs5","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" asks"}}],"created":1761672368,"id":"chatcmpl-vHnyyi5Z6RRKTtbLzBj23g4Hf8jOhXs5","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" for"}}],"created":1761672368,"id":"chatcmpl-vHnyyi5Z6RRKTtbLzBj23g4Hf8jOhXs5","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" weather"}}],"created":1761672368,"id":"chatcmpl-vHnyyi5Z6RRKTtbLzBj23g4Hf8jOhXs5","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" in"}}],"created":1761672368,"id":"chatcmpl-vHnyyi5Z6RRKTtbLzBj23g4Hf8jOhXs5","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" Florence"}}],"created":1761672368,"id":"chatcmpl-vHnyyi5Z6RRKTtbLzBj23g4Hf8jOhXs5","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":","}}],"created":1761672368,"id":"chatcmpl-vHnyyi5Z6RRKTtbLzBj23g4Hf8jOhXs5","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" Italy"}}],"created":1761672368,"id":"chatcmpl-vHnyyi5Z6RRKTtbLzBj23g4Hf8jOhXs5","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":"."}}],"created":1761672368,"id":"chatcmpl-vHnyyi5Z6RRKTtbLzBj23g4Hf8jOhXs5","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" We"}}],"created":1761672368,"id":"chatcmpl-vHnyyi5Z6RRKTtbLzBj23g4Hf8jOhXs5","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" can"}}],"created":1761672368,"id":"chatcmpl-vHnyyi5Z6RRKTtbLzBj23g4Hf8jOhXs5","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" use"}}],"created":1761672368,"id":"chatcmpl-vHnyyi5Z6RRKTtbLzBj23g4Hf8jOhXs5","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" the"}}],"created":1761672368,"id":"chatcmpl-vHnyyi5Z6RRKTtbLzBj23g4Hf8jOhXs5","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" weather"}}],"created":1761672368,"id":"chatcmpl-vHnyyi5Z6RRKTtbLzBj23g4Hf8jOhXs5","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" function"}}],"created":1761672368,"id":"chatcmpl-vHnyyi5Z6RRKTtbLzBj23g4Hf8jOhXs5","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":"."}}],"created":1761672368,"id":"chatcmpl-vHnyyi5Z6RRKTtbLzBj23g4Hf8jOhXs5","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"tool_calls":[{"index":0,"id":"tNkZIM2wWGCzRoFvK6X0TdhHhAYj6fVY","type":"function","function":{"name":"weather","arguments":"{\""}}]}}],"created":1761672369,"id":"chatcmpl-vHnyyi5Z6RRKTtbLzBj23g4Hf8jOhXs5","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"location"}}]}}],"created":1761672369,"id":"chatcmpl-vHnyyi5Z6RRKTtbLzBj23g4Hf8jOhXs5","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\":\""}}]}}],"created":1761672369,"id":"chatcmpl-vHnyyi5Z6RRKTtbLzBj23g4Hf8jOhXs5","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"Flor"}}]}}],"created":1761672369,"id":"chatcmpl-vHnyyi5Z6RRKTtbLzBj23g4Hf8jOhXs5","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"ence"}}]}}],"created":1761672369,"id":"chatcmpl-vHnyyi5Z6RRKTtbLzBj23g4Hf8jOhXs5","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\"}"}}]}}],"created":1761672369,"id":"chatcmpl-vHnyyi5Z6RRKTtbLzBj23g4Hf8jOhXs5","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":"tool_calls","index":0,"delta":{}}],"created":1761672369,"id":"chatcmpl-vHnyyi5Z6RRKTtbLzBj23g4Hf8jOhXs5","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[],"created":1761672369,"id":"chatcmpl-vHnyyi5Z6RRKTtbLzBj23g4Hf8jOhXs5","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk","usage":{"completion_tokens":41,"prompt_tokens":139,"total_tokens":180},"timings":{"cache_n":138,"prompt_n":1,"prompt_ms":14.889,"prompt_per_token_ms":14.889,"prompt_per_second":67.16367788300087,"predicted_n":41,"predicted_ms":579.8,"predicted_per_token_ms":14.141463414634146,"predicted_per_second":70.7140393239048}}
+
+      data: [DONE]
+
+    headers:
+      Content-Type:
+      - text/event-stream
+    status: 200 OK
+    code: 200
+    duration: 1.004916ms
+- id: 1
+  request:
+    proto: HTTP/1.1
+    proto_major: 1
+    proto_minor: 1
+    content_length: 776
+    host: ""
+    body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"What''s the weather in Florence,Italy?","role":"user"},{"tool_calls":[{"id":"tNkZIM2wWGCzRoFvK6X0TdhHhAYj6fVY","function":{"arguments":"{\"location\":\"Florence\"}","name":"weather"},"type":"function"}],"role":"assistant"},{"content":"40 C","tool_call_id":"tNkZIM2wWGCzRoFvK6X0TdhHhAYj6fVY","role":"tool"}],"model":"openai/gpt-oss-20b","max_completion_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"}],"stream":true}'
+    headers:
+      Accept:
+      - application/json
+      Content-Type:
+      - application/json
+      User-Agent:
+      - OpenAI/Go 2.7.1
+    url: http://localhost:8080/v1/chat/completions
+    method: POST
+  response:
+    proto: HTTP/1.1
+    proto_major: 1
+    proto_minor: 1
+    transfer_encoding:
+    - chunked
+    content_length: -1
+    body: |+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"role":"assistant","content":null}}],"created":1761672369,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":"We"}}],"created":1761672369,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" need"}}],"created":1761672369,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" to"}}],"created":1761672369,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" respond"}}],"created":1761672369,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":"."}}],"created":1761672369,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" The"}}],"created":1761672369,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" function"}}],"created":1761672369,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" returned"}}],"created":1761672369,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" \""}}],"created":1761672369,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":"40"}}],"created":1761672369,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" C"}}],"created":1761672369,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":"\"."}}],"created":1761672369,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" That"}}],"created":1761672369,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" seems"}}],"created":1761672369,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" unrealistic"}}],"created":1761672369,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":"."}}],"created":1761672369,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" We"}}],"created":1761672369,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" should"}}],"created":1761672369,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" trust"}}],"created":1761672369,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" the"}}],"created":1761672369,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" function"}}],"created":1761672369,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":"'s"}}],"created":1761672369,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" output"}}],"created":1761672369,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":":"}}],"created":1761672369,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" 40"}}],"created":1761672369,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":"°C"}}],"created":1761672369,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":"."}}],"created":1761672369,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" But"}}],"created":1761672369,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" maybe"}}],"created":1761672369,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" we"}}],"created":1761672369,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" need"}}],"created":1761672369,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" to"}}],"created":1761672369,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" mention"}}],"created":1761672369,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" that"}}],"created":1761672369,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" it's"}}],"created":1761672369,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" a"}}],"created":1761672369,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" forecast"}}],"created":1761672369,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":"?"}}],"created":1761672369,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" We"}}],"created":1761672369,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" can"}}],"created":1761672369,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" provide"}}],"created":1761672369,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" that"}}],"created":1761672369,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" answer"}}],"created":1761672369,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":"."}}],"created":1761672369,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"content":"The"}}],"created":1761672370,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"content":" current"}}],"created":1761672370,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"content":" temperature"}}],"created":1761672370,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"content":" in"}}],"created":1761672370,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"content":" Florence"}}],"created":1761672370,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"content":","}}],"created":1761672370,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"content":" Italy"}}],"created":1761672370,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"content":","}}],"created":1761672370,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"content":" is"}}],"created":1761672370,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"content":" **"}}],"created":1761672370,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"content":"40"}}],"created":1761672370,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"content":" "}}],"created":1761672370,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"content":"°C"}}],"created":1761672370,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"content":"**"}}],"created":1761672370,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"content":"."}}],"created":1761672370,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":"stop","index":0,"delta":{}}],"created":1761672370,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[],"created":1761672370,"id":"chatcmpl-T7agzjyEnF0tBCU21JdEcZ8cpz6QFL4V","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk","usage":{"completion_tokens":70,"prompt_tokens":173,"total_tokens":243},"timings":{"cache_n":139,"prompt_n":34,"prompt_ms":143.047,"prompt_per_token_ms":4.207264705882353,"prompt_per_second":237.68411780743392,"predicted_n":70,"predicted_ms":980.894,"predicted_per_token_ms":14.012771428571428,"predicted_per_second":71.3634704667375}}
+
+      data: [DONE]
+
+    headers:
+      Content-Type:
+      - text/event-stream
+    status: 200 OK
+    code: 200
+    duration: 2.142916ms

providertests/testdata/TestOpenAICompatibleThinking/llama-cpp-gpt-oss/thinking-streaming.yaml 🔗

@@ -0,0 +1,327 @@
+---
+version: 2
+interactions:
+- id: 0
+  request:
+    proto: HTTP/1.1
+    proto_major: 1
+    proto_minor: 1
+    content_length: 523
+    host: ""
+    body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"What''s the weather in Florence, Italy?","role":"user"}],"model":"openai/gpt-oss-20b","reasoning_effort":"high","stream_options":{"include_usage":true},"tool_choice":"auto","tools":[{"function":{"name":"weather","strict":false,"description":"Get weather information for a location","parameters":{"properties":{"location":{"description":"the city","type":"string"}},"required":["location"],"type":"object"}},"type":"function"}],"stream":true}'
+    headers:
+      Accept:
+      - application/json
+      Content-Type:
+      - application/json
+      User-Agent:
+      - OpenAI/Go 2.7.1
+    url: http://localhost:8080/v1/chat/completions
+    method: POST
+  response:
+    proto: HTTP/1.1
+    proto_major: 1
+    proto_minor: 1
+    transfer_encoding:
+    - chunked
+    content_length: -1
+    body: |+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"role":"assistant","content":null}}],"created":1761672728,"id":"chatcmpl-6VnA4IQXB7MUKijyHkcSCKqZpkFTSwfL","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":"We"}}],"created":1761672728,"id":"chatcmpl-6VnA4IQXB7MUKijyHkcSCKqZpkFTSwfL","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" need"}}],"created":1761672728,"id":"chatcmpl-6VnA4IQXB7MUKijyHkcSCKqZpkFTSwfL","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" to"}}],"created":1761672728,"id":"chatcmpl-6VnA4IQXB7MUKijyHkcSCKqZpkFTSwfL","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" call"}}],"created":1761672728,"id":"chatcmpl-6VnA4IQXB7MUKijyHkcSCKqZpkFTSwfL","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" the"}}],"created":1761672728,"id":"chatcmpl-6VnA4IQXB7MUKijyHkcSCKqZpkFTSwfL","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" weather"}}],"created":1761672728,"id":"chatcmpl-6VnA4IQXB7MUKijyHkcSCKqZpkFTSwfL","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" function"}}],"created":1761672728,"id":"chatcmpl-6VnA4IQXB7MUKijyHkcSCKqZpkFTSwfL","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":"."}}],"created":1761672728,"id":"chatcmpl-6VnA4IQXB7MUKijyHkcSCKqZpkFTSwfL","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"tool_calls":[{"index":0,"id":"Q2J4SAYY3S9Bwuymis3vFUCFquG4g5Za","type":"function","function":{"name":"weather","arguments":"{\""}}]}}],"created":1761672728,"id":"chatcmpl-6VnA4IQXB7MUKijyHkcSCKqZpkFTSwfL","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"location"}}]}}],"created":1761672728,"id":"chatcmpl-6VnA4IQXB7MUKijyHkcSCKqZpkFTSwfL","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\":\""}}]}}],"created":1761672728,"id":"chatcmpl-6VnA4IQXB7MUKijyHkcSCKqZpkFTSwfL","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"Flor"}}]}}],"created":1761672728,"id":"chatcmpl-6VnA4IQXB7MUKijyHkcSCKqZpkFTSwfL","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"ence"}}]}}],"created":1761672728,"id":"chatcmpl-6VnA4IQXB7MUKijyHkcSCKqZpkFTSwfL","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":","}}]}}],"created":1761672728,"id":"chatcmpl-6VnA4IQXB7MUKijyHkcSCKqZpkFTSwfL","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" Italy"}}]}}],"created":1761672728,"id":"chatcmpl-6VnA4IQXB7MUKijyHkcSCKqZpkFTSwfL","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\"}"}}]}}],"created":1761672728,"id":"chatcmpl-6VnA4IQXB7MUKijyHkcSCKqZpkFTSwfL","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":"tool_calls","index":0,"delta":{}}],"created":1761672728,"id":"chatcmpl-6VnA4IQXB7MUKijyHkcSCKqZpkFTSwfL","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[],"created":1761672728,"id":"chatcmpl-6VnA4IQXB7MUKijyHkcSCKqZpkFTSwfL","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk","usage":{"completion_tokens":34,"prompt_tokens":139,"total_tokens":173},"timings":{"cache_n":138,"prompt_n":1,"prompt_ms":15.016,"prompt_per_token_ms":15.016,"prompt_per_second":66.59563132658498,"predicted_n":34,"predicted_ms":475.989,"predicted_per_token_ms":13.999676470588234,"predicted_per_second":71.43022212698193}}
+
+      data: [DONE]
+
+    headers:
+      Content-Type:
+      - text/event-stream
+    status: 200 OK
+    code: 200
+    duration: 1.124ms
+- id: 1
+  request:
+    proto: HTTP/1.1
+    proto_major: 1
+    proto_minor: 1
+    content_length: 781
+    host: ""
+    body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"What''s the weather in Florence, Italy?","role":"user"},{"tool_calls":[{"id":"Q2J4SAYY3S9Bwuymis3vFUCFquG4g5Za","function":{"arguments":"{\"location\":\"Florence, Italy\"}","name":"weather"},"type":"function"}],"role":"assistant"},{"content":"40 C","tool_call_id":"Q2J4SAYY3S9Bwuymis3vFUCFquG4g5Za","role":"tool"}],"model":"openai/gpt-oss-20b","reasoning_effort":"high","stream_options":{"include_usage":true},"tool_choice":"auto","tools":[{"function":{"name":"weather","strict":false,"description":"Get weather information for a location","parameters":{"properties":{"location":{"description":"the city","type":"string"}},"required":["location"],"type":"object"}},"type":"function"}],"stream":true}'
+    headers:
+      Accept:
+      - application/json
+      Content-Type:
+      - application/json
+      User-Agent:
+      - OpenAI/Go 2.7.1
+    url: http://localhost:8080/v1/chat/completions
+    method: POST
+  response:
+    proto: HTTP/1.1
+    proto_major: 1
+    proto_minor: 1
+    transfer_encoding:
+    - chunked
+    content_length: -1
+    body: |+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"role":"assistant","content":null}}],"created":1761672728,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":"We"}}],"created":1761672728,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" need"}}],"created":1761672728,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" to"}}],"created":1761672728,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" respond"}}],"created":1761672728,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" to"}}],"created":1761672728,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" user"}}],"created":1761672728,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":":"}}],"created":1761672728,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" \""}}],"created":1761672728,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":"What's"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" the"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" weather"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" in"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" Florence"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":","}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" Italy"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":"?\""}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" We"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" called"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" weather"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" function"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" which"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" returned"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" \""}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":"40"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" C"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":"\"."}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" That"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" is"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" presumably"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" the"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" temperature"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":"."}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" We"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" need"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" to"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" respond"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":"."}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" According"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" to"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" instruction"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":":"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" \""}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":"You"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" are"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" a"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" helpful"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" assistant"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":".\""}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" So"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" we"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" should"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" respond"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" with"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" a"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" concise"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" answer"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":":"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" \""}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":"The"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" weather"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" in"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" Florence"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":","}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" Italy"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" is"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" 40"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":"°C"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":"\""}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" maybe"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" include"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" other"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" details"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" like"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" \""}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":"sun"}}],"created":1761672729,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":"ny"}}],"created":1761672730,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":"\""}}],"created":1761672730,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" or"}}],"created":1761672730,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" \""}}],"created":1761672730,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":"clear"}}],"created":1761672730,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":"\""}}],"created":1761672730,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" but"}}],"created":1761672730,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" not"}}],"created":1761672730,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" provided"}}],"created":1761672730,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":"."}}],"created":1761672730,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" Just"}}],"created":1761672730,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" temperature"}}],"created":1761672730,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":"."}}],"created":1761672730,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" We'll"}}],"created":1761672730,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" provide"}}],"created":1761672730,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" the"}}],"created":1761672730,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":" answer"}}],"created":1761672730,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"reasoning_content":"."}}],"created":1761672730,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"content":"The"}}],"created":1761672730,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"content":" current"}}],"created":1761672730,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"content":" weather"}}],"created":1761672730,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"content":" in"}}],"created":1761672730,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"content":" Florence"}}],"created":1761672730,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"content":","}}],"created":1761672730,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"content":" Italy"}}],"created":1761672730,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"content":" is"}}],"created":1761672730,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"content":" **"}}],"created":1761672730,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"content":"40"}}],"created":1761672730,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"content":" "}}],"created":1761672730,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"content":"°C"}}],"created":1761672730,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"content":"**"}}],"created":1761672730,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":null,"index":0,"delta":{"content":"."}}],"created":1761672730,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[{"finish_reason":"stop","index":0,"delta":{}}],"created":1761672730,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk"}
+
+      data: {"choices":[],"created":1761672730,"id":"chatcmpl-OEqywDEaa0oaGwjbamEm70IhcnFFxSyH","model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion.chunk","usage":{"completion_tokens":118,"prompt_tokens":175,"total_tokens":293},"timings":{"cache_n":139,"prompt_n":36,"prompt_ms":155.914,"prompt_per_token_ms":4.3309444444444445,"prompt_per_second":230.8965198763421,"predicted_n":118,"predicted_ms":1737.289,"predicted_per_token_ms":14.72278813559322,"predicted_per_second":67.92191742421669}}
+
+      data: [DONE]
+
+    headers:
+      Content-Type:
+      - text/event-stream
+    status: 200 OK
+    code: 200
+    duration: 6.87925ms

providertests/testdata/TestOpenAICompatibleThinking/llama-cpp-gpt-oss/thinking.yaml 🔗

@@ -0,0 +1,61 @@
+---
+version: 2
+interactions:
+- id: 0
+  request:
+    proto: HTTP/1.1
+    proto_major: 1
+    proto_minor: 1
+    content_length: 469
+    host: ""
+    body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"What''s the weather in Florence, Italy?","role":"user"}],"model":"openai/gpt-oss-20b","reasoning_effort":"high","tool_choice":"auto","tools":[{"function":{"name":"weather","strict":false,"description":"Get weather information for a location","parameters":{"properties":{"location":{"description":"the city","type":"string"}},"required":["location"],"type":"object"}},"type":"function"}]}'
+    headers:
+      Accept:
+      - application/json
+      Content-Type:
+      - application/json
+      User-Agent:
+      - OpenAI/Go 2.7.1
+    url: http://localhost:8080/v1/chat/completions
+    method: POST
+  response:
+    proto: HTTP/1.1
+    proto_major: 1
+    proto_minor: 1
+    content_length: 905
+    body: '{"choices":[{"finish_reason":"tool_calls","index":0,"message":{"role":"assistant","reasoning_content":"User asks: \"What''s the weather in Florence, Italy?\" We have a tool \"weather\" to get weather information. We should call it.","content":null,"tool_calls":[{"type":"function","function":{"name":"weather","arguments":"{\"location\":\"Florence, Italy\"}"},"id":"u36jVf07R9qUqfK2POEsHz6i6DUtUlrb"}]}}],"created":1761672726,"model":"openai/gpt-oss-20b","system_fingerprint":"b6865-1c1409e13","object":"chat.completion","usage":{"completion_tokens":55,"prompt_tokens":139,"total_tokens":194},"id":"chatcmpl-4kIkhSfHyNWuEKyYA5E7TAJXPd43t4TA","timings":{"cache_n":134,"prompt_n":5,"prompt_ms":2466.686,"prompt_per_token_ms":493.33720000000005,"prompt_per_second":2.027011139642419,"predicted_n":55,"predicted_ms":758.656,"predicted_per_token_ms":13.793745454545453,"predicted_per_second":72.49662561160791}}'
+    headers:
+      Content-Type:
+      - application/json; charset=utf-8
+    status: 200 OK
+    code: 200
+    duration: 3.241207416s
+- id: 1
+  request:
+    proto: HTTP/1.1
+    proto_major: 1
+    proto_minor: 1
+    content_length: 727
+    host: ""
+    body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"What''s the weather in Florence, Italy?","role":"user"},{"tool_calls":[{"id":"u36jVf07R9qUqfK2POEsHz6i6DUtUlrb","function":{"arguments":"{\"location\":\"Florence, Italy\"}","name":"weather"},"type":"function"}],"role":"assistant"},{"content":"40 C","tool_call_id":"u36jVf07R9qUqfK2POEsHz6i6DUtUlrb","role":"tool"}],"model":"openai/gpt-oss-20b","reasoning_effort":"high","tool_choice":"auto","tools":[{"function":{"name":"weather","strict":false,"description":"Get weather information for a location","parameters":{"properties":{"location":{"description":"the city","type":"string"}},"required":["location"],"type":"object"}},"type":"function"}]}'
+    headers:
+      Accept:
+      - application/json
+      Content-Type:
+      - application/json
+      User-Agent:
+      - OpenAI/Go 2.7.1
+    url: http://localhost:8080/v1/chat/completions
+    method: POST
+  response:
+    proto: HTTP/1.1
+    proto_major: 1
+    proto_minor: 1
+    content_length: 1115