MCPcopy Create free account
hub / github.com/anthropics/anthropic-sdk-python / _response

Function _response

tests/lib/tools/toolsets/test_runner.py:44–57  ·  view source on GitHub ↗
(*blocks: dict[str, Any])

Source from the content-addressed store, hash-verified

42
43
44def _response(*blocks: dict[str, Any]) -> httpx2.Response:
45 return httpx2.Response(
46 200,
47 json={
48 "id": "msg_tool_use",
49 "type": "message",
50 "role": "assistant",
51 "model": "claude-haiku-4-5",
52 "content": list(blocks),
53 "stop_reason": "tool_use",
54 "stop_sequence": None,
55 "usage": {"input_tokens": 1, "output_tokens": 1},
56 },
57 )
58
59
60def _end_turn() -> httpx2.Response:

Calls

no outgoing calls

Tested by

no test coverage detected