when:
  path: /api/v1/chat/completions
  method: POST
  query_param: []
  header:
  - name: accept
    value: '*/*'
  - name: content-type
    value: application/json
  body: '{"messages":[{"content":[{"text":"You are a helpful assistant. When asked about weather, use the weather tool to get the current conditions. After calling the tool, respond with ONLY minified JSON matching this schema: {\"city\": string, \"weather\": string}. DO NOT wrap the JSON in markdown or add explanatory text. DO NOT modify the weather description from the tool result.","type":"text"}],"role":"system"},{"content":"Hello, whats the weather in London?","role":"user"}],"model":"openai/gpt-4o","response_format":{"json_schema":{"name":"WeatherResponse","schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"properties":{"city":{"type":"string"},"weather":{"type":"string"}},"required":["city","weather"],"title":"WeatherResponse","type":"object"},"strict":true},"type":"json_schema"},"tools":[{"function":{"description":"Get the current weather for a city.","name":"weather","parameters":{"properties":{"city":{"type":"string"}},"required":["city"],"type":"object"}},"type":"function"}]}'
then:
  status: 200
  header:
  - name: content-type
    value: application/json
  body: '{"choices":[{"finish_reason":"tool_calls","index":0,"logprobs":null,"message":{"content":null,"reasoning":null,"refusal":null,"role":"assistant","tool_calls":[{"function":{"arguments":"{\"city\":\"London\"}","name":"weather"},"id":"call_REDACTED_1","index":0,"type":"function"}]},"native_finish_reason":"tool_calls"}],"created":0,"id":"chatcmpl-REDACTED_1","model":"openai/gpt-4o","object":"chat.completion","provider":"Azure","service_tier":null,"system_fingerprint":"fp_REDACTED_1","usage":{"completion_tokens":14,"completion_tokens_details":{"audio_tokens":0,"image_tokens":0,"reasoning_tokens":0},"cost":0.00053,"cost_details":{"upstream_inference_completions_cost":0.00014,"upstream_inference_cost":0.00053,"upstream_inference_prompt_cost":0.00039},"is_byok":false,"prompt_tokens":156,"prompt_tokens_details":{"audio_tokens":0,"cache_write_tokens":0,"cached_tokens":0,"video_tokens":0},"total_tokens":170}}'
---
when:
  path: /api/v1/chat/completions
  method: POST
  query_param: []
  header:
  - name: accept
    value: '*/*'
  - name: content-type
    value: application/json
  body: '{"messages":[{"content":[{"text":"You are a helpful assistant. When asked about weather, use the weather tool to get the current conditions. After calling the tool, respond with ONLY minified JSON matching this schema: {\"city\": string, \"weather\": string}. DO NOT wrap the JSON in markdown or add explanatory text. DO NOT modify the weather description from the tool result.","type":"text"}],"role":"system"},{"content":"Hello, whats the weather in London?","role":"user"},{"role":"assistant","tool_calls":[{"function":{"arguments":"{\"city\":\"London\"}","name":"weather"},"id":"call_REDACTED_1","type":"function"}]},{"content":"The weather in London is all fire and brimstone","role":"tool","tool_call_id":"call_REDACTED_1"}],"model":"openai/gpt-4o","response_format":{"json_schema":{"name":"WeatherResponse","schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"properties":{"city":{"type":"string"},"weather":{"type":"string"}},"required":["city","weather"],"title":"WeatherResponse","type":"object"},"strict":true},"type":"json_schema"},"tools":[{"function":{"description":"Get the current weather for a city.","name":"weather","parameters":{"properties":{"city":{"type":"string"}},"required":["city"],"type":"object"}},"type":"function"}]}'
then:
  status: 200
  header:
  - name: content-type
    value: application/json
  body: '{"choices":[{"finish_reason":"stop","index":0,"logprobs":null,"message":{"content":"{\"city\":\"London\",\"weather\":\"all fire and brimstone\"}","reasoning":null,"refusal":null,"role":"assistant"},"native_finish_reason":"stop"}],"created":0,"id":"chatcmpl-REDACTED_2","model":"openai/gpt-4o","object":"chat.completion","provider":"Azure","service_tier":null,"system_fingerprint":"fp_REDACTED_1","usage":{"completion_tokens":19,"completion_tokens_details":{"audio_tokens":0,"image_tokens":0,"reasoning_tokens":0},"cost":0.000655,"cost_details":{"upstream_inference_completions_cost":0.00019,"upstream_inference_cost":0.000655,"upstream_inference_prompt_cost":0.000465},"is_byok":false,"prompt_tokens":186,"prompt_tokens_details":{"audio_tokens":0,"cache_write_tokens":0,"cached_tokens":0,"video_tokens":0},"total_tokens":205}}'
