Skip to content

Releases: duyban23/pi-opencode-zen

v1.2.11 — native tools on free models, self-healing routes

Choose a tag to compare

@duyban23 duyban23 released this 17 Oct 01:27

Fixed

  • Free models can call tools again. The free-tier gate authenticates the client
    through headers alone (User-Agent, x-opencode-client,
    x-opencode-session + x-opencode-session-id); once the duplicate session
    header from 1.2.10 is present it accepts a normal pi request. The body-shaping
    layer (title-generator marker, flattened history, stripped tools) and the
    text-tool protocol that replaced native tools are therefore unnecessary, and
    they were what broke tool calls: big-pickle (zero-cost but without a -free
    suffix) was never converted back into a tool call, mimo-v2.6-flash-free
    emitted several calls inside one fenced block and lost all of them, and
    weaker models invented their own fences. Both are removed; free models now
    send and receive native tools, verified end-to-end (read + bash + follow-up
    turn) on big-pickle, muse-spark-1.3-contributor-free,
    mimo-v2.6-flash-free, nemotron-3-ultra-free and
    nemotron-3.5-lightning-free.
  • GATE_UA tracks opencode 2.0.32. The gate also re-checked its content rules:
    free requests now need stream: true and at least one tool definition, and
    the versionless opencode/cli user agent is rejected; pi's own request
    satisfies all of it, so the body still passes through untouched.
  • Cached catalogs cannot pin a stale protocol any more: healZenRoute
    re-derives the free-tier route from the model id on every read, in
    getModels()/getAllModels() — the accessors every request path uses.
    A models-store.json written by an older version (which survives upgrades
    because pi's post-login refresh is offline) no longer causes
    400 ModelProtocolUnsupported.

Highlights

  • Free models call native tools again — read, bash, multi-turn — with the
    request body passing through untouched.
  • A stale models-store.json can no longer pin a model to a dead protocol;
    routing is re-derived from code on every read (no more
    400 ModelProtocolUnsupported after upgrades).
  • Gate header User-Agent tracks opencode 2.0.32; probed against the live
    gateway (free requests need stream: true + at least one tool definition,
    both of which pi sends anyway).
  • Verified end-to-end on big-pickle, mimo-v2.6-flash-free,
    nemotron-3-ultra-free, nemotron-3.5-lightning-free,
    muse-spark-1.3-contributor-free, and the new beam-free,
    glm-5.3-flash-free, nemotron-3.5-super-vl-free, space-bunny-free,
    deepseek-v4.1-flash-free.

Upgrade: pi install npm:opencode-zen-oauth then restart pi.

v1.2.10

Choose a tag to compare

@duyban23 duyban23 released this 15 Oct 15:37
3ab3180

1.2.10

Fixed

  • Free models were unusable again: every request returned 403 FreeTierError
    because the gate now validates a second header, x-opencode-session-id, that
    freeTierHeaders did not send (verified against opencode 2.0.29).
  • Free models outside the gpt / grok / muse families (cat-jam-free,
    deepseek-v4.1-flash-free, mimo-v2.6-flash-free, ...) returned
    400 ModelProtocolUnsupported. modelFromZen forced every free model onto
    OpenAI Responses, but the gateway serves each one on a fixed protocol:
    Responses for those three families, Chat Completions for the rest.
  • Chat Completions free models rejected pi's own request shape with
    403 FreeTierError. The gate only accepts a title-generator-shaped
    conversation, so a run of three or more user messages (what pi sends for a
    system-reminder-annotated prompt) and native assistant.tool_calls / tool
    turns (what pi sends after a tool run) were both refused. The Completions path
    now flattens the history into one transcript, like the Responses path did, and
    the marker prompt text was resynced with the live one.

v1.2.9

Choose a tag to compare

@duyban23 duyban23 released this 14 Oct 14:58
dfdd387

Added

  • Bounded request retries (parity #6): transient network/server failures retry up to twice with backoff, and 400s naming a rejected option (e.g. temperature) drop the option and retry — only before any response event reaches the consumer.
  • /opencode-zen command (status, switch-org): switch workspace without re-login. Session-scoped; catalog refresh, request org header, and model filtering follow the switch.

Fixed

  • Console test* smoke-test ids and jev* decision-protocol ids no longer leak into the model picker.
  • Failed catalog discovery and cache-only startup keep serving the stored catalog instead of wiping it.

v1.2.8

Choose a tag to compare

@duyban23 duyban23 released this 14 Oct 14:25
18d1542

Fixed

  • Claude models that only accept adaptive thinking (claude-haiku-5-5, claude-sonnet-5/5-5, claude-opus-5/5-5, late 4.x sonnet/opus, claude-fable-5*) no longer fail on Zen with "thinking.type.enabled" is not supported for this model (Issue #10): modelFromZen now sets compat.forceAdaptiveThinking for them, so pi-ai sends thinking.type: adaptive with output_config.effort.

Changed

  • Dev dependencies track pi 1.2.0 (@earendil-works/pi-ai, @earendil-works/pi-coding-agent ^0.99.1 → ^1.2.0).

v1.2.7

Choose a tag to compare

@duyban23 duyban23 released this 14 Oct 03:51

Fixes empty-arguments tool-call failures (filled example + never-empty rule in the text protocol) and tracks CLI UA 2.0.28. Full details in CHANGELOG.md.

v1.2.6

Choose a tag to compare

@duyban23 duyban23 released this 13 Oct 04:53
c293558

Free-tier models work through the v2 content gate again: marker-prompt injection, history collapsing, identity headers, and text-protocol tool calling on free models. Credits to @mojaay (#3) and rabden/pi-opencode-zen (gate research). Full details in CHANGELOG.md.

v1.2.5

Choose a tag to compare

@duyban23 duyban23 released this 12 Oct 02:14

Catalog fix (BYOK gateway check, provider routing that closes #2, empty allowedModels guard, login resilience) + free-tier gate signals across openai-completions, anthropic-messages and openai-responses. Credits to @mojaay for the gate research and base implementation (#3, shipped via #5). Full details in CHANGELOG.md.

v1.2.4

Choose a tag to compare

@duyban23 duyban23 released this 30 Sep 09:16

Exclude free-tier (zero-cost) models from the catalog — Zen rejects them with FreeTierError outside opencode.

v1.2.3

Choose a tag to compare

@duyban23 duyban23 released this 30 Sep 08:15

Verified against pi 0.99.1 and opencode v2.0.20. No code changes.

v1.2.2

Choose a tag to compare

@duyban23 duyban23 released this 26 Sep 02:23

README rewrite (hook-first) + Vietnamese translation. No code changes.