ARTEX/agent
Autumn-27 a0c17701c2 feat(llm): 模型配置新增输出上限,支持 max_completion_tokens 字段名
llm_profiles 加两列:max_tokens(单次回复输出上限,0=不发送该字段,由服务端
默认值决定)与 max_tokens_field(上限发哪个键)。后者仅对 format=openai 生效:
空(默认)= max_tokens;'max_completion_tokens' = 新键。OpenAI 推理模型
(o 系列/GPT-5)拒收 max_tokens、只认新键,而多数兼容网关反过来只认旧键,
故做成显式开关而非自动推断。anthropic 与 openai-responses 自带字段名,
存下来只会误导,保存时一并清空。

顺带补上一处从未接通的链路:planner/worker/chat/mainagent/goals 五个
agentcore.Options 都没设过 MaxTokens,恒为 0——openai 系因 omitempty 压根
不发上限,anthropic 走 norma 的 8192 兜底。光加配置项而不接这条线,用户在
后台填了数字也不会生效,故本次一并接通,取值与 streaming 一样按 profile
每轮解析,故障转移切换后下一轮即生效。

task_llm.go 里 nonStreaming() 的来源优先级(agent 绑定 → 任务链激活 profile
→ 全局)抽成共用的 activeCfg(),避免 maxTokens() 再抄一份同样的三级回退。

norma 升到 v0.3.3(该版本提供 Config.MaxTokensField)。go.mod 只动 norma 这
一行:仓库此前未 tidy 过,跑 go mod tidy 会顺带升 x/crypto、x/net 等一批无关
依赖,不混进本次改动。

迁移:新列走 ADD COLUMN IF NOT EXISTS + 默认 0/'',旧库升级后行为完全不变;
CHECK 约束限定取值,每次启动先删后建保持幂等。
2026-08-31 12:20:31 -04:00
..
assembly.go chore: ARTEX 初始化 2026-07-26 04:27:45 -04:00
blackboard_inheritance_test.go chore: sync upstream v0.3.6 changes 2026-08-28 14:03:07 +08:00
cancelcause.go 重构 worker 对话:复用 resume 机制,改专属 goroutine 运行 2026-08-31 09:00:21 -04:00
capture.go feat(tasks): add runtime controls and inherited context 2026-08-24 19:29:00 +08:00
capture_usage_test.go chore: sync upstream v0.3.6 changes 2026-08-28 14:03:07 +08:00
chat.go feat(llm): 模型配置新增输出上限,支持 max_completion_tokens 字段名 2026-08-31 12:20:31 -04:00
constraints.go 同步 2026-08-24 14:14:15 +08:00
coverage_params_test.go 同步 2026-08-24 14:14:15 +08:00
deferred.go chore: ARTEX 初始化 2026-07-26 04:27:45 -04:00
deferred_test.go chore: ARTEX 初始化 2026-07-26 04:27:45 -04:00
goals.go feat(llm): 模型配置新增输出上限,支持 max_completion_tokens 字段名 2026-08-31 12:20:31 -04:00
insert_assets_test.go fix(assets): ip 字段拒收主机名,并告诉调用方该怎么改 2026-08-24 10:32:10 -04:00
mainagent.go feat(llm): 模型配置新增输出上限,支持 max_completion_tokens 字段名 2026-08-31 12:20:31 -04:00
planner.go feat(llm): 模型配置新增输出上限,支持 max_completion_tokens 字段名 2026-08-31 12:20:31 -04:00
prompt.go feat: 提示词新增全局变量 DataDir + 触发合并/种子意图默认值调整 2026-08-15 00:19:14 -04:00
prompt_now_test.go feat: 提示词新增全局变量 DataDir + 触发合并/种子意图默认值调整 2026-08-15 00:19:14 -04:00
prompt_test.go feat: 提示词新增全局变量 DataDir + 触发合并/种子意图默认值调整 2026-08-15 00:19:14 -04:00
promptcatalog.go tweak: reporter 报告模板将「证据」与「PoC」拆成两节 2026-08-18 12:20:53 -04:00
provider.go feat(llm): 模型配置新增输出上限,支持 max_completion_tokens 字段名 2026-08-31 12:20:31 -04:00
provider_capture_e2e_test.go feat(llmrec): 录制 LLM 请求/响应 HTTP 原文 2026-08-25 09:40:05 -04:00
provider_capture_test.go feat(llmrec): 录制 LLM 请求/响应 HTTP 原文 2026-08-25 09:40:05 -04:00
provider_quota_test.go feat(llm): add profile failover and pool health 2026-08-24 19:28:18 +08:00
provider_responses_test.go feat(llm): 支持 OpenAI Responses API 格式的 LLM 配置 2026-08-25 11:39:24 -04:00
runinfo.go feat(tasks): add runtime controls and inherited context 2026-08-24 19:29:00 +08:00
taskclock.go chore: ARTEX 初始化 2026-07-26 04:27:45 -04:00
terminalreason.go feat(tasks): add runtime controls and inherited context 2026-08-24 19:29:00 +08:00
terminalreason_test.go feat(tasks): add runtime controls and inherited context 2026-08-24 19:29:00 +08:00
testmain_test.go chore: ARTEX 初始化 2026-07-26 04:27:45 -04:00
toolcatalog.go 同步 2026-08-24 14:14:15 +08:00
toolcatalog_test.go feat(coverage): 资产测试覆盖度(task_scope 范围 + fact 派生已测) 2026-08-08 09:09:38 -04:00
tools.go revert: remove cross-agent worker direction synchronization 2026-08-29 22:05:28 +08:00
tools_insert.go fix(assets): ip 字段拒收主机名,并告诉调用方该怎么改 2026-08-24 10:32:10 -04:00
tools_overview_test.go feat(tasks): add runtime controls and inherited context 2026-08-24 19:29:00 +08:00
worker.go feat(llm): 模型配置新增输出上限,支持 max_completion_tokens 字段名 2026-08-31 12:20:31 -04:00
worker_intervention_test.go 新增worker直接对话 2026-08-29 21:55:27 +08:00
wrapup.go feat: 收尾默认轮数统一改为 10 2026-08-17 09:54:04 -04:00