Skip to content

feat(llm): add OpenCode Zen polish provider, default deepseek-v4-flash - #1023

Open
zhou-zhichao wants to merge 2 commits into
Open-Less:betafrom
zhou-zhichao:feat/opencode-llm-provider
Open

feat(llm): add OpenCode Zen polish provider, default deepseek-v4-flash#1023
zhou-zhichao wants to merge 2 commits into
Open-Less:betafrom
zhou-zhichao:feat/opencode-llm-provider

Conversation

@zhou-zhichao

@zhou-zhichaozhou-zhichao commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Goal

OpenCode is available as a Less Computer CLI backend, but is missing from Settings → AI providers for dictation polish. Add OpenCode Zen as a polish LLM provider with deepseek-v4-flash over the OpenAI-compatible /zen/v1/chat/completions endpoint.

Usage

  1. Settings → AI providers → add channel → OpenCode Zen
  2. Paste an OpenCode API key from https://opencode.ai/auth
  3. Keep the model as deepseek-v4-flash

For an OpenCode Go subscription, change the same card's Base URL to https://opencode.ai/zen/go/v1 and use the Go console key.

The thinking toggle uses DeepSeek's thinking.type (off by default). A custom endpoint whose host contains opencode.ai gets the same fallback.

Implementation

  • Register OpenCode in the shared Core cloud provider list and provider descriptors, including its default endpoint, model, and credential policy.
  • Keep thinking controls and their tests in crates/openless-core/src/polish.rs.
  • Add the frontend label and translations; channel defaults come from Core descriptors.

Verification

Run from openless-all/app:

  • cargo test --locked -p openless-core — 886 passed, 1 ignored.
  • npm run build — TypeScript and Vite build passed.
  • node scripts/frontend-test-runner.mjs — all 69 test files passed.

Regression coverage includes provider registration and defaults, API key requirements at the default endpoint, thinking enabled/disabled for the preset and a custom Go endpoint, and frontend consumption of Core defaults.

Scope

Does not change Less Computer / OpenCode CLI, and does not change ASR.

@zhou-zhichaozhou-zhichao changed the title feat(llm): 增加 OpenCode Zen 润色提供商,默认 deepseek-v4-flashfeat(llm): add OpenCode Zen polish provider, default deepseek-v4-flashSep 2, 2026
Dictation polish uses OpenAI-compatible chat/completions. For OpenCode Go, change the Base URL to /zen/go/v1.
@zhou-zhichao
zhou-zhichaoforce-pushed the feat/opencode-llm-provider branch from e4a14cc to 4cfacf1CompareSeptember 2, 2026 01:20
@H-Chris233H-Chris233 self-assigned this Sep 7, 2026
@H-Chris233

Copy link
Copy Markdown
Collaborator

开始审查

@H-Chris233

Copy link
Copy Markdown
Collaborator

暂缓合并本 PR,优先完成 #1039。OpenCode Zen 的模型分别使用 Chat Completions、Responses 和 Messages,而当前实现固定走 Chat Completions。待 #1039 支持按渠道手动选择请求格式后,再更新本 PR 并验证各协议路径。

Sign up for freeto 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.

2 participants

@zhou-zhichao@H-Chris233