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

Function message

tests/lib/test_refusal_fallback.py:44–58  ·  view source on GitHub ↗
(model: str, **overrides: Any)

Source from the content-addressed store, hash-verified

42
43
44def message(model: str, **overrides: Any) -> httpx2.Response:
45 return httpx2.Response(
46 200,
47 json={
48 "id": "msg_1",
49 "type": "message",
50 "role": "assistant",
51 "model": model,
52 "content": [],
53 "stop_reason": "end_turn",
54 "stop_sequence": None,
55 "usage": {"input_tokens": 1, "output_tokens": 1},
56 **overrides,
57 },
58 )
59
60
61def refusal(model: str, fallback_credit_token: str | None = None) -> httpx2.Response:

Calls

no outgoing calls

Tested by

no test coverage detected