Skip to main content

Novita

The novita provider routes Promptfoo's OpenAI-compatible provider stack to Novita.

Setup

Set the NOVITA_API_KEY environment variable:

export NOVITA_API_KEY=your_api_key_here

You can also pass apiKey directly in provider configuration when needed.

Provider Formats

novita:<model_name> # chat provider shorthand
novita:chat:<model_name> # chat completions
novita:completion:<model_name> # text completions
novita:embedding:<model_name> # embeddings

The shorthand form defaults to chat mode.

Configuration

promptfooconfig.yaml
# yaml-language-server: $schema=https://promptfoo.dev/config-schema.json
providers:
- id: novita:chat:meta-llama/llama-3.3-70b-instruct
config:
temperature: 0.7
max_tokens: 512

prompts:
- 'Explain {{topic}} in one paragraph.'

tests:
- vars:
topic: retrieval augmented generation

Standard OpenAI-compatible provider options such as temperature, max_tokens, and top_p are forwarded through the shared provider implementation. Promptfoo uses Novita's documented https://api.novita.ai/openai/v1 base URL by default. For an OpenAI-compatible proxy or test server, set apiBaseUrl explicitly:

providers:
- id: novita:chat:meta-llama/llama-3.3-70b-instruct
config:
apiBaseUrl: https://my-proxy.example.com/openai/v1
apiKeyEnvar: MY_NOVITA_PROXY_KEY

For the API contract and available models, see Novita's chat completion API, completion API, embeddings API, and list models API.

Example

Initialize the bundled example:

npx promptfoo@latest init --example provider-novita

The example checks a short factual response from a Novita chat model and is a good starting point for local smoke testing.