Skip to content

feat(providers): add NeuralWatt energy-efficient inference provider#242

Open
gr3enarr0w wants to merge 7 commits into
ferro-labs:mainfrom
gr3enarr0w:feat/neuralwatt-provider
Open

feat(providers): add NeuralWatt energy-efficient inference provider#242
gr3enarr0w wants to merge 7 commits into
ferro-labs:mainfrom
gr3enarr0w:feat/neuralwatt-provider

Conversation

@gr3enarr0w

@gr3enarr0w gr3enarr0w commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Closes #245

Summary

Adds NeuralWatt (api.neuralwatt.com) as a new direct inference provider. NeuralWatt hosts open-source models on energy-efficient hardware with a fully OpenAI-compatible API.

Provider details

  • Base URL: https://api.neuralwatt.com/v1
  • Auth: Authorization: Bearer $NEURALWATT_API_KEY
  • API format: OpenAI-compatible (/v1/chat/completions, /v1/models)
  • Capabilities: chat, stream, proxy, discovery
  • Initial models: meta-llama/Llama-3.3-70B-Instruct, zai-org/GLM-5.1-FP8, meta-llama/Llama-3.1-8B-Instruct

Changes

  • providers/neuralwatt/neuralwatt.go — implementation using openaicompat.PostChat/PostStream and discov.DiscoverOpenAICompatibleModels
  • providers/neuralwatt/neuralwatt_test.go — auth header assertions, DiscoverModels test
  • providers/names.goNameNeuralWatt
  • providers/providers_list.goProviderEntry registration
  • providers/stability_test.go — stability case
  • config.example.json, config.example.yamlneuralwatt target
  • docker-compose.ymlNEURALWATT_API_KEY comment

Test plan

  • go test ./providers/neuralwatt/...
  • go test ./providers/ -run TestProviderNameStability
  • go test ./...

🤖 Generated with Claude Code

Clark Everson and others added 5 commits May 21, 2026 13:01
NeuralWatt (api.neuralwatt.com/v1) is a direct single-vendor OpenAI-compatible
inference service hosting open-source models (Llama-3.3-70B, GLM-5.1-FP8, etc.)
with per-request energy transparency metrics. It is a direct provider, not an
aggregator — no cost opacity concern.

Implements Chat, Stream, Discovery, and Proxy capabilities. The /v1/models
endpoint is publicly accessible without authentication.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…g config entries

- Fix SupportsModel() returning true unconditionally (dead loop bug) — now
  returns false for models not in the static list, preventing NeuralWatt from
  claiming gpt-4o, claude-3-opus, etc. and mis-routing those requests
- Hoist SupportedModels slice to package-level var to avoid per-call allocation
- Add Authorization: Bearer header assertion to Complete and CompleteStream tests
- Add TestNeuralWattProvider_DiscoverModels_MockHTTP test for CapabilityDiscovery
- Add neuralwatt entry to config.example.json, config.example.yaml,
  docker-compose.yml per AGENTS.md steps 5-6

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@gr3enarr0w

Copy link
Copy Markdown
Contributor Author

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis ✅

245 - Fully compliant

Compliant requirements:

  • Add NeuralWatt as a direct inference provider
  • Use base URL https://api.neuralwatt.com/v1
  • Authenticate with Authorization: Bearer $NEURALWATT_API_KEY
  • Support OpenAI-compatible endpoints (/v1/chat/completions, /v1/models)
  • Support initial models: Llama-3.3-70B, GLM-5.1-FP8, Llama-3.1-8B
  • Support live model discovery via /v1/models
⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 PR contains tests
🔒 No security concerns identified
⚡ No major issues detected

Comment thread .superset/scripts/context-gen.sh Outdated
@@ -0,0 +1,16 @@
#!/usr/bin/env bash
set -euo pipefail

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove .superset folder?

@MitulShah1

Copy link
Copy Markdown
Contributor

Nice and clean, thanks. Pulled the branch, it builds and the neuralwatt and stability tests pass locally, and it follows the OpenAI compatible pattern well (shared PostChat and PostStream, the discovery helper, and all four interface assertions).

Two things before merge:

  1. The hardcoded supportedModels list is stale. I hit api.neuralwatt.com/v1/models and it currently serves qwen3.5-397b, qwen3.5-397b-fast, qwen3.6-35b, qwen3.6-35b-fast, kimi-k2.6, kimi-k2.6-fast and kimi-k2.7-code, all with short ids. None of the three ids in the PR (Llama-3.3-70B-Instruct, GLM-5.1-FP8, Llama-3.1-8B-Instruct) are served anymore, and the naming style is different too. With live discovery off, SupportsModel would match nothing NeuralWatt actually serves. Could you regenerate the seed list from the live endpoint?

  2. The branch is carrying some unrelated local tooling again (.superset/, CODEX.md, and the matching .gitignore entries), same as the route trace PR. Would be good to drop those so the diff stays focused on the provider.

On the catalog side: since NeuralWatt exposes pricing and context windows in its models feed, I drafted the model-catalog entries in ferro-labs/model-catalog#25 so these models are priced for cost optimized routing and the budget plugin. Feel free to take that over or adjust it. For future providers the cleaner flow is to raise the model-catalog PR yourself alongside the gateway PR.

And to close the loop on the earlier question: NeuralWatt is a direct host, not an aggregator, so this is on the normal track and does not need to wait behind Requesty or NanoGPT.

Clark Everson added 2 commits July 14, 2026 20:29
…ling scaffold

The hardcoded SupportedModels seed listed models NeuralWatt no longer serves
(meta-llama/Llama-3.3-70B-Instruct, zai-org/GLM-5.1-FP8,
meta-llama/Llama-3.1-8B-Instruct). With live discovery off, SupportsModel
matched nothing NeuralWatt actually returns. Replaced with the current live
/v1/models list: qwen3.5-397b(-fast), qwen3.6-35b(-fast), kimi-k2.6(-fast),
kimi-k2.7-code.

Also drops .superset/ and CODEX.md (unrelated local dev-tooling scaffold,
not part of this provider).

Note: TestCatalogBackupCoversRegisteredProviders still fails in CI - the
embedded catalog_backup.json is a generated mirror of ferro-labs/model-catalog
releases and has no neuralwatt entries yet. That's blocked on
ferro-labs/model-catalog#25 merging and a catalog refresh, not fixable from
this repo.
Also finishes staging the neuralwatt seed-model fix from the previous commit
(the earlier commit only picked up the .superset/CODEX.md deletions due to a
bad git add pathspec).
@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@gr3enarr0w, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 59 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: c0233f7e-db8f-4da3-8df0-2ce8d8acc81b

📥 Commits

Reviewing files that changed from the base of the PR and between 17998ae and 4addbeb.

📒 Files selected for processing (9)
  • .gitignore
  • config.example.json
  • config.example.yaml
  • docker-compose.yml
  • providers/names.go
  • providers/neuralwatt/neuralwatt.go
  • providers/neuralwatt/neuralwatt_test.go
  • providers/providers_list.go
  • providers/stability_test.go
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gr3enarr0w

Copy link
Copy Markdown
Contributor Author

Fixed the stale seed model list per your review — replaced the three dead IDs with the current live /v1/models set: qwen3.5-397b(-fast), qwen3.6-35b(-fast), kimi-k2.6(-fast), kimi-k2.7-code. That was also the actual root cause of TestCatalogBackupCoversRegisteredProviders picking a dead model as its sample.

That test still won't go green from this side, though: models/catalog_backup.json is a generated mirror pulled from ferro-labs/model-catalog releases (via scripts/refresh_catalog_backup.sh), and neuralwatt has zero entries there yet. It's blocked on ferro-labs/model-catalog#25 merging and releasing, then a catalog refresh here — not something fixable by editing this PR's diff.

Also dropped .superset//CODEX.md (unrelated local dev-tooling scaffold).

One more thing: the CI run right after I pushed showed go build ./... failing with "no required module provides package .../internal/openaicompat" — I verified that's a transient runner issue, not a real problem: a completely fresh git clone of the exact same pushed commit builds clean locally. I don't have admin rights to re-run the workflow myself; a re-run (or a trivial push) should clear it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(providers): add NeuralWatt energy-efficient inference provider

2 participants