Cost mode:

Category: Infrastructure & Utility · Rail: absolute · Typical I/O: 4235→9474 tokens

Models

Frontier on this task: Gemini 3.5 Flash at 9.33 / 10. Quality bar at 90%: 8.40.

point-estimate floor (CI low) · upper CI (less certain) · Bars sorted by blended cost; best-value model first. Greyed rows are MEDIUM+ models whose point estimate clears the bar but whose CI low does not.

ModelQuality scoreCI lowCost / 1k runsvs best value
MiniMax M38.52 / 108.10$5.11best value
Gemini 3.5 Flash9.33 / 109.20$165.8932x more expensive
Qwen 3.6 Plus1.87 / 101.57$46.939.2x more expensive
Kimi K2.61.77 / 101.33$55.7411x more expensive
Qwen 3.5 Flash1.96 / 101.74$8.501.7x more expensive
Qwen 3.7 Plus5.87 / 105.67$19.643.8x more expensive
Qwen 3.6 Flash5.12 / 104.86$32.106.3x more expensive
Grok 4.56.67 / 106.41$66.1513x more expensive

Cost breakdown

ModelQualityConfidenceCost / 1k runsOverpayMode
MiniMax M3 MiniMax8.52 / 10 CI [8.10, 8.94]MEDIUM$5.11best valuebatch
Gemini 3.5 Flash best Gemini9.33 / 10 CI [9.20, 9.47]RANKED$165.8932xbatch

Overpay shows how much more you pay than the best-value model that clears the quality bar (marked ★) — the best-value good-enough option. "16x" means you overpay 16× — 16× that reference for no quality benefit above the bar. Typical call shape for this task: 4235 input tokens → 9474 output tokens, EMA-tracked from production traffic. Cost is the observed, all-in $ per 1,000 task runs: each model's own measured usage on this task — output verbosity, thinking/reasoning tokens, cache reads and writes, and the spend on its billed failures — priced at current list rates and adjusted by the billing overhead we actually reconcile against provider invoices. Models that answer tersely cost what they actually cost; models that think at length pay for it. Not comparable to providers' advertised $/1M list rates — this is what running the task costs, not a per-token price.

Prompt templates

The system + user template pair used for this task.

MARKDOWN_NEWLINE_REPAIR_SYSTEM_PROMPT + MARKDOWN_NEWLINE_REPAIR_USER_PROMPT (1591 calls in window)

System prompt

You receive a markdown document whose line breaks were stripped, so headings, separators, and paragraphs run together on one line.

Your job is to re-insert blank lines so the markdown renders correctly. You must NOT modify any non-whitespace character.

Required reformatting:
- Put each heading marker (`##`, `###`, `####`) on its own line, with a blank line before AND after.
- Put each `---` separator on its own line, with a blank line before AND after.
- For headings whose text was concatenated with following body text (e.g., `### The Strategic Context The present conflict in the Persian Gulf has entered...`): keep ONLY the actual heading title on the heading line, and start a new paragraph for the body. Heading titles are typically 2-12 words, do not contain sentence-ending punctuation, and end at the boundary where running prose begins.
- Insert paragraph breaks (blank lines) between distinct paragraphs in body prose. A paragraph break belongs where a topic shifts or where the original author would have started a new paragraph. Sentences that elaborate the same point stay together.
- Preserve existing italic/bold markers like `*Author:*`, `**bold**`, `*emphasis*`. If the metadata line at the top concatenates `*Author:* X *Subject:* Y *Topic:* Z`, put each on its own line.
- Preserve list markers (`- `, `* `, `1. `). If a list runs inline, put each list item on its own line.

Hard constraints:
- Do NOT add, remove, or change any letter, digit, punctuation, citation marker (`[^21]`, `[^21][^43]`), URL, or other non-whitespace character.
- Do NOT rephrase, summarize, expand, or "fix" any wording.
- Do NOT insert headings, lists, or markers that were not already there.
- Do NOT remove headings, separators, or markers that were there.
- Output the entire input verbatim except for whitespace insertions.

If you cannot satisfy the no-content-change rule for any reason, return the input unchanged rather than producing a modified version.

## Required Output Format
Your response MUST be a single, valid JSON object conforming to this schema:
```json
{schema_json_string}
```

User prompt

Reflow this markdown by inserting blank lines and paragraph breaks. Do not change any non-whitespace character.

Markdown text:

{markdown_text}

Return the reflowed markdown matching this schema:

The required JSON output schema is provided in the system prompt.