---
version: 2
interactions:
- id: 0
  request:
    proto: HTTP/1.1
    proto_major: 1
    proto_minor: 1
    content_length: 636
    host: ""
    body: '{"max_tokens":4096,"messages":[{"content":[{"text":"What''s the weather in Florence, Italy?","cache_control":{"type":"ephemeral"},"type":"text"}],"role":"user"}],"model":"claude-sonnet-4-20250514","system":[{"text":"You are a helpful assistant","cache_control":{"type":"ephemeral"},"type":"text"}],"thinking":{"budget_tokens":4000,"type":"enabled"},"tool_choice":{"disable_parallel_tool_use":false,"type":"auto"},"tools":[{"input_schema":{"properties":{"location":{"description":"the city","type":"string"}},"required":["location"],"type":"object"},"name":"weather","description":"Get weather information for a location"}],"stream":true}'
    headers:
      Accept:
      - application/json
      Content-Type:
      - application/json
      User-Agent:
      - Charm-Fantasy/0.12.2 (https://charm.land/fantasy)
    url: https://api.anthropic.com/v1/messages
    method: POST
  response:
    proto: HTTP/2.0
    proto_major: 2
    proto_minor: 0
    content_length: -1
    uncompressed: true
    body: |+
      event: message_start
      data: {"type":"message_start","message":{"model":"claude-sonnet-4-20250514","id":"msg_01ApaK754YQvujSfdPXzsdyD","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":424,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":5,"service_tier":"standard","inference_geo":"not_available"}}          }

      event: content_block_start
      data: {"type":"content_block_start","index":0,"content_block":{"type":"thinking","thinking":"","signature":""}            }

      event: ping
      data: {"type": "ping"}

      event: content_block_delta
      data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":"The user is asking for"}      }

      event: content_block_delta
      data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" weather"}   }

      event: content_block_delta
      data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" information for Florence, Italy. I have"}               }

      event: content_block_delta
      data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" a weather"}             }

      event: content_block_delta
      data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" function available"}  }

      event: content_block_delta
      data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" that takes"}         }

      event: content_block_delta
      data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" a location parameter."}  }

      event: content_block_delta
      data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" The"}          }

      event: content_block_delta
      data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" location is"}               }

      event: content_block_delta
      data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" clearly"}               }

      event: content_block_delta
      data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" specified as \"Florence, Italy\" so"}    }

      event: content_block_delta
      data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" I have"}}

      event: content_block_delta
      data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" all the required parameters to"}   }

      event: content_block_delta
      data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" make the function call."}  }

      event: content_block_delta
      data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":""}}

      event: content_block_delta
      data: {"type":"content_block_delta","index":0,"delta":{"type":"signature_delta","signature":"EqUDCkYICxgCKkB94vhGG6xKjNnGimHMfRxMKRoDnfxu8X0ubqexC/CZ0gU1q1TlbdRN/J4R0tWVpSFl6fFlfjxBILkP/+4vk0rsEgzbQkeDFZOgLMaFoiIaDG8QqH26wO17qRddBiIwRcuTXQ+vYvilaa2l7ZrhFrzBcvIl0OGzUAC7j0HlRAHwvUOrRgdTv/T3RNxp54IyKowCTaf1uRz1+N5xdqDP1QqRQeb2IoF4gIh96Uuu4hxNWfp2sP3d+iUFTxF7xf4mYIoeYgNwcPw3xqzTFgjbIqpKFNMjnsC+8P+zxVjz+yCeSCrISQKZb7jZsz0VxX28VA6q8Vcz65qYFU0+l438jCr7eDxSKxf2uzGUc5TA3jsOVEHZFlh4CtkJbmeWaU5Zntjc1cUmPLH/oSxgy9M9rqw71+nw/a2b5n37UsZdKULm//NsOf0FaptS0cVdbxztoBFQXoOJLo1O+9TnV+hS2de4kxWTqDpNEkS7V6eEmt2Ulfw6dLTMt89OCLz+6mE6bV3D/R2CVQJTS+tLaPXBa5/hTsEcioJgRy9XQOyPuBgB"}          }

      event: content_block_stop
      data: {"type":"content_block_stop","index":0        }

      event: content_block_start
      data: {"type":"content_block_start","index":1,"content_block":{"type":"tool_use","id":"toolu_017cWttjFBXZWw8LkJbhpqm1","name":"weather","input":{},"caller":{"type":"direct"}}           }

      event: content_block_delta
      data: {"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":""}   }

      event: content_block_delta
      data: {"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"{\"location\":"}              }

      event: content_block_delta
      data: {"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" \"F"}       }

      event: content_block_delta
      data: {"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"lore"}               }

      event: content_block_delta
      data: {"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"nce, Ital"}            }

      event: content_block_delta
      data: {"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"y\"}"}   }

      event: content_block_stop
      data: {"type":"content_block_stop","index":1          }

      event: message_delta
      data: {"type":"message_delta","delta":{"stop_reason":"tool_use","stop_sequence":null},"usage":{"input_tokens":424,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":109}}

      event: message_stop
      data: {"type":"message_stop"           }

    headers:
      Content-Type:
      - text/event-stream; charset=utf-8
    status: 200 OK
    code: 200
    duration: 3.171908791s
- id: 1
  request:
    proto: HTTP/1.1
    proto_major: 1
    proto_minor: 1
    content_length: 1831
    host: ""
    body: '{"max_tokens":4096,"messages":[{"content":[{"text":"What''s the weather in Florence, Italy?","type":"text"}],"role":"user"},{"content":[{"signature":"EqUDCkYICxgCKkB94vhGG6xKjNnGimHMfRxMKRoDnfxu8X0ubqexC/CZ0gU1q1TlbdRN/J4R0tWVpSFl6fFlfjxBILkP/+4vk0rsEgzbQkeDFZOgLMaFoiIaDG8QqH26wO17qRddBiIwRcuTXQ+vYvilaa2l7ZrhFrzBcvIl0OGzUAC7j0HlRAHwvUOrRgdTv/T3RNxp54IyKowCTaf1uRz1+N5xdqDP1QqRQeb2IoF4gIh96Uuu4hxNWfp2sP3d+iUFTxF7xf4mYIoeYgNwcPw3xqzTFgjbIqpKFNMjnsC+8P+zxVjz+yCeSCrISQKZb7jZsz0VxX28VA6q8Vcz65qYFU0+l438jCr7eDxSKxf2uzGUc5TA3jsOVEHZFlh4CtkJbmeWaU5Zntjc1cUmPLH/oSxgy9M9rqw71+nw/a2b5n37UsZdKULm//NsOf0FaptS0cVdbxztoBFQXoOJLo1O+9TnV+hS2de4kxWTqDpNEkS7V6eEmt2Ulfw6dLTMt89OCLz+6mE6bV3D/R2CVQJTS+tLaPXBa5/hTsEcioJgRy9XQOyPuBgB","thinking":"The user is asking for weather information for Florence, Italy. I have a weather function available 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":"thinking"},{"id":"toolu_017cWttjFBXZWw8LkJbhpqm1","input":{"location":"Florence, Italy"},"name":"weather","cache_control":{"type":"ephemeral"},"type":"tool_use"}],"role":"assistant"},{"content":[{"tool_use_id":"toolu_017cWttjFBXZWw8LkJbhpqm1","cache_control":{"type":"ephemeral"},"content":[{"text":"40 C","type":"text"}],"type":"tool_result"}],"role":"user"}],"model":"claude-sonnet-4-20250514","system":[{"text":"You are a helpful assistant","cache_control":{"type":"ephemeral"},"type":"text"}],"thinking":{"budget_tokens":4000,"type":"enabled"},"tool_choice":{"disable_parallel_tool_use":false,"type":"auto"},"tools":[{"input_schema":{"properties":{"location":{"description":"the city","type":"string"}},"required":["location"],"type":"object"},"name":"weather","description":"Get weather information for a location"}],"stream":true}'
    headers:
      Accept:
      - application/json
      Content-Type:
      - application/json
      User-Agent:
      - Charm-Fantasy/0.12.2 (https://charm.land/fantasy)
    url: https://api.anthropic.com/v1/messages
    method: POST
  response:
    proto: HTTP/2.0
    proto_major: 2
    proto_minor: 0
    content_length: -1
    uncompressed: true
    body: |+
      event: message_start
      data: {"type":"message_start","message":{"model":"claude-sonnet-4-20250514","id":"msg_01VinQM2kgcAKaRJC2QMMMWX","type":"message","role":"assistant","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":548,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":2,"service_tier":"standard","inference_geo":"not_available"}} }

      event: content_block_start
      data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}         }

      event: ping
      data: {"type": "ping"}

      event: content_block_delta
      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"The current"} }

      event: content_block_delta
      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" weather in Florence, Italy is 40"}}

      event: content_block_delta
      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"°C (104°F). That"}           }

      event: content_block_delta
      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"'s quite"} }

      event: content_block_delta
      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" hot"}             }

      event: content_block_delta
      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"! It"}              }

      event: content_block_delta
      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" would"}  }

      event: content_block_delta
      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" be a very"}  }

      event: content_block_delta
      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":" warm day there"}   }

      event: content_block_delta
      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"."}               }

      event: content_block_stop
      data: {"type":"content_block_stop","index":0      }

      event: message_delta
      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":548,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":34}               }

      event: message_stop
      data: {"type":"message_stop"}

    headers:
      Content-Type:
      - text/event-stream; charset=utf-8
    status: 200 OK
    code: 200
    duration: 1.459782333s
