feat: poolside
This commit is contained in:
@@ -75,6 +75,9 @@ pub struct AppArgs {
|
|||||||
#[arg(long)]
|
#[arg(long)]
|
||||||
pub openrouter_api_key: Vec<SecretString>,
|
pub openrouter_api_key: Vec<SecretString>,
|
||||||
|
|
||||||
|
#[arg(long)]
|
||||||
|
pub poolside_api_key: Vec<SecretString>,
|
||||||
|
|
||||||
#[arg(long)]
|
#[arg(long)]
|
||||||
pub vercel_ai_gateway_api_key: Vec<SecretString>,
|
pub vercel_ai_gateway_api_key: Vec<SecretString>,
|
||||||
|
|
||||||
|
|||||||
@@ -99,6 +99,7 @@ enum Provider {
|
|||||||
Ollama,
|
Ollama,
|
||||||
OpenCode,
|
OpenCode,
|
||||||
OpenRouter,
|
OpenRouter,
|
||||||
|
Poolside,
|
||||||
VercelAiGateway,
|
VercelAiGateway,
|
||||||
ZAi,
|
ZAi,
|
||||||
}
|
}
|
||||||
@@ -111,15 +112,17 @@ impl Shortcut {
|
|||||||
match self {
|
match self {
|
||||||
S::XS => vec![
|
S::XS => vec![
|
||||||
(P::GoogleAiStudio, "gemini-3.5-flash-lite".into()),
|
(P::GoogleAiStudio, "gemini-3.5-flash-lite".into()),
|
||||||
(P::NovitaAi, "apodex/apodex-1.1-mini".into()),
|
|
||||||
(P::OpenRouter, "apodex/apodex-1.1-mini:free".into()),
|
|
||||||
(P::VercelAiGateway, "openai/gpt-5.4-nano".into()),
|
(P::VercelAiGateway, "openai/gpt-5.4-nano".into()),
|
||||||
(P::HuggingFace, "Qwen/Qwen3.6-35B-A3B".into()),
|
(P::HuggingFace, "Qwen/Qwen3.6-35B-A3B".into()),
|
||||||
|
(P::OpenRouter, "xingchen-agi/xing4.0-29b-a4b:free".into()),
|
||||||
|
(P::NovitaAi, "apodex/apodex-1.1-mini".into()),
|
||||||
|
(P::OpenRouter, "apodex/apodex-1.1-mini:free".into()),
|
||||||
(P::VercelAiGateway, "liquid/lfm2.5-24b-a2b".into()),
|
(P::VercelAiGateway, "liquid/lfm2.5-24b-a2b".into()),
|
||||||
(P::GoogleAiStudio, "gemma-4-26b-a4b-it".into()),
|
(P::GoogleAiStudio, "gemma-4-26b-a4b-it".into()),
|
||||||
(P::OpenRouter, "google/gemma-4-26b-a4b-it:free".into()),
|
(P::OpenRouter, "google/gemma-4-26b-a4b-it:free".into()),
|
||||||
(P::Kilo, "google-gemma-4-26b-a4b-it-free".into()),
|
(P::Kilo, "google-gemma-4-26b-a4b-it-free".into()),
|
||||||
(P::HuggingFace, "google/gemma-4-26B-A4B-it".into()),
|
(P::HuggingFace, "google/gemma-4-26B-A4B-it".into()),
|
||||||
|
(P::Poolside, "poolside/laguna-xs-2.1".into()),
|
||||||
(P::NvidiaNim, "poolside/laguna-xs-2.1".into()),
|
(P::NvidiaNim, "poolside/laguna-xs-2.1".into()),
|
||||||
(P::OpenRouter, "poolside/laguna-xs-2.1:free".into()),
|
(P::OpenRouter, "poolside/laguna-xs-2.1:free".into()),
|
||||||
(P::ZAi, "glm-4.7-flash".into()),
|
(P::ZAi, "glm-4.7-flash".into()),
|
||||||
@@ -192,6 +195,7 @@ impl Shortcut {
|
|||||||
(P::OpenRouter, "inclusionai/ling-3.0-flash-vl:free".into()),
|
(P::OpenRouter, "inclusionai/ling-3.0-flash-vl:free".into()),
|
||||||
(P::VercelAiGateway, "inclusionai/ling-3.0-flash-vl".into()),
|
(P::VercelAiGateway, "inclusionai/ling-3.0-flash-vl".into()),
|
||||||
(P::VercelAiGateway, "poolside/laguna-s-2.1-free".into()),
|
(P::VercelAiGateway, "poolside/laguna-s-2.1-free".into()),
|
||||||
|
(P::Poolside, "poolside/laguna-s-2.1".into()),
|
||||||
(P::Kilo, "poolside-laguna-s-2-1-free".into()),
|
(P::Kilo, "poolside-laguna-s-2-1-free".into()),
|
||||||
(P::OpenRouter, "poolside/laguna-s-2.1:free".into()),
|
(P::OpenRouter, "poolside/laguna-s-2.1:free".into()),
|
||||||
(P::VercelAiGateway, "stepfun/step-3.7-flash".into()),
|
(P::VercelAiGateway, "stepfun/step-3.7-flash".into()),
|
||||||
@@ -523,6 +527,18 @@ pub async fn create_chat_completion(
|
|||||||
.build()
|
.build()
|
||||||
})
|
})
|
||||||
.collect(),
|
.collect(),
|
||||||
|
Provider::Poolside => state
|
||||||
|
.app_args
|
||||||
|
.poolside_api_key
|
||||||
|
.iter()
|
||||||
|
.cloned()
|
||||||
|
.map(|api_key| {
|
||||||
|
Upstream::builder()
|
||||||
|
.url("https://inference.poolside.ai/v1/chat/completions".parse().expect("TODO"))
|
||||||
|
.api_key(api_key)
|
||||||
|
.build()
|
||||||
|
})
|
||||||
|
.collect(),
|
||||||
Provider::VercelAiGateway => state
|
Provider::VercelAiGateway => state
|
||||||
.app_args
|
.app_args
|
||||||
.vercel_ai_gateway_api_key
|
.vercel_ai_gateway_api_key
|
||||||
|
|||||||
Reference in New Issue
Block a user