Skip to content

Add Novita LLM and Embedding Provider#4280

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

Add Novita LLM and Embedding Provider#4280
Alex-wuhu wants to merge 2 commits intomem0ai:mainfrom
Alex-wuhu:novita-integration

Conversation

@Alex-wuhu
Copy link

@Alex-wuhu Alex-wuhu commented Mar 10, 2026

Summary

  • Adds novita provider support for both LLM and Embedding.
  • Aligns Novita provider behavior with existing OpenAI-compatible providers.
  • Uses OpenAI-compatible Novita endpoint: https://api.novita.ai/openai.
  • Supports NOVITA_API_KEY authentication.

Key Fixes (follow-up)

  • LLM default model updated to deepseek/deepseek-v3.2 (Novita rule).
  • Added response_format pass-through in NovitaLLM.generate_response.
  • Added response_callback support in Novita LLM config/runtime (parity with OpenAI provider).
  • LLM env var handling aligned with embedding side:
    • prefer NOVITA_API_URL
    • keep NOVITA_API_BASE for compatibility with deprecation warning.
  • Unified http_client_proxies typing in Novita configs.
  • Embedding default model updated to qwen/qwen3-embedding-0.6b with default dimensions 1024.

Files Changed

  • mem0/llms/novita.py
  • mem0/embeddings/novita.py
  • mem0/configs/llms/novita.py
  • mem0/configs/embeddings/novita.py
  • tests/llms/test_novita.py
  • tests/embeddings/test_novita_embeddings.py

Verification

  • uv run --with pytest python -m pytest -q tests/llms/test_novita.py tests/embeddings/test_novita_embeddings.py
  • Result: all tests passed.

- Add NovitaLLM and NovitaEmbedding classes
- Add NovitaConfig and NovitaEmbeddingConfig classes
- Register 'novita' provider in LlmFactory and EmbedderFactory
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link

@MontaEllis8 MontaEllis8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Code Review 通过

代码审查通过,建议合并。

@Alex-wuhu Alex-wuhu force-pushed the novita-integration branch from be6e59c to 4a8f7ff Compare March 11, 2026 04:11
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.

3 participants