Skip to content

feat: generic model selection via ACP session/set_model#150

Open
ironerumi wants to merge 1 commit intoopenclaw:mainfrom
ironerumi:main
Open

feat: generic model selection via ACP session/set_model#150
ironerumi wants to merge 1 commit intoopenclaw:mainfrom
ironerumi:main

Conversation

@ironerumi
Copy link
Contributor

Summary

  • --model <id> at session creation calls session/set_model when agent advertises models
  • acpx <agent> set model <id> routes through session/set_model instead of session/set_config_option
  • Model state tracking, caching, and status enrichment
  • Graceful degradation: agents without model support skip silently; ACP-coded rejections produce clear errors
  • Model cache only updated on successful set

Test plan

  • Integration tests: 8 model-related tests pass (spawn-time set, mid-session set, invalid params rejection, status enrichment)
  • Smoke tested against live Droid and Gemini CLI agents
  • Typecheck clean (tsc --noEmit)
  • Pre-commit hooks pass (lint, format, build)

Closes #148
Partially addresses #49

🤖 Generated with Claude Code

Add agent-agnostic model selection that works across any ACP agent
implementing session/set_model (e.g. Droid, Gemini), not tied to
any agent's _meta conventions.

- --model <id> flag at spawn time calls session/set_model after
  session creation when agent advertises available models
- `acpx <agent> set model <id>` mid-session routes through
  session/set_model instead of session/set_config_option
- Model state tracking, caching, and status enrichment
- Graceful degradation: agents without model support skip silently;
  ACP-coded rejections produce clear error messages
- Model cache only updated on successful set (not on rejection)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: generic model selection via ACP session/set_model

1 participant