Continue को एक custom OpenAI-compatible endpoint पर point करें।

Updated 2026-07-29

Continue models को config.yaml में declaratively configure करता है। provider को openai पर set करें, apiBase को https://api.apisrouter.com/v1 पर point करें, और आप जो भी model block add करते हैं वह extension में selectable बन जाता है, chat, edit, और apply roles एक key के नीचे प्रति model assignable होने के साथ।

Quick answer: provider openai और apiBase वाला एक model block।

Continue का openai provider एक apiBase override accept करता है, जो किसी भी OpenAI-compatible server के लिए documented path है। config.yaml में एक model block add करें जिसमें provider openai पर set हो, apiBase https://api.apisrouter.com/v1 पर set हो, exact model id, और आपकी key। Model Continue के model selector में दिखता है, और यह जो भी request करता है वह standard /v1/chat/completions के through gateway पर जाती है। यही mechanism जितने चाहें उतने models cover करती है: प्रति id एक block, सभी same apiBase और key share करते हुए। चूंकि Continue model field को एक plain string की तरह treat करता है, अलग-अलग vendors की ids, Claude बगल में GPT बगल में DeepSeek, एक config file में side by side बैठती हैं।

models:
  - name: Claude Sonnet 4.6
    provider: openai
    model: claude-sonnet-4-6
    apiBase: https://api.apisrouter.com/v1
    apiKey: sk-APIsRouter-...
    roles:
      - chat
      - edit
      - apply

Continue काम को models तक कैसे assign करता है: roles।

Continue (GitHub पर continuedev, लगभग 34K stars) VS Code और JetBrains के लिए एक IDE agent है, और इसका defining config idea roles है। हर model block एक roles list carry करता है, और Continue हर तरह के काम को उस role को holding वाले model पर route करता है: conversation panel और agent work के लिए chat, inline code transformations के लिए edit, files में proposed changes merge करने के लिए apply, साथ ही अपने respective subsystems के लिए autocomplete, embed, और rerank। यही वह lever है जो specifically Continue में एक multi-vendor endpoint को interesting बनाता है। Chat सबसे strong model चाहता है जिसे आप justify कर सकते हैं; edit और apply छोटे, ज़्यादा mechanical calls हैं जहां एक fast mid-tier id काम कर देती है। एक apiBase के हर vendor को serve करने के साथ, वह split pure YAML है: एक Claude id chat hold करती है, एक fast id edit और apply hold करती है, इन सभी के लिए एक key। एक honest boundary: autocomplete एक fill-in-the-middle workload है, और Continue का autocomplete role उस completion format के लिए trained models के around built है, chat नहीं। एक chat-completions gateway chat, edit, और apply traffic के लिए सही जगह है; autocomplete को उसी FIM-capable setup पर रहने दें जो आप आज use करते हैं, बजाय इसके कि आप chat model को वह role assign करें और अच्छे suggestions की उम्मीद रखें।

पूरा setup: कई models, split roles, declared context।

Config file ~/.continue/config.yaml पर रहती है। हर block का name selector में दिखने वाला label है; model gateway जो exact id serve करता है वह है। defaultCompletionOptions.contextLength model की context window declare करता है, और Continue इसे यह decide करने के लिए use करता है कि एक request में कितना conversation और file context pack करना है, तो एक long-context model पर इसे एक conservative default पर छोड़ना उससे ज़्यादा जल्दी truncate कर देता है जितना उसे चाहिए। Capabilities आमतौर पर auto-detected होती हैं, लेकिन उन ids के लिए जिन्हें Continue नहीं पहचानता आप उन्हें explicitly state कर सकते हैं: capabilities: [tool_use] agent mode को बताता है कि वह उस model के साथ tools drive कर सकता है। Keys पर: YAML एक literal apiKey accept करता है, जो एक local file के लिए ठीक है जो कभी आपकी machine नहीं छोड़ती। Continue ${{ secrets.APISROUTER_API_KEY }} form का एक secrets template syntax भी support करता है उन configs के लिए जो इसके hub के through managed हैं, जो literal value को shared files से बाहर रखता है। आपका config जहां रहता है उससे match करने वाला form use करें।

models:
  - name: Claude Sonnet 4.6
    provider: openai
    model: claude-sonnet-4-6
    apiBase: https://api.apisrouter.com/v1
    apiKey: ${{ secrets.APISROUTER_API_KEY }}
    roles: [chat, edit]
    capabilities: [tool_use]
    defaultCompletionOptions:
      contextLength: 200000

  - name: Claude Haiku 4.5
    provider: openai
    model: claude-haiku-4-5-20251001
    apiBase: https://api.apisrouter.com/v1
    apiKey: ${{ secrets.APISROUTER_API_KEY }}
    roles: [edit, apply]

  - name: GPT-5.5
    provider: openai
    model: gpt-5.5
    apiBase: https://api.apisrouter.com/v1
    apiKey: ${{ secrets.APISROUTER_API_KEY }}
    roles: [chat]

प्रति role models चुनना।

Role assignment comparison mechanism भी है। edit और apply को fixed रखें, chat block को दो candidate ids के बीच एक-एक हफ्ते के लिए swap करें, और per-key usage view को आपके real workload पर फर्क price करने दें। हर candidate same endpoint के against YAML की तीन lines है।

  • chat agent loop और लंबी conversations carry करता है: files पढ़ना, edits plan करना, real context पर questions answer करना। एक frontier model (claude-sonnet-4-6, gpt-5.5) यहां belong करता है, और यहीं आपके ज़्यादातर tokens जाते हैं।
  • edit highlighted-code transformations handle करता है। Calls chat से छोटे और ज़्यादा mechanical होते हैं, तो claude-haiku-4-5-20251001 या gpt-5.4-mini जैसी एक fast id results degrade किए बिना edit loop को tight रखती है।
  • apply files में proposed changes merge करता है। यह तीनों में सबसे mechanical role है और सबसे कम expensive capable model के लिए clearest candidate है, deepseek-v4-flash सहित।
  • embed और rerank codebase retrieval power करते हैं और अपनी model shapes वाले अलग subsystems हैं; chat traffic को gateway पर move करने के लिए इन्हें touch करने की ज़रूरत नहीं।

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

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.5$5.00 / $30.00 per M$4.00 / $24.00 per M
GPT-5.4 mini$0.75 / $4.50 per M$0.60 / $3.60 per M
DeepSeek V4 Flash$0.14 / $0.28 per M$0.10 / $0.30 per M

Continue के लिए specific failure modes।

apiBase बिना /v1 के। Continue आपके दिए base पर /chat/completions जैसे route paths append करता है, तो https://api.apisrouter.com/v1 सही है और bare host नहीं। पहली use पर 404-shaped error लगभग हमेशा यही है। YAML indentation config को silently reshape करती है। models blocks की एक list है, और एक mis-indented apiBase गलत entry से या किसी से भी attach नहीं होता। जब एक model काम करता है और उसका neighbor authenticate नहीं कर पाता, gateway को suspect करने से पहले उनकी indentation diff करें। Legacy completions toggle। openai provider default रूप से /chat/completions पर जाता है, जो gateway serve करता है। useLegacyCompletionsEndpoint: true एक block को legacy /completions route पर redirect कर देता है; अगर किसी block में यह set है, तो उस model के लिए chat-shaped requests काम करना बंद कर देते हैं। GPT-series ids पर Responses-API expectations। कुछ Continue paths कुछ OpenAI model names के लिए OpenAI का नया responses protocol try कर सकते हैं। एक chat-completions gateway वह protocol serve नहीं करता; अगर एक GPT-series block route-shaped तरीके से error करता है, तो उस block पर useResponsesApi: false set करें ताकि वह /chat/completions पर बना रहे। Stale contextLength। Continue defaultCompletionOptions.contextLength के हिसाब से context pack करता है, model क्या accept कर सकता है उसके हिसाब से नहीं। एक 200k model पर 32k declare करना visibly कुछ नहीं तोड़ता; यह चुपचाप वह context discard कर देता है जिसके लिए आपने pay किया। Model actually क्या support करता है वह declare करें।

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

  • IDE-first developers जो VS Code या JetBrains के अंदर Claude, GPT, और DeepSeek selectable चाहते हैं, प्रति vendor एक credential set maintain किए बिना।
  • Teams जो cost profile के हिसाब से roles split करती हैं: frontier chat, fast edit और apply, हर role वह id hold करते हुए जो उसे fit करती है, सब एक surface पर billed।
  • Engineers जो real work पर chat models compare करते हैं। हर candidate same apiBase के against एक YAML block है, कोई नया provider integration नहीं।
  • Team leads जो onboarding standardize करते हैं: एक config.yaml template plus एक APISROUTER_API_KEY प्रति-vendor key checklist replace करता है, और per-key usage दिखाता है हर seat क्या spend करती है।
  • Developers जिनके पास किसी given vendor की billing तक access नहीं है। बिना card requirement वाला top-up based access प्रति provider sign-up dependency हटा देता है।

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

YAML edit करने से पहले gateway जो serve करता है वह list करें; /v1/models से return होने वाली ids exactly वही strings हैं जो आपके model fields को match करने चाहिए। पहले-request failures एक pattern follow करती हैं। एक 401 का मतलब है उस specific block में key गलत है, या एक secrets reference resolve नहीं हुआ; general file की बजाय failed block check करें, क्योंकि per-block keys का मतलब है per-block failures। एक model-not-found error एक id typo है, version suffix सहित। एक GPT-series id पर route-shaped error ऊपर covered responses-API toggle की तरफ point करता है। और अगर extension में कोई custom models बिल्कुल नहीं दिखते, तो YAML parse नहीं हुआ; पहले file structure validate करें। एक बार requests flow होने लगें, APIsRouter console प्रति-request model, token counts, और spend दिखाता है। चूंकि Continue काम को roles में split करता है, usage view पहली जगह भी है जहां आप अपने real workload पर chat-to-edit traffic ratio देखते हैं, जो वह number है जो बताता है model choice actually कहां matter करती है।

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

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

क्या Continue openai provider के through Claude और DeepSeek models use कर सकता है?

हां। apiBase set वाला openai provider किसी भी OpenAI-compatible server के लिए documented path है, और Continue model field को एक plain string की तरह forward करता है। जो भी id endpoint serve करता है वह काम करता है, Claude और DeepSeek ids सहित, प्रति id एक model block।

क्या मेरे सभी model blocks एक apiBase और key share करते हैं?

हर block अपना apiBase और apiKey declare करता है, तो वे values share कर सकते हैं या नहीं। same key के साथ same endpoint पर कई blocks point करना normal है, और YAML anchors आपको pair एक बार declare करके प्रति block reference करने देते हैं।

कौन से roles gateway के through route होने चाहिए?

chat, edit, और apply, जो सभी /v1/chat/completions बोलते हैं। Autocomplete एक fill-in-the-middle workload है जो completion-format models के around built है, तो उस role को अपने existing FIM setup पर रखें। embed और rerank अलग subsystems हैं और उन्हें कोई changes नहीं चाहिए।

एक model block काम क्यों करता है जबकि दूसरा 401 return करता है?

Continue में keys per block होती हैं, तो एक working neighbor failing block के बारे में कुछ prove नहीं करता। Failing block की apiKey value या secrets reference check करें, और इसकी indentation check करें: एक mis-indented key गलत list entry से attach हो जाती है।

useLegacyCompletionsEndpoint क्या करता है और क्या मुझे यह चाहिए?

यह एक model block को /chat/completions से legacy /completions route पर redirect करता है। एक chat-completions gateway के लिए आपको यह नहीं चाहिए; इसे unset छोड़ें। यह पुराने completion-only servers के लिए exist करता है।

क्या contextLength actually behavior बदलता है?

हां। Continue defaultCompletionOptions.contextLength के हिसाब से conversation और file context pack करता है। एक long-context model पर इसे understate करना चुपचाप context discard कर देता है; इसे वह set करें जो model genuinely support करता है।