34 Commits
Author SHA1 Message Date
Jason Xu ef2df3f056 fix: correct free-model probes and add adaptive reasoning (#54) 2026-10-08 00:19:40 +08:00
Jason Xu df119c48e4 发布准备:合入 #36、#46、#48、#49、#50、#53;修复 #42、#44、#51、#52,并添加 GPL-3.0-or-later。
保留 reasoning 配置,新增免费模型可用性探测 / 手动恢复、首 SSE 事件超时,元数据改用官方地址。按维护者要求,最终文件树排除测试文件。

验证:本地 Go 回归、go vet / build、Prettier、JS / shell 语法及独立实例管理端验收通过。
2026-10-07 19:55:34 +08:00
Jason Xu 31c35704be Merge pull request #36: model rotation, quotas and API key management 2026-10-07 19:37:30 +08:00
Jason Xu ba07ae1ae3 Merge pull request #46: document System One 2026-10-07 19:34:35 +08:00
CheerC 5dddf26d1e feat: fill missing model limits from models.dev
`/v1/models` only advertised context and token limits for models that
OpenCode's capability catalog describes. Everything else fell back to the
defaults a discovery client hardcodes (128k context / 16k output), which
made every such model look identically small to CLIProxyAPI and Pi.

models.dev already publishes `limit.context`, `limit.input` and
`limit.output` for the OpenCode providers, and the gateway already fetched
that file for pricing and deprecation only. Store those limits in the
metadata cache and fill the fields the capability catalog omitted.

The capability catalog stays authoritative: capability flags always come
from it, and a limit it published is never overwritten. This also merges
the other OpenCode provider tiers instead of returning the first provider
alone, so models that only one tier describes keep their cost, anonymous
eligibility and limits.

Clients holding a metadata cache written by an earlier build keep their
old data until the next refresh; deleting config.json.models.dev.json
forces an immediate refetch.
2026-10-06 18:03:51 +08:00
sk-dev-ai 437fab54ea docs: document System One endpoint and stream-retry semantics
POST /v1/systemone existed since v1.3.3 with zero README coverage:
add the route to the endpoint table, a usage section (verbatim relay,
no translation, streaming replies relayed without reset recovery) in
both English and Chinese, and soften the absolute no-retry sentence to
match the stale-reasoning repair behavior.
2026-10-04 19:54:18 +05:30
Jason Xu 8e776c43b5 style: format webui and documentation 2026-09-21 14:38:30 +08:00
Jason Xu 683b7e9af0 feat: expose configurable reasoning effort 2026-09-21 14:34:00 +08:00
haverainlilili 3440273f43 feat: 新增模型轮转、额度看板和密钥管理 2026-09-21 10:18:21 +08:00
Jason Xu 46def7fedc refactor: organize Go packages and remove test files
Move the command to cmd/opencode2api and group production code into
configuration, gateway, protocol, model, admin, telemetry and helper packages.
Keep shared state private behind context, metrics and runtime interfaces.

Remove the requested test files and replace test-only CI jobs with vet/build
checks. Update Docker and release build paths, preserve version injection and
make the WebUI an explicit embedded asset package.

Add directory trees and source reading guides to both READMEs. Anchor binary
ignore rules so the command package is tracked.
2026-09-15 01:28:44 +08:00
Jason Xu ea29a62eca fix: harden gateway routing and protocol fidelity
Preserve request parameters, tool-call completion reasons and retry session
affinity. Bound upstream header waits, stop expired-context scans and add
opt-in redacted request-body diagnostics.

Isolate Playground diagnostics from production pools, report stream failures
accurately, align readiness with discoverable models and honor Docker listen
configuration.

Split Go and WebUI modules by responsibility, add regression tests and CI,
standardize formatting and rewrite the English and Chinese READMEs.

Refs: #6, #18, #19, #20, #21, #22, #23, #24, #25
2026-09-15 00:43:35 +08:00
Jason Xu 2c87495826 feat: improve stream monitoring and model catalog reliability 2026-09-04 02:22:27 +08:00
Jason Xu 3be4b393c0 feat: show upstream key suffix per request 2026-08-27 21:36:17 +08:00
Jason Xu 3776da76ec fix: harden cross-protocol streaming semantics 2026-08-23 22:53:22 +08:00
Jason Xu 4f0f26711a fix: preserve cache usage across protocol conversion 2026-08-23 22:12:22 +08:00
Jason Xu c4c1f36d61 fix: sync OpenCode model capabilities dynamically 2026-08-23 22:06:27 +08:00
Jason Xu 25885c4e25 Remove DeepSeek default protocol override 2026-08-22 23:24:20 +08:00
Jason Xu 948ef0be11 feat: publish container images to GHCR 2026-08-20 04:45:14 +08:00
Jason Xu cc71ba8aff feat: revise free model routing fallback 2026-08-20 04:01:39 +08:00
Jason Xu 6101055ad8 docs: document monitoring and diagnostic workflows 2026-08-20 00:39:07 +08:00
Jason Xu 031e3beb9f ci: add automated release builds 2026-08-19 23:37:12 +08:00
Jason Xu 8e131dcf3b feat: add anonymous Zen support 2026-08-17 12:40:24 +08:00
Jason Xu fdae1902a0 feat: add authenticated web management console 2026-08-16 04:29:43 +08:00
Jason Xu 40024ea5e8 feat: load proxy pool from file 2026-08-16 03:37:36 +08:00
Jason Xu e68a0b9d19 fix: normalize tool reasoning history across protocols 2026-08-15 03:23:16 +08:00
Jason Xu 1c149e3657 fix: normalize Anthropic tool thinking history 2026-08-15 02:52:28 +08:00
Jason Xu 52f19b7bd3 fix: preserve reasoning and add session affinity 2026-08-14 17:18:07 +08:00
Jason Xu 4d10eac974 refactor: rewrite protocol forwarding 2026-08-14 16:57:30 +08:00
Jason Xu efbdb6e7d1 fix: normalize tool history and improve health checks 2026-08-14 16:17:36 +08:00
Jason Xu 66e1ef176e Fix clone command and improve Docker instructions
Update project clone command and clarify Docker usage.
2026-08-14 11:04:42 +08:00
Jason Xu a2a58e1e0d feat: add Docker Compose deployment 2026-08-14 11:02:50 +08:00
Jason Xu adb0edb64a config: make zen/go preference configurable via prefer field
Add a top-level "prefer" config field ("zen" or "go", default "go") that
controls which upstream is used when a model is available in both pools,
including during the temporary model-discovery fallback. Previously Zen
was always preferred.
2026-08-14 10:34:08 +08:00
Jason Xu 1f603c35a6 feat: add automatic proxy failover and health checks 2026-08-14 09:37:43 +08:00
Jason Xu f32c4a0e61 feat: add OpenCode Zen API compatibility proxy 2026-08-14 08:33:22 +08:00