Repository navigation
fix(acp): explain rejected model selections - #19699
Conversation
…ic open failure
When an ACP agent refuses the selected model, the thread showed a generic
failure ("Failed to open acpRegistry provider session ..." on open, or
"The provider could not start this turn" on a model switch), even though
initialize and session/new had succeeded.
The model write in the ACP adapter's session setup now raises a typed
AcpModelSelectionError when the agent answers with invalid params or the
session's model option does not offer the model. Its fixed message names
the selected model; the agent's own reply stays on the cause. Sign-in,
transport, mode and other config failures keep their existing errors.
provider-core's curated cause walk recognizes the error through adapter
wrappers, and a failed session start checks that curated reason before
the wrapper's text.
This does not change which option T3 writes the model to, and does not
make agents that list a non-model selector first (such as fx) work.
Refs pingdotgg#18586
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This localized ACP error-handling fix replaces generic session-open/turn-start messages with a curated model-rejection explanation while preserving existing handling for authentication and transport failures. The accompanying replay tests cover model rejection during opening and switching without changing product defaults or APIs. You can add or adjust custom eligibility rules. Learn more. |
|
Warning Review limit reachedOnly developers with an assigned seat can use this organization's usage-based review budget, and seats here are assigned manually. Ask an admin to assign a seat, or change the review continuation mode in Billing. Next included review available in 10 minutes. View limit details
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
|
Taking over this one. I will resolve the conflicts against current main, keep the minimum behavioral coverage, and rebuild the model rejection error path before pushing back here. |
…e/acp-model-selection-errors # Conflicts: # apps/server/src/orchestration-v2/ProviderTurnStartService.ts # packages/provider-core/src/server/failure.ts
Dismissing prior approval to re-evaluate bda5530
|
@coderabbitai review |
✅ Action performedReview finished.
|
# Conflicts: # packages/provider-acp/src/server/adapter.ts # packages/provider-core/src/server/failure.ts
Dismissing prior approval to re-evaluate 84a9af6
ACP model rejection errors were hidden by generic session-open and turn-start wrappers. Invalid-parameter failures at the model-write boundary now retain a fixed message naming the selected model and explaining how to retry. Native error text stays in the cause; authentication, transport, and other configuration failures retain their handling.
This preserves @StiensWout’s implementation from #19699, resolves the conflicts by merging current main, and consolidates the regression coverage into the existing replay suite. Fixes #18586.
Verification
After a completed turn, switching to the rejected model:
Limits
The live run used a protocol fixture, not fx or Cline with a real account. Resume shares the model configuration and error-delivery paths but was not separately exercised live. Providers returning rejection codes other than -32602 retain existing handling. macOS, Windows, iOS, Android, Electron desktop, and relay/tunnel connections were not verified here.
Prepared in T3 Code using Codex GPT-6-Astra (tests), GPT-6.1-Sol (implementation assessment and integration), GPT-6-Sol and Claude Opus 5.5 (independent reviews).