Skip to content

v0.2.4 — two new venues, one of which settles

Latest

Choose a tag to compare

@theo-titonis theo-titonis released this 24 Aug 02:37
· 7 commits to main since this release

Two new venue drivers. One of them settles at a batch tier and has the receipt
to prove it; the other is blocked on billing and has a receipt saying that.

Google Gemini — settles

| 2026-08-24-gemini-1 | 5 jobs | gemini:batch | $0.00919 | $0.00460
| $0.00460 (50.0%) | 5/5 |

Zero sync fallbacks, 2m36s end to end. The first venue outside OpenAI and
Anthropic here to capture the spread rather than record why it could not.

It is also the first venue that is not OpenAI-shaped, so the driver carries a
real translation layer:

  • messages → contents/parts, assistantmodel, and a system message
    lifted onto system_instruction rather than sent as a turn
  • params → a typed config (max_tokensmax_output_tokens), with unknown keys
    dropped rather than forwarded, because an unknown key is a hard error found
    hours after a batch is submitted
  • no custom_id: the job id rides in the request's metadata and comes back on
    the response
  • twelve job states, with PARTIALLY_SUCCEEDED treated as a completion so the
    work that succeeded is not discarded

Thinking tokens are billed as output and counted as output.
usageMetadata reports thoughtsTokenCount apart from candidatesTokenCount;
a receipt reading only the visible answer would have reported roughly a tenth of
this bill.

Mistral — driver complete, tier closed

POST /v1/batch/jobs answers 402 … enable billing via the console. Everything
else works: file upload with purpose=batch is reachable, sync completions
return 200, and all 24 jobs of 2026-08-24-mistral-1 settled through the sync
fallback at list, capturing nothing. That is on the ledger next to the rows that
captured 50%.

The driver handles Mistral's own shape: one model per batch (taken at create and
applied to the whole file, so a mixed batch is refused by name), timeout_hours
as the completion window, and seven job states with TIMEOUT_EXCEEDED mapped to
failed rather than cancelled.

Prices

Mistral and Google rows join the bundled sheet, keyed on family prefixes so a
dated SKU inherits its family. Gemini 3.7/3.6 Flash carry their introductory
rates with the 2027-01-01 step-up as PromoNotes.

Two prefix hazards are handled rather than left to be discovered:
gemini-3.5-flash would otherwise swallow gemini-3.5-flash-lite, and
gemini-3.1-flash-lite is left off entirely because its id is a prefix of an
image model whose rate is not on the text sheet.

Upgrading

pip install -U offpeak
pip install "offpeak[gemini]"   # or [mistral]

No API changes. Both new venues are opt-in — their own extras, outside all,
outside default_venues().