Skip to content
Closed
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
9 changes: 9 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,15 @@
# ARCEEAI_API_KEY=
# ARCEE_BASE_URL= # Override default base URL

# =============================================================================
# LLM PROVIDER (Featherless)
# =============================================================================
# Featherless serves thousands of open-source models (Hugging Face repo IDs)
# via an OpenAI-compatible API — e.g. zai-org/GLM-5.2, meta-llama/Llama-3.1-8B-Instruct
# Get a Featherless key at: https://featherless.ai/
# FEATHERLESS_API_KEY=
# FEATHERLESS_BASE_URL= # Override default base URL

# =============================================================================
# LLM PROVIDER (MiniMax)
# =============================================================================
Expand Down
14 changes: 13 additions & 1 deletion agent/model_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ def _resolve_requests_verify() -> bool | str:
"xiaomi",
"arcee",
"gmi",
"featherless",
"tencent-tokenhub",
"custom", "local",
# Common aliases
Expand All @@ -65,6 +66,7 @@ def _resolve_requests_verify() -> bool | str:
"tencent", "tokenhub", "tencent-cloud", "tencentmaas",
"arcee-ai", "arceeai",
"gmi-cloud", "gmicloud",
"featherless-ai", "featherlessai",
"xai", "x-ai", "x.ai", "grok",
"nvidia", "nim", "nvidia-nim", "nemotron",
"qwen-portal", "novita-ai", "novitaai",
Expand Down Expand Up @@ -420,6 +422,7 @@ def _is_custom_endpoint(base_url: str) -> bool:
"api.stepfun.ai": "stepfun",
"api.stepfun.com": "stepfun",
"api.arcee.ai": "arcee",
"api.featherless.ai": "featherless",
"api.minimax": "minimax",
"dashscope.aliyuncs.com": "alibaba",
"dashscope-intl.aliyuncs.com": "alibaba",
Expand Down Expand Up @@ -1635,7 +1638,7 @@ def get_model_context_length(
cache fallback with suffix/version normalisation. Only
portal-derived values are persisted to disk.
c. Codex OAuth /models probe
d. GMI /models endpoint
d. GMI / Featherless /models endpoint (provider-served context_length)
e. Ollama native /api/show probe (any base_url, provider-agnostic)
f. models.dev registry lookup (with :cloud/-cloud suffix fallback)
6. OpenRouter live API metadata (Kimi-family 32k guard)
Expand Down Expand Up @@ -1882,6 +1885,15 @@ def get_model_context_length(
ctx = _resolve_endpoint_context_length(model, base_url, api_key=api_key)
if ctx is not None:
return ctx
if effective_provider == "featherless" and base_url:
# Featherless serves each model at a provider-specific context_length
# (e.g. zai-org/GLM-5.2 at 256K, not the model's native 1M; an 8B Llama
# at 32K) exposed via /v1/models. Prefer that authoritative endpoint
# value over models.dev and the hardcoded native-context fallback so
# token budgeting matches what the endpoint will actually accept.
ctx = _resolve_endpoint_context_length(model, base_url, api_key=api_key)
if ctx is not None:
return ctx
# 5e. Ollama native /api/show probe — runs for ANY provider with a
# base_url, not just ollama-cloud. Ollama-compatible servers expose
# this endpoint regardless of hostname (local Ollama, Ollama Cloud,
Expand Down
7 changes: 7 additions & 0 deletions apps/desktop/src/app/settings/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,13 @@ export const PROVIDER_GROUPS: ProviderPrefix[] = [
priority: 20
},
{ prefix: 'ARCEE_', name: 'Arcee AI', priority: 20 },
{
prefix: 'FEATHERLESS_',
name: 'Featherless',
description: 'Thousands of open-source models, serverless',
docsUrl: 'https://featherless.ai/',
priority: 20
},
{
prefix: 'GMI_',
name: 'GMI Cloud',
Expand Down
1 change: 1 addition & 0 deletions cli-config.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ model:
# "nvidia" - NVIDIA NIM / build.nvidia.com (requires: NVIDIA_API_KEY)
# "xiaomi" - Xiaomi MiMo (requires: XIAOMI_API_KEY)
# "arcee" - Arcee AI Trinity models (requires: ARCEEAI_API_KEY)
# "featherless" - Featherless open-source models (requires: FEATHERLESS_API_KEY)
# "ollama-cloud" - Ollama Cloud (requires: OLLAMA_API_KEY — https://ollama.com/settings)
# "kilocode" - KiloCode gateway (requires: KILOCODE_API_KEY)
# "azure-foundry" - Microsoft Foundry / Azure OpenAI (API key or Entra ID)
Expand Down
9 changes: 9 additions & 0 deletions hermes_cli/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,14 @@ class ProviderConfig:
api_key_env_vars=("ARCEEAI_API_KEY",),
base_url_env_var="ARCEE_BASE_URL",
),
"featherless": ProviderConfig(
id="featherless",
name="Featherless",
auth_type="api_key",
inference_base_url="https://api.featherless.ai/v1",
api_key_env_vars=("FEATHERLESS_API_KEY",),
base_url_env_var="FEATHERLESS_BASE_URL",
),
"gmi": ProviderConfig(
id="gmi",
name="GMI Cloud",
Expand Down Expand Up @@ -1518,6 +1526,7 @@ def resolve_provider(
"kimi-cn": "kimi-coding-cn", "moonshot-cn": "kimi-coding-cn",
"step": "stepfun", "stepfun-coding-plan": "stepfun",
"arcee-ai": "arcee", "arceeai": "arcee",
"featherless-ai": "featherless", "featherlessai": "featherless",
"gmi-cloud": "gmi", "gmicloud": "gmi",
"minimax-china": "minimax-cn", "minimax_cn": "minimax-cn",
"minimax-portal": "minimax-oauth", "minimax-global": "minimax-oauth", "minimax_oauth": "minimax-oauth",
Expand Down
16 changes: 16 additions & 0 deletions hermes_cli/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2784,6 +2784,22 @@ def _ensure_hermes_home_managed(home: Path):
"category": "provider",
"advanced": True,
},
"FEATHERLESS_API_KEY": {
"description": "Featherless API key",
"prompt": "Featherless API key",
"url": "https://featherless.ai/",
"password": True,
"category": "provider",
"advanced": True,
},
"FEATHERLESS_BASE_URL": {
"description": "Featherless base URL override",
"prompt": "Featherless base URL (leave empty for default)",
"url": None,
"password": False,
"category": "provider",
"advanced": True,
},
"GMI_API_KEY": {
"description": "GMI Cloud API key",
"prompt": "GMI Cloud API key",
Expand Down
4 changes: 3 additions & 1 deletion hermes_cli/doctor.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"KIMI_API_KEY",
"KIMI_CN_API_KEY",
"GMI_API_KEY",
"FEATHERLESS_API_KEY",
"MINIMAX_API_KEY",
"MINIMAX_CN_API_KEY",
"KILOCODE_API_KEY",
Expand Down Expand Up @@ -383,6 +384,7 @@ def _build_apikey_providers_list() -> list:
("StepFun Step Plan", ("STEPFUN_API_KEY",), "https://api.stepfun.ai/step_plan/v1/models", "STEPFUN_BASE_URL", True),
("Kimi / Moonshot (China)", ("KIMI_CN_API_KEY",), "https://api.moonshot.cn/v1/models", None, True),
("Arcee AI", ("ARCEEAI_API_KEY",), "https://api.arcee.ai/api/v1/models", "ARCEE_BASE_URL", True),
("Featherless", ("FEATHERLESS_API_KEY",), "https://api.featherless.ai/v1/models", "FEATHERLESS_BASE_URL", True),
("GMI Cloud", ("GMI_API_KEY",), "https://api.gmi-serving.com/v1/models", "GMI_BASE_URL", True),
("DeepSeek", ("DEEPSEEK_API_KEY",), "https://api.deepseek.com/v1/models", "DEEPSEEK_BASE_URL", True),
("Hugging Face", ("HF_TOKEN",), "https://router.huggingface.co/v1/models", "HF_BASE_URL", True),
Expand All @@ -404,7 +406,7 @@ def _build_apikey_providers_list() -> list:
_name_to_canonical = {
"Z.AI / GLM": "zai", "Kimi / Moonshot": "kimi-coding",
"StepFun Step Plan": "stepfun", "Kimi / Moonshot (China)": "kimi-coding-cn",
"Arcee AI": "arcee", "GMI Cloud": "gmi", "DeepSeek": "deepseek",
"Arcee AI": "arcee", "Featherless": "featherless", "GMI Cloud": "gmi", "DeepSeek": "deepseek",
"Hugging Face": "huggingface", "NVIDIA NIM": "nvidia",
"Alibaba/DashScope": "alibaba", "MiniMax": "minimax",
"MiniMax (China)": "minimax-cn",
Expand Down
1 change: 1 addition & 0 deletions hermes_cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -3040,6 +3040,7 @@ def _active_custom_key_from_base_url() -> str:
"huggingface",
"xiaomi",
"arcee",
"featherless",
"gmi",
"nvidia",
"ollama-cloud",
Expand Down
11 changes: 11 additions & 0 deletions hermes_cli/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,14 @@ def _xai_curated_models() -> list[str]:
"trinity-large-preview",
"trinity-mini",
],
"featherless": [
"zai-org/GLM-5.2",
"zai-org/GLM-4.7",
"moonshotai/Kimi-K2-Thinking",
"deepseek-ai/DeepSeek-V3.2",
"Qwen/Qwen3.5-397B-A17B",
"meta-llama/Llama-3.1-8B-Instruct",
],
"gmi": [
"zai-org/GLM-5.1-FP8",
"deepseek-ai/DeepSeek-V3.2",
Expand Down Expand Up @@ -1040,6 +1048,7 @@ class ProviderEntry(NamedTuple):
ProviderEntry("minimax-cn", "MiniMax (China)", "MiniMax China (Domestic direct API)"),
ProviderEntry("ollama-cloud", "Ollama Cloud", "Ollama Cloud (Cloud-hosted open models, ollama.com)"),
ProviderEntry("arcee", "Arcee AI", "Arcee AI (Trinity models, direct API)"),
ProviderEntry("featherless", "Featherless", "Featherless (Open-source models via HF repo IDs, direct API)"),
ProviderEntry("gmi", "GMI Cloud", "GMI Cloud (Multi-model direct API)"),
ProviderEntry("kilocode", "Kilo Code", "Kilo Code (Kilo Gateway API)"),
ProviderEntry("opencode-zen", "OpenCode Zen", "OpenCode Zen (Curated models, pay-as-you-go)"),
Expand Down Expand Up @@ -1198,6 +1207,8 @@ def group_providers(slugs):
"stepfun-coding-plan": "stepfun",
"arcee-ai": "arcee",
"arceeai": "arcee",
"featherless-ai": "featherless",
"featherlessai": "featherless",
"gmi-cloud": "gmi",
"gmicloud": "gmi",
"minimax-china": "minimax-cn",
Expand Down
9 changes: 9 additions & 0 deletions hermes_cli/providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,11 @@ class HermesOverlay:
base_url_override="https://api.arcee.ai/api/v1",
base_url_env_var="ARCEE_BASE_URL",
),
"featherless": HermesOverlay(
transport="openai_chat",
base_url_override="https://api.featherless.ai/v1",
base_url_env_var="FEATHERLESS_BASE_URL",
),
"gmi": HermesOverlay(
transport="openai_chat",
extra_env_vars=("GMI_API_KEY",),
Expand Down Expand Up @@ -344,6 +349,10 @@ class ProviderDef:
"arcee-ai": "arcee",
"arceeai": "arcee",

# featherless
"featherless-ai": "featherless",
"featherlessai": "featherless",

# gmi
"gmi-cloud": "gmi",
"gmicloud": "gmi",
Expand Down
1 change: 1 addition & 0 deletions hermes_cli/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ def _supports_same_provider_pool_setup(provider: str) -> bool:
"kimi-coding-cn": ["kimi-k2.6", "kimi-k2.5", "kimi-k2-thinking", "kimi-k2-turbo-preview"],
"stepfun": ["step-3.5-flash", "step-3.5-flash-2603"],
"arcee": ["trinity-large-thinking", "trinity-large-preview", "trinity-mini"],
"featherless": ["zai-org/GLM-5.2", "zai-org/GLM-4.7", "moonshotai/Kimi-K2-Thinking", "deepseek-ai/DeepSeek-V3.2", "Qwen/Qwen3.5-397B-A17B", "meta-llama/Llama-3.1-8B-Instruct"],
"minimax": ["MiniMax-M2.7", "MiniMax-M2.5", "MiniMax-M2.1", "MiniMax-M2"],
"minimax-cn": ["MiniMax-M2.7", "MiniMax-M2.5", "MiniMax-M2.1", "MiniMax-M2"],
"kilocode": ["anthropic/claude-opus-4.6", "anthropic/claude-sonnet-4.6", "openai/gpt-5.4", "google/gemini-3-pro-preview", "google/gemini-3-flash-preview"],
Expand Down
13 changes: 13 additions & 0 deletions plugins/model-providers/featherless/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
"""Featherless provider profile."""

from providers import register_provider
from providers.base import ProviderProfile

featherless = ProviderProfile(
name="featherless",
aliases=("featherless-ai", "featherlessai"),
env_vars=("FEATHERLESS_API_KEY",),
base_url="https://api.featherless.ai/v1",
)

register_provider(featherless)
5 changes: 5 additions & 0 deletions plugins/model-providers/featherless/plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name: featherless-provider
kind: model-provider
version: 1.0.0
description: Featherless
author: Nous Research
Loading