feat: add Novita AI as optional LLM provider#224
Open
Alex-wuhu wants to merge 2 commits intoruvnet:mainfrom
Open
feat: add Novita AI as optional LLM provider#224Alex-wuhu wants to merge 2 commits intoruvnet:mainfrom
Alex-wuhu wants to merge 2 commits intoruvnet:mainfrom
Conversation
Adds Novita AI (https://novita.ai) as a drop-in OpenAI-compatible provider. Set NOVITA_API_KEY to use Novita instead of OpenAI — no other code changes needed. Novita offers competitive pricing with full OpenAI API compatibility.
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.
What this PR does
Adds Novita AI as an optional, drop-in replacement for existing cloud providers in
ruvbot.Usage: Set
NOVITA_API_KEYin your environment (optionallyNOVITA_MODEL) andruvbotwill route through Novita's OpenAI-compatible endpoint.This integration uses the OpenAI SDK with Novita's endpoint (
https://api.novita.ai/openai) and supports:deepseek/deepseek-v3.2minimax-minimax-m2.5zai-org-glm-5Changes
npm/packages/ruvbot/src/integration/providers/NovitaProvider.tsNovitaProviderclass implementing the existingLLMProviderinterface.baseURL: https://api.novita.ai/openai.complete,stream,countTokens,getModel, andisHealthyin the same provider pattern as existing providers.npm/packages/ruvbot/src/integration/providers/index.tsNovitaProviderandcreateNovitaProvider.npm/packages/ruvbot/src/core/BotConfig.tsllm.providerenum withnovita.NOVITA_API_KEY/NOVITA_MODELand default Novita endpoint.npm/packages/ruvbot/src/core/types.tsLLMProviderunion withnovita.npm/packages/ruvbot/src/RuvBot.tsNOVITA_API_KEYusingcreateNovitaProvider.npm/packages/ruvbot/src/server.tsnpm/packages/ruvbot/src/api/public/index.htmlNOVITA_API_KEY.npm/packages/ruvbot/.env.exampleNOVITA_API_KEYandNOVITA_MODELexamples.npm/packages/ruvbot/README.mdnpm/packages/ruvbot/package.jsonopenaidependency for the new provider implementation.npm/packages/ruvbot/src/RuvBot.jsnpm/packages/ruvbot/src/server.jsnpm/packages/ruvbot/src/core/BotConfig.jsnpm/packages/ruvbot/src/core/BotConfig.d.tsnpm/packages/ruvbot/src/core/types.d.tsIntegration analysis
multi_providernpm/packages/ruvbot/src/integration/providers/OpenRouterProvider.tsandnpm/packages/ruvbot/src/integration/providers/index.tstruenpm run typecheckcould not be fully executed in this environment becausetscis not installed (sh: 1: tsc: not found).Testing
npm run -s typecheckinnpm/packages/ruvbotsh: 1: tsc: not found(toolchain missing in this environment)Runtime behavior is structured to be backward-compatible: existing Anthropic/OpenRouter/Google paths are unchanged unless
NOVITA_API_KEYis set.