MCPcopy Create free account
hub / github.com/BerriAI/litellm / _send

Function _send

tests/integration/routing/test_include_fallback_errors_wire.py:231–238  ·  view source on GitHub ↗
(
    gateway: Gateway, path: str, body: Callable[[str], Mapping[str, JsonValue]], *, key: str | None = None
)

Source from the content-addressed store, hash-verified

229
230
231def _send(
232 gateway: Gateway, path: str, body: Callable[[str], Mapping[str, JsonValue]], *, key: str | None = None
233) -> _Sent:
234 def attempt() -> _Sent:
235 nonce: Final = uuid.uuid4().hex
236 return _Sent(nonce, gateway.request("POST", path, body(nonce), key=key, headers=_FRESH_CONNECTION))
237
238 return eventually(attempt, lambda sent: _settled(sent.response.text), seconds=_WORKER_SYNC_SECONDS + 10)
239
240
241@dataclass(frozen=True, slots=True)

Calls 2

eventuallyFunction · 0.90
_settledFunction · 0.70

Tested by

no test coverage detected