Skip to content

Cheapest Model router

Latest

Choose a tag to compare

@siroagent-bot siroagent-bot released this 28 Nov 09:48
· 7 commits to main since this release
9a8a434

Cheapest Model: Siro picks the cheapest language model that fits, and a failed answer is retried on Siro's cost.

Pick (#12)

  • POST /v1/llm-auto with prompt, and optionally tier (fast, balanced, frontier), maker (one company, or open-weight) and max_price.
  • Siro picks the cheapest of the 17 language models that fits. The 402 quote is that model's price and carries a picked block naming it, so the agent sees the model before it signs.
  • The result repeats the pick and the most expensive model that also fitted.

Checks and retries (#14)

  • Optional checks: must_include (comma-separated phrases), min_chars, json (yes) and json_keys.
  • An answer that fails is retried on the next model up the same tier and maker, at most twice. The caller pays the first model's quoted price only; retries are paid by Siro.
  • If no answer passes, the call fails with no_answer_passed and the payment is not settled.
  • check.attempts lists every model tried, whether it passed, why not, and who paid for it.
  • Siro spends at most $3 a day on retries across all callers (router_retries in D1, migration 0009).

Tested live on 27 November 2026

  • Tier fast, JSON check: Gemma 4 26B picked at $0.002 out of 9 models, passed on the first try.
  • Tier fast, must_include "HTTP 402, payment": Gemma 4 26B, GPT-OSS 120B and Llama 4 Scout all missed the check; nothing was settled and Siro booked $0.012 of retries.

Docs: https://siroagent.com/docs