You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add Novita as a model gateway backend
Novita hosts open-weight models behind its own OpenAI-compatible
endpoint (api.novita.ai/openai), reached with a single NOVITA_API_KEY.
Model ids are already author/slug (deepseek/deepseek-r1), the same
shape OpenRouter uses, so no special-casing is needed in vendor().
Follows the existing openrouter/openai/ollama backends: a thin
subclass of OpenAICompatChatModel, credentials resolved through the
same env/.env lookup in config.py, and a new branch in the registry's
get_model(). Like OpenAI, Novita reports no per-call cost, so calls
are counted as unpriced unless a rate card is supplied.
* Recommend Novita's current flagship models
The models listed for Novita were older ids that no longer reflect what
the platform leads with. Point the recommendations at the three current
flagships instead, each verified against api.novita.ai:
moonshotai/kimi-k3 1M context, native vision
zai-org/glm-5.2 1M context, long-horizon agentic work
deepseek/deepseek-v4-flash-0731 1M context, cheapest of the three
Context windows, output limits, input modalities and pricing were taken
from the live /openai/v1/models response rather than carried over.
* Fix column alignment for novita example in models cookbook
---------
Co-authored-by: jax-novita <jax-novita@users.noreply.github.com>
|`claude-cli`| a Claude subscription, no API key | text completion on quota you already pay for |
51
53
|`openrouter`|`OPENROUTER_API_KEY`| one key, most vendors, per-call cost in the response |
52
54
|`openai`|`OPENAI_API_KEY`| the OpenAI API directly, or any endpoint via `OPENAI_BASE_URL`|
55
+
|`novita`|`NOVITA_API_KEY`| Novita's own endpoint, token counts but no per-call cost |
53
56
|`ollama`| none — a local server | models on your own machine, free and offline |
54
57
|`mock`| none | a scripted test double |
55
58
@@ -63,8 +66,8 @@ needs it. Asking for `claude-cli` therefore does not require `langchain-openai`,
63
66
for `openrouter` does not require the Claude CLI to be installed. A missing optional
64
67
dependency fails for the backend that wanted it and nothing else.
65
68
66
-
`openrouter`, `openai`and `ollama` all speak the OpenAI wire format and share one base
67
-
class, so they behave identically on everything except money and routing: same
69
+
`openrouter`, `openai`, `novita`and `ollama` all speak the OpenAI wire format and share one
70
+
base class, so they behave identically on everything except money and routing: same
68
71
`bind_tools`, same `with_structured_output`, same streaming and async, same retry policy,
69
72
same usage envelope.
70
73
@@ -93,7 +96,7 @@ except UnknownBackendError as exc:
93
96
('openrouter', 'openai/gpt-4o-mini:floor')
94
97
('claude-cli', 'anthropic/claude-haiku-4.5')
95
98
('openai', 'gpt-4o-mini')
96
-
UnknownBackendError: unknown backend 'opnerouter' in spec 'opnerouter/openai/gpt-4o-mini'; expected one of: claude-cli, openrouter, openai, ollama, mock — or a bare model name for the claude-cli default
99
+
UnknownBackendError: unknown backend 'opnerouter' in spec 'opnerouter/openai/gpt-4o-mini'; expected one of: claude-cli, openrouter, openai, novita, ollama, mock — or a bare model name for the claude-cli default
97
100
```
98
101
99
102
Only the first segment is a backend, because OpenRouter model ids are themselves
@@ -122,16 +125,18 @@ model through the broker is still `openrouter/openai/gpt-4o-mini`.
0 commit comments