autogen - 💡(How to fix) Fix Integration: WhichModel MCP for cost-aware model selection in multi-agent systems [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
microsoft/autogen#7547Fetched 2026-04-08 03:02:39
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Participants

Code Example

{"mcpServers":{"whichmodel":{"url":"https://whichmodel.dev/mcp"}}}
RAW_BUFFERClick to expand / collapse

Feature proposal

Problem: Multi-agent systems using AutoGen often need to select from multiple LLMs at runtime. Cost varies significantly between models and changes frequently, but there's no built-in way to make cost-optimal model selection decisions.

Solution: WhichModel is a free MCP server that tracks pricing across 100+ models (Anthropic, OpenAI, Google, Meta, Mistral, Cohere, etc.), refreshed every 4 hours. Since AutoGen supports MCP tools, agents can query WhichModel with zero integration work.

MCP Config:

{"mcpServers":{"whichmodel":{"url":"https://whichmodel.dev/mcp"}}}

Tools:

  • recommend_model — cost-optimized suggestions by task type, complexity, budget
  • compare_models — head-to-head comparison with volume cost projections
  • get_pricing — raw pricing data with filters
  • check_price_changes — pricing change tracker

Use case: An AutoGen orchestrator could call recommend_model when assigning tasks to agents, routing simple tasks to cheaper models and complex tasks to frontier models — all based on real-time pricing.

No API key needed for free tier (1,000 req/mo). MIT licensed.

extent analysis

TL;DR

Integrate the WhichModel MCP server into AutoGen to enable cost-optimal model selection decisions at runtime.

Guidance

  • Configure AutoGen to use the WhichModel MCP server by adding the provided MCP config to enable cost-aware model selection.
  • Utilize the recommend_model tool to receive cost-optimized suggestions for task assignments based on task type, complexity, and budget.
  • Leverage the compare_models and get_pricing tools for further analysis and customization of model selection decisions.
  • Monitor pricing changes using the check_price_changes tool to adapt to frequent cost updates.

Example

{
  "mcpServers": {
    "whichmodel": {
      "url": "https://whichmodel.dev/mcp"
    }
  }
}

Notes

The provided solution relies on the WhichModel MCP server, which may have usage limits (e.g., 1,000 requests per month for the free tier). Be aware of these limitations when integrating the solution.

Recommendation

Apply workaround by integrating the WhichModel MCP server, as it provides a cost-effective and efficient solution for model selection decisions without requiring significant development or infrastructure changes.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING