---
version: 2
interactions:
- id: 0
  request:
    proto: HTTP/1.1
    proto_major: 1
    proto_minor: 1
    content_length: 561
    host: ""
    body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"What''s the weather in Florence, Italy?","role":"user"}],"model":"anthropic/claude-sonnet-4","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"}],"reasoning":{"effort":"medium"},"usage":{"include":true},"stream":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
    body: |+
      data: {"id":"gen-1773326264-OoghvABlt3eLCw2WPlqS","object":"chat.completion.chunk","created":1773326264,"model":"anthropic/claude-4-sonnet-20250522","provider":"Google","choices":[{"index":0,"delta":{"content":"","role":"assistant","reasoning":"The user is asking for","reasoning_details":[{"type":"reasoning.text","text":"The user is asking for","format":"anthropic-claude-v1","index":0}]},"finish_reason":null,"native_finish_reason":null}]}

      data: {"id":"gen-1773326264-OoghvABlt3eLCw2WPlqS","object":"chat.completion.chunk","created":1773326264,"model":"anthropic/claude-4-sonnet-20250522","provider":"Google","choices":[{"index":0,"delta":{"content":"","role":"assistant","reasoning":" weather","reasoning_details":[{"type":"reasoning.text","text":" weather","format":"anthropic-claude-v1","index":0}]},"finish_reason":null,"native_finish_reason":null}]}

      data: {"id":"gen-1773326264-OoghvABlt3eLCw2WPlqS","object":"chat.completion.chunk","created":1773326264,"model":"anthropic/claude-4-sonnet-20250522","provider":"Google","choices":[{"index":0,"delta":{"content":"","role":"assistant","reasoning":" information for","reasoning_details":[{"type":"reasoning.text","text":" information for","format":"anthropic-claude-v1","index":0}]},"finish_reason":null,"native_finish_reason":null}]}

      data: {"id":"gen-1773326264-OoghvABlt3eLCw2WPlqS","object":"chat.completion.chunk","created":1773326264,"model":"anthropic/claude-4-sonnet-20250522","provider":"Google","choices":[{"index":0,"delta":{"content":"","role":"assistant","reasoning":" Florence, Italy. I have access","reasoning_details":[{"type":"reasoning.text","text":" Florence, Italy. I have access","format":"anthropic-claude-v1","index":0}]},"finish_reason":null,"native_finish_reason":null}]}

      data: {"id":"gen-1773326264-OoghvABlt3eLCw2WPlqS","object":"chat.completion.chunk","created":1773326264,"model":"anthropic/claude-4-sonnet-20250522","provider":"Google","choices":[{"index":0,"delta":{"content":"","role":"assistant","reasoning":" to a weather function that takes","reasoning_details":[{"type":"reasoning.text","text":" to a weather function that takes","format":"anthropic-claude-v1","index":0}]},"finish_reason":null,"native_finish_reason":null}]}

      data: {"id":"gen-1773326264-OoghvABlt3eLCw2WPlqS","object":"chat.completion.chunk","created":1773326264,"model":"anthropic/claude-4-sonnet-20250522","provider":"Google","choices":[{"index":0,"delta":{"content":"","role":"assistant","reasoning":" a location parameter. The location","reasoning_details":[{"type":"reasoning.text","text":" a location parameter. The location","format":"anthropic-claude-v1","index":0}]},"finish_reason":null,"native_finish_reason":null}]}

      data: {"id":"gen-1773326264-OoghvABlt3eLCw2WPlqS","object":"chat.completion.chunk","created":1773326264,"model":"anthropic/claude-4-sonnet-20250522","provider":"Google","choices":[{"index":0,"delta":{"content":"","role":"assistant","reasoning":" is","reasoning_details":[{"type":"reasoning.text","text":" is","format":"anthropic-claude-v1","index":0}]},"finish_reason":null,"native_finish_reason":null}]}

      data: {"id":"gen-1773326264-OoghvABlt3eLCw2WPlqS","object":"chat.completion.chunk","created":1773326264,"model":"anthropic/claude-4-sonnet-20250522","provider":"Google","choices":[{"index":0,"delta":{"content":"","role":"assistant","reasoning":" clearly","reasoning_details":[{"type":"reasoning.text","text":" clearly","format":"anthropic-claude-v1","index":0}]},"finish_reason":null,"native_finish_reason":null}]}

      data: {"id":"gen-1773326264-OoghvABlt3eLCw2WPlqS","object":"chat.completion.chunk","created":1773326264,"model":"anthropic/claude-4-sonnet-20250522","provider":"Google","choices":[{"index":0,"delta":{"content":"","role":"assistant","reasoning":" specified","reasoning_details":[{"type":"reasoning.text","text":" specified","format":"anthropic-claude-v1","index":0}]},"finish_reason":null,"native_finish_reason":null}]}

      data: {"id":"gen-1773326264-OoghvABlt3eLCw2WPlqS","object":"chat.completion.chunk","created":1773326264,"model":"anthropic/claude-4-sonnet-20250522","provider":"Google","choices":[{"index":0,"delta":{"content":"","role":"assistant","reasoning":" as \"Florence, Italy\" so I","reasoning_details":[{"type":"reasoning.text","text":" as \"Florence, Italy\" so I","format":"anthropic-claude-v1","index":0}]},"finish_reason":null,"native_finish_reason":null}]}

      data: {"id":"gen-1773326264-OoghvABlt3eLCw2WPlqS","object":"chat.completion.chunk","created":1773326264,"model":"anthropic/claude-4-sonnet-20250522","provider":"Google","choices":[{"index":0,"delta":{"content":"","role":"assistant","reasoning":" have all the required parameters","reasoning_details":[{"type":"reasoning.text","text":" have all the required parameters","format":"anthropic-claude-v1","index":0}]},"finish_reason":null,"native_finish_reason":null}]}

      data: {"id":"gen-1773326264-OoghvABlt3eLCw2WPlqS","object":"chat.completion.chunk","created":1773326264,"model":"anthropic/claude-4-sonnet-20250522","provider":"Google","choices":[{"index":0,"delta":{"content":"","role":"assistant","reasoning":" to make the","reasoning_details":[{"type":"reasoning.text","text":" to make the","format":"anthropic-claude-v1","index":0}]},"finish_reason":null,"native_finish_reason":null}]}

      data: {"id":"gen-1773326264-OoghvABlt3eLCw2WPlqS","object":"chat.completion.chunk","created":1773326264,"model":"anthropic/claude-4-sonnet-20250522","provider":"Google","choices":[{"index":0,"delta":{"content":"","role":"assistant","reasoning":" function call.","reasoning_details":[{"type":"reasoning.text","text":" function call.","format":"anthropic-claude-v1","index":0}]},"finish_reason":null,"native_finish_reason":null}]}

      data: {"id":"gen-1773326264-OoghvABlt3eLCw2WPlqS","object":"chat.completion.chunk","created":1773326264,"model":"anthropic/claude-4-sonnet-20250522","provider":"Google","choices":[{"index":0,"delta":{"content":null,"role":"assistant","tool_calls":[{"index":0,"id":"toolu_vrtx_01HKfUyb4tpj4kvPgTuusByf","type":"function","function":{"name":"weather","arguments":""}}]},"finish_reason":null,"native_finish_reason":null}]}

      data: {"id":"gen-1773326264-OoghvABlt3eLCw2WPlqS","object":"chat.completion.chunk","created":1773326264,"model":"anthropic/claude-4-sonnet-20250522","provider":"Google","choices":[{"index":0,"delta":{"content":null,"role":"assistant","tool_calls":[{"index":0,"function":{"arguments":""}}]},"finish_reason":null,"native_finish_reason":null}]}

      data: {"id":"gen-1773326264-OoghvABlt3eLCw2WPlqS","object":"chat.completion.chunk","created":1773326264,"model":"anthropic/claude-4-sonnet-20250522","provider":"Google","choices":[{"index":0,"delta":{"content":null,"role":"assistant","tool_calls":[{"index":0,"function":{"arguments":""}}]},"finish_reason":null,"native_finish_reason":null}]}

      data: {"id":"gen-1773326264-OoghvABlt3eLCw2WPlqS","object":"chat.completion.chunk","created":1773326264,"model":"anthropic/claude-4-sonnet-20250522","provider":"Google","choices":[{"index":0,"delta":{"content":null,"role":"assistant","tool_calls":[{"index":0,"function":{"arguments":"{\"locati"}}]},"finish_reason":null,"native_finish_reason":null}]}

      data: {"id":"gen-1773326264-OoghvABlt3eLCw2WPlqS","object":"chat.completion.chunk","created":1773326264,"model":"anthropic/claude-4-sonnet-20250522","provider":"Google","choices":[{"index":0,"delta":{"content":null,"role":"assistant","tool_calls":[{"index":0,"function":{"arguments":"on"}}]},"finish_reason":null,"native_finish_reason":null}]}

      data: {"id":"gen-1773326264-OoghvABlt3eLCw2WPlqS","object":"chat.completion.chunk","created":1773326264,"model":"anthropic/claude-4-sonnet-20250522","provider":"Google","choices":[{"index":0,"delta":{"content":null,"role":"assistant","tool_calls":[{"index":0,"function":{"arguments":"\": \"Flor"}}]},"finish_reason":null,"native_finish_reason":null}]}

      data: {"id":"gen-1773326264-OoghvABlt3eLCw2WPlqS","object":"chat.completion.chunk","created":1773326264,"model":"anthropic/claude-4-sonnet-20250522","provider":"Google","choices":[{"index":0,"delta":{"content":null,"role":"assistant","tool_calls":[{"index":0,"function":{"arguments":"ence, I"}}]},"finish_reason":null,"native_finish_reason":null}]}

      data: {"id":"gen-1773326264-OoghvABlt3eLCw2WPlqS","object":"chat.completion.chunk","created":1773326264,"model":"anthropic/claude-4-sonnet-20250522","provider":"Google","choices":[{"index":0,"delta":{"content":null,"role":"assistant","tool_calls":[{"index":0,"function":{"arguments":"taly"}}]},"finish_reason":null,"native_finish_reason":null}]}

      data: {"id":"gen-1773326264-OoghvABlt3eLCw2WPlqS","object":"chat.completion.chunk","created":1773326264,"model":"anthropic/claude-4-sonnet-20250522","provider":"Google","choices":[{"index":0,"delta":{"content":null,"role":"assistant","tool_calls":[{"index":0,"function":{"arguments":"\"}"}}]},"finish_reason":null,"native_finish_reason":null}]}

      data: {"id":"gen-1773326264-OoghvABlt3eLCw2WPlqS","object":"chat.completion.chunk","created":1773326264,"model":"anthropic/claude-4-sonnet-20250522","provider":"Google","choices":[{"index":0,"delta":{"content":"","role":"assistant","reasoning_details":[{"type":"reasoning.text","signature":"EqcDCkgICxACGAIqQM0Cd2vack9XE5bBfQ+UzUmO6mtcCD9QEy7/W2YXPJaAq8xvtMBNeQKGAoNiRvy3r9GXKYMe5MmAW+7LfgsburkSDD2T6pIVGFhXrqFeyBoM5VdxjM6/xX3P78QMIjCWe/6ttXxKOW/sdYJ4JzE4bKGjIuYfTJv+0i8OZkAF/FvXHIKSm8jG0D/Li44mdqkqjAJGEtZwg9srd1Q47ovDJqfU3QaOz7F34UKA+VQ5WhcY8sO1GyjqPYMLxcgo794PsisD6/0pZPqtvBFW28e3sd/iedHI6adxgJs83k5ap/B5rhJY6AJcCjcEfO+Fi7b6CYRElRvWI1vSDIct251jOTZ51tt9T1kw1u6UhoJfIY/SmiEI6AgP3wBpESi7H+bnrX9/w/97V7tbdDclP09MgZqLrt4+ECvNLn04lXXLGQYAOglRm8Tixk1IN4LGV6TJtDngbwk+Be+Zn6kqvJ8bo0BOZJOhRAbgc1HF+kgV4z80aTtBILpbYo0uV/IQRElhU5/Y7sbVTDwRft/bzZxdTdUJN/vqvb+BAkiSbxWCGAE=","format":"anthropic-claude-v1","index":0}]},"finish_reason":null,"native_finish_reason":null}]}

      data: {"id":"gen-1773326264-OoghvABlt3eLCw2WPlqS","object":"chat.completion.chunk","created":1773326264,"model":"anthropic/claude-4-sonnet-20250522","provider":"Google","choices":[{"index":0,"delta":{"content":"","role":"assistant","reasoning":null},"finish_reason":"tool_calls","native_finish_reason":"tool_calls"}]}

      data: {"id":"gen-1773326264-OoghvABlt3eLCw2WPlqS","object":"chat.completion.chunk","created":1773326264,"model":"anthropic/claude-4-sonnet-20250522","provider":"Google","choices":[],"usage":{"prompt_tokens":424,"completion_tokens":110,"total_tokens":534,"cost":0.002922,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"cache_write_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.002922,"upstream_inference_prompt_cost":0.001272,"upstream_inference_completions_cost":0.00165},"completion_tokens_details":{"reasoning_tokens":63,"image_tokens":0,"audio_tokens":0}}}

      data: [DONE]

    headers:
      Content-Type:
      - text/event-stream
    status: 200 OK
    code: 200
    duration: 1.00973575s
- id: 1
  request:
    proto: HTTP/1.1
    proto_major: 1
    proto_minor: 1
    content_length: 1991
    host: ""
    body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"What''s the weather in Florence, Italy?","role":"user"},{"tool_calls":[{"id":"toolu_vrtx_01HKfUyb4tpj4kvPgTuusByf","function":{"arguments":"{\"location\": \"Florence, Italy\"}","name":"weather"},"type":"function"}],"role":"assistant","reasoning_details":[{"format":"anthropic-claude-v1","index":0,"signature":"EqcDCkgICxACGAIqQM0Cd2vack9XE5bBfQ+UzUmO6mtcCD9QEy7/W2YXPJaAq8xvtMBNeQKGAoNiRvy3r9GXKYMe5MmAW+7LfgsburkSDD2T6pIVGFhXrqFeyBoM5VdxjM6/xX3P78QMIjCWe/6ttXxKOW/sdYJ4JzE4bKGjIuYfTJv+0i8OZkAF/FvXHIKSm8jG0D/Li44mdqkqjAJGEtZwg9srd1Q47ovDJqfU3QaOz7F34UKA+VQ5WhcY8sO1GyjqPYMLxcgo794PsisD6/0pZPqtvBFW28e3sd/iedHI6adxgJs83k5ap/B5rhJY6AJcCjcEfO+Fi7b6CYRElRvWI1vSDIct251jOTZ51tt9T1kw1u6UhoJfIY/SmiEI6AgP3wBpESi7H+bnrX9/w/97V7tbdDclP09MgZqLrt4+ECvNLn04lXXLGQYAOglRm8Tixk1IN4LGV6TJtDngbwk+Be+Zn6kqvJ8bo0BOZJOhRAbgc1HF+kgV4z80aTtBILpbYo0uV/IQRElhU5/Y7sbVTDwRft/bzZxdTdUJN/vqvb+BAkiSbxWCGAE=","text":" weather information for Florence, Italy. I have access to a weather function that takes a location parameter. The location is clearly specified as \"Florence, Italy\" so I have all the required parameters to make the function call.","type":"reasoning.text"}],"reasoning":" weather information for Florence, Italy. I have access to a weather function that takes a location parameter. The location is clearly specified as \"Florence, Italy\" so I have all the required parameters to make the function call."},{"content":"40 C","tool_call_id":"toolu_vrtx_01HKfUyb4tpj4kvPgTuusByf","role":"tool"}],"model":"anthropic/claude-sonnet-4","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"}],"usage":{"include":true},"reasoning":{"effort":"medium"},"stream":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
    body: |+
      data: {"id":"gen-1773326267-RCoDFUZUJvX71yoT5AUB","object":"chat.completion.chunk","created":1773326267,"model":"anthropic/claude-4-sonnet-20250522","provider":"Google","choices":[{"index":0,"delta":{"content":"The current","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}

      data: {"id":"gen-1773326267-RCoDFUZUJvX71yoT5AUB","object":"chat.completion.chunk","created":1773326267,"model":"anthropic/claude-4-sonnet-20250522","provider":"Google","choices":[{"index":0,"delta":{"content":" weather in Florence, Italy shows","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}

      data: {"id":"gen-1773326267-RCoDFUZUJvX71yoT5AUB","object":"chat.completion.chunk","created":1773326267,"model":"anthropic/claude-4-sonnet-20250522","provider":"Google","choices":[{"index":0,"delta":{"content":" a","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}

      data: {"id":"gen-1773326267-RCoDFUZUJvX71yoT5AUB","object":"chat.completion.chunk","created":1773326267,"model":"anthropic/claude-4-sonnet-20250522","provider":"Google","choices":[{"index":0,"delta":{"content":" temperature of 40°C (104","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}

      data: {"id":"gen-1773326267-RCoDFUZUJvX71yoT5AUB","object":"chat.completion.chunk","created":1773326267,"model":"anthropic/claude-4-sonnet-20250522","provider":"Google","choices":[{"index":0,"delta":{"content":"°F). That","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}

      data: {"id":"gen-1773326267-RCoDFUZUJvX71yoT5AUB","object":"chat.completion.chunk","created":1773326267,"model":"anthropic/claude-4-sonnet-20250522","provider":"Google","choices":[{"index":0,"delta":{"content":"'s quite hot","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}

      data: {"id":"gen-1773326267-RCoDFUZUJvX71yoT5AUB","object":"chat.completion.chunk","created":1773326267,"model":"anthropic/claude-4-sonnet-20250522","provider":"Google","choices":[{"index":0,"delta":{"content":"!","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}

      data: {"id":"gen-1773326267-RCoDFUZUJvX71yoT5AUB","object":"chat.completion.chunk","created":1773326267,"model":"anthropic/claude-4-sonnet-20250522","provider":"Google","choices":[{"index":0,"delta":{"content":" It's a very","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}

      data: {"id":"gen-1773326267-RCoDFUZUJvX71yoT5AUB","object":"chat.completion.chunk","created":1773326267,"model":"anthropic/claude-4-sonnet-20250522","provider":"Google","choices":[{"index":0,"delta":{"content":" warm day in Florence.","role":"assistant"},"finish_reason":null,"native_finish_reason":null}]}

      data: {"id":"gen-1773326267-RCoDFUZUJvX71yoT5AUB","object":"chat.completion.chunk","created":1773326267,"model":"anthropic/claude-4-sonnet-20250522","provider":"Google","choices":[{"index":0,"delta":{"content":"","role":"assistant"},"finish_reason":"stop","native_finish_reason":"stop"}]}

      data: {"id":"gen-1773326267-RCoDFUZUJvX71yoT5AUB","object":"chat.completion.chunk","created":1773326267,"model":"anthropic/claude-4-sonnet-20250522","provider":"Google","choices":[],"usage":{"prompt_tokens":549,"completion_tokens":37,"total_tokens":586,"cost":0.002202,"is_byok":false,"prompt_tokens_details":{"cached_tokens":0,"cache_write_tokens":0,"audio_tokens":0,"video_tokens":0},"cost_details":{"upstream_inference_cost":0.002202,"upstream_inference_prompt_cost":0.001647,"upstream_inference_completions_cost":0.000555},"completion_tokens_details":{"reasoning_tokens":0,"image_tokens":0,"audio_tokens":0}}}

      data: [DONE]

    headers:
      Content-Type:
      - text/event-stream
    status: 200 OK
    code: 200
    duration: 1.070964125s
