It looks like openhands CLI launched through uvx i...
# feedback
l
It looks like openhands CLI launched through uvx is broken right now. Please check! I've seen it reported on Discord and could reproduce the issue on a clean VM. Error log in replies.
➕ 1
Copy code
[testuser@archlinux ~]$ uvx --python 3.12 --from openhands-ai openhands
Installed 310 packages in 1.49s
Traceback (most recent call last):
  File "/home/testuser/.cache/uv/archive-v0/upXV-6pQCQhXOz1Qs2cSr/bin/openhands", line 6, in <module>
    from openhands.cli.entry import main
  File "/home/testuser/.cache/uv/archive-v0/upXV-6pQCQhXOz1Qs2cSr/lib/python3.12/site-packages/openhands/cli/entry.py", line 8, in <module>
    from openhands.cli.main import run_cli_command
  File "/home/testuser/.cache/uv/archive-v0/upXV-6pQCQhXOz1Qs2cSr/lib/python3.12/site-packages/openhands/cli/main.py", line 10, in <module>
    import openhands.agenthub  # noqa F401 (we import this to get the agents registered)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/testuser/.cache/uv/archive-v0/upXV-6pQCQhXOz1Qs2cSr/lib/python3.12/site-packages/openhands/agenthub/__init__.py", line 6, in <module>
    from openhands.agenthub import (  # noqa: E402
  File "/home/testuser/.cache/uv/archive-v0/upXV-6pQCQhXOz1Qs2cSr/lib/python3.12/site-packages/openhands/agenthub/browsing_agent/__init__.py", line 1, in <module>
    from openhands.agenthub.browsing_agent.browsing_agent import BrowsingAgent
  File "/home/testuser/.cache/uv/archive-v0/upXV-6pQCQhXOz1Qs2cSr/lib/python3.12/site-packages/openhands/agenthub/browsing_agent/browsing_agent.py", line 6, in <module>
    from openhands.agenthub.browsing_agent.response_parser import BrowsingResponseParser
  File "/home/testuser/.cache/uv/archive-v0/upXV-6pQCQhXOz1Qs2cSr/lib/python3.12/site-packages/openhands/agenthub/browsing_agent/response_parser.py", line 4, in <module>
    from openhands.controller.action_parser import ActionParser, ResponseParser
  File "/home/testuser/.cache/uv/archive-v0/upXV-6pQCQhXOz1Qs2cSr/lib/python3.12/site-packages/openhands/controller/__init__.py", line 1, in <module>
    from openhands.controller.agent_controller import AgentController
  File "/home/testuser/.cache/uv/archive-v0/upXV-6pQCQhXOz1Qs2cSr/lib/python3.12/site-packages/openhands/controller/agent_controller.py", line 10, in <module>
    from litellm.exceptions import (  # noqa
  File "/home/testuser/.cache/uv/archive-v0/upXV-6pQCQhXOz1Qs2cSr/lib/python3.12/site-packages/litellm/__init__.py", line 20, in <module>
    from litellm.llms.custom_httpx.http_handler import AsyncHTTPHandler, HTTPHandler
  File "/home/testuser/.cache/uv/archive-v0/upXV-6pQCQhXOz1Qs2cSr/lib/python3.12/site-packages/litellm/llms/custom_httpx/http_handler.py", line 16, in <module>
    from litellm.litellm_core_utils.logging_utils import track_llm_api_timing
  File "/home/testuser/.cache/uv/archive-v0/upXV-6pQCQhXOz1Qs2cSr/lib/python3.12/site-packages/litellm/litellm_core_utils/logging_utils.py", line 7, in <module>
    from litellm.types.utils import (
  File "/home/testuser/.cache/uv/archive-v0/upXV-6pQCQhXOz1Qs2cSr/lib/python3.12/site-packages/litellm/types/utils.py", line 42, in <module>
    from ..litellm_core_utils.core_helpers import map_finish_reason
  File "/home/testuser/.cache/uv/archive-v0/upXV-6pQCQhXOz1Qs2cSr/lib/python3.12/site-packages/litellm/litellm_core_utils/core_helpers.py", line 8, in <module>
    from litellm.types.llms.openai import AllMessageValues
  File "/home/testuser/.cache/uv/archive-v0/upXV-6pQCQhXOz1Qs2cSr/lib/python3.12/site-packages/litellm/types/llms/openai.py", line 36, in <module>
    from openai.types.responses.response import (
ImportError: cannot import name 'ResponseTextConfig' from 'openai.types.responses.response' (/home/testuser/.cache/uv/archive-v0/upXV-6pQCQhXOz1Qs2cSr/lib/python3.12/site-packages/openai/types/responses/response.py). Did you mean: 'ResponseFormatTextConfig'?
b
Would this be on main?
l
I think it's the command from the project page.
c
seems like litellm is broken?
l
The command is:
Copy code
uvx --python 3.12 --from openhands-ai openhands
same one from the project page, so I suppose it's the pypi package. However uvx does not respect poetry lockfile I think, so it could break anytime?
c
ugh can confirm..
maybe we need to port openhands to use uv instead of poetry to fix this?
this sudddenly happens this morningh i believe
this is the source issue
and we will need to start pin package versions in pyproject.toml unfortuantely😞 https://github.com/astral-sh/uv/issues/13414#issuecomment-2873796878
According to this issue https://github.com/BerriAI/litellm/issues/13711, @nutritious-balloon-65098 please change the pyproject.toml of OpenHands repo and limit openai package version to be 1.99.9. When you are done, please create a PR. Please include enough context in your pr description
c
wow I was just looking into compatibility with Responses API , when apparently openai rammed it through 😭
n
I'm on it! Xingyao Wang can track my progress here.
c
PR here: https://github.com/All-Hands-AI/OpenHands/pull/10471
uvx --python 3.12 --from git+https://github.com/All-Hands-AI/OpenHands@pin-openai-1-99-9 openhands
checked that it did fix the issue
🙌 1
n
Summary of work since last update Changes made • Pinned OpenAI SDK: ◦ Added openai = "1.99.9" to [tool.poetry.dependencies] (runtime). ◦ Ensured tests do not float to newer openai by pinning where applicable. • Regenerated lockfile twice: ◦ Ran poetry lock after initial pin. ◦ After you pulled remote updates, re-ran poetry lock and pushed the refreshed poetry.lock (commit 1b68cdff2). Branch and PR • Branch: pin-openai-1-99-9 • PR (draft): https://github.com/All-Hands-AI/OpenHands/pull/10471 ◦ Includes context from BerriAI/litellm#13711: openai ≥1.100.0 removed ResponseTextConfig, which breaks LiteLLM imports. ◦ Rationale: stabilize environments until LiteLLM supports the newer OpenAI SDK. Checklist • Implemented pin to 1.99.9 in pyproject.toml runtime dependencies. • Updated poetry.lock and pushed changes. • Pre-commit hooks passed. • PR opened with sufficient context and marked as draft. If you want, I can now mark the PR as ready for review and add any reviewers or labels you prefer.
l
Since the 'production' command is still not working, you can get it to work like this:
Copy code
uvx --python 3.12 --with "openai==1.99.9" --from openhands-ai openhands
If it's going to take long before it's fixed, please consider updating the command in the project page.
c
I believe @better-park-34863 is looking at a release today, so it should be fixed after the release 🙏