Skip to content

refactor(settings): rename 'llm' agent_kind discriminator to 'openhands' and LLMAgentSettings to OpenHandsAgentSettings #2995

@simonrosenberg

Description

@simonrosenberg

Background

The discriminated union introduced in v1.17 uses agent_kind: 'llm' | 'acp' to distinguish agent types. Both names are misleading:

  • 'llm' describes the mechanism (uses an LLM), not the agent type. The correct semantic is 'openhands' — the built-in OpenHands agent, as opposed to an external ACP agent.
  • LLMAgentSettings has the same problem — it should be OpenHandsAgentSettings.

Changes needed

  1. AgentKind = Literal["llm", "acp"]Literal["openhands", "acp"]
  2. LLMAgentSettings.agent_kind: Literal["llm"]Literal["openhands"]
  3. All variant="llm" section/field metadata → variant="openhands"
  4. Tag("llm") in AgentSettingsConfig union → Tag("openhands")
  5. _agent_settings_discriminator default fallback → "openhands"
  6. class LLMAgentSettingsclass OpenHandsAgentSettings (keep LLMAgentSettings as a deprecated alias)
  7. Update AgentSettings deprecation notice to point to OpenHandsAgentSettings

Notes

  • Requires a minor version bump (breaking change to the agent_kind field default and type).
  • Backwards-compat: add "llm""openhands" coercion in _agent_settings_discriminator for one release cycle to allow stored settings to migrate gracefully.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions