Skip to content

v0.16.0 — Sonnet 5

Choose a tag to compare

@mmcky mmcky released this 15 Jul 00:35
5fb9c40

What changes for you

The default Claude model is now claude-sonnet-5 (was claude-sonnet-4-6). This is the one change action users will notice. It applies to sync, review, and all CLI commands.

To keep the previous model, pin the action to @v0.15.0 or set the model explicitly via the claude-model input (action) or --model (CLI).

Target repos need to bump their workflow pins to @v0.16.0 (or @v0.16) to pick this up — the release alone changes nothing for a repo still pinned to @v0.15.0.

Changed

  • Default model → claude-sonnet-5. Near-Opus quality on coding/agentic work at Sonnet-tier cost.
  • Model config centralized in src/models.ts (DEFAULT_CLAUDE_MODEL), so future upgrades are a one-line change. Validation patterns now recognise claude-sonnet-5 and claude-opus-4-8.
  • Thinking stays disabled tool-wide — now on evidence, not caution. Sonnet 5 runs adaptive thinking by default. We measured it rather than guessing: the parameter demonstrably engages (1607 → ~6000 output tokens on a reasoning prompt), but on real translation it adds only +24–32 tokens even at effort: high, and an Opus judge scored the variants within noise of each other. Adaptive thinking self-regulates to ~zero on this task, so enabling it is a no-op in cost, latency and quality. Off is now a settled decision rather than a hold. See experiments/thinking-sonnet5/REPORT.md.
  • max_tokens budgets centralized and raised for Sonnet 5's tokenizer (~30% more tokens for the same text): section translation 8192 → 16384, whole-document 32768 → 64000, review verdicts 1500 → 8192, analytical CLI calls → 8192. max_tokens is a ceiling, not a charge — larger caps only prevent truncation.
  • Doc cost figures refreshed for Sonnet 5 pricing.

Added

  • Deterministic French typography (src/typography.ts) — inserts the non-breaking space French requires before ; : ! ?.

    Scope: the translate init (CLI) path only. This does not change how the action syncs translations. Worth stating plainly, because the opposite is the natural assumption: applyTypography appears zero times in dist-action/index.js. Wiring it into sync is a design question tracked in #81.

    Why it exists: the prompt has asked for this since French support landed, and both Sonnet 5 and Opus 4.8 comply 0% of the time — identically. It isn't a model-quality problem. The models already apply the convention (they write Bonjour !), they just emit an ordinary space where French typography wants U+00A0. The two are visually identical, so the defect only shows when a line wraps and orphans the punctuation. A rule about an invisible character doesn't survive the model; a deterministic pass is the right tool.

  • scripts/typography/apply.mjs — back-applies typography to an already-translated repo. Refuses to write unless the only difference is spacing before high punctuation.

  • scripts/glossary/ + the glossary-review skill — decides which terminology a new lecture series needs pinned, by translating a sample with two different models and keeping only the terms they disagree on. A term both models already render identically needs no entry: it costs input tokens in every prompt forever and changes no output. On the French programming corpus this cut 176 proposed terms to 11.

  • 51 tests (1005 → 1056, 39 → 40 suites).

Recommendation: use Opus for one-time bulk seeds

Sonnet 5 remains the default for ongoing sync. For a one-time init seed, --model claude-opus-4-8 is worth the 1.66×: across a 5-lecture French trial, Opus showed zero cross-lecture terminology drift where Sonnet 5 drifted on 5 terms, and was correct where Sonnet wasn't (mutable, not muable). Output lengths were near-identical, so the premium is purely the price ratio (~$6.3 → ~$10.4 for a 26-lecture corpus) — cheap for a corpus a native speaker then reviews.

Caveat: n=5 lectures, one language.

Full changelog: https://github.com/QuantEcon/action-translation/blob/v0.16.0/CHANGELOG.md