mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-30 12:40:44 +00:00
review: stage1
This commit is contained in:
parent
570ec432af
commit
aa9cdf2a3c
10 changed files with 206 additions and 19 deletions
|
|
@ -15,7 +15,11 @@ export function validateAuthMethod(authMethod: string): string | null {
|
|||
const hasApiKey =
|
||||
process.env['OPENAI_API_KEY'] || settings.merged.security?.auth?.apiKey;
|
||||
if (!hasApiKey) {
|
||||
return 'OPENAI_API_KEY environment variable not found. You can enter it interactively or add it to your .env file.';
|
||||
return (
|
||||
'Missing API key for OpenAI-compatible auth. ' +
|
||||
"Set settings.security.auth.apiKey, or set the 'OPENAI_API_KEY' environment variable. " +
|
||||
'If you configured a model in settings.modelProviders with an envKey, set that env var as well.'
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue