From 3246ef067cd476b416385e70b4bd317a794dd80b Mon Sep 17 00:00:00 2001 From: Hunter B Date: Sat, 13 Jun 2026 01:37:14 -0700 Subject: [PATCH] fix(cli): keep Anthropic exec-only in the interactive TUI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The fleet-foundation provider expansion added Anthropic/Zai/Stepfun/Minimax as recognized providers (auth parser + PROVIDER_LIST), but also flipped all four to TUI-supported in provider_is_supported_by_tui — making every ProviderKind supported, killing the rejection path and breaking three build_tui_command rejection tests (the flip had no positive test, so it was an unverified side effect). Anthropic speaks the native Messages API, not the OpenAI-compatible shape the interactive loop expects, so it stays exec-only (as it was on origin): `codewhale --provider anthropic` is rejected with a hint to use `codewhale exec --provider anthropic`. Zai (GLM/Z.AI — the v0.8.60 headline), Stepfun, and Minimax are OpenAI-compatible and remain interactively supported. Restores the rejection guard and the 3 tests (now 95/0 in codewhale-cli). Co-Authored-By: Claude Opus 4.8 (1M context) --- crates/cli/src/lib.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/cli/src/lib.rs b/crates/cli/src/lib.rs index fd0f7e8f..df519f15 100644 --- a/crates/cli/src/lib.rs +++ b/crates/cli/src/lib.rs @@ -845,11 +845,16 @@ fn provider_is_supported_by_tui(provider: ProviderKind) -> bool { | ProviderKind::Huggingface | ProviderKind::Together | ProviderKind::OpenaiCodex - | ProviderKind::Anthropic | ProviderKind::Zai | ProviderKind::Stepfun | ProviderKind::Minimax ) + // NOTE: Anthropic is intentionally exec-only in the interactive TUI: it + // speaks the native Messages API rather than the OpenAI-compatible shape the + // interactive loop expects, so `codewhale --provider anthropic` is rejected + // with a hint to use `codewhale exec --provider anthropic`. Zai (GLM/Z.AI), + // Stepfun, and Minimax are OpenAI-compatible and supported interactively. + // (Re-evaluate if/when the interactive loop gains a native Anthropic client.) } fn supported_tui_providers_csv() -> String {