Skip to content

feat: add Novita AI as optional LLM provider#358

Open
Alex-wuhu wants to merge 5 commits intoNevaMind-AI:mainfrom
Alex-wuhu:novita-integration
Open

feat: add Novita AI as optional LLM provider#358
Alex-wuhu wants to merge 5 commits intoNevaMind-AI:mainfrom
Alex-wuhu:novita-integration

Conversation

@Alex-wuhu
Copy link
Copy Markdown

What this PR does

Adds Novita AI as an optional, OpenAI-compatible LLM provider.

Usage: Set NOVITA_API_KEY environment variable to use Novita instead of OpenAI.

Changes

  • Updated LLMConfig to auto-detect NOVITA_API_KEY
  • Added .env.example with Novita configuration

Testing

Set NOVITA_API_KEY=your-key and run the application.

Novita AI (https://novita.ai) provides an OpenAI-compatible API
with competitive pricing. Set NOVITA_API_KEY to use it.

Changes:
- Added Novita base_url support in LLMConfig
- Added .env.example with Novita configuration
- Replace buggy __init__ override with model_validator(mode='before')
- Fix provider routing logic (only auto-switch for 'openai' provider)
- Fix default config auto-detection
- Reduce secret exposure risk
- Remove env-based auto-detection (@model_validator mode=before)
- Add explicit provider='novita' handling in set_provider_defaults()
- Only override defaults when values are still OpenAI defaults
- Add NovitaBackend registration (LLM_BACKENDS + embedding map)
- Add regression tests following Grok test pattern
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