Hi everyone. I am trying to make OpenHands work lo...
# questions
l
Hi everyone. I am trying to make OpenHands work locally with Devstral served via LMStudio, but I cannot get it to start the agent session. Since I am on Linux and interested to have it working with MCP Servers, I followed the installation via uv, which worked like a charm and I can get it to start the web server on :3000. On the other side, I downloaded and loaded the Devstral Small 2507 model with all the suggested parameters on LMStudio and started a server on the local network at :1234 . Now when setting up the LLM, I used the model name copied from LMStudio prefixing it with openai/ and as a Base URL either the local IP:1234 or
<http://host.docker.internal:1234>
as suggested in the docs, both suffixed with /v1. Invariably I get the following, with the session never starting.
Copy code
18:43:26 - openhands:INFO: docker_runtime.py:197 - [runtime 7cd4bb2b93a645b8848849bfe7100672] Waiting for client to become ready at <http://host.docker.internal:31109>...
INFO:     172.17.0.1:58690 - "GET /api/conversations/7cd4bb2b93a645b8848849bfe7100672 HTTP/1.1" 200 OK
INFO:     172.17.0.1:58690 - "GET /api/conversations/7cd4bb2b93a645b8848849bfe7100672 HTTP/1.1" 200 OK
INFO:     172.17.0.1:58690 - "GET /api/conversations/7cd4bb2b93a645b8848849bfe7100672 HTTP/1.1" 200 OK
INFO:     172.17.0.1:58690 - "GET /api/conversations/7cd4bb2b93a645b8848849bfe7100672 HTTP/1.1" 200 OK
INFO:     172.17.0.1:58690 - "GET /api/conversations/7cd4bb2b93a645b8848849bfe7100672 HTTP/1.1" 200 OK
INFO:     172.17.0.1:58690 - "GET /api/conversations/7cd4bb2b93a645b8848849bfe7100672 HTTP/1.1" 200 OK
INFO:     172.17.0.1:58690 - "GET /api/conversations/7cd4bb2b93a645b8848849bfe7100672 HTTP/1.1" 200 OK
INFO:     172.17.0.1:58690 - "GET /api/conversations/7cd4bb2b93a645b8848849bfe7100672 HTTP/1.1" 200 OK
INFO:     172.17.0.1:58690 - "GET /api/conversations/7cd4bb2b93a645b8848849bfe7100672 HTTP/1.1" 200 OK
INFO:     172.17.0.1:58690 - "GET /api/conversations/7cd4bb2b93a645b8848849bfe7100672 HTTP/1.1" 200 OK
INFO:     172.17.0.1:58690 - "GET /api/conversations/7cd4bb2b93a645b8848849bfe7100672 HTTP/1.1" 200 OK
INFO:     172.17.0.1:58690 - "GET /api/conversations/7cd4bb2b93a645b8848849bfe7100672 HTTP/1.1" 200 OK
INFO:     172.17.0.1:58690 - "GET /api/conversations/7cd4bb2b93a645b8848849bfe7100672 HTTP/1.1" 200 OK
INFO:     172.17.0.1:58690 - "GET /api/conversations/7cd4bb2b93a645b8848849bfe7100672 HTTP/1.1" 200 OK
INFO:     172.17.0.1:58690 - "GET /api/conversations/7cd4bb2b93a645b8848849bfe7100672 HTTP/1.1" 200 OK
INFO:     172.17.0.1:58690 - "GET /api/conversations/7cd4bb2b93a645b8848849bfe7100672 HTTP/1.1" 200 OK
INFO:     172.17.0.1:58690 - "GET /api/conversations/7cd4bb2b93a645b8848849bfe7100672 HTTP/1.1" 200 OK
INFO:     172.17.0.1:58690 - "GET /api/conversations/7cd4bb2b93a645b8848849bfe7100672 HTTP/1.1" 200 OK
INFO:     172.17.0.1:58690 - "GET /api/conversations/7cd4bb2b93a645b8848849bfe7100672 HTTP/1.1" 200 OK
INFO:     172.17.0.1:58690 - "GET /api/conversations/7cd4bb2b93a645b8848849bfe7100672 HTTP/1.1" 200 OK
INFO:     172.17.0.1:58690 - "GET /api/conversations/7cd4bb2b93a645b8848849bfe7100672 HTTP/1.1" 200 OK
INFO:     172.17.0.1:58690 - "GET /api/conversations/7cd4bb2b93a645b8848849bfe7100672 HTTP/1.1" 200 OK
INFO:     172.17.0.1:58690 - "GET /api/conversations/7cd4bb2b93a645b8848849bfe7100672 HTTP/1.1" 200 OK
INFO:     172.17.0.1:58690 - "GET /api/conversations/7cd4bb2b93a645b8848849bfe7100672 HTTP/1.1" 200 OK
INFO:     172.17.0.1:58690 - "GET /api/conversations/7cd4bb2b93a645b8848849bfe7100672 HTTP/1.1" 200 OK
18:44:43 - openhands:ERROR: agent_session.py:220 - Agent session start failed in 146.55677890777588s
18:44:43 - openhands:ERROR: session.py:301 - Error creating agent_session: Runtime failed to return execute_action before the requested timeout of 120.0s
Traceback (most recent call last):
  File "/app/.venv/lib/python3.13/site-packages/httpx/_transports/default.py", line 101, in map_httpcore_exceptions
    yield
  File "/app/.venv/lib/python3.13/site-packages/httpx/_transports/default.py", line 250, in handle_request
    resp = self._pool.handle_request(req)
  File "/app/.venv/lib/python3.13/site-packages/httpcore/_sync/connection_pool.py", line 256, in handle_request
    raise exc from None
  File "/app/.venv/lib/python3.13/site-packages/httpcore/_sync/connection_pool.py", line 236, in handle_request
    response = connection.handle_request(
        pool_request.request
    )
  File "/app/.venv/lib/python3.13/site-packages/httpcore/_sync/connection.py", line 101, in handle_request
    raise exc
  File "/app/.venv/lib/python3.13/site-packages/httpcore/_sync/connection.py", line 78, in handle_request
    stream = self._connect(request)
  File "/app/.venv/lib/python3.13/site-packages/httpcore/_sync/connection.py", line 124, in _connect
    stream = self._network_backend.connect_tcp(**kwargs)
  File "/app/.venv/lib/python3.13/site-packages/httpcore/_backends/sync.py", line 207, in connect_tcp
    with map_exceptions(exc_map):
         ~~~~~~~~~~~~~~^^^^^^^^^
  File "/usr/local/lib/python3.13/contextlib.py", line 162, in __exit__
    self.gen.throw(value)
    ~~~~~~~~~~~~~~^^^^^^^
  File "/app/.venv/lib/python3.13/site-packages/httpcore/_exceptions.py", line 14, in map_exceptions
    raise to_exc(exc) from exc
httpcore.ConnectTimeout: timed out

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/app/openhands/runtime/impl/action_execution/action_execution_client.py", line 323, in send_action_for_execution
    response = self._send_action_server_request(
        'POST',
    ...<3 lines>...
        timeout=action.timeout + 5,
    )
  File "/app/.venv/lib/python3.13/site-packages/tenacity/__init__.py", line 338, in wrapped_f
    return copy(f, *args, **kw)
  File "/app/.venv/lib/python3.13/site-packages/tenacity/__init__.py", line 477, in __call__
    do = self.iter(retry_state=retry_state)
  File "/app/.venv/lib/python3.13/site-packages/tenacity/__init__.py", line 378, in iter
    result = action(retry_state)
  File "/app/.venv/lib/python3.13/site-packages/tenacity/__init__.py", line 400, in <lambda>
    self._add_action_func(lambda rs: rs.outcome.result())
                                     ~~~~~~~~~~~~~~~~~^^
  File "/usr/local/lib/python3.13/concurrent/futures/_base.py", line 449, in result
    return self.__get_result()
           ~~~~~~~~~~~~~~~~~^^
  File "/usr/local/lib/python3.13/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
  File "/app/.venv/lib/python3.13/site-packages/tenacity/__init__.py", line 480, in __call__
    result = fn(*args, **kwargs)
  File "/app/openhands/runtime/impl/action_execution/action_execution_client.py", line 129, in _send_action_server_request
    return send_request(self.session, method, url, **kwargs)
  File "/app/.venv/lib/python3.13/site-packages/tenacity/__init__.py", line 338, in wrapped_f
    return copy(f, *args, **kw)
  File "/app/.venv/lib/python3.13/site-packages/tenacity/__init__.py", line 477, in __call__
    do = self.iter(retry_state=retry_state)
  File "/app/.venv/lib/python3.13/site-packages/tenacity/__init__.py", line 378, in iter
    result = action(retry_state)
  File "/app/.venv/lib/python3.13/site-packages/tenacity/__init__.py", line 400, in <lambda>
    self._add_action_func(lambda rs: rs.outcome.result())
                                     ~~~~~~~~~~~~~~~~~^^
  File "/usr/local/lib/python3.13/concurrent/futures/_base.py", line 449, in result
    return self.__get_result()
           ~~~~~~~~~~~~~~~~~^^
  File "/usr/local/lib/python3.13/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
  File "/app/.venv/lib/python3.13/site-packages/tenacity/__init__.py", line 480, in __call__
    result = fn(*args, **kwargs)
  File "/app/openhands/runtime/utils/request.py", line 44, in send_request
    response = session.request(method, url, timeout=timeout, **kwargs)
  File "/app/openhands/utils/http_session.py", line 54, in request
    return _get_client().request(*args, **kwargs)
           ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.13/site-packages/httpx/_client.py", line 825, in request
    return self.send(request, auth=auth, follow_redirects=follow_redirects)
           ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.13/site-packages/httpx/_client.py", line 914, in send
    response = self._send_handling_auth(
        request,
    ...<2 lines>...
        history=[],
    )
  File "/app/.venv/lib/python3.13/site-packages/httpx/_client.py", line 942, in _send_handling_auth
    response = self._send_handling_redirects(
        request,
        follow_redirects=follow_redirects,
        history=history,
    )
  File "/app/.venv/lib/python3.13/site-packages/httpx/_client.py", line 979, in _send_handling_redirects
    response = self._send_single_request(request)
  File "/app/.venv/lib/python3.13/site-packages/httpx/_client.py", line 1014, in _send_single_request
    response = transport.handle_request(request)
  File "/app/.venv/lib/python3.13/site-packages/httpx/_transports/default.py", line 249, in handle_request
    with map_httpcore_exceptions():
         ~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/local/lib/python3.13/contextlib.py", line 162, in __exit__
    self.gen.throw(value)
    ~~~~~~~~~~~~~~^^^^^^^
  File "/app/.venv/lib/python3.13/site-packages/httpx/_transports/default.py", line 118, in map_httpcore_exceptions
    raise mapped_exc(message) from exc
httpx.ConnectTimeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/openhands/server/session/session.py", line 267, in initialize_agent
    await self.agent_session.start(
    ...<14 lines>...
    )
  File "/app/openhands/server/session/agent_session.py", line 156, in start
    self.memory = await self._create_memory(
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<6 lines>...
    )
    ^
  File "/app/openhands/server/session/agent_session.py", line 471, in _create_memory
    microagents: list[BaseMicroagent] = await call_sync_from_async(
                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<2 lines>...
    )
    ^
  File "/app/openhands/utils/async_utils.py", line 17, in call_sync_from_async
    result = await coro
             ^^^^^^^^^^
  File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 59, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/app/openhands/utils/async_utils.py", line 16, in <lambda>
    coro = loop.run_in_executor(None, lambda: fn(*args, **kwargs))
                                              ~~^^^^^^^^^^^^^^^^^
  File "/app/openhands/runtime/base.py", line 897, in get_microagents_from_selected_repo
    obs = self.read(
        FileReadAction(path=str(self.workspace_root / '.openhands_instructions'))
    )
  File "/app/openhands/runtime/impl/action_execution/action_execution_client.py", line 351, in read
    return self.send_action_for_execution(action)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
  File "/app/openhands/runtime/impl/action_execution/action_execution_client.py", line 337, in send_action_for_execution
    raise AgentRuntimeTimeoutError(
        f'Runtime failed to return execute_action before the requested timeout of {action.timeout}s'
    )
openhands.core.exceptions.AgentRuntimeTimeoutError: Runtime failed to return execute_action before the requested timeout of 120.0s
l
Could you try qwen-3-coder-30b-a3b instead of devstral?
c
Also, openhands needs python 3.12, I see 3.13
l
Thanks to both, I will try them this evening. @calm-artist-7206 where can I find that requirement? The only mention I find is for Python 3.12+ here
c
I think we meant 3.12.x there, sorry 😅 The thing is, to my knowledge we haven’t tested 3.13 recently, and in the past it didn’t work, though I don’t recall why exactly. So I’d suggest to use 3.12.x, although if you want to try it on 3.13… I think we’d be interested to hear if there are issues. The error is when sending an action to docker. I don’t think it’s python related TBH, it looks like the app doesn’t manage to communicate with the docker container on http 🤔 Another, perhaps really better alternative, if you are willing to, is to try the CLI app. The reason is that we’re just transitioning to a major version of OpenHands, V1, and the CLI is already on V1, while the GUI you’re using is not, is still the legacy version. 🤔
l
Well, 3.12 in a pyenv didn't help. I cannot understand if it is normal for it to be waiting for http://host.docker.internal:32864 when that port is not specified anywhere.
Copy code
20:06:57 - openhands:INFO: docker_runtime.py:186 - [runtime 50bd0acec4b24ae58bd3e13910e255c0] Container started: openhands-runtime-50bd0acec4b24ae58bd3e13910e255c0. VSCode URL: None
20:06:57 - openhands:INFO: docker_runtime.py:197 - [runtime 50bd0acec4b24ae58bd3e13910e255c0] Waiting for client to become ready at <http://host.docker.internal:32864>...
INFO:     172.17.0.1:54964 - "GET /api/conversations/50bd0acec4b24ae58bd3e13910e255c0 HTTP/1.1" 200 OK
INFO:     172.17.0.1:54964 - "GET /api/conversations/50bd0acec4b24ae58bd3e13910e255c0 HTTP/1.1" 200 OK
INFO:     172.17.0.1:54964 - "GET /api/conversations/50bd0acec4b24ae58bd3e13910e255c0 HTTP/1.1" 200 OK
INFO:     172.17.0.1:54964 - "GET /api/conversations/50bd0acec4b24ae58bd3e13910e255c0 HTTP/1.1" 200 OK
INFO:     172.17.0.1:54964 - "GET /api/conversations/50bd0acec4b24ae58bd3e13910e255c0 HTTP/1.1" 200 OK
INFO:     172.17.0.1:54964 - "GET /api/conversations/50bd0acec4b24ae58bd3e13910e255c0 HTTP/1.1" 200 OK
INFO:     172.17.0.1:54964 - "GET /api/conversations/50bd0acec4b24ae58bd3e13910e255c0 HTTP/1.1" 200 OK
INFO:     172.17.0.1:54964 - "GET /api/conversations/50bd0acec4b24ae58bd3e13910e255c0 HTTP/1.1" 200 OK
INFO:     172.17.0.1:54964 - "GET /api/conversations/50bd0acec4b24ae58bd3e13910e255c0 HTTP/1.1" 200 OK
INFO:     172.17.0.1:54964 - "GET /api/conversations/50bd0acec4b24ae58bd3e13910e255c0 HTTP/1.1" 200 OK
INFO:     172.17.0.1:54964 - "GET /api/conversations/50bd0acec4b24ae58bd3e13910e255c0 HTTP/1.1" 200 OK
INFO:     172.17.0.1:54964 - "GET /api/conversations/50bd0acec4b24ae58bd3e13910e255c0 HTTP/1.1" 200 OK
INFO:     172.17.0.1:54964 - "GET /api/conversations/50bd0acec4b24ae58bd3e13910e255c0 HTTP/1.1" 200 OK
INFO:     172.17.0.1:54964 - "GET /api/conversations/50bd0acec4b24ae58bd3e13910e255c0 HTTP/1.1" 200 OK
INFO:     172.17.0.1:54964 - "GET /api/conversations/50bd0acec4b24ae58bd3e13910e255c0 HTTP/1.1" 200 OK
INFO:     172.17.0.1:54964 - "GET /api/conversations/50bd0acec4b24ae58bd3e13910e255c0 HTTP/1.1" 200 OK
INFO:     172.17.0.1:54964 - "GET /api/conversations/50bd0acec4b24ae58bd3e13910e255c0 HTTP/1.1" 200 OK
INFO:     172.17.0.1:54964 - "GET /api/conversations/50bd0acec4b24ae58bd3e13910e255c0 HTTP/1.1" 200 OK
INFO:     172.17.0.1:54964 - "GET /api/conversations/50bd0acec4b24ae58bd3e13910e255c0 HTTP/1.1" 200 OK
INFO:     172.17.0.1:54964 - "GET /api/conversations/50bd0acec4b24ae58bd3e13910e255c0 HTTP/1.1" 200 OK
INFO:     172.17.0.1:54964 - "GET /api/conversations/50bd0acec4b24ae58bd3e13910e255c0 HTTP/1.1" 200 OK
INFO:     172.17.0.1:54964 - "GET /api/conversations/50bd0acec4b24ae58bd3e13910e255c0 HTTP/1.1" 200 OK
INFO:     172.17.0.1:54964 - "GET /api/conversations/50bd0acec4b24ae58bd3e13910e255c0 HTTP/1.1" 200 OK
INFO:     172.17.0.1:54964 - "GET /api/conversations/50bd0acec4b24ae58bd3e13910e255c0 HTTP/1.1" 200 OK
INFO:     172.17.0.1:54964 - "GET /api/conversations/50bd0acec4b24ae58bd3e13910e255c0 HTTP/1.1" 200 OK
INFO:     172.17.0.1:54964 - "GET /api/conversations/50bd0acec4b24ae58bd3e13910e255c0 HTTP/1.1" 200 OK
INFO:     172.17.0.1:54964 - "GET /api/conversations/50bd0acec4b24ae58bd3e13910e255c0 HTTP/1.1" 200 OK
INFO:     172.17.0.1:54964 - "GET /api/conversations/50bd0acec4b24ae58bd3e13910e255c0 HTTP/1.1" 200 OK
INFO:     172.17.0.1:54964 - "GET /api/conversations/50bd0acec4b24ae58bd3e13910e255c0 HTTP/1.1" 200 OK
INFO:     172.17.0.1:54964 - "GET /api/conversations/50bd0acec4b24ae58bd3e13910e255c0 HTTP/1.1" 200 OK
INFO:     172.17.0.1:54964 - "GET /api/conversations/50bd0acec4b24ae58bd3e13910e255c0 HTTP/1.1" 200 OK
20:09:01 - openhands:ERROR: agent_session.py:220 - Agent session start failed in 124.67646169662476s
20:09:01 - openhands:ERROR: session.py:301 - Error creating agent_session: timed out
Traceback (most recent call last):
  File "/app/.venv/lib/python3.13/site-packages/httpx/_transports/default.py", line 101, in map_httpcore_exceptions
    yield
  File "/app/.venv/lib/python3.13/site-packages/httpx/_transports/default.py", line 250, in handle_request
    resp = self._pool.handle_request(req)
  File "/app/.venv/lib/python3.13/site-packages/httpcore/_sync/connection_pool.py", line 256, in handle_request
    raise exc from None
  File "/app/.venv/lib/python3.13/site-packages/httpcore/_sync/connection_pool.py", line 236, in handle_request
    response = connection.handle_request(
        pool_request.request
    )
  File "/app/.venv/lib/python3.13/site-packages/httpcore/_sync/connection.py", line 101, in handle_request
    raise exc
  File "/app/.venv/lib/python3.13/site-packages/httpcore/_sync/connection.py", line 78, in handle_request
    stream = self._connect(request)
  File "/app/.venv/lib/python3.13/site-packages/httpcore/_sync/connection.py", line 124, in _connect
    stream = self._network_backend.connect_tcp(**kwargs)
  File "/app/.venv/lib/python3.13/site-packages/httpcore/_backends/sync.py", line 207, in connect_tcp
    with map_exceptions(exc_map):
         ~~~~~~~~~~~~~~^^^^^^^^^
  File "/usr/local/lib/python3.13/contextlib.py", line 162, in __exit__
    self.gen.throw(value)
    ~~~~~~~~~~~~~~^^^^^^^
  File "/app/.venv/lib/python3.13/site-packages/httpcore/_exceptions.py", line 14, in map_exceptions
    raise to_exc(exc) from exc
httpcore.ConnectTimeout: timed out

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/app/openhands/server/session/session.py", line 267, in initialize_agent
    await self.agent_session.start(
    ...<14 lines>...
    )
  File "/app/openhands/server/session/agent_session.py", line 135, in start
    runtime_connected = await self._create_runtime(
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<7 lines>...
    )
    ^
  File "/app/openhands/server/session/agent_session.py", line 366, in _create_runtime
    await self.runtime.connect()
  File "/app/openhands/runtime/impl/docker/docker_runtime.py", line 200, in connect
    await call_sync_from_async(self.wait_until_alive)
  File "/app/openhands/utils/async_utils.py", line 17, in call_sync_from_async
    result = await coro
             ^^^^^^^^^^
  File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 59, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/app/openhands/utils/async_utils.py", line 16, in <lambda>
    coro = loop.run_in_executor(None, lambda: fn(*args, **kwargs))
                                              ~~^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.13/site-packages/tenacity/__init__.py", line 338, in wrapped_f
    return copy(f, *args, **kw)
  File "/app/.venv/lib/python3.13/site-packages/tenacity/__init__.py", line 477, in __call__
    do = self.iter(retry_state=retry_state)
  File "/app/.venv/lib/python3.13/site-packages/tenacity/__init__.py", line 378, in iter
    result = action(retry_state)
  File "/app/.venv/lib/python3.13/site-packages/tenacity/__init__.py", line 420, in exc_check
    raise retry_exc.reraise()
          ~~~~~~~~~~~~~~~~~^^
  File "/app/.venv/lib/python3.13/site-packages/tenacity/__init__.py", line 187, in reraise
    raise self.last_attempt.result()
          ~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/local/lib/python3.13/concurrent/futures/_base.py", line 449, in result
    return self.__get_result()
           ~~~~~~~~~~~~~~~~~^^
  File "/usr/local/lib/python3.13/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
  File "/app/.venv/lib/python3.13/site-packages/tenacity/__init__.py", line 480, in __call__
    result = fn(*args, **kwargs)
  File "/app/openhands/runtime/impl/docker/docker_runtime.py", line 592, in wait_until_alive
    self.check_if_alive()
    ~~~~~~~~~~~~~~~~~~~^^
  File "/app/openhands/runtime/impl/action_execution/action_execution_client.py", line 134, in check_if_alive
    response = self._send_action_server_request(
        'GET',
        request_url,
        timeout=5,
    )
  File "/app/.venv/lib/python3.13/site-packages/tenacity/__init__.py", line 338, in wrapped_f
    return copy(f, *args, **kw)
  File "/app/.venv/lib/python3.13/site-packages/tenacity/__init__.py", line 477, in __call__
    do = self.iter(retry_state=retry_state)
  File "/app/.venv/lib/python3.13/site-packages/tenacity/__init__.py", line 378, in iter
    result = action(retry_state)
  File "/app/.venv/lib/python3.13/site-packages/tenacity/__init__.py", line 400, in <lambda>
    self._add_action_func(lambda rs: rs.outcome.result())
                                     ~~~~~~~~~~~~~~~~~^^
  File "/usr/local/lib/python3.13/concurrent/futures/_base.py", line 449, in result
    return self.__get_result()
           ~~~~~~~~~~~~~~~~~^^
  File "/usr/local/lib/python3.13/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
  File "/app/.venv/lib/python3.13/site-packages/tenacity/__init__.py", line 480, in __call__
    result = fn(*args, **kwargs)
  File "/app/openhands/runtime/impl/action_execution/action_execution_client.py", line 129, in _send_action_server_request
    return send_request(self.session, method, url, **kwargs)
  File "/app/.venv/lib/python3.13/site-packages/tenacity/__init__.py", line 338, in wrapped_f
    return copy(f, *args, **kw)
  File "/app/.venv/lib/python3.13/site-packages/tenacity/__init__.py", line 477, in __call__
    do = self.iter(retry_state=retry_state)
  File "/app/.venv/lib/python3.13/site-packages/tenacity/__init__.py", line 378, in iter
    result = action(retry_state)
  File "/app/.venv/lib/python3.13/site-packages/tenacity/__init__.py", line 400, in <lambda>
    self._add_action_func(lambda rs: rs.outcome.result())
                                     ~~~~~~~~~~~~~~~~~^^
  File "/usr/local/lib/python3.13/concurrent/futures/_base.py", line 449, in result
    return self.__get_result()
           ~~~~~~~~~~~~~~~~~^^
  File "/usr/local/lib/python3.13/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
  File "/app/.venv/lib/python3.13/site-packages/tenacity/__init__.py", line 480, in __call__
    result = fn(*args, **kwargs)
  File "/app/openhands/runtime/utils/request.py", line 44, in send_request
    response = session.request(method, url, timeout=timeout, **kwargs)
  File "/app/openhands/utils/http_session.py", line 54, in request
    return _get_client().request(*args, **kwargs)
           ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.13/site-packages/httpx/_client.py", line 825, in request
    return self.send(request, auth=auth, follow_redirects=follow_redirects)
           ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.13/site-packages/httpx/_client.py", line 914, in send
    response = self._send_handling_auth(
        request,
    ...<2 lines>...
        history=[],
    )
  File "/app/.venv/lib/python3.13/site-packages/httpx/_client.py", line 942, in _send_handling_auth
    response = self._send_handling_redirects(
        request,
        follow_redirects=follow_redirects,
        history=history,
    )
  File "/app/.venv/lib/python3.13/site-packages/httpx/_client.py", line 979, in _send_handling_redirects
    response = self._send_single_request(request)
  File "/app/.venv/lib/python3.13/site-packages/httpx/_client.py", line 1014, in _send_single_request
    response = transport.handle_request(request)
  File "/app/.venv/lib/python3.13/site-packages/httpx/_transports/default.py", line 249, in handle_request
    with map_httpcore_exceptions():
         ~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/local/lib/python3.13/contextlib.py", line 162, in __exit__
    self.gen.throw(value)
    ~~~~~~~~~~~~~~^^^^^^^
  File "/app/.venv/lib/python3.13/site-packages/httpx/_transports/default.py", line 118, in map_httpcore_exceptions
    raise mapped_exc(message) from exc
httpx.ConnectTimeout: timed out
And the port changes at every conversation.
c
It's the runtime's port, the port of the execution server inside the container, I believe
l
@limited-student-10747 trying with Qwen didn't change the result.
To work with a local model in the CLI do I need to use Advanced in the LLM setup?
I can confirm that the CLI version runs perfectly.
👍 1
c
Thank you for the heads up!
c
I suspect this issue is the same as my issue: https://openhands-ai.slack.com/archives/C06PB3T5ZK6/p1764105536589549?thread_ts=1764097227.416509&amp;cid=C06PB3T5ZK6 Click through to see workaround.