{"record":{"id":"997330a391bf96f3","repo":"Hmbown/CodeWhale","slug":"kimi-is-api-key-only-in-codewhale-create-a-key-at","errorCode":null,"errorMessage":"Kimi is API-key-only in Codewhale. Create a key at https://platform.kimi.ai/console/api-keys; Kimi CLI OAuth import is unsupported.","messagePattern":"Kimi is API-key-only in Codewhale\\. Create a key at https://platform\\.kimi\\.ai/console/api-keys; Kimi CLI OAuth import is unsupported\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/cli/src/lib.rs","lineNumber":2819,"sourceCode":"\nfn external_credential_target(\n    provider: ProviderKind,\n    path_override: Option<PathBuf>,\n) -> Result<(codewhale_config::ExternalCredentialSource, PathBuf)> {\n    let (source, default_path) = match provider {\n        ProviderKind::OpenaiCodex => (\n            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::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","sourceCodeStart":2801,"sourceCodeEnd":2837,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/cli/src/lib.rs#L2801-L2837","documentation":"When resolving an external CLI credential source for a provider, ProviderKind::Moonshot is explicitly rejected: Kimi is API-key-only in Codewhale and its CLI OAuth credential import is unsupported. The bail names the Kimi console URL where a key can be created.","triggerScenarios":"Invoking an external-credential import path (e.g. `codewhale auth import`-style commands) with --provider pointing at Kimi/Moonshot.","commonSituations":"Users who installed Kimi CLI and expect Codewhale to import its OAuth token the way it does for Grok/Deepseek CLIs; docs or scripts generalized across providers.","solutions":["Create an API key at https://platform.kimi.ai/console/api-keys","Set it via `codewhale auth set --provider kimi` or `--api-key-stdin` instead of CLI import"],"exampleFix":"// before\ncodewhale auth import --provider kimi\n// after\nprintf '%s' \"$KIMI_API_KEY\" | codewhale auth set --provider kimi --api-key-stdin","handlingStrategy":"validation","validationCode":"SUPPORTED_CLI_IMPORT = ['grok', 'deepseek'];\nif provider === 'kimi' || provider === 'moonshot': raise SystemExit('kimi is API-key-only; create a key at platform.kimi.ai')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Check per-provider auth docs before scripting import flows","Provision Kimi via API key in the secrets manager, not CLI OAuth"],"tags":["cli","auth","providers","unsupported"],"backgroundTag":"unsupported-operation","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"}