For release 0.51.0 :pray: <https://github.com/All-...
# proj-release
b
c
BTW, do you think if it is easy to patch a 0.51.1 to include this one? without it, our GUI just doesn't work with OH provider😞 https://github.com/All-Hands-AI/OpenHands/commit/5282770a4ceac436413485c400667a1e280d07be
b
This would be patching OSS only?
c
yeah, it doesn't affect saas
b
Let me get on that. Give me 5 minutes to post something and then I'll jump on it
🙌 1
@chilly-france-44439 I updated 0.51.0 with the patch and tested it locally. https://github.com/All-Hands-AI/OpenHands/pull/10023 Can't use OpenHands provider still.
I get
Error authenticating with the LLM provider
c
weird, did you get the API key from the SaaS?
b
Yep
Let me see if I can get you a better error
Copy code
18:21:29 - openhands:ERROR: agent_controller.py:306 - [Agent Controller 238f999867a642c29e292f9120382d9c] Error while running the agent (session ID: 238f999867a642c29e292f9120382d9c): litellm.AuthenticationError: AuthenticationError: Litellm_proxyException - Authentication Error, Invalid proxy server token passed. Received API Key = sk-...856w, Key Hash (Token) =13211528d93d915ca068d336005b5b98faf360eb62660283e52daf00c880d536. Unable to find token in cache or `LiteLLM_VerificationTokenTable`. Traceback: Traceback (most recent call last):
  File "/app/.venv/lib/python3.12/site-packages/litellm/llms/openai/openai.py", line 725, in completion
    raise e
  File "/app/.venv/lib/python3.12/site-packages/litellm/llms/openai/openai.py", line 653, in completion
    ) = self.make_sync_openai_chat_completion_request(
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/litellm/litellm_core_utils/logging_utils.py", line 149, in sync_wrapper
    result = func(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/litellm/llms/openai/openai.py", line 471, in make_sync_openai_chat_completion_request
    raise e
  File "/app/.venv/lib/python3.12/site-packages/litellm/llms/openai/openai.py", line 453, in make_sync_openai_chat_completion_request
    raw_response = openai_client.chat.completions.with_raw_response.create(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/openai/_legacy_response.py", line 364, in wrapped
    return cast(LegacyAPIResponse[R], func(*args, **kwargs))
                                      ^^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/openai/_utils/_utils.py", line 287, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/openai/resources/chat/completions/completions.py", line 1087, in create
    return self._post(
           ^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/openai/_base_client.py", line 1256, in post
    return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/openai/_base_client.py", line 1044, in request
    raise self._make_status_error_from_response(err.response) from None
openai.AuthenticationError: Error code: 401 - {'error': {'message': 'Authentication Error, Invalid proxy server token passed. Received API Key = sk-...856w, Key Hash (Token) =13211528d93d915ca068d336005b5b98faf360eb62660283e52daf00c880d536. Unable to find token in cache or `LiteLLM_VerificationTokenTable`', 'type': 'token_not_found_in_db', 'param': 'key', 'code': '401'}}

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/.venv/lib/python3.12/site-packages/litellm/main.py", line 1966, in completion
    raise e
  File "/app/.venv/lib/python3.12/site-packages/litellm/main.py", line 1939, in completion
    response = openai_chat_completions.completion(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/litellm/llms/openai/openai.py", line 736, in completion
    raise OpenAIError(
litellm.llms.openai.common_utils.OpenAIError: Error code: 401 - {'error': {'message': 'Authentication Error, Invalid proxy server token passed. Received API Key = sk-...856w, Key Hash (Token) =13211528d93d915ca068d336005b5b98faf360eb62660283e52daf00c880d536. Unable to find token in cache or `LiteLLM_VerificationTokenTable`', 'type': 'token_not_found_in_db', 'param': 'key', 'code': '401'}}

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/openhands/controller/agent_controller.py", line 304, in _step_with_exception_handling
    await self._step()
  File "/app/openhands/controller/agent_controller.py", line 813, in _step
    action = self.agent.step(self.state)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/openhands/agenthub/codeact_agent/codeact_agent.py", line 197, in step
    response = self.llm.completion(**params)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/tenacity/__init__.py", line 338, in wrapped_f
    return copy(f, *args, **kw)
           ^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/tenacity/__init__.py", line 477, in __call__
    do = self.iter(retry_state=retry_state)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/tenacity/__init__.py", line 378, in iter
    result = action(retry_state)
             ^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/tenacity/__init__.py", line 400, in <lambda>
    self._add_action_func(lambda rs: rs.outcome.result())
                                     ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/concurrent/futures/_base.py", line 449, in result
    return self.__get_result()
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
  File "/app/.venv/lib/python3.12/site-packages/tenacity/__init__.py", line 480, in __call__
    result = fn(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^
  File "/app/openhands/llm/llm.py", line 349, in wrapper
    resp: ModelResponse = self._completion_unwrapped(*args, **kwargs)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/litellm/utils.py", line 1309, in wrapper
    raise e
  File "/app/.venv/lib/python3.12/site-packages/litellm/utils.py", line 1184, in wrapper
    result = original_function(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/litellm/main.py", line 3427, in completion
    raise exception_type(
          ^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/litellm/litellm_core_utils/exception_mapping_utils.py", line 2301, in exception_type
    raise e
  File "/app/.venv/lib/python3.12/site-packages/litellm/litellm_core_utils/exception_mapping_utils.py", line 456, in exception_type
    raise AuthenticationError(
litellm.exceptions.AuthenticationError: litellm.AuthenticationError: AuthenticationError: Litellm_proxyException - Authentication Error, Invalid proxy server token passed. Received API Key = sk-...856w, Key Hash (Token) =13211528d93d915ca068d336005b5b98faf360eb62660283e52daf00c880d536. Unable to find token in cache or `LiteLLM_VerificationTokenTable`
c
can you try renew the key again? 👀
b
Yes sir. Trying
Yep that worked! I'll release this OSS patch now.
🙌 1
c
thank you!
np 1
b
It's been patched with 0.51.1 and released. If you don't mind a quick version bump 👀 so I can wrap it up 🙏 https://github.com/All-Hands-AI/OpenHands/pull/10023
✅ 1
c
@better-park-34863 did we do a new pypi packages for this release 👀
b
Yep
🙌 1
g
hey @full-greece-2387 are you interested in talking about the Add MCP support for CLI in our Community Call Friday? Otherwise I'm happy to talk about it if you'd prefer.