> ## Documentation Index
> Fetch the complete documentation index at: https://docs.standardagentbuilder.com/llms.txt
> Use this file to discover all available pages before exploring further.

# @standardagents/novita

> Novita AI provider package for Standard Agents using Novita's OpenAI-compatible Chat Completions API

<Info>
  **Enabled when** `NOVITA_API_KEY` is set in your environment.
</Info>

## Overview

The `@standardagents/novita` package provides a Novita AI provider factory for Standard Agents. It targets Novita's OpenAI-compatible Chat Completions API and adds typed `providerOptions`, authenticated model discovery, request inspection, tool calling, streaming, structured outputs, and live catalog pricing.

<Card title="Key Features" icon="zap">
  * Direct integration with `https://api.novita.ai/openai/v1/chat/completions`
  * Live model discovery from `https://api.novita.ai/openai/v1/models`
  * Tool calling, structured outputs, streaming, and reasoning controls
  * Catalog price normalization into `inputPrice`, `outputPrice`, `cachedPrice`, and `usage.pricing`
</Card>

## Installation

```bash npm theme={null}
npm install @standardagents/novita
```

```bash pnpm theme={null}
pnpm add @standardagents/novita
```

```bash yarn theme={null}
yarn add @standardagents/novita
```

## Quick Start

```typescript agents/models/novita_reasoning.ts theme={null}
import { defineModel } from '@standardagents/spec';
import { novita } from '@standardagents/novita';

export default defineModel({
  name: 'novita-reasoning',
  provider: novita,
  model: 'deepseek/deepseek-v3.2',
});
```

## Provider Options

```typescript theme={null}
import { defineModel } from '@standardagents/spec';
import { novita } from '@standardagents/novita';

export default defineModel({
  name: 'novita-agentic',
  provider: novita,
  model: 'zai-org/glm-5.2',
  providerOptions: {
    seed: 42,
    top_k: 40,
    separate_reasoning: true,
    enable_thinking: true,
  },
});
```

### Available Options

| Option               | Type                     | Description                                                     |
| -------------------- | ------------------------ | --------------------------------------------------------------- |
| `seed`               | `number`                 | Best-effort deterministic sampling seed                         |
| `frequency_penalty`  | `number`                 | Penalize repeated tokens based on frequency                     |
| `presence_penalty`   | `number`                 | Penalize repeated tokens based on presence                      |
| `repetition_penalty` | `number`                 | Novita repetition penalty                                       |
| `top_k`              | `number`                 | Top-k sampling limit                                            |
| `min_p`              | `number`                 | Minimum probability threshold relative to the most likely token |
| `logit_bias`         | `Record<string, number>` | Token logit biases                                              |
| `logprobs`           | `boolean`                | Return output token log probabilities                           |
| `top_logprobs`       | `number`                 | Number of top logprobs to return                                |
| `separate_reasoning` | `boolean`                | Request reasoning content separately when supported             |
| `enable_thinking`    | `boolean`                | Enable or disable model thinking when supported                 |
| `modalities`         | `string[]`               | Output modalities for models that can return audio              |

The schema is passthrough, so newly documented Novita fields can be supplied before this package adds first-class typings.

## Model IDs

Novita model IDs are sent directly, for example:

* `zai-org/glm-5.2`
* `moonshotai/kimi-k2.7-code`
* `minimax/minimax-m3`
* `deepseek/deepseek-v4-pro`
* `deepseek/deepseek-v4-flash`
* `deepseek/deepseek-v3.2`

The provider reads authenticated model metadata from `https://api.novita.ai/openai/v1/models` and exposes those models in the Standard Agents UI.

Novita reports catalog prices as scaled integers. The provider normalizes those values to USD per 1M tokens before returning `inputPrice`, `outputPrice`, `cachedPrice`, and per-request `usage.pricing`.

When Novita includes `pricing.input_cache_read.price_per_m`, the provider maps it to `usage.pricing.cachedInputPerMillion` and uses it for `prompt_tokens_details.cached_tokens`. Cache write tokens remain normal prompt input tokens and are priced at the standard input rate.

Custom or private Novita models should still set `inputPrice`, `outputPrice`, and `cachedPrice` explicitly if they do not appear in Novita's model catalog.

## Environment Setup

```bash .dev.vars theme={null}
NOVITA_API_KEY=...
```

For Cloudflare Workers:

```bash theme={null}
wrangler secret put NOVITA_API_KEY
```

## Notes

* The provider uses Chat Completions, not OpenAI Responses.
* Novita's model catalog requires authentication.
* `reasoning.level` automatically enables `separate_reasoning` and `enable_thinking`; set provider options directly when you need model-specific control.
* For custom base URLs, configure the provider `baseUrl` slot with the full OpenAI-compatible base, such as `https://api.novita.ai/openai/v1`.

## Related

<CardGroup cols={2}>
  <Card title="Models" icon="brain" href="/core-concepts/models">
    Core model concepts
  </Card>

  <Card title="Cerebras Provider" icon="zap" href="/providers/cerebras">
    Compare another Chat Completions provider
  </Card>

  <Card title="OpenRouter Provider" icon="route" href="/providers/openrouter">
    Compare with a multi-provider gateway
  </Card>
</CardGroup>
