---
version: 2
interactions:
- id: 0
  request:
    proto: HTTP/1.1
    proto_major: 1
    proto_minor: 1
    content_length: 488
    host: ""
    body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"What''s the weather in Florence,Italy?","role":"user"}],"model":"x-ai/grok-code-fast-1","max_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"}],"usage":{"include":true}}'
    headers:
      Accept:
      - application/json
      Content-Type:
      - application/json
      User-Agent:
      - OpenAI/Go 2.7.1
    url: https://openrouter.ai/api/v1/chat/completions
    method: POST
  response:
    proto: HTTP/2.0
    proto_major: 2
    proto_minor: 0
    content_length: -1
    uncompressed: true
    body: "\n         \n\n         \n\n         \n\n         \n\n         \n{\"id\":\"gen-1773323508-16TGTlzkgBp81nQYpa30\",\"object\":\"chat.completion\",\"created\":1773323508,\"model\":\"x-ai/grok-code-fast-1\",\"provider\":\"xAI\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"logprobs\":null,\"finish_reason\":\"tool_calls\",\"native_finish_reason\":\"completed\",\"message\":{\"role\":\"assistant\",\"content\":null,\"refusal\":null,\"reasoning\":\"The user asked: \\\"What's the weather in Florence,Italy?\\\"\\n\",\"tool_calls\":[{\"type\":\"function\",\"index\":0,\"id\":\"call_91915262\",\"function\":{\"name\":\"weather\",\"arguments\":\"{\\\"location\\\":\\\"Florence,Italy\\\"}\"}}],\"reasoning_details\":[{\"type\":\"reasoning.summary\",\"summary\":\"The user asked: \\\"What's the weather in Florence,Italy?\\\"\\n\",\"format\":\"xai-responses-v1\",\"index\":0},{\"type\":\"reasoning.encrypted\",\"data\":\"ENvCWZ9yjx7RuE5dTZ8WqwDG7rwo8AH40p2hMurQkkrXLmHRpsTEUJrDPvnrnGVlSX61+UgbA8vLorWs0NsY1eL6YfoDjKh9E2kXL/bCsblyetZN53WtshsNXl33NBE9pkWOjCg6eRntcac1EwKK+EQubLerHuv6it471jkDgh6q3vMxIw5X3F4w2JJ8roUNtfVoLRNZ0fSclOIZM8FRFlEYhcmW4Jj5/q1F8Jog3jvpD6o/qQVkc+zqatkCwVxkq2xwrGnpodFGSLHBD6TvYyJHQh6f+Nhyi952XTrmxsmuu/QDOMNwRMugvymgMYUKCO7kgTFEg4KLF2mntRfkJywUc6joTGh7EMPGE/IbNV5+oZEX+2rLrwE0T/dtF8e9pdd7La6y8iPV9UPpDyllmAERID4cZqkdVcLgZgzPYVyxHGJggByV7wiWHhRMXBK1eBZzYM5iE3/7nR7VJ0gu6NhmWCwhywS3eTzuiWVAbb0R//ipsc1/y32YUet7osbbop1hgwKp+ljkjyLSsiJxPXzliIwCHqNx4PyfoKk/+28+CKO/Cho87h+Vx8V/8hHaMX01QeLngGuMjbr5Jk70Uqpkj+XzmthW1POr1l2AgFkvWL8bACXokMvo/pI3wYXn86Qpy30I3G3txxnfN0Gd9ehoOh/GHiswXZPF5EW6aCZEASdk12flHLtVv+41uyXnBFcTfZ00x0goblN9nbPl66SE/rAGuriTnyOraMLGAwFerjoxxHs8T7bpGWT+6pm5fzDBZizK3zyHodPY91c\",\"format\":\"xai-responses-v1\",\"id\":\"rs_76d6576c-5d7a-91ba-9422-bd7f598344f9\",\"index\":1}]}}],\"usage\":{\"prompt_tokens\":395,\"completion_tokens\":161,\"total_tokens\":556,\"cost\":0.00028594,\"is_byok\":false,\"prompt_tokens_details\":{\"cached_tokens\":192,\"cache_write_tokens\":0,\"audio_tokens\":0,\"video_tokens\":0},\"cost_details\":{\"upstream_inference_cost\":0.00028594,\"upstream_inference_prompt_cost\":0.00004444,\"upstream_inference_completions_cost\":0.0002415},\"completion_tokens_details\":{\"reasoning_tokens\":135,\"image_tokens\":0,\"audio_tokens\":0}}}"
    headers:
      Content-Type:
      - application/json
    status: 200 OK
    code: 200
    duration: 1.583899875s
- id: 1
  request:
    proto: HTTP/1.1
    proto_major: 1
    proto_minor: 1
    content_length: 784
    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_91915262","function":{"arguments":"{\"location\":\"Florence,Italy\"}","name":"weather"},"type":"function"}],"role":"assistant","reasoning_details":[{"format":"unknown","index":0,"type":"reasoning.text"}]},{"content":"40 C","tool_call_id":"call_91915262","role":"tool"}],"model":"x-ai/grok-code-fast-1","max_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"}],"usage":{"include":true}}'
    headers:
      Accept:
      - application/json
      Content-Type:
      - application/json
      User-Agent:
      - OpenAI/Go 2.7.1
    url: https://openrouter.ai/api/v1/chat/completions
    method: POST
  response:
    proto: HTTP/2.0
    proto_major: 2
    proto_minor: 0
    content_length: -1
    uncompressed: true
    body: "\n         \n\n         \n\n         \n\n         \n\n         \n{\"id\":\"gen-1773323511-wxBLDmlNIzihPZPsAYWt\",\"object\":\"chat.completion\",\"created\":1773323511,\"model\":\"x-ai/grok-code-fast-1\",\"provider\":\"xAI\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"logprobs\":null,\"finish_reason\":\"stop\",\"native_finish_reason\":\"completed\",\"message\":{\"role\":\"assistant\",\"content\":\"The current weather in Florence, Italy, shows a temperature of 40°C. For more details like humidity, wind, or forecasts, let me know!\",\"refusal\":null,\"reasoning\":\"First, the user asked: \\\"What's the weather in Florence,Italy?\\\"\\n\",\"reasoning_details\":[{\"type\":\"reasoning.summary\",\"summary\":\"First, the user asked: \\\"What's the weather in Florence,Italy?\\\"\\n\",\"format\":\"xai-responses-v1\",\"index\":0},{\"type\":\"reasoning.encrypted\",\"data\":\"f8BhIczJVu/AvyzDlOjrE5Vb4Z/x0ZrQJ5i1okZkgl5fKbHYgNAuGEw9HAgS4vnFtbMBiKyEi1Y1VxQyFEdj833auBSYTd7ZAlCYitFSpLHHkSD5L1RCa8IaZeX9vCl+ArI7dEix6UgLBR7q1HJbGlvK3oDU2Hp8h/O6WCqKrstle9am20OW7qewmgTyNxSD0452PWUIrG9ZHtev3KvaHPpt35BRuwwHyJqjd/Iel5FXufzTSrQVVggWPJ6mi4DZgIn+h60S0H7Z1EyidBiILQtfz5uH0zPhGHhUSaS6P+D0FIqHEBGIg5OAmscr/6mxMLeeo6nxw6YfW2nH5K5UhzTn3PRvsRtOADioKMnIGgUPYhvFTv+MAgD7J4yl9j95lbIyZjpGKyNdCweA9PqkWMBligt36b8FhenARv3fbfjRgbJBSy7jpnMo0WQ6CW0MglG706d18XCvl70YV1f6g3RB1B/PoiREZsVY0+r6YwpNfKmioMR+LcTaWS/lL4gbi2MjQjDu001c+474KRzKSviKJng8kJNseFTZnH/9sSEpw0EiC0cgkNI7LI1Z44T1m7TXViFpeFzYNs9kEJ67G9iRecGnoXtbppYfNZ5khgNkmZ2BV8939yj1wKCvRbyz8sDkNxxWmNRNDhsGJJD/ioOqtw+qrIWLpWGI0BrBL8Eatb+R5SCf6zonHDm215CuPAwQBFkwqpxkzqjTRwC7VuPNQna7TwIWKiwprmLLs5pEgLmk8d2AA9xwRrSluk0\",\"format\":\"xai-responses-v1\",\"id\":\"rs_1326677c-fda5-bf5e-521b-f086d2ceb2f0\",\"index\":1}]}}],\"usage\":{\"prompt_tokens\":433,\"completion_tokens\":148,\"total_tokens\":581,\"cost\":0.00027404,\"is_byok\":false,\"prompt_tokens_details\":{\"cached_tokens\":192,\"cache_write_tokens\":0,\"audio_tokens\":0,\"video_tokens\":0},\"cost_details\":{\"upstream_inference_cost\":0.00027404,\"upstream_inference_prompt_cost\":0.00005204,\"upstream_inference_completions_cost\":0.000222},\"completion_tokens_details\":{\"reasoning_tokens\":117,\"image_tokens\":0,\"audio_tokens\":0}}}"
    headers:
      Content-Type:
      - application/json
    status: 200 OK
    code: 200
    duration: 1.227629542s
