llm-connect/docs/image-model-selection.md
tegwick e1bab67bd1
Some checks failed
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Has been cancelled
Apply the image decision tree to missing hall portraits
A hall visual that stays on the general branch uses the Efficient model
from the 2026-10-08 intelligence-radar tree. render-hall writes only
portraits whose files are still absent.

Assistant: grok
Assistant-Session: 01a11ab6-1534-7d63-8606-662b92a80ed6
2026-10-08 16:44:43 +02:00

89 lines
4.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Choosing an image model for `llm_connect.images`
`llm_connect.images` still requires an explicit model on a one-off render.
Hall backfill does not: `selection_for_prompt` and `llm-connect image plan`
apply the tree below. A plain hall portrait — square technical illustration,
no logos, no readable text, one of many — is general / Efficient.
**Source:** intelligence-radar topic digest
`digests/topics/2026-10-08-1527_Image_Generation_with_Generative_AI_Digest.md`
(evidence observed 2026-10-08). Rankings and prices in this field change
monthly. Re-derive the table from the digest's sources before relying on it
after about 2026-11.
## Picking a model
All IDs below are OpenRouter model IDs. Prices are for one 1024² image. The
quote is the per-image estimate plus some margin, and the cap leaves room for
the provider-reported cost to come in above the quote.
| Need | Model | ≈ $/img | `--quote-usd` | `--max-cost-usd` |
|---|---|---|---|---|
| Best result, cost secondary (Frontier) | `openai/gpt-image-2.5-sunburst` | 0.21 | 0.25 | 0.30 |
| Same quality, faster | `openai/gpt-image-2.5-flare` | 0.21 | 0.25 | 0.30 |
| Near-frontier at scale (Efficient) | `google/gemini-nano-banana-2.1` | 0.034 | 0.04 | 0.08 |
| Efficient, better-evidenced fallback | `microsoft/mai-image-2.6` | 0.039 | 0.045 | 0.08 |
| Routine imagery (Budget) | `meta/muse-image` | 0.010 | 0.012 | 0.03 |
| Drafts, thumbnails, bulk variants | `recraft/recraft-v4.1-flash` | 0.007 | 0.008 | 0.02 |
| Text-heavy (posters, infographics, CJK) | `openai/gpt-image-2.5-sunburst` | 0.21 | 0.25 | 0.30 |
| Brand / consistent style set | `recraft/recraft-v4-styles` | 0.035 | 0.04 | 0.08 |
| Vector-style output | `recraft/recraft-v4.1-vector` | 0.08 | 0.09 | 0.15 |
Decision order:
1. Need vector output, brand style, or heavy text? Take that row.
2. Otherwise decide how much an excellent image is worth compared with a good
one:
- the image is the product → Frontier;
- many images, and quality matters → Efficient;
- illustrative or routine → Budget;
- exploration → bulk.
3. For important assets, **explore cheap, then finish expensive**. Render 10–20
Budget variants, then re-render the chosen one or two with the Frontier
model. 20 × Muse plus 2 × Sunburst costs about the same as three Frontier
attempts. This is a hypothesis to test with quality-ledger rows, not a
measured result.
Not available on OpenRouter, and therefore not reachable from this module:
self-hostable open weights (Qwen-Image-2.1, FLUX.2 [dev]), Ideogram,
Midjourney and Reve.
## Scoring rule behind the classes
Image leaderboards publish pairwise-preference **Elo**. Elo is an interval
scale, so "within 10% of the best model" cannot be computed as a ratio of Elo
values. The digest makes the scores usable as follows:
```
task_score(m) = P(m beats anchor) = 1 / (1 + 10^(-(Elo_m - Elo_anchor)/400))
```
Here the anchor is a fixed reference model. On the Artificial Analysis board
that is FLUX.2 [dev], Elo 1000.
- **Frontier:** the model with the highest `task_score`.
- **Topnotch:** `task_score >= 0.90 × task_score(frontier)`. With the
Frontier at Elo 1198, this means Elo ≥ about 1133.
- **Efficient:** the cheapest Topnotch model.
- **Sufficient / Budget:** a per-task floor. For routine imagery the digest uses
a provisional floor of Elo ≳ 1100, the level of the frontier from about ten
months earlier. Budget is the cheapest model above that floor.
Callers that already use `AdaptiveRoutingPolicy` quality floors can use the
same mapping. Convert Elo to an anchor win rate first, then apply a ratio
floor. Do not threshold raw Elo differences across leaderboards: the scales
differ. Arena's top gap is about 95 points where Artificial Analysis shows
about 40.
## Caveats
- OpenRouter bills most image models through a per-token rate. For Recraft,
Krea, Muse, Qwen, Seedream and FLUX 3, about 4,175 image tokens reproduces
the vendor's per-image price. For OpenAI and Google, cost depends on the
quality tier. Let the receipt's `cost_source=provider` correct the quotes
after the first runs.
- It is not verified here that every listed model accepts OpenRouter's
`/images` endpoint with explicit `size` and `aspect_ratio=1:1`. Do one
capped single render per model before running a batch.
- Nano Banana 2.1 had only a few thousand arena votes on 2026-10-08. If its
score drops, MAI-Image-2.6 becomes the Efficient pick.