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

Method _fallback

tests/test_middleware.py:137–140  ·  view source on GitHub ↗
(self, request: APIRequest)

Source from the content-addressed store, hash-verified

135 self.fallback_model = fallback_model
136
137 def _fallback(self, request: APIRequest) -> APIRequest:
138 body = request.json
139 assert isinstance(body, dict)
140 return request.copy(body={**cast("dict[str, object]", body), "model": self.fallback_model})
141
142 @override
143 def handle(self, request: APIRequest, call_next: CallNext) -> Any:

Callers 2

handleMethod · 0.95
handle_asyncMethod · 0.95

Calls 1

copyMethod · 0.45

Tested by

no test coverage detected