Skip to content

fix(llm): remove LLM.modify_params past its v1.47.0 removal deadline - #4954

Merged
enyst merged 4 commits into
mainfrom
fix/remove-llm-modify-params-deprecation
Sep 11, 2026
Merged

enyst merged 4 commits into
mainfrom
fix/remove-llm-modify-params-deprecation

Conversation

@enyst

@enyst enyst commented Sep 11, 2026 •

Copy link
Copy Markdown
Member

HUMAN:

Ran the repo's deprecation gate and the affected tests locally; all green. See details below.


AGENT:
I am an AI agent (smolpaws) acting on behalf of Engel.

Why

The Deprecation deadlines CI check (.github/scripts/check_deprecations.py) is failing on the default branch and on open PRs (e.g. #4917):

The following deprecated features have passed their removal deadline:
- [openhands-sdk] 'LLM.modify_params' (warn_call)
  deprecated in: 1.42.0
  removed in:    1.47.0

LLM.modify_params was deprecated in v1.42.0 and scheduled for removal in v1.47.0. The repo is now at 1.47.0, so the gate correctly demands its removal.

Summary

  • Remove the deprecated modify_params field from LLM and its deprecation warning.
  • On load, silently ignore a legacy modify_params key so older serialized configs still deserialize. LiteLLM parameter modification remains enabled process-wide via the module-level litellm.modify_params = True (unchanged), so behavior is preserved.
  • Update tests/sdk/llm/test_llm_completion.py and tests/sdk/config/test_llm_config.py to stop passing/asserting the removed field; keep the process-wide-behavior test.
  • Drop the stale modify_params key from the 37_llm_profile_store example profile. The legacy conversation fixture (v1_11_5_cli_default) intentionally keeps it to verify old configs still load.

REST API contract changes

Compared with base OpenAPI 30cf5832e42c for public /api/** paths.

--- base public OpenAPI
+++ head public OpenAPI
@@ -1653 +1652,0 @@
-schema LLM-Input property modify_params optional schema=type="boolean" default=true
@@ -1710 +1708,0 @@
-schema LLM-Output property modify_params optional schema=type="boolean" default=true

Issue Number

Fixes #4955

How to Test

uv run --with packaging python .github/scripts/check_deprecations.py
uv run pytest tests/sdk/config/test_llm_config.py tests/sdk/llm/test_llm_completion.py tests/sdk/conversation/local/test_state_serialization.py -q
uv run ruff check openhands-sdk/openhands/sdk/llm/llm.py tests/sdk/llm/test_llm_completion.py tests/sdk/config/test_llm_config.py

Results locally: deprecation gate passes (Checked 3 deprecation metadata entries across 4 package(s)), 68 passed across the three test files, ruff clean. Backward-compat deserialization of the legacy fixture still passes.

Type

  • Bug fix

🐳 Agent Server images for this PR — GHCR package, pull/run commands, and all pushed tags (click to expand)

• GHCR package: https://github.com/OpenHands/agent-sdk/pkgs/container/agent-server

Variants & Base Images

Variant Architectures Base Image Docs / Tags
java amd64, arm64 eclipse-temurin:17-jdk Link
python-slim amd64, arm64 nikolaik/python-nodejs:python3.13-nodejs22-slim Link
python amd64, arm64 nikolaik/python-nodejs:python3.13-nodejs22-slim Link
golang amd64, arm64 golang:1.21-bookworm Link

Pull (multi-arch manifest)

# Each variant is a multi-arch manifest supporting both amd64 and arm64
docker pull ghcr.io/openhands/agent-server:96c1140-python

Run

docker run -it --rm \
  -p 8000:8000 \
  --name agent-server-96c1140-python \
  ghcr.io/openhands/agent-server:96c1140-python

All tags pushed for this build

ghcr.io/openhands/agent-server:96c1140-golang-amd64
ghcr.io/openhands/agent-server:96c114016b71d97bb4364c6a44846eee0d3583c8-golang-amd64
ghcr.io/openhands/agent-server:fix-remove-llm-modify-params-deprecation-golang-amd64
ghcr.io/openhands/agent-server:96c1140-golang_tag_1.21-bookworm-amd64
ghcr.io/openhands/agent-server:96c1140-golang-arm64
ghcr.io/openhands/agent-server:96c114016b71d97bb4364c6a44846eee0d3583c8-golang-arm64
ghcr.io/openhands/agent-server:fix-remove-llm-modify-params-deprecation-golang-arm64
ghcr.io/openhands/agent-server:96c1140-golang_tag_1.21-bookworm-arm64
ghcr.io/openhands/agent-server:96c1140-java-amd64
ghcr.io/openhands/agent-server:96c114016b71d97bb4364c6a44846eee0d3583c8-java-amd64
ghcr.io/openhands/agent-server:fix-remove-llm-modify-params-deprecation-java-amd64
ghcr.io/openhands/agent-server:96c1140-eclipse-temurin_tag_17-jdk-amd64
ghcr.io/openhands/agent-server:96c1140-java-arm64
ghcr.io/openhands/agent-server:96c114016b71d97bb4364c6a44846eee0d3583c8-java-arm64
ghcr.io/openhands/agent-server:fix-remove-llm-modify-params-deprecation-java-arm64
ghcr.io/openhands/agent-server:96c1140-eclipse-temurin_tag_17-jdk-arm64
ghcr.io/openhands/agent-server:96c1140-python-amd64
ghcr.io/openhands/agent-server:96c114016b71d97bb4364c6a44846eee0d3583c8-python-amd64
ghcr.io/openhands/agent-server:fix-remove-llm-modify-params-deprecation-python-amd64
ghcr.io/openhands/agent-server:96c1140-nikolaik_s_python-nodejs_tag_python3.13-nodejs22-slim-amd64
ghcr.io/openhands/agent-server:96c1140-python-arm64
ghcr.io/openhands/agent-server:96c114016b71d97bb4364c6a44846eee0d3583c8-python-arm64
ghcr.io/openhands/agent-server:fix-remove-llm-modify-params-deprecation-python-arm64
ghcr.io/openhands/agent-server:96c1140-nikolaik_s_python-nodejs_tag_python3.13-nodejs22-slim-arm64
ghcr.io/openhands/agent-server:96c1140-python-slim-amd64
ghcr.io/openhands/agent-server:96c114016b71d97bb4364c6a44846eee0d3583c8-python-slim-amd64
ghcr.io/openhands/agent-server:fix-remove-llm-modify-params-deprecation-python-slim-amd64
ghcr.io/openhands/agent-server:96c1140-nikolaik_s_python-nodejs_tag_python3.13-nodejs22-slim-slim-amd64
ghcr.io/openhands/agent-server:96c1140-python-slim-arm64
ghcr.io/openhands/agent-server:96c114016b71d97bb4364c6a44846eee0d3583c8-python-slim-arm64
ghcr.io/openhands/agent-server:fix-remove-llm-modify-params-deprecation-python-slim-arm64
ghcr.io/openhands/agent-server:96c1140-nikolaik_s_python-nodejs_tag_python3.13-nodejs22-slim-slim-arm64
ghcr.io/openhands/agent-server:96c1140-golang
ghcr.io/openhands/agent-server:96c114016b71d97bb4364c6a44846eee0d3583c8-golang
ghcr.io/openhands/agent-server:fix-remove-llm-modify-params-deprecation-golang
ghcr.io/openhands/agent-server:96c1140-golang_tag_1.21-bookworm
ghcr.io/openhands/agent-server:96c1140-java
ghcr.io/openhands/agent-server:96c114016b71d97bb4364c6a44846eee0d3583c8-java
ghcr.io/openhands/agent-server:fix-remove-llm-modify-params-deprecation-java
ghcr.io/openhands/agent-server:96c1140-eclipse-temurin_tag_17-jdk
ghcr.io/openhands/agent-server:96c1140-python-slim
ghcr.io/openhands/agent-server:96c114016b71d97bb4364c6a44846eee0d3583c8-python-slim
ghcr.io/openhands/agent-server:fix-remove-llm-modify-params-deprecation-python-slim
ghcr.io/openhands/agent-server:96c1140-nikolaik_s_python-nodejs_tag_python3.13-nodejs22-slim-slim
ghcr.io/openhands/agent-server:96c1140-python
ghcr.io/openhands/agent-server:96c114016b71d97bb4364c6a44846eee0d3583c8-python
ghcr.io/openhands/agent-server:fix-remove-llm-modify-params-deprecation-python
ghcr.io/openhands/agent-server:96c1140-nikolaik_s_python-nodejs_tag_python3.13-nodejs22-slim

About Multi-Architecture Support

  • Each variant tag (e.g., 96c1140-python) is a multi-arch manifest supporting both amd64 and arm64
  • Docker automatically pulls the correct architecture for your platform
  • Individual architecture tags (e.g., 96c1140-python-amd64) are also available if needed

LLM.modify_params was deprecated in v1.42.0 and scheduled for removal in
v1.47.0. Now that the repo is at v1.47.0, the deprecation-deadline check
(.github/scripts/check_deprecations.py) fails until it is removed.

- Drop the deprecated modify_params field and its deprecation warning.
- Silently ignore a legacy modify_params key on load so older serialized
  configs still deserialize (LiteLLM param modification stays enabled
  process-wide via the module-level litellm.modify_params = True).
- Update tests to stop passing/asserting the removed field; keep the
  process-wide behavior test.
- Drop the stale key from the profile-store example.

Co-authored-by: smolpaws <engel@enyst.org>
@github-actions

github-actions Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Python API breakage checks — ❌ FAILED

Result: ❌ FAILED

⚠️ Breaking API changes or policy violations detected.

Log excerpt (first 1000 characters)

============================================================
Checking openhands-sdk (openhands.sdk)
============================================================
Comparing openhands-sdk 1.47.0 against 1.47.0
::warning file=/home/runner/.cache/griffe/openhands-sdk==1.47.0/openhands/sdk/llm/llm.py,line=0,title=fy_params::Public object was removed
::error title=SemVer::Breaking changes detected (1); require at least minor version bump from 1.47.x, but new is 1.47.0

============================================================
Checking openhands-workspace (openhands.workspace)
============================================================
Comparing openhands-workspace 1.47.0 against 1.47.0
No breaking changes detected

============================================================
Checking openhands-tools (openhands.tools)
============================================================
Comparing openhands-tools 1.47.0 against 1.47.0
No breaking changes detected

Action log

@github-actions

github-actions Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

REST API breakage checks (OpenAPI) — ✅ PASSED

Result: ✅ PASSED

Action log

@github-actions

github-actions Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Coverage

Coverage Report •
FileStmtsMissCoverMissing
openhands-agent-server/openhands/agent_server/persistence
   models.py2192788%53, 342, 347, 385, 433, 473–479, 481, 483, 486, 490, 516, 533–534, 579, 583, 585, 614–617, 620
openhands-sdk/openhands/sdk/llm
   llm.py10659291%705, 744–745, 750, 860, 876, 1078, 1118–1120, 1154, 1161, 1311, 1439, 1646, 1650–1651, 1768, 1772–1773, 1833, 1840, 1851, 1919, 1923–1924, 1993, 2000, 2010, 2017, 2028, 2076, 2089, 2107, 2121, 2123, 2125, 2150, 2152, 2161–2162, 2186, 2331, 2487–2488, 2601, 2914–2915, 2924, 2942, 2969–2970, 2972, 2974, 2976, 2984, 2987, 2989, 2991, 3002–3003, 3011, 3014, 3017–3018, 3029–3031, 3035, 3039–3040, 3045, 3055, 3060, 3124, 3126, 3128–3131, 3133–3136, 3141–3144, 3159, 3170, 3230, 3232
openhands-sdk/openhands/sdk/settings
   model.py8146992%313, 331, 540, 557, 567–570, 573, 586, 590, 596, 606, 612, 617, 733, 736–737, 743–746, 751, 755, 770, 773–775, 823, 828–829, 834, 855, 867, 916, 925, 972, 1160, 1185, 1187, 1189, 1191, 1193, 1195, 1197, 1199, 1201, 1203, 1469, 1471, 1773, 1793, 1930, 2059, 2098, 2253–2255, 2257, 2343, 2353, 2355, 2360, 2378, 2391, 2393, 2395, 2397, 2404
TOTAL42978786282% 

@all-hands-bot

all-hands-bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Collaborator

🚦 CI is currently failing on this PR's latest commit.

Please fix the failing checks before OpenHands reviews it - this is re-checked automatically once you push a new commit. (A maintainer can also request @all-hands-bot as a reviewer to have it reviewed regardless of CI status.)

This is an automated check - no AI was used to generate this comment.

enyst and others added 3 commits September 11, 2026 16:17
Removing LLM.modify_params (past its v1.47.0 deadline) changes the
persisted AgentSettings JSON shape, so bump AGENT_SETTINGS_SCHEMA_VERSION
5->6 with a v5->v6 migration that drops llm.modify_params on load. That
nested bump cascades to the top-level settings file, so bump
PERSISTED_SETTINGS_SCHEMA_VERSION 2->3 as well.

Add baseline fixtures (v6 agent_settings, v5 payload carrying
modify_params, v3 persisted_settings), a migration unit test, and update
the telemetry schema-version test whose "stays at v2" assertion is now
historical.

Co-authored-by: smolpaws <engel@enyst.org>
LLM uses ConfigDict(extra="ignore"), so a stale ``modify_params`` key on a
persisted payload is already dropped on validation. The explicit
``d.pop("modify_params", None)`` in ``_coerce_inputs`` was redundant; remove
it. The v5->v6 AgentSettings migration still strips the field so migrated
payloads are canonical.

Co-authored-by: smolpaws <engel@enyst.org>
…hema bump

collect_fixture_cases now sees agent_settings v6 and persisted_settings v3
fixtures added for the LLM.modify_params removal migration.

Co-authored-by: smolpaws <engel@enyst.org>

@all-hands-bot all-hands-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — approving. Reviewed the full diff and verified the following:

Correctness

  • LLM.modify_params field, its Field(deprecated=...) metadata, and the _coerce_inputs deprecation warning/warn_deprecated import are all fully removed from openhands-sdk/openhands/sdk/llm/llm.py.
  • Process-wide litellm.modify_params = True remains at module level, so behavior is preserved as intended (no shared-global mutation per call).
  • AGENT_SETTINGS_SCHEMA_VERSION bump 5→6 with _migrate_agent_settings_v5_to_v6 correctly drops the legacy llm.modify_params key and registers in _AGENT_SETTINGS_MIGRATIONS.
  • PERSISTED_SETTINGS_SCHEMA_VERSION bump 2→3 is consistent: nested agent_settings is migrated through validate_agent_settings in _normalize_inputs, and the docstring explains the top-level tracking.

Backward compatibility

  • The v1_11_5_cli_default fixture intentionally retains modify_params, and test_validate_agent_settings_migrates_v5_modify_params confirms old payloads still deserialize with the field silently dropped.

Tests / fixtures

  • Baseline fixtures updated/added for v3/v5/v6; cross-test expected-version sets updated to {1..6} / {1..3}.
  • Removed modify_params assertions from test_llm_config.py, kept the process-wide overlap test, dropped the stale key from the fast.json example.

CI

  • All relevant checks green on the head commit (sdk-tests, agent-server-tests, cross-tests, smoke-test, Check OpenAPI Schema, endpoint-audit, etc.).

No blocking concerns.

This review was created by an AI agent (OpenHands) on behalf of the requesting user.

@enyst
enyst merged commit 9bc73b4 into main Sep 11, 2026
47 of 48 checks passed
@enyst
enyst deleted the fix/remove-llm-modify-params-deprecation branch September 11, 2026 15:08
neubig pushed a commit that referenced this pull request Sep 12, 2026
Explicit prerequisite CI repair for upstream #4954; unrelated removals remain rejected.

openhands+astra requested by @neubig; created by an AI agent (OpenHands) on behalf of @neubig.

Co-authored-by: openhands <openhands@all-hands.dev>
neubig pushed a commit that referenced this pull request Sep 12, 2026
Explicit prerequisite CI repair for upstream #4954; unrelated removals remain rejected.

openhands+astra requested by @neubig; created by an AI agent (OpenHands) on behalf of @neubig.

Co-authored-by: openhands <openhands@all-hands.dev>
sohamb117 pushed a commit to sohamb117/openhands-software-agent-sdk that referenced this pull request Sep 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove LLM.modify_params past its v1.47.0 removal deadline (deprecation gate failing)

2 participants