Skip to content

fix(acp): support agent-client-protocol v0.9.0 schema changes - #2700

Merged
Mason Daugherty (mdrxy) merged 6 commits into
langchain-ai:mainfrom
ethan6188:fix/acp-schema-compat
Apr 17, 2026
Merged

Mason Daugherty (mdrxy) merged 6 commits into
langchain-ai:mainfrom
ethan6188:fix/acp-schema-compat

Conversation

@ethan6188

@ethan6188 ethan (ethan6188) commented Apr 13, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #2678


agent-client-protocol v0.9.0 upgraded the ACP schema from v0.10.8 to v0.11.2 (agentclientprotocol/python-sdk#80), which removed the SessionConfigOption wrapper type. Config options are now bare SessionConfigOptionSelect / SessionConfigOptionBoolean instances. Since deepagents-acp pins agent-client-protocol>=0.8.0 with no upper bound, new installs resolve to v0.9.0 and hit ImportError: cannot import name 'SessionConfigOption' from 'acp.schema' at startup.

Uses a conditional import to support both v0.8.x (with SessionConfigOption wrapper) and v0.9.0+ (without wrapper). When the wrapper is available, config options are constructed as SessionConfigOption(root=SessionConfigOptionSelect(...)); when absent, they are bare SessionConfigOptionSelect(...) instances.

All 76 existing ACP tests pass.

$ pytest tests/ -v
======================== 76 passed, 1 warning in 3.31s =========================

agent-client-protocol v0.9.0 upgraded to ACP schema v0.11.2 which
removed the SessionConfigOption wrapper type. Config options are now
bare SessionConfigOptionSelect/SessionConfigOptionBoolean instances.

Use a conditional import to support both >=0.8.0 (with wrapper) and
>=0.9.0 (without wrapper) so existing installs keep working while
new installs resolve correctly.

Fixes langchain-ai#2678
@github-actions github-actions Bot added package:acp Changes related to the Agent Client Protocol package. fix size: S Pull request with a small diff. labels Apr 13, 2026
@langchain-oss-automated-triage langchain-oss-automated-triage Bot added auto:new-contributor Author is a first-time contributor to this repository. org:external Issue or pull request created by someone outside the `langchain-ai` GitHub organization. labels Apr 13, 2026
@jacoblee93

Copy link
Copy Markdown
Contributor

Oof, thank you for this!

@jacoblee93

Jacob Lee (jacoblee93) commented Apr 15, 2026 •

Copy link
Copy Markdown
Contributor

Doing this until we fix our CI restrictions:

#2733

@ethan6188

Copy link
Copy Markdown
Contributor Author

fine~

@mdrxy
Mason Daugherty (mdrxy) merged commit 2f86825 into langchain-ai:main Apr 17, 2026
23 checks passed
Mason Daugherty (mdrxy) added a commit that referenced this pull request Apr 18, 2026
Restore test coverage for the ACP config-option wrapper compat added in
#2700. When #2811 unbound `agent-client-protocol` to v0.9.0 (which
dropped the `SessionConfigOption` wrapper), every `.root.<attr>`
assertion in `test_model_switching.py` started raising `AttributeError`
on `main`.
james8814 pushed a commit to james8814/deepagents that referenced this pull request May 1, 2026
…chain-ai#2700)

Fixes langchain-ai#2678

`agent-client-protocol` v0.9.0 upgraded the ACP schema from v0.10.8 to
v0.11.2
([agentclientprotocol/python-sdk#80](agentclientprotocol/python-sdk#80)),
which removed the `SessionConfigOption` wrapper type. Config options are
now bare `SessionConfigOptionSelect` / `SessionConfigOptionBoolean`
instances. Since `deepagents-acp` pins `agent-client-protocol>=0.8.0`
with no upper bound, new installs resolve to v0.9.0 and hit
`ImportError: cannot import name 'SessionConfigOption' from
'acp.schema'` at startup.

Uses a conditional import to support both v0.8.x (with
`SessionConfigOption` wrapper) and v0.9.0+ (without wrapper). When the
wrapper is available, config options are constructed as
`SessionConfigOption(root=SessionConfigOptionSelect(...))`; when absent,
they are bare `SessionConfigOptionSelect(...)` instances.

All 76 existing ACP tests pass.

```
$ pytest tests/ -v
======================== 76 passed, 1 warning in 3.31s =========================
```

> This contribution was developed with AI assistance (Cursor).

---------

Co-authored-by: shengyi <shengyi.tang@shopee.com>
Co-authored-by: Jacob Lee <jacoblee93@gmail.com>
Co-authored-by: Vivek Trivedy <vivek.trivedy@langchain.dev>
james8814 pushed a commit to james8814/deepagents that referenced this pull request May 1, 2026
…-ai#2813)

Restore test coverage for the ACP config-option wrapper compat added in
langchain-ai#2700. When langchain-ai#2811 unbound `agent-client-protocol` to v0.9.0 (which
dropped the `SessionConfigOption` wrapper), every `.root.<attr>`
assertion in `test_model_switching.py` started raising `AttributeError`
on `main`.
Marcelo5444 pushed a commit to Marcelo5444/deepagents that referenced this pull request Jul 30, 2026
…chain-ai#2700)

Fixes langchain-ai#2678

`agent-client-protocol` v0.9.0 upgraded the ACP schema from v0.10.8 to
v0.11.2
([agentclientprotocol/python-sdk#80](agentclientprotocol/python-sdk#80)),
which removed the `SessionConfigOption` wrapper type. Config options are
now bare `SessionConfigOptionSelect` / `SessionConfigOptionBoolean`
instances. Since `deepagents-acp` pins `agent-client-protocol>=0.8.0`
with no upper bound, new installs resolve to v0.9.0 and hit
`ImportError: cannot import name 'SessionConfigOption' from
'acp.schema'` at startup.

Uses a conditional import to support both v0.8.x (with
`SessionConfigOption` wrapper) and v0.9.0+ (without wrapper). When the
wrapper is available, config options are constructed as
`SessionConfigOption(root=SessionConfigOptionSelect(...))`; when absent,
they are bare `SessionConfigOptionSelect(...)` instances.

All 76 existing ACP tests pass.

```
$ pytest tests/ -v
======================== 76 passed, 1 warning in 3.31s =========================
```

> This contribution was developed with AI assistance (Cursor).

---------

Co-authored-by: shengyi <shengyi.tang@shopee.com>
Co-authored-by: Jacob Lee <jacoblee93@gmail.com>
Co-authored-by: Vivek Trivedy <vivek.trivedy@langchain.dev>
Marcelo5444 pushed a commit to Marcelo5444/deepagents that referenced this pull request Jul 30, 2026
…-ai#2813)

Restore test coverage for the ACP config-option wrapper compat added in
langchain-ai#2700. When langchain-ai#2811 unbound `agent-client-protocol` to v0.9.0 (which
dropped the `SessionConfigOption` wrapper), every `.root.<attr>`
assertion in `test_model_switching.py` started raising `AttributeError`
on `main`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto:new-contributor Author is a first-time contributor to this repository. org:external Issue or pull request created by someone outside the `langchain-ai` GitHub organization. package:acp Changes related to the Agent Client Protocol package. size: S Pull request with a small diff.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot enable acp with deepagents-cli

4 participants