[Bug]: Cline ACP free-tier models (cline-free/*) blocked by client-side config validation #18164
[Bug]: Cline ACP agent rejects nothing, but T3 blocks cline-free/* models via client-side config validation — free-tier Muse Spark unusable in T3
Before submitting#
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area#
apps/server
Steps to reproduce#
- Have a Cline account with $0/negative Cline Credits (so paid models fail) but working free-tier access — the standalone Cline CLI works with model
cline-free/muse-spark-1.3-contributor. - In T3 Code, open a thread on provider
Cline(acpRegistry_cline). Observe the model catalog only offersmeta/muse-spark-1.3-contributor(paid route) — nocline-free/*ids. - Add the free-route id as a custom model in provider settings (
acpRegistry_cline→ config →"customModels": ["cline-free/muse-spark-1.3-contributor"]). It appears in the composer catalog (256 → 257 models). - Select it and send any prompt (e.g.
hi).
Expected behavior#
The run reaches the agent: T3 sends session/set_config_option { configId: "model", value: "cline-free/muse-spark-1.3-contributor" } (or session/set_model), which the Cline agent accepts, and the prompt completes on the free tier — exactly like the standalone CLI.
Actual behavior#
The run fails before any model traffic with the generic error:
Failed to open acpRegistry provider session provider-session:... (provider-session-open-failure).
T3's ACP log shows repeated initialize + session/load successes and retries, but never a set_config_option/set_model/prompt call.
Root cause (verified by direct ACP probing)#
- The Cline agent (same
cline --acpbinary T3 spawns) accepts the id: bothsession/set_model { modelId: "cline-free/muse-spark-1.3-contributor" }→{}andsession/set_config_option { configId: "model", value: "cline-free/..." }→currentValueupdated succeed, and a follow-upsession/promptcompletes withstopReason: end_turn. So no billing error on the free route. - T3 never sends it:
validateConfigOptionValuein the ACP session runtime (AcpSessionRuntime,setConfigOptionpath used byconfigureSession→runtime.setModel) allowlists the value against the agent-advertisedmodeloption choices (323 paid ids, nocline-free/*) and fails withAcpRequestError -32602(Invalid value ... expected one of ...) client-side. ThecustomModelscatalog merge (modelsFromDiscovery) makes the id selectable but doesn't exempt it from this check, so the open fails deterministically. - Suggested fix: for
acpRegistry(or generally), let configuredcustomModelsbypass the advertised-choices validation invalidateConfigOptionValue, or fall back tosession/set_modelwhich agents validate themselves. Bonus: surface the validation message instead of the generic open failure.
Impact#
Major degradation or frequent failure — Cline's free tier (the only working route for $0-balance accounts) is unreachable from T3, and the error gives no hint why.
Version or commit#
T3 Code desktop nightly 0.0.46 (server 0.0.45/46), Cline ACP managed runtime 3.0.70, Linux x86-64 (Omarchy/Arch).
Environment#
Arch Linux (Omarchy), kernel 7.x, Hyprland. Cline provider cline (Usage-Billing) authenticated, balance $-0.12; CLI ~/.cline/data/settings/providers.json uses cline-free/muse-spark-1.3-contributor successfully.
Logs or stack traces#
- T3 provider event log (
events.<thread>.log):initialize/session/loadsucceed in a retry loop; noset_config_option,set_model, orpromptattempts for thecline-freeselection. With the paid id,session/promptfails withAcpRequestError -32603: "Internal error: Insufficient balance. Your Cline Credits balance is $-0.12". server.trace.ndjson:AcpAdapterV2.openSession→ProviderAdapterOpenSessionError: Failed to open acpRegistry provider session ..., wrapping the client-side-32602validation failure.
juliusmarminge added labelsbug
juliusmarminge added labelsvia-triage
t3dotgg(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
Note
Grok responding on behalf of Julius.
Confirmed bug on main:
AcpSessionRuntime.validateConfigOptionValueallowlistssession/set_config_optionvalues against the agent-advertisedmodelchoices only.runtime.setModel(used byconfigureSessionon open) goes through that path, so acustomModelsid that is not in the live select list fails client-side with-32602before anyset_config_option/set_model/promptreaches Cline. MeanwhilemodelsFromDiscoveryin the ACP registry driver still mergescustomModelsinto the composer catalog viaproviderModelsFromSettings, so the id is selectable and then dies as a genericprovider-session-open-failure.That gate is intentional as a client-side guard, but not as a product rule that configured custom models must never leave the advertised list. For Cursor the agent also rejects out-of-catalog ids (#13267 / closed #13268 hid customs there). This Cline case is the opposite: free-tier
cline-free/*is missing from discovery, you can add it as a custom model, and (per your ACP probe) the samecline --acpbinary accepts it. Not closing as a duplicate of #13267 — same gate, different fix direction.Likely fix: for configured
customModels, skip or widen the advertised-choices check invalidateConfigOptionValue(or sendsession/set_modeland let the agent validate). Also surface the-32602text instead of the opaque open failure. We did not re-run your live Cline probe; the T3 mismatch is confirmed in code.