---
version: 2
interactions:
- id: 0
  request:
    proto: HTTP/1.1
    proto_major: 1
    proto_minor: 1
    content_length: 519
    host: ""
    body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"What''s the weather in Florence,Italy?","role":"user"}],"model":"openai/gpt-5","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: https://ai-gateway.vercel.sh/v1/chat/completions
    method: POST
  response:
    proto: HTTP/2.0
    proto_major: 2
    proto_minor: 0
    content_length: -1
    body: |+
      data: {"id":"gen_01KGF38FRCNWV564Q8599HRRAW","object":"chat.completion.chunk","created":1770033266,"model":"openai/gpt-5","choices":[{"index":0,"delta":{"role":"assistant"},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_147br1mgel"}

      data: {"id":"gen_01KGF38FRCNWV564Q8599HRRAW","object":"chat.completion.chunk","created":1770033266,"model":"openai/gpt-5","choices":[{"index":0,"delta":{"reasoning_details":[{"type":"reasoning.encrypted","data":"gAAAAABpgJByBdy9g4TuHPa7DgknLNhMVPGBacw6RSFlD86GixiOuj40lDELdX_Q4KpFNDGcs2gWwNHn1H7rIRCRF7wxROP_609IYjQjHTHB5_0by_qtfPjubqMYZbBfLC9pD5LMt3wpLFWxvAkk-PckiEuLpg1NcdorEuBFlJgwEOKUgO51ZGJbVvpwBsqrcv2xrMSS1jp8NIwy70pS8GS8Chq74_U4FIB26Mpvi_67J_zuXCqiIL9YklAwao0gdOCNGRyKoioVhcOMpS85FvFB8Sg5HstfrBPyKxqNx65gAT9PkL-YS4Fnu403tFbWXIQEZK-oC4oMqpjZKSllX6lYRQdEMZ8TdGLX1FuzXT8apGuqpEcKKeSlUaF_4T5UzLszir9DvQRwapFdiyBrZaR1lWGvkfB6695EQLjgF0cM0qiyBmQ2QHcfEPWIvB4s_kvbE7VxZbZwzAQJwtevqnU1V4ZbG8uh60jClbHOLOiK-Ty5xntV9Pai9ISDeUpmVlfv60cvjRGyxYOIR6fu3uwZSZrje-OfnYUmC9_s6aDhbrNe-IEvhnlhBSbemJwolxE6buieN4kdjZ2xlqDFY2mk8nLx8tF6ZiP4IROD0_ZRz-k7k9cGEncfvTFtkITcfum_0_M-v94SuvRSGMjW6QjMun8UgSiMxBoAlftJWtZxlVBLiCao2fNlbaXdKEUuFS7CG8lfRUybrwSZiOgIPp7mLx05blU6MApN1vE6iSEHuNncRTKryb58XchOLOJRld1OH1NjFsE5_cczhvguSKkJb8uqdl_kOgtQea4XNRWlirogKKKiKdbpOH2F2wVwrYGXCdqGQBE5","id":"rs_02e57b3492270d950169809072df2c81958978be9de09c65c6","format":"openai-responses-v1","index":0}]},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_147br1mgel"}

      data: {"id":"gen_01KGF38FRCNWV564Q8599HRRAW","object":"chat.completion.chunk","created":1770033266,"model":"openai/gpt-5","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"id":"call_kjY7wC8Gbmob78vc6x7vvFRl","type":"function","function":{"name":"weather","arguments":""}}]},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_147br1mgel"}

      data: {"id":"gen_01KGF38FRCNWV564Q8599HRRAW","object":"chat.completion.chunk","created":1770033266,"model":"openai/gpt-5","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"{\""}}]},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_147br1mgel"}

      data: {"id":"gen_01KGF38FRCNWV564Q8599HRRAW","object":"chat.completion.chunk","created":1770033266,"model":"openai/gpt-5","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"location"}}]},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_147br1mgel"}

      data: {"id":"gen_01KGF38FRCNWV564Q8599HRRAW","object":"chat.completion.chunk","created":1770033266,"model":"openai/gpt-5","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\":\""}}]},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_147br1mgel"}

      data: {"id":"gen_01KGF38FRCNWV564Q8599HRRAW","object":"chat.completion.chunk","created":1770033266,"model":"openai/gpt-5","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"Flor"}}]},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_147br1mgel"}

      data: {"id":"gen_01KGF38FRCNWV564Q8599HRRAW","object":"chat.completion.chunk","created":1770033266,"model":"openai/gpt-5","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"ence"}}]},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_147br1mgel"}

      data: {"id":"gen_01KGF38FRCNWV564Q8599HRRAW","object":"chat.completion.chunk","created":1770033266,"model":"openai/gpt-5","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":","}}]},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_147br1mgel"}

      data: {"id":"gen_01KGF38FRCNWV564Q8599HRRAW","object":"chat.completion.chunk","created":1770033266,"model":"openai/gpt-5","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" Italy"}}]},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_147br1mgel"}

      data: {"id":"gen_01KGF38FRCNWV564Q8599HRRAW","object":"chat.completion.chunk","created":1770033266,"model":"openai/gpt-5","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\"}"}}]},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_147br1mgel"}

      data: {"id":"gen_01KGF38FRCNWV564Q8599HRRAW","object":"chat.completion.chunk","created":1770033266,"model":"openai/gpt-5","choices":[{"index":0,"delta":{"provider_metadata":{"openai":{"responseId":"resp_02e57b3492270d9501698090728f488195b501a282cdac33a5","serviceTier":"default"},"gateway":{"routing":{"originalModelId":"openai/gpt-5","resolvedProvider":"openai","resolvedProviderApiModelId":"gpt-5-2025-08-07","internalResolvedModelId":"openai:gpt-5-2025-08-07","fallbacksAvailable":["azure"],"internalReasoning":"Selected openai as preferred provider for gpt-5. 1 fallback(s) available: azure","planningReasoning":"System credentials planned for: openai, azure. Total execution order: openai(system) → azure(system)","canonicalSlug":"openai/gpt-5","finalProvider":"openai","attempts":[{"provider":"openai","internalModelId":"openai:gpt-5-2025-08-07","providerApiModelId":"gpt-5-2025-08-07","credentialType":"system","success":true,"startTime":3180361.719299,"endTime":3180600.837456,"statusCode":200}],"modelAttemptCount":1,"modelAttempts":[{"modelId":"openai/gpt-5","canonicalSlug":"openai/gpt-5","success":true,"providerAttemptCount":1,"providerAttempts":[{"provider":"openai","internalModelId":"openai:gpt-5-2025-08-07","providerApiModelId":"gpt-5-2025-08-07","credentialType":"system","success":true,"startTime":3180361.719299,"endTime":3180600.837456,"statusCode":200}]}],"totalProviderAttemptCount":1},"cost":"0.00191875","marketCost":"0.00191875","generationId":"gen_01KGF38FRCNWV564Q8599HRRAW","billableWebSearchCalls":0}}},"logprobs":null,"finish_reason":"tool_calls"}],"usage":{"prompt_tokens":63,"completion_tokens":120,"total_tokens":183,"cost":0.00191875,"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":64,"image_tokens":0},"cache_creation_input_tokens":0,"market_cost":0.00191875},"system_fingerprint":"fp_147br1mgel","generationId":"gen_01KGF38FRCNWV564Q8599HRRAW"}

      data: [DONE]

    headers:
      Content-Type:
      - text/event-stream
    status: 200 OK
    code: 200
    duration: 376.16525ms
- id: 1
  request:
    proto: HTTP/1.1
    proto_major: 1
    proto_minor: 1
    content_length: 1780
    host: ""
    body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"What''s the weather in Florence,Italy?","role":"user"},{"tool_calls":[{"id":"call_kjY7wC8Gbmob78vc6x7vvFRl","function":{"arguments":"{\"location\":\"Florence, Italy\"}","name":"weather"},"type":"function"}],"role":"assistant","reasoning_details":[{"data":"gAAAAABpgJByBdy9g4TuHPa7DgknLNhMVPGBacw6RSFlD86GixiOuj40lDELdX_Q4KpFNDGcs2gWwNHn1H7rIRCRF7wxROP_609IYjQjHTHB5_0by_qtfPjubqMYZbBfLC9pD5LMt3wpLFWxvAkk-PckiEuLpg1NcdorEuBFlJgwEOKUgO51ZGJbVvpwBsqrcv2xrMSS1jp8NIwy70pS8GS8Chq74_U4FIB26Mpvi_67J_zuXCqiIL9YklAwao0gdOCNGRyKoioVhcOMpS85FvFB8Sg5HstfrBPyKxqNx65gAT9PkL-YS4Fnu403tFbWXIQEZK-oC4oMqpjZKSllX6lYRQdEMZ8TdGLX1FuzXT8apGuqpEcKKeSlUaF_4T5UzLszir9DvQRwapFdiyBrZaR1lWGvkfB6695EQLjgF0cM0qiyBmQ2QHcfEPWIvB4s_kvbE7VxZbZwzAQJwtevqnU1V4ZbG8uh60jClbHOLOiK-Ty5xntV9Pai9ISDeUpmVlfv60cvjRGyxYOIR6fu3uwZSZrje-OfnYUmC9_s6aDhbrNe-IEvhnlhBSbemJwolxE6buieN4kdjZ2xlqDFY2mk8nLx8tF6ZiP4IROD0_ZRz-k7k9cGEncfvTFtkITcfum_0_M-v94SuvRSGMjW6QjMun8UgSiMxBoAlftJWtZxlVBLiCao2fNlbaXdKEUuFS7CG8lfRUybrwSZiOgIPp7mLx05blU6MApN1vE6iSEHuNncRTKryb58XchOLOJRld1OH1NjFsE5_cczhvguSKkJb8uqdl_kOgtQea4XNRWlirogKKKiKdbpOH2F2wVwrYGXCdqGQBE5","format":"openai-responses-v1","id":"rs_02e57b3492270d950169809072df2c81958978be9de09c65c6","index":0,"type":"reasoning.encrypted"}]},{"content":"40 C","tool_call_id":"call_kjY7wC8Gbmob78vc6x7vvFRl","role":"tool"}],"model":"openai/gpt-5","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: https://ai-gateway.vercel.sh/v1/chat/completions
    method: POST
  response:
    proto: HTTP/2.0
    proto_major: 2
    proto_minor: 0
    content_length: -1
    body: |+
      data: {"id":"gen_01KGF38HQ7R9XH4N23YXVZ2V51","object":"chat.completion.chunk","created":1770033268,"model":"openai/gpt-5","choices":[{"index":0,"delta":{"role":"assistant"},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_9trj17vyed"}

      data: {"id":"gen_01KGF38HQ7R9XH4N23YXVZ2V51","object":"chat.completion.chunk","created":1770033268,"model":"openai/gpt-5","choices":[{"index":0,"delta":{"content":"The"},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_9trj17vyed"}

      data: {"id":"gen_01KGF38HQ7R9XH4N23YXVZ2V51","object":"chat.completion.chunk","created":1770033268,"model":"openai/gpt-5","choices":[{"index":0,"delta":{"content":" current"},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_9trj17vyed"}

      data: {"id":"gen_01KGF38HQ7R9XH4N23YXVZ2V51","object":"chat.completion.chunk","created":1770033268,"model":"openai/gpt-5","choices":[{"index":0,"delta":{"content":" weather"},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_9trj17vyed"}

      data: {"id":"gen_01KGF38HQ7R9XH4N23YXVZ2V51","object":"chat.completion.chunk","created":1770033268,"model":"openai/gpt-5","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_9trj17vyed"}

      data: {"id":"gen_01KGF38HQ7R9XH4N23YXVZ2V51","object":"chat.completion.chunk","created":1770033268,"model":"openai/gpt-5","choices":[{"index":0,"delta":{"content":" Florence"},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_9trj17vyed"}

      data: {"id":"gen_01KGF38HQ7R9XH4N23YXVZ2V51","object":"chat.completion.chunk","created":1770033268,"model":"openai/gpt-5","choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_9trj17vyed"}

      data: {"id":"gen_01KGF38HQ7R9XH4N23YXVZ2V51","object":"chat.completion.chunk","created":1770033268,"model":"openai/gpt-5","choices":[{"index":0,"delta":{"content":" Italy"},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_9trj17vyed"}

      data: {"id":"gen_01KGF38HQ7R9XH4N23YXVZ2V51","object":"chat.completion.chunk","created":1770033268,"model":"openai/gpt-5","choices":[{"index":0,"delta":{"content":" is"},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_9trj17vyed"}

      data: {"id":"gen_01KGF38HQ7R9XH4N23YXVZ2V51","object":"chat.completion.chunk","created":1770033268,"model":"openai/gpt-5","choices":[{"index":0,"delta":{"content":" about"},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_9trj17vyed"}

      data: {"id":"gen_01KGF38HQ7R9XH4N23YXVZ2V51","object":"chat.completion.chunk","created":1770033268,"model":"openai/gpt-5","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_9trj17vyed"}

      data: {"id":"gen_01KGF38HQ7R9XH4N23YXVZ2V51","object":"chat.completion.chunk","created":1770033268,"model":"openai/gpt-5","choices":[{"index":0,"delta":{"content":"40"},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_9trj17vyed"}

      data: {"id":"gen_01KGF38HQ7R9XH4N23YXVZ2V51","object":"chat.completion.chunk","created":1770033268,"model":"openai/gpt-5","choices":[{"index":0,"delta":{"content":"°C"},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_9trj17vyed"}

      data: {"id":"gen_01KGF38HQ7R9XH4N23YXVZ2V51","object":"chat.completion.chunk","created":1770033268,"model":"openai/gpt-5","choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"system_fingerprint":"fp_9trj17vyed"}

      data: {"id":"gen_01KGF38HQ7R9XH4N23YXVZ2V51","object":"chat.completion.chunk","created":1770033268,"model":"openai/gpt-5","choices":[{"index":0,"delta":{"provider_metadata":{"openai":{"responseId":"resp_02e57b3492270d950169809074a41c8195b28990630eb61d38","serviceTier":"default"},"gateway":{"routing":{"originalModelId":"openai/gpt-5","resolvedProvider":"openai","resolvedProviderApiModelId":"gpt-5-2025-08-07","internalResolvedModelId":"openai:gpt-5-2025-08-07","fallbacksAvailable":["azure"],"internalReasoning":"Selected openai as preferred provider for gpt-5. 1 fallback(s) available: azure","planningReasoning":"System credentials planned for: openai, azure. Total execution order: openai(system) → azure(system)","canonicalSlug":"openai/gpt-5","finalProvider":"openai","attempts":[{"provider":"openai","internalModelId":"openai:gpt-5-2025-08-07","providerApiModelId":"gpt-5-2025-08-07","credentialType":"system","success":true,"startTime":3182379.990316,"endTime":3182610.529457,"statusCode":200}],"modelAttemptCount":1,"modelAttempts":[{"modelId":"openai/gpt-5","canonicalSlug":"openai/gpt-5","success":true,"providerAttemptCount":1,"providerAttempts":[{"provider":"openai","internalModelId":"openai:gpt-5-2025-08-07","providerApiModelId":"gpt-5-2025-08-07","credentialType":"system","success":true,"startTime":3182379.990316,"endTime":3182610.529457,"statusCode":200}]}],"totalProviderAttemptCount":1},"cost":"0.00029125","marketCost":"0.00029125","generationId":"gen_01KGF38HQ7R9XH4N23YXVZ2V51","billableWebSearchCalls":0}}},"logprobs":null,"finish_reason":"stop"}],"usage":{"prompt_tokens":97,"completion_tokens":17,"total_tokens":114,"cost":0.00029125,"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.00029125},"system_fingerprint":"fp_9trj17vyed","generationId":"gen_01KGF38HQ7R9XH4N23YXVZ2V51"}

      data: [DONE]

    headers:
      Content-Type:
      - text/event-stream
    status: 200 OK
    code: 200
    duration: 378.669292ms
