Skip to content

feat(proxy): configuring smart-router for improved costs handling - #19

Open
fab-siciliano wants to merge 1 commit into
datareply/prodfrom
feature/datareply/auto-routing-configuration
Open

feat(proxy): configuring smart-router for improved costs handling#19
fab-siciliano wants to merge 1 commit into
datareply/prodfrom
feature/datareply/auto-routing-configuration

Conversation

@fab-siciliano

@fab-siciliano fab-siciliano commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Add new models and refactors the smart-router model to improve costs performances and provide the best options for different tasks

Details

Main recommendations are:

  1. Keep SIMPLE cheap
  2. Make MEDIUM your real default workhorse
  3. Keep COMPLEX and REASONING meaningfully different
  4. Do not make the fallback/default your cheapest model
  5. Only use the most expensive model in REASONING

Cost picture from the repo metadata

From model_prices_and_context_window.json, these are the most relevant candidates:

Model Provider Input cost / 1M tokens Output cost / 1M tokens Notes
gpt-5.4-mini OpenAI $0.75 $4.50 cheap simple-tier candidate
gpt-5.4 OpenAI $2.50 $15.00 solid, but not the best value middle tier
gpt-5.5 OpenAI $5.00 $30.00 premium OpenAI tier
gpt-5.3-codex OpenAI $1.75 $14.00 older coding-focused option
o4-mini OpenAI $1.10 $4.40 cheap reasoning-capable option
o3 OpenAI $2.00 $8.00 strong value reasoning option
o3-mini OpenAI $1.10 $4.40 cheaper reasoning option
claude-haiku-4.5 Bedrock $1.00 $5.00 cheap Bedrock Anthropic option
claude-sonnet-5 Bedrock $2.00 $10.00 best balanced middle-tier candidate
claude-opus-4.8 Bedrock $5.00 $25.00 premium Bedrock tier
claude-fable-5 Bedrock $10.00 $50.00 top-end quality, highest spend
qwen3-coder-next Bedrock $0.60 $1.44 very cheap code-focused option

EU Bedrock Anthropic costs

Model Provider Input cost / 1M tokens Output cost / 1M tokens
eu.anthropic.claude-sonnet-5 Bedrock EU $2.20 $11.00
eu.anthropic.claude-opus-4.8 Bedrock EU $5.50 $27.50
eu.anthropic.claude-fable-5 Bedrock EU $11.00 $55.00

Possible cleanest setup:

  • SIMPLE = gpt-5.4-mini
  • MEDIUM = bedrock-anthropic-sonnet-5
  • COMPLEX = gpt-5.5
  • REASONING = bedrock-anthropic-opus-4.8
  • complexity_router_default_model = bedrock-anthropic-sonnet-5

Why this works:

  • gpt-5.4-mini is a good cheap front line for greetings, basic questions, short rewrites, simple requests
  • Claude Sonnet 5 is the strongest value candidate here for the default tier. It is cheaper than gpt-5.4 and a bettet real” work
  • gpt-5.5 gives you a premium OpenAI option for complex tasks
  • Claude Opus 4.8 keeps REASONING truly premium without jumping all the way to Fable pricing
  • Defaulting to Sonnet 5 is safer than defaulting to Mini

Best quality-first setup

If we care more about quality than spend:

  • SIMPLE = gpt-5.4-mini
  • MEDIUM = bedrock-anthropic-sonnet-5
  • COMPLEX = bedrock-anthropic-opus-4.8
  • REASONING = bedrock-anthropic-fable-5
  • complexity_router_default_model = bedrock-anthropic-sonnet-5

This is the config that best matches the “good practices” reading of the Artificial Analysis page. The page clearly points to Claude Fable 5 and top OpenAI premium models as top-end intelligence choices. So if you want a real “last tier”, REASONING is where
Fable belongs, not COMPLEX

Best cost-optimized code-heavy setup

If most traffic is engineering/coding and you want to save aggressively:

  • SIMPLE = bedrock-qwen3-coder-next
  • MEDIUM = bedrock-anthropic-sonnet-5
  • COMPLEX = gpt-5.5
  • REASONING = bedrock-anthropic-opus-4.8
  • complexity_router_default_model = bedrock-anthropic-sonnet-5

I would only do this if your proxy is mostly used for coding tasks. I would not use qwen3-coder-next as SIMPLE if thgeneric business chat, summaries, or non-technical prompts

Type

🆕 New Feature

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.

1 participant