Repository navigation
Closed
Labels
type: choreMaintenance / chores
Description
Why
openhands-sdk deprecates ACPAgentSettings.llm in 1.51.0 and deletes it in 1.56.0 (OpenHands/software-agent-sdk#5434, OpenHands/software-agent-sdk#5432). Enterprise is pinned to 1.49.6 today, so nothing breaks yet. But several places read the field without checking the agent kind.
From SDK 1.51.0:
create_agent()ignores the field and never serializes it.- Reading it emits a
DeprecationWarning; passing it emits aDeprecatedWarning. - The agent-settings v6→v7 migration drops any stored ACP
llm, including keys copied in by profile switching. Enterprise runs that migration throughvalidate_agent_settings. - ACP conversations no longer call a provider to generate titles.
At SDK 1.56.0 the field is gone, so each read below raises AttributeError for ACP users. That covers GET /api/v1/settings, settings saves and profile switches.
What to change
Line numbers are on main at bf4139fb6.
- Delete the ACP
llmstrip. It's atopenhands/app_server/app_conversation/live_status_app_conversation_service.py:2601:'llm': acp_settings.llm.model_copy(update={'api_key': None, 'base_url': None}). It does nothing from 1.51. - Move the log-only read under the OpenHands branch.
live_status_app_conversation_service.py:2114doesgetattr(user.agent_settings, 'llm', None)before the ACP branch at:2133. It survives 1.56 but warns from 1.51. - Return
Falsefromllm_api_key_is_setfor ACP settings. It's atopenhands/app_server/settings/settings_models.py:821. The SDK agent-server does the same since fix(settings): deprecate ACPAgentSettings.llm so ACP agents keep their metrics LLM software-agent-sdk#5434. - Gate the GET-settings reads on the agent kind.
openhands/app_server/settings/settings_router.py:282and:293readagent_settings.llmandresp_llm. - Gate the managed-key rotation on OpenHands settings. At
settings_router.py:408-410and:785-787,_maybe_rotate_stale_managed_key(settings.agent_settings.llm, ...)andobject.__setattr__(settings.agent_settings, 'llm', rotated)run for every kind._post_merge_llm_fixupsjust above already checks the kind. - Profile switch: skip the
llmwrite for ACP settings.switch_to_profile(settings_models.py:996-1007) writes the profile LLM intoagent_settingsfor every kind, andsettings_router.py:794returnssettings.agent_settings.llm.model.- For ACP, still record
llm_profiles.activebut don't writellm. The SDK's/api/profiles/{name}/activatenow returnsllm_applied: falsehere.
- Profile save: require an explicit
llmfor ACP settings, or reject it.settings_router.py:702snapshotsagent_settings.llmwhen the request has nollm. On ACP settings that's the SDK defaultLLMwith no key. - Add a regression test. Use ACP settings for
GET /api/v1/settings, a settings save and a profile switch, withACPAgentSettings.llmwarnings turned into errors (for example-W "error:ACPAgentSettings.llm").
These are already fine:
sync_active_profile_from_settings(settings_models.py:841) and_post_merge_llm_fixups(settings_router.py:132) check the kind._configure_llmruns only on the OpenHands path.file_settings_store.py:28reads the raw dict, and the v7 migration means ACP payloads no longer carryllm.
When
The deprecation warnings appear with the bump to SDK ≥1.51.0, so do this then if possible. It must be done before bumping to SDK 1.56.0.
This issue was drafted by an AI agent (Claude Code) on behalf of the requesting user.
Metadata
Metadata
Assignees
Labels
type: choreMaintenance / chores
Activity
simonrosenberg commentedon Oct 2, 2026
The one existing test that already fails with this behavior on SDK
main,test_saas_settings_store.py::test_store_agent_kind_switch_stays_scoped_to_acting_member, is updated in #453 (7103618e6). The code items above are still open.simonrosenberg commentedon Oct 13, 2026
The conversation-launch portion is addressed in #763: the ACP no-op LLM strip is removed and the diagnostic LLM read is gated on OpenHands settings. The other settings/router/profile-switch acceptance items remain open; #763 pins released SDK 1.54.0, before the field removal. Keeping this issue open for that separate forward-compatibility work.