Skip to content

fix(acp): advertise model as SessionConfigOptionSelect on ACP 0.11+ - #81067

Open
Christopher-Schulze wants to merge 3 commits into
NousResearch:mainfrom
Christopher-Schulze:fix/80575-acp-session-config-options
Open

fix(acp): advertise model as SessionConfigOptionSelect on ACP 0.11+#81067
Christopher-Schulze wants to merge 3 commits into
NousResearch:mainfrom
Christopher-Schulze:fix/80575-acp-session-config-options

Conversation

@Christopher-Schulze

@Christopher-Schulze Christopher-Schulze commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Updates the Hermes ACP server to the agent-client-protocol >= 0.11 session-config-option surface. The model selector is now advertised as a SessionConfigOptionSelect in NewSessionResponse.configOptions / LoadSessionResponse.configOptions, and model changes are handled through session/set_config_option instead of the removed session/set_model method.

Related Issue

Fixes #80575

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)

Changes Made

  • acp_adapter/server.py:
    • Replaced ModelInfo / SessionModelState / SetSessionModelResponse with SessionConfigOptionSelect / SessionConfigSelectOption and SetSessionConfigOptionSelectRequest semantics.
    • _build_model_state() now returns a SessionConfigOptionSelect (id="model", type="select", grouped by provider description).
    • new_session() / load_session() populate config_options with the model selector.
    • set_config_option() handles the "model" config ID by resolving and applying the chosen provider/model.
    • Added defensive type checks on state.model and state.agent.provider.
  • pyproject.toml: relaxed agent-client-protocol==0.9.0 to >=0.11.0,<1 in the acp extra (upper bound required by project dependency policy).
  • tools/lazy_deps.py: updated the tool.acp lazy pin from ==0.9.0 to ==0.11.0 so it matches the locked version.
  • uv.lock: regenerated for the new ACP version.

How to Test

  1. uv sync --extra all --extra dev
  2. uv run python -m pytest tests/acp/test_server.py tests/acp/test_named_provider_catalogs.py -q
  3. scripts/check.sh --project hermes-agent --worktree worktrees/hermes-agent/80575

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature
  • I've added tests for my changes
  • I've tested on my platform: macOS

@Christopher-Schulze
Christopher-Schulze requested a review from a team August 7, 2026 13:49
@alt-glitch alt-glitch added type/bug Something isn't working comp/acp Agent Communication Protocol adapter P4 Best-effort: we will get to it when we get to it (no commitment) labels Aug 7, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Related to #75358: both add ACP model configOptions, but this PR migrates fully to ACP 0.11+ while #75358 retains the legacy models surface for backwards compatibility.

@Christopher-Schulze
Christopher-Schulze force-pushed the fix/80575-acp-session-config-options branch 2 times, most recently from 1c6933f to 3a71599 Compare August 8, 2026 12:31
@Christopher-Schulze
Christopher-Schulze force-pushed the fix/80575-acp-session-config-options branch from 3a71599 to bd3e583 Compare August 18, 2026 20:29
@Christopher-Schulze

Copy link
Copy Markdown
Contributor Author

Rebased this existing PR onto the current main, retained the current MCP 2.x pins, kept the ACP >=0.11 migration, and regenerated uv.lock. Focused ACP verification: 36 tests passed; uv lock check passed.

@Christopher-Schulze
Christopher-Schulze force-pushed the fix/80575-acp-session-config-options branch 2 times, most recently from aee11f9 to 1b1117c Compare August 18, 2026 21:04
@Christopher-Schulze

Copy link
Copy Markdown
Contributor Author

Fixed the CI metadata failure by aligning tools/lazy_deps.py with the locked agent-client-protocol==0.12.0. Verification: project metadata, ACP catalog, and ACP server tests pass (43 total). Updated head: 1b1117c785.

@Christopher-Schulze

Copy link
Copy Markdown
Contributor Author

Rebased onto current main and resolved the merge conflicts.

acp_adapter/server.py keeps the ACP 0.11+ SessionConfigOptionSelect surface and ports the empty-catalog filter from main onto select_options (so an authoritative empty named catalog still does not resurrect the current model). The matching regression now asserts config_options[0].current_value == "".

@Christopher-Schulze

Copy link
Copy Markdown
Contributor Author

Rebased fix/80575-acp-session-config-options onto current main (1a19fedb5a) so GitHub picks up a new head SHA (f2fbbc72b5). No code changes beyond the rebase; ACP SessionConfigOptionSelect + empty-catalog filter on select_options are unchanged.

@Christopher-Schulze
Christopher-Schulze force-pushed the fix/80575-acp-session-config-options branch 2 times, most recently from f2fbbc7 to 1bde66f Compare August 19, 2026 12:13
@Christopher-Schulze

Copy link
Copy Markdown
Contributor Author

Rebased onto current main (13ce0c5c67); new head 1bde66fa62. No code changes beyond the rebase — the diff still touches only ACP files (acp_adapter/server.py, pyproject.toml, tools/lazy_deps.py, uv.lock, tests/acp/*).

For context on the two red checks from the previous head: neither is caused by this branch.

All ACP tests (tests/acp/*, tests/acp_adapter/*) and the other 10 slices passed on the previous head, and this rebase changes no code. Once the Grok upscale flag lands on main, this PR's CI should go green.

Keep the lazy ACP installer pin synchronized with the 0.12.0 version resolved by uv.lock so metadata validation and updates cannot downgrade the shared package.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/acp Agent Communication Protocol adapter P4 Best-effort: we will get to it when we get to it (no commitment) type/bug Something isn't working

Projects

None yet

2 participants