Repository navigation
fix(llm): remove LLM.modify_params past its v1.47.0 removal deadline - #4954
Merged
Merged
Conversation
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>
Contributor
Python API breakage checks — ❌ FAILEDResult: ❌ FAILED
Log excerpt (first 1000 characters) |
Contributor
REST API breakage checks (OpenAPI) — ✅ PASSEDResult: ✅ PASSED |
Contributor
Coverage Report •
|
||||||||||||||||||||||||||||||||||||||||
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 This is an automated check - no AI was used to generate this comment. |
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
approved these changes
Sep 11, 2026
all-hands-bot
left a comment
Collaborator
There was a problem hiding this comment.
LGTM — approving. Reviewed the full diff and verified the following:
Correctness
LLM.modify_paramsfield, itsField(deprecated=...)metadata, and the_coerce_inputsdeprecation warning/warn_deprecatedimport are all fully removed fromopenhands-sdk/openhands/sdk/llm/llm.py.- Process-wide
litellm.modify_params = Trueremains at module level, so behavior is preserved as intended (no shared-global mutation per call). AGENT_SETTINGS_SCHEMA_VERSIONbump 5→6 with_migrate_agent_settings_v5_to_v6correctly drops the legacyllm.modify_paramskey and registers in_AGENT_SETTINGS_MIGRATIONS.PERSISTED_SETTINGS_SCHEMA_VERSIONbump 2→3 is consistent: nestedagent_settingsis migrated throughvalidate_agent_settingsin_normalize_inputs, and the docstring explains the top-level tracking.
Backward compatibility
- The
v1_11_5_cli_defaultfixture intentionally retainsmodify_params, andtest_validate_agent_settings_migrates_v5_modify_paramsconfirms 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_paramsassertions fromtest_llm_config.py, kept the process-wide overlap test, dropped the stale key from thefast.jsonexample.
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.
This was referenced Sep 11, 2026
sohamb117
pushed a commit
to sohamb117/openhands-software-agent-sdk
that referenced
this pull request
Sep 12, 2026
…penHands#4954) Co-authored-by: smolpaws <engel@enyst.org>
1 of 5 tasks
1 of 5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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):LLM.modify_paramswas 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
modify_paramsfield fromLLMand its deprecation warning.modify_paramskey so older serialized configs still deserialize. LiteLLM parameter modification remains enabled process-wide via the module-levellitellm.modify_params = True(unchanged), so behavior is preserved.tests/sdk/llm/test_llm_completion.pyandtests/sdk/config/test_llm_config.pyto stop passing/asserting the removed field; keep the process-wide-behavior test.modify_paramskey from the37_llm_profile_storeexample 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
30cf5832e42cfor public/api/**paths.Issue Number
Fixes #4955
How to Test
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
🐳 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
eclipse-temurin:17-jdknikolaik/python-nodejs:python3.13-nodejs22-slimnikolaik/python-nodejs:python3.13-nodejs22-slimgolang:1.21-bookwormPull (multi-arch manifest)
# Each variant is a multi-arch manifest supporting both amd64 and arm64 docker pull ghcr.io/openhands/agent-server:96c1140-pythonRun
All tags pushed for this build
About Multi-Architecture Support
96c1140-python) is a multi-arch manifest supporting both amd64 and arm6496c1140-python-amd64) are also available if needed