WeKnora/internal/agent
lyingbug 1c448bf72c
fix(chat): send one completion-token field per provider (#3082)
* fix(chat): send one completion-token field per provider

Agent dual-wrote max_tokens and max_completion_tokens, which Volcengine Ark
rejects. Collapse them to one budget and pick the wire name the way Pi does.

Fixes #3014

* fix(chat): shrink max_tokens provider whitelist to documented hosts

Only DeepSeek, Zhipu, SiliconFlow, Moonshot, NVIDIA, and self-hosted
vLLM-class runtimes stay on the legacy field. Aliyun DashScope documents
max_completion_tokens for thinking models and must not be forced onto
max_tokens.

* fix(chat): send max_tokens for LKEAP completions

Tencent LKEAP documents max_tokens only. Keep Pi's default of
max_completion_tokens, and classify every AllProviders() host so a new
vendor cannot silently inherit the default.
2026-09-07 19:16:27 +08:00
..
approval feat(mcp): add per-tool enable toggle (#2989) 2026-09-05 17:19:20 +08:00
compaction feat(agent): unify sandbox tools and drop host preloaded skills (#3033) 2026-09-05 16:45:59 +08:00
skills feat(sandbox): run sandboxed execs as root by default (#3067) 2026-09-07 13:03:35 +08:00
token feat(agent): keep long sandbox turns from truncating, overflowing, or rewriting files 2026-09-02 22:09:09 +08:00
tools feat(sandbox): run sandboxed execs as root by default (#3067) 2026-09-07 13:03:35 +08:00
act.go feat(agent): unify sandbox tools and drop host preloaded skills (#3033) 2026-09-05 16:45:59 +08:00
act_order_test.go feat(agent): unify sandbox tools and drop host preloaded skills (#3033) 2026-09-05 16:45:59 +08:00
const.go fix(chat): send one completion-token field per provider (#3082) 2026-09-07 19:16:27 +08:00
const_test.go feat(sandbox) (#2301) 2026-08-10 21:28:20 +08:00
context_debug.go feat(agent): keep long sandbox turns from truncating, overflowing, or rewriting files 2026-09-02 22:09:09 +08:00
engine.go feat(agent): unify sandbox tools and drop host preloaded skills (#3033) 2026-09-05 16:45:59 +08:00
engine_image_test.go feat: auto-describe MCP tool result images via VLM 2026-03-25 21:38:15 +08:00
engine_memory_test.go feat(memory): add cross-session long-term memory 2026-08-13 18:00:02 +08:00
engine_test.go fix(chat): send one completion-token field per provider (#3082) 2026-09-07 19:16:27 +08:00
finalize.go fix(chat): send one completion-token field per provider (#3082) 2026-09-07 19:16:27 +08:00
finalize_image_requirement_test.go fix(chat): enforce retrieved image output in answers 2026-07-15 18:10:31 +08:00
grounding_prompt.go feat(agent): unify sandbox tools and drop host preloaded skills (#3033) 2026-09-05 16:45:59 +08:00
grounding_prompt_test.go feat(agent): unify sandbox tools and drop host preloaded skills (#3033) 2026-09-05 16:45:59 +08:00
image_requirement.go feat(chat): keep prompt prefixes stable and send provider cache markers 2026-09-03 00:45:52 +08:00
langfuse_test.go refactor(agent): introduce modelcontext registry and fix handle-codec bugs 2026-07-27 11:05:43 +08:00
observe.go feat(agent): unify sandbox tools and drop host preloaded skills (#3033) 2026-09-05 16:45:59 +08:00
observe_test.go feat(agent): unify sandbox tools and drop host preloaded skills (#3033) 2026-09-05 16:45:59 +08:00
prompts.go feat(sandbox): run sandboxed execs as root by default (#3067) 2026-09-07 13:03:35 +08:00
prompts_shell_test.go feat(agent): unify sandbox tools and drop host preloaded skills (#3033) 2026-09-05 16:45:59 +08:00
prompts_wiki.go Remove redundant Wiki operation log 2026-07-28 11:18:33 +08:00
prompts_wiki_test.go refactor(agent): introduce modelcontext registry and fix handle-codec bugs 2026-07-27 11:05:43 +08:00
think.go fix(chat): send one completion-token field per provider (#3082) 2026-09-07 19:16:27 +08:00
turn_usage_test.go feat(agent): report and attribute per-turn LLM token usage 2026-08-24 10:36:19 +08:00