Skip to content

Releases: RC-CHN/command-code-reverse

v0.3.3

Choose a tag to compare

@github-actions github-actions released this 23 Oct 14:36

Fixes false LLM idle timeouts while upstream data is still arriving, and separates transport failures from actual timeouts.

  • Keep streaming and non-streaming responses alive on incoming body bytes, including partial NDJSON lines and heartbeat fragments. There is no new total-duration limit; the defaults remain 30s and 90s.
  • Pause the upstream idle timer while processing events or writing downstream. Reuse one timer per request, guard stale callbacks, and stop it on completion without background read buffers or reader goroutines.
  • Return 504 upstream_idle_timeout for the local watchdog, 504 upstream_timeout for other network timeouts, and 502 upstream_connection_error for interrupted connections. Once SSE starts, send the structured error followed by one [DONE] instead of a successful finish.
  • Preserve cancellation and failure accounting. Local I/O failures do not rotate keys, open breakers, or replay requests. Remove the misleading 429 classification and context-reduction hint for network failures.

Regression coverage includes long fragmented events, heartbeats, continuous reasoning, zero-byte reads, idle response headers/body/tail, connection errors, slow downstream writes, client cancellation, stale timer callbacks, and real local HTTP cancellation with key-pool checks. Go race tests, vet and lint pass.

Existing abort, truncated-response and incomplete-tool validation stays in place. Timeout settings in external gateways such as NewAPI remain independent.

Full changelog: v0.3.2...v0.3.3

v0.3.2

Choose a tag to compare

@github-actions github-actions released this 23 Oct 06:45

Fixes the v0.3.1 regression where a small output budget could produce only reasoning and be incorrectly reported as upstream_incomplete_response.

  • Preserve explicit length / max_tokens finishes in streaming and non-streaming responses, including empty output when reasoning is hidden. Keep the caller's token budget, reasoning, reported usage, and successful dashboard accounting.
  • Match Command Code's refusal aliases in finishReason and rawFinishReason, mapping them to content_filter without treating normal refusals as failures.
  • Follow Command Code 1.87.3's limit of 100 Jev questions per request. Choice options remain limited to 20 by default, or 255 with JEV_UNLOCK_MAX_OPTIONS=true.
  • Refresh the offline CLI fallback to 1.87.3 and add 11 current models; remove retired free Ling entries. Dynamic catalogs retain priority, and explicit model IDs are forwarded unchanged.

Aborts, missing terminal events, incomplete tool calls, and transport failures still fail validation. Existing gateway CoT replay and downstream reasoning parameters retain their behavior.

Validation: Go 1.24 race tests, go vet, golangci-lint 2.1.6, and multi-architecture image CI. Static upstream analysis and provenance are in analysis/v1.87.3/.

Full changelog: v0.3.1...v0.3.2

v0.3.1

Choose a tag to compare

@github-actions github-actions released this 23 Oct 03:07

Full Changelog: v0.3.0...v0.3.1

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 13 Oct 04:50

Adds an optional live dashboard for current-process usage and key routing, without storing prompts, responses or reasoning.

  • Chinese desktop/mobile UI at /dashboard/, protected by a separate administration credential.
  • LLM/Jev and per-key request, token, reported cost and latency statistics; actual retry attribution and independent breaker previews.
  • On-demand account balances, subscriptions, billing-period usage and quota windows, following the Command Code CLI's organization and billing-period queries.
  • Bounded request ring, model dimensions and billing concurrency. Statistics reset on restart; no database or persistent request history.
  • Bounded Prometheus model labels and explicit distinction between zero and unavailable gateway cost.

Enable with DASHBOARD_ENABLED=true, set DASHBOARD_API_KEY, and optionally set DASHBOARD_RECENT_REQUESTS (default 100, range 1–1000). The dashboard is disabled by default; existing API authentication and upstream key rotation remain in place.

Each Kubernetes replica has its own counters. Account billing can include other clients' usage; local reported costs do not represent a complete account invoice.

Validation: Go 1.24 full race suite, go vet, golangci-lint v2.1.6, desktop/mobile browser flows, and read-only upstream billing/usage queries.

Images: ghcr.io/rc-chn/command-code-reverse/commandcode-proxy:0.3.0 and :latest (linux/amd64, linux/arm64).

Binary archives cover Linux amd64/arm64, macOS amd64/arm64 and Windows amd64, with checksums.txt.

v0.2.2

Choose a tag to compare

@github-actions github-actions released this 08 Oct 07:16

Fixed

  • Report upstream streams that end without a finish or explicit abort
    event as upstream_truncated: HTTP 502 before output, or an in-band error
    after SSE starts. Do not turn partial responses into successful completions
    or count them as successful requests. Preserve the CLI's explicit abort
    handling and complete terminal events without trailing newlines.
  • Correct the fallback context length for Step 3.5 Flash to 262,144 tokens.

Added

  • Record cache-write tokens separately in completion logs and
    commandcode_proxy_tokens_total{kind="cache_write"}. Read nested usage and
    cache-write-tokens events, including events after finish; use the last
    valid event only when the total is zero. Ignore invalid optional counts,
    avoid double-counting, and preserve downstream OpenAI usage fields.

Changed

  • Refresh the offline CLI version fallback to 1.79.1 following static
    protocol analysis. Explicit pins and automatic registry refresh still apply.
  • Add DeepSeek V4.1 Flash Fast, Ling 3.1 Flash, Mistral Large 4 and Glyph
    Cluster to the fallback model catalog. Dynamic upstream catalogs retain
    priority, and explicit model IDs continue to be forwarded unchanged.

Downloads

Five platform archives and checksums.txt are attached. Container image: ghcr.io/rc-chn/command-code-reverse/commandcode-proxy:0.2.2 (linux/amd64 and linux/arm64).

Validation

Go 1.24 full race regression tests, go vet, and golangci-lint v2.1.6 passed locally. Main/tag CI and the release workflow passed. All five archive SHA-256 checksums were verified, and the Linux amd64 binary reports v0.2.2. The GHCR image includes linux/amd64 and linux/arm64; latest matches 0.2.2.

Full comparison

v0.2.1

Choose a tag to compare

@github-actions github-actions released this 24 Sep 06:55

修复多轮对话和工具续写中,assistant 历史思考内容在转发上游时丢失的问题。

  • 支持回传 reasoning_content 和 content 数组中的 reasoning 分块,保留文本与顺序。
  • 保留只有思考、空正文加工具调用的 assistant 消息,避免重复发送两种表示中完全相同的思考。
  • 遵循 Command Code 网关原版行为:下游未提供思考时不补写,不新增签名或加密 reasoning 协议。

已通过转换与流式/非流式工具续写回归、race、vet、lint;真实上游验证包含 DeepSeek、Luna 的明文思考回传和 Gemini 的工具续写。

无需新增配置。提供五个平台的二进制、校验和,以及 Linux amd64/arm64 容器镜像:
ghcr.io/rc-chn/command-code-reverse/commandcode-proxy:0.2.1

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 22 Sep 09:32

Full Changelog: v0.1.7...v0.2.0

v0.1.7

Choose a tag to compare

@github-actions github-actions released this 17 Sep 07:22

多图请求处理、并发稳定性与 Command Code 1.54.2 兼容更新。

修复

  • 上游 NDJSON 不再受 4 MiB 单行限制,支持包含多张 base64 图片的 start-step 请求回显。
  • 完整尾行事件先于网络读取错误处理,避免把已经收到的 USAGE_EXCEEDED 等错误误报为超时。
  • 请求体超限返回明确的 HTTP 413,并提示当前字节上限及 MAX_BODY_BYTES 配置。
  • 熔断器使用请求代次隔离迟到响应,修复半开探测与请求取消下的状态竞争。
  • 模型列表和 readiness 的网络请求移出缓存锁;并发刷新合并、支持独立取消等待,模型缓存按凭证隔离并限制容量。

更新与性能

  • 默认请求体上限从 10 MiB 提高到 64 MiB(67108864 字节),启动时可通过 MAX_BODY_BYTES 覆盖。
  • 离线 CLI 版本兜底更新到 1.54.2,静态目录新增 DeepSeek V4.1 Flash 和 Ling 3.0 Flash Sante。
  • SSE 转发不再累积完整文本;非流式响应改用 strings.Builder,减少内存分配。
  • 保留动态模型目录优先、版本 pin 和自动刷新行为;新模型的实际访问权限由上游账户决定。

升级说明

已有 .env 中显式设置的 MAX_BODY_BYTES=10485760 会继续生效。需要新上限时改为 MAX_BODY_BYTES=67108864 后重启。

发布附件包含 Linux amd64/arm64、macOS amd64/arm64、Windows amd64 二进制包及 checksums.txt。

Docker 镜像:ghcr.io/rc-chn/command-code-reverse/commandcode-proxy:0.1.7,同时更新 0.1 和 latest 标签。


What's Changed

  • fix(proxy): handle large image requests and preserve stream errors by @FFFold in #3

New Contributors

  • @FFFold made their first contribution in #3

Full Changelog: v0.1.6...v0.1.7

v0.1.6

Choose a tag to compare

@github-actions github-actions released this 09 Sep 08:54

Full Changelog: v0.1.5...v0.1.6

v0.1.5

Choose a tag to compare

@github-actions github-actions released this 02 Sep 15:38

Full Changelog: v0.1.4...v0.1.5