OpenHands / OpenHands/software-agent-sdk
ACP 0.11 drops Gemini model state from NewSessionResponse
Nobody has claimed this yet.
- 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_fieldsincludesmodels. - ACP 0.11.0 includes
session_id,modes,config_options, andfield_meta, but nomodels. - Parsing the existing
_GEMINI_046_SESSIONfixture under 0.11.0 therefore dropsmodels;_extract_session_models()returns(None, None, False).
Expected behavior
Either:
- cap
agent-client-protocol<0.11inopenhands-sdkuntil the incompatibility is resolved, or - preserve Gemini's model state through a local compatibility layer / move Gemini to the standard
modelconfigOptionsmechanism.
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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