Skip to content

feat(cli): add Featherless (featherless.ai) as a built-in provider - #48221

Closed
melodysdreamj wants to merge 1 commit into
NousResearch:mainfrom
melodysdreamj:feat/featherless-provider
Closed

feat(cli): add Featherless (featherless.ai) as a built-in provider#48221
melodysdreamj wants to merge 1 commit into
NousResearch:mainfrom
melodysdreamj:feat/featherless-provider

Conversation

@melodysdreamj

Copy link
Copy Markdown

Summary

Adds Featherless as a first-class, built-in inference provider. Featherless serves thousands of open-source models addressed by their Hugging Face repo IDs (e.g. zai-org/GLM-5.2) through an OpenAI-compatible API, so it is wired as a standard chat_completions API-key provider — mirroring the existing HF-style provider (GMI) with a main-model-first auxiliary design (Arcee).

Today these models are only reachable through provider: custom. This makes Featherless selectable in hermes model, fallback chains, and hermes doctor, with per-model context auto-detection.

  • Base URL: https://api.featherless.ai/v1
  • API key: FEATHERLESS_API_KEY (optional FEATHERLESS_BASE_URL override)
  • Default model: zai-org/GLM-5.2
  • Aliases: featherless-ai, featherlessai

What's included

  • hermes_cli/auth.pyPROVIDER_REGISTRY entry + aliases
  • hermes_cli/models.py / hermes_cli/setup.py — curated catalog (default zai-org/GLM-5.2), label, aliases
  • hermes_cli/providers.pyHermesOverlay (openai_chat) + aliases
  • agent/model_metadata.py — provider prefixes, URL→provider mapping, and a Featherless branch in get_model_context_length
  • hermes_cli/config.pyOPTIONAL_ENV_VARS entries
  • hermes_cli/doctor.py/models health-check + env hint
  • hermes_cli/main.py — routes to the generic API-key model flow
  • trajectory_compressor.py — base_url host detection
  • plugins/model-providers/featherless/ — provider profile plugin
  • apps/desktop, .env.example, cli-config.yaml.example
  • Docs: providers, quickstart, environment-variables, fallback-providers, provider-runtime, configuration
  • Tests: tests/hermes_cli/test_featherless_provider.py

Provider-served context length

Featherless serves each model at a provider-specific context_length exposed via /v1/models (e.g. zai-org/GLM-5.2 at 256K, not its native 1M; an 8B Llama at 32K). The new branch in get_model_context_length prefers that authoritative endpoint value over models.dev and the hardcoded native-context fallback, so token budgeting matches what the endpoint will actually accept (mirrors the existing GMI branch).

Testing

  • tests/hermes_cli/test_featherless_provider.py — registry, aliases, credentials, config registry, catalog, URL/prefix mapping, overlay, doctor hint, main-model-first aux, and context-length resolution.
  • Targeted suites pass: test_featherless_provider.py, test_runtime_provider_resolution.py, test_setup_model_provider.py (168 passed).
  • Live-verified against the real Featherless API through the wired Hermes code paths: chat completion with zai-org/GLM-5.2, model listing (22,275 models), and per-model context auto-detection (256K / 32K).

🤖 Generated with Claude Code

Featherless serves thousands of open-source models addressed by their
Hugging Face repo IDs (e.g. zai-org/GLM-5.2) through an OpenAI-compatible
API. Wire it as a first-class API-key provider, mirroring the existing
HF-style provider (GMI) with a main-model-first auxiliary design (Arcee).

Base URL https://api.featherless.ai/v1, key FEATHERLESS_API_KEY,
optional FEATHERLESS_BASE_URL override, default model zai-org/GLM-5.2.

- auth.py: PROVIDER_REGISTRY entry + aliases
- models.py / setup.py: curated catalog (default zai-org/GLM-5.2), label, aliases
- providers.py: HermesOverlay (openai_chat) + aliases
- model_metadata.py: provider prefixes, URL->provider mapping, and a
  Featherless branch in get_model_context_length so the provider-served
  context_length from /v1/models (e.g. GLM-5.2 at 256K, an 8B at 32K) wins
  over the model's native context — token budgeting matches what the
  endpoint actually accepts (mirrors the existing GMI branch)
- config.py: OPTIONAL_ENV_VARS entries
- doctor.py: /models health-check endpoint + env hint
- main.py: route to generic api-key model flow
- trajectory_compressor.py: detect provider from base_url host
- plugins/model-providers/featherless: provider profile plugin
- apps/desktop, .env.example, cli-config.yaml.example
- docs: providers, quickstart, environment-variables, fallback-providers,
  provider-runtime, configuration
- tests: tests/hermes_cli/test_featherless_provider.py

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@alt-glitch alt-glitch added type/feature New feature or request comp/cli CLI entry point, hermes_cli/, setup wizard comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint P3 Low — cosmetic, nice to have labels Jun 18, 2026
@DeamonDev888

Copy link
Copy Markdown

Good addition — #62467's unified resolver includes Featherless in its generic Category C path, so this provider will automatically benefit from the credential resolution fixes.

What this PR does: adds Featherless as a built-in provider in PROVIDER_REGISTRY.

How #62467 interacts: once Featherless is registered, the unified resolver agent/auth.py::resolve_provider_credentials() handles it automatically through the generic API-key path:

  1. Check pool entry base_url first
  2. Fall back to FEATHERLESS_API_KEY env var
  3. Fall back to model.base_url from config.yaml (when pool_url matches registry default)
  4. Validate final URL via _validate_base_url_safe (SSRF prevention)

No conflict. If this PR merges first, #62467 will automatically pick up the new provider. If #62467 merges first, Featherless just needs to be added to the registry and the resolver handles the rest.

@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the thorough provider integration and documentation work. This automated hermes-sweeper review is closing it under the standing third-party integration policy.

  • The PR's substance is a new Featherless vendor integration in the core tree, including plugins/model-providers/featherless/ and core CLI/provider wiring (ba8998dcfffa640860d455d3953d99d334f6dcc3).
  • AGENTS.md:126-136 requires third-party provider integrations to ship as standalone plugins, installable under ~/.hermes/plugins/ or via a pip entry point; this is a maintenance-coupling decision, not a quality judgment.
  • The existing provider loader supports user-installed model-provider plugins at $HERMES_HOME/plugins/model-providers/ (providers/__init__.py:91-99, :163-171). Please publish Featherless through that standalone-plugin path and promote it in #plugins-skills-and-skins.

Closed as not-planned per standing maintainer policy (in-tree-provider-integration). This is a design-direction decision, not a code-quality judgment — see the Contribution Rubric in AGENTS.md for what the project is looking for. If you believe this policy was misapplied to your change, comment here and a maintainer will take a look.

@teknium1 teknium1 closed this Jul 14, 2026
@teknium1 teknium1 added the sweeper:not-planned Sweeper: closed per standing maintainer policy (design direction) label Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have sweeper:not-planned Sweeper: closed per standing maintainer policy (design direction) type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants