diff --git a/src/cliproxy/config/thinking-config.ts b/src/cliproxy/config/thinking-config.ts index e0cda2eb..36d8a382 100644 --- a/src/cliproxy/config/thinking-config.ts +++ b/src/cliproxy/config/thinking-config.ts @@ -152,13 +152,11 @@ export function applyThinkingConfig( } thinkingValue = validation.value; - // If validation says off, don't apply suffix - if (thinkingValue === 'off') { - return result; - } + // Track whether to apply to main model (skip if validation says off) + const applyToMainModel = thinkingValue !== 'off'; - // Apply thinking suffix to main model - if (result.ANTHROPIC_MODEL) { + // Apply thinking suffix to main model (only if not off) + if (applyToMainModel && result.ANTHROPIC_MODEL) { result.ANTHROPIC_MODEL = applyThinkingSuffix(result.ANTHROPIC_MODEL, thinkingValue); } diff --git a/src/cliproxy/executor/index.ts b/src/cliproxy/executor/index.ts index 92b42f49..c5dbde93 100644 --- a/src/cliproxy/executor/index.ts +++ b/src/cliproxy/executor/index.ts @@ -124,15 +124,20 @@ export async function execClaudeWithCLIProxy( // 0a. Runtime backend/provider validation const backend: CLIProxyBackend = unifiedConfig.cliproxy?.backend ?? DEFAULT_BACKEND; - if (backend === 'original' && PLUS_ONLY_PROVIDERS.includes(provider)) { - console.error(''); - console.error(fail(`${provider} requires CLIProxyAPIPlus backend`)); - console.error(''); - console.error('To use this provider, either:'); - console.error(' 1. Set `cliproxy.backend: plus` in ~/.ccs/config.yaml'); - console.error(' 2. Use --backend=plus flag: ccs ' + provider + ' --backend=plus'); - console.error(''); - throw new Error(`Provider ${provider} requires Plus backend`); + + // Collect all providers to validate (default + composite tiers) + const allProviders = [provider, ...compositeProviders]; + for (const p of allProviders) { + if (backend === 'original' && PLUS_ONLY_PROVIDERS.includes(p as CLIProxyProvider)) { + console.error(''); + console.error(fail(`${p} requires CLIProxyAPIPlus backend`)); + console.error(''); + console.error('To use this provider, either:'); + console.error(' 1. Set `cliproxy.backend: plus` in ~/.ccs/config.yaml'); + console.error(' 2. Use --backend=plus flag: ccs ' + p + ' --backend=plus'); + console.error(''); + throw new Error(`Provider ${p} requires Plus backend`); + } } const cliproxyServerConfig = unifiedConfig.cliproxy_server; diff --git a/src/commands/cliproxy/variant-subcommand.ts b/src/commands/cliproxy/variant-subcommand.ts index ef0c3618..0c41ee3f 100644 --- a/src/commands/cliproxy/variant-subcommand.ts +++ b/src/commands/cliproxy/variant-subcommand.ts @@ -168,15 +168,6 @@ export async function handleCreate( process.exit(1); } - // Clean up old variant if --force is set - if (variantExists(name) && parsedArgs.force) { - const removeResult = removeVariant(name); - if (!removeResult.success) { - console.log(fail(`Cannot overwrite variant '${name}': ${removeResult.error}`)); - process.exit(1); - } - } - // Composite mode: select provider+model per tier if (parsedArgs.composite) { console.log(info('Composite variant — select provider and model for each tier'));