fix(provider): preserve fallback runtime options when resolving credentials
This commit is contained in:
parent
bb22bdc8fb
commit
435c33d408
1 changed files with 5 additions and 6 deletions
|
|
@ -826,11 +826,10 @@ pub fn create_resilient_provider_with_options(
|
|||
// `resolve_provider_credential` check the correct env var for the
|
||||
// fallback provider name.
|
||||
//
|
||||
// Route through `create_provider_with_url` (not
|
||||
// `create_provider_with_options`) so that `custom:` URL prefixes
|
||||
// (e.g. "custom:http://host.docker.internal:1234/v1") work as
|
||||
// fallback entries.
|
||||
match create_provider_with_url(fallback, None, None) {
|
||||
// Keep using `create_provider_with_options` so fallback entries that
|
||||
// require runtime options (for example Codex auth profile overrides)
|
||||
// continue to work.
|
||||
match create_provider_with_options(fallback, None, options) {
|
||||
Ok(provider) => providers.push((fallback.clone(), provider)),
|
||||
Err(_error) => {
|
||||
tracing::warn!(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue