Skip to content

Commit 1013dc8

Browse files
committed
fix: Use LLAMA_STACK_CLIENT_TIMEOUT for OpenAI client in integration tests
The openai_client fixture had a hardcoded 30-second timeout, while the integration test runner sets LLAMA_STACK_CLIENT_TIMEOUT=300. The LlamaStackClient respected this env var but the OpenAI client did not, causing timeouts when Ollama takes longer than 30 seconds to respond on GitHub Actions runners. Signed-off-by: Dan Prince <dprince@redhat.com>
1 parent 187d6db commit 1013dc8

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

tests/integration/fixtures/common.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,12 @@ def require_server(llama_stack_client):
376376
@pytest.fixture(scope="session")
377377
def openai_client(llama_stack_client, require_server):
378378
base_url = f"{llama_stack_client.base_url}/v1"
379-
client = OpenAI(base_url=base_url, api_key="fake", max_retries=0, timeout=30.0)
379+
client = OpenAI(
380+
base_url=base_url,
381+
api_key="fake",
382+
max_retries=0,
383+
timeout=float(os.environ.get("LLAMA_STACK_CLIENT_TIMEOUT", "60")),
384+
)
380385
yield client
381386
# Cleanup: close HTTP connections
382387
try:

0 commit comments

Comments
 (0)