Skip to content

πŸ™Œ OpenHands: AI-Driven Development

PLTF-2506: enterprise upgrade openhands SDK to 1.21.1 (#14409)

aivong-openhandsa89778f3d703
diff --git a/enterprise/poetry.lock b/enterprise/poetry.lock
index 6d038315ba..41986f11cc 100644
--- a/enterprise/poetry.lock
+++ b/enterprise/poetry.lock
@@ -1,4 +1,4 @@
-# This file is automatically @generated by Poetry 2.2.1 and should not be changed by hand.
+# This file is automatically @generated by Poetry 2.3.3 and should not be changed by hand.
[[package]]
name = "agent-client-protocol"
@@ -3585,7 +3585,7 @@ files = [
[package.dependencies]
googleapis-common-protos = ">=1.5.5"
grpcio = ">=1.67.1"
-protobuf = ">=5.26.1,<6.0dev"
+protobuf = ">=5.26.1,<6.0.dev0"
[[package]]
name = "gspread"
@@ -3906,7 +3906,7 @@ pfzy = ">=0.3.1,<0.4.0"
prompt-toolkit = ">=3.0.1,<4.0.0"
[package.extras]
-docs = ["Sphinx (>=4.1.2,<5.0.0)", "furo (>=2021.8.17-beta.43,<2022.0.0)", "myst-parser (>=0.15.1,<0.16.0)", "sphinx-autobuild (>=2021.3.14,<2022.0.0)", "sphinx-copybutton (>=0.4.0,<0.5.0)"]
+docs = ["Sphinx (>=4.1.2,<5.0.0)", "furo (>=2021.8.17b43,<2022.0.0)", "myst-parser (>=0.15.1,<0.16.0)", "sphinx-autobuild (>=2021.3.14,<2022.0.0)", "sphinx-copybutton (>=0.4.0,<0.5.0)"]
[[package]]
name = "installer"
@@ -4348,7 +4348,7 @@ fqdn = {version = "*", optional = true, markers = "extra == \"format-nongpl\""}
idna = {version = "*", optional = true, markers = "extra == \"format-nongpl\""}
isoduration = {version = "*", optional = true, markers = "extra == \"format-nongpl\""}
jsonpointer = {version = ">1.13", optional = true, markers = "extra == \"format-nongpl\""}
-jsonschema-specifications = ">=2023.03.6"
+jsonschema-specifications = ">=2023.3.6"
referencing = ">=0.28.4"
rfc3339-validator = {version = "*", optional = true, markers = "extra == \"format-nongpl\""}
rfc3986-validator = {version = ">0.1.0", optional = true, markers = "extra == \"format-nongpl\""}
@@ -4755,7 +4755,7 @@ files = [
]
[package.dependencies]
-certifi = ">=14.05.14"
+certifi = ">=14.5.14"
durationpy = ">=0.7"
python-dateutil = ">=2.5.3"
pyyaml = ">=5.4.1"
@@ -6409,14 +6409,14 @@ llama = ["llama-index (>=0.12.29,<0.13.0)", "llama-index-core (>=0.12.29,<0.13.0
[[package]]
name = "openhands-agent-server"
-version = "1.19.1"
+version = "1.21.1"
description = "OpenHands Agent Server - REST/WebSocket interface for OpenHands AI Agent"
optional = false
python-versions = ">=3.12"
groups = ["main"]
files = [
- {file = "openhands_agent_server-1.19.1-py3-none-any.whl", hash = "sha256:4c685bcf7f941f087878f51dca2071a110fea360798da4020fc89b034bee7fda"},
- {file = "openhands_agent_server-1.19.1.tar.gz", hash = "sha256:0cb8d6a681b0645e1e2391e81466436b5573a56f8985e76620902dab2bcc5092"},
+ {file = "openhands_agent_server-1.21.1-py3-none-any.whl", hash = "sha256:08e315fef9996215767f04b44ebb48a12553213af87cc1fa79a06ce8e9c0b108"},
+ {file = "openhands_agent_server-1.21.1.tar.gz", hash = "sha256:7e3957e3889bc4e63378a61a3b8e5afb8882261ad7c3b07307b0c0bab473ce81"},
]
[package.dependencies]
@@ -6472,16 +6472,16 @@ jupyter-kernel-gateway = "*"
jwcrypto = ">=1.5.6"
kubernetes = ">=33.1"
libtmux = ">=0.46.2"
-litellm = ">=1.83.14,<1.83.15"
+litellm = ">=1.83.14"
lmnr = ">=0.7.20"
mcp = ">=1.25"
memory-profiler = ">=0.61"
numpy = "*"
openai = "2.24"
openhands-aci = "0.3.3"
-openhands-agent-server = "1.19.1"
-openhands-sdk = "1.19.1"
-openhands-tools = "1.19.1"
+openhands-agent-server = "1.21.1"
+openhands-sdk = "1.21.1"
+openhands-tools = "1.21.1"
opentelemetry-api = ">=1.33.1"
opentelemetry-exporter-otlp-proto-grpc = ">=1.33.1"
orjson = ">=3.11.6"
@@ -6533,14 +6533,14 @@ url = ".."
[[package]]
name = "openhands-sdk"
-version = "1.19.1"
+version = "1.21.1"
description = "OpenHands SDK - Core functionality for building AI agents"
optional = false
python-versions = ">=3.12"
groups = ["main"]
files = [
- {file = "openhands_sdk-1.19.1-py3-none-any.whl", hash = "sha256:fd2c7ed11663595f6131b5e1879f636ad1dd4d897490b582509c924ca238a150"},
- {file = "openhands_sdk-1.19.1.tar.gz", hash = "sha256:1e9a758649ae516259c965778b891592c38e232de6bcab53036ba05f6fc53551"},
+ {file = "openhands_sdk-1.21.1-py3-none-any.whl", hash = "sha256:028660d3b92f7379c7fc8e07b546ca710506cee2c1925557126958b3f07dd2f2"},
+ {file = "openhands_sdk-1.21.1.tar.gz", hash = "sha256:ec3097ca02bd565175f9a414a6791b2c5b88f48ae5f42ee44cb9e619d8b489fa"},
]
[package.dependencies]
@@ -6550,8 +6550,9 @@ fakeredis = {version = ">=2.32.1", extras = ["lua"]}
fastmcp = ">=3.0.0"
filelock = ">=3.20.1"
httpx = {version = ">=0.27.0", extras = ["socks"]}
-litellm = ">=1.82.6,<1.82.7 || >1.82.7,<1.82.8 || >1.82.8"
+litellm = ">=1.83.7"
lmnr = ">=0.7.47"
+pillow = ">=12.1.1"
pydantic = ">=2.12.5"
python-frontmatter = ">=1.1.0"
python-json-logger = ">=3.3.0"
@@ -6563,14 +6564,14 @@ boto3 = ["boto3 (>=1.35.0)"]
[[package]]
name = "openhands-tools"
-version = "1.19.1"
+version = "1.21.1"
description = "OpenHands Tools - Runtime tools for AI agents"
optional = false
python-versions = ">=3.12"
groups = ["main"]
files = [
- {file = "openhands_tools-1.19.1-py3-none-any.whl", hash = "sha256:695b04399f8f7018aba937d4e0eb97c7caa0111538e9620b46871f5f62726c14"},
- {file = "openhands_tools-1.19.1.tar.gz", hash = "sha256:0634a0e24e4fd87f05f902ff97e5cd30dd909d5cb2b137aae4470902f800f3db"},
+ {file = "openhands_tools-1.21.1-py3-none-any.whl", hash = "sha256:d606b9aaf8315308ce10bef8a614e7f42ae1eef6f1ecf553d599f6feebf0236d"},
+ {file = "openhands_tools-1.21.1.tar.gz", hash = "sha256:046c6d032f738f3f285dd82f8b942483e95a71aa154834112d366cdb1bdc3265"},
]
[package.dependencies]
@@ -7094,7 +7095,7 @@ files = [
]
[package.extras]
-docs = ["Sphinx (>=4.1.2,<5.0.0)", "furo (>=2021.8.17-beta.43,<2022.0.0)", "myst-parser (>=0.15.1,<0.16.0)", "sphinx-autobuild (>=2021.3.14,<2022.0.0)", "sphinx-copybutton (>=0.4.0,<0.5.0)"]
+docs = ["Sphinx (>=4.1.2,<5.0.0)", "furo (>=2021.8.17b43,<2022.0.0)", "myst-parser (>=0.15.1,<0.16.0)", "sphinx-autobuild (>=2021.3.14,<2022.0.0)", "sphinx-copybutton (>=0.4.0,<0.5.0)"]
[[package]]
name = "pg8000"
@@ -13047,10 +13048,10 @@ files = [
]
[package.dependencies]
-botocore = ">=1.37.4,<2.0a.0"
+botocore = ">=1.37.4,<2.0a0"
[package.extras]
-crt = ["botocore[crt] (>=1.37.4,<2.0a.0)"]
+crt = ["botocore[crt] (>=1.37.4,<2.0a0)"]
[[package]]
name = "scantree"
@@ -15202,7 +15203,7 @@ files = [
]
[package.extras]
-cffi = ["cffi (>=1.17,<2.0) ; platform_python_implementation != \"PyPy\" and python_version < \"3.14\"", "cffi (>=2.0.0b) ; platform_python_implementation != \"PyPy\" and python_version >= \"3.14\""]
+cffi = ["cffi (>=1.17,<2.0) ; platform_python_implementation != \"PyPy\" and python_version < \"3.14\"", "cffi (>=2.0.0b0) ; platform_python_implementation != \"PyPy\" and python_version >= \"3.14\""]
[metadata]
lock-version = "2.1"
diff --git a/enterprise/tests/unit/test_user_store.py b/enterprise/tests/unit/test_user_store.py
index 2997ede789..9fbb540551 100644
--- a/enterprise/tests/unit/test_user_store.py
+++ b/enterprise/tests/unit/test_user_store.py
@@ -789,6 +789,10 @@ def test_get_org_kwargs_for_migration_uses_minimal_org_defaults_for_custom_llm()
)
from storage.user_settings import UserSettings
+ # Use the SDK's current schema version - migration logic should always
+ # output settings matching the SDK's expected schema, regardless of input version
+ from openhands.sdk.settings import AGENT_SETTINGS_SCHEMA_VERSION
+
user_settings = UserSettings(
keycloak_user_id='test',
user_version=3,
@@ -807,7 +811,7 @@ def test_get_org_kwargs_for_migration_uses_minimal_org_defaults_for_custom_llm()
assert org_kwargs['org_version'] == ORG_SETTINGS_VERSION
assert org_kwargs['agent_settings'] == {
- 'schema_version': 1,
+ 'schema_version': AGENT_SETTINGS_SCHEMA_VERSION,
'llm': {
'model': get_default_litellm_model(),
'base_url': LITE_LLM_API_URL,