Skip to content

fix(opencode2): Zen free tier returns HTTP 426 for current 0.0.0 betas #50451

Description

@coygeek

fix(opencode2): Zen free tier returns HTTP 426 for current 0.0.0 betas

Summary

Current OpenCode 2 betas cannot call an OpenCode Zen free model. OpenCode 1.18.31 completes the same request. OpenCode 2 0.0.0-beta-19059 and 0.0.0-beta-19271 both stop with HTTP 426 and the message OpenCode 1.18.0 or newer is required to use the free tier.

Steps to reproduce

  1. Use stable OpenCode 1.18.31 and OpenCode 2 0.0.0-beta-19271. At the time of this check, npm view @opencode-ai/cli dist-tags reported beta as 0.0.0-beta-19271.
  2. From an empty directory, with no plugins, run opencode run --pure --model opencode/mimo-v2.6-flash-free --format json -- 'Reply with exactly: FREE-OK'.
  3. From that same directory, run opencode2 run --standalone --model opencode/mimo-v2.6-flash-free --format json -- 'Reply with exactly: FREE-OK'.
  4. Omit any model variant. Passing #max fails earlier with Variant unavailable and does not reach this provider error.

Expected behavior

An official current OpenCode 2 build can call opencode/mimo-v2.6-flash-free and return the assistant text, as OpenCode 1.18.31 does.

Actual behavior

OpenCode 1.18.31 returns FREE-OK for that model, with provider opencode, model mimo-v2.6-flash-free, and cost 0. OpenCode 2 exits 1. Its JSON error event is provider.invalid-request with status 426 and message Error from provider (Console): OpenCode 1.18.0 or newer is required to use the free tier. The same 426 happens on 0.0.0-beta-19059 and on 0.0.0-beta-19271.

Affected area

OpenCode Zen free tier when the client is OpenCode 2.

Runtime or environment

  • OpenCode 1.18.31
  • OpenCode 2 0.0.0-beta-19271 (also reproduced on 0.0.0-beta-19059)
  • Model opencode/mimo-v2.6-flash-free
  • No plugins
  • macOS 27.0
  • Noninteractive CLI

Evidence

The stable command returns assistant text and step_finish reason stop. The OpenCode 2 command returns one error event and no assistant text. opencode2 --version prints opencode2 v0.0.0-beta-19271, which is below the 1.18.0 minimum named in the error.

Impact

OpenCode 2 cannot use the Zen free models that stable OpenCode 1.18.31 can use. Raising the beta build number from 19059 to 19271 does not change the result, because the reported version remains 0.0.0-beta-*.

Additional context

Related reports from clients that already identify as 1.18.x are #49944 and #49918. This report is the opposite case: the client is a current OpenCode 2 beta, and its own version string is below 1.18.0. The restored check is that opencode2 run --model opencode/mimo-v2.6-flash-free returns assistant text and does not return HTTP 426.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions