Skip to content

Move the game to Mistral Medium 3.5, now that 3.1 has left OpenRouter - #404

Merged
calebl merged 2 commits into
mainfrom
fm/ta-model-mistral-35
Dec 4, 2026
Merged

calebl merged 2 commits into
mainfrom
fm/ta-model-mistral-35

Conversation

@calebl

@calebl calebl commented Dec 4, 2026 •

Copy link
Copy Markdown
Collaborator

mistralai/mistral-medium-3.1 has no OpenRouter endpoints and is gone from OpenRouter's public model list (seen 2026-12-04). So every call in the game fell through to minimax/minimax-m3, which refused prompts mistral used to write.

This PR moves the game to mistralai/mistral-medium-3-5 (Mistral Medium 3.5), the successor OpenRouter lists:

  • Price: $1.50 / $7.50 per million input / output tokens, against 3.1's $0.40 / $2.00.
  • Structured outputs: its one endpoint (Mistral) advertises both response_format and structured_outputs, checked endpoint by endpoint with the command in BaseAgent's note. This used only the free public /api/v1/models and /endpoints lists.
  • Pricing data: RubyLLM 2.1.0's bundled registry already has the id at those prices.

Paired engine PR

The Rust engine keeps its own copy of the rotation, so this pairs with renderedstep/engine#104, which changes only that model name.

  • The extension pins that PR's merge commit (73defe7). It pinned the PR's head (464e676) until the merge; no engine source changed between the two.
  • The two must move together, because the relay (Relay::Request.models) forwards only models on BaseAgent::REMOTE_MODEL_IDS.

Where the live game picks its model

  • BaseAgent::REMOTE_MODEL_IDS now starts with mistralai/mistral-medium-3-5. minimax/minimax-m3 stays second.
  • config/initializers/ruby_llm.rb: default_model is the same id.
  • ext/renderedstep/Cargo.toml / Cargo.lock pin the engine head above.
  • README names the new default.

Comments

  • The notes on the rotation in BaseAgent and BaseAgent::Refusal keep 3.1's measurements as what 3.1 did: 0 of 52 refusals, the speed, the thinner prose.
  • They now also say plainly that 3.5 has not been measured on any of them.
  • The EVALUATION.md baseline of 2026-09-05 now reads in the past tense.

No prompt or other text a model reads changes.

Eval and bench commands

The stored records stay as they are. db/eval/**, the baselines, the corpora, and EXPECTED-style figures all still say 3.1, because 3.1 is what ran.

Tests changed to name the arm they measured. These tests checked that stored sets were run on BaseAgent::REMOTE_MODEL_IDS.first. They now name the arm the sets were bought on (3.1) instead:

  • KeptSetsTest::MEASURED_ARM
  • RebaselineReceiptsTest

Benches that follow the live list now default to 3.5. Each of these stores a 3.1 baseline, so a run is now a 3.5 run judged against that baseline, which is a cross-model comparison:

  • rake eval:prompt, rake eval:classifier, rake eval:realization, and the other benches defaulting to BaseAgent::REMOTE_MODEL_IDS(.first)
  • Eval::Cost.default_model
  • the lab: tasks

Live bench pins changed, because leaving them meant commands that can no longer run. Each named 3.1 by name and halts if any other model answers:

  • Eval::Arrival::Budget::MODEL (the arrival bench)
  • Eval::Dialogue::Budget::MODEL (the dialogue bench)
  • Eval::Classifier::Pointer::Paraphrases::LABELLER (rake eval:pointer_paraphrases). A labelled row's source names the labeller, so rows labelled on 3.1 stay distinguishable.

Left alone: worked examples in EVALUATION.md that pass MODELS=mistralai/mistral-medium-3.1 explicitly. They record the commands that were run, and would now fail if re-run as written.

Not changed, and worth deciding separately

Player::Allowance::TURN_RESERVATION_USD ($0.03) is documented as derived from "the registry price of the front model". The front model is now 3.75x 3.1's price.

  • A turn that costs more than its reservation is the documented overrun case: the next turn is refused, and the provider key's credit limit is the backstop.
  • Whether to raise the reservation is a spending decision, so it is not made here.

Checks

All run with OPENROUTER_API_KEY and TYPESAFE_API_KEY unset:

  • bin/rails test: 5597 runs, 0 failures, 0 errors, 1 skip (no headless Chrome here).
  • bundle exec rubocop: no offenses.
  • bin/rails zeitwerk:check: all good.
  • bin/brakeman --no-pager: no warnings.

The extension was built with bin/rails engine:build against the pinned engine merge commit. No paid model call was made.

Re-check plan (not run, nothing spent): one rake eval:prompt pass on 3.5 (90 cases x 4 reps = 360 calls; on the last kept set, prompt-2026-10-29-dressed, that was 296,696 input + 51,721 output tokens, so about $0.83 at $1.50/$7.50 per million, against $0.22 on 3.1), judged with rake eval:prompt_compare against that 3.1 set.

mistralai/mistral-medium-3.1 has no OpenRouter endpoints and is gone from
OpenRouter's model list, so every call fell through to minimax/minimax-m3,
which refused prompts mistral had written. mistralai/mistral-medium-3-5 is
the successor OpenRouter lists ($1.50 / $7.50 per million tokens); its one
endpoint advertises response_format and structured_outputs.

BaseAgent::REMOTE_MODEL_IDS and RubyLLM's default model name it first, and
the extension pins renderedstep/engine#104's head (464e676), which moves the
engine's own copy of the list. The relay forwards only models on
BaseAgent's list, so the two move together.

The notes on the rotation keep what 3.1 measured, as the past it is, and
say 3.5 is unmeasured. Stored eval sets were bought on 3.1 and stay as they
are; the tests that read them name that arm instead of reading the live
list. The arrival and dialogue benches and the pointer-paraphrase labeller
pinned 3.1 by name and could no longer run, so they name 3.5.
No engine source changed between the two pins.
@calebl
calebl merged commit bf9d54b into main Dec 4, 2026
4 checks passed
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