Skip to content

OpenCode free models fail in GHA: "free tier can only be used from within OpenCode" #94

Closed

Description

@jondmarien

Summary

Selecting any OpenCode free model in Pullfrog (e.g. opencode/muse-spark-contributor, or Big Pickle) fails immediately in GitHub Actions with:

Pullfrog session error: Error from provider (Console): OpenCode's free tier can only be used from within OpenCode

This happens no matter which free model is chosen. The check run is marked failure.

Related public reports of the same provider error (outside Pullfrog):

Environment

From a failing Pullfrog run on D-Sports-Ecosystem/d-sports-api:

Field Value
Pullfrog runtime 0.1.81
Model opencode/muse-spark-contributor (modelExplicit: false)
Trigger workflow_dispatch / Pullfrog workflow
Actor pullfrog[bot]
Runner cwd /home/runner/work/... (GitHub-hosted)
Package manager [email protected]
Run https://github.com/D-Sports-Ecosystem/d-sports-api/actions/runs/35314849414

Reproduction

  1. Configure Pullfrog to use an OpenCode free-tier / Console model (any free option tried).
  2. Trigger a Pullfrog run on a PR or via workflow_dispatch.
  3. Observe session abort within a few seconds; check run finalized as failure.

Excerpt from run log

************* RUNTIME *************
version: 0.1.81
model: opencode/muse-spark-contributor
modelExplicit: false
effort: 1
triggerer: jondmarien
cwd: /home/runner/work/d-sports-api/d-sports-api
...
github_event_name: workflow_dispatch
github_actor: "pullfrog[bot]"
github_workflow: Pullfrog

» installed agent-browser skill (opencode)
» using [email protected] from package.json (packageManager)
» running: bun install --frozen-lockfile
» opencode server up: http://127.0.0.1:4096
» opencode session: ses_...
[FastMCP warning] could not infer client capabilities after 10 attempts. Connection may be unstable.
» Pullfrog session error: Error from provider (Console): OpenCode's free tier can only be used from within OpenCode
» Pullfrog turn completed in 4195ms
» finalized pullfrog check (failure)

bun install --frozen-lockfile output
Warning: » installNodeDependencies: `bun install --frozen-lockfile` failed:
bun install v1.4.2 (744846f84)

[spawn] bun: killed by signal SIGKILL
Error: action failed: provider error: Error from provider (Console): OpenCode's free tier can only be used from within OpenCode

Expected

Either:

  1. Free OpenCode Console models work when invoked by Pullfrog in GitHub Actions (if that is a supported path), or
  2. Pullfrog’s model picker / docs clearly exclude free Console models for GHA and fail fast with a clear “use BYOK / OpenCode Go / paid provider” message instead of a failed check after spinning up OpenCode.

Notes

  • Pullfrog itself is BYOK / subscription-oriented; this may be OpenCode enforcing “TUI/desktop only” for free Console traffic when the client is headless GHA + Pullfrog.
  • Secondary noise in the same log: bun install --frozen-lockfile was SIGKILL’d, but the action’s final error is the provider free-tier message.
  • Happy to provide another failing run URL or try a specific non-free model path if useful.

Thanks!

Activity

  1. pullfrog commented on Sep 18, 2026

    @pullfrog
    Contributor

    Analysis

    Verified against the live Zen API and this checkout:

    • The free ids are still served. GET https://opencode.ai/zen/v1/models today lists big-pickle, muse-spark-1.3-contributor-free, mimo-v2.5-free, union-alpha, minimax-m2.5, plus several other *-free rows. So this is not a dead-model / catalog-drift failure.
    • The refusal is returned to a valid key. A bogus key on the same endpoint gets {"type":"error","error":{"type":"AuthError","message":"Invalid API key."}}, not the free-tier message. Zen is gating on who the caller is (account tier / client origin), not on the key being absent or wrong.
    • A free pick has no fallback route by design. isFree (models.ts:535-546, :743-790) is what makes run-context skip the Router proxy mint, so a free Zen model runs strictly BYOK on your OPENCODE_API_KEY — when Zen refuses, there is nothing else for the run to fall to.
    • Why the check is a bare failure: the message arrives as an AssistantMessage.error and is returned verbatim as provider error: … (agents/opencode.ts:874-881). Nothing in PROVIDER_ERROR_PATTERNS (utils/providerErrors.ts:41-138) matches it, so renderRunError falls through to the generic branch and the comment carries no explanation or CTA. That is exactly the gap your option 2 describes.
    • The bun install … SIGKILL line is unrelated noise. Prep-step failures are logged as warnings and cannot end a run (prep/index.ts:13-15).

    Option 1 (make free-tier work headless) is upstream policy and not ours to fix. Option 2 is, and it is small.

    Plan

    Milestone 1 — classify and explain the refusal

    • utils/providerErrors.ts: add PROVIDER_FREE_TIER_CLIENT_ONLY_LABEL with pattern /free tier can only be used from within OpenCode/i, placed with the other payload-shaped patterns above the status-code block, plus an isOpenCodeFreeTierClientOnly predicate. Deliberately not PROVIDER_BILLING_EXHAUSTED_LABEL — there is nothing to top up, same reasoning that produced PROVIDER_USAGE_LIMIT_LABEL (:9-16).
    • utils/runErrorRenderer.ts: add formatOpenCodeFreeTierClientOnly, modelled on formatProviderNoRoutableEndpoints (:312-326), branching alongside the other classified provider branches (~:456). Copy: the key is valid, Zen restricts its free allowance to the OpenCode client so a headless GitHub Actions run is refused, nothing was billed; pick a Zen model the workspace is funded for or add another provider key. CTAs from PROVIDER_DASHBOARDS.opencode (utils/providerDashboards.ts:110-114) plus console model settings.
    • Tests: utils/providerErrors.test.ts (asserts the new label and that it does not classify as billing-exhausted) and utils/runErrorRenderer.test.ts (summary names the free tier and links Zen).

    Outcome: the same run still fails, but with an actionable comment instead of a blank one.

    Milestone 2 — fail fast before the agent spawns (gated on the spike below)

    Nothing today can know the state pre-flight: verifyCredential's probe table has no OPENCODE_API_KEY row (utils/credentialCheck.ts), and opencode models lists the free ids for any valid key, so captureAuthorizedModels waves it through. Only a real one-token completion against the resolved free model discriminates. If we build it, the site is checkConfiguredCredentials (utils/credentialFallback.ts), gated to alias.isFree, routing a refusal into the existing replacement-model swap or a hard fail carrying Milestone 1's copy. credentialCheck.ts must stay free of env / @actions/core reads — the env-dependent half belongs in the caller.

    Spike — one question that decides Milestone 2

    Does any paid Zen model (e.g. opencode/claude-sonnet or opencode/gpt-5-nano) run with the same OPENCODE_API_KEY from the same workflow?

    • Also fails with a credits/billing error → the workspace is simply unfunded, Milestone 1's copy should point at Zen billing, and Milestone 2 is unnecessary.
    • Paid works, only free ids fail → the gate is per-model client-origin and the Milestone 2 probe is worth building.

    A run URL for either outcome is enough.

    Milestone 3 — picker and docs (separate repo)

    The model picker and its free-tier labelling live in the console app, not in this action. Free Zen aliases do work on a funded workspace (our own CI exercises opencode/big-pickle), so hiding or dropping them from models.ts would be wrong. Once Milestone 1 lands, the follow-up is a console-side issue to annotate free Zen picks with the funded-workspace caveat for headless runs.

    Non-goals: removing isFree aliases from the catalog; routing free picks through Router (the proxy-mint skip is server-side, outside this repo).

    Note: the duplicate-issue lookup returned a 500 on both attempts, so no automated duplicate scan ran — I confirmed by hand that nothing in this repo currently handles this error string. Not started on implementation, as requested.

    Pullfrog  | Implement plan ➔ | View workflow run | via Pullfrog | Using Claude Opus (free via Pullfrog for OSS) | 𝕏

  2. colinhacks commented on Oct 29, 2026

    @colinhacks
    Member

    Fixed in v0.1.82: free OpenCode Zen models run from GitHub Actions again. Re-checked today on v0.1.104, where opencode/big-pickle completes a full Pullfrog run on a GitHub-hosted runner with no free-tier refusal.

    Two notes for your setup:

    • Zen retired muse-spark-1.3-contributor-free on 2026-10-17. A repo still set to opencode/muse-spark-contributor now runs on Big Pickle instead.
    • If Zen's free tier refuses a run again, the run's comment now says so and links to the model settings, instead of failing with the raw provider error.
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions