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
13 changes: 13 additions & 0 deletions apps/desktop-tauri/src-tauri/src/commands/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -856,6 +856,19 @@ fn fetch_context_openrouter_falls_back_to_stored_api_key_without_token_accounts(
assert_eq!(ctx.api_key.as_deref(), Some("sk-or-v1-stored"));
}

#[test]
fn nous_provider_is_oauth_only_and_has_no_cookie_or_cli_lane() {
let provider = instantiate_provider(ProviderId::Nous);
assert_eq!(provider.metadata().display_name, "Nous Portal");
assert_eq!(
provider.available_sources(),
vec![SourceMode::Auto, SourceMode::OAuth]
);
assert!(provider.supports_oauth());
assert!(!provider.supports_web());
assert!(!provider.supports_cli());
}

#[test]
fn provider_region_set_rejects_non_regional_provider() {
let mut s = Settings::default();
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions apps/desktop-tauri/src/components/providers/providerIcons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import mimo from "./icons/ProviderIcon-mimo.svg?raw";
import minimax from "./icons/ProviderIcon-minimax.svg?raw";
import mistral from "./icons/ProviderIcon-mistral.svg?raw";
import notion from "./icons/ProviderIcon-notion.svg?raw";
import nous from "./icons/ProviderIcon-nous.svg?raw";
import xai from "./icons/ProviderIcon-xai.svg?raw";
import ollama from "./icons/ProviderIcon-ollama.svg?raw";
import opencode from "./icons/ProviderIcon-opencode.svg?raw";
Expand Down Expand Up @@ -125,6 +126,7 @@ const RAW: Record<string, string> = {
mimo: tint(mimo),
minimax: tint(minimax),
notion: tint(notion),
nous: tint(nous),
xai: tint(xai),
mistral: tint(mistral),
ollama: tint(ollama),
Expand Down Expand Up @@ -220,6 +222,7 @@ export const PROVIDER_ICON_REGISTRY: Record<string, ProviderIcon> = {
zed: { id: "zed", brandColor: "#084ccf", fallbackLetter: "Z" },
qwencloud: { id: "qwencloud", brandColor: "#615CED", fallbackLetter: "Q" },
notion: { id: "notion", brandColor: "#337EA9", fallbackLetter: "N", svgPath: RAW.notion },
nous: { id: "nous", brandColor: "#D6A55C", fallbackLetter: "N", svgPath: RAW.nous },
xai: { id: "xai", brandColor: "#8e8e93", fallbackLetter: "X", svgPath: RAW.xai },
meta: { id: "meta", brandColor: "#0467DF", fallbackLetter: "M", svgPath: RAW.meta },
};
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", "meta",
"xai", "zai", "fireworks", "meta", "nous",
]);
/** 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 @@ -40,6 +40,12 @@ const POLICIES: Readonly<Record<string, UsageSourcePolicy>> = {
},
],
},
nous: {
options: [
{ value: "auto", label: "Auto", description: "Uses the Hermes Agent login or the configured Nous token." },
{ value: "oauth", label: "Hermes OAuth", description: "Uses the read-only Nous Portal token from Hermes Agent." },
],
},
};

export function usageSourcePolicy(providerId: string): UsageSourcePolicy | null {
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 @@ -68,4 +68,5 @@ export const TEST_PROVIDER_CATALOG: Array<[string, string]> = [
["qwencloud", "Qwen Cloud"],
["notion", "Notion AI"],
["meta", "Meta"],
["nous", "Nous Portal"],
];
4 changes: 4 additions & 0 deletions rust/src/cli/serve/dashboard/icons.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,10 @@ static ICONS: &[(&str, &[u8])] = &[
"ProviderIcon-notion",
include_bytes!("icons/ProviderIcon-notion.svg"),
),
(
"ProviderIcon-nous",
include_bytes!("icons/ProviderIcon-nous.svg"),
),
(
"ProviderIcon-ollama",
include_bytes!("icons/ProviderIcon-ollama.svg"),
Expand Down
4 changes: 4 additions & 0 deletions rust/src/cli/serve/dashboard/icons/ProviderIcon-nous.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 12 additions & 1 deletion rust/src/core/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ pub enum ProviderId {
Fireworks,
#[serde(alias = "metaspark")]
Meta,
Nous,
}

impl ProviderId {
Expand Down Expand Up @@ -161,6 +162,7 @@ impl ProviderId {
ProviderId::Xai,
ProviderId::Fireworks,
ProviderId::Meta,
ProviderId::Nous,
]
}

Expand Down Expand Up @@ -204,6 +206,7 @@ impl ProviderId {
ProviderId::DeepInfra => "deepinfra",
ProviderId::Fireworks => "fireworks",
ProviderId::Meta => "meta",
ProviderId::Nous => "nous",
ProviderId::AiAnd => "aiand",
ProviderId::Windsurf => "windsurf",
ProviderId::Manus => "manus",
Expand Down Expand Up @@ -282,6 +285,7 @@ impl ProviderId {
ProviderId::DeepInfra => "DeepInfra",
ProviderId::Fireworks => "Fireworks",
ProviderId::Meta => "Meta",
ProviderId::Nous => "Nous Portal",
ProviderId::AiAnd => "ai&",
ProviderId::Windsurf => "Windsurf",
ProviderId::Manus => "Manus",
Expand Down Expand Up @@ -373,6 +377,7 @@ impl ProviderId {
ProviderId::DeepInfra => None,
ProviderId::Fireworks => None,
ProviderId::Meta => None,
ProviderId::Nous => None,
ProviderId::AiAnd => None,
ProviderId::Windsurf => None,
ProviderId::Doubao => None,
Expand Down Expand Up @@ -446,6 +451,7 @@ impl ProviderId {
"deepseek" | "deep-seek" | "ds" => Some(ProviderId::DeepSeek),
"deepinfra" | "deep-infra" | "di" => Some(ProviderId::DeepInfra),
"fireworks" | "fireworks-ai" | "fw" => Some(ProviderId::Fireworks),
"nous" | "nous-portal" | "nous portal" | "hermes" => Some(ProviderId::Nous),
"meta" | "metaspark" | "meta-spark" | "muse-spark" | "musespark" | "muse spark"
| "meta muse spark" => Some(ProviderId::Meta),
"aiand" | "ai&" | "ai-and" | "ai and" => Some(ProviderId::AiAnd),
Expand Down Expand Up @@ -842,6 +848,9 @@ 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("nous-portal", ProviderId::Nous);
map.insert("nous portal", ProviderId::Nous);
map.insert("hermes", ProviderId::Nous);
map.insert("metaspark", ProviderId::Meta);
map.insert("meta-spark", ProviderId::Meta);
map.insert("muse-spark", ProviderId::Meta);
Expand Down Expand Up @@ -976,6 +985,7 @@ pub fn brand_color(id: ProviderId) -> &'static str {
ProviderId::Xai => "#8E8E93",
ProviderId::Fireworks => "#F25B1C",
ProviderId::Meta => "#0467DF",
ProviderId::Nous => "#D6A55C",
}
}

Expand All @@ -990,7 +1000,7 @@ mod tests {
#[test]
fn test_provider_id_all() {
let all = ProviderId::all();
assert_eq!(all.len(), 71);
assert_eq!(all.len(), 72);
assert!(all.contains(&ProviderId::Claude));
assert!(all.contains(&ProviderId::Codex));
assert!(all.contains(&ProviderId::Fireworks));
Expand Down Expand Up @@ -1042,6 +1052,7 @@ mod tests {
assert!(all.contains(&ProviderId::Notion));
assert!(all.contains(&ProviderId::Xai));
assert!(all.contains(&ProviderId::Meta));
assert!(all.contains(&ProviderId::Nous));
}

#[test]
Expand Down
11 changes: 6 additions & 5 deletions rust/src/core/provider_factory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ use crate::providers::{
GroqProvider, InfiniProvider, JetBrainsProvider, KiloProvider, KimiK2Provider, KimiProvider,
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,
NotionProvider, NousProvider, 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 @@ -100,6 +100,7 @@ pub fn instantiate(id: ProviderId) -> Box<dyn Provider> {
ProviderId::Xai => Box::new(XaiProvider::new()),
ProviderId::Fireworks => Box::new(FireworksProvider::new()),
ProviderId::Meta => Box::new(MetaProvider::new()),
ProviderId::Nous => Box::new(NousProvider::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 @@ -352,7 +352,8 @@ impl TokenAccountSupport {
| ProviderId::Wayfinder
| ProviderId::QwenCloud
| ProviderId::Fireworks
| ProviderId::Meta => None,
| ProviderId::Meta
| ProviderId::Nous => None,
}
}

Expand Down
2 changes: 2 additions & 0 deletions rust/src/providers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ pub mod mistral;
pub mod nanogpt;
pub mod neuralwatt;
pub mod notion;
pub mod nous;
pub mod ollama;
pub mod openai;
pub mod openaiapi;
Expand Down Expand Up @@ -127,6 +128,7 @@ pub use mistral::MistralProvider;
pub use nanogpt::NanoGPTProvider;
pub use neuralwatt::NeuralwattProvider;
pub use notion::NotionProvider;
pub use nous::NousProvider;
pub use ollama::OllamaProvider;
pub use openaiapi::OpenAIApiProvider;
pub use opencode::OpenCodeProvider;
Expand Down
Loading