Kilo Code को OpenAI Compatible के through किसी भी catalog model पर चलाएं।

Updated 2026-07-30

Kilo Code gateways के लिए बना एक custom-provider flow ship करता है: Provider API के तौर पर OpenAI Compatible चुनें, Base URL को https://api.apisrouter.com/v1 set करें, एक key paste करें, और Kilo /v1/models से model list auto-fetch करता है। Claude, Kimi, और Codex-class ids agent के लिए interchangeable backends बन जाती हैं।

Quick answer: एक custom provider entry।

Gear icon से Kilo Code की settings खोलें, Providers tab पर जाएं, और custom provider option चुनें। इसे एक Provider ID और display name दें, Provider API को OpenAI Compatible, Base URL को https://api.apisrouter.com/v1 set करें, और अपनी key paste करें। एक बार Base URL और key valid हो जाएं, Kilo endpoint की /v1/models listing query करता है और हर उपलब्ध id का एक searchable picker present करता है, तो आप claude-sonnet-4-6 या kimi-k2.7-code को blind type करने की बजाय एक list से select करते हैं। Models manually भी add किए जा सकते हैं, और custom HTTP headers key-value pairs के तौर पर supported हैं अगर चाहिए हों। Save करें, और agent की अगली task gateway के through route होती है।

Provider ID:    apisrouter
Display name:   APIsRouter
Provider API:   OpenAI Compatible
Base URL:       https://api.apisrouter.com/v1
API key:        sk-YOUR-APISROUTER-KEY
Models:         pick from the auto-fetched list
                (e.g. claude-sonnet-4-6, kimi-k2.7-code)

Kilo Code provider को कैसे इस्तेमाल करता है।

Kilo Code (GitHub पर लगभग 26K stars) VS Code के लिए एक open-source AI coding agent है: यह plan करता है, files edit करता है, commands चलाता है, और approval gates के साथ failures पर iterate करता है, Roo और Cline के lineage में। उस loop का एक specific traffic shape है: लंबा context अंदर, tool calls और diffs बाहर, per task कई turns, जो backing model को quality lever और cost driver दोनों बना देता है। OpenAI Compatible provider उस loop को standard chat completions के तौर पर आपके Base URL पर भेजता है, model id एक plain string के तौर पर। Wire format vendors की परवाह नहीं करता, जो असली model shopping को possible बनाता है: claude-sonnet-4-6, kimi-k2.7-code, और gpt-5.6-sol एक provider के पीछे interchangeable entries हैं, तीन billing setups वाले तीन vendor accounts की बजाय। Per-model tuning के लिए, token limits, tool-calling behavior, और variants kilo.jsonc config file में रहते हैं, जिसे आप direct edit कर सकते हैं जब किसी model को ऐसी settings चाहिए जो UI expose नहीं करता। Declared limits model की documentation से set करें, optimism से नहीं: agent context को aggressively pack करता है, और एक overstated window exactly सबसे बड़े tasks पर fail होती है।

Kilo के loop के लिए coding models चुनना।

Kilo के modes अलग-अलग तरह के काम को अलग configuration carry करने देते हैं, और इसे exploit करने का honest तरीका empirical है: एक हफ़्ते के लिए एक ही class का task दो ids पर चलाएं, फिर gateway console में per-model spend को इस बगल में पढ़ें कि आपको कितनी बार intervene करना पड़ा। Agent loops किसी model को इस्तेमाल करने का सबसे token-intensive तरीका हैं, तो difference measurable है, vibes नहीं।

  • claude-sonnet-4-6 भरोसेमंद default है: strong tool calling, clean diffs, और अच्छी recovery जब task के बीच एक command fail हो।
  • kimi-k2.7-code लंबे agentic sessions के लिए volume pick है, code-tuned और Kilo असल में जो many-turn loop चलाता है उसके लिए priced।
  • gpt-5.6-sol quick scoped edits और test-fixing runs के लिए सूट करता है जहां per-turn latency session को shape देती है।
  • claude-opus-4-7 hard tasks पर अपनी rate कमाता है: cross-file refactors, architecture work, debugging जिसे context में पूरी picture चाहिए।
  • gpt-5.5 वह frontier generalist है जिसे benchmark tables पर नहीं बल्कि अपने खुद के repository पर Claude के against A/B करें।

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

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 Opus 4.7$5.00 / $25.00 per M$4.00 / $20.00 per M
Kimi K2.7 Code$0.95 / $4.00 per M$1.00 / $4.00 per M
GPT-5.6 Sol$5.00 / $30.00 per M$4.00 / $24.00 per M
GPT-5.5$5.00 / $30.00 per M$4.00 / $24.00 per M

Kilo Code के लिए specific failure modes।

Standard order में debug करें: models listing curl करें, exact id के साथ एक completion curl करें, और तभी Kilo की settings adjust करें। दो commands gateway problems को editor configuration से cleanly अलग करते हैं।

  • Model picker खाली आता है: Base URL या key गलत है, क्योंकि picker एक live /v1/models call से populate होता है। Same values से listing curl करके confirm करें।
  • हर request पर 404: Base URL से इसका /v1 छूट गया, या आपने /chat/completions वाला पूरा path पेस्ट किया जहां एक base चाहिए था। Kilo पूरे endpoint URLs accept करता है, लेकिन सिर्फ अगर वे सही chat-completions route पर point करें।
  • Task के अंदर deep truncated या amnesiac behavior: kilo.jsonc में declared context limits उससे ज़्यादा हैं जो model असल में support करता है। Documented values इस्तेमाल करें।
  • Tool calls execute होने की बजाय narrate होते हैं: चुनी गई id function calling में weak है। Model choice को configuration से अलग करने के लिए task को claude-sonnet-4-6 पर rerun करें, settings छूने से पहले।
  • Docs का एक Azure-specific note: Azure GPT-5 deployments उस max_tokens field को reject करती हैं जो custom OpenAI-compatible providers भेजते हैं, तो Azure को Kilo का native azure provider इस्तेमाल करना चाहिए। एक gateway के लिए irrelevant, लेकिन अगर आप दोनों test करें तो यह एक confusing error explain करता है।

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

  • Developers जो Claude को agent drive करते हुए चाहते हैं बिना एक अलग Anthropic billing relationship के, एक prepaid balance पर मुफ़्त, card-less start के साथ।
  • Model shoppers जो auto-fetched picker से coding ids को अपने असली repository में असली tasks पर trial करते हैं।
  • Heavy users जो planning-grade काम के लिए एक frontier model को लंबे execution sessions के लिए एक volume model के साथ pair करते हैं।
  • Teams जो per developer agent spend को reverse-engineer किए shared vendor bill की बजाय per-key usage से meter करती हैं।
  • People जो पहले से दूसरे tools एक gateway से route करते हैं और VS Code agent को same key और usage log पर चाहते हैं।

Endpoint verify करें और पहली task चलाएं।

Editor configure करने से पहले curl से gateway वाला आधा साबित करें: models list करें, फिर जिस id को चुनने का इरादा है उसके साथ एक completion भेजें। जब दोनों pass हों, बाकी सब provider form में है। फिर Kilo को एक छोटी असली task एक clear goal के साथ दें और पहले turns देखें। Clean tool calls और sensible edits मतलब id loop में fit बैठती है; hard errors तीन fields में से किसी की तरफ map होते हैं। एक बार tasks flow करने लगें, APIsRouter console per-request model, tokens, और spend दिखाता है, जो वह जगह है जहां agent इस्तेमाल का एक हफ़्ता हर model के लिए एक concrete number बन जाता है।

curl -s https://api.apisrouter.com/v1/models \
  -H "Authorization: Bearer $APISROUTER_API_KEY" | head -50

curl -s https://api.apisrouter.com/v1/chat/completions \
  -H "Authorization: Bearer $APISROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"kimi-k2.7-code",
       "messages":[{"role":"user","content":"ping"}]}'

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

मैं Kilo Code में एक OpenAI-compatible provider कैसे add करूं?

Settings gear → Providers tab → custom provider। Provider API को OpenAI Compatible, Base URL को https://api.apisrouter.com/v1 set करें, और अपनी key paste करें। Kilo फिर /v1/models से model list auto-fetch करता है और आप एक searchable list से ids चुनते हैं।

क्या Kilo Code इस provider के through Claude models चला सकता है?

हां। Provider model id को standard chat completions पर एक plain string के तौर पर forward करता है, तो claude-sonnet-4-6 और claude-opus-4-7 वैसे ही काम करते हैं जैसे GPT ids करते हैं, एक key पर, और vendor बदलना एक picker selection है।

Provider add करने के बाद model list खाली क्यों है?

Auto-fetch एक live /v1/models call से populate होता है, तो एक खाली list का मतलब है Base URL या key गलत है। Same values से listing curl करें; अगर वह काम करता है, तो दोबारा check करें कि आपने provider form में असल में क्या save किया। Models manually भी add किए जा सकते हैं।

मैं एक custom model के लिए context window और token limits कहां set करूं?

kilo.jsonc में, Kilo की config file, जो per-model token limits, tool-calling settings, और variants provider form से आगे carry करती है। Model की documented values इस्तेमाल करें; overstated limits सबसे बड़ी tasks पर fail होती हैं।

क्या API key form में जाना ज़रूरी है?

Key field normal path है, लेकिन यह optional है अगर आप custom headers से authentication handle करते हैं, जो provider form key-value pairs के तौर पर support करता है। एक standard gateway setup के लिए, key field सही choice है।

मुझे कैसे पता चलेगा कि Kilo Code का एक हफ़्ता क्या खर्च करता है?

APIsRouter console में per-key usage view पढ़ें: per request और per model tokens और spend। Agent tasks हर एक दर्जनों requests हैं, तो log ही यह मापने का एकमात्र honest तरीका है कि आपका usage pattern क्या खर्च करता है।