diff --git a/docs/modules/usage/how-to/gui-mode.md b/docs/modules/usage/how-to/gui-mode.md index 8aeb2fa1fb..df5a070c01 100644 --- a/docs/modules/usage/how-to/gui-mode.md +++ b/docs/modules/usage/how-to/gui-mode.md @@ -58,4 +58,3 @@ The main interface consists of several key components: 3. Use one of the recommended models, as described in the [LLMs section](usage/llms/llms.md). Remember, the GUI mode of OpenHands is designed to make your interaction with the AI assistant as smooth and intuitive as possible. Don't hesitate to explore its features to maximize your productivity. - diff --git a/openhands/__init__.py b/openhands/__init__.py index 531f084443..4b918466a4 100644 --- a/openhands/__init__.py +++ b/openhands/__init__.py @@ -6,12 +6,14 @@ __package_name__ = 'openhands_ai' def get_version(): try: from importlib.metadata import PackageNotFoundError, version + return version(__package_name__) except (ImportError, PackageNotFoundError): pass try: from pkg_resources import DistributionNotFound, get_distribution + return get_distribution(__package_name__).version except (ImportError, DistributionNotFound): pass diff --git a/openhands/llm/llm.py b/openhands/llm/llm.py index 8327569dff..2c046e470b 100644 --- a/openhands/llm/llm.py +++ b/openhands/llm/llm.py @@ -342,9 +342,14 @@ class LLM(RetryMixin, DebugMixin): # but model_info will have the correct value for some reason. # we can go with it, but we will need to keep an eye if model_info is correct for Vertex or other providers # remove when litellm is updated to fix https://github.com/BerriAI/litellm/issues/5608 - return litellm.supports_vision(self.config.model) or ( - self.model_info is not None - and self.model_info.get('supports_vision', False) + # Check both the full model name and the name after proxy prefix for vision support + return ( + litellm.supports_vision(self.config.model) + or litellm.supports_vision(self.config.model.split('/')[-1]) + or ( + self.model_info is not None + and self.model_info.get('supports_vision', False) + ) ) def is_caching_prompt_active(self) -> bool: diff --git a/pyproject.toml b/pyproject.toml index affb3a4470..5f05b4da96 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -92,6 +92,7 @@ reportlab = "*" [tool.coverage.run] concurrency = ["gevent"] + [tool.poetry.group.runtime.dependencies] jupyterlab = "*" notebook = "*" @@ -122,6 +123,7 @@ ignore = ["D1"] [tool.ruff.lint.pydocstyle] convention = "google" + [tool.poetry.group.evaluation.dependencies] streamlit = "*" whatthepatch = "*"