diff --git a/openhands-sdk/openhands/sdk/settings/acp_providers.py b/openhands-sdk/openhands/sdk/settings/acp_providers.py index 3dacce14a2..ab608baacf 100644 --- a/openhands-sdk/openhands/sdk/settings/acp_providers.py +++ b/openhands-sdk/openhands/sdk/settings/acp_providers.py @@ -294,19 +294,22 @@ class ACPProviderInfo: # --------------------------------------------------------------------------- # Model IDs the Claude Code CLI accepts, mirroring the ``model`` configOptions -# select claude-agent-acp 0.44.0 reports at ``session/new`` (the short aliases -# the CLI's own ``/model`` menu offers, switched via ``set_config_option``). +# select claude-agent-acp reports at ``session/new`` (the short aliases the CLI's +# own ``/model`` menu offers, switched via ``set_config_option``). # ``opus[1m]`` is the SDK-documented version-agnostic 1M-context alias and the -# CLI's own default (``currentValue``); ``default`` is the CLI's recommended -# tier (Opus 4.8 · 1M). The ``/model`` menu is dynamic/account-dependent and the -# CLI validates ``set_config_option(model)`` against the live select — it rejects -# an absent id (e.g. ``sonnet`` on accounts without it), so these are pre-session -# suggestions, not ground truth; a rejected id degrades to the server default. +# CLI's own default (``currentValue``); ``default`` is the CLI's recommended tier +# for the account. ``claude-opus-5`` is the explicit full model pin for users who +# want Opus 5 rather than the provider-dependent alias. The ``/model`` menu is +# dynamic/account-dependent and the CLI validates ``set_config_option(model)`` +# against the live select — it rejects an absent id (e.g. ``sonnet`` on accounts +# without it), so these are pre-session suggestions, not ground truth; a rejected +# id degrades to the server default. _CLAUDE_MODELS: tuple[ACPModelOption, ...] = ( ACPModelOption(id="default", label="Default (recommended)"), - ACPModelOption(id="opus[1m]", label="Claude Opus 4.8 (1M)"), - ACPModelOption(id="sonnet", label="Claude Sonnet 4.6"), - ACPModelOption(id="haiku", label="Claude Haiku 4.5"), + ACPModelOption(id="opus[1m]", label="Claude Opus (1M)"), + ACPModelOption(id="claude-opus-5", label="Claude Opus 5"), + ACPModelOption(id="sonnet", label="Claude Sonnet"), + ACPModelOption(id="haiku", label="Claude Haiku"), ) # Bare preset ids advertised by the Codex app server through diff --git a/tests/sdk/settings/test_acp_providers.py b/tests/sdk/settings/test_acp_providers.py index 5df2a7b057..3c67c031d1 100644 --- a/tests/sdk/settings/test_acp_providers.py +++ b/tests/sdk/settings/test_acp_providers.py @@ -42,7 +42,11 @@ def test_claude_code_metadata(self): assert info.supports_runtime_model_switch is True assert info.session_meta_key == "claudeCode" assert info.default_model == "opus[1m]" - assert any(m.id == "opus[1m]" for m in info.available_models) + models = {model.id: model.label for model in info.available_models} + assert models["opus[1m]"] == "Claude Opus (1M)" + assert models["claude-opus-5"] == "Claude Opus 5" + assert models["sonnet"] == "Claude Sonnet" + assert models["haiku"] == "Claude Haiku" # Pinned binary exposed by the agent-server image wrappers. assert info.binary_name == "claude-agent-acp" assert info.data_dir_env_var == "CLAUDE_CONFIG_DIR"