Onyx को एक custom OpenAI-compatible LLM provider पर चलाएं।

Updated 2026-07-29

Onyx अपने admin panel में एक Add Custom LLM Provider flow ship करता है: Provider Name को openai set करें, Base URL को https://api.apisrouter.com/v1 पर point करें, अपने model ids add करें, और workspace chat व assistants एक key के पीछे हर catalog model के साथ gateway के through जवाब देते हैं।

Quick answer: admin panel में Add Custom LLM Provider।

Onyx की documentation explicit है कि एक custom provider तब तक काम करता है जब तक यह OpenAI-compatible endpoints expose करे, और इसका example Base URL shape exactly एक gateway-style https://yourprovider.com/v1 है। Flow: अपने profile icon से Admin Panel खोलें, Configuration पर जाएं, फिर Language Models, और Add Custom LLM Provider चुनें। उस form में चार decisions matter करती हैं। Display Name cosmetic है। Provider Name एक LiteLLM provider key से match होना चाहिए, क्योंकि Onyx model calls को underneath LiteLLM के through route करता है; एक OpenAI-compatible gateway के लिए वह openai है। Base URL /v1 suffix सहित gateway endpoint है। और Model Configurations section वह जगह है जहां आप हर model id register करते हैं जो available चाहिए, exactly वैसे spell की गई जैसे catalog serve करता है। Save करें, एक default चुनें, और chats तुरंत gateway के through route होती हैं।

Admin Panel -> Configuration -> Language Models
  -> Add Custom LLM Provider

Display Name:   APIsRouter
Provider Name:  openai            (LiteLLM provider key)
Base URL:       https://api.apisrouter.com/v1
API Key:        sk-YOUR-APISROUTER-KEY
Model Configurations:
  claude-sonnet-4-6
  claude-haiku-4-5-20251001
  deepseek-v4-pro

Onyx के architecture में LLM कहां बैठता है।

Onyx (GitHub पर onyx-dot-app, लगभग 31K stars, पहले Danswer) company knowledge के लिए एक open-source AI platform है: यह Slack, Google Drive, Confluence, और दर्जनों दूसरे connectors जैसे sources index करता है, फिर एक chat UI, assistants, और agent workflows के through उन पर सवालों के जवाब देता है। यह सबसे ज़्यादा deployed self-hosted enterprise search stacks में से एक है, यही exactly वजह है कि इसका LLM bill एक default की बजाय एक routing decision का हक कमाता है। Pipeline साफ तौर पर दो हिस्सों में split होता है। Indexing और retrieval, document embedding और reranking शामिल, Onyx के अपने model server पर default रूप से local models से चलते हैं; इनमें से कुछ भी आपके LLM provider को नहीं छूता। Answer generation दूसरा आधा हिस्सा है: एक बार retrieval relevant passages assemble कर ले, एक LLM उन्हें पढ़ता है और grounded response लिखता है, और वह call LiteLLM के through उस provider पर जाती है जो admin ने configure किया। Custom provider flow exactly इसी आधे हिस्से की destination बदलता है। चूंकि LiteLLM model id को एक openai-type provider को एक plain string के तौर पर forward करता है, Model Configurations में register की गई ids Base URL के पीछे वाला endpoint जो भी serve करे वह हो सकती हैं: careful grounded answers के लिए Claude, volume के लिए DeepSeek, बहुत लंबे source contexts के लिए Gemini। अलग-अलग assistants अलग-अलग models पर default कर सकते हैं, तो एक support assistant और एक engineering assistant same provider entry के through अलग-अलग price points पर चल सकते हैं।

पूरा setup, और जो untouched रहता है।

Provider form ही पूरा integration है; इसके लिए कोई config file edit या container rebuild नहीं करना पड़ता। Save करने के बाद, workspace के लिए default model set करें, और optionally जहां आप अलग quality tiers चाहें वहां per assistant model override करें। जो जानबूझकर untouched रहता है: connectors अपनी credentials रखते हैं, index affected नहीं होता, और search के लिए configured embedding model move नहीं होता। यह separation बताने लायक है क्योंकि यह इसे एक low-risk change बनाती है। अगर gateway misbehave करे, search और sources तब भी काम करते रहेंगे; सिर्फ answer generation error देगा, और default को पिछले provider पर वापस switch करना एक dropdown है। Teams जो deployments automate करती हैं उनके लिए, same provider definition Onyx के API के through भी seed किया जा सकता है UI के through click करने की बजाय, लेकिन admin panel path documented और stable surface है, और one-time setup शायद ही इससे ज़्यादा justify करे।

# confirm the gateway lists the ids you plan to register
curl -s https://api.apisrouter.com/v1/models \
  -H "Authorization: Bearer $APISROUTER_API_KEY" | head -50

# confirm a chat completion works end to end
curl -s https://api.apisrouter.com/v1/chat/completions \
  -H "Authorization: Bearer $APISROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"claude-sonnet-4-6",
       "messages":[{"role":"user","content":"ping"}]}'

Grounded enterprise answers के लिए models चुनना।

Onyx के अंदर model evaluation असामान्य रूप से concrete है: same connectors के against अलग-अलग assistant defaults के साथ same question पूछें और compare करें कौन-सा answer सही passages cite करता है। Per-key usage log आपके असली question mix पर दोनों candidates की price करता है।

  • Grounded answering input-heavy है: model retrieved passages पढ़ता है जो इसके लिखे answer से कहीं बड़े होते हैं। Per-input-token price इसलिए output price से ज़्यादा प्रति सवाल आपकी cost set करती है।
  • claude-sonnet-4-6 एक strong workspace default है: retrieved sources के अंदर रहने को लेकर disciplined और documents में न होने वाली policy invent करने के खिलाफ resistant।
  • High-traffic assistants (IT helpdesk, HR FAQ) claude-haiku-4-5-20251001 या deepseek-v4-pro पर अच्छे चलते हैं, जहां volume pricing per-seat cost को predictable रखती है।
  • लंबे source documents long-context ids को favour करते हैं; बड़े design docs या contracts context में लाने वाले assistants के लिए gemini-3.1-pro-preview test करने लायक है।
  • एक provider entry में कई ids register करें और per assistant assign करें। Quality tiers per team एक global compromise model से बेहतर हैं।

जितना उपयोग उतना भुगतान · आधिकारिक मूल्य से कम

Selected models are priced below official list prices. Exact input, output, cache, and per-request prices are shown for each model.

मॉडलआधिकारिक मूल्यहमारा मूल्य
Claude Sonnet 4.6$3.00 / $15.00 per M$2.40 / $12.00 per M
Claude Haiku 4.5 20251001$1.00 / $5.00 per M$0.80 / $4.00 per M
GPT-5.6 Terra$2.50 / $15.00 per M$2.00 / $12.00 per M
Gemini 3.1 Pro Preview$2.00 / $12.00 per M$1.60 / $9.60 per M
DeepSeek V4 Pro$0.43 / $0.87 per M$0.40 / $0.90 per M

Onyx के लिए specific failure modes।

Provider Name कोई free-text label नहीं है। इसे एक LiteLLM provider key से match होना चाहिए, और एक gateway के लिए वह key openai है। एक बनाया हुआ नाम request time पर एक LiteLLM provider error के साथ fail होता है चाहे form ठीक से save हुआ हो। Base URL को /v1 suffix चाहिए। Onyx की अपनी documentation /v1 पर ending वाले endpoint shapes दिखाती है; इसके बिना, chat-completions path गलत resolve होता है और requests gateway पर 404 देती हैं। Model ids Model Configurations में रहती हैं। जो model आपने वहां कभी register नहीं किया वह default के तौर पर select नहीं हो सकता, और एक registered id में typo save time पर नहीं बल्कि पहले use पर model-not-found error के तौर पर सामने आती है। Gateway की /v1/models listing authoritative spelling है। अगर आपके admin UI में custom-models form पर Base URL field missing है, आपने कुछ 2026 releases में एक reported UI regression हिट किया है, missing feature नहीं; upgrade करने से field वापस आ जाती है। और याद रखें आपने कौन-सा half move किया: अगर search results गलत या stale दिखें, वह indexing और connectors हैं, जो custom provider को कभी नहीं छूते। सिर्फ generated answers gateway के through route होते हैं।

कौन Onyx को एक gateway के through route करता है।

  • Self-hosted teams जो per-vendor accounts को एक endpoint, एक key, और per-key usage से replace कर रही हैं जो cleanly एक workspace या department से map होती है।
  • Enterprises जिन्होंने internal search के लिए Onyx standardize किया है और बिना अलग Anthropic billing relationship के Claude-quality grounded answers चाहती हैं।
  • Platform teams जो अलग-अलग quality tiers पर कई assistants चलाती हैं, एक provider पर registered model ids के through per assistant priced।
  • Evaluators जो identical corpora पर model families के across answer quality compare करते हैं, जहां हर candidate एक नया provider integration नहीं बल्कि एक registered id है।
  • Developers जिनके पास किसी given vendor की billing तक access नहीं है। बिना card requirement वाला top-up based access per-provider sign-up dependency हटा देता है।

Endpoint verify करें और पहली chat को debug करें।

ऊपर वाले दोनों curl checks form को छूने से पहले gateway वाला half cover करते हैं: जिन ids को register करने की योजना है वे /v1/models में दिखनी चाहिए, और एक direct chat completion को जवाब देना चाहिए। Onyx के अंदर, failures जल्दी localize होती हैं। LiteLLM का नाम लेने वाला एक provider error मतलब Provider Name valid key नहीं है; इसे openai set करें। पहली chat पर एक authentication error मतलब API Key Base URL वाले endpoint की नहीं है। एक model-not-found error Model Configurations और catalog के बीच एक id mismatch है। जो answers generate तो होते हैं लेकिन आपके documents को ignore करते हैं वह एक retrieval या connector issue है, LLM provider से पूरी तरह upstream। जब chats चलने लगें, APIsRouter console per-request model, token counts, और spend दिखाता है। एक workspace tool के लिए जहां हर सवाल retrieved context carry करता है, वह per-question token number capacity planning का honest आधार है, और per workspace एक key usage log को एक department-level cost report में बदल देती है।

अक्सर पूछे जाने वाले प्रश्न

क्या Onyx custom OpenAI-compatible LLM providers support करता है?

हां, एक documented flow के तौर पर: Admin Panel, Configuration, Language Models, Add Custom LLM Provider। Docs कहते हैं provider को OpenAI-compatible endpoints expose करने चाहिए और /v1 पर ending वाले Base URL shapes दिखाते हैं, जो exactly वही है जो एक gateway देता है।

एक gateway के लिए मैं Provider Name में क्या enter करूं?

openai। Onyx calls को LiteLLM के through route करता है, और Provider Name एक LiteLLM provider key से match होना चाहिए; openai वह key है किसी भी OpenAI-compatible endpoint के लिए जो एक custom Base URL पर reachable है।

क्या Onyx इस setup के through Claude या DeepSeek models से जवाब दे सकता है?

हां। Provider के Model Configurations section में ids register करें (उदाहरण के लिए claude-sonnet-4-6 या deepseek-v4-pro)। LiteLLM इन्हें plain strings के तौर पर Base URL को forward करता है, तो gateway जो भी serve करे वह selectable है।

क्या custom provider Onyx की document indexing या embeddings बदलता है?

नहीं। Indexing, embedding, और reranking Onyx के अपने model server पर, default रूप से local, चलते हैं, और connectors अपनी credentials रखते हैं। Custom LLM provider सिर्फ answer generation move करता है।

क्या अलग-अलग assistants एक provider पर अलग-अलग models इस्तेमाल कर सकते हैं?

हां। Provider के Model Configurations में कई ids register करें, फिर per assistant defaults set करें। एक high-volume helpdesk assistant एक fast id चला सकता है जबकि एक research assistant एक frontier id पर default करता है, सब same endpoint और key के through।

क्या यह Danswer में भी वैसा ही था?

Onyx renamed Danswer project है, और custom provider concept carry हुआ। Current documentation Onyx नाम के तहत रहती है, और यहां describe की गई admin-panel flow current surface है; पुराने Danswer guides outdated field layouts दिखा सकते हैं।