Skip to content

Add comprehensive documentation for dual-model (low-cost vs normal) usage#5

Merged
nmaguiar merged 2 commits intomainfrom
copilot/fix-c186b50e-dc25-491c-8d94-39a94f277435
Sep 27, 2025
Merged

Add comprehensive documentation for dual-model (low-cost vs normal) usage#5
nmaguiar merged 2 commits intomainfrom
copilot/fix-c186b50e-dc25-491c-8d94-39a94f277435

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Sep 27, 2025

This PR adds comprehensive documentation for Mini-A's dual-model feature that enables cost optimization by intelligently switching between a high-capability main model and a low-cost model.

What's New

Environment Variables

  • Documents the optional OAF_LC_MODEL environment variable alongside the existing OAF_MODEL
  • Provides clear setup examples for both single and dual-model configurations

Dual-Model System Documentation

The documentation now explains how Mini-A's intelligent model selection works:

  • Step 0: Always uses the main model for critical initial planning
  • Routine Operations: Uses the low-cost model for summarization and simple tasks
  • Smart Escalation: Automatically switches to the main model when:
    • 2+ consecutive errors occur
    • 3+ consecutive thoughts without action
    • 5+ total thoughts (thinking loop detection)
    • 4+ steps without meaningful progress
    • Repeating similar thoughts are detected

Practical Examples

Added real-world configuration examples for:

  • OpenAI models (GPT-4 + GPT-3.5-turbo)
  • Mixed providers (OpenAI + Ollama)
  • Google Gemini models (Pro + Flash)

Enhanced Troubleshooting

New troubleshooting section covers dual-model specific issues like:

  • Configuration format validation
  • Frequent escalation patterns
  • Invalid JSON fallback behavior
  • Cost optimization verification

Benefits for Users

Cost Savings: Users can significantly reduce API costs by using cheaper models for routine tasks while maintaining quality for complex operations.

Transparency: Clear logging shows which model is handling each operation, making it easy to monitor cost optimization.

Automatic Quality Assurance: The smart escalation system ensures complex scenarios always get the attention of the more capable model.

Files Changed

  • README.md: Added dual-model configuration section and environment variable documentation
  • USAGE.md: Comprehensive dual-model guide with examples, troubleshooting, and best practices

The documentation is designed to be user-friendly with practical examples that users can copy and adapt for their specific needs.

Original prompt

Update documentation with the low-cost vs normal model usage


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…sage

Co-authored-by: nmaguiar <11761746+nmaguiar@users.noreply.github.com>
Copilot AI changed the title [WIP] Update documentation with the low-cost vs normal model usage Add comprehensive documentation for dual-model (low-cost vs normal) usage Sep 27, 2025
Copilot AI requested a review from nmaguiar September 27, 2025 06:25
@nmaguiar nmaguiar marked this pull request as ready for review September 27, 2025 06:30
@nmaguiar nmaguiar merged commit 104065a into main Sep 27, 2025
@nmaguiar nmaguiar deleted the copilot/fix-c186b50e-dc25-491c-8d94-39a94f277435 branch September 27, 2025 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants