[Bug]: ACP validates the requested model before applying the selected provider #48052
[Bug]: ACP validates the requested model before applying the selected provider#
Versions#
- T3 Code (Beta) 0.1.13 on macOS.
- T3-managed Cline CLI 3.0.76 (not the VS Code extension version).
- Native Cline ACP integration; provider
cline-pass, modelcline-pass/deepseek-v4.1-flash-1017.
Minimal reproduction#
Prerequisite: an existing working ClinePass login. No additional API key is needed.
- Use T3's native Cline integration with CLI 3.0.76.
- Select provider
cline-passand modelcline-pass/deepseek-v4.1-flash-1017; use Plan mode with automatic approvals disabled. - Start a fresh session where Cline's initial ACP
session/newresponse selects providerclineand advertises its model catalog. The requested ClinePass model is absent from that initial catalog. - Submit a harmless prompt, for example: "Do not call any tools. Reply only CLINEPASS_OK."
Observed in the T3 delegated-session start path. A separate manual UI reproduction has not been established.
Actual behavior#
The session fails before a model response:
AcpAdapterV2.validateModelSelection
AcpModelSelectionError: The agent did not accept the model "cline-pass/deepseek-v4.1-flash-1017".
[cause]: AcpRequestError: The requested model is not available in this session.
T3 validates against the initial provider's catalog before applying the explicit provider=cline-pass option. The rejection is raised by T3; the error wording does not establish a rejection by Cline.
Expected behavior#
Apply the selected provider first, obtain its updated model options, then validate and set the requested model before prompting. A model advertised after the provider switch should not be rejected against the previous provider's catalog.
Independent control and source evidence#
Using the same T3-managed CLI directly with --acp, the following ordered ACP calls succeeded (session identifiers omitted):
initialize
session/new
session/set_config_option {configId: "provider", value: "cline-pass"}
session/set_config_option {configId: "mode", value: "plan"}
session/set_config_option {configId: "model", value: "cline-pass/deepseek-v4.1-flash-1017"}
session/prompt (no tools; reply CLINEPASS_OK)
Result: CLINEPASS_OK, stopReason: end_turn.
In the installed 0.1.13 server bundle, configureSession invokes validateModelSelection before applying explicit configuration options. The same ordering is visible in adapter.ts at v0.1.14-nightly.20261128.5399: validation at line 9289 precedes the option loop at 9424 and option writes at 9438. This nightly was inspected as source only, not installed or runtime-tested.
The diagnosis combines the observed T3 stack, installed code and successful direct ACP control. No complete T3 wire capture is claimed. No binaries were patched.
Related reports#
- #18586 concerns multiple options marked
category=model. Here Cline 3.0.76 already reports the provider ascategory=_providerand the model ascategory=model. - #22537 and linked PR #19754 discuss ClinePass model visibility and the older multiple-model-selector arrangement. This report isolates validation before an explicit provider configuration change with the corrected categories.
Search of open and closed issues did not identify an exact match for this ordering defect. Please link or merge if it is already tracked.
tanstack-source added labelsbug
juliusmarminge closed this
Sign in to join this conversation.