-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
claudeCreated or actioned by Claude AICreated or actioned by Claude AIupstream-syncIssues for syncing updates with our upstream (cocoindex-io/cocoindex)Issues for syncing updates with our upstream (cocoindex-io/cocoindex)
Description
Upstream Change Summary
Type: new-feature
Difficulty: Easy
Recommendation: Adopt
Upstream PR #1781 adds Novita AI as a new LLM provider using the OpenAI-compatible API at https://api.novita.ai/openai/v1. The implementation follows the same pattern as other OpenAI-compatible providers (LiteLLM, vLLM) and supports both text generation and embeddings. Authentication is via NOVITA_API_KEY environment variable or constructor parameter.
This change adds a new variant to the LlmApiType enum in Rust and a corresponding novita.rs client module wired into the generation and embedding client factories.
Upstream References
- PR: feat: add Novita AI as LLM provider cocoindex-io/cocoindex#1781
- Commit: cocoindex-io/cocoindex@3a618c9
- Upstream repo: https://github.com/cocoindex-io/cocoindex
Relevant Upstream Files / Areas
rust/cocoindex/src/llm/mod.rs→crates/recoco/src/llm/mod.rs(LlmApiType enum, factory wiring)rust/cocoindex/src/llm/novita.rs→crates/recoco/src/llm/novita.rs(new client module)
Recoco Considerations
- Affected modules:
crates/recocoLLM module (used byfunction-embedandfunction-extract-llm) - Feature-gating: Should be gated behind the same feature flag as other OpenAI-compatible providers (e.g.,
function-embedor a newllm-novitagate if desired for fine-grained control) - API surface:
LlmApiTypeenum gains aNovitavariant — this is a non-breaking additive change to recoco's public API - No Python to exclude: The upstream change is entirely in
rust/cocoindex/src/llm/ - Environment variable:
NOVITA_API_KEYfollows established*_API_KEYpattern already used by other providers
Integration Notes
Pattern is identical to LiteLLM/vLLM adapters. Once the novita.rs module is created with the correct base URL (https://api.novita.ai/openai/v1), the main work is:
- Adding
NovitatoLlmApiType - Wiring it into
generation_client_factoryandembedding_client_factoryinllm/mod.rs - Adding appropriate feature gate and dependency (reqwest or existing HTTP client)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
claudeCreated or actioned by Claude AICreated or actioned by Claude AIupstream-syncIssues for syncing updates with our upstream (cocoindex-io/cocoindex)Issues for syncing updates with our upstream (cocoindex-io/cocoindex)