File tree Expand file tree Collapse file tree 2 files changed +26
-19
lines changed
onboard-non-interactive/local Expand file tree Collapse file tree 2 files changed +26
-19
lines changed Original file line number Diff line number Diff line change 11import type { AuthChoice , OnboardOptions } from "./onboard-types.js" ;
22
3- type OnboardCoreAuthOptionKey = keyof Pick < OnboardOptions , "litellmApiKey" > ;
3+ type OnboardCoreAuthOptionKey = keyof Pick < OnboardOptions , "litellmApiKey" | "azureOpenaiApiKey" > ;
44
55export type OnboardCoreAuthFlag = {
66 optionKey : OnboardCoreAuthOptionKey ;
@@ -11,6 +11,13 @@ export type OnboardCoreAuthFlag = {
1111} ;
1212
1313export const CORE_ONBOARD_AUTH_FLAGS : ReadonlyArray < OnboardCoreAuthFlag > = [
14+ {
15+ optionKey : "azureOpenaiApiKey" ,
16+ authChoice : "azure-openai-api-key" ,
17+ cliFlag : "--azure-openai-api-key" ,
18+ cliOption : "--azure-openai-api-key <key>" ,
19+ description : "Azure OpenAI API key" ,
20+ } ,
1421 {
1522 optionKey : "litellmApiKey" ,
1623 authChoice : "litellm-api-key" ,
Original file line number Diff line number Diff line change @@ -162,24 +162,6 @@ export async function applyNonInteractiveAuthChoice(params: {
162162 return null ;
163163 }
164164
165- const pluginProviderChoice = await applyNonInteractivePluginProviderChoice ( {
166- nextConfig,
167- authChoice,
168- opts,
169- runtime,
170- baseConfig,
171- resolveApiKey : ( input ) =>
172- resolveApiKey ( {
173- ...input ,
174- cfg : baseConfig ,
175- runtime,
176- } ) ,
177- toApiKeyCredential,
178- } ) ;
179- if ( pluginProviderChoice !== undefined ) {
180- return pluginProviderChoice ;
181- }
182-
183165 const simpleApiKeyChoice = await applySimpleNonInteractiveApiKeyChoice ( {
184166 authChoice,
185167 nextConfig,
@@ -485,6 +467,24 @@ export async function applyNonInteractiveAuthChoice(params: {
485467 }
486468 }
487469
470+ const pluginProviderChoice = await applyNonInteractivePluginProviderChoice ( {
471+ nextConfig,
472+ authChoice,
473+ opts,
474+ runtime,
475+ baseConfig,
476+ resolveApiKey : ( input ) =>
477+ resolveApiKey ( {
478+ ...input ,
479+ cfg : baseConfig ,
480+ runtime,
481+ } ) ,
482+ toApiKeyCredential,
483+ } ) ;
484+ if ( pluginProviderChoice !== undefined ) {
485+ return pluginProviderChoice ;
486+ }
487+
488488 if (
489489 authChoice === "oauth" ||
490490 authChoice === "chutes" ||
You can’t perform that action at this time.
0 commit comments