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

Function drain

tests/code_coverage_tests/test_provider_cache.py:307–310  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

305 url: Final = f"http://127.0.0.1:{provider.server_port}/v1/chat/completions"
306
307 def drain() -> None:
308 head = cache_edge(short).forward("openai", "POST", url, dict(HEADERS), BODY, 5, test_key=TEST_SLUG)
309 assert isinstance(head, StreamHead)
310 assert b"".join(step.data for step in head.steps if isinstance(step, StreamChunk)) == SUCCESS
311
312 drain()
313 assert len(provider.hits) == 1

Callers 1

Calls 4

cache_edgeFunction · 0.85
joinMethod · 0.80
dictFunction · 0.50
forwardMethod · 0.45

Tested by

no test coverage detected