feat(providers): add Novita AI preset - #1318
Conversation
📝 WalkthroughWalkthroughThe PR adds Novita AI as an OpenAI-compatible provider with live model discovery, filtered chat-model support, conservative capabilities, validation rules, tests, registry parity, and synchronized multilingual documentation. ChangesNovita AI provider
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related issues
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/providers/registry.ts`:
- Around line 1649-1652: Remove parallelToolCalls: false from the Novita
provider configuration in src/providers/registry.ts lines 1649-1652 so the
adapter omits parallel_tool_calls. Update the request assertion in
tests/novita-provider.test.ts lines 177-200 to verify the property is absent,
and ensure docs-site/src/content/docs/reference/adapters.md reflects that
unsupported parallel-tool options are omitted from generated requests.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: e3d4af54-b2ae-4072-85af-2ad5ad16e607
📒 Files selected for processing (14)
docs-site/src/content/docs/getting-started/quickstart.mddocs-site/src/content/docs/guides/providers.mddocs-site/src/content/docs/ja/getting-started/quickstart.mddocs-site/src/content/docs/ja/guides/providers.mddocs-site/src/content/docs/ko/getting-started/quickstart.mddocs-site/src/content/docs/ko/guides/providers.mddocs-site/src/content/docs/ru/getting-started/quickstart.mddocs-site/src/content/docs/ru/guides/providers.mddocs-site/src/content/docs/zh-cn/getting-started/quickstart.mddocs-site/src/content/docs/zh-cn/guides/providers.mdsrc/providers/registry.tstests/fixtures/novita-models.jsontests/novita-provider.test.tstests/provider-registry-parity.test.ts
Wibias
left a comment
There was a problem hiding this comment.
Maintainer + security review verdict: REQUEST CHANGES.
I reviewed the registry/discovery contract, request shape, credential destination and collision behavior, model admission/filtering, bounds, fixtures/tests, the earlier #747 evidence concern, current upstream documentation, current CodeRabbit thread, CI state, and current dev.
Security/evidence assessment: the implementation is conservative in the right places. apiKeyValidation: "unknown" avoids treating the currently public catalog as proof of key validity; exact transport matching plus preserveCustomDestination prevents silent credential retargeting; discovery is bounded before catalog admission; and the chat+endpoint predicates fail closed. Current Novita first-party docs explicitly document the OpenAI-compatible chat and Bearer-authenticated model-list contracts. The Aug 5, 2026 ToS now explicitly covers AI inference APIs and underlying Model Providers, and Hugging Face currently lists Novita as an Inference Providers partner for chat/VLM routing. Combined with the operator records supplied in the PR, I consider the prior evidence gap materially addressed for maintainer review.
I also independently rechecked the unresolved CodeRabbit parallel_tool_calls finding and resolved it as a false positive. The repository's later authoritative parallel-tools contract makes openai-chat default-on and explicitly defines parallelToolCalls: false as the per-provider opt-out; the adapter is therefore supposed to serialize parallel_tool_calls: false. Removing it would enable the capability by default, the opposite of this PR's conservative intent.
Blocking changes:
- Rebase onto current
devand rerun CI. This head is ~53devcommits behind. The branch needs current integration validation before a credential-destination preset can be approved. - Fix the standalone provider counts. Current
devdocuments 76 total / 64 key presets; this one-provider PR changes all locales to 79 / 67. Merged alone, that is wrong by two providers. Update counts to the actual post-rebase/post-merge state or handle the three provider PRs sequentially. - Get actual GitHub CI on the rebased head. The current head's Cross-platform CI / React Doctor runs are
action_required; there is no executed green GitHub CI result ford8b055acto satisfy maintainer merge policy. Local verification is useful but not a substitute for required current-head CI.
I found no additional production leak/security blocker in the code itself. Re-request review once the branch is current, counts are correct, and CI has actually run green.
Summary
novitaAPI-key preset for the fixed OpenAI-compatible Chat Completions hostmodel_type: chatand thechat/completionsendpointreasoning_effortRelates to #572. This PR intentionally does not close the umbrella issue.
Why the previous evidence blocker changed
Novita was removed from the earlier #747 batch because the then-current legal page did not establish the inference-API contract or operating entity strongly enough. The primary-source record materially changed after that review:
6475302.This evidence is intentionally exposed for maintainer/security judgment rather than presented as a silent assumption.
Maintainer: @olddonkey. No affiliation with Novita AI or Hivemind Labs, Inc.
Canonical API evidence
Primary sources checked 2026-08-08:
POST https://api.novita.ai/openai/v1/chat/completions, streaming, tools, and structured outputGET https://api.novita.ai/openai/v1/modelswith Bearer authenticationA read-only live probe on 2026-08-08 found:
/openai/v1/models: HTTP 200 without credentials, 170,867 bytes, 146 rowsmodel_type: chatandendpointscontainingchat/completionsfunction-calling; capability claims therefore remain per-model/v1/models: HTTP 404, so the preset follows the endpoint-specific List Models reference rather than the overview page's stale shortcutBecause the catalog currently succeeds without authentication,
apiKeyValidationis deliberatelyunknown. Runtime inference still sends the configured Bearer key only to a transport matching the canonical preset.Security and behavior
preserveCustomDestination; older same-named custom destinations/adapters keep their own routing and inherit no registry discovery policyconfig.jsonor the key-login mapreasoning_effortThis is a credential-destination change and explicitly requests maintainer security review, including confirmation that the updated operator and routing evidence satisfies
MAINTAINERS.md.Verification
bun test tests/novita-provider.test.ts tests/provider-registry-parity.test.ts tests/provider-model-discovery-contract.test.ts— 67 pass, 0 failbun run typecheckbun run privacy:scanbun run test— 10,061 pass, 7 skip, 0 failgit diff --checkNo GUI source changed, so there is no screenshot.
Review readiness
d8b055ac: focused tests, typecheck, privacy scan, docs build, and the full suite all passed.devcommit available when this checklist was completed (f310cc20).Summary by CodeRabbit
New Features
Documentation
Tests