mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-07-22 07:15:10 +00:00
* fix: handle async get_agent in load_agent_from_repository The enterprise PlusClient.get_agent() is async, but load_agent_from_repository() calls it synchronously. When the enterprise client is hooked in, client.get_agent() returns a coroutine instead of a response, causing "'coroutine' object has no attribute 'status_code'". This adds an inspect.isawaitable() check after the call: if the response is a coroutine, it is properly awaited via asyncio.run() (or via a thread-pool executor if an event loop is already running). Co-authored-by: Joe Moura <joao@crewai.com> * fix: resolve mypy type-checker errors for async awaitable handling * fix: remove unused type: ignore comment --------- Co-authored-by: Joe Moura <joao@crewai.com>