✓ PASS

pydantic-ai 2.61.0

tools.parallel-calls-stream · anthropic

Back to results · Scenario

Requirements

IdLevelStatusEvidence
calls-reportedMUSTSATISFIEDtool_calls[0] id="toolu_01A09q90qw90lq917835lq9", name="get_weather", args={"city": "São Paulo"}, parsed=true; truth id="toolu_01A09q90qw90lq917835lq9", name="get_weather", args={"city": "São Paulo"}, parsed=true; tool_calls[1] id="toolu_01B09q90qw90lq917835lq9", name="get_weather", args={"city": "Zürich"}, parsed=true; truth id="toolu_01B09q90qw90lq917835lq9", name="get_weather", args={"city": "Zürich"}, parsed=true

What the provider sent

Finish
tool_calls
Raw finish
tool_use
Text
null
Tool calls
[
  {
    "arguments": {
      "city": "São Paulo"
    },
    "arguments_parsed_ok": true,
    "arguments_raw": "{\"city\": \"São Paulo\"}",
    "id": "toolu_01A09q90qw90lq917835lq9",
    "name": "get_weather"
  },
  {
    "arguments": {
      "city": "Zürich"
    },
    "arguments_parsed_ok": true,
    "arguments_raw": "{\"city\": \"Zürich\"}",
    "id": "toolu_01B09q90qw90lq917835lq9",
    "name": "get_weather"
  }
]
Usage
{
  "alternatives": {},
  "cached_input": null,
  "input": 180,
  "output": 48,
  "raw": {
    "input_tokens": 180,
    "output_tokens": 48
  },
  "reasoning": null,
  "total": 228
}
Stream completed
true
Error
null
Wire excerpt
status: 200
content-type: text/event-stream
body (sse):
event: message_start
data: {"type": "message_start", "message": {"id": "msg_01Aq9w938a90dw8q", "type": "message", "role": "assistant", "content": [], "model": "claude-sonnet-5-5", "stop_reason": null, "stop_sequence": null, "usage": {"input_tokens": 180, "output_tokens": 1}}}


event: content_block_start
data: {"type": "content_block_start", "index": 0, "content_block": {"type": "tool_use", "id": "toolu_01A09q90qw90lq917835lq9", "name": "get_weather", "input": {}}}


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


event: content_block_delta
data: {"type": "content_block_delta", "index": 0, "delta": {"type": "input_json_delta", "partial_json": "{\"city\": \""}}


event: content_block_delta
data: {"type": "content_block_delta", "index": 0, "delta": {"type": "input_json_delta", "partial_json": "São Paulo\"}"}}


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_01B09q90qw90lq917835lq9", "name": "get_weather", "input": {}}}


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


event: content_block_delta
data: {"type": "content_block_delta", "index": 1, "delta": {"type": "input_json_delta", "partial_json": "\"Zürich\"}"}}


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":{"output_tokens":48}}


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

What the library reported

Outcome
returned
Finish
{
  "raw": "tool_use",
  "source": "ModelResponse.finish_reason",
  "surface": "primary",
  "value": "tool_calls"
}
Text
Value
null
Surface
absent
Tool calls
[
  {
    "arguments": {
      "city": "São Paulo"
    },
    "arguments_parsed_ok": true,
    "arguments_raw": "{\"city\":\"São Paulo\"}",
    "id": "toolu_01A09q90qw90lq917835lq9",
    "name": "get_weather"
  },
  {
    "arguments": {
      "city": "Zürich"
    },
    "arguments_parsed_ok": true,
    "arguments_raw": "{\"city\":\"Zürich\"}",
    "id": "toolu_01B09q90qw90lq917835lq9",
    "name": "get_weather"
  }
]
Usage
{
  "cached_input": 0,
  "input": 180,
  "output": 48,
  "reasoning": 0,
  "surface": {
    "cached_input": "primary",
    "input": "primary",
    "output": "primary",
    "reasoning": "primary",
    "total": "primary"
  },
  "total": 228
}
Stream
{
  "chunks_seen": 13,
  "completed": true,
  "used": true
}
Error
null
Unsupported reason
null
Full observation JSON
{
  "elapsed_ms": 242.52643529325724,
  "error": null,
  "finish": {
    "raw": "tool_use",
    "source": "ModelResponse.finish_reason",
    "surface": "primary",
    "value": "tool_calls"
  },
  "format": "wiretruth.observation/v1",
  "library": {
    "api": "Agent.run_stream_events",
    "language": "python",
    "name": "pydantic-ai",
    "version": "2.61.0"
  },
  "notes": [],
  "outcome": "returned",
  "stream": {
    "chunks_seen": 13,
    "completed": true,
    "used": true
  },
  "structured": {
    "attempted": false,
    "returned_as_success": false,
    "value": null
  },
  "text": {
    "surface": "absent",
    "value": null
  },
  "tool_calls": [
    {
      "arguments": {
        "city": "São Paulo"
      },
      "arguments_parsed_ok": true,
      "arguments_raw": "{\"city\":\"São Paulo\"}",
      "id": "toolu_01A09q90qw90lq917835lq9",
      "name": "get_weather"
    },
    {
      "arguments": {
        "city": "Zürich"
      },
      "arguments_parsed_ok": true,
      "arguments_raw": "{\"city\":\"Zürich\"}",
      "id": "toolu_01B09q90qw90lq917835lq9",
      "name": "get_weather"
    }
  ],
  "unsupported_reason": null,
  "usage": {
    "cached_input": 0,
    "input": 180,
    "output": 48,
    "reasoning": 0,
    "surface": {
      "cached_input": "primary",
      "input": "primary",
      "output": "primary",
      "reasoning": "primary",
      "total": "primary"
    },
    "total": 228
  }
}

Fixture

documented anthropic/tools.parallel-calls-stream

ProvenanceValue
Sourcehttps://platform.claude.com/docs/en/agents-and-tools/tool-use/parallel-tool-use
NotesDocumented shapes, not a recording. Message envelope and stop fields follow handling-stop-reasons; content blocks follow thinking/streaming and handle-tool-calls. Model changed to claude-sonnet-5-5; IDs and scenario text are filled in. Token counts are illustrative, filled in to include thinking within the requested output limit, not measured. The docs show multiple tool_use blocks in one response. City values and the second distinct ID are filled in for this scenario. No thinking block: thinking-steering-and-cost explicitly permits adaptive turns that skip thinking; this occurrence is assumed. SSE names, JSON shapes, field order and spaced text/thinking events follow streaming examples; the compact message_delta follows Streaming request with tool use. Fragment boundaries and counts are filled in. Signature placeholder is copied literally from the signature_delta example; empty thinking_delta follows the documented omitted display flow.

Reproduce

wiretruth serve anthropic/tools.parallel-calls-stream

Plain-library snippet from the shim manifest.

AnthropicModel(model, provider=AnthropicProvider(base_url=WIRETRUTH_BASE_URL_ANTHROPIC, api_key=WIRETRUTH_API_KEY)); host root

Upstream

No matching upstream report.

History

VersionGrade
2.61.0✓ PASS
2.56.0✓ PASS