From 4b81828dd4ae576ad579c29c1a8b22376d9c42d2 Mon Sep 17 00:00:00 2001 From: Brendan O'Leary Date: Wed, 6 Aug 2025 10:25:16 -0400 Subject: [PATCH 1/3] Add free and budget models page --- docs/advanced-usage/free-and-budget-models.md | 309 ++++++++++++++++++ sidebars.ts | 1 + 2 files changed, 310 insertions(+) create mode 100644 docs/advanced-usage/free-and-budget-models.md diff --git a/docs/advanced-usage/free-and-budget-models.md b/docs/advanced-usage/free-and-budget-models.md new file mode 100644 index 0000000..062067f --- /dev/null +++ b/docs/advanced-usage/free-and-budget-models.md @@ -0,0 +1,309 @@ +--- +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 + +### Horizon Beta - Free Frontier Model + +**The best free option available:** Horizon Beta provides frontier-level AI capabilities at zero cost through multiple providers. + +:::tip Last Updated +Horizon Beta availability was last verified in January 2025. Model availability may change over time. +::: + +**What makes it special:** + +- Completely free with no usage limits +- Performance comparable to premium models like GPT-4 +- Available through [OpenRouter](/providers/openrouter) and [Kilo Code](/providers/kilocode) providers +- No credit card required + +**Setup Options:** + +**Option 1: Through Kilo Code Provider** + +1. Configure Kilo Code with the Kilo Code provider +2. Select "Horizon Beta" as your model +3. Start using immediately + +**Option 2: Through OpenRouter** + +1. Create a free [OpenRouter account](https://openrouter.ai) +2. Get your API key from the dashboard +3. Configure Kilo Code with OpenRouter provider +4. Select "Horizon Beta" as your model + +### 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) - Horizon Beta and free models +- [Groq](/providers/groq) - Fast inference for supported models + +**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. diff --git a/sidebars.ts b/sidebars.ts index ec3cee2..8f9834b 100644 --- a/sidebars.ts +++ b/sidebars.ts @@ -118,6 +118,7 @@ const sidebars: SidebarsConfig = { "features/fast-edits", "features/model-temperature", "advanced-usage/rate-limits-costs", + "advanced-usage/free-and-budget-models", "features/footgun-prompting", ], }, From e7c847f9e4cb0e93b8fe0bd8a11cc5f3954c4efa Mon Sep 17 00:00:00 2001 From: Christiaan Arnoldus Date: Mon, 11 Aug 2025 20:35:50 +0200 Subject: [PATCH 2/3] Remove Horizon Beta --- docs/advanced-usage/free-and-budget-models.md | 30 ------------------- 1 file changed, 30 deletions(-) diff --git a/docs/advanced-usage/free-and-budget-models.md b/docs/advanced-usage/free-and-budget-models.md index 062067f..0ee8f5d 100644 --- a/docs/advanced-usage/free-and-budget-models.md +++ b/docs/advanced-usage/free-and-budget-models.md @@ -8,36 +8,6 @@ sidebar_label: Free & Budget Models ## Completely Free Options -### Horizon Beta - Free Frontier Model - -**The best free option available:** Horizon Beta provides frontier-level AI capabilities at zero cost through multiple providers. - -:::tip Last Updated -Horizon Beta availability was last verified in January 2025. Model availability may change over time. -::: - -**What makes it special:** - -- Completely free with no usage limits -- Performance comparable to premium models like GPT-4 -- Available through [OpenRouter](/providers/openrouter) and [Kilo Code](/providers/kilocode) providers -- No credit card required - -**Setup Options:** - -**Option 1: Through Kilo Code Provider** - -1. Configure Kilo Code with the Kilo Code provider -2. Select "Horizon Beta" as your model -3. Start using immediately - -**Option 2: Through OpenRouter** - -1. Create a free [OpenRouter account](https://openrouter.ai) -2. Get your API key from the dashboard -3. Configure Kilo Code with OpenRouter provider -4. Select "Horizon Beta" as your model - ### 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. From 567e2abf402b73d5788b413a2ff2896dab5a16e5 Mon Sep 17 00:00:00 2001 From: Christiaan Arnoldus Date: Mon, 11 Aug 2025 20:39:57 +0200 Subject: [PATCH 3/3] Update docs/advanced-usage/free-and-budget-models.md --- docs/advanced-usage/free-and-budget-models.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/advanced-usage/free-and-budget-models.md b/docs/advanced-usage/free-and-budget-models.md index 0ee8f5d..1000597 100644 --- a/docs/advanced-usage/free-and-budget-models.md +++ b/docs/advanced-usage/free-and-budget-models.md @@ -247,8 +247,9 @@ When you need more capability than free models provide, these options deliver ex **Free tier foundation:** -- [OpenRouter](/providers/openrouter) - Horizon Beta and free models +- [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:**