Circular import breaks `skyvern run server` on main (works on v1.0.47)
Author: josephkehan-progCreated Jul 26, 2026Updated Aug 14, 2026
LabelsbugBug:llm_response
Summary
skyvern run server fails to start on current main with a circular import. The same command works from the released v1.0.47 wheel in an otherwise identical environment, so this is a regression introduced after the tag.
Error
ImportError: cannot import name 'LLMAPIHandlerFactory' from partially initialized module
'skyvern.forge.sdk.api.llm.api_handler_factory'
(most likely due to a circular import)Import chain from the traceback:
skyvern/cli/run_commands.py
-> skyvern/forge/api_app.py
-> skyvern/forge/forge_app.py
-> skyvern/forge/agent.py
-> skyvern/forge/sdk/api/llm/api_handler_factory.py (partially initialized)Reproduce
git clone --depth 1 https://github.com/Skyvern-AI/skyvern.git
cd skyvern
uv venv --python 3.13 .venv
uv pip install -e ".[local,server]" --python .venv/bin/python
./.venv/bin/skyvern run server # ImportError aboveIsolation
Importing the module on its own succeeds in the same venv — it only fails through the server entry point:
$ ./.venv/bin/python -c "import skyvern.forge.sdk.api.llm.api_handler_factory"
Registered OpenAI-compatible model with key OPENAI_COMPATIBLE model_name=...
# no errorAnd the released wheel imports the exact module that fails on main:
$ uv pip install "skyvern[server,local]==1.0.47"
$ python -c "import skyvern.forge.api_app; print('ok')"
okSame Python (3.13.14), same .env, same machine — only the source differs.
Environment
main@bc396d0(which itself touchedapi_handler_factory.py)- Released
v1.0.47for comparison - macOS arm64, CPython 3.13.14, installed with
uv
Note
pyproject.toml on main still reads version = "1.0.47", so the broken tree is not distinguishable from the working release by version alone.
Source: Skyvern-AI/skyvern