{"record":{"id":"86d8ed4958e1cf1d","repo":"Hmbown/CodeWhale","slug":"has-no-supported-external-cli-credential-source","errorCode":null,"errorMessage":"{} has no supported external CLI credential source","messagePattern":"(.+?) has no supported external CLI credential source","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/cli/src/lib.rs","lineNumber":2526,"sourceCode":"            codewhale_config::ExternalCredentialSource::CodexCli,\n            openai_codex_auth_file_path(),\n        ),\n        ProviderKind::Xai => (\n            codewhale_config::ExternalCredentialSource::GrokCli,\n            grok_auth_file_path(),\n        ),\n        ProviderKind::Deepseek | ProviderKind::DeepseekAnthropic => (\n            codewhale_config::ExternalCredentialSource::DshCli,\n            codewhale_config::default_dsh_credentials_path(),\n        ),\n        ProviderKind::Antigravity => (\n            codewhale_config::ExternalCredentialSource::AgyCli,\n            codewhale_config::default_agy_credentials_path(),\n        ),\n        ProviderKind::Moonshot => bail!(\n            \"Kimi is API-key-only in Codewhale. Create a key at https://platform.kimi.ai/console/api-keys; Kimi CLI OAuth import is unsupported.\"\n        ),\n        _ => bail!(\n            \"{} has no supported external CLI credential source\",\n            provider.as_str()\n        ),\n    };\n    let path =\n        codewhale_config::resolve_external_credential_path(path_override.unwrap_or(default_path))?;\n    Ok((source, path))\n}\n\nfn provider_config_api_key(store: &ConfigStore, provider: ProviderKind) -> Option<&str> {\n    let slot = store\n        .config\n        .providers\n        .for_provider(provider)\n        .api_key\n        .as_deref();\n    let root = (provider == ProviderKind::Deepseek)\n        .then_some(store.config.api_key.as_deref())","sourceCodeStart":2508,"sourceCodeEnd":2544,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/0c42157ee52f9d55af2b506d71b46249910f77d3/crates/cli/src/lib.rs#L2508-L2544","documentation":"The fallback arm of `external_credential_target`: the requested provider has no mapping to an external CLI credential source. Only specific providers (OpenAI Codex, xAI Grok CLI, DeepSeek dsh, Antigravity agy) have defined sources and default credential paths; Moonshot gets its own dedicated message; every other ProviderKind lands here. The message interpolates the provider's CLI name.","triggerScenarios":"Running the external-credentials (credential import/access) command with `--provider` set to a provider outside the supported set — e.g. an Anthropic-family, Google, or OpenAI-compatible custom provider that has no external CLI to read from.","commonSituations":"Trying to import credentials from a CLI Codewhale does not integrate with; newly added providers in a newer Codewhale version used against an older binary; scripts enumerating all configured providers for import.","solutions":["Use the provider's supported auth instead: Codewhale login or API-key configuration","Check `codewhale` release notes for the version — the supported-provider set grows over releases; upgrade if the provider gained an importer","Fix the `--provider` value (typo, or wrong provider selected)"],"exampleFix":"# before\n$ codewhale external-credentials --provider anthropic --mode read-only\n# anthropic has no supported external CLI credential source\n\n# after: use Codewhale-owned auth\n$ codewhale auth login --provider anthropic","handlingStrategy":"validation","validationCode":"#!/usr/bin/env bash\nprovider=\"$1\"\ncase \"$provider\" in\n  codex|grok|deepseek|dsh|antigravity|agy) codewhale external-credentials --provider \"$provider\" --mode read-only --yes ;;\n  kimi|moonshot) echo \"kimi is API-key-only\" >&2; exit 1 ;;\n  *) echo \"$provider has no external CLI credential source; use codewhale auth\" >&2; exit 1 ;;\nesac","typeGuard":"fn supports_external_cli_import(provider: &str) -> bool {\n    matches!(provider, \"codex\" | \"grok\" | \"deepseek\" | \"dsh\" | \"antigravity\" | \"agy\")\n}","tryCatchPattern":null,"preventionTips":["Check the current release notes for the supported external-CLI provider list before writing import scripts","Default unknown providers to Codewhale-owned auth (login/API key), not CLI import"],"tags":["auth","provider","credentials","unsupported","import"],"backgroundTag":"unsupported-auth-method","analyzedSha":"0c42157ee52f9d55af2b506d71b46249910f77d3","analyzedAt":"2026-08-20T21:50:45.477Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}