Repository navigation
Fix first-message session/set_model failure for config-option model agents - #153
Conversation
…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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
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 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 configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
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. Comment |
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.
Summary
setModel()incatalog-ops.tsalways called the native ACPsession/set_modelmethod, 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.hasNativeModelSelection()incatalog.ts(reused bymodelsFromSession) and check it insetModel(), routing non-native agents through the existingsetConfigOptionByCategory(..., "model", ...)path (same pattern assetEffort/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 branchesbun test src/core/threads/coordinator.start-thread.test.ts— new regression test provingstartThreadnow succeeds end-to-end for agents without native model supportbun run check:typesand fullbun run test(unit + integration) pass🤖 Generated with Claude Code