Use Nivana in LiteLLM

LiteLLM puts many providers behind one interface. Add Nivana as an OpenAI-compatible provider and one entry gives you routing across every model Nivana measures.

What you need

  • A Nivana API key: sign in, open the account menu and choose API keys. New accounts get 2,000 free credits.
  • The base URL https://nivana.one/v1 and the model name nivana/auto (or nivana/quality, nivana/speed, nivana/cost to lean the router one way).

Set up LiteLLM

from litellm import completion
import os

res = completion(
    model="openai/nivana/auto",
    api_base="https://nivana.one/v1",
    api_key=os.environ["NIVANA_API_KEY"],
    messages=[{"role": "user", "content": "Summarise CRDTs in one paragraph."}],
)
print(res.model, res.choices[0].message.content)

For the proxy, add a model_list entry:

model_list:
  - model_name: nivana
    litellm_params:
      model: openai/nivana/auto
      api_base: https://nivana.one/v1
      api_key: os.environ/NIVANA_API_KEY

Limits

Tool calling works: the client’s tools are passed to the routed model, which can call them, and each step is routed on its own. JSON mode and sampling parameters (temperature, max tokens) are ignored, Nivana’s own web search is off when the client sends tools, and very long tool histories are not summarised, so a request larger than every model’s context window fails.

Every response’s model field names the model that actually answered. See the OpenAI-compatible endpoint and how routing works.