CJACK
0156f6b45b
Merge origin/dev into PR 406
2026-05-02 21:17:02 +08:00
CJACK
a9f46f5b25
chore: bump version to 4.3.1
2026-05-02 21:04:12 +08:00
CJACK
e7d6807c7c
feat: emit empty completion chunk along with keep-alive heartbeat in chat stream
2026-05-02 20:54:10 +08:00
王
d407ccb773
perf(streaming): optimize TTFT and reduce buffering latency
...
Core changes:
- stream.go: New accumulation buffer architecture with scanner goroutine
+ select loop, MinChars=16, MaxWait=10ms, first-flush-immediate
- dedupe.go: Add TrimContinuationOverlapFromBuilder to avoid string copies
- claude/stream_runtime_core.go: Integrate toolstream for incremental text
- claude/stream_runtime_finalize.go: toolstream flush support
- stream_emitter.js: Reduce DeltaCoalescer thresholds (160->16 chars, 80->20ms)
- empty_retry: Add thinking-aware empty output detection
- Fix reasoning_content leak and finish_reason=null in edge cases
- Fix tail content truncation when max_tokens exceeded
Tests: sync test expectations with upstream for thinking content
2026-05-02 20:28:30 +08:00
CJACK
c8f7b6b371
refactor streaming accumulation and chat history UI
2026-05-02 20:15:38 +08:00
CJACK.
20d71f528a
Merge pull request #404 from NgoQuocViet2001/ai/openai-file-retrieve
...
feat(openai): retrieve uploaded file metadata
2026-05-02 15:42:40 +08:00
NgoQuocViet2001
36d0239dc6
feat(openai): retrieve uploaded file metadata
2026-05-02 14:33:42 +07:00
CJACK.
e620752e2b
Merge pull request #403 from VanceHud/main
...
修复了使用Zeabur部署会失败的问题
2026-05-02 14:10:18 +08:00
VanceHud
44cb27872c
Merge branch 'CJackHwang:main' into main
2026-05-02 12:19:09 +08:00
CJACK
3d52040b3b
merge: sync release smoke fix from dev
v4.3.0
2026-05-02 04:23:02 +08:00
CJACK
049e40e5f1
fix: drop obsolete release smoke check
2026-05-02 04:19:23 +08:00
CJACK.
217e0e9f01
Merge pull request #398 from CJackHwang/dev
...
feat: enhanced input validation, tool call resilience & performance
2026-05-02 04:04:44 +08:00
CJACK
b3c54fcf3d
chore: bump version to 4.3.0
...
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-02 03:55:36 +08:00
CJACK
1c38709d32
feat: add support for parsing loose JSON lists into arrays in tool call parameters
2026-05-02 03:26:43 +08:00
CJACK
28e800c670
chore: remove obsolete planning and gate target files
2026-05-02 02:40:57 +08:00
CJACK
4389e02b29
feat: implement sync.Pool for tiktoken encoding instances to optimize token counting performance
2026-05-02 02:31:24 +08:00
CJACK
e2756f800d
feat: introduce JSON UTF-8 validation middleware and prepend output integrity guard system prompt to messages
2026-05-02 02:22:34 +08:00
CJACK
55abf64717
feat: add model type support for file uploads with automatic resolution and header propagation
2026-05-02 00:55:17 +08:00
CJACK
76ee2faa12
chore: bump version to 4.2.2 and update documentation to reflect improved release workflows, CI dependencies, and project structure
2026-05-01 23:44:07 +08:00
CJACK.
9c3696194c
Merge pull request #393 from CJackHwang/dev
...
Merge pull request #391 from BigUncle/fix/vercel-admin-history-rewrite
Fix: add missing Vercel rewrite rules for admin API routes
2026-05-01 23:28:03 +08:00
CJACK
0bca6e2cee
feat: implement context cancellation handling for chat and response stream runtimes to ensure clean termination without retries
2026-05-01 23:20:46 +08:00
CJACK.
934b40e572
Merge pull request #392 from wyv202011y/fix/timeout-and-context-cancel
...
fix: increase stream timeout constants for large-context models; guar…
2026-05-01 23:17:31 +08:00
CJACK
dd5a0c5213
refactor: update and standardize current input file continuation prompt instructions
2026-05-01 22:27:59 +08:00
CJACK
43402e7a26
refactor: rename history file constant from HISTORY.txt to DS2API_HISTORY.txt across codebase and tests
2026-05-01 22:05:45 +08:00
CJACK.
6373c001f5
Merge pull request #391 from BigUncle/fix/vercel-admin-history-rewrite
...
Fix: add missing Vercel rewrite rules for admin API routes
2026-05-01 21:45:14 +08:00
BigUncle
3430322e81
docs: add Vercel chat history read-only filesystem troubleshooting
2026-05-01 21:17:52 +08:00
CJACK
df1cfac9bc
refactor: replace history transcript format with numbered sections and rename upload file to HISTORY.txt
2026-05-01 21:15:17 +08:00
王
706e68de23
fix: increase stream timeout constants for large-context models; guard against context-cancelled double-recording
...
- Increase StreamIdleTimeout from 90s to 300s and MaxKeepaliveCount from 10 to 40
to prevent premature stream termination with DeepSeek V4 Pro (~50K token contexts)
- Add r.Context().Err() check after ConsumeSSE in empty_retry_runtime (chat + responses)
to prevent historySession.error() from overwriting historySession.stopped()
when the request context is cancelled
References:
- MaxKeepaliveCount=10 creates a 50s no-content timeout that kills the stream
before DeepSeek V4 Pro can produce its first token with large contexts
- Hermes Agent reports 'No response from provider for 180s' because the
underlying SSE connection was already terminated by ds2api at 50s
- Context cancellation path: OnContextDone -> stopped(), then finalize()
with empty output -> retry -> error() overwrites stopped()
2026-05-01 21:11:36 +08:00
BigUncle
83b4c7bcad
fix: add missing Vercel rewrite rules for admin API routes
...
/admin/chat-history, /admin/proxies, /admin/dev/raw-samples,
and /admin/dev/captures were falling through to the SPA fallback
(/admin/index.html), causing "Unexpected token '<'" JSON parse
errors on the frontend.
2026-05-01 20:50:12 +08:00
VanceHud
603801c542
Merge branch 'CJackHwang:main' into main
2026-05-01 17:18:00 +08:00
CJACK.
445c95a4f2
Merge pull request #379 from CJackHwang/dev
...
Merge pull request #377 from CJackHwang/codex/run-all-tests-and-fix-failures
Fix failing current-input token accounting test
v4.2.1
2026-05-01 16:12:17 +08:00
CJACK
0a6ef8e3f2
fix: remove bufio.Scanner 2MiB line limit for SSE; support quasi_status direct patch
...
Replace bufio.Scanner with bufio.NewReaderSize + ReadBytes('\n') across all
SSE read paths to preserve long single-line data (e.g. write_file content).
Add quasi_status and auto_continue handling as direct path-based patches in
both Go continue observer and Node vercel_stream_impl, mirroring existing
batch-patch logic. Add 2MiB+ line throughput tests at every SSE layer.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-01 15:45:17 +08:00
CJACK
fd0ec29991
refactor: generalize DSML tag parsing to tolerate model noise; split tiktoken by build tags
...
Replace hardcoded DSML typo variant lists in Go/Node tool call parsers with
generalized prefix consumption that tolerates repeated leading <, repeated DSML
prefix noise, and trailing pipe terminators. Split tiktoken-dependent token
counting into a build-tagged file for non-cgo platform compatibility. Add /data
directory to Dockerfile for bind-mount permissions.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-01 15:17:11 +08:00
VanceHud
febd3ec83a
Document Zeabur manual deployment
2026-05-01 14:29:49 +08:00
CJACK
2671298439
fix: coalesce small stream deltas to prevent character swallowing; add read-tool cache guard
...
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-01 13:53:27 +08:00
CJACK
92e321fe2c
修复吞字问题
2026-05-01 01:31:48 +08:00
CJACK.
fca8c01397
Merge pull request #385 from ouqiting/fix_chat_history
...
fix: content being overwritten and left empty
2026-05-01 00:21:33 +08:00
ouqiting
667e1e3710
fix: content being overwritten and left empty
2026-04-30 21:36:47 +08:00
CJACK.
4438d03c5c
Merge pull request #377 from CJackHwang/codex/run-all-tests-and-fix-failures
...
Fix failing current-input token accounting test
2026-04-30 02:41:08 +08:00
CJACK.
95b7665643
Merge branch 'dev' into codex/run-all-tests-and-fix-failures
2026-04-30 02:39:18 +08:00
CJACK.
9896b1fc33
Merge pull request #378 from NgoQuocViet2001/ai/openai-root-route-aliases
...
feat(openai): add root route aliases
2026-04-30 02:33:38 +08:00
CJACK.
966f21211d
Fix nil-session guard in chat history test
2026-04-30 02:31:06 +08:00
NgoQuocViet2001
7dc3af40b2
feat(openai): add root route aliases
2026-04-30 01:24:53 +07:00
CJACK.
2f6b5ffda0
Fix current-input token text test expectation
2026-04-30 02:22:17 +08:00
CJACK.
85e256ad4d
Merge pull request #375 from CJackHwang/codex/investigate-data-loss-issue-in-pr-369
...
sse/parser: treat object-shaped `v` as visible content, preserve INCOMPLETE across omitted status; add tests and samples
2026-04-30 02:14:26 +08:00
CJACK.
7c3ff6ee7e
Merge pull request #374 from shern-point/feat/full-context-file-token-accounting
...
Feat/full context file token accounting
2026-04-30 02:12:55 +08:00
CJACK.
63e62fd1b0
Merge pull request #372 from shern-point/feat/accurate-context-token-length
...
Feat/accurate context token length
2026-04-30 02:11:32 +08:00
CJACK.
483d7af3d2
Merge pull request #373 from NgoQuocViet2001/ai/ds2api-small-regression-fix
...
fix(openai): return 400 for inline file limit
2026-04-30 02:08:22 +08:00
CJACK.
0f89823526
chore(sse): bump client version and refresh longtext stream fixtures
2026-04-30 02:05:45 +08:00
shern-point
6a778e0d35
feat: include inline-uploaded file tokens in context token accounting
...
Track byte sizes of inline-uploaded files during PreprocessInlineFileInputs and convert them to conservative token estimates (bytes/3). RefFileTokens is threaded through StandardRequest into all OpenAI chat/responses usage builders so returned prompt_tokens/input_tokens reflect the full upstream context cost including attached files.
2026-04-30 01:42:51 +08:00