{"record":{"id":"1ce0ad094ee9a830","repo":"Hmbown/CodeWhale","slug":"provider-has-no-local-runtime-provider-so-there-is-no-local","errorCode":null,"errorMessage":"`{provider}` has no local runtime provider, so there is no local key to copy. Use `--api-key-stdin` or the hidden prompt","messagePattern":"`(.+?)` has no local runtime provider, so there is no local key to copy\\. Use `--api-key-stdin` or the hidden prompt","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/cli/src/cloud.rs","lineNumber":843,"sourceCode":"                            .filter(|value| !value.is_empty())\n                        {\n                            Some(reported) => format!(\"set ({reported})\"),\n                            None => \"set\".to_string(),\n                        },\n                        _ => \"not set\".to_string(),\n                    };\n                    writeln!(out, \"{}: {status} — {}\", row.id, row.display_label())?;\n                }\n                Ok(())\n            }\n            CloudKeysCommand::Set(set) => {\n                let provider = validate_provider_id(&set.provider)?;\n                let user = client.me()?;\n                let catalog = client.provider_catalog()?;\n                let row = catalog_row(&catalog, &provider)?;\n                let key = if set.from_local {\n                    let kind = row.local_kind().ok_or_else(|| {\n                        anyhow!(\n                            \"`{provider}` has no local runtime provider, so there is no local key to copy. Use `--api-key-stdin` or the hidden prompt\"\n                        )\n                    })?;\n                    resolve_local_key(config, provider_secrets, kind)?.ok_or_else(|| {\n                        anyhow!(\n                            \"No local {} API key was found in config, the secret store, or the environment\",\n                            kind.as_str()\n                        )\n                    })?\n                } else if set.api_key_stdin {\n                    key_reader(KeyReadMode::Stdin)?\n                } else {\n                    key_reader(KeyReadMode::HiddenPrompt(provider.clone()))?\n                };\n                let key = key.trim().to_string();\n                validate_api_key(&key)?;\n                let label = validate_label(&set.label)?;\n                client.set_key(&provider, &key, &label)?;","sourceCodeStart":825,"sourceCodeEnd":861,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/cli/src/cloud.rs#L825-L861","documentation":"Thrown by the cloud `keys` set command when `--from-local` is passed but the provider catalog has no local runtime provider for the given provider id (`row.local_kind()` returns None). There is no locally-known key type to copy from, so the operation aborts and directs the user to supply the key directly via `--api-key-stdin` or the hidden prompt.","triggerScenarios":"Running something like `codewhale cloud keys set --provider <id> --from-local` where `<id>` resolves to a catalog row whose `local_kind()` is None (provider has no local runtime equivalent).","commonSituations":"Typo'd or unsupported provider id passed to `--provider`; provider is cloud-only with no local runtime counterpart; catalog updated and the provider's local runtime support was removed.","solutions":["Drop `--from-local` and supply the key with `--api-key-stdin` or the hidden interactive prompt instead.","Check the provider id with `validate_provider_id` / the provider catalog to confirm its `local_kind`.","If the provider should have a local runtime, update the provider catalog mapping."],"exampleFix":"// before\ncodewhale cloud keys set --provider openai --from-local\n// after\ncodewhale cloud keys set --provider openai --api-key-stdin < key.txt","handlingStrategy":"validation","validationCode":"// Before --from-local, confirm the catalog row has a local kind\nlet row = catalog_row(&catalog, &provider)?;\nif row.local_kind().is_none() { eprintln!(\"{} has no local runtime provider\", provider); }","typeGuard":null,"tryCatchPattern":"match set_key_from_local(provider) {\n    Err(e) if e.to_string().contains(\"no local runtime provider\") => {\n        // fall back to --api-key-stdin or prompt\n    }\n    other => other?,\n}","preventionTips":["Check `provider_catalog` for `local_kind` before using --from-local","Validate provider ids against the catalog","Prefer explicit key input for cloud-only providers"],"tags":["cli","api-key","provider-config"],"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"}