feat: add Novita AI as declarative provider#8432
feat: add Novita AI as declarative provider#8432Alex-wuhu wants to merge 3 commits intoaaif-goose:mainfrom
Conversation
Add Novita AI (https://novita.ai) as a new declarative LLM provider. Novita offers an OpenAI-compatible API with 90+ open-source models including Kimi K2.5, DeepSeek V3.2/R1, GLM-5, MiniMax M2.5, and Qwen3 Coder. - Add novita.json declarative provider config - Add Novita AI section to providers documentation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Alex-wuhu <yanglongwei06@gmail.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ed69885a5c
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| "display_name": "Novita AI", | ||
| "description": "90+ open-source models with OpenAI-compatible API and competitive pricing", | ||
| "api_key_env": "NOVITA_API_KEY", | ||
| "base_url": "https://api.novita.ai/openai", |
There was a problem hiding this comment.
Use Novita chat-completions endpoint path
With the current OpenAI-compatible loader, this base_url is split into host https://api.novita.ai and request path openai, so chat calls are sent to POST /openai (not a .../chat/completions route). In OpenAiProvider::from_custom_config/stream, non-empty custom paths are treated as final request paths, so Novita requests will fail unless that root path is itself a completions endpoint. Set this to the actual chat-completions URL (or provide base_path) so requests hit the correct route.
Useful? React with 👍 / 👎.
| "max_tokens": 65536 | ||
| }, | ||
| { | ||
| "name": "meta-llama/llama-4-maverick-17b-128e-instruct", |
There was a problem hiding this comment.
Use a valid Novita model identifier
This model name does not match the bundled Novita canonical catalog, which only includes meta-llama/llama-4-maverick-17b-128e-instruct-fp8 for novita-ai. Because goose forwards the selected model string directly to the provider, choosing this entry can produce invalid-model errors and skip canonical limit mapping for this model. Replace it with the provider’s exact model ID.
Useful? React with 👍 / 👎.
… deepseek-v3.2, gemma-4 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Alex-wuhu <yanglongwei06@gmail.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9d8039eb67
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
Hi @Alex-wuhu I would take a look and address the codex review comments, as they seem like they may be correct You can also test this with a local copy of goose and verify it works
|
Thanks! checking |
- Fix base_url to use full chat completions path (https://api.novita.ai/openai/chat/completions) so requests hit the correct endpoint instead of bare /openai - Add "novita" => "novita-ai" mapping in map_provider_name() to enable canonical model lookup for pricing and limits
|
Hi @alexhancock, thanks for the review! I've addressed all the Codex feedback: [P1] base_url fix: Changed from [P2] Provider name mapping: Added [P2] Model name: The Testing done:
|
Summary
novita.json)Models included
Configuration
Endpoint:
https://api.novita.ai/openaiTest plan
goose configurelists Novita AI as a provider optionNOVITA_API_KEYmoonshotai/kimi-k2.5model