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: 488
10 host: ""
11 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}}'
12 headers:
13 Accept:
14 - application/json
15 Content-Type:
16 - application/json
17 User-Agent:
18 - OpenAI/Go 2.7.1
19 url: https://openrouter.ai/api/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 uncompressed: true
27 body: "\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n{\"id\":\"gen-1761054124-oLsdSux366LQUlPXZ03d\",\"provider\":\"xAI\",\"model\":\"x-ai/grok-code-fast-1\",\"object\":\"chat.completion\",\"created\":1761054124,\"choices\":[{\"logprobs\":null,\"finish_reason\":\"tool_calls\",\"native_finish_reason\":\"completed\",\"index\":0,\"message\":{\"role\":\"assistant\",\"content\":\"\",\"refusal\":null,\"reasoning\":\"First, the user asked about the weather in Florence, Italy. I have a tool called \\\"weather\\\" that can get weather information for a location.\\n\",\"tool_calls\":[{\"id\":\"call_92800071\",\"index\":0,\"type\":\"function\",\"function\":{\"name\":\"weather\",\"arguments\":\"{\\\"location\\\":\\\"Florence,Italy\\\"}\"}}],\"reasoning_details\":[{\"type\":\"reasoning.summary\",\"summary\":\"First, the user asked about the weather in Florence, Italy. I have a tool called \\\"weather\\\" that can get weather information for a location.\\n\",\"format\":\"xai-responses-v1\",\"index\":0},{\"type\":\"reasoning.encrypted\",\"data\":\"gW/QTNM4EI4+f+O7qXC7JJmVjcOngbH/csPN/zlpCalEzGBjful1XVL5Hfz4pz/7IzcZn0UExUOy/svaHRz5vQDm6aWjWY9jeIOJF6KnSPbIEeb0EfT8+HVBcJSv3ICdE79OQrzieXm0aCje7frovWcPgqWn6o7XL7znWkM5cdJpfeTJLXKEHtoPamoi5nIfDfPLQxsGvewkOHkV1buSgYzYO8LDtWD+WOjk1GLxjfBFLv1cePVOH5Nyct8UbWECZPaneuQbLk/AELwaM/J+qMyZM2aJ7M4irvOtLZ1L7Aaoakr3bgKdzZcJ9YS/D+Bmk2AnQcM37ewUMuFaYP3nFkurzUiR8swUNpEUQyfzzYxMrW8puQ5Jc2WX0pZxFU+Y8BFk+7FrPI1ekKjtdzBW6bsKRmANIu5a8kw5mNN/pWTbMekO56dtJ7zMUuxoq/tMfvYoNalh0U3nWCeuHFH6exM5DgOn4tWVgKv/NWMQzOekjcz7zckIOuqsARsLALEVjeF2ypkfmExfBbj36paYJZehU6BgK/MpGeuvGPE2Lpc99NTDseCkGbpfyBtFzFro8cZGXe/kDEMFUSxXRmPCfVDs4wB2k5fbdUAar5yU1Z6Il2a0HtybHTgFSN7xwaZ0IKItymDaVfdKb16sHUxu4h6tTNtdiSq17wVs27UdWWnTlsi0skbhR6wUfZkfE+XtV+IruXuW4Iif/EfChIt+JPgWdCkhAXNZqeTIBn2HH56qI3iAsXT8gA1EeF8igqy0Qk4xPts41RCsIANSgikStt8/p5PV8Ie7EI1ylSgeznKdksH9BGo\",\"id\":\"rs_ed6e5f4a-92ad-6e74-2eff-7284f5d073a3_us-east-1\",\"format\":\"xai-responses-v1\",\"index\":0}]}}],\"usage\":{\"prompt_tokens\":394,\"completion_tokens\":153,\"total_tokens\":547,\"cost\":0.0002507,\"is_byok\":false,\"prompt_tokens_details\":{\"cached_tokens\":320,\"audio_tokens\":0},\"cost_details\":{\"upstream_inference_cost\":null,\"upstream_inference_prompt_cost\":0.0000212,\"upstream_inference_completions_cost\":0.0002295},\"completion_tokens_details\":{\"reasoning_tokens\":127,\"image_tokens\":0}}}"
28 headers:
29 Content-Type:
30 - application/json
31 status: 200 OK
32 code: 200
33 duration: 470.70975ms
34- id: 1
35 request:
36 proto: HTTP/1.1
37 proto_major: 1
38 proto_minor: 1
39 content_length: 937
40 host: ""
41 body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"What''s the weather in Florence,Italy?","role":"user"},{"tool_calls":[{"id":"call_92800071","function":{"arguments":"{\"location\":\"Florence,Italy\"}","name":"weather"},"type":"function"}],"role":"assistant","reasoning_details":[{"format":"unknown","index":0,"text":"First, the user asked about the weather in Florence, Italy. I have a tool called \"weather\" that can get weather information for a location.\n","type":"reasoning.text"}]},{"content":"40 C","tool_call_id":"call_92800071","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}}'
42 headers:
43 Accept:
44 - application/json
45 Content-Type:
46 - application/json
47 User-Agent:
48 - OpenAI/Go 2.7.1
49 url: https://openrouter.ai/api/v1/chat/completions
50 method: POST
51 response:
52 proto: HTTP/2.0
53 proto_major: 2
54 proto_minor: 0
55 content_length: -1
56 uncompressed: true
57 body: "\n \n\n \n\n \n\n \n\n \n\n \n{\"id\":\"gen-1761054134-8YJtdv8QtokjObI4aR6V\",\"provider\":\"xAI\",\"model\":\"x-ai/grok-code-fast-1\",\"object\":\"chat.completion\",\"created\":1761054134,\"choices\":[{\"logprobs\":null,\"finish_reason\":\"stop\",\"native_finish_reason\":\"completed\",\"index\":0,\"message\":{\"role\":\"assistant\",\"content\":\"The weather in Florence, Italy is currently 40°C. If you need more details or a forecast, let me know!\",\"refusal\":null,\"reasoning\":\"First, the user asked for the weather in Florence, Italy. I used the weather tool, and the function returned \\\"40 C\\\", which I believe means 40 degrees Celsius.\\n\\n\\n## Checking Weather Request \\n- The user asked for the weather in Florence, Italy.\",\"reasoning_details\":[{\"type\":\"reasoning.summary\",\"summary\":\"First, the user asked for the weather in Florence, Italy. I used the weather tool, and the function returned \\\"40 C\\\", which I believe means 40 degrees Celsius.\\n\\n\\n## Checking Weather Request \\n- The user asked for the weather in Florence, Italy.\",\"format\":\"xai-responses-v1\",\"index\":0},{\"type\":\"reasoning.encrypted\",\"data\":\"CJBw6QcFTIVsAhYESlP0tNH9DAz8m+BBN+w+F423qMTwBePXdCFmTj0VoWklVdNDbR09ns1dYB+mnJEUNn4GQRf04hmidn74HdbI0yw8W3HVk8nOX3/6FB/hA/DqGQ1svrDE3sJ3UEwNPDXXshnUxDUd5khkO/dbOtx7t/JifdaTS2CgnzBzEgKZRq4jSxrmeL4ofIqQzJp6ZW/Na4w2KmF355RNKcMFqHbEk0+5vu161u7lsLvcfGDHmMTuSwiQwaECqg/nPeNXDiXTp7Jq3eyHkVxnC2s4LpzToerW9/BmlHhTkY9TmkSM7sBSgNkSbCUh8/J/9sey/JBAtQ8YacbIRva08tgQWDxFO1ckc8pIFpwQY35YwjYk5oO65y3EpjIr8lXfd/6t2Uy56cxGUEohq4qQaTZ3IqdRMeUY1SgViBuRsr9ItMK2O5Rk0rX1UOg7ImISzx8vikxmpjwqcz3XI6gYU+P4akz63NWU8SVKC/Z077b93cMJeVDbot/e/ZE+eOs8uvi0e00rbj76jdoBt53aCu2AFg2UNeZOHNUhwhCLQc2AW2s2fDLUKu1kDXvfbAPGxRvUKIoWS3Cbt/iWzE7FN9SZq6klEZKX/CiHyRwqekfcNd6Xq2bitBzgVYztJO0raZaek7SlSZXJpAd6msg0b55zt9T9SnVnKO+cpjvvNovaBJxQ+qpUXnTgzCeaBfEEmvjmtHB9iPKSCFQRsNTzTl8SxT4HzlPNHLGAM4JaUfR2gUSLA0lvxmEEUJvXbFGriFrloLPGes4JrW7sJPfuTYnlBCKzTSK9Im18YSOCtKF+hyxVXnEauTvlYka6MokWNcNt/6DumL0iNQccXFJNHBa7oLpgBe+2twHPOJyHvOh14bewuT6KMSFbz8dFD0KKXaUQF7ZCDa7T4Ozdjf/yxLNc6IxaY3+9EuassB2RzwzLW8pZnTnCod+M5o5j82pFiq6vMJHbCgb7gRpTEvOhOQmUernomz0eBgbxLd3CO/gvc7zmr0PntK6/KS99p4IXIZJ8d4tL0fr3MoSwyW6gIPj2bPJpyhU2dKrm9Cnh0YVBE2QKy69I3SS6lBJIWCNE+2ES3MicyGZJ3eKBlQiaJvq1xCyyBvqtN5saL+lwsdyWVJz9/kVJg16Ge+iV3RHw3ZlzwabQUM5z6xU5wompN0yS1jRsjv6eRQVh2HwEspxI9DI7kNB/ko4OYjRAcMEcSUJdpwmMV180JLCu8P16XWD+fY3S1K2/dvBvoJy7+Vq8XBhMRDzdZCdV9H/M9nrNqYhXulJp7s0pNK2HtkYAQk53FQenVrMfWhMIP5yAqyVDoSf9/2Gu5Nz1WmhLsU0BS0Pf5gD+mNbPfsC/WMcUo9lSLvuPthq3IKRXSi4DSlRAqFDsYIsvtokT0IvMsgGMoLvf1SOr2jIH/et6TfLOQIILdLKpgvHtcZ1MpyEmvZCddtV3YDgv1zUJZ4xexaYtv31RvE1sLLiiZAsl1PtE0e7m3ieTTFrpob2WwT40rc32AfUANgjdfqoYd8Vgw5B9NI7ZXdwUi3ckTW9Rn1c\",\"id\":\"rs_f90cd679-c9ea-0b3f-65c0-6b6ef4c939b9_us-east-1\",\"format\":\"xai-responses-v1\",\"index\":0}]}}],\"usage\":{\"prompt_tokens\":432,\"completion_tokens\":276,\"total_tokens\":708,\"cost\":0.0004428,\"is_byok\":false,\"prompt_tokens_details\":{\"cached_tokens\":320,\"audio_tokens\":0},\"cost_details\":{\"upstream_inference_cost\":null,\"upstream_inference_prompt_cost\":0.0000288,\"upstream_inference_completions_cost\":0.000414},\"completion_tokens_details\":{\"reasoning_tokens\":251,\"image_tokens\":0}}}"
58 headers:
59 Content-Type:
60 - application/json
61 status: 200 OK
62 code: 200
63 duration: 569.763458ms