Skip to content

smolagents failing when provider is xai #827

@HareeshBahuleyan

Description

@HareeshBahuleyan

Encountered after migrating to use any-llm. See #817 (comment)

The error is:

RuntimeError: Task <Task pending name='Task-9' coro=<run_async_in_sync.<locals>.run_in_thread.<locals>.run_with_cleanup() running at /Users/hareeshbahuleyan/Desktop/mzai_github/any-agent/.venv/lib/python3.11/site-packages/any_llm/utils/aio.py:47> cb=[_run_until_complete_cb() at /Users/hareeshbahuleyan/.local/share/uv/python/cpython-3.11.11-macos-aarch64-none/lib/python3.11/asyncio/base_events.py:181]> got Future <Task pending name='Task-10' coro=<InterceptedUnaryUnaryCall._invoke() running at /Users/hareeshbahuleyan/Desktop/mzai_github/any-agent/.venv/lib/python3.11/site-packages/grpc/aio/_interceptor.py:655> cb=[InterceptedCall._fire_or_add_pending_done_callbacks()]> attached to a different loop

Potentially has to do with how any-llm interacts with xai sdk

To reproduce the error, try running the [SMOLAGENTS-xai/grok-3-mini-latest] integration test

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions