Skip to content

feat: add Novita AI as optional LLM provider#224

Open
Alex-wuhu wants to merge 2 commits intoruvnet:mainfrom
Alex-wuhu:novita-integration
Open

feat: add Novita AI as optional LLM provider#224
Alex-wuhu wants to merge 2 commits intoruvnet:mainfrom
Alex-wuhu:novita-integration

Conversation

@Alex-wuhu
Copy link

What this PR does

Adds Novita AI as an optional, drop-in replacement for existing cloud providers in ruvbot.

Usage: Set NOVITA_API_KEY in your environment (optionally NOVITA_MODEL) and ruvbot will 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.2
  • minimax-minimax-m2.5
  • zai-org-glm-5

Changes

  • npm/packages/ruvbot/src/integration/providers/NovitaProvider.ts
    • Added a new NovitaProvider class implementing the existing LLMProvider interface.
    • Uses OpenAI SDK client configured with baseURL: https://api.novita.ai/openai.
    • Implements complete, stream, countTokens, getModel, and isHealthy in the same provider pattern as existing providers.
  • npm/packages/ruvbot/src/integration/providers/index.ts
    • Exported NovitaProvider and createNovitaProvider.
  • npm/packages/ruvbot/src/core/BotConfig.ts
    • Extended llm.provider enum with novita.
    • Added env-based auto-config path for NOVITA_API_KEY/NOVITA_MODEL and default Novita endpoint.
  • npm/packages/ruvbot/src/core/types.ts
    • Extended LLMProvider union with novita.
  • npm/packages/ruvbot/src/RuvBot.ts
    • Wired provider initialization for NOVITA_API_KEY using createNovitaProvider.
    • Updated missing-config warning/help text to include Novita.
  • npm/packages/ruvbot/src/server.ts
    • Added Novita key detection in status endpoint and provider reporting.
  • npm/packages/ruvbot/src/api/public/index.html
    • Updated UI warning message to include NOVITA_API_KEY.
  • npm/packages/ruvbot/.env.example
    • Added NOVITA_API_KEY and NOVITA_MODEL examples.
  • npm/packages/ruvbot/README.md
    • Added Novita env configuration example and troubleshooting note.
  • npm/packages/ruvbot/package.json
    • Added openai dependency for the new provider implementation.
  • Kept corresponding source parity updates for existing checked-in JS/d.ts artifacts:
    • npm/packages/ruvbot/src/RuvBot.js
    • npm/packages/ruvbot/src/server.js
    • npm/packages/ruvbot/src/core/BotConfig.js
    • npm/packages/ruvbot/src/core/BotConfig.d.ts
    • npm/packages/ruvbot/src/core/types.d.ts
Integration analysis
  • Architecture: multi_provider
  • Pattern reference: npm/packages/ruvbot/src/integration/providers/OpenRouterProvider.ts and npm/packages/ruvbot/src/integration/providers/index.ts
  • Pattern followed: true
  • Deviations: none
  • Concerns: npm run typecheck could not be fully executed in this environment because tsc is not installed (sh: 1: tsc: not found).

Testing

  • Attempted: npm run -s typecheck in npm/packages/ruvbot
  • Result: sh: 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_KEY is set.

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.
@Alex-wuhu Alex-wuhu marked this pull request as ready for review March 3, 2026 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant