Releases: TriDefender/zcode-api
Release list
v2.1.6
Feat: 根据ZCode3.2.2版本引入了新的Headers,会动态从运行时获取,无需用户介入
Full Changelog: v2.1.5...v2.1.6
v2.1.5
What's Changed
Features
- ci: add release pipeline with multi-platform binaries and Docker image by @greenhat616 in #18
- 更新coding-plan的连接端点来和zcode符合:
在最近的更新里,zcode更改了全部项目的默认端点
对整个项目重新更新,并且包括思考块处理逻辑更改
New Contributors
- @greenhat616 made their first contribution in #18
Full Changelog: v2.1.0...v2.1.5
v2.1.0
Changes
Added
- Added unified session context resolution for both
coding-planandstart-plan. - Added ZCode-compatible trace header generation with exact header order:
x-request-idx-zcode-trace-idx-query-idx-session-id
- Added explicit prefix stripping at header emission time for:
query_sess_subagent_agent_
- Added raw ordered HTTP/1.1 upstream transport for session-aware requests requiring header order parity.
- Added tests for session inference, explicit session passthrough, trace header order, ordered transport wire capture, and start-plan session reuse.
Changed
start-planandcoding-plannow use the same session resolver path.clientIdentity.modeconsistently controls session behavior:off: no session resolutionobserve: infer/log session, but do not forward inferredx-session-idenforce: forward inferred or explicit session IDs upstream
- Explicit
sessionId,queryId,requestId, andtraceIdmetadata are preserved instead of being hashed or remapped. - Start-plan no longer skips lineage inference when
clientIdentity.modeenables it. - Session-aware start-plan requests now use the ordered transport path when not using an injected test fetch implementation.
Fixed
- Fixed header parity for enforced or explicit trace/session requests.
- Fixed start-plan session behavior so inferred sessions can be reused in
enforcemode. - Fixed explicit
sess_...andsubagent_agent_...session IDs being converted into unrelated UUIDs. - Fixed raw ordered transport to reject invalid header names and CRLF-containing header values before opening a socket, preventing header injection.
v2.0.5
What's Changed
-
fix(proxy): align upstream headers & identity with ZCode 3.1.5 by @559889a in #13
-
Zcode start-plan endpoint change and sys_prompt injection content by @TriDefender in #14
Full Changelog: v2.0.5.alpha...v2.0.5
v2.0.4
What's Changed
- Fix 404 related to zcode:// protocal issues by @TriDefender in #12
Full Changelog: v2.0.3...v2.0.4
v2.0.3
v2.0.2
大家好啊,在吸收了大家的反馈(需要debug模式)和我个人使用下,现在发布2.0.2版本。
本次更新的主要内容是:新增 zcode-proxy serve debug 来显示你每次的请求体, 例如
(base) PS D:\zcodeplus> zcode-proxy serve debug
=== zcode-proxy DEBUG MODE ===
config file: config.yaml
server: 0.0.0.0:8080
proxy api key: open (no client auth)
provider: bigmodel
plan: coding-plan
identity: appVersion=3.1.2 sourceTitle=cli referer=https://zcode.z.ai
anthropic base: https://open.bigmodel.cn/api/anthropic
openai base: https://open.bigmodel.cn/api/coding/paas/v4
credential: YOUR_A...HERE (17 chars)
models (6): glm-5.1, glm-5, glm-4.7, glm-4.6, glm-4.5, glm-5.2
log level: info
===============================
zcode-proxy listening on http://0.0.0.0:8080
provider: bigmodel
plan: coding-plan
auth mode: oauth
models: 6 available
debug: ON
#001 debug: translated OpenAI→Anthropic (bytes=2434)
#001 debug: body transformed (upstreamFormat=anthropic, startPlan=false, bytes=2539)
#001 debug: → POST https://open.bigmodel.cn/api/anthropic/v1/messages
#001 debug: accept-encoding=gzip anthropic-version=2023-06-01 content-type=application/json http-referer=https://zcode.z.ai user-agent=ZCode/3.1.2 x-api-key=********** x-query-id=query_a639a4a4-3247-4ca6-b360-13d0ee83d7ed x-request-id=b77dc672-b419-40c5-99ab-fe804481bc75 x-session-id=c794d413-dc02-4f5b-98c2-20753d861430 x-title=Z Code@cli x-zcode-agent=glm x-zcode-app-version=3.1.2 x-zcode-trace-id=e2c3f004-3860-495b-9ff0-c7e58189184f
#001 debug: body preview: {"model":"glm-5.2","messages":[{"role":"user","content":"Generate a title for this conversation:\n"},{"role":"user","content":[{"type":"text","text":"How does anthropic models handle toolcalls, espcia…(2538 bytes total)
| # | Time | Fmt | Model | Mode | Stat | TTFB | Tok | tok/s | Total |
|------|------------|-----|-------------|--------|------|---------|-------|--------|---------|
| #001 | 22:38:55 | OAI | glm-5.2 | stream | 200 | 2622ms | 8 | 2.9 | 2771ms |
并且修复了OAI->ANT格式下产生的tool_call翻译错误问题
建议代码工作的同学们尽快下载
v2.0.1
Fixed a bug that will crash the proxy if you aborted an generation.
Added Linux for linux bros. also linux arm64 for android Termux users (I don't guarantee that it works on termux)
v2.0.0
重新组织代码,使用统一模块来负责OpenAI 和 Anthropic格式互转,现在全部代码都从上游的Anthropic端口走,并且Start-Plan 本地也能用 OpenAI Compatible 格式接入了。
经过类脑社区的小伙伴们的大量测试,我认为这已经足够以正式Release的方式发布了。
v1.4.8@alpha
感谢@yurchik228336和@Wraient的PR #4 和PR #5 ,目前相较1.4.7.alpha修了:
失败点①:CDN 依赖 → 本地 SDK
- 模块加载时 readFileSync(HERE/AliyunCaptcha.js) 读入仓库里已有但未接线的 224KB SDK(commit 55c3f2d 加进来却没用上)
- jsdom HTML 用 inline <script>${sdkSafe}</script> 替代 <script src="https://o.alicdn.com/...">
- </script> 转义防字符串字面量截断
- 副作用:文件缺失会启动即失败(fail-fast,比运行时 503 好)
失败点②:0 重试 + 短超时 → 3 重试 + 长超时 - 新增 solveInJsdomWithRetry 包装器,默认 3 次重试
- 超时常量全部 env-overridable:ZCODE_CAPTCHA_RETRIES=3 / ZCODE_CAPTCHA_TIMEOUT_MS=40000 / ZCODE_CAPTCHA_SDK_LOAD_MS=20000
- SDK 加载超时 15s → 20s;solve 超时 30s → 40s
- finally { w.close() } 释放 jsdom timers/listeners,避免重试间内存泄漏
失败点③:getInstance 静默吞错 → 显式 reject - 替换 (inst.startTracelessVerification || inst.show)?.call(inst) + try {} catch {}
- 改成显式 typeof fn !== "function" 检查 → reject(...)(不再用 ?. 静默跳过)
- fn.call(inst) 抛错 → reject(...)(不再用 catch {} 吞掉)
- 效果:getInstance 出错时立即 reject,外层 40s 超时不再空等
并且借到了账号,实测start-plan有效
The support is still experimental but since the tests works with actual accounts it's considered release ready.