OpenHands / OpenHands/software-agent-sdk

ACP 0.11 drops Gemini model state from NewSessionResponse

Open
#4,093 14 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug needs-triage
Dominant language
Python
Stars
1.1k
Forks
542
Avg merge
1d 19h
Merged PRs (30d)
137

Description

Problem

openhands-sdk declares agent-client-protocol>=0.10.1 without an upper bound, but ACP Python SDK 0.11.0 removes the unstable models field from NewSessionResponse.

Gemini CLI 0.46 still reports model state through that field and uses session/set_model. With ACP 0.11.0, Pydantic silently discards Gemini's models payload before _extract_session_models() sees it. The SDK then reports no current or available Gemini models:

assert cur == "gemini-3-flash-preview"
E   AssertionError: assert None == 'gemini-3-flash-preview'

This is separate from the prompt() argument-order incompatibility fixed by #3996. That fix is now on main, but the Gemini model-state failure remains, so downstream consumers still cannot safely remove their temporary agent-client-protocol<0.11 constraints.

Evidence

I ran the existing real-session-response regression suite, tests/sdk/agent/test_acp_agent.py, with both ACP versions:

Agent SDK revision agent-client-protocol Result
v1.35.0 0.10.1 407 passed
v1.35.0 0.11.0 406 passed, 1 failed
main (cf6c2a3a4, includes #3996) 0.11.0 406 passed, 1 failed

The single failure in both 0.11.0 runs is:

FAILED tests/sdk/agent/test_acp_agent.py::TestDetectionAgainstRealSessionResponses::test_gemini_046_uses_set_session_model

The schema difference explains the result directly:

  • ACP 0.10.1 NewSessionResponse.model_fields includes models.
  • ACP 0.11.0 includes session_id, modes, config_options, and field_meta, but no models.
  • Parsing the existing _GEMINI_046_SESSION fixture under 0.11.0 therefore drops models; _extract_session_models() returns (None, None, False).

Expected behavior

Either:

  1. cap agent-client-protocol<0.11 in openhands-sdk until the incompatibility is resolved, or
  2. preserve Gemini's model state through a local compatibility layer / move Gemini to the standard model configOptions mechanism.

Whichever route we take, every version allowed by the SDK dependency range should keep the existing Gemini model-detection regression test green.

References

  • Prompt signature fix: #3996
  • Existing real-provider response coverage and model-selection compatibility: #3773

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with tests/sdk/agent/test_acp_agent.py, especially TestDetectionAgainstRealSessionResponses::test_gemini_046_uses_set_session_model, the _GEMINI_046_SESSION fixture, and _extract_session_models(). Compare parsing under agent-client-protocol 0.10.1 and 0.11.0, then determine whether the dependency cap or a compatibility approach preserves the existing regression coverage. Done means every version allowed by the SDK dependency range keeps the Gemini model-detection test green.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.