Skip to content

Fix/2026 6 24 tool name fix 1 - #41

Merged
donfaquir merged 5 commits into
mainfrom
fix/2026-6-24-tool-name-fix-1
Jun 26, 2026
Merged

Fix/2026 6 24 tool name fix 1#41
donfaquir merged 5 commits into
mainfrom
fix/2026-6-24-tool-name-fix-1

Conversation

@donfaquir

Copy link
Copy Markdown
Owner

摘要

变更类型

  • 缺陷修复
  • 新功能或行为变更
  • 文档或元数据(LICENSE、CI 等)
  • 重构或性能(无行为变化)
  • 其他:

检查清单

  • 本地已运行 npm run build(若改动前端)
  • 本地已运行 cd src-tauri && cargo test(若改动 Rust)
  • 不包含无权再许可的第三方素材或机密信息
  • 已阅读并遵守 CONTRIBUTING.mdCODE_OF_CONDUCT.md

备注

caicq215 and others added 5 commits June 24, 2026 23:42
The global rename was too invasive (24 files, 160+ lines) for what is
purely an OpenAI API boundary constraint. Restoring internal dot-notation
naming (e.g. note.read, web.search) and will implement API-level mapping
in provider_impl.rs instead.
OpenAI enforces ^[a-zA-Z0-9_-]+$ for function/tool names — dots are
not allowed.  Instead of renaming all internal tools globally, translate
at the API boundary only:

- convert_tools(): dot → hyphen when sending tool definitions
- serialize_messages(): dot → hyphen in assistant tool_call names
- chat_stream(): hyphen → dot when parsing response tool calls

This is lossless because the internal naming regex forbids hyphens,
making the mapping bijective.  Also fixes content:null handling for
assistant messages without tool_calls.
- Rewrite prompt with 4-phase workflow: decompose & search, deep read,
  knowledge base cross-reference, synthesize & save
- Output format now includes comparison tables, detailed per-solution
  analysis, and actionable recommendations
- Add web.read_pdf to allowed tools for papers and whitepapers
- Increase max_tool_calls 15→25 and timeout 120s→180s for deeper coverage
- Update name to '方案调研' and description to reflect solution comparison focus
- Bump version to 0.2.0
…ll execution

Instrument the three layers that can cause a skill to appear stuck:

- agent_loop: log each iteration (msg count, est tokens, budget usage),
  tool execution results (duration, result size), budget exhaustion,
  and context pressure triggers
- provider_impl: log HTTP request start (model, msg count, timeout),
  SSE stream progress (chunk count, idle time), stream errors with
  timing context
- skill_tool: log skill start (timeout, limits) and completion/timeout
  with elapsed time

All output goes to stderr via eprintln!, consistent with existing
project convention. Prefixed with [agent_loop], [provider], [skill_tool]
for easy grep filtering.
@donfaquir
donfaquir merged commit 8421d24 into main Jun 26, 2026
2 checks passed
@donfaquir
donfaquir deleted the fix/2026-6-24-tool-name-fix-1 branch June 26, 2026 06:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants