Skip to content
Merged
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions apps/desktop-tauri/src/components/providers/providerIcons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import kimi from "./icons/ProviderIcon-kimi.svg?raw";
import kiro from "./icons/ProviderIcon-kiro.svg?raw";
import llmproxy from "./icons/ProviderIcon-llmproxy.svg?raw";
import manus from "./icons/ProviderIcon-manus.svg?raw";
import meta from "./icons/ProviderIcon-meta.svg?raw";
import mimo from "./icons/ProviderIcon-mimo.svg?raw";
import minimax from "./icons/ProviderIcon-minimax.svg?raw";
import mistral from "./icons/ProviderIcon-mistral.svg?raw";
Expand Down Expand Up @@ -120,6 +121,7 @@ const RAW: Record<string, string> = {
kiro: tint(kiro),
llmproxy: tint(llmproxy),
manus: tint(manus),
meta: tint(meta),
mimo: tint(mimo),
minimax: tint(minimax),
notion: tint(notion),
Expand Down Expand Up @@ -219,6 +221,7 @@ export const PROVIDER_ICON_REGISTRY: Record<string, ProviderIcon> = {
qwencloud: { id: "qwencloud", brandColor: "#615CED", fallbackLetter: "Q" },
notion: { id: "notion", brandColor: "#337EA9", fallbackLetter: "N", svgPath: RAW.notion },
xai: { id: "xai", brandColor: "#8e8e93", fallbackLetter: "X", svgPath: RAW.xai },
meta: { id: "meta", brandColor: "#0467DF", fallbackLetter: "M", svgPath: RAW.meta },
};

const ALIASES: Record<string, string> = {
Expand Down Expand Up @@ -303,6 +306,12 @@ const ALIASES: Record<string, string> = {
"lite-llm": "litellm",
"zed ai": "zed",
"zed-ai": "zed",
metaspark: "meta",
"meta-spark": "meta",
musespark: "meta",
"muse-spark": "meta",
"muse spark": "meta",
"meta muse spark": "meta",
};

function normalize(id: string): string {
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop-tauri/src/surfaces/TrayPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const HAS_DASHBOARD = new Set([
"mimo", "minimax", "mistral", "nanogpt", "notion", "ollama", "openaiapi",
"opencode", "opencodego", "openrouter", "perplexity", "qoder", "codebuddy", "sakana", "stepfun",
"t3chat", "venice", "vertexai", "warp", "windsurf",
"xai", "zai", "fireworks",
"xai", "zai", "fireworks", "meta",
]);
/** Provider IDs that have a status page URL in the backend */
const HAS_STATUS_PAGE = new Set([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ function providerSourceHintShort(
case "llmproxy":
case "xai":
case "fireworks":
case "meta":
return t("ProviderSourceApiShort");
case "kiro":
return t("ProviderSourceKiroEnvShort");
Expand Down
1 change: 1 addition & 0 deletions apps/desktop-tauri/src/test/providerCatalog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,5 @@ export const TEST_PROVIDER_CATALOG: Array<[string, string]> = [
["sub2api", "sub2api"],
["qwencloud", "Qwen Cloud"],
["notion", "Notion AI"],
["meta", "Meta"],
];
51 changes: 50 additions & 1 deletion rust/src/core/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ pub enum ProviderId {
Notion,
Xai,
Fireworks,
#[serde(alias = "metaspark")]
Meta,
}

impl ProviderId {
Expand Down Expand Up @@ -158,6 +160,7 @@ impl ProviderId {
ProviderId::Notion,
ProviderId::Xai,
ProviderId::Fireworks,
ProviderId::Meta,
]
}

Expand Down Expand Up @@ -200,6 +203,7 @@ impl ProviderId {
ProviderId::DeepSeek => "deepseek",
ProviderId::DeepInfra => "deepinfra",
ProviderId::Fireworks => "fireworks",
ProviderId::Meta => "meta",
ProviderId::AiAnd => "aiand",
ProviderId::Windsurf => "windsurf",
ProviderId::Manus => "manus",
Expand Down Expand Up @@ -277,6 +281,7 @@ impl ProviderId {
ProviderId::DeepSeek => "DeepSeek",
ProviderId::DeepInfra => "DeepInfra",
ProviderId::Fireworks => "Fireworks",
ProviderId::Meta => "Meta",
ProviderId::AiAnd => "ai&",
ProviderId::Windsurf => "Windsurf",
ProviderId::Manus => "Manus",
Expand Down Expand Up @@ -367,6 +372,7 @@ impl ProviderId {
ProviderId::DeepSeek => None,
ProviderId::DeepInfra => None,
ProviderId::Fireworks => None,
ProviderId::Meta => None,
ProviderId::AiAnd => None,
ProviderId::Windsurf => None,
ProviderId::Doubao => None,
Expand Down Expand Up @@ -440,6 +446,8 @@ impl ProviderId {
"deepseek" | "deep-seek" | "ds" => Some(ProviderId::DeepSeek),
"deepinfra" | "deep-infra" | "di" => Some(ProviderId::DeepInfra),
"fireworks" | "fireworks-ai" | "fw" => Some(ProviderId::Fireworks),
"meta" | "metaspark" | "meta-spark" | "muse-spark" | "musespark" | "muse spark"
| "meta muse spark" => Some(ProviderId::Meta),
"aiand" | "ai&" | "ai-and" | "ai and" => Some(ProviderId::AiAnd),
"windsurf" | "codeium" => Some(ProviderId::Windsurf),
"manus" => Some(ProviderId::Manus),
Expand Down Expand Up @@ -737,6 +745,12 @@ pub fn cli_name_map() -> HashMap<&'static str, ProviderId> {
map.insert("di", ProviderId::DeepInfra);
map.insert("fireworks-ai", ProviderId::Fireworks);
map.insert("fw", ProviderId::Fireworks);
map.insert("metaspark", ProviderId::Meta);
map.insert("meta-spark", ProviderId::Meta);
map.insert("muse-spark", ProviderId::Meta);
map.insert("musespark", ProviderId::Meta);
map.insert("muse spark", ProviderId::Meta);
map.insert("meta muse spark", ProviderId::Meta);
map.insert("ai&", ProviderId::AiAnd);
map.insert("ai-and", ProviderId::AiAnd);
map.insert("codeium", ProviderId::Windsurf);
Expand Down Expand Up @@ -864,6 +878,7 @@ pub fn brand_color(id: ProviderId) -> &'static str {
ProviderId::Notion => "#337EA9",
ProviderId::Xai => "#8E8E93",
ProviderId::Fireworks => "#F25B1C",
ProviderId::Meta => "#0467DF",
}
}

Expand All @@ -874,7 +889,7 @@ mod tests {
#[test]
fn test_provider_id_all() {
let all = ProviderId::all();
assert_eq!(all.len(), 70);
assert_eq!(all.len(), 71);
assert!(all.contains(&ProviderId::Claude));
assert!(all.contains(&ProviderId::Codex));
assert!(all.contains(&ProviderId::Fireworks));
Expand Down Expand Up @@ -925,6 +940,7 @@ mod tests {
assert!(all.contains(&ProviderId::QwenCloud));
assert!(all.contains(&ProviderId::Notion));
assert!(all.contains(&ProviderId::Xai));
assert!(all.contains(&ProviderId::Meta));
}

#[test]
Expand Down Expand Up @@ -1142,6 +1158,39 @@ mod tests {
);
}

#[test]
fn test_provider_id_meta() {
assert_eq!(ProviderId::Meta.cli_name(), "meta");
assert_eq!(ProviderId::Meta.display_name(), "Meta");
assert_eq!(ProviderId::Meta.cookie_domain(), None);
assert_eq!(ProviderId::from_cli_name("meta"), Some(ProviderId::Meta));
assert_eq!(
ProviderId::from_cli_name("metaspark"),
Some(ProviderId::Meta)
);
assert_eq!(
ProviderId::from_cli_name("meta-spark"),
Some(ProviderId::Meta)
);
assert_eq!(ProviderId::from_cli_name("meta"), Some(ProviderId::Meta));
assert_eq!(
ProviderId::from_cli_name("muse-spark"),
Some(ProviderId::Meta)
);
assert_eq!(
ProviderId::from_cli_name("musespark"),
Some(ProviderId::Meta)
);
// Display name round-trips (also covered by the generic alias test).
assert_eq!(ProviderId::from_cli_name("Meta"), Some(ProviderId::Meta));
// Backwards-compat aliases still resolve.
assert_eq!(
ProviderId::from_cli_name("Meta Muse Spark"),
Some(ProviderId::Meta)
);
assert_eq!(brand_color(ProviderId::Meta), "#0467DF");
}

#[test]
fn test_provider_id_xai() {
assert_eq!(ProviderId::Xai.cli_name(), "xai");
Expand Down
15 changes: 8 additions & 7 deletions rust/src/core/provider_factory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ use crate::providers::{
DeepInfraProvider, DeepSeekProvider, DeepgramProvider, DevinProvider, DoubaoProvider,
ElevenLabsProvider, FactoryProvider, FireworksProvider, GeminiProvider, GrokProvider,
GroqProvider, InfiniProvider, JetBrainsProvider, KiloProvider, KimiK2Provider, KimiProvider,
KiroProvider, LLMProxyProvider, LiteLLMProvider, LongCatProvider, ManusProvider, MiMoProvider,
MiniMaxProvider, MistralProvider, NanoGPTProvider, NeuralwattProvider, NotionProvider,
OllamaProvider, OpenAIApiProvider, OpenCodeGoProvider, OpenCodeProvider, OpenRouterProvider,
PerplexityProvider, PoeProvider, QoderProvider, QwenCloudProvider, SakanaProvider,
StepFunProvider, Sub2ApiProvider, T3ChatProvider, VeniceProvider, VertexAIProvider,
WarpProvider, WayfinderProvider, WindsurfProvider, XaiProvider, ZaiProvider, ZedProvider,
ZenMuxProvider, ZoomMateProvider,
KiroProvider, LLMProxyProvider, LiteLLMProvider, LongCatProvider, ManusProvider, MetaProvider,
MiMoProvider, MiniMaxProvider, MistralProvider, NanoGPTProvider, NeuralwattProvider,
NotionProvider, OllamaProvider, OpenAIApiProvider, OpenCodeGoProvider, OpenCodeProvider,
OpenRouterProvider, PerplexityProvider, PoeProvider, QoderProvider, QwenCloudProvider,
SakanaProvider, StepFunProvider, Sub2ApiProvider, T3ChatProvider, VeniceProvider,
VertexAIProvider, WarpProvider, WayfinderProvider, WindsurfProvider, XaiProvider, ZaiProvider,
ZedProvider, ZenMuxProvider, ZoomMateProvider,
};

/// Instantiate the concrete [`Provider`] implementation for a given [`ProviderId`].
Expand Down Expand Up @@ -99,6 +99,7 @@ pub fn instantiate(id: ProviderId) -> Box<dyn Provider> {
ProviderId::Notion => Box::new(NotionProvider::new()),
ProviderId::Xai => Box::new(XaiProvider::new()),
ProviderId::Fireworks => Box::new(FireworksProvider::new()),
ProviderId::Meta => Box::new(MetaProvider::new()),
}
}

Expand Down
3 changes: 2 additions & 1 deletion rust/src/core/token_accounts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,8 @@ impl TokenAccountSupport {
| ProviderId::LongCat
| ProviderId::Wayfinder
| ProviderId::QwenCloud
| ProviderId::Fireworks => None,
| ProviderId::Fireworks
| ProviderId::Meta => None,
}
}

Expand Down
Loading