Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions src/api/providers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,102 +174,119 @@ fn build_test_llm_config(provider: &str, credential: &str) -> crate::config::Llm
base_url: "https://api.anthropic.com".to_string(),
api_key: credential.to_string(),
name: None,
use_bearer_auth: false,
}),
"openai" => Some(ProviderConfig {
api_type: ApiType::OpenAiCompletions,
base_url: "https://api.openai.com".to_string(),
api_key: credential.to_string(),
name: None,
use_bearer_auth: false,
}),
"openrouter" => Some(ProviderConfig {
api_type: ApiType::OpenAiCompletions,
base_url: "https://openrouter.ai/api".to_string(),
api_key: credential.to_string(),
name: None,
use_bearer_auth: false,
}),
"zhipu" => Some(ProviderConfig {
api_type: ApiType::OpenAiCompletions,
base_url: "https://api.z.ai/api/paas/v4".to_string(),
api_key: credential.to_string(),
name: None,
use_bearer_auth: false,
}),
"groq" => Some(ProviderConfig {
api_type: ApiType::OpenAiCompletions,
base_url: "https://api.groq.com/openai".to_string(),
api_key: credential.to_string(),
name: None,
use_bearer_auth: false,
}),
"together" => Some(ProviderConfig {
api_type: ApiType::OpenAiCompletions,
base_url: "https://api.together.xyz".to_string(),
api_key: credential.to_string(),
name: None,
use_bearer_auth: false,
}),
"fireworks" => Some(ProviderConfig {
api_type: ApiType::OpenAiCompletions,
base_url: "https://api.fireworks.ai/inference".to_string(),
api_key: credential.to_string(),
name: None,
use_bearer_auth: false,
}),
"deepseek" => Some(ProviderConfig {
api_type: ApiType::OpenAiCompletions,
base_url: "https://api.deepseek.com".to_string(),
api_key: credential.to_string(),
name: None,
use_bearer_auth: false,
}),
"xai" => Some(ProviderConfig {
api_type: ApiType::OpenAiCompletions,
base_url: "https://api.x.ai".to_string(),
api_key: credential.to_string(),
name: None,
use_bearer_auth: false,
}),
"mistral" => Some(ProviderConfig {
api_type: ApiType::OpenAiCompletions,
base_url: "https://api.mistral.ai".to_string(),
api_key: credential.to_string(),
name: None,
use_bearer_auth: false,
}),
"gemini" => Some(ProviderConfig {
api_type: ApiType::Gemini,
base_url: crate::config::GEMINI_PROVIDER_BASE_URL.to_string(),
api_key: credential.to_string(),
name: None,
use_bearer_auth: false,
}),
"opencode-zen" => Some(ProviderConfig {
api_type: ApiType::OpenAiCompletions,
base_url: "https://opencode.ai/zen".to_string(),
api_key: credential.to_string(),
name: None,
use_bearer_auth: false,
}),
"nvidia" => Some(ProviderConfig {
api_type: ApiType::OpenAiCompletions,
base_url: "https://integrate.api.nvidia.com".to_string(),
api_key: credential.to_string(),
name: None,
use_bearer_auth: false,
}),
"minimax" => Some(ProviderConfig {
api_type: ApiType::Anthropic,
base_url: "https://api.minimax.io/anthropic".to_string(),
api_key: credential.to_string(),
name: None,
use_bearer_auth: false,
}),
"minimax-cn" => Some(ProviderConfig {
api_type: ApiType::Anthropic,
base_url: "https://api.minimaxi.com/anthropic".to_string(),
api_key: credential.to_string(),
name: None,
use_bearer_auth: false,
}),
"moonshot" => Some(ProviderConfig {
api_type: ApiType::OpenAiCompletions,
base_url: "https://api.moonshot.ai".to_string(),
api_key: credential.to_string(),
name: None,
use_bearer_auth: false,
}),
"zai-coding-plan" => Some(ProviderConfig {
api_type: ApiType::OpenAiCompletions,
base_url: "https://api.z.ai/api/coding/paas/v4".to_string(),
api_key: credential.to_string(),
name: None,
use_bearer_auth: false,
}),
_ => None,
};
Expand Down
Loading