Better search paths and handling of CLI providers (#5554)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Jack Amadeo
2025-11-07 19:35:26 -08:00
committed by GitHub
parent 65b4b2bb18
commit 25dfd768e5
27 changed files with 721 additions and 538 deletions
+11
View File
@@ -4,6 +4,7 @@ use serde::{Deserialize, Serialize};
use super::errors::ProviderError;
use super::retry::RetryConfig;
use crate::config::base::ConfigValue;
use crate::conversation::message::Message;
use crate::conversation::Conversation;
use crate::model::ModelConfig;
@@ -200,6 +201,16 @@ impl ConfigKey {
}
}
pub fn from_value_type<T: ConfigValue>(required: bool, secret: bool) -> Self {
Self {
name: T::KEY.to_string(),
required,
secret,
default: Some(T::DEFAULT.to_string()),
oauth_flow: false,
}
}
/// Create a new ConfigKey that uses OAuth device code flow for configuration
///
/// This is used for providers that support OAuth authentication instead of manual API key entry.