thinking-streaming.yaml

 1---
 2version: 2
 3interactions:
 4- id: 0
 5  request:
 6    proto: HTTP/1.1
 7    proto_major: 1
 8    proto_minor: 1
 9    content_length: 535
10    host: ""
11    body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"What''s the weather in Florence, Italy?","role":"user"}],"model":"google/gemini-3-pro-preview","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"}],"reasoning":{"enabled":true},"stream":true}'
12    headers:
13      Accept:
14      - application/json
15      Content-Type:
16      - application/json
17      User-Agent:
18      - Charm-Fantasy/0.12.2 (https://charm.land/fantasy)
19    url: https://ai-gateway.vercel.sh/v1/chat/completions
20    method: POST
21  response:
22    proto: HTTP/2.0
23    proto_major: 2
24    proto_minor: 0
25    content_length: -1
26    body: |+
27      data: {"id":"gen_01KKHTVB9WRC8NGT5ZC2R0D858","object":"chat.completion.chunk","created":1773346339,"model":"google/gemini-3-pro-preview","choices":[{"index":0,"delta":{"role":"assistant"},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_p433c7t8nf"}
28
29      data: {"id":"gen_01KKHTVB9WRC8NGT5ZC2R0D858","object":"chat.completion.chunk","created":1773346339,"model":"google/gemini-3-pro-preview","choices":[{"index":0,"delta":{"reasoning":"**Determining the Weather**\n\nI've identified the need to find weather information, specifically for Florence, Italy. The `weather` function looks like the right tool for the job. I now plan to use this function, with \"Florence, Italy\" as the specified location.\n\n\n","reasoning_details":[{"type":"reasoning.text","text":"**Determining the Weather**\n\nI've identified the need to find weather information, specifically for Florence, Italy. The `weather` function looks like the right tool for the job. I now plan to use this function, with \"Florence, Italy\" as the specified location.\n\n\n","format":"google-gemini-v1","index":0}]},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_p433c7t8nf"}
30
31      data: {"id":"gen_01KKHTVB9WRC8NGT5ZC2R0D858","object":"chat.completion.chunk","created":1773346339,"model":"google/gemini-3-pro-preview","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"id":"dEDMKZ3Jd0omXRAI","type":"function","function":{"name":"weather","arguments":""}}]},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_p433c7t8nf"}
32
33      data: {"id":"gen_01KKHTVB9WRC8NGT5ZC2R0D858","object":"chat.completion.chunk","created":1773346339,"model":"google/gemini-3-pro-preview","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"{\"location\":\"Florence, Italy\"}"}}]},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_p433c7t8nf"}
34
35      data: {"id":"gen_01KKHTVB9WRC8NGT5ZC2R0D858","object":"chat.completion.chunk","created":1773346339,"model":"google/gemini-3-pro-preview","choices":[{"index":0,"delta":{"reasoning_details":[{"type":"reasoning.encrypted","data":"ClkBjz1rXyu/iVRBYGB7kj4h4fBbH2GfUNllgZdbYxVO6DLU7ioB+btKWRUu9KOf2ukWBRhiJlkp13MisyyX/cyBZdD3pLtpx+AxHk/p8F+Pimy9CEUvatCPjAprAY89a1+09sNY1Dq1Bgl+7P0ondLUifOYhwH7slpiYgwcY0Mo0z7PYnAjFvXapxVB5qM+v8IYF9vM0A45ylhiWMfZMTI2QCX6wCobMsyIfUvccD9jPTZhifECAwF9ByjJjucY6WoXUf/EW6UKqgEBjz1rX482god3h3483C9QfdoJ5GqI3cBheeWtr7uSCUvwpZMxtSlqt7A81xXIpxBxNkTyKPldjf1S2kkfOSVuitzuMpGzY/jT8Hs1aG7AD47fNQstRUvbfkmAgkok98WUThCVsKMBXOkoceA1GUN7sMjWrOGO4eaxrK45PrT1H7/BTvqhlNmBqkkUl2rF940AMP/TV2xXsK/PQLcEDncvE30L4bLOM3y7Vw==","format":"google-gemini-v1","index":0}]},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_p433c7t8nf"}
36
37      data: {"id":"gen_01KKHTVB9WRC8NGT5ZC2R0D858","object":"chat.completion.chunk","created":1773346339,"model":"google/gemini-3-pro-preview","choices":[{"index":0,"delta":{"provider_metadata":{"google":{"promptFeedback":null,"groundingMetadata":null,"urlContextMetadata":null,"safetyRatings":null,"usageMetadata":{"thoughtsTokenCount":61,"promptTokenCount":28,"candidatesTokenCount":9,"totalTokenCount":98,"trafficType":"PROVISIONED_THROUGHPUT"}},"gateway":{"routing":{"originalModelId":"google/gemini-3-pro-preview","resolvedProvider":"vertex","resolvedProviderApiModelId":"gemini-3-pro-preview","internalResolvedModelId":"vertex:gemini-3-pro-preview","fallbacksAvailable":["google"],"internalReasoning":"Selected vertex as preferred provider for gemini-3-pro-preview. 1 fallback(s) available: google","planningReasoning":"System credentials planned for: vertex, google. Total execution order: vertex(system) → google(system)","canonicalSlug":"google/gemini-3-pro-preview","finalProvider":"vertex","attempts":[{"provider":"vertex","internalModelId":"vertex:gemini-3-pro-preview","providerApiModelId":"gemini-3-pro-preview","credentialType":"system","success":true,"startTime":1352331.501136,"endTime":1355272.626807,"statusCode":200}],"modelAttemptCount":1,"modelAttempts":[{"modelId":"vertex:gemini-3-pro-preview","canonicalSlug":"google/gemini-3-pro-preview","success":true,"providerAttemptCount":1,"providerAttempts":[{"provider":"vertex","internalModelId":"vertex:gemini-3-pro-preview","providerApiModelId":"gemini-3-pro-preview","credentialType":"system","success":true,"startTime":1352331.501136,"endTime":1355272.626807,"statusCode":200}]}],"totalProviderAttemptCount":1},"cost":"0.000896","marketCost":"0.000896","generationId":"gen_01KKHTVB9WRC8NGT5ZC2R0D858","billableWebSearchCalls":0}}},"logprobs":null,"finish_reason":"tool_calls"}],"usage":{"prompt_tokens":28,"completion_tokens":9,"total_tokens":37,"cost":0.000896,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0,"upstream_inference_completions_cost":0},"completion_tokens_details":{"reasoning_tokens":61,"image_tokens":0},"cache_creation_input_tokens":0,"market_cost":0.000896},"system_fingerprint":"fp_p433c7t8nf","generationId":"gen_01KKHTVB9WRC8NGT5ZC2R0D858"}
38
39      data: [DONE]
40
41    headers:
42      Content-Type:
43      - text/event-stream
44    status: 200 OK
45    code: 200
46    duration: 3.112736667s
47- id: 1
48  request:
49    proto: HTTP/1.1
50    proto_major: 1
51    proto_minor: 1
52    content_length: 1362
53    host: ""
54    body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"What''s the weather in Florence, Italy?","role":"user"},{"tool_calls":[{"id":"dEDMKZ3Jd0omXRAI","function":{"arguments":"{\"location\":\"Florence, Italy\"}","name":"weather"},"type":"function"}],"role":"assistant","reasoning_details":[{"data":"ClkBjz1rXyu/iVRBYGB7kj4h4fBbH2GfUNllgZdbYxVO6DLU7ioB+btKWRUu9KOf2ukWBRhiJlkp13MisyyX/cyBZdD3pLtpx+AxHk/p8F+Pimy9CEUvatCPjAprAY89a1+09sNY1Dq1Bgl+7P0ondLUifOYhwH7slpiYgwcY0Mo0z7PYnAjFvXapxVB5qM+v8IYF9vM0A45ylhiWMfZMTI2QCX6wCobMsyIfUvccD9jPTZhifECAwF9ByjJjucY6WoXUf/EW6UKqgEBjz1rX482god3h3483C9QfdoJ5GqI3cBheeWtr7uSCUvwpZMxtSlqt7A81xXIpxBxNkTyKPldjf1S2kkfOSVuitzuMpGzY/jT8Hs1aG7AD47fNQstRUvbfkmAgkok98WUThCVsKMBXOkoceA1GUN7sMjWrOGO4eaxrK45PrT1H7/BTvqhlNmBqkkUl2rF940AMP/TV2xXsK/PQLcEDncvE30L4bLOM3y7Vw==","format":"google-gemini-v1","index":0,"type":"reasoning.encrypted"}]},{"content":"40 C","tool_call_id":"dEDMKZ3Jd0omXRAI","role":"tool"}],"model":"google/gemini-3-pro-preview","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"}],"reasoning":{"enabled":true},"stream":true}'
55    headers:
56      Accept:
57      - application/json
58      Content-Type:
59      - application/json
60      User-Agent:
61      - Charm-Fantasy/0.12.2 (https://charm.land/fantasy)
62    url: https://ai-gateway.vercel.sh/v1/chat/completions
63    method: POST
64  response:
65    proto: HTTP/2.0
66    proto_major: 2
67    proto_minor: 0
68    content_length: -1
69    body: |+
70      data: {"id":"gen_01KKHTVEAVVMNRR75QR8NY92FE","object":"chat.completion.chunk","created":1773346342,"model":"google/gemini-3-pro-preview","choices":[{"index":0,"delta":{"role":"assistant"},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_78a4119et1"}
71
72      data: {"id":"gen_01KKHTVEAVVMNRR75QR8NY92FE","object":"chat.completion.chunk","created":1773346342,"model":"google/gemini-3-pro-preview","choices":[{"index":0,"delta":{"reasoning":"**Reporting the Temperature**\n\nI've got the temperature data from the weather tool - a blistering 40 degrees Celsius. My next step is to compose the user's response. I'll provide a straightforward statement, informing them of the current temperature in Florence, Italy, in a clear and concise manner.\n\n\n","reasoning_details":[{"type":"reasoning.text","text":"**Reporting the Temperature**\n\nI've got the temperature data from the weather tool - a blistering 40 degrees Celsius. My next step is to compose the user's response. I'll provide a straightforward statement, informing them of the current temperature in Florence, Italy, in a clear and concise manner.\n\n\n","format":"google-gemini-v1","index":0}]},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_78a4119et1"}
73
74      data: {"id":"gen_01KKHTVEAVVMNRR75QR8NY92FE","object":"chat.completion.chunk","created":1773346342,"model":"google/gemini-3-pro-preview","choices":[{"index":0,"delta":{"content":"The weather in Florence, Italy is currently 40°C."},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_78a4119et1"}
75
76      data: {"id":"gen_01KKHTVEAVVMNRR75QR8NY92FE","object":"chat.completion.chunk","created":1773346342,"model":"google/gemini-3-pro-preview","choices":[{"index":0,"delta":{"reasoning_details":[{"type":"reasoning.encrypted","data":"CiQBjz1rX1winmM/gsH60gpn4tqtg7T+Q0LtbLj25DdjkTWD8NoKbQGPPWtf8Icc1lIzHccnz8W0n8QPDUCDHpuKMkTdCUxw25CrCTi+Ujkzhm+yjCC13riuOlhp6VxtM/gCj/FBYsGzKRFsACtOVAfPa8C52FKgVok7Vgah65IbTWUBpPmr5lvQZetR2zyP4IgGQjMKfAGPPWtfjglUCeoXTm7LIUOP0kYsvi7KX1Yd99Sg/qSVoswXGtr/frnV4UnzfSBUZp9Km3RunzVvq2sPe1X4seaEBmcqxvEWK7smP2pWWrbyqcxe/fMBmPTFeSGMaMB74TCt8Tw5G/2XdB1QhICA0dw/6+hZVMlXVxT9CBEKNAGPPWtfOUyNrSpxNJJ8PMmUQabxECYymJY0n6VbJ40YIOKZD16cNW/wmBsmziWCrjv/3Fo=","format":"google-gemini-v1","index":0}]},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_78a4119et1"}
77
78      data: {"id":"gen_01KKHTVEAVVMNRR75QR8NY92FE","object":"chat.completion.chunk","created":1773346342,"model":"google/gemini-3-pro-preview","choices":[{"index":0,"delta":{"provider_metadata":{"google":{"promptFeedback":null,"groundingMetadata":null,"urlContextMetadata":null,"safetyRatings":null,"usageMetadata":{"thoughtsTokenCount":43,"promptTokenCount":40,"candidatesTokenCount":14,"totalTokenCount":97,"trafficType":"PROVISIONED_THROUGHPUT"}},"gateway":{"routing":{"originalModelId":"google/gemini-3-pro-preview","resolvedProvider":"vertex","resolvedProviderApiModelId":"gemini-3-pro-preview","internalResolvedModelId":"vertex:gemini-3-pro-preview","fallbacksAvailable":["google"],"internalReasoning":"Selected vertex as preferred provider for gemini-3-pro-preview. 1 fallback(s) available: google","planningReasoning":"System credentials planned for: vertex, google. Total execution order: vertex(system) → google(system)","canonicalSlug":"google/gemini-3-pro-preview","finalProvider":"vertex","attempts":[{"provider":"vertex","internalModelId":"vertex:gemini-3-pro-preview","providerApiModelId":"gemini-3-pro-preview","credentialType":"system","success":true,"startTime":1358169.871752,"endTime":1361371.243194,"statusCode":200}],"modelAttemptCount":1,"modelAttempts":[{"modelId":"vertex:gemini-3-pro-preview","canonicalSlug":"google/gemini-3-pro-preview","success":true,"providerAttemptCount":1,"providerAttempts":[{"provider":"vertex","internalModelId":"vertex:gemini-3-pro-preview","providerApiModelId":"gemini-3-pro-preview","credentialType":"system","success":true,"startTime":1358169.871752,"endTime":1361371.243194,"statusCode":200}]}],"totalProviderAttemptCount":1},"cost":"0.000764","marketCost":"0.000764","generationId":"gen_01KKHTVEAVVMNRR75QR8NY92FE","billableWebSearchCalls":0}}},"logprobs":null,"finish_reason":"stop"}],"usage":{"prompt_tokens":40,"completion_tokens":14,"total_tokens":54,"cost":0.000764,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":null,"upstream_inference_prompt_cost":0,"upstream_inference_completions_cost":0},"completion_tokens_details":{"reasoning_tokens":43,"image_tokens":0},"cache_creation_input_tokens":0,"market_cost":0.000764},"system_fingerprint":"fp_78a4119et1","generationId":"gen_01KKHTVEAVVMNRR75QR8NY92FE"}
79
80      data: [DONE]
81
82    headers:
83      Content-Type:
84      - text/event-stream
85    status: 200 OK
86    code: 200
87    duration: 3.335622417s