when:
  path: /v1beta/models/gemini-2.5-flash:streamGenerateContent
  method: POST
  query_param:
  - name: alt
    value: sse
  - name: key
    value: '[REDACTED]'
  header:
  - name: accept
    value: text/event-stream
  - name: content-type
    value: application/json
  body: '{"contents":[{"parts":[{"text":"Calculate 2 - 5.","thought":false}],"role":"user"}],"generationConfig":{"maxOutputTokens":4096,"temperature":1.0},"safetySettings":null,"systemInstruction":{"parts":[{"text":"You are a calculator. Use the provided tools before answering arithmetic questions.","thought":false}],"role":"model"},"toolConfig":null,"tools":[{"codeExecution":null,"functionDeclarations":[{"description":"Add x and y together","name":"add","parameters":{"properties":{"x":{"description":"The first number to add","type":"number"},"y":{"description":"The second number to add","type":"number"}},"required":["x","y"],"type":"object"}},{"description":"Subtract y from x (i.e.: x - y)","name":"subtract","parameters":{"properties":{"x":{"description":"The number to subtract from","type":"number"},"y":{"description":"The number to subtract","type":"number"}},"required":["x","y"],"type":"object"}}]}]}'
then:
  status: 200
  header:
  - name: content-type
    value: text/event-stream
  body: "data: {\"candidates\":[{\"content\":{\"parts\":[{\"functionCall\":{\"args\":{\"x\":2,\"y\":5},\"name\":\"subtract\"},\"thoughtSignature\":\"signature_REDACTED_1\"}],\"role\":\"model\"},\"finishMessage\":\"Model generated function call(s).\",\"finishReason\":\"STOP\",\"index\":0}],\"modelVersion\":\"gemini-2.5-flash\",\"responseId\":\"id_REDACTED_1\",\"usageMetadata\":{\"candidatesTokenCount\":18,\"promptTokenCount\":138,\"promptTokensDetails\":[{\"modality\":\"TEXT\",\"tokenCount\":138}],\"serviceTier\":\"standard\",\"thoughtsTokenCount\":77,\"totalTokenCount\":233}}\r\n\r\n"
---
when:
  path: /v1beta/models/gemini-2.5-flash:streamGenerateContent
  method: POST
  query_param:
  - name: alt
    value: sse
  - name: key
    value: '[REDACTED]'
  header:
  - name: accept
    value: text/event-stream
  - name: content-type
    value: application/json
  body: '{"contents":[{"parts":[{"text":"Calculate 2 - 5.","thought":false}],"role":"user"},{"parts":[{"functionCall":{"args":{"x":2,"y":5},"name":"subtract"},"thought":false,"thoughtSignature":"signature_REDACTED_1"}],"role":"model"},{"parts":[{"functionResponse":{"name":"subtract","response":{"result":-3}},"thought":false}],"role":"user"}],"generationConfig":{"maxOutputTokens":4096,"temperature":1.0},"safetySettings":null,"systemInstruction":{"parts":[{"text":"You are a calculator. Use the provided tools before answering arithmetic questions.","thought":false}],"role":"model"},"toolConfig":null,"tools":[{"codeExecution":null,"functionDeclarations":[{"description":"Add x and y together","name":"add","parameters":{"properties":{"x":{"description":"The first number to add","type":"number"},"y":{"description":"The second number to add","type":"number"}},"required":["x","y"],"type":"object"}},{"description":"Subtract y from x (i.e.: x - y)","name":"subtract","parameters":{"properties":{"x":{"description":"The number to subtract from","type":"number"},"y":{"description":"The number to subtract","type":"number"}},"required":["x","y"],"type":"object"}}]}]}'
then:
  status: 200
  header:
  - name: content-type
    value: text/event-stream
  body: "data: {\"candidates\":[{\"content\":{\"parts\":[{\"text\":\"2\"}],\"role\":\"model\"},\"index\":0}],\"modelVersion\":\"gemini-2.5-flash\",\"responseId\":\"id_REDACTED_2\",\"usageMetadata\":{\"candidatesTokenCount\":1,\"promptTokenCount\":246,\"promptTokensDetails\":[{\"modality\":\"TEXT\",\"tokenCount\":246}],\"serviceTier\":\"standard\",\"totalTokenCount\":247}}\r\n\r\ndata: {\"candidates\":[{\"content\":{\"parts\":[{\"text\":\" - 5 = -3.\"}],\"role\":\"model\"},\"finishReason\":\"STOP\",\"index\":0}],\"modelVersion\":\"gemini-2.5-flash\",\"responseId\":\"id_REDACTED_2\",\"usageMetadata\":{\"candidatesTokenCount\":8,\"promptTokenCount\":246,\"promptTokensDetails\":[{\"modality\":\"TEXT\",\"tokenCount\":246}],\"serviceTier\":\"standard\",\"totalTokenCount\":254}}\r\n\r\n"
