Skip to content

Commit 9aff19c

Browse files
committed
test repro
1 parent 4c6a80c commit 9aff19c

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
"""
2+
Minimal reproducer for LiteLLM event loop binding bug.
3+
4+
This reproduces the issue where LiteLLM's LoggingWorker gets bound to the first
5+
event loop but tries to operate from subsequent event loops in pytest parameterized tests.
6+
7+
Only reproduces in CI environments (GitHub Actions), not locally.
8+
"""
9+
10+
import pytest
11+
import litellm
12+
13+
14+
@pytest.mark.asyncio
15+
@pytest.mark.parametrize(
16+
"model",
17+
[
18+
"gpt-4o",
19+
# "gpt-4o-mini",
20+
# "gpt-3.5-turbo",
21+
"fireworks_ai/accounts/fireworks/models/gpt-oss-120b",
22+
"fireworks_ai/accounts/fireworks/models/gpt-oss-20b",
23+
],
24+
)
25+
async def test_multiple_models(model):
26+
response = await litellm.acompletion(model=model, messages=[{"role": "user", "content": "Hello"}])
27+
assert response.choices[0].message.content # pyright: ignore[reportAttributeAccessIssue]

0 commit comments

Comments
 (0)