mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-04-11 21:42:36 +00:00
Two sites that were mechanically rewritten by the lazy-getter regex shouldn't actually go through the lazy getter: - `BedrockCompletion._ensure_async_client` manages its own client lifecycle through `aiobotocore` inside an exit stack. Its trailing `return self._get_async_client()` was a redundant indirection through a stub method that doesn't even attempt to build a client. Return the cached attribute directly. - `GeminiCompletion._get_client_params` is a lightweight config accessor used at `to_config_dict()` time. Calling `_get_sync_client()` here forced client construction (and would raise `ValueError` when credentials aren't set) just to check the `vertexai` attribute. Read `self._client` directly and null-guard before the `hasattr` check.