openclaw - 💡(How to fix) Fix [Feature]: Support separate Zen and Go API key env vars

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Support OPENCODE_ZEN_API_KEY and OPENCODE_GO_API_KEY as primary environment variables for Opencode GO (Subscription API KEY) and Opencode ZEN (Pay-as-you-go API key) providers.

Root Cause

Support OPENCODE_ZEN_API_KEY and OPENCODE_GO_API_KEY as primary environment variables for Opencode GO (Subscription API KEY) and Opencode ZEN (Pay-as-you-go API key) providers.

RAW_BUFFERClick to expand / collapse

Summary

Support OPENCODE_ZEN_API_KEY and OPENCODE_GO_API_KEY as primary environment variables for Opencode GO (Subscription API KEY) and Opencode ZEN (Pay-as-you-go API key) providers.

Problem to solve

Currently OPENCODE_API_KEY is used by both opencode-go and opencode plugins which makes it a mess, it is wrong.

Both opencode and opencode-go plugins use the same OPENCODE_API_KEY, so user can't provide 2 separate API keys for both offerings. Openclaw would use OPENCODE_API_KEY for both opencode and opencode-go plugins, making it impossible to switch between ZEN and GO at the same time.

Proposed solution

Instead Openclaw should support OPENCODE_ZEN_API_KEY as primary env variable in opencode plugin, and OPENCODE_GO_API_KEY in opencode-go plugin. This ensures user can specify 2 API keys and control which offering from Opencode is actually used.

Fallback to OPENCODE_API_KEY would preserve backward compatibility, in case if user uses only opencode plugin or opencode-go plugin.

Alternatives considered

No response

Impact

Affected: opencode and opencode-go plugins, env variables management, but with backward compatibility preserved Severity: blocks workflow Frequency: always Consequence: extra manual work, errors

Evidence/examples

No response

Additional information

Tried to address this in this PR https://github.com/openclaw/openclaw/pull/87762, but can't make it green.

It does work locally however.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING