होम / गाइड / मुफ़्त LLM API के साथ Aider इस्तेमाल करें

मुफ़्त LLM API के साथ Aider इस्तेमाल करें

Aider terminal के लिए एक open-source pair programmer है। यह आपकी git repository में फ़ाइलें बदलता है और commits बनाता है। यह guide Aider को FreeLLMAPI के जरिए मुफ़्त models से जोड़ती है। यह उन Aider settings को भी दिखाती है जो मुफ़्त models के लिए ज़रूरी हैं: edit format, weak model और repo map का आकार।

कोड, मॉडल नाम और लाइव कैटलॉग लेबल अंग्रेज़ी में दिखाए गए हैं।

चरण 1: FreeLLMAPI इंस्टॉल करें

FreeLLMAPI एक open-source gateway है। यह Docker में आपके computer पर चलता है। यह 45 providers के मुफ़्त tiers को एक OpenAI-compatible key के पीछे इकट्ठा करता है।

macOS या Linux पर इंस्टॉल करें

curl -fsSL https://freellmapi.co/install.sh | bash

http://localhost:3001 खोलें। Keys page पर कम से कम दो मुफ़्त provider keys जोड़ें। उसी page से अपनी unified key कॉपी करें।

चरण 2: Aider को जोड़ें

Setup command ~/.aider.conf.yml लिखता है। वह पहले मौजूदा फ़ाइल का backup बनाता है।

एक command

npx freellmapi setup-aider --url http://localhost:3001 --api-key <unified-key> --dry-run
npx freellmapi setup-aider --url http://localhost:3001 --api-key <unified-key>
aider

Command जो फ़ाइल लिखता है, वह ऐसी दिखती है:

~/.aider.conf.yml

openai-api-base: "http://localhost:3001/v1"
openai-api-key: "<unified-key>"
model: "openai/auto"

openai/ prefix ज़रूरी है। यह Aider को बताता है कि model नाम एक OpenAI-compatible API को भेजना है। Environment variables इस्तेमाल करने और कोई फ़ाइल न रखने के लिए यह करें:

सिर्फ environment variables

export OPENAI_API_BASE=http://localhost:3001/v1
export OPENAI_API_KEY=<unified-key>
aider --model openai/auto

Aider .aider.conf.yml को आपकी home directory में, फिर git repository की root में, और फिर current directory में खोजता है। जो फ़ाइल आखिर में लोड होती है, उसकी प्राथमिकता सबसे ज़्यादा होती है। इसलिए एक project की फ़ाइल एक repository के लिए model बदल सकती है।

चरण 3: models चुनें

Aider हर request में आपकी फ़ाइलें और एक repo map भेजता है। इसके मुख्य edit loop को tool calling की ज़रूरत नहीं है, क्योंकि यह edits model के text जवाब से पढ़ता है। बड़ी context window और अच्छा instruction following ज़्यादा ज़रूरी हैं। Table में आज के वे मुफ़्त models हैं जिनमें कम से कम 128K context है।

Aider के लिए मुफ़्त models: 128K+ context, intelligence के हिसाब से
मॉडलमुफ़्त उपलब्धकॉन्टेक्स्टमुफ़्त सीमाएँ (सबसे अच्छा विकल्प)टूलविज़न
GLM 5.3APINex, UnoRouter1M5 अनुरोध/मिनट
10M weighted tokens/day shared across APINex free routes; 4x token multiplier; 5 requests/minute/account
हाँनहीं
GLM 5.3 FlashAPINex, BlazeAPI, NVIDIA NIM +1 और1M40 अनुरोध/मिनट
40 RPM
हाँहाँ
Gemini 3.8 FlashAPINex, Google AI Studio1M5 अनुरोध/मिनट
10M weighted tokens/day shared across APINex free routes; 3x token multiplier; 5 requests/minute/account
हाँहाँ
Qwen3.8 Flash NextAMD Radeon Cloud, BlazeAPI, ElectronHub262KRecurring daily account allowanceहाँनहीं
Qwen3.8 FlashElectronHub1M$0.25/week shared recurring creditहाँहाँ
Deepseek V4.1 FlashAPINex1M5 अनुरोध/मिनट
10M weighted tokens/day shared across APINex free routes; 3x token multiplier; 5 requests/minute/account
नहींनहीं
Gemini 3.7 FlashGoogle AI Studio1M10 अनुरोध/मिनट
20 अनुरोध/दिन
250,000 टोकन/मिनट
~3M
हाँहाँ
GPT-5.6 LunaElectronHub1M$0.25/week shared recurring creditहाँहाँ
Dots3 Note PreviewKilo Gateway, OpenRouter512K20 अनुरोध/मिनट
50 अनुरोध/दिन
50 req/day account-wide (1,000 after a $10 purchase)
हाँहाँ
DeepSeek V4 FlashAMD Radeon Cloud, BazaarLink, ElectronHub1M10 अनुरोध/मिनट
50 अनुरोध/दिन
Shared rate limit
हाँनहीं
DeepSeek V4 Flash 0731ElectronHub, Router91M10,000 credits/month (~$1), shared; account-anniversary resetनहींनहीं
Qwen3.8 27BBlazeAPI, ElectronHub, Gizmo +3 और262K30 अनुरोध/मिनट
250 अनुरोध/दिन
70,000 टोकन/मिनट
~6M
हाँहाँ

184 मिलते-जुलते मुफ़्त मॉडल में से 12 दिखाए जा रहे हैं। सभी मॉडल देखें.

FreeLLMAPI कैटलॉग से लाइव डेटा (संस्करण 2026.11.19, जाँच 2026-11-19)। मुफ़्त सीमाएँ अक्सर बदलती हैं। कैटलॉग की हर दिन जाँच होती है।

Router को model चुनने देने के लिए openai/auto इस्तेमाल करें। सबसे ऊँची intelligence वाले models को प्राथमिकता देने के लिए openai/auto:smart इस्तेमाल करें। एक model को पिन करने के लिए openai/ और GET /v1/models से catalog id इस्तेमाल करें।

आप एक session के लिए command line पर भी models सेट कर सकते हैं। यह उदाहरण edits के लिए सबसे मज़बूत models इस्तेमाल करता है। Commit messages और chat history के सार के लिए तेज़ models इस्तेमाल करता है:

एक session के लिए models

aider --model openai/auto:smart --weak-model openai/auto:fast

किसी योजनाबद्ध profile के लिए, FreeLLMAPI dashboard पर एक fallback chain बनाएँ, जैसे coding नाम की chain। फिर --model openai/auto:coding इस्तेमाल करें। अज्ञात profile नाम 400 error लौटाता है, इसलिए request बिना बताए किसी दूसरी chain पर नहीं जाती।

मुफ़्त models के लिए Aider settings

Aider प्रसिद्ध models की settings जानता है। auto जैसा gateway model ज्ञात नहीं है, इसलिए ये मान आप खुद सेट करें।

Settingयह क्या करती हैमुफ़्त models के लिए सुझाया गया मान
edit-formatवह format जिसमें model edits भेजता है: whole, diff, diff-fenced या udiffमज़बूत models के लिए diff। कमज़ोर models के लिए whole, क्योंकि यह सरल है पर ज़्यादा tokens भेजता है।
weak-modelCommit messages और chat history के सार के लिए modelopenai/auto:fast, ताकि छोटे काम आपके मज़बूत model का quota न लें
map-tokensRepo map के लिए tokens की संख्या। 0 इसे बंद करता है।छोटे मुफ़्त tiers पर 1024 या उससे कम
architectएक model बदलाव की योजना बनाता है और एक editor model edits लिखता हैवैकल्पिक। इससे requests की संख्या दोगुनी हो जाती है।

मुफ़्त models के लिए settings वाली ~/.aider.conf.yml

openai-api-base: "http://localhost:3001/v1"
openai-api-key: "<unified-key>"
model: "openai/auto"
weak-model: "openai/auto:fast"
edit-format: diff
map-tokens: 1024

Aider को gateway model की context window देने के लिए .aider.model.metadata.json फ़ाइल जोड़ें। Key पूरा model नाम है। Aider इस फ़ाइल को config फ़ाइल वाली जगहों पर ही खोजता है।

~/.aider.model.metadata.json

{
  "openai/auto": {
    "max_input_tokens": 128000,
    "max_output_tokens": 8192,
    "litellm_provider": "openai",
    "mode": "chat"
  }
}

Rate limits और failover

मुफ़्त tiers पर प्रति मिनट और प्रति दिन limits होती हैं। FreeLLMAPI हर key का इस्तेमाल गिनता है। जब कोई provider 429 error भेजता है, तो router request को आपकी chain के अगले model पर भेज देता है। Aider error नहीं देखता और आगे बढ़ता है।

  • चार या अधिक providers की keys जोड़ें। ज़्यादा providers प्रति दिन ज़्यादा requests देते हैं।
  • /add से सिर्फ वही फ़ाइलें जोड़ें जिन्हें आप बदलना चाहते हैं। हर फ़ाइल हर request में जाती है।
  • Tasks के बीच /clear इस्तेमाल करें, ताकि छोटा chat history जाए। छोटा history tokens per minute भी घटाता है।
  • जिन फ़ाइलों की अब ज़रूरत नहीं, उन्हें हटाने के लिए /drop इस्तेमाल करें।

समस्या निवारण

समस्याकारणसमाधान
"Model openai/auto: अज्ञात context window size और costs, डिफ़ॉल्ट मान इस्तेमाल हो रहे हैं।"Aider gateway model को नहीं जानतायह चेतावनी आमतौर पर हानिरहित है। इसे हटाने के लिए .aider.model.metadata.json जोड़ें।
Edit लागू नहीं हुआModel ने edit format का पालन नहीं किया--edit-format whole इस्तेमाल करें, या एक मज़बूत model
401 "Invalid API key"Aider एक अलग key भेजता है, जैसे किसी दूसरी config फ़ाइल सेHome directory, git root और current directory की config फ़ाइलें जाँचें
Aider api.openai.com को call करता हैopenai/ prefix इस्तेमाल हो रहा है, पर base URL सेट नहीं हैopenai-api-base या OPENAI_API_BASE सेट करें
"N प्रयासों के बाद सभी models rate-limited हैं"सभी keys अपनी limit पर हैंऔर providers की keys जोड़ें, या map-tokens घटाएँ
इनमें से हर एक का उपयोग एक ही कुंजी से करें। FreeLLMAPI एक ओपन-सोर्स, सेल्फ़-होस्टेड राउटर है। यह इन सभी मुफ़्त टियर को एक OpenAI-संगत एंडपॉइंट के पीछे रखता है। जब कोई एक सीमा पर पहुँचता है, तो यह अगले प्रदाता पर स्विच कर देता है। कैटलॉग देखें या शुरू करें.

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

क्या Aider मुफ़्त में इस्तेमाल किया जा सकता है?

हाँ। Aider open source है। इसे FreeLLMAPI की ओर इंगित करें, openai-api-base और openai/ model prefix के साथ। Gateway मुफ़्त provider tiers इस्तेमाल करता है, इसलिए inference का खर्च $0 है।

OpenAI-compatible API के साथ Aider कैसे इस्तेमाल करें?

OPENAI_API_BASE और OPENAI_API_KEY सेट करें, फिर aider --model openai/ चलाएँ। openai/ prefix ज़रूरी है। वही मान आप .aider.conf.yml में भी रख सकते हैं।

मुफ़्त models के साथ किस edit format का इस्तेमाल करना चाहिए?

मज़बूत models के लिए diff इस्तेमाल करें, क्योंकि यह कम tokens भेजता है। अगर edits लागू न हों, तो whole इस्तेमाल करें। यह कमज़ोर models के लिए सरल है, पर हर बार पूरी फ़ाइल भेजता है।

'Unknown context window size and costs, using sane defaults' का क्या अर्थ है?

Aider model नाम को नहीं जानता, इसलिए वह डिफ़ॉल्ट मान इस्तेमाल करता है। यह चेतावनी आमतौर पर हानिरहित है। इसे हटाने के लिए context window वाली .aider.model.metadata.json फ़ाइल जोड़ें।

Aider के लिए कौन सा मुफ़्त model सबसे अच्छा है?

बड़ी context window और अच्छे instruction following वाला model इस्तेमाल करें। इस पेज की table आज 128K या उससे ज़्यादा context वाले सबसे मज़बूत मुफ़्त models दिखाती है।

संबंधित गाइड

स्रोत

सभी गाइड · सभी मुफ़्त मॉडल देखें