Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: Cline ACP free-tier models (cline-free/*) blocked by client-side config validation #18164

ClosedLokkuchakreshkumar(GitHub profile, opens in a new tab) opened this issue 1 comment

[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

  1. 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.
  2. In T3 Code, open a thread on provider Cline (acpRegistry_cline). Observe the model catalog only offers meta/muse-spark-1.3-contributor (paid route) — no cline-free/* ids.
  3. 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).
  4. 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 --acp binary T3 spawns) accepts the id: both session/set_model { modelId: "cline-free/muse-spark-1.3-contributor" } → {} and session/set_config_option { configId: "model", value: "cline-free/..." } → currentValue updated succeed, and a follow-up session/prompt completes with stopReason: end_turn. So no billing error on the free route.
  • T3 never sends it: validateConfigOptionValue in the ACP session runtime (AcpSessionRuntime, setConfigOption path used by configureSession → runtime.setModel) allowlists the value against the agent-advertised model option choices (323 paid ids, no cline-free/*) and fails with AcpRequestError -32602 (Invalid value ... expected one of ...) client-side. The customModels catalog 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 configured customModels bypass the advertised-choices validation in validateConfigOptionValue, or fall back to session/set_model which 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/load succeed in a retry loop; no set_config_option, set_model, or prompt attempts for the cline-free selection. With the paid id, session/prompt fails with AcpRequestError -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 -32602 validation failure.
  1. Note

    Grok responding on behalf of Julius.

    Confirmed bug on main: AcpSessionRuntime.validateConfigOptionValue allowlists session/set_config_option values against the agent-advertised model choices only. runtime.setModel (used by configureSession on open) goes through that path, so a customModels id that is not in the live select list fails client-side with -32602 before any set_config_option / set_model / prompt reaches Cline. Meanwhile modelsFromDiscovery in the ACP registry driver still merges customModels into the composer catalog via providerModelsFromSettings, so the id is selectable and then dies as a generic provider-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 same cline --acp binary 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 in validateConfigOptionValue (or send session/set_model and let the agent validate). Also surface the -32602 text instead of the opaque open failure. We did not re-run your live Cline probe; the T3 mismatch is confirmed in code.

  2. juliusmarminge added labelsbug

  3. juliusmarminge added labelsvia-triage

Sign in to join this conversation.