Skip to content

feat(llm-drivers): add Novita AI as OpenAI-compatible provider#3076

Merged
houko merged 1 commit into
mainfrom
feat/novita-provider
Apr 25, 2026
Merged

feat(llm-drivers): add Novita AI as OpenAI-compatible provider#3076
houko merged 1 commit into
mainfrom
feat/novita-provider

Conversation

@houko

@houko houko commented Apr 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Register Novita AI in PROVIDER_REGISTRY (librefang-llm-drivers) at https://api.novita.ai/openai/v1, env NOVITA_API_KEY, alias novita-ai. Uses the OpenAI API format.
  • Update known_providers() count (39 → 40), unknown-provider error hint, and .env.example.
  • Add registry-lookup unit tests covering canonical name and alias.

Auto-detection is automatic via the existing registry-driven detect_available_provider() (Phase 2 falls through to the full PROVIDER_REGISTRY) — no separate PRIORITY entry is needed.

Ported from openfang 365bec8 and 4714efb, adapted to LibreFang's registry architecture (which is cleaner than the upstream match arms).

Companion registry PR (model catalog so Novita's models surface in the dashboard picker without /api/models/custom): librefang/librefang-registry#72

Test plan

  • cargo check -p librefang-llm-drivers --tests — green
  • cargo test -p librefang-llm-drivers --lib drivers::tests — 30 passed (incl. test_provider_defaults_novita, test_provider_defaults_novita_ai_alias)
  • cargo clippy -p librefang-llm-drivers --all-targets -- -D warnings — clean
  • Manual: configure NOVITA_API_KEY + provider = "novita" and send a chat through /api/agents/{id}/message

Register novita with NOVITA_API_KEY at https://api.novita.ai/openai/v1
in PROVIDER_REGISTRY (alias: novita-ai). Updates known_providers count
and the unknown-provider error hint. Adds two registry-lookup tests.

Ported from openfang 365bec8 + 4714efb, adapted to librefang's
PROVIDER_REGISTRY architecture so detect_available_provider picks it up
without a separate PROBE_ORDER entry.
@github-actions github-actions Bot added size/S 10-49 lines changed ready-for-review PR is ready for maintainer review labels Apr 25, 2026
@houko
houko merged commit 06b4dc9 into main Apr 25, 2026
24 checks passed
@houko
houko deleted the feat/novita-provider branch April 25, 2026 05:17
@github-actions github-actions Bot removed the ready-for-review PR is ready for maintainer review label Apr 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/S 10-49 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant