Skip to content

feat: add Novita AI as a built-in LLM provider#243

Open
Alex-wuhu wants to merge 6 commits intoTinyAGI:mainfrom
Alex-wuhu:novita-integration
Open

feat: add Novita AI as a built-in LLM provider#243
Alex-wuhu wants to merge 6 commits intoTinyAGI:mainfrom
Alex-wuhu:novita-integration

Conversation

@Alex-wuhu
Copy link

Summary

Adds Novita AI as a first-class provider alongside Anthropic, OpenAI, and OpenCode.

Novita exposes an OpenAI-compatible API, so this integration reuses the existing codex harness with a custom OPENAI_BASE_URL. No new CLI dependency is required.

Supported models (from Novita's catalog):

Model ID Notes
moonshotai/kimi-k2.5 Default — 262k context, function calling, vision
zai-org/glm-5 202k context, function calling
minimax/minimax-m2.5 204k context, function calling

Configuration

// ~/.tinyagi/settings.json
{
  "models": {
    "provider": "novita",
    "novita": {
      "model": "moonshotai/kimi-k2.5",
      "auth_token": "<NOVITA_API_KEY>"
    }
  }
}

Or set the NOVITA_API_KEY environment variable — the provider picks it up automatically.

CLI

tinyagi provider novita --model moonshotai/kimi-k2.5 --auth-token <key>

Changes

  • packages/core/src/types.ts — add novita to Settings.models; add model aliases to MODEL_ALIASES
  • packages/core/src/config.ts — auto-detect novita from settings; default model in getDefaultAgentFromModels
  • packages/core/src/invoke.ts — inject OPENAI_API_KEY + OPENAI_BASE_URL for novita, route through codex harness
  • packages/cli/src/shared.ts — add novita to providerOptions(), add novitaModelOptions(), wire into promptModel()
  • packages/cli/src/provider.ts — accept novita in CLI dispatch; provider-appropriate hints; generic modelSection lookup

Add Novita AI (https://novita.ai) as a first-class provider alongside
Anthropic, OpenAI, and OpenCode. Novita exposes an OpenAI-compatible
API so it reuses the existing codex harness with a custom base URL.

Changes:
- types.ts: add novita section to Settings.models; add novita aliases
  (kimi → moonshotai/kimi-k2.5, glm → zai-org/glm-5,
   minimax → minimax/minimax-m2.5) to MODEL_ALIASES
- config.ts: auto-detect novita from settings; default model
  moonshotai/kimi-k2.5 in getDefaultAgentFromModels
- invoke.ts: inject OPENAI_API_KEY + OPENAI_BASE_URL for novita and
  route it through the codex harness; preserve model provider for alias
  resolution before the openai remap
- shared.ts: add novita to providerOptions(); add novitaModelOptions()
  with the three catalog models; wire into promptModel()
- provider.ts: accept novita in providerSet validation and CLI dispatch;
  show provider-appropriate hints; fix modelSection lookup to be
  provider-generic
- Add novita case to agentProvider() switch so tinyagi agent provider
  <id> novita works without manual settings.json edits
- Add novita to TinyOffice setup page: PROVIDERS list, MODELS map, and
  buildSettings() models block
- Add novita SelectItem and badge color to TinyOffice agents page
@Alex-wuhu Alex-wuhu marked this pull request as ready for review March 20, 2026 15:41
- setup-wizard: prompt for NOVITA_API_KEY during provider setup and
  persist it as settings.models.novita.auth_token so fresh installs
  work without requiring a pre-exported env var
- invoke: prefer NOVITA_API_KEY env var over stored auth_token so
  runtime credential rotation is effective immediately
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant