---
version: 2
interactions:
- id: 0
  request:
    proto: HTTP/1.1
    proto_major: 1
    proto_minor: 1
    content_length: 503
    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","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":{"effort":"medium"},"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-1773324191-SpiL1utrerwh5rpnlk8y\",\"object\":\"chat.completion\",\"created\":1773324191,\"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_84645216\",\"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\":\"4mPGeaXJQZqEG30dcn2yfv9/Nj7vlj7eJoFiSDliZMh4ViiiIITa5mPjoXSytidiEUzMz6t8g6vU9gMcbpVYDGcpUREfDDjjcU/jhCwviu7763ix8drmNSZQ9lRLirYd9hKBxrM6siw1S/h5DAkPGzFbloPngNkE23R3lLOAxgHJO9DcLFOjoA3RJN5SG2JVOsqtXwWylO0UP5I6ZQXHIaAmwjIWI/6wRARQ3YEzO42kbnddvXjToIl879jbPwKX2c5IhmBQ8w2H4F6gNSkfUyrFk+cikgA2+5SY5ySmnaJmmG1m1/cJlfy103mnfTrP/TWfKNAWDC9LO+x6G/CDrMwzSQGOBIY2sffb93yPfXKUaiw9v7PVgO04mCO3xlaJofnRkERzdss7dNcNkFVG+N/nL+hONq4TeB/A6FEJDJKSEZKfykEI/ZtVLohIwCROrtWsNp7fwxeo0E/1lSTvS+3FeAA/NnY021d6OuQtoxaFgRgmXa41VXT/hKRReWwcvzfkeM12unVoubvkZ/A1sBGt/XdUymVwbPs6WqoXUlUxfk6LzC3pnb2KFiq9hHFpgeJbbQ1bIbu6KgJHv0C6NqJWuDv+H/R6z+574vZ+1KbJ3xnWfIh2mTy3yMLhcY8yDQlH7DTAz40B1UohaF2GRrZCQIPHOgZ7ngx4gJdCSGUcmtGpvdesvsLfTN3CXzH9cAnQ9dDlDFAMxCK2g7Ueu6Ek1vJUYa1Ad8UZjTuDB9jjI1rVoLQM5wjIIszG6Uv+//DdXki89rrDPt2rU42XsyTd3wdOIKRctBy0KiISDcbVLUaRZyVsvYVsOdy1s+WcfHi9BnyR4R/I6fl2f8K2C+dLW564ihszpaIsh4GFuJ03xsdmh7X+6m4CMjz0KBzQhCP+dTvKsH461OZhdzhlY5Oc9DxgnONAQsNl5ylUPXJc6e17Quz2PBOAWaOszSCBfJ8uI35HYq2aJTQ3+VNbhuItFIKzuMEr\",\"format\":\"xai-responses-v1\",\"id\":\"rs_2eb9d62a-ef47-c651-d166-91cc28b76633\",\"index\":1}]}}],\"usage\":{\"prompt_tokens\":395,\"completion_tokens\":189,\"total_tokens\":584,\"cost\":0.00032794,\"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.00032794,\"upstream_inference_prompt_cost\":0.00004444,\"upstream_inference_completions_cost\":0.0002835},\"completion_tokens_details\":{\"reasoning_tokens\":163,\"image_tokens\":0,\"audio_tokens\":0}}}"
    headers:
      Content-Type:
      - application/json
    status: 200 OK
    code: 200
    duration: 1.207088667s
- id: 1
  request:
    proto: HTTP/1.1
    proto_major: 1
    proto_minor: 1
    content_length: 800
    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_84645216","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_84645216","role":"tool"}],"model":"x-ai/grok-code-fast-1","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},"reasoning":{"effort":"medium"}}'
    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\n         \n\n         \n\n         \n\n         \n\n         \n\n         \n{\"id\":\"gen-1773324194-80TorHtaBY2SILgLpfYX\",\"object\":\"chat.completion\",\"created\":1773324194,\"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 temperature in Florence, Italy is 40°C. For more detailed weather information, feel free to ask!\",\"refusal\":null,\"reasoning\":\"First, the user asked for the weather in Florence, Italy. I used the weather tool, and the response was \\\"40 C\\\", which means 40 degrees Celsius.\\n\",\"reasoning_details\":[{\"type\":\"reasoning.summary\",\"summary\":\"First, the user asked for the weather in Florence, Italy. I used the weather tool, and the response was \\\"40 C\\\", which means 40 degrees Celsius.\\n\",\"format\":\"xai-responses-v1\",\"index\":0},{\"type\":\"reasoning.encrypted\",\"data\":\"5C6juowZE2uM8fyHx0cTSpSgOjt7iiQYASU4qvGUL5d4fieZk5/pjpvssQLxysFkTD5KUvV1/i4+mDAaksJKYkx8rKsp3a4Ppnci6ILEmAK5qGcaxFbuiPxVGcb19WrSaoOMIISeMwg7ROQs0Arl0UsFPcOKYeKIih+7/itWl7xBMyr8HrwZwBHA+AyfIhfEkDOa1aP//wbjUkIwjOMWVTpcpSG0mrnqzKBUzEEaheYrST5YlJwSy4CuSBZABc9kZb3d7u98wXXgvkmxgoRiBtfpBfaVgJneMbAGgErihDaj3T9elShkUsqk8pmI/5ACXWJqDGAimI7cTBkFDc1x8IUBHbFvKSgj2lobYAxPABeI2cqDAlZ4sHePw6flGzODZHsK2O76b7Uzs4PsT0qV4uxl/3GmJg8rBK8irK28AEEKdD3cewV2hgjJHV84DNU6JuFEG6vn7rUbE7dwjxqs1KXUnpGubnOZkjy9JxeeS+y/m44JU9w6aS0f+OKOAK+nuElsCKM4475JRIpcW3DP40+VThXskEVjFmQqVuekIjkLXP9FN2IcBgxiQgjX0qP5kPjrp8Gp/FRhakBr93z5f0jpZ4bFMeJnBTMSlSmYRb9NfC9jnC5wJw0P8DUXiX9pHCa1D7KoPmz6BQXBUlwz5JlRlI61uz4Es6kTNNs16mkMYiocEcIJ1lpmelKytAk4Gx9+NVap9qLPC8TVM8Jf40VsK0UXGU/TgmhTuCmxPzfrSWv+7Z0nrzY4odPos7FExgLT5FYr5TYN2xPJ2WkrR86JBuNoXHJqCne7NgTjXqlk3eIrJkcc6gx9UtSqjFWcTJ+iYufqH7gMcHSRmmgOKUGeBckgeDeXtI34LX6eTQgVZotA/rIlieHQS7/jvZ1v+Gp+kskb8hnmy3ikQO+b0QOcgReuaAxga62UqKeJaicy5OPJA+CnHxve3RFrLMhhUlqJ6NWyJ1VsnOOpqhBglAVCvSxsf3uR6mF9ppwiglfTvKqB9lTVHaWzMGL+gZuH3+DCd2hCKD0IhJsr/8C4i5D1lM4+edWy+ICBJPeRJEcOBQd3FrS1x0dhJVuPDJDCQjM54OVcDjZJ080QlYvWusjlBdXcMfOesQdVxSSRP7taW6oaukOaQYniEJsuzlGWjnmWcD74G3zQ2G29/MrQBYpx7q0I+SzTyO0iGYVOz5esDcEac3SEY4ZN6u56JZQsrwnHcukI2/y3VfkqBh1+0u54SNrGXtNEusQEzJHReI2sxabJ/wtFXhSlVSTsItiP+riIzBkwPxd0426vRi9qWxQ499aPi3GyDRLyS8WbBkdES1kXwCMiyMWamRSnka8zTb1Cg7MF0GvWCL10EHEB4bZwCN+SoSM9jkf8T6SsByNOhm7aCciWZBtBTof35u7IbRhJQBdhEcyQYxpcJVZWAbKvjUPc/m2unS/Yhun6vxDuTSyr/RYk+drZd3YrGg2ERbQ+OamkmFKVxPXN/4MQVEwTqbzABz9tBeLr3FUudPouDmyUx3H2Y7HuWg\",\"format\":\"xai-responses-v1\",\"id\":\"rs_90d46d25-fda9-829e-5f8c-d63c0c938cf7\",\"index\":1}]}}],\"usage\":{\"prompt_tokens\":433,\"completion_tokens\":272,\"total_tokens\":705,\"cost\":0.00046004,\"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.00046004,\"upstream_inference_prompt_cost\":0.00005204,\"upstream_inference_completions_cost\":0.000408},\"completion_tokens_details\":{\"reasoning_tokens\":249,\"image_tokens\":0,\"audio_tokens\":0}}}"
    headers:
      Content-Type:
      - application/json
    status: 200 OK
    code: 200
    duration: 1.174056917s
