{"record":{"id":"cdafd8782ca7188e","repo":"Hmbown/CodeWhale","slug":"model-model-is-available-from-configured-provi","errorCode":null,"errorMessage":"model `{model}` is available from configured provider route(s): {providers}. Pass `--provider <provider>` with `--model {model}` to choose one explicitly. In the TUI, use `/provider`, `/model`, or `/setup` to resolve the route before sending.","messagePattern":"model `(.+?)` is available from configured provider route\\(s\\): (.+?)\\. Pass `--provider <provider>` with `--model (.+?)` to choose one explicitly\\. In the TUI, use `/provider`, `/model`, or `/setup` to resolve the route before sending\\.","errorType":"error_code","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/tui/src/lib.rs","lineNumber":11667,"sourceCode":"            );\n            return Ok(CliAutoRoute {\n                provider: selection.provider,\n                model: selection.model,\n                reasoning_effort: selection.reasoning_effort,\n                auto_controls_reasoning,\n                auto_model: false,\n            });\n        }\n\n        let candidate_providers = model_routing::explicit_route_candidate_providers(config, model);\n        if !candidate_providers.is_empty() && !candidate_providers.contains(&config.api_provider())\n        {\n            let providers = candidate_providers\n                .iter()\n                .map(|provider| provider.as_str())\n                .collect::<Vec<_>>()\n                .join(\", \");\n            bail!(\n                \"model `{model}` is available from configured provider route(s): {providers}. \\\n                 Pass `--provider <provider>` with `--model {model}` to choose one explicitly. \\\n                 In the TUI, use `/provider`, `/model`, or `/setup` to resolve the route before sending.\"\n            );\n        }\n\n        // When --model is not `auto`, fall back to the reasoning_effort\n        // declared in the user's config.toml. The previous hard-coded `None`\n        // silently dropped the user's setting on every non-auto-route exec\n        // call, which (for example) prevented vllm + Qwen3 users from\n        // disabling thinking via `reasoning_effort = \"off\"` and caused\n        // 30+ second SSE idle timeouts on trivial prompts.\n        let reasoning_effort = config\n            .reasoning_effort()\n            .map(crate::reasoning_preference::ReasoningEffort::from_setting);\n        Ok(CliAutoRoute {\n            provider: config.api_provider(),\n            model: model.to_string(),","sourceCodeStart":11649,"sourceCodeEnd":11685,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/lib.rs#L11649-L11685","documentation":"The requested `--model` is resolvable but ambiguous: more than one configured provider route can serve it, and no provider was pinned. The CLI refuses to guess which route to use and lists the candidate providers, asking for an explicit `--provider` (or in-TUI route selection) before sending.","triggerScenarios":"Invoking a one-shot model command with `--model <model>` while `candidate_providers.len() > 1` and no `--provider` flag was supplied.","commonSituations":"Two providers configured (e.g. two API endpoints offering the same model id, or an alias expansion matching several registries) after adding a second provider in /setup.","solutions":["Add `--provider <provider>` choosing one of the providers listed in the message.","In the TUI, resolve the route with `/provider`, `/model`, or `/setup` before sending.","Remove or rename the duplicate model entry in one provider's config if the ambiguity is unintended."],"exampleFix":"// before\ncodewhale ask --model k3\n// after\ncodewhale ask --model k3 --provider moonshot","handlingStrategy":"validation","validationCode":"const providers = configuredProvidersForModel(model);\nif (providers.length > 1 && !providerFlag) throw new Error(`ambiguous model ${model}: ${providers.join(\",\")}`);\n","typeGuard":null,"tryCatchPattern":"match resolve_route(model, provider_arg) {\n    Err(e) if e.to_string().contains(\"available from configured provider route\") => {\n        // prompt user to pick a provider, then retry with --provider\n    }\n    other => other?,\n}\n","preventionTips":["Pin --provider in scripts whenever more than one provider is configured.","Resolve routes once in the TUI with /setup so one-shot calls stay unambiguous.","Avoid configuring the same model id under two providers unless aliases are intentional."],"tags":["cli","model-routing","ambiguity","provider"],"backgroundTag":"conflicting-config-options","analyzedSha":"73e0f67d83c59909b571efdfc88c4bc28c309cb1","analyzedAt":"2026-09-22T01:30:00.501Z","contentChangedAt":"2026-09-22T01:30:00.501Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}