Add Novita AI provider support#696
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (46)
📝 WalkthroughWalkthroughAdds Novita AI as a fully supported LLM provider end-to-end: a new model registry ( ChangesNovita AI Provider Integration
Sequence Diagram(s)sequenceDiagram
participant User
participant ApiOptions as ApiOptions.tsx
participant NovitaComp as Novita.tsx
participant validate as validate.ts
participant buildApiHandler as buildApiHandler
participant NovitaHandler
participant OpenAICompatible as OpenAICompatibleHandler
User->>ApiOptions: select provider "novita"
ApiOptions->>NovitaComp: render with apiConfiguration
NovitaComp->>NovitaComp: render novitaBaseUrl + novitaApiKey fields
User->>NovitaComp: enter API key
NovitaComp->>validate: validateApiConfigurationExcludingModelErrors
validate->>validate: check novitaApiKey present
validate-->>NovitaComp: undefined (valid) or apiKey error
User->>buildApiHandler: start task with apiProvider="novita"
buildApiHandler->>NovitaHandler: new NovitaHandler(options)
NovitaHandler->>NovitaHandler: resolve modelId, build OpenAICompatibleConfig
NovitaHandler->>OpenAICompatible: super(config) → api.novita.ai/openai
OpenAICompatible-->>NovitaHandler: ready
NovitaHandler-->>User: streaming response
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
✨ 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 |
|
Closing in favor of a PR from the Alex-yang00 fork. |
|
Closing in favor of #697 from the Alex-yang00 fork. |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Summary
--provider novitaandNOVITA_API_KEYTesting
git diff --checkvitest packages/types/src/__tests__/provider-settings.test.tsvitest apps/cli/src/lib/utils/__tests__/provider.test.tsvitest webview-ui/src/utils/__tests__/validate.spec.tsvitest src/shared/__tests__/ProfileValidator.spec.ts src/api/providers/__tests__/novita.spec.tstsc -p apps/vscode-e2e/tsconfig.esm.json --noEmitmoonshotai/kimi-k2.7-codeSummary by CodeRabbit
New Features
Documentation
Tests