This repository was archived by the owner on Aug 27, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 54
Add free and budget models page #107
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,280 @@ | ||
| --- | ||
| sidebar_label: Free & Budget Models | ||
| --- | ||
|
|
||
| # Using Kilo Code for Free and on a Budget | ||
|
|
||
| **Why this matters:** AI model costs can add up quickly during development. This guide shows you how to use Kilo Code effectively while minimizing or eliminating costs through free models, budget-friendly alternatives, and smart usage strategies. | ||
|
|
||
| ## Completely Free Options | ||
|
|
||
| ### OpenRouter Free Tier Models | ||
|
|
||
| OpenRouter offers several models with generous free tiers. **Note:** You'll need to create a free OpenRouter account to access these models. | ||
|
|
||
| **Setup:** | ||
|
|
||
| 1. Create a free [OpenRouter account](https://openrouter.ai) | ||
| 2. Get your API key from the dashboard | ||
| 3. Configure Kilo Code with the OpenRouter provider | ||
|
|
||
| **Available free models:** | ||
|
|
||
| - **Meta Llama 3.1 8B Instruct (Free)** - Good for basic coding tasks | ||
| - **Mistral 7B Instruct (Free)** - Solid performance for most development work | ||
| - **Qwen 2.5 7B Instruct (Free)** - Strong reasoning capabilities | ||
|
|
||
| ## Cost-Effective Premium Models | ||
|
|
||
| When you need more capability than free models provide, these options deliver excellent value: | ||
|
|
||
| ### Ultra-Budget Champions (Under $0.50 per million tokens) | ||
|
|
||
| **Mistral Devstral Small** | ||
|
|
||
| - **Cost:** ~$0.20 per million input tokens | ||
| - **Best for:** Code generation, debugging, refactoring | ||
| - **Performance:** 85% of premium model capability at 10% of the cost | ||
|
|
||
| **Llama 4 Maverick** | ||
|
|
||
| - **Cost:** ~$0.30 per million input tokens | ||
| - **Best for:** Complex reasoning, architecture planning | ||
| - **Performance:** Excellent for most development tasks | ||
|
|
||
| **DeepSeek v3** | ||
|
|
||
| - **Cost:** ~$0.27 per million input tokens | ||
| - **Best for:** Code analysis, large codebase understanding | ||
| - **Performance:** Strong technical reasoning | ||
|
|
||
| ### Mid-Range Value Models ($0.50-$2.00 per million tokens) | ||
|
|
||
| **Qwen3 235B** | ||
|
|
||
| - **Cost:** ~$1.20 per million input tokens | ||
| - **Best for:** Complex projects requiring high accuracy | ||
| - **Performance:** Near-premium quality at 40% of the cost | ||
|
|
||
| ## Smart Usage Strategies | ||
|
|
||
| ### The 50% Rule | ||
|
|
||
| **Principle:** Use budget models for 50% of your tasks, premium models for the other 50%. | ||
|
|
||
| **Budget model tasks:** | ||
|
|
||
| - Code reviews and analysis | ||
| - Documentation writing | ||
| - Simple bug fixes | ||
| - Boilerplate generation | ||
| - Refactoring existing code | ||
|
|
||
| **Premium model tasks:** | ||
|
|
||
| - Complex architecture decisions | ||
| - Debugging difficult issues | ||
| - Performance optimization | ||
| - New feature design | ||
| - Critical production code | ||
|
|
||
| ### Context Management for Cost Savings | ||
|
|
||
| **Minimize context size:** | ||
|
|
||
| ```typescript | ||
| // Instead of mentioning entire files | ||
| @src/components/UserProfile.tsx | ||
|
|
||
| // Mention specific functions or sections | ||
| @src/components/UserProfile.tsx:45-67 | ||
| ``` | ||
|
|
||
| **Use Memory Bank effectively:** | ||
|
|
||
| - Store project context once in [Memory Bank](/advanced-usage/memory-bank) | ||
| - Reduces need to re-explain project details | ||
| - Saves 200-500 tokens per conversation | ||
|
|
||
| **Strategic file mentions:** | ||
|
|
||
| - Only include files directly relevant to the task | ||
| - Use [`@folder/`](/basic-usage/context-mentions) for broad context, specific files for targeted work | ||
|
|
||
| ### Model Switching Strategies | ||
|
|
||
| **Start cheap, escalate when needed:** | ||
|
|
||
| 1. **Begin with free models** (Horizon Beta, Llama 3.1 8B) | ||
| 2. **Switch to budget models** if free models struggle | ||
| 3. **Escalate to premium models** only for complex tasks | ||
|
|
||
| **Use API Configuration Profiles:** | ||
|
|
||
| - Set up [multiple profiles](/features/api-configuration-profiles) for different cost tiers | ||
| - Quick switching between free, budget, and premium models | ||
| - Match model capability to task complexity | ||
|
|
||
| ### Mode-Based Cost Optimization | ||
|
|
||
| **Use appropriate modes to limit expensive operations:** | ||
|
|
||
| - **[Ask Mode](/basic-usage/using-modes#ask-mode):** Information gathering without code changes | ||
| - **[Architect Mode](/basic-usage/using-modes#architect-mode):** Planning without expensive file operations | ||
| - **[Debug Mode](/basic-usage/using-modes#debug-mode):** Focused troubleshooting | ||
|
|
||
| **Custom modes for budget control:** | ||
|
|
||
| - Create modes that restrict expensive tools | ||
| - Limit file access to specific directories | ||
| - Control which operations are auto-approved | ||
|
|
||
| ## Real-World Performance Comparisons | ||
|
|
||
| ### Code Generation Tasks | ||
|
|
||
| **Simple function creation:** | ||
|
|
||
| - **Horizon Beta (Free):** 90% success rate | ||
| - **Mistral Devstral Small:** 95% success rate | ||
| - **GPT-4:** 98% success rate | ||
| - **Cost difference:** Free vs $0.20 vs $30 per million tokens | ||
|
|
||
| **Complex refactoring:** | ||
|
|
||
| - **Budget models:** 70-80% success rate | ||
| - **Premium models:** 90-95% success rate | ||
| - **Recommendation:** Start with budget, escalate if needed | ||
|
|
||
| ### Debugging Performance | ||
|
|
||
| **Simple bugs:** | ||
|
|
||
| - **Free models:** Usually sufficient | ||
| - **Budget models:** Excellent performance | ||
| - **Premium models:** Overkill for most cases | ||
|
|
||
| **Complex system issues:** | ||
|
|
||
| - **Free models:** 40-60% success rate | ||
| - **Budget models:** 60-80% success rate | ||
| - **Premium models:** 85-95% success rate | ||
|
|
||
| ## Hybrid Approach Recommendations | ||
|
|
||
| ### Daily Development Workflow | ||
|
|
||
| **Morning planning session:** | ||
|
|
||
| - Use **Architect mode** with **Horizon Beta (free)** | ||
| - Plan features and architecture | ||
| - Create task breakdowns | ||
|
|
||
| **Implementation phase:** | ||
|
|
||
| - Use **Code mode** with **budget models** | ||
| - Generate and modify code | ||
| - Handle routine development tasks | ||
|
|
||
| **Complex problem solving:** | ||
|
|
||
| - Switch to **premium models** when stuck | ||
| - Use for critical debugging | ||
| - Architecture decisions affecting multiple systems | ||
|
|
||
| ### Project Phase Strategy | ||
|
|
||
| **Early development:** | ||
|
|
||
| - Free and budget models for prototyping | ||
| - Rapid iteration without cost concerns | ||
| - Establish patterns and structure | ||
|
|
||
| **Production preparation:** | ||
|
|
||
| - Premium models for critical code review | ||
| - Performance optimization | ||
| - Security considerations | ||
|
|
||
| ## Cost Monitoring and Control | ||
|
|
||
| ### Track Your Usage | ||
|
|
||
| **Monitor token consumption:** | ||
|
|
||
| - Check cost estimates in chat history | ||
| - Review monthly usage patterns | ||
| - Identify high-cost operations | ||
|
|
||
| **Set spending limits:** | ||
|
|
||
| - Use provider billing alerts | ||
| - Configure [rate limits](/advanced-usage/rate-limits-costs) to control usage | ||
| - Set daily/monthly budgets | ||
|
|
||
| ### Cost-Saving Tips | ||
|
|
||
| **Reduce system prompt size:** | ||
|
|
||
| - [Disable MCP](/features/mcp/using-mcp-in-kilo-code) if not using external tools | ||
| - Use focused custom modes | ||
| - Minimize unnecessary context | ||
|
|
||
| **Optimize conversation length:** | ||
|
|
||
| - Use [Checkpoints](/features/checkpoints) to reset context | ||
| - Start fresh conversations for unrelated tasks | ||
| - Archive completed work | ||
|
|
||
| **Batch similar tasks:** | ||
|
|
||
| - Group related code changes | ||
| - Handle multiple files in single requests | ||
| - Reduce conversation overhead | ||
|
|
||
| ## Getting Started with Budget Models | ||
|
|
||
| ### Quick Setup Guide | ||
|
|
||
| 1. **Create OpenRouter account** for free models | ||
| 2. **Configure multiple providers** in Kilo Code | ||
| 3. **Set up API Configuration Profiles** for easy switching | ||
| 4. **Start with Horizon Beta** for all tasks | ||
| 5. **Escalate to budget models** when needed | ||
| 6. **Reserve premium models** for complex work | ||
|
|
||
| ### Recommended Provider Mix | ||
|
|
||
| **Free tier foundation:** | ||
|
|
||
| - [OpenRouter](/providers/openrouter) - Free models | ||
| - [Groq](/providers/groq) - Fast inference for supported models | ||
| - [Z.ai](https://z.ai/model-api) - Provides a free model GLM-4.5-Flash | ||
|
|
||
| **Budget tier options:** | ||
|
|
||
| - [DeepSeek](/providers/deepseek) - Excellent value models | ||
| - [Mistral](/providers/mistral) - Specialized coding models | ||
|
|
||
| **Premium tier backup:** | ||
|
|
||
| - [Anthropic](/providers/anthropic) - Claude for complex reasoning | ||
| - [OpenAI](/providers/openai) - GPT-4 for critical tasks | ||
|
|
||
| ## Measuring Success | ||
|
|
||
| **Track these metrics:** | ||
|
|
||
| - Monthly AI costs vs. development productivity | ||
| - Task completion rates by model tier | ||
| - Time saved vs. money spent | ||
| - Code quality improvements | ||
|
|
||
| **Success indicators:** | ||
|
|
||
| - 70%+ of tasks completed with free/budget models | ||
| - Monthly costs under your target budget | ||
| - Maintained or improved code quality | ||
| - Faster development cycles | ||
|
|
||
| By combining free models, strategic budget model usage, and smart optimization techniques, you can harness the full power of AI-assisted development while keeping costs minimal. Start with free options and gradually incorporate budget models as your needs and comfort with costs grow. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.