feat: Dynamically detect if a selected client in the sandbox first run wizard supports oauth
CI / All (ubuntu-latest) (push) Failing after 24s
CI / All (macos-latest) (push) Has been cancelled
CI / All (windows-latest) (push) Has been cancelled

This commit is contained in:
2026-07-24 18:07:30 -06:00
parent 5a1bb569b4
commit 8b0a536f4e
2 changed files with 11 additions and 2 deletions
+9
View File
@@ -38,6 +38,15 @@ register_client!(
(bedrock, "bedrock", BedrockConfig, BedrockClient),
);
pub fn client_type_supports_oauth(type_str: &str) -> bool {
matches!(
type_str,
ClaudeClient::NAME | OpenAIClient::NAME | GeminiClient::NAME
) || ALL_PROVIDER_MODELS
.iter()
.any(|pm| pm.provider == type_str && pm.oauth.is_some())
}
pub const OPENAI_COMPATIBLE_PROVIDERS: [(&str, &str); 18] = [
("ai21", "https://api.ai21.com/studio/v1"),
(