mirror of
https://github.com/codeflash-ai/codeflash-internal.git
synced 2026-05-04 18:25:18 +00:00
This fixes a critical bug where old AsyncAzureOpenAI and AsyncAnthropicBedrock clients were not being closed when the event loop changed, causing: 1. Connection pool exhaustion → "couldn't get a connection after 30.00 sec" 2. RuntimeError: Event loop is closed during httpx client cleanup Root cause: In LLMClient.call(), when the event loop changed, new clients were created but old clients were not properly closed, leading to connection leaks. Fix: - Added await client.close() for both openai_client and anthropic_client before creating new instances - Added comprehensive unit tests to verify proper cleanup Impact: - Resolves ~150+ test generation failures (500 errors) - Fixes event loop closure errors in aiservice logs Trace IDs affected: 04500fbd-88e0-44e4-8d20-32f6a0dc06cc (and many others) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| aiservice | ||
| .dockerignore | ||