CJACK
1530246e4f
refactor: move tool call parsing and formatting logic to a dedicated internal/toolcall package
2026-04-06 03:19:18 +08:00
CJACK
2a6b787f38
feat: implement mandatory DeepSeek turn termination markers for system, user, assistant, and tool roles
2026-04-05 21:48:18 +08:00
CJACK
585d35e592
refactor: standardize prompt markers and remove legacy EOS and system instructions tags
2026-04-05 20:50:12 +08:00
CJACK
dc912419c4
Revert "refactor: rename tool XML wrapper from tool_calls to tool_batch and add schema attention blocks to tool prompts"
...
This reverts commit ade648033d .
2026-04-05 20:08:04 +08:00
CJACK
ade648033d
refactor: rename tool XML wrapper from tool_calls to tool_batch and add schema attention blocks to tool prompts
2026-04-05 19:22:43 +08:00
CJACK
b8e9ca2028
refactor: stop stripping _raw and _xml fields from tool call inputs to preserve raw parameter data
2026-04-05 18:33:15 +08:00
CJACK
e37ed38dc8
refactor: remove instruction regarding text-before-tool output in tool prompt documentation
2026-04-05 17:51:26 +08:00
CJACK
5d59775051
refactor: enforce strict XML-only output for tool calls and remove mixed-content instructions
2026-04-05 17:25:52 +08:00
CJACK
22efd8178b
refactor: clarify tool call XML placement and add strict rules against result fabrication and internal narration
2026-04-05 17:13:59 +08:00
CJACK
088a750338
feat: add strict schema enforcement and strip hallucinated fields from tool call parameters
2026-04-05 16:59:39 +08:00
CJACK
47dc121690
refactor: improve prompt construction by enforcing explicit newline boundaries between role markers and message content
2026-04-05 04:44:46 +08:00
CJACK.
3497d5d019
fix: classify empty upstream and tighten xml tool-name parsing
2026-04-04 02:14:39 +08:00
CJACK.
0847091864
fix: avoid taking generic <name> as xml tool name
2026-04-04 01:52:57 +08:00
CJACK.
c6340354ec
fix: keep execute_command args from xml parameters blocks
2026-04-04 01:42:31 +08:00
CJACK.
07578f9c56
fix tool prompt parameter examples for exec tools
2026-04-02 13:09:41 +08:00
CJACK.
bfca84c2c7
Align tool-call parsing across Go/JS and pass quality gates
2026-04-01 01:24:55 +08:00
TesseractLHY
fe8232bfc1
Fixes bad tool call
2026-03-31 11:16:13 -04:00
CJACK
30a53b6c43
refactor: remove legacy TOOL_CALL_HISTORY/TOOL_RESULT_HISTORY markers and consolidate tool call formatting into a new prompt package
2026-03-30 00:20:38 +08:00
CJACK
621599f8ad
test: update message preparation tests to expect explicit User role markers
2026-03-29 19:41:03 +08:00
CJACK
1d6a8e7008
refactor: centralize tool-calling instructions into a shared utility and update Claude/OpenAI adapters to use the unified format.
2026-03-29 16:05:35 +08:00
CJACK.
56a3ed19e8
fix(toolcall): support canonical xml params and guard json shadowing
2026-03-29 11:15:52 +08:00
CJACK.
958f4e39b5
feat(toolcall): prioritize XML for model output and parsing
2026-03-29 10:53:38 +08:00
CJACK.
97a81c4191
Harden toolcall leak interception for function-style payloads
2026-03-22 20:07:12 +08:00
CJACK.
1676c8e4f2
Add backward-compatible aliases for renamed fenced-example tests
2026-03-22 16:25:03 +08:00
CJACK.
b108a7915a
Support nested fenced blocks in stream fence tracking
2026-03-22 15:12:55 +08:00
CJACK.
3fccec0e22
test: remove unused asFloat helper
2026-03-22 10:24:11 +08:00
CJACK.
00d38f1187
fix: parse claude tool_use function/parameter format
2026-03-22 09:58:29 +08:00
CJACK.
88a79f212d
Fix path control-char repair on JSON fallback parses
2026-03-20 02:52:27 +08:00
CJACK.
acfb3b225d
Split toolcall input parsing to satisfy line gate
2026-03-20 02:37:23 +08:00
CJACK.
99a6164000
Fix path corruption when parsing tool call JSON strings
2026-03-20 02:31:37 +08:00
CJACK.
c4ec14f49a
Fix refactor line gate for toolcalls_parse
2026-03-20 02:12:34 +08:00
CJACK.
fb5fc0e885
Default to aggressive tool-call interception in mixed/fenced text
2026-03-20 02:03:46 +08:00
CJACK.
20b603666d
Allow standalone parser to detect mixed prose tool JSON
2026-03-20 02:03:32 +08:00
CJACK.
4d549b7102
Revert "Merge branch 'dev' into codex/fix-issues-found-in-review"
...
This reverts commit 33b0d1d144 , reversing
changes made to efb484ba4f .
2026-03-20 01:38:11 +08:00
CJACK.
33b0d1d144
Merge branch 'dev' into codex/fix-issues-found-in-review
2026-03-20 01:23:00 +08:00
CJACK.
52e7e7aae8
fix: unblock line gate and harden pow token recovery
2026-03-20 00:50:05 +08:00
CJACK.
d14b8a0664
Stabilize tool-call parsing and pass refactor gate
2026-03-18 00:45:28 +08:00
huangxun
c9c59f2490
refactor(toolcall): enhance tool call extraction with multiple keywords and safety limits
...
- Add support for multiple keywords: tool_calls, function.name:, [tool_call_history]
- Add OOM protection with search limits in extractToolCallObjects
- Add max scan length limit in extractJSONObject to prevent OOM on unclosed objects
- Update tool_sieve to handle more tool call patterns
- Add loose JSON repair in parseToolCallPayload for better error recovery
This improves DeepSeek tool call parsing robustness.
2026-03-17 16:28:27 +08:00
huangxun
16216cc2ca
fix(toolcalls): support nested objects in missing array brackets repair
...
- Upgrade missingArrayBracketsPattern regex to support single-level nested {} objects
- This fixes DeepSeek's list hallucination where tool call JSON objects contain nested fields like {"input": {"q": "value"}}
- Add comprehensive test cases covering 2-5 nested objects, mixed nested/primitive fields, and real DeepSeek 8-queen output patterns
- Add RepairLooseJSON function to repair unquoted keys and missing array brackets
Fixes: DeepSeek tool call parsing with nested JSON objects
2026-03-17 16:24:16 +08:00
huangxun
7318d1f4a8
fix(toolcall): fix deepseek function calling bug and add json repair
...
- Fix: Expand stream sieve keywords to support function.name: and [TOOL_CALL_HISTORY]
- Fix: Add repairInvalidJSONBackslashes to handle unescaped backslashes in Windows paths
- Sync: Update JS stream sieve to match Go implementation
- Test: Add unit tests for backslash repair and deepseek format parsing
- Tool: Move repair json test tool to tests/repair_json_tool.go
2026-03-13 13:47:40 +08:00
CJACK.
12d5f136d5
fix(toolcall): pass gates and align go/js multi-layer parser
2026-03-09 19:16:28 +08:00
CJACK.
ea4bd1e483
fix: parse invoke/tool_call arguments in xml compatibility paths
2026-03-08 13:16:12 +08:00
CJACK.
286d266723
Revert "Resolve PR #82 merge conflicts and restore tool-call parsing (invoke/argument and XML arguments)"
2026-03-08 02:38:29 +08:00
CJACK.
11b2f24fc2
Merge origin/dev into PR branch and resolve toolcall parser conflicts
2026-03-08 02:30:12 +08:00
CJACK.
60e9d707d4
Merge origin/dev into PR branch and resolve toolcall test conflicts
2026-03-08 01:10:53 +08:00
CJACK.
9b93badb57
Harden markup tag parsing to avoid mismatched-tag false positives
2026-03-08 00:55:32 +08:00
CJACK.
892213071a
Align Go/JS tool-call parsing semantics and compat fixtures
2026-03-08 00:12:43 +08:00
CJACK.
a6aa4a1839
补充工具调用行为说明并修正测试文档过时命令
2026-03-03 00:39:02 +08:00
BigUncle
255feb2e65
fix(claude): 修复工具调用兼容与解析回退
...
- Claude 工具定义兼容 input_schema 与 function.parameters
- tool_calls 解析增加 thinking 回退与大小写无关工具名匹配
- 补充 claude/util 相关回归测试
2026-02-25 18:03:25 +08:00
CJACK
a9403c5392
feat: add Gemini API compatibility, refactor stream rendering, and enhance tool call handling and configuration options
2026-02-22 20:53:42 +08:00