mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-18 04:41:56 +00:00
feat: add NovitaAI as LLM provider
Add NovitaAI as a first-class provider with dedicated model selection flow, live pricing, and authoritative context length resolution. - Register provider in PROVIDER_REGISTRY, HERMES_OVERLAYS, and all alias/label maps (ID: novita, aliases: novita-ai, novitaai) - Add dedicated _model_flow_novita() with 3-tier model list fallback: Novita API → models.dev → static curated list - Fetch live pricing from /v1/models with correct unit conversion (input_token_price_per_m is 0.0001 USD per Mtok) - Add Novita-specific context length resolution (step 4b) in get_model_context_length(), prioritized over models.dev/OpenRouter - Register api.novita.ai in _URL_TO_PROVIDER to prevent early return from the custom-endpoint code path - Add models.dev mapping (novita → novita-ai) - Add default auxiliary model (deepseek/deepseek-v3-0324) - Add NOVITA_API_KEY to test isolation (conftest.py) - Update docs: providers page, env vars reference, CLI reference, .env.example, README, and landing page
This commit is contained in:
parent
55ba02befb
commit
c76e879574
12 changed files with 192 additions and 7 deletions
27
plugins/model-providers/novita/__init__.py
Normal file
27
plugins/model-providers/novita/__init__.py
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
"""NovitaAI provider profile."""
|
||||
|
||||
from providers import register_provider
|
||||
from providers.base import ProviderProfile
|
||||
|
||||
|
||||
novita = ProviderProfile(
|
||||
name="novita",
|
||||
aliases=("novita-ai", "novitaai"),
|
||||
display_name="NovitaAI",
|
||||
description="NovitaAI — multi-model aggregator with pay-per-use pricing",
|
||||
signup_url="https://novita.ai/settings/key-management",
|
||||
env_vars=("NOVITA_API_KEY", "NOVITA_BASE_URL"),
|
||||
base_url="https://api.novita.ai/openai/v1",
|
||||
auth_type="api_key",
|
||||
default_aux_model="deepseek/deepseek-v3-0324",
|
||||
fallback_models=(
|
||||
"moonshotai/kimi-k2.5",
|
||||
"minimax/minimax-m2.7",
|
||||
"zai-org/glm-5",
|
||||
"deepseek/deepseek-v3-0324",
|
||||
"deepseek/deepseek-r1-0528",
|
||||
"qwen/qwen3-235b-a22b-fp8",
|
||||
),
|
||||
)
|
||||
|
||||
register_provider(novita)
|
||||
5
plugins/model-providers/novita/plugin.yaml
Normal file
5
plugins/model-providers/novita/plugin.yaml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
name: novita-provider
|
||||
kind: model-provider
|
||||
version: 1.0.0
|
||||
description: NovitaAI multi-model aggregator
|
||||
author: Nous Research
|
||||
Loading…
Add table
Add a link
Reference in a new issue