Skip to content

Fix first-message session/set_model failure for config-option model agents - #153

Merged
soorya-u merged 1 commit into
mainfrom
fix/session-set-model-config-option-fallback
Aug 5, 2026
Merged

soorya-u merged 1 commit into
mainfrom
fix/session-set-model-config-option-fallback

Conversation

@soorya-u

@soorya-u soorya-u commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • setModel() in catalog-ops.ts always called the native ACP session/set_model method, even for agents that only expose model choice via the generic config-option fallback (configOptionsToModels). Those agents reject the call with "Method not found", so every new thread's first message failed.
  • Added hasNativeModelSelection() in catalog.ts (reused by modelsFromSession) and check it in setModel(), routing non-native agents through the existing setConfigOptionByCategory(..., "model", ...) path (same pattern as setEffort/setPersona).

Closes #142

Test plan

  • bun test src/core/agents/catalog.test.ts src/core/agents/catalog-ops.test.ts — new unit tests for both the native and config-option-fallback branches
  • bun test src/core/threads/coordinator.start-thread.test.ts — new regression test proving startThread now succeeds end-to-end for agents without native model support
  • bun run check:types and full bun run test (unit + integration) pass

🤖 Generated with Claude Code

…gents

setModel() always called the native ACP session/set_model, even for
agents that only expose model choice via the config-option fallback
(configOptionsToModels) — those agents reject the call with "Method
not found", failing every new thread's first message. Route through
the existing setConfigOptionByCategory path (matching setEffort/
setPersona) when the session lacks native model support.

Fixes #142.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 5, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cyrus Ready Ready Preview Aug 5, 2026 4:50pm

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@soorya-u, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 59 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 84b4f8c5-9e43-4e92-bbca-bfa1679ccfd2

📥 Commits

Reviewing files that changed from the base of the PR and between 0cfb1ea and 272b2ff.

📒 Files selected for processing (5)
  • apps/cli/src/core/agents/catalog-ops.test.ts
  • apps/cli/src/core/agents/catalog-ops.ts
  • apps/cli/src/core/agents/catalog.test.ts
  • apps/cli/src/core/agents/catalog.ts
  • apps/cli/src/core/threads/coordinator.start-thread.test.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@soorya-u
soorya-u merged commit e12170c into main Aug 5, 2026
9 checks passed
@soorya-u
soorya-u deleted the fix/session-set-model-config-option-fallback branch August 5, 2026 17:23
soorya-u added a commit that referenced this pull request Aug 5, 2026
Resolves the conflict in apps/cli/src/core/agents/catalog.ts between
main's hasNativeModelSelection routing fix (#153) and this branch's
RawSessionModel type-safety fix, keeping both: the native/config-option
routing logic from main, with the availableModels array still cast
through RawSessionModel since @acp-kit/core's own .d.ts still can't
resolve SessionModelState against the 1.x sdk.

This branch was successfully deployed

1 active deployment
Preview — 272b2ff2 Deployed Aug 5, 2026 by vercel[bot]
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.

First message fails: session/set_model 'Method not found' for agents without native model support

1 participant