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: 533
 10    host: ""
 11    body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"What''s the weather in Florence, Italy?","role":"user"}],"model":"anthropic/claude-sonnet-4","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_01KKHTT5W53GRP3A5WHWE2ZBCY","object":"chat.completion.chunk","created":1773346298,"model":"anthropic/claude-sonnet-4","choices":[{"index":0,"delta":{"role":"assistant"},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_v87huw1qog"}
 28
 29      data: {"id":"gen_01KKHTT5W53GRP3A5WHWE2ZBCY","object":"chat.completion.chunk","created":1773346298,"model":"anthropic/claude-sonnet-4","choices":[{"index":0,"delta":{"reasoning":"The user is asking for","reasoning_details":[{"type":"reasoning.text","text":"The user is asking for","signature":"","format":"anthropic-claude-v1","index":0}]},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_v87huw1qog"}
 30
 31      data: {"id":"gen_01KKHTT5W53GRP3A5WHWE2ZBCY","object":"chat.completion.chunk","created":1773346298,"model":"anthropic/claude-sonnet-4","choices":[{"index":0,"delta":{"reasoning":" weather","reasoning_details":[{"type":"reasoning.text","text":" weather","signature":"","format":"anthropic-claude-v1","index":0}]},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_v87huw1qog"}
 32
 33      data: {"id":"gen_01KKHTT5W53GRP3A5WHWE2ZBCY","object":"chat.completion.chunk","created":1773346298,"model":"anthropic/claude-sonnet-4","choices":[{"index":0,"delta":{"reasoning":" information for Florence, Italy. I have","reasoning_details":[{"type":"reasoning.text","text":" information for Florence, Italy. I have","signature":"","format":"anthropic-claude-v1","index":0}]},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_v87huw1qog"}
 34
 35      data: {"id":"gen_01KKHTT5W53GRP3A5WHWE2ZBCY","object":"chat.completion.chunk","created":1773346298,"model":"anthropic/claude-sonnet-4","choices":[{"index":0,"delta":{"reasoning":" access to a","reasoning_details":[{"type":"reasoning.text","text":" access to a","signature":"","format":"anthropic-claude-v1","index":0}]},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_v87huw1qog"}
 36
 37      data: {"id":"gen_01KKHTT5W53GRP3A5WHWE2ZBCY","object":"chat.completion.chunk","created":1773346298,"model":"anthropic/claude-sonnet-4","choices":[{"index":0,"delta":{"reasoning":" weather","reasoning_details":[{"type":"reasoning.text","text":" weather","signature":"","format":"anthropic-claude-v1","index":0}]},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_v87huw1qog"}
 38
 39      data: {"id":"gen_01KKHTT5W53GRP3A5WHWE2ZBCY","object":"chat.completion.chunk","created":1773346298,"model":"anthropic/claude-sonnet-4","choices":[{"index":0,"delta":{"reasoning":" function","reasoning_details":[{"type":"reasoning.text","text":" function","signature":"","format":"anthropic-claude-v1","index":0}]},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_v87huw1qog"}
 40
 41      data: {"id":"gen_01KKHTT5W53GRP3A5WHWE2ZBCY","object":"chat.completion.chunk","created":1773346298,"model":"anthropic/claude-sonnet-4","choices":[{"index":0,"delta":{"reasoning":" that takes a location parameter. The","reasoning_details":[{"type":"reasoning.text","text":" that takes a location parameter. The","signature":"","format":"anthropic-claude-v1","index":0}]},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_v87huw1qog"}
 42
 43      data: {"id":"gen_01KKHTT5W53GRP3A5WHWE2ZBCY","object":"chat.completion.chunk","created":1773346298,"model":"anthropic/claude-sonnet-4","choices":[{"index":0,"delta":{"reasoning":" location","reasoning_details":[{"type":"reasoning.text","text":" location","signature":"","format":"anthropic-claude-v1","index":0}]},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_v87huw1qog"}
 44
 45      data: {"id":"gen_01KKHTT5W53GRP3A5WHWE2ZBCY","object":"chat.completion.chunk","created":1773346298,"model":"anthropic/claude-sonnet-4","choices":[{"index":0,"delta":{"reasoning":" is","reasoning_details":[{"type":"reasoning.text","text":" is","signature":"","format":"anthropic-claude-v1","index":0}]},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_v87huw1qog"}
 46
 47      data: {"id":"gen_01KKHTT5W53GRP3A5WHWE2ZBCY","object":"chat.completion.chunk","created":1773346298,"model":"anthropic/claude-sonnet-4","choices":[{"index":0,"delta":{"reasoning":" clearly","reasoning_details":[{"type":"reasoning.text","text":" clearly","signature":"","format":"anthropic-claude-v1","index":0}]},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_v87huw1qog"}
 48
 49      data: {"id":"gen_01KKHTT5W53GRP3A5WHWE2ZBCY","object":"chat.completion.chunk","created":1773346298,"model":"anthropic/claude-sonnet-4","choices":[{"index":0,"delta":{"reasoning":" specified as \"Florence, Italy\" so","reasoning_details":[{"type":"reasoning.text","text":" specified as \"Florence, Italy\" so","signature":"","format":"anthropic-claude-v1","index":0}]},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_v87huw1qog"}
 50
 51      data: {"id":"gen_01KKHTT5W53GRP3A5WHWE2ZBCY","object":"chat.completion.chunk","created":1773346298,"model":"anthropic/claude-sonnet-4","choices":[{"index":0,"delta":{"reasoning":" I have","reasoning_details":[{"type":"reasoning.text","text":" I have","signature":"","format":"anthropic-claude-v1","index":0}]},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_v87huw1qog"}
 52
 53      data: {"id":"gen_01KKHTT5W53GRP3A5WHWE2ZBCY","object":"chat.completion.chunk","created":1773346298,"model":"anthropic/claude-sonnet-4","choices":[{"index":0,"delta":{"reasoning":" all the required parameters to make the function","reasoning_details":[{"type":"reasoning.text","text":" all the required parameters to make the function","signature":"","format":"anthropic-claude-v1","index":0}]},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_v87huw1qog"}
 54
 55      data: {"id":"gen_01KKHTT5W53GRP3A5WHWE2ZBCY","object":"chat.completion.chunk","created":1773346298,"model":"anthropic/claude-sonnet-4","choices":[{"index":0,"delta":{"reasoning":" call.","reasoning_details":[{"type":"reasoning.text","text":" call.","signature":"","format":"anthropic-claude-v1","index":0}]},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_v87huw1qog"}
 56
 57      data: {"id":"gen_01KKHTT5W53GRP3A5WHWE2ZBCY","object":"chat.completion.chunk","created":1773346298,"model":"anthropic/claude-sonnet-4","choices":[{"index":0,"delta":{"reasoning":"","reasoning_details":[{"type":"reasoning.text","text":"","signature":"","format":"anthropic-claude-v1","index":0}]},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_v87huw1qog"}
 58
 59      data: {"id":"gen_01KKHTT5W53GRP3A5WHWE2ZBCY","object":"chat.completion.chunk","created":1773346298,"model":"anthropic/claude-sonnet-4","choices":[{"index":0,"delta":{"reasoning":"","reasoning_details":[{"type":"reasoning.text","text":"","signature":"EqUDCkYICxgCKkDNAndr2nJPVxOWwX0PlM1JjuprXAg/UBMu/1tmFzyWgKvMb7TATXkChgKDYkb8t6/RlymDHuTJgFvuy34LG7q5Egx4Cq5KSCvX7xe5xakaDN/clAX+XIfmYbXBnCIwGRqnuZSrFOBh+zN+qhVrdZ+5d+sL81Og26dZCg7nCGUQKzGR7ovii9+LiTuudmzzKowCwkJTF0PeYHoPNiRWkYbbGtrjgrWBirlh8ksqxniINAxFFRXAwnMfJ6HKqxG/n8smG2Uu2aC2vp0sUvUETcsWiwWlzFWlTuHoVdrzlV8pw6f98BcNUrw6GceJP8MLdpgVaTVVx/05ZWUuSylFnNA1J41HMobeL+z4bi3XJUGfBgFSQTTUG5eZPcEKztNkbQt+T+0JQpl6bTbIOvZQ6YKjqoWMFewupmxperaVvhFarDpK7J0wllfwwMFnCh3QnFX8d0GtEuHr1m26XA0mzyIfNNgX2DboQXYgr7o4zuwU9Bi8Kru5XY4m5lNXYyB/nPfXIh9K37Ul4KcJNqtMNYPUH0SLmX6RjhoYXVCKdxgB","format":"anthropic-claude-v1","index":0}]},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_v87huw1qog"}
 60
 61      data: {"id":"gen_01KKHTT5W53GRP3A5WHWE2ZBCY","object":"chat.completion.chunk","created":1773346298,"model":"anthropic/claude-sonnet-4","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"id":"toolu_01L8DKSzJDJUgSqUJ6TDqfCH","type":"function","function":{"name":"weather","arguments":""}}]},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_v87huw1qog"}
 62
 63      data: {"id":"gen_01KKHTT5W53GRP3A5WHWE2ZBCY","object":"chat.completion.chunk","created":1773346298,"model":"anthropic/claude-sonnet-4","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"{\"loca"}}]},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_v87huw1qog"}
 64
 65      data: {"id":"gen_01KKHTT5W53GRP3A5WHWE2ZBCY","object":"chat.completion.chunk","created":1773346298,"model":"anthropic/claude-sonnet-4","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"tion\": \"Flor"}}]},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_v87huw1qog"}
 66
 67      data: {"id":"gen_01KKHTT5W53GRP3A5WHWE2ZBCY","object":"chat.completion.chunk","created":1773346298,"model":"anthropic/claude-sonnet-4","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"enc"}}]},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_v87huw1qog"}
 68
 69      data: {"id":"gen_01KKHTT5W53GRP3A5WHWE2ZBCY","object":"chat.completion.chunk","created":1773346298,"model":"anthropic/claude-sonnet-4","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"e, Italy"}}]},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_v87huw1qog"}
 70
 71      data: {"id":"gen_01KKHTT5W53GRP3A5WHWE2ZBCY","object":"chat.completion.chunk","created":1773346298,"model":"anthropic/claude-sonnet-4","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\"}"}}]},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_v87huw1qog"}
 72
 73      data: {"id":"gen_01KKHTT5W53GRP3A5WHWE2ZBCY","object":"chat.completion.chunk","created":1773346298,"model":"anthropic/claude-sonnet-4","choices":[{"index":0,"delta":{"provider_metadata":{"anthropic":{"usage":{"input_tokens":424,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":110,"service_tier":"standard","inference_geo":"not_available"},"cacheCreationInputTokens":0,"stopSequence":null,"iterations":null,"container":null,"contextManagement":null},"gateway":{"routing":{"originalModelId":"anthropic/claude-sonnet-4","resolvedProvider":"anthropic","resolvedProviderApiModelId":"claude-sonnet-4-20250514","internalResolvedModelId":"anthropic:claude-sonnet-4-20250514","fallbacksAvailable":["vertexAnthropic","bedrock"],"internalReasoning":"Selected anthropic as preferred provider for claude-sonnet-4. 2 fallback(s) available: vertexAnthropic, bedrock","planningReasoning":"System credentials planned for: anthropic, vertexAnthropic, bedrock. Total execution order: anthropic(system) → vertexAnthropic(system) → bedrock(system)","canonicalSlug":"anthropic/claude-sonnet-4","finalProvider":"anthropic","attempts":[{"provider":"anthropic","internalModelId":"anthropic:claude-sonnet-4-20250514","providerApiModelId":"claude-sonnet-4-20250514","credentialType":"system","success":true,"startTime":369359.100927,"endTime":371647.826979,"providerRequestId":"req_011CYyo57GJ8sVyYvLToZWsF","statusCode":200,"providerResponseId":"msg_01PYMSHTNpGJCqPt2hUgsrBc"}],"modelAttemptCount":1,"modelAttempts":[{"modelId":"anthropic:claude-sonnet-4-20250514","canonicalSlug":"anthropic/claude-sonnet-4","success":true,"providerAttemptCount":1,"providerAttempts":[{"provider":"anthropic","internalModelId":"anthropic:claude-sonnet-4-20250514","providerApiModelId":"claude-sonnet-4-20250514","credentialType":"system","success":true,"startTime":369359.100927,"endTime":371647.826979,"providerRequestId":"req_011CYyo57GJ8sVyYvLToZWsF","statusCode":200,"providerResponseId":"msg_01PYMSHTNpGJCqPt2hUgsrBc"}]}],"totalProviderAttemptCount":1},"cost":"0.002922","marketCost":"0.002922","generationId":"gen_01KKHTT5W53GRP3A5WHWE2ZBCY","billableWebSearchCalls":0}}},"logprobs":null,"finish_reason":"tool_calls"}],"usage":{"prompt_tokens":424,"completion_tokens":110,"total_tokens":534,"cost":0.002922,"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":0,"image_tokens":0},"cache_creation_input_tokens":0,"market_cost":0.002922},"system_fingerprint":"fp_v87huw1qog","generationId":"gen_01KKHTT5W53GRP3A5WHWE2ZBCY"}
 74
 75      data: [DONE]
 76
 77    headers:
 78      Content-Type:
 79      - text/event-stream
 80    status: 200 OK
 81    code: 200
 82    duration: 1.246093292s
 83- id: 1
 84  request:
 85    proto: HTTP/1.1
 86    proto_major: 1
 87    proto_minor: 1
 88    content_length: 1993
 89    host: ""
 90    body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"What''s the weather in Florence, Italy?","role":"user"},{"tool_calls":[{"id":"toolu_01L8DKSzJDJUgSqUJ6TDqfCH","function":{"arguments":"{\"location\": \"Florence, Italy\"}","name":"weather"},"type":"function"}],"role":"assistant","reasoning_details":[{"format":"anthropic-claude-v1","index":0,"signature":"EqUDCkYICxgCKkDNAndr2nJPVxOWwX0PlM1JjuprXAg/UBMu/1tmFzyWgKvMb7TATXkChgKDYkb8t6/RlymDHuTJgFvuy34LG7q5Egx4Cq5KSCvX7xe5xakaDN/clAX+XIfmYbXBnCIwGRqnuZSrFOBh+zN+qhVrdZ+5d+sL81Og26dZCg7nCGUQKzGR7ovii9+LiTuudmzzKowCwkJTF0PeYHoPNiRWkYbbGtrjgrWBirlh8ksqxniINAxFFRXAwnMfJ6HKqxG/n8smG2Uu2aC2vp0sUvUETcsWiwWlzFWlTuHoVdrzlV8pw6f98BcNUrw6GceJP8MLdpgVaTVVx/05ZWUuSylFnNA1J41HMobeL+z4bi3XJUGfBgFSQTTUG5eZPcEKztNkbQt+T+0JQpl6bTbIOvZQ6YKjqoWMFewupmxperaVvhFarDpK7J0wllfwwMFnCh3QnFX8d0GtEuHr1m26XA0mzyIfNNgX2DboQXYgr7o4zuwU9Bi8Kru5XY4m5lNXYyB/nPfXIh9K37Ul4KcJNqtMNYPUH0SLmX6RjhoYXVCKdxgB","text":"The user is asking for weather information for Florence, Italy. I have access to a weather function that takes a location parameter. The location is clearly specified as \"Florence, Italy\" so I have all the required parameters to make the function call.","type":"reasoning.text"}],"reasoning":"The user is asking for weather information for Florence, Italy. I have access to a weather function that takes a location parameter. The location is clearly specified as \"Florence, Italy\" so I have all the required parameters to make the function call."},{"content":"40 C","tool_call_id":"toolu_01L8DKSzJDJUgSqUJ6TDqfCH","role":"tool"}],"model":"anthropic/claude-sonnet-4","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}'
 91    headers:
 92      Accept:
 93      - application/json
 94      Content-Type:
 95      - application/json
 96      User-Agent:
 97      - Charm-Fantasy/0.12.2 (https://charm.land/fantasy)
 98    url: https://ai-gateway.vercel.sh/v1/chat/completions
 99    method: POST
100  response:
101    proto: HTTP/2.0
102    proto_major: 2
103    proto_minor: 0
104    content_length: -1
105    body: |+
106      data: {"id":"gen_01KKHTT89CX2S9SSQ455GAA1X3","object":"chat.completion.chunk","created":1773346301,"model":"anthropic/claude-sonnet-4","choices":[{"index":0,"delta":{"role":"assistant"},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_o85uf75mfs"}
107
108      data: {"id":"gen_01KKHTT89CX2S9SSQ455GAA1X3","object":"chat.completion.chunk","created":1773346301,"model":"anthropic/claude-sonnet-4","choices":[{"index":0,"delta":{"content":"The"},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_o85uf75mfs"}
109
110      data: {"id":"gen_01KKHTT89CX2S9SSQ455GAA1X3","object":"chat.completion.chunk","created":1773346301,"model":"anthropic/claude-sonnet-4","choices":[{"index":0,"delta":{"content":" current"},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_o85uf75mfs"}
111
112      data: {"id":"gen_01KKHTT89CX2S9SSQ455GAA1X3","object":"chat.completion.chunk","created":1773346301,"model":"anthropic/claude-sonnet-4","choices":[{"index":0,"delta":{"content":" weather in Florence, Italy is 40"},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_o85uf75mfs"}
113
114      data: {"id":"gen_01KKHTT89CX2S9SSQ455GAA1X3","object":"chat.completion.chunk","created":1773346301,"model":"anthropic/claude-sonnet-4","choices":[{"index":0,"delta":{"content":"°C (104°F). That"},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_o85uf75mfs"}
115
116      data: {"id":"gen_01KKHTT89CX2S9SSQ455GAA1X3","object":"chat.completion.chunk","created":1773346301,"model":"anthropic/claude-sonnet-4","choices":[{"index":0,"delta":{"content":"'s quite"},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_o85uf75mfs"}
117
118      data: {"id":"gen_01KKHTT89CX2S9SSQ455GAA1X3","object":"chat.completion.chunk","created":1773346301,"model":"anthropic/claude-sonnet-4","choices":[{"index":0,"delta":{"content":" hot"},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_o85uf75mfs"}
119
120      data: {"id":"gen_01KKHTT89CX2S9SSQ455GAA1X3","object":"chat.completion.chunk","created":1773346301,"model":"anthropic/claude-sonnet-4","choices":[{"index":0,"delta":{"content":"!"},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_o85uf75mfs"}
121
122      data: {"id":"gen_01KKHTT89CX2S9SSQ455GAA1X3","object":"chat.completion.chunk","created":1773346301,"model":"anthropic/claude-sonnet-4","choices":[{"index":0,"delta":{"content":" It"},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_o85uf75mfs"}
123
124      data: {"id":"gen_01KKHTT89CX2S9SSQ455GAA1X3","object":"chat.completion.chunk","created":1773346301,"model":"anthropic/claude-sonnet-4","choices":[{"index":0,"delta":{"content":"'s a very"},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_o85uf75mfs"}
125
126      data: {"id":"gen_01KKHTT89CX2S9SSQ455GAA1X3","object":"chat.completion.chunk","created":1773346301,"model":"anthropic/claude-sonnet-4","choices":[{"index":0,"delta":{"content":" warm day in"},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_o85uf75mfs"}
127
128      data: {"id":"gen_01KKHTT89CX2S9SSQ455GAA1X3","object":"chat.completion.chunk","created":1773346301,"model":"anthropic/claude-sonnet-4","choices":[{"index":0,"delta":{"content":" Florence"},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_o85uf75mfs"}
129
130      data: {"id":"gen_01KKHTT89CX2S9SSQ455GAA1X3","object":"chat.completion.chunk","created":1773346301,"model":"anthropic/claude-sonnet-4","choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_o85uf75mfs"}
131
132      data: {"id":"gen_01KKHTT89CX2S9SSQ455GAA1X3","object":"chat.completion.chunk","created":1773346301,"model":"anthropic/claude-sonnet-4","choices":[{"index":0,"delta":{"provider_metadata":{"anthropic":{"usage":{"input_tokens":549,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":34,"service_tier":"standard","inference_geo":"not_available"},"cacheCreationInputTokens":0,"stopSequence":null,"iterations":null,"container":null,"contextManagement":null},"gateway":{"routing":{"originalModelId":"anthropic/claude-sonnet-4","resolvedProvider":"anthropic","resolvedProviderApiModelId":"claude-sonnet-4-20250514","internalResolvedModelId":"anthropic:claude-sonnet-4-20250514","fallbacksAvailable":["vertexAnthropic","bedrock"],"internalReasoning":"Selected anthropic as preferred provider for claude-sonnet-4. 2 fallback(s) available: vertexAnthropic, bedrock","planningReasoning":"System credentials planned for: anthropic, vertexAnthropic, bedrock. Total execution order: anthropic(system) → vertexAnthropic(system) → bedrock(system)","canonicalSlug":"anthropic/claude-sonnet-4","finalProvider":"anthropic","attempts":[{"provider":"anthropic","internalModelId":"anthropic:claude-sonnet-4-20250514","providerApiModelId":"claude-sonnet-4-20250514","credentialType":"system","success":true,"startTime":1319014.543112,"endTime":1320609.154077,"providerRequestId":"req_011CYyo5HqXsVt85DyVY3Eth","statusCode":200,"providerResponseId":"msg_01CiFXVMZktbrtEF8RnZpdF5"}],"modelAttemptCount":1,"modelAttempts":[{"modelId":"anthropic:claude-sonnet-4-20250514","canonicalSlug":"anthropic/claude-sonnet-4","success":true,"providerAttemptCount":1,"providerAttempts":[{"provider":"anthropic","internalModelId":"anthropic:claude-sonnet-4-20250514","providerApiModelId":"claude-sonnet-4-20250514","credentialType":"system","success":true,"startTime":1319014.543112,"endTime":1320609.154077,"providerRequestId":"req_011CYyo5HqXsVt85DyVY3Eth","statusCode":200,"providerResponseId":"msg_01CiFXVMZktbrtEF8RnZpdF5"}]}],"totalProviderAttemptCount":1},"cost":"0.002157","marketCost":"0.002157","generationId":"gen_01KKHTT89CX2S9SSQ455GAA1X3","billableWebSearchCalls":0}}},"logprobs":null,"finish_reason":"stop"}],"usage":{"prompt_tokens":549,"completion_tokens":34,"total_tokens":583,"cost":0.002157,"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":0,"image_tokens":0},"cache_creation_input_tokens":0,"market_cost":0.002157},"system_fingerprint":"fp_o85uf75mfs","generationId":"gen_01KKHTT89CX2S9SSQ455GAA1X3"}
133
134      data: [DONE]
135
136    headers:
137      Content-Type:
138      - text/event-stream
139    status: 200 OK
140    code: 200
141    duration: 1.047528916s