Skip to content

Commit cab3618

Browse files
fix(acp): add claude-login auth method for ACP 0.20.0 compatibility
The ACP agent was failing with "Authentication required" errors when using claude-agent-acp v0.20.0 because the `claude-login` auth method was not mapped to any environment variable. This adds `claude-login` → `ANTHROPIC_API_KEY` to the auth method map, allowing the SDK to properly authenticate with the Claude Code ACP server when ANTHROPIC_API_KEY is available. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent b71276c commit cab3618

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

openhands-sdk/openhands/sdk/agent/acp_agent.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ def _make_dummy_llm() -> LLM:
119119
# When the server reports auth_methods, we pick the first method whose
120120
# required env var is set.
121121
_AUTH_METHOD_ENV_MAP: dict[str, str] = {
122+
"claude-login": "ANTHROPIC_API_KEY",
122123
"codex-api-key": "CODEX_API_KEY",
123124
"openai-api-key": "OPENAI_API_KEY",
124125
}

0 commit comments

Comments
 (0)