feat: cohere + more models
This commit is contained in:
@@ -88,6 +88,7 @@ impl Display for ShortcutAndMaybeReasoning {
|
||||
#[derive(Debug, Clone)]
|
||||
enum Provider {
|
||||
CloudflareWorkersAi,
|
||||
Cohere,
|
||||
GoogleAiStudio,
|
||||
Groq,
|
||||
HuggingFace,
|
||||
@@ -123,6 +124,7 @@ impl Shortcut {
|
||||
(P::OpenRouter, "poolside/laguna-xs-2.1:free".into()),
|
||||
(P::ZAi, "glm-4.7-flash".into()),
|
||||
(P::NvidiaNim, "google/diffusiongemma-26b-a4b-it".into()),
|
||||
(P::Cohere, "north-mini-code-1-0".into()),
|
||||
(P::OpenRouter, "cohere/north-mini-code:free".into()),
|
||||
(P::NvidiaNim, "nvidia/nemotron-3.5-lightning-30b-a3b".into()),
|
||||
(
|
||||
@@ -207,6 +209,7 @@ impl Shortcut {
|
||||
),
|
||||
(P::VercelAiGateway, "mistral/mistral-large-3".into()),
|
||||
(P::Ollama, "nemotron-3-super".into()),
|
||||
(P::Cohere, "command-a-plus-05-2026".into()),
|
||||
(P::NvidiaNim, "nvidia/nemotron-3-super-120b-a12b".into()),
|
||||
(P::Kilo, "nvidia-nemotron-3-super-120b-a12b-free".into()),
|
||||
(
|
||||
@@ -233,6 +236,7 @@ impl Shortcut {
|
||||
(P::NvidiaNim, "deepseek-ai/deepseek-v4.1-flash".into()),
|
||||
(P::HuggingFace, "deepseek-ai/DeepSeek-V4.1-Flash".into()),
|
||||
(P::OpenCode, "deepseek-v4.1-flash-free".into()),
|
||||
(P::OpenRouter, "minimax/minimax-m3.1-flash:free".into()),
|
||||
(P::VercelAiGateway, "inclusionai/ling-3.1-flash".into()),
|
||||
(P::HuggingFace, "inclusionAI/Ling-3.1-flash".into()),
|
||||
(P::Ollama, "beam".into()),
|
||||
@@ -395,6 +399,22 @@ pub async fn create_chat_completion(
|
||||
.build()
|
||||
})
|
||||
.collect(),
|
||||
Provider::Cohere => state
|
||||
.app_args
|
||||
.cohere_api_key
|
||||
.iter()
|
||||
.cloned()
|
||||
.map(|api_key| {
|
||||
Upstream::builder()
|
||||
.url(
|
||||
"https://api.cohere.com/compatibility/v1/chat/completions"
|
||||
.parse()
|
||||
.expect("TODO"),
|
||||
)
|
||||
.api_key(api_key)
|
||||
.build()
|
||||
})
|
||||
.collect(),
|
||||
Provider::Groq => state
|
||||
.app_args
|
||||
.groq_api_key
|
||||
|
||||
Reference in New Issue
Block a user