fix: preserve explicit startup provider selection

This commit is contained in:
gnanam1990
2026-04-07 09:50:10 +05:30
parent e365cb4010
commit 65dd19cf87
9 changed files with 265 additions and 14 deletions

View File

@@ -1,3 +1,8 @@
import {
clearProviderSelectionFlags,
EXPLICIT_PROVIDER_ENV_VAR,
} from './providerEnvSelection.js'
/**
* --provider CLI flag support.
*
@@ -77,6 +82,9 @@ export function applyProviderFlag(
}
}
clearProviderSelectionFlags()
process.env[EXPLICIT_PROVIDER_ENV_VAR] = provider
const model = parseModelFlag(args)
switch (provider as ProviderFlagName) {