Commit Graph
28 Commits
Author SHA1 Message Date
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
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
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