Skip to content

v2: Opencode Zen models return CreditsError while works with v1 #37161

Description

@mabadir

Description

OpenCode Zen requests consistently fail in OpenCode v2 with HTTP 401 CreditsError, even though the workspace has available credits.

The same Zen account and credits still work in OpenCode v1. Every Zen model tested fails in v2, and re-authenticating does not resolve the issue.

Expected behavior: Zen requests in v2 should use the workspace's available credits and complete successfully.

Actual behavior:

Provider request failed with HTTP 401:
{"type":"error","error":{"type":"CreditsError","message":"No payment method. Add a payment method here: https://opencode.ai/workspace/<workspace-id>/billing"}}

This reproduces every time and started after upgrading to v2.

Plugins

  • otty-integration.js
  • @datadog/opencode-plugin
  • @warp-dot-dev/opencode-warp@0.1.5

OpenCode version

opencode2 v0.0.0-next-15615 (next channel)

Steps to reproduce

  1. Sign in to an OpenCode Zen workspace with available credits.
  2. Run OpenCode v2.
  3. Select any OpenCode Zen model.
  4. Send any prompt.
  5. Observe an HTTP 401 CreditsError claiming that no payment method is configured.
  6. Re-authenticate and retry; the error remains.
  7. Use the same account and credits in OpenCode v1; the request succeeds.

Screenshot and/or share link

Not available.

Operating System

macOS, Darwin 25.5.0 arm64

Terminal

otty (TERM=xterm-256color, COLORTERM=truecolor), zsh

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions