Skip to content

feat(opencode): add an experimental in-process provider - #628

Merged
caigee-cmd merged 2 commits into
mainfrom
feat/open-code-provider
Dec 2, 2026
Merged

caigee-cmd merged 2 commits into
mainfrom
feat/open-code-provider

Conversation

@caigee-cmd

Copy link
Copy Markdown
Owner

Summary

  • Add an experimental in-process OpenCode provider. Paste an API key and choose Go or Zen (opencode-key-v1). There is no browser login, check-in, or batch import.
  • Route each model to Responses, Anthropic Messages, or Chat Completions, and translate tool calls back to OpenAI chat chunks. finish_reason is tool_calls when the model calls a tool.
  • Go accounts read GET /v1/usage into the existing account-card windows: 5-hour, weekly, and monthly. Refresh and refresh-credits use that snapshot. Zen has no public balance endpoint, so its card stays unknown instead of showing a zero balance.

Fixes #527

Paste an API key and choose Go or Zen. Requests follow the official
model routing, tool calls come back as OpenAI chunks, and a Go account
shows the 5-hour, weekly, and monthly usage windows.
Parse the documented Go usage body, including a rate-limited window,
a real zero reading, and a missing route. Zen still says usage is
unavailable. Other providers keep their own quota parsers.
@caigee-cmd
caigee-cmd merged commit 9a82d28 into main Dec 2, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

考虑添加Opencode提供商吗?

1 participant