feat: add Novita AI as a built-in LLM provider#243
Open
Alex-wuhu wants to merge 6 commits intoTinyAGI:mainfrom
Open
feat: add Novita AI as a built-in LLM provider#243Alex-wuhu wants to merge 6 commits intoTinyAGI:mainfrom
Alex-wuhu wants to merge 6 commits intoTinyAGI:mainfrom
Conversation
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
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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):
moonshotai/kimi-k2.5zai-org/glm-5minimax/minimax-m2.5Configuration
Or set the
NOVITA_API_KEYenvironment variable — the provider picks it up automatically.CLI
Changes
packages/core/src/types.ts— addnovitatoSettings.models; add model aliases toMODEL_ALIASESpackages/core/src/config.ts— auto-detect novita from settings; default model ingetDefaultAgentFromModelspackages/core/src/invoke.ts— injectOPENAI_API_KEY+OPENAI_BASE_URLfor novita, route through codex harnesspackages/cli/src/shared.ts— add novita toproviderOptions(), addnovitaModelOptions(), wire intopromptModel()packages/cli/src/provider.ts— accept novita in CLI dispatch; provider-appropriate hints; genericmodelSectionlookup