44 Commits
Author SHA1 Message Date
Jason Xu 6d1a3c1098 chore: remove PR test files v1.2.4 2026-09-05 19:47:07 +08:00
Jason Xu bd9ced463a Merge remote-tracking branch 'origin/pr-17' 2026-09-05 19:46:26 +08:00
Jason Xu 908de8dc3d Merge remote-tracking branch 'origin/pr-15' 2026-09-05 19:45:57 +08:00
sk-dev-ai ce89cc01cb fix: nested modalities, per-tier metadata, drop committed cache
- capabilityModel now reads the nested modalities.{input,output} object
  the catalog actually serves; the old top-level input/output tags
  never matched and left both arrays permanently empty.
- Metadata is stored per tier and /v1/models selects by route.Tier,
  so same-named Zen/Go models (glm-5, minimax-m3, ...) advertise the
  limits of the tier that will serve them. Anonymous routes resolve
  to TierZen, keeping the keyless path on Zen metadata.
- Cache schema 2 -> 3; stale flat caches are refused and fall back
  to live refresh.
- Untrack config.json.models.catalog.json and ignore
  *.models.catalog.json: it is a runtime snapshot, not source.
- Add models_test.go fixtures: nested modalities, tier-split limits,
  tier selection, v3 round-trip, v2 rejection.
2026-09-05 12:29:36 +05:30
xiechen 74348cb46f fix: harden stale-reasoning retry per review
- Only treat a retry as success on 2xx; on non-2xx/transport failure
  close the retry response and restore the original 400 body, logging
  reasoning_reference_retry_failed with the retry status.
- Always close the original network body after caching its bytes, and
  hand downstream a fresh in-memory reader (also on read errors).
- Narrow the matcher to explicit 'reasoning item/reference ... not
  found/expired' errors; add negative cases (unknown reasoning field,
  bad reasoning_effort, unrelated 400s).
- Thread a cumulative attempt offset through doUpstreamTiers and the
  anonymous path so retry attempts keep numbering [1 2] per request.
- Add HTTP-level tests via httptest upstream: retry success (with
  stripped-payload assertion), retry non-2xx restore, non-matching
  passthrough, no-op (nothing to strip), cumulative attempt numbers.
2026-09-05 09:37:56 +08:00
sk-dev-ai f3593e3790 feat: emit top-level context_window and capability flags in /v1/models
Discovery clients (jcode, Pi, etc.) read context_length/context_window and
supported_reasoning_levels at the TOP LEVEL of each /v1/models entry, not
inside a nested metadata object. Emit both: keep the rich nested metadata
object AND mirror context_window/context_length/max_input/max_output/
reasoning/tool_call/structured_output at the top level so standard OpenAI
model-discovery clients get correct context windows without config.
2026-09-04 10:56:13 +05:30
sk-dev-ai 04ce09cc9c feat: expose per-model metadata (context window, reasoning, tool call, modalities) in /v1/models
fetchProtocolCapabilities already parses the full opencode catalog but
discards everything except protocol. Capture limit/reasoning/tool_call/
structured_output/modalities per model and expose them in /v1/models so
auto-discovering clients (e.g. jcode, which defaults every model to 200k
when context_window is absent) get correct context and feature flags.

Purely additive: routing/decision logic untouched, legacy response shape
preserved, cache schema bumped to v2 (old v1 caches load fine).
2026-09-04 10:52:11 +05:30
xiechen 462a6c8e36 feat: auto-retry upstream 400 on stale reasoning references
When Zen returns 400 such as "Referenced reasoning item 'rs_...' was
not found or has expired", replay once without the Responses reasoning
input items and previous_response_id under a fresh upstream session
instead of failing the client request. Other 400s pass through
unchanged. Adds unit tests for the classifier and payload stripping.
2026-09-04 11:21:23 +08:00
Jason Xu 2c87495826 feat: improve stream monitoring and model catalog reliability v1.2.3 2026-09-04 02:22:27 +08:00
Jason Xu 3be4b393c0 feat: show upstream key suffix per request v1.2.2 2026-08-27 21:36:17 +08:00
Jason Xu 6a03be875d Merge pull request #14 from Fance-rest/fix/models-dev-refresh-via-proxy
fix: fetch models.dev metadata through configured proxies
2026-08-27 21:16:54 +08:00
Fance-rest f63d8dd0b7 fix: fetch models.dev metadata through configured proxies
The models.dev metadata store used its own plain http.Client, so the
periodic price/deprecation refresh always bypassed the configured proxy
pool and failed on networks where direct access to models.dev is
unreliable or blocked.

Introduce a client provider on the store that resolves candidates at
refresh time: the active runtime's healthy proxy transports first, then
the original direct client as fallback. The provider reads the current
runtime atomically, so WebUI hot reloads automatically pick up new proxy
transports without touching the long-lived store.
2026-08-26 14:26:30 +08:00
Jason Xu 2615455b87 feat: align protocol content conversion with public APIs v1.2.1 2026-08-23 23:17:59 +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 v1.2.0 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 39de3d74ae Merge pull request #8 from Scotlight/fix/anthropic-inline-system-roles
fix: accept inline system/developer roles in Anthropic requests
v1.1.3
2026-08-23 21:08:22 +08:00
Scotlight 37afbbaa15 fix: accept inline system/developer roles in Anthropic requests 2026-08-23 18:36:46 +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 v1.1.2 2026-08-20 04:45:14 +08:00
Jason Xu cc71ba8aff feat: revise free model routing fallback v1.1.1 2026-08-20 04:01:39 +08:00
Jason Xu 6101055ad8 docs: document monitoring and diagnostic workflows v1.1.0 2026-08-20 00:39:07 +08:00
Jason Xu a4d37a8d3a feat: add usage playground and diagnostic views 2026-08-20 00:39:07 +08:00
Jason Xu af133b8f8c feat: redesign authenticated web console 2026-08-20 00:39:07 +08:00
Jason Xu 4f8f195f9f feat: expose authenticated playground diagnostics 2026-08-20 00:39:06 +08:00
Jason Xu 3e0a6f0b62 feat: add compatible model metadata routing 2026-08-20 00:39:06 +08:00
Jason Xu 77b794731a feat: collect token and upstream attempt metrics 2026-08-20 00:39:06 +08:00
Jason Xu c1b1ab8bd2 fix: harden cross-protocol inference conversion 2026-08-20 00:13:10 +08:00
Jason Xu 7c758edfa9 fix: specify repository when publishing releases v1.0.0 2026-08-19 23:40:08 +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 e220e7a040 fix: refine proxy health recovery 2026-08-14 10:10:26 +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