ARTEX/db
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
..
activity_page_test.go feat(activity): 任务会话历史反向分页 + SSE 可靠性整改 2026-08-11 09:13:12 -04:00
asset_dsl.go feat(assets): add editable company and task scopes 2026-08-24 19:29:14 +08:00
assets.go fix(assets): ip 字段拒收主机名,并告诉调用方该怎么改 2026-08-24 10:32:10 -04:00
assets_test.go fix(assets): ip 字段拒收主机名,并告诉调用方该怎么改 2026-08-24 10:32:10 -04:00
commands.go fix: prevent OOM when archiving large tasks 2026-08-28 15:25:20 +08:00
companies.go feat(assets): 去掉企业资产范围 256 条规则上限 2026-08-31 11:22:34 -04:00
companies_test.go 修复 2026-08-28 07:37:24 +08:00
company_lock_test.go feat(assets): add editable company and task scopes 2026-08-24 19:29:14 +08:00
company_scope.go feat(assets): add editable company and task scopes 2026-08-24 19:29:14 +08:00
company_scope_consistency_test.go feat(assets): 去掉企业资产范围 256 条规则上限 2026-08-31 11:22:34 -04:00
company_scope_test.go feat(assets): add editable company and task scopes 2026-08-24 19:29:14 +08:00
config.go feat(llm): 模型配置新增输出上限,支持 max_completion_tokens 字段名 2026-08-31 12:20:31 -04:00
config_max_tokens_test.go feat(llm): 模型配置新增输出上限,支持 max_completion_tokens 字段名 2026-08-31 12:20:31 -04:00
config_test.go feat(llm): add profile failover and pool health 2026-08-24 19:28:18 +08:00
constants.go chore: ARTEX 初始化 2026-07-26 04:27:45 -04:00
constraints.go 同步 2026-08-24 14:14:15 +08:00
conversation.go 1、将排序做到border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted里,无需单独做个button 2、指定重命名使用ICO,无需使用菜单 2026-08-25 14:56:15 +08:00
conversation_pin_test.go feat(chat): add conversation pinning and rename controls 2026-08-24 19:29:38 +08:00
customtool_test.go chore: ARTEX 初始化 2026-07-26 04:27:45 -04:00
db.go fix: prevent OOM when archiving large tasks 2026-08-28 15:25:20 +08:00
db_test.go fix: prevent OOM when archiving large tasks 2026-08-28 15:25:20 +08:00
exploration.go chore: sync upstream v0.3.6 changes 2026-08-28 14:03:07 +08:00
exploration_sources.go chore: sync upstream v0.3.6 changes 2026-08-28 14:03:07 +08:00
exploration_sources_test.go feat(tasks): add runtime controls and inherited context 2026-08-24 19:29:00 +08:00
exploration_test.go feat(tasks): add runtime controls and inherited context 2026-08-24 19:29:00 +08:00
exploration_tokens_test.go feat(tasks): add runtime controls and inherited context 2026-08-24 19:29:00 +08:00
finding_assets.go fix(findings): 补齐「按资产」视图的 mock,修两处标签重复 2026-08-31 11:10:47 -04:00
finding_assets_test.go feat(findings): 发现页新增「按资产」视图 2026-08-31 10:58:32 -04:00
findings.go feat(findings): 发现页新增「按资产」视图 2026-08-31 10:58:32 -04:00
findings_test.go 归档 2026-08-28 12:56:29 +08:00
intent_admission.go feat(tasks): add runtime controls and inherited context 2026-08-24 19:29:00 +08:00
intent_control_test.go feat(tasks): add runtime controls and inherited context 2026-08-24 19:29:00 +08:00
intercept.go 同步 2026-08-24 14:14:15 +08:00
llm_records_migrate_test.go feat(llmrec): 录制 LLM 请求/响应 HTTP 原文 2026-08-25 09:40:05 -04:00
llm_usage.go fix: prevent OOM when archiving large tasks 2026-08-28 15:25:20 +08:00
llmhealth.go feat(llm): add profile failover and pool health 2026-08-24 19:28:18 +08:00
logs.go chore: ARTEX 初始化 2026-07-26 04:27:45 -04:00
nkey.go chore: ARTEX 初始化 2026-07-26 04:27:45 -04:00
schema.sql feat(llm): 模型配置新增输出上限,支持 max_completion_tokens 字段名 2026-08-31 12:20:31 -04:00
settings.go chore: ARTEX 初始化 2026-07-26 04:27:45 -04:00
skill_usage.go 归档 2026-08-28 12:56:29 +08:00
skill_usage_test.go feat(skills): track usage and missing dependencies 2026-08-24 19:30:14 +08:00
task_archive_aggregate_stats.go 归档 2026-08-28 12:56:29 +08:00
task_archives.go fix: prevent OOM when archiving large tasks 2026-08-28 15:25:20 +08:00
task_archives_restore.go fix: prevent OOM when archiving large tasks 2026-08-28 15:25:20 +08:00
task_archives_test.go fix: prevent OOM when archiving large tasks 2026-08-28 15:25:20 +08:00
task_assets.go style(db): 对齐 ICP 范围匹配 SQL 缩进,并注明手工挂载资产的语句顺序依赖 2026-08-24 08:55:55 -04:00
task_assets_context.go fix(assets): 企业归属重算不再被单行非法 ip 打挂,并明确告知是哪些资产 2026-08-24 10:16:17 -04:00
task_assets_test.go feat(assets): add editable company and task scopes 2026-08-24 19:29:14 +08:00
task_categories.go feat(tasks): 任务列表支持批量修改分类 2026-08-24 09:16:44 -04:00
task_categories_test.go feat(tasks): 任务列表支持批量修改分类 2026-08-24 09:16:44 -04:00
task_context.go feat(llm): 任务 LLM 配置链改为任何状态都可修改 2026-08-31 09:26:33 -04:00
task_context_lock_test.go feat(tasks): add runtime controls and inherited context 2026-08-24 19:29:00 +08:00
task_context_unit_test.go feat(tasks): add runtime controls and inherited context 2026-08-24 19:29:00 +08:00
task_delete_concurrency_test.go feat(tasks): add runtime controls and inherited context 2026-08-24 19:29:00 +08:00
task_list_performance_test.go 修复BUG: 1、当存在较多任务时,系统会发生卡顿,加载对话或者加载界面时候存在明显卡顿,优化性能找出问题 2026-08-28 08:00:36 +08:00
task_metadata_test.go 1、将排序做到border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted里,无需单独做个button 2、指定重命名使用ICO,无需使用菜单 2026-08-25 14:56:15 +08:00
task_queue_test.go feat(tasks): add runtime controls and inherited context 2026-08-24 19:29:00 +08:00
task_scope.go fix(assets): 企业归属重算不再被单行非法 ip 打挂,并明确告知是哪些资产 2026-08-24 10:16:17 -04:00
task_scope_test.go fix(scope): add_task_scope 支持 host:port 目标,入库前剥端口 2026-08-09 09:09:59 -04:00
task_source_limit_test.go feat(tasks): add runtime controls and inherited context 2026-08-24 19:29:00 +08:00
task_templates.go feat(tasks): add categories templates and batch controls 2026-08-24 19:29:46 +08:00
task_templates_test.go feat(tasks): add categories templates and batch controls 2026-08-24 19:29:46 +08:00
tasks.go 修复BUG: 1、当存在较多任务时,系统会发生卡顿,加载对话或者加载界面时候存在明显卡顿,优化性能找出问题 2026-08-28 08:00:36 +08:00
tasks_test.go feat(llm): 任务 LLM 配置链改为任何状态都可修改 2026-08-31 09:26:33 -04:00
testmain_test.go chore: ARTEX 初始化 2026-07-26 04:27:45 -04:00
tool_usage.go 归档 2026-08-28 12:56:29 +08:00
tool_usage_test.go 抽屉优化 2026-08-25 12:05:26 +08:00
tools.go 抽屉优化 2026-08-25 12:05:26 +08:00
triggers.go feat(trigger): 新增"任务创建"触发机制(on_task_create) 2026-08-09 02:19:29 -04:00