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

Function fallback_response

tests/lib/threads/helpers.py:366–369  ·  view source on GitHub ↗

A reply that `FALLBACK_MODEL` wrote after `MODEL` declined, with the block that marks the hand-over.

(id: str)

Source from the content-addressed store, hash-verified

364
365
366def fallback_response(id: str) -> httpx2.Response:
367 """A reply that `FALLBACK_MODEL` wrote after `MODEL` declined, with the block that marks the hand-over."""
368 body = message_response(id, iterations=FALLBACK_ITERATIONS).json()
369 return httpx2.Response(200, json={**body, "model": FALLBACK_MODEL, "content": fallback_reply().get("content")})
370
371
372def tool_change_replies() -> list[httpx2.Response]:

Calls 4

message_responseFunction · 0.85
fallback_replyFunction · 0.85
jsonMethod · 0.45
getMethod · 0.45