Files
crewAI/lib
Greyson LaLonde 8312e1caad fix: keep Azure aclose a no-op when the async client was never built
The lazy-init refactor rewrote `aclose` to access the async client via
`_get_async_client()`, which forces lazy construction. When an
`AzureCompletion` is instantiated without credentials (the whole point
of deferred init), that call raises `ValueError: "Azure API key is
required"` during cleanup — including via `async with` / `__aexit__`.

Access the cached `_async_client` attribute directly so cleanup on an
uninitialized LLM is a harmless no-op. Add a regression test that
enters and exits an `async with` block against a credentials-less
`AzureCompletion`.
2026-04-12 04:31:04 +08:00
..
2026-04-10 21:51:51 +08:00