@thincoder/core 0.9.4 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +63 -0
- package/README.md +1 -1
- package/abort-provenance.mjs +10 -10
- package/advisor/citations.mjs +5 -5
- package/advisor/compaction.mjs +16 -15
- package/advisor/loop.mjs +14 -14
- package/advisor/messages.mjs +6 -6
- package/advisor/project-context.mjs +5 -5
- package/advisor/repos.mjs +3 -3
- package/advisor/run.mjs +23 -13
- package/advisor.mjs +4 -4
- package/agent/assemble.mjs +111 -0
- package/agent/chat-call.mjs +68 -0
- package/agent/child-marks.mjs +2 -2
- package/agent/completion.mjs +9 -2
- package/agent/continue-decision.mjs +25 -0
- package/agent/dispatch-gates.mjs +140 -0
- package/agent/dispatch-run.mjs +167 -0
- package/agent/dispatch.mjs +55 -294
- package/agent/family-tools.mjs +11 -11
- package/agent/helpers.mjs +63 -3
- package/agent/live-beat.mjs +49 -0
- package/agent/post-turn.mjs +4 -8
- package/agent/record-results.mjs +23 -20
- package/agent/relay-prefix.mjs +2 -2
- package/agent/run-stages.mjs +19 -15
- package/agent/run-start.mjs +111 -0
- package/agent/setup-reminders.mjs +9 -9
- package/agent/setup.mjs +32 -4
- package/agent/spawn-child.mjs +9 -9
- package/agent/suspension.mjs +90 -30
- package/agent/timers.mjs +113 -0
- package/agent/turn-loop.mjs +244 -0
- package/agent/write-gate.mjs +103 -6
- package/agent-tools/advisor-async.mjs +11 -11
- package/agent-tools/advisor-settle.mjs +17 -17
- package/agent-tools/advisor.mjs +38 -43
- package/agent-tools/async-discard.mjs +44 -1
- package/agent-tools/async-settle.mjs +23 -20
- package/agent-tools/audit-block.mjs +7 -7
- package/agent-tools/bash-async.mjs +281 -0
- package/agent-tools/batch-lifecycle.mjs +65 -34
- package/agent-tools/batch-paths.mjs +186 -0
- package/agent-tools/batch-skeleton.mjs +19 -1
- package/agent-tools/batch.mjs +22 -119
- package/agent-tools/checkpoint.mjs +121 -0
- package/agent-tools/child-permission.mjs +5 -3
- package/agent-tools/consult.mjs +58 -58
- package/agent-tools/context.mjs +4 -20
- package/agent-tools/design-token.mjs +3 -3
- package/agent-tools/digest-budget.mjs +1 -1
- package/agent-tools/eng.mjs +5 -5
- package/agent-tools/escalate-async.mjs +18 -13
- package/agent-tools/goal.mjs +3 -10
- package/agent-tools/panel-blocks.mjs +3 -3
- package/agent-tools/parent-channel.mjs +3 -13
- package/agent-tools/plan.mjs +3 -4
- package/agent-tools/read-history.mjs +12 -28
- package/agent-tools/recent-changes.mjs +4 -5
- package/agent-tools/review-facts.mjs +1 -1
- package/agent-tools/settings.mjs +47 -20
- package/agent-tools/skill.mjs +3 -5
- package/agent-tools/spawn-gates.mjs +3 -3
- package/agent-tools/subagent-actions-query.mjs +270 -0
- package/agent-tools/subagent-actions.mjs +29 -273
- package/agent-tools/subagent-async.mjs +36 -31
- package/agent-tools/subagent-panel.mjs +38 -9
- package/agent-tools/subagent-run.mjs +44 -29
- package/agent-tools/subagent-scheduler.mjs +29 -28
- package/agent-tools/subagent-spawn.mjs +57 -25
- package/agent-tools/subagent.mjs +46 -66
- package/agent-tools/task.mjs +3 -9
- package/agent-tools/timer.mjs +12 -12
- package/agent-tools/verify.mjs +14 -13
- package/agent-tools.mjs +0 -1
- package/agent.mjs +20 -351
- package/attachments.mjs +125 -0
- package/auto-think.mjs +1 -1
- package/config-presets.mjs +12 -7
- package/config-watch.mjs +83 -0
- package/config.mjs +17 -4
- package/context-degrade.mjs +81 -0
- package/context-echo.mjs +88 -0
- package/context-push.mjs +51 -0
- package/context.mjs +8 -187
- package/conventions.mjs +110 -161
- package/declaration.mjs +194 -0
- package/embedding.mjs +3 -1
- package/env-ref.mjs +81 -0
- package/explore-distill.mjs +2 -3
- package/file-links.mjs +53 -0
- package/file-refs.mjs +103 -0
- package/generate-title.mjs +28 -4
- package/git/checkpoint.mjs +4 -8
- package/history-window.mjs +17 -2
- package/i18n.mjs +2 -0
- package/index-discover.mjs +7 -7
- package/ledger-cmd.mjs +34 -126
- package/ledger-db.mjs +35 -7
- package/ledger-migrate.mjs +299 -0
- package/ledger-tools.mjs +188 -0
- package/ledger.mjs +11 -5
- package/log.mjs +12 -7
- package/manifest-discovery.mjs +131 -0
- package/manifest-schema.mjs +166 -0
- package/manifest.mjs +18 -217
- package/mcp.mjs +4 -1
- package/memory/code-search.mjs +149 -0
- package/memory/code-sync.mjs +89 -230
- package/memory/core.mjs +47 -32
- package/memory/docs.mjs +63 -262
- package/memory/file-list.mjs +89 -0
- package/memory/file-walk.mjs +7 -4
- package/memory/memory-tool.mjs +229 -0
- package/memory/schema.mjs +18 -3
- package/memory/sweep.mjs +289 -0
- package/memory/sync-tail.mjs +81 -0
- package/memory-status.mjs +69 -0
- package/memory.mjs +3 -0
- package/model-specs.mjs +131 -66
- package/notify-policy.mjs +51 -0
- package/package.json +1 -1
- package/peer-claims.mjs +263 -0
- package/peer-domains.mjs +100 -71
- package/peer-instances.mjs +9 -10
- package/process-probe-exec.mjs +187 -0
- package/process-probe.mjs +27 -175
- package/prompt-overlays.mjs +11 -10
- package/prompts/advisor-design.md +2 -2
- package/prompts/advisor-round2.md +1 -1
- package/prompts/advisor-round3.md +1 -1
- package/prompts/common.md +19 -7
- package/prompts/discipline-engineering.md +57 -16
- package/prompts/discipline-normal.md +6 -3
- package/prompts/persona-coder.md +0 -1
- package/prompts/persona-eng-coder.md +1 -5
- package/prompts/persona-eng-designer.md +1 -2
- package/prompts/persona-engineering.md +41 -11
- package/prompts/persona-explore.md +0 -1
- package/prompts/persona-normal.md +10 -1
- package/prompts/persona-plan.md +3 -4
- package/prompts/subagent-base.md +14 -0
- package/provider/core.mjs +11 -48
- package/provider/list-models.mjs +3 -0
- package/provider/responses-request.mjs +237 -0
- package/provider/responses.mjs +6 -228
- package/provider-flows.mjs +248 -0
- package/queued.mjs +90 -0
- package/rules.mjs +209 -2
- package/session-gc.mjs +67 -6
- package/session-guard.mjs +27 -7
- package/session-lifecycle.mjs +90 -18
- package/session-rename.mjs +5 -1
- package/session-slot-claims.mjs +230 -0
- package/session-slot-scan.mjs +299 -0
- package/session-slot-verify.mjs +304 -0
- package/session-slot-write.mjs +74 -8
- package/session-slots-manifest.mjs +163 -236
- package/session-slots.mjs +99 -71
- package/session.mjs +30 -10
- package/shell-candidates.mjs +78 -0
- package/text-budget.mjs +2 -2
- package/think-off.mjs +49 -0
- package/token-ttl.mjs +15 -4
- package/tool-args.mjs +73 -0
- package/tool-docs/advisor.md +9 -0
- package/tool-docs/batch.md +1 -0
- package/tool-docs/code_search.md +1 -0
- package/tool-docs/consult_start.md +5 -0
- package/tool-docs/consult_stop.md +3 -0
- package/tool-docs/context.md +7 -0
- package/tool-docs/doc_search.md +1 -0
- package/tool-docs/edit.md +2 -13
- package/tool-docs/eng.md +1 -0
- package/tool-docs/execute.md +1 -9
- package/tool-docs/git.md +25 -51
- package/tool-docs/goal.md +6 -0
- package/tool-docs/ledger_add.md +1 -0
- package/tool-docs/ledger_close.md +1 -0
- package/tool-docs/ledger_count.md +1 -0
- package/tool-docs/ledger_query.md +1 -0
- package/tool-docs/ledger_update.md +1 -0
- package/tool-docs/main_history.md +1 -0
- package/tool-docs/memory.md +10 -0
- package/tool-docs/notify_parent.md +9 -0
- package/tool-docs/peer_instances.md +1 -0
- package/tool-docs/plan.md +5 -0
- package/tool-docs/process.md +7 -3
- package/tool-docs/question.md +1 -0
- package/tool-docs/read_history.md +7 -0
- package/tool-docs/recent_changes.md +1 -0
- package/tool-docs/repo_outline.md +1 -0
- package/tool-docs/settings.md +6 -0
- package/tool-docs/skill.md +5 -0
- package/tool-docs/subagent.md +31 -0
- package/tool-docs/task.md +7 -0
- package/tool-docs/timer.md +6 -0
- package/tool-docs/verify.md +1 -0
- package/tool-docs/wait_for.md +2 -1
- package/tools/bash.mjs +28 -4
- package/tools/edit-batch.mjs +10 -11
- package/tools/edit-diff.mjs +33 -25
- package/tools/exec-run.mjs +102 -4
- package/tools/execute.mjs +5 -2
- package/tools/file.mjs +11 -12
- package/tools/git-run.mjs +1 -1
- package/tools/git.mjs +0 -24
- package/tools/glob-dialect.mjs +3 -3
- package/tools/index.mjs +2 -1
- package/tools/linter.mjs +2 -1
- package/tools/node-child.mjs +21 -0
- package/tools/ops.mjs +50 -13
- package/tools/patch.mjs +4 -2
- package/tools/repomap.mjs +20 -9
- package/tools/search.mjs +2 -2
- package/tools/shared.mjs +9 -7
- package/tools/web.mjs +5 -2
- package/tools/write-path.mjs +1 -1
- package/traces/trace-store.mjs +17 -14
- package/vision-reader.mjs +76 -0
- package/agent-tools/batch-segment.mjs +0 -18
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* memory-status.mjs — 记忆 / 索引状态**只读出口**(R2 · 桌面功能对位批 · 台账 #412 正解):三表计数一处出。
|
|
3
|
+
*
|
|
4
|
+
* 判据(父侧裁 —— 端侧不直读核内表;`docs/desktop/design/PROJECT.md` §10 N 行):
|
|
5
|
+
* - **只读**:本档零写面(无 DDL ∕ DML ∕ 迁移)+ 零动作面(无 sync ∕ reindex ∕ 建库);
|
|
6
|
+
* 句柄装配归调用面(`memory` 首参 = 已开句柄)。
|
|
7
|
+
* - **零端名**:键名 = 表名 ∕ 通用计数词,无端侧语汇 —— 各端同面同形(第二消费面即本出口本身)。
|
|
8
|
+
* - **origin 归一**:`origin` 给定 ⇒ 三表皆按**归一键**限定(核写缝一律归一 —— `memory/origin.mjs`;
|
|
9
|
+
* 读面不归一 ⇒ 读不到本项目行);缺 ∕ 非串 ∕ 空串 ⇒ 全库计数(回执 `origin: null`)。
|
|
10
|
+
*
|
|
11
|
+
* 回执:
|
|
12
|
+
* ```
|
|
13
|
+
* { origin, tables: { files, code: { files, chunks }, doc: { files, chunks } },
|
|
14
|
+
* totals: { files, chunks }, indexed, dbBytes, origins: [{ origin, code, doc }] }
|
|
15
|
+
* ```
|
|
16
|
+
* `tables.files` = 记忆层(`files` 表:project ∕ team 两层 markdown 记忆)行数;`code` ∕ `doc` 各 =
|
|
17
|
+
* 去重文件数(`COUNT(DISTINCT path)`)与分块数(`COUNT(*)`);`totals` = code + doc 合计(端侧既有
|
|
18
|
+
* 索引读数同口径);`indexed` = 合计文件数 > 0(「本项目已建索引」读数 —— 读数非承诺)。
|
|
19
|
+
* P1 新增读数(§6.14 面③):`dbBytes` = 库文件 `statSync` 字节数(非文件型 ∕ 不可读 ⇒ null);
|
|
20
|
+
* `origins` = 逐 origin 行数(code ∕ doc 两表并集,键 = 库内**原样** origin,按名排序)。
|
|
21
|
+
*/
|
|
22
|
+
import { statSync } from "node:fs"
|
|
23
|
+
import { normalizeOrigin } from "./memory/origin.mjs"
|
|
24
|
+
|
|
25
|
+
/** 单表计数:`key` 非 null ⇒ 追加 `WHERE origin = ?`(三表皆有 origin 列 —— v5 ∕ v8 起)。 */
|
|
26
|
+
function countOf(memory, base, key) {
|
|
27
|
+
const sql = key === null ? base : `${base} WHERE origin = ?`
|
|
28
|
+
return key === null ? memory.db.prepare(sql).get() : memory.db.prepare(sql).get(key)
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/** 三表计数只读出口(形见档头;`memory` = `createMemory()` 回执句柄)。 */
|
|
32
|
+
export function memoryStatus(memory, { origin } = {}) {
|
|
33
|
+
const normalized = normalizeOrigin(origin)
|
|
34
|
+
const scope = typeof normalized === "string" && normalized.length > 0 ? normalized : null
|
|
35
|
+
|
|
36
|
+
const files = countOf(memory, "SELECT COUNT(*) AS n FROM files", scope)?.n ?? 0
|
|
37
|
+
const codeRow = countOf(memory, "SELECT COUNT(DISTINCT path) AS files, COUNT(*) AS chunks FROM code_chunks", scope) ?? {}
|
|
38
|
+
const docRow = countOf(memory, "SELECT COUNT(DISTINCT path) AS files, COUNT(*) AS chunks FROM doc_chunks", scope) ?? {}
|
|
39
|
+
const code = { files: codeRow.files ?? 0, chunks: codeRow.chunks ?? 0 }
|
|
40
|
+
const doc = { files: docRow.files ?? 0, chunks: docRow.chunks ?? 0 }
|
|
41
|
+
const totalFiles = code.files + doc.files
|
|
42
|
+
|
|
43
|
+
return {
|
|
44
|
+
origin: scope,
|
|
45
|
+
tables: { files, code, doc },
|
|
46
|
+
totals: { files: totalFiles, chunks: code.chunks + doc.chunks },
|
|
47
|
+
indexed: totalFiles > 0,
|
|
48
|
+
dbBytes: dbBytesOf(memory),
|
|
49
|
+
origins: originRows(memory),
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** 库文件字节数(P1——`statSync` 实读;非文件型 ∕ 不可读 ⇒ null)。 */
|
|
54
|
+
function dbBytesOf(memory) {
|
|
55
|
+
try { return memory.dbPath ? statSync(memory.dbPath).size : null } catch { return null }
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/** 逐 origin 行数(P1——code ∕ doc 两表并集;键 = 库内原样 origin,按名排序)。 */
|
|
59
|
+
function originRows(memory) {
|
|
60
|
+
const map = new Map()
|
|
61
|
+
for (const [table, key] of [["code_chunks", "code"], ["doc_chunks", "doc"]]) {
|
|
62
|
+
for (const r of memory.db.prepare(`SELECT origin, COUNT(*) AS n FROM ${table} GROUP BY origin`).all()) {
|
|
63
|
+
const cur = map.get(r.origin) ?? { origin: r.origin, code: 0, doc: 0 }
|
|
64
|
+
cur[key] = Number(r.n)
|
|
65
|
+
map.set(r.origin, cur)
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return [...map.values()].sort((a, b) => (a.origin < b.origin ? -1 : a.origin > b.origin ? 1 : 0))
|
|
69
|
+
}
|
package/memory.mjs
CHANGED
|
@@ -19,3 +19,6 @@ export { gitSync, codeSync, markIndexedCommit, codeSearch, ensureCodeEmbeddings,
|
|
|
19
19
|
|
|
20
20
|
// doc sync + search + memoryTools
|
|
21
21
|
export { docSync, docSearch, ensureDocEmbeddings, docSearchTool, memoryTools } from "./memory/docs.mjs"
|
|
22
|
+
|
|
23
|
+
// status read-only export (three-table counts single point — R2)
|
|
24
|
+
export { memoryStatus } from "./memory-status.mjs"
|
package/model-specs.mjs
CHANGED
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
* partialMode: Kimi/Qwen Partial Mode truncation continuation (assistant message with partial:true)
|
|
18
18
|
* prefixMode: DeepSeek Prefix Completion truncation continuation (uses /beta endpoint, with prefix:true)
|
|
19
19
|
* multimodal: whether multimodal (image/vision input supported)
|
|
20
|
-
* cacheMode: context caching mode: "auto"=automatic / "prompt"=needs explicit / "none"=unsupported
|
|
21
20
|
* thinkApi: thinking API type: "type"=thinking.type field / "effort"=reasoning_effort field
|
|
22
21
|
* thinkEnabledValue: when thinkApi is "type", the value used to enable thinking (default "enabled"; MiniMax uses "adaptive")
|
|
22
|
+
* thinkAlwaysOn: server-enforced thinking (true = always on — no off path; single source = MODEL-SPECS.md §16.3)
|
|
23
23
|
* reasoningEcho: reasoning_content cross-turn echo strategy: "required"=must echo (error if missing) / "optional"=echo optional (default: don't echo)
|
|
24
24
|
* reasoningEffortEnum: valid reasoning_effort enum values (if undeclared, no validation — passed through as-is)
|
|
25
25
|
* tempRange: valid temperature range [min, max] (if undeclared, no clamping)
|
|
@@ -30,67 +30,99 @@ const MODEL_SPECS = [
|
|
|
30
30
|
// beta, automatic disk cache, vision. The two legacy names below are RETIRED — the server
|
|
31
31
|
// still accepts them and serves them from V4.1-Flash today (no switch window), so their
|
|
32
32
|
// rows carry the V4.1-Flash parameters (v4-flash gains multimodal).
|
|
33
|
-
["deepseek-flash", { context: 1_000_000, maxOutput: 384_000, thinking: true, prefixMode: true,
|
|
33
|
+
["deepseek-flash", { context: 1_000_000, maxOutput: 384_000, thinking: true, prefixMode: true, thinkApi: "type", reasoningEcho: "required", reasoningEffortEnum: ["low", "high", "max"], tempRange: [0, 2], multimodal: true }],
|
|
34
34
|
// deepseek-v4.1-flash = qwen-plan channel name for DeepSeek V4.1-Flash (token-plan GET /models verified 2026-09-15) — same fields as the row above; ".1" ≠ "-" so plain prefix lookup misses the existing rows (D-PR25)
|
|
35
|
-
["deepseek-v4.1-flash", { context: 1_000_000, maxOutput: 384_000, thinking: true, prefixMode: true,
|
|
36
|
-
// deepseek-v4-pro (V4-Pro-0813): fields unchanged —
|
|
37
|
-
//
|
|
38
|
-
["deepseek-v4-pro", { context: 1_000_000, maxOutput: 384_000, thinking: true, prefixMode: true,
|
|
35
|
+
["deepseek-v4.1-flash", { context: 1_000_000, maxOutput: 384_000, thinking: true, prefixMode: true, thinkApi: "type", reasoningEcho: "required", reasoningEffortEnum: ["low", "high", "max"], tempRange: [0, 2], multimodal: true }],
|
|
36
|
+
// deepseek-v4-pro (V4-Pro-0813): fields unchanged — 视觉面 **未探**(不声明 multimodal——保守;
|
|
37
|
+
// 补探登记见 MODEL-SPECS.md §13.4). From 2026-09-14 12:00 Beijing all requests route to V4.1-Flash.
|
|
38
|
+
["deepseek-v4-pro", { context: 1_000_000, maxOutput: 384_000, thinking: true, prefixMode: true, thinkApi: "type", reasoningEcho: "required", reasoningEffortEnum: ["low", "high", "max"], tempRange: [0, 2] }],
|
|
39
39
|
// deepseek-v4-flash: RETIRED name — still accepted, served by V4.1-Flash today → aligned row
|
|
40
|
-
["deepseek-v4-flash", { context: 1_000_000, maxOutput: 384_000, thinking: true, prefixMode: true,
|
|
40
|
+
["deepseek-v4-flash", { context: 1_000_000, maxOutput: 384_000, thinking: true, prefixMode: true, thinkApi: "type", reasoningEcho: "required", reasoningEffortEnum: ["low", "high", "max"], tempRange: [0, 2], multimodal: true }],
|
|
41
41
|
// deepseek-v4-flash-vision-exp: retired experimental vision name — still accepted (V4.1-Flash)
|
|
42
|
-
["deepseek-v4-flash-vision-exp", { context: 1_000_000, maxOutput: 384_000, thinking: true, prefixMode: true,
|
|
42
|
+
["deepseek-v4-flash-vision-exp", { context: 1_000_000, maxOutput: 384_000, thinking: true, prefixMode: true, thinkApi: "type", reasoningEcho: "required", reasoningEffortEnum: ["low", "high", "max"], tempRange: [0, 2], multimodal: true }],
|
|
43
43
|
// Kimi series
|
|
44
|
-
["kimi-k3", { context: 1_000_000, maxOutput: 131_072, thinking: true, partialMode: true, multimodal: true,
|
|
44
|
+
["kimi-k3", { context: 1_000_000, maxOutput: 131_072, thinking: true, partialMode: true, multimodal: true, thinkApi: "effort", reasoningEcho: "required", reasoningEffortEnum: ["low", "high", "max"] }],
|
|
45
45
|
// Qwen router prefixes model IDs with provider namespace: kimi/kimi-k3 → kimi-k3 (IK7K4V)
|
|
46
|
-
["kimi/kimi-k3", { context: 1_000_000, maxOutput: 131_072, thinking: true, partialMode: true, multimodal: true,
|
|
46
|
+
["kimi/kimi-k3", { context: 1_000_000, maxOutput: 131_072, thinking: true, partialMode: true, multimodal: true, thinkApi: "effort", reasoningEcho: "required", reasoningEffortEnum: ["low", "high", "max"] }],
|
|
47
47
|
// Kimi For Coding endpoint uses the short model ID "k3" (same specs as kimi-k3) — IK5VGJ
|
|
48
|
-
["k3", { context: 1_000_000, maxOutput: 131_072, thinking: true, partialMode: true, multimodal: true,
|
|
48
|
+
["k3", { context: 1_000_000, maxOutput: 131_072, thinking: true, partialMode: true, multimodal: true, thinkApi: "effort", reasoningEcho: "required", reasoningEffortEnum: ["low", "high", "max"] }],
|
|
49
|
+
// kimi-for-coding / k3-256k / kimi-for-coding-highspeed(Kimi For Coding 端点三名 · 2026-09-25 批 §14.2 #7-9 · 活测 = §1.4 服务端 200 /models):
|
|
50
|
+
// context = **活测**逐行;maxOutput = **族沿用 k3 行**(点名来源行——本注即标级);effort 枚举 ["low","high","max"] = **活测**,
|
|
51
|
+
// 默认档 max(kimi-for-coding)/ high(k3-256k)落端差表;机制位(partialMode / thinkApi / reasoningEcho)**族沿用 k3 行**
|
|
52
|
+
// (有则沿、无则不声明);能力位按 §1.4 现盘口径(image ✓ ⇒ multimodal ✓)。highspeed = 尺寸行 + image ✓(§1.4)——
|
|
53
|
+
// 活测**无 effort 块** ⇒ thinking / 枚举 / 默认档均不声明;与 kimi-k2.7-code-highspeed(128_000)分值分行(防合并)。
|
|
54
|
+
["kimi-for-coding-highspeed", { context: 262_144, maxOutput: 131_072, multimodal: true }],
|
|
55
|
+
["kimi-for-coding", { context: 1_048_576, maxOutput: 131_072, thinking: true, partialMode: true, multimodal: true, thinkApi: "effort", reasoningEcho: "required", reasoningEffortEnum: ["low", "high", "max"] }],
|
|
56
|
+
["k3-256k", { context: 262_144, maxOutput: 131_072, thinking: true, partialMode: true, multimodal: true, thinkApi: "effort", reasoningEcho: "required", reasoningEffortEnum: ["low", "high", "max"] }],
|
|
57
|
+
// kimi-k2.6 / kimi-k2.7-code / kimi-k2.7-code-highspeed(三行同形 · 2026-09-24 bench 名单批):temperature **仅受理 1** = **校验级**
|
|
58
|
+
// (400 原文「invalid temperature: only 1 is allowed for this model」· roster-expand §2.2);尺寸位 = **未取证**
|
|
59
|
+
// (沿现盘兜底值——建行不改变生效值);**不得声明 tempRange**(KD-31 例外档不变量:入档值 = 实发值);枚举 / 视觉面 = **未探**。
|
|
60
|
+
["kimi-k2.6", { context: 128_000, maxOutput: 32_000 }],
|
|
61
|
+
["kimi-k2.7-code", { context: 128_000, maxOutput: 32_000 }],
|
|
62
|
+
["kimi-k2.7-code-highspeed", { context: 128_000, maxOutput: 32_000 }],
|
|
49
63
|
// GLM series
|
|
50
64
|
// GLM-5.3: thinking always-on (no "disabled"); effort converges to low/high/max — NOT the
|
|
51
|
-
// 7-level glm-5.2 enum (verified vs docs.bigmodel.cn GLM-5.3 page, 2026-08)
|
|
52
|
-
|
|
53
|
-
|
|
65
|
+
// 7-level glm-5.2 enum (verified vs docs.bigmodel.cn GLM-5.3 page, 2026-08).
|
|
66
|
+
// 视觉面 **未探**(不声明 multimodal——保守;补探登记见 MODEL-SPECS.md §13.4)。
|
|
67
|
+
// 该事实 = 机制位 `thinkAlwaysOn`(单源 = `docs/core/design/MODEL-SPECS.md` §16.3)——**官方口径**
|
|
68
|
+
// (智谱 GLM-5.3 文档:thinking always-on、无 `disabled`)。
|
|
69
|
+
["glm-5.3", { context: 1_000_000, maxOutput: 128_000, thinking: true, thinkAlwaysOn: true, thinkApi: "type", reasoningEcho: "optional", reasoningEffortEnum: ["low", "high", "max"], tempRange: [0, 1], noUsageStream: true }],
|
|
70
|
+
// glm-5.3-flash:始终思考——该事实 = 机制位 `thinkAlwaysOn`(单源 = `docs/core/design/MODEL-SPECS.md` §16.3)
|
|
71
|
+
// ——**族沿用**(族据 = `glm-5.3` 行);其余字段见其下行注与规格面。
|
|
72
|
+
["glm-5.3-flash", { context: 1_000_000, maxOutput: 131_072, thinking: true, thinkAlwaysOn: true, multimodal: true, thinkApi: "type", reasoningEcho: "optional", reasoningEffortEnum: ["low", "high", "max"], tempRange: [0, 1], noUsageStream: true }],
|
|
54
73
|
// glm-5.3-flashx(GLM-5.3-FlashX,2026-09 上线)——独立行(不再蹭 flash 前缀行):maxOutput 131_072 =
|
|
55
74
|
// **校验级**(400「max_tokens…限制数值范围[1,131072]」);effort 枚举 ["low","high","max"] = **校验级**
|
|
56
75
|
// (400 原文点名:low/high/max 受理,其余拒绝)。multimodal = **实测**(8×8 纯红 PNG → 答「红色」)。
|
|
57
76
|
// thinking = **实测**且**始终思考**(`thinking:{type:"disabled"}` → 400;裸请求默认开)——off 动作在
|
|
58
|
-
// UI 侧为 no-op
|
|
59
|
-
//
|
|
60
|
-
//
|
|
61
|
-
|
|
62
|
-
["glm-5.
|
|
63
|
-
["glm-5",
|
|
64
|
-
["glm-
|
|
77
|
+
// UI 侧为 no-op(服务端无关闭路径)。该事实 = 机制位 `thinkAlwaysOn`(单源 = `docs/core/design/MODEL-SPECS.md`
|
|
78
|
+
// §16.3)——**实测**(`thinking:{type:"disabled"}` → 400;裸请求默认开)。其余 = **族沿用** flash 行(context 网络口径未探边;
|
|
79
|
+
// thinkApi / reasoningEcho / tempRange / noUsageStream = 前缀命中路径日常在用)。
|
|
80
|
+
// flash 行 maxOutput 131_072 = **校验级**(#20 批 §1.2 同源 · 2026-09-25 批 §14.2 #1 收正)——两行独立(改一行不动另一行)。
|
|
81
|
+
["glm-5.3-flashx", { context: 1_000_000, maxOutput: 131_072, thinking: true, thinkAlwaysOn: true, multimodal: true, thinkApi: "type", reasoningEcho: "optional", reasoningEffortEnum: ["low", "high", "max"], tempRange: [0, 1], noUsageStream: true }],
|
|
82
|
+
["glm-5.2", { context: 1_000_000, maxOutput: 128_000, thinking: true, thinkApi: "type", reasoningEcho: "optional", reasoningEffortEnum: ["max", "xhigh", "high", "medium", "low", "minimal", "none"], tempRange: [0, 1], noUsageStream: true }],
|
|
83
|
+
["glm-5", { context: 1_000_000, maxOutput: 128_000, thinking: true, thinkApi: "type", reasoningEcho: "optional", reasoningEffortEnum: ["max", "xhigh", "high", "medium", "low", "minimal", "none"], tempRange: [0, 1], noUsageStream: true }],
|
|
84
|
+
["glm-4", { context: 128_000, maxOutput: 32_000, thinking: true, thinkApi: "type", reasoningEcho: "optional", tempRange: [0, 1], noUsageStream: true }],
|
|
85
|
+
// glm-4.5-air(智谱轻档 · 2026-09-24 bench 名单批):temperature 0 受理 = **实测**(roster-expand §2.2);其余 = **族沿用 glm-4 行**
|
|
86
|
+
// (逐名官方口径未取证);枚举 / 视觉面 = **未探**(不声明)。medium 直发实测受理(batch-params-judge §1.5)。
|
|
87
|
+
["glm-4.5-air", { context: 128_000, maxOutput: 32_000, thinking: true, thinkApi: "type", reasoningEcho: "optional", tempRange: [0, 1], noUsageStream: true }],
|
|
65
88
|
// GPT series
|
|
66
|
-
["gpt-5.6-sol", { context: 1_050_000, maxOutput: 128_000, thinking: false, multimodal: true
|
|
67
|
-
["gpt-5.6", { context: 1_050_000, maxOutput: 128_000, thinking: false, multimodal: true
|
|
68
|
-
["gpt-4.1", { context: 1_000_000, maxOutput: 128_000, thinking: false
|
|
69
|
-
["gpt-4o", { context: 128_000, maxOutput: 16_000, thinking: false, multimodal: true
|
|
89
|
+
["gpt-5.6-sol", { context: 1_050_000, maxOutput: 128_000, thinking: false, multimodal: true }],
|
|
90
|
+
["gpt-5.6", { context: 1_050_000, maxOutput: 128_000, thinking: false, multimodal: true }],
|
|
91
|
+
["gpt-4.1", { context: 1_000_000, maxOutput: 128_000, thinking: false }],
|
|
92
|
+
["gpt-4o", { context: 128_000, maxOutput: 16_000, thinking: false, multimodal: true }],
|
|
70
93
|
// Qwen series
|
|
71
|
-
//
|
|
72
|
-
|
|
94
|
+
// qwen-flash / qwen-vl-max(2026-09-25 批 §14.2 #2-6 · §1.7.1 父侧实测):**尺寸行**——maxOutput 32_768 = **实测**
|
|
95
|
+
// (服务端直报「Range of max_tokens should be [1, 32768]」;131072 / 262144 均 400)。context 未取到 ⇒ 零口径——取兜底值
|
|
96
|
+
// 128_000(与建行前生效值同值,§14.3 兜底语义续效);thinking / 视觉有读数(默认关可开 / 不支持)但不落字段(§14.3 五名口径)。
|
|
97
|
+
["qwen-flash", { context: 128_000, maxOutput: 32_768 }],
|
|
98
|
+
["qwen-vl-max", { context: 128_000, maxOutput: 32_768 }],
|
|
99
|
+
// qwen3.7-max:**实测拒图像**(DashScope 400 "Unexpected item type in content"——真值彩图探针,2026-09-20)
|
|
100
|
+
// ⇒ 无视觉 = **不声明**(T-7 语义单一:multimodal 仅 true / undefined;补探已毕,无需再探)
|
|
101
|
+
["qwen3.7-max", { context: 1_000_000, maxOutput: 131_072, thinking: true, partialMode: true, thinkApi: "effort", reasoningEffortEnum: ["xhigh", "high"], tempRange: [0, 2] }],
|
|
73
102
|
// qwen3.7-flash / qwen3.8-flash (2026-09-20): thinking + effort enum + maxOutput + image intake
|
|
74
103
|
// are server-MEASURED (batch 2026-09-20-qwen-flash-specs §1.2 — bare request carries reasoning_tokens
|
|
75
104
|
// 166/27; 400 literal lists the enum; max_tokens range [1, 131072]). 3.7-flash enum has NO "max"
|
|
76
105
|
// (6 levels), 3.8-flash adds it (7); enum order = the server's literal order, first member "none"
|
|
77
106
|
// (D-5) — never re-sort by strength. context = doc/web statement (1M class, not API-measured);
|
|
78
|
-
// partialMode /
|
|
107
|
+
// partialMode / thinkApi / tempRange = same-family carry-over (not independently
|
|
79
108
|
// measured on these rows); reasoningEcho stays undeclared (cross-turn echo unverified — R-4).
|
|
80
|
-
["qwen3.7-flash", { context: 1_000_000, maxOutput: 131_072, thinking: true, partialMode: true, multimodal: true,
|
|
81
|
-
|
|
82
|
-
|
|
109
|
+
["qwen3.7-flash", { context: 1_000_000, maxOutput: 131_072, thinking: true, partialMode: true, multimodal: true, thinkApi: "effort", reasoningEffortEnum: ["none", "minimal", "low", "medium", "high", "xhigh"], tempRange: [0, 2] }],
|
|
110
|
+
// qwen3.7-plus(2026-09-24 bench 名单批):context = **官方口径(网络转述)**(2026-09-20 qwen-flash-specs 批 AC-6 已裁允许入表——「100 万长文档」族点名);
|
|
111
|
+
// maxOutput / partialMode / thinkApi / tempRange / thinking = **族沿用 qwen3.7-flash 行**;枚举 / 视觉面 = **未探**(不声明)。
|
|
112
|
+
["qwen3.7-plus", { context: 1_000_000, maxOutput: 131_072, thinking: true, partialMode: true, thinkApi: "effort", tempRange: [0, 2] }],
|
|
113
|
+
["qwen3.8-flash", { context: 1_000_000, maxOutput: 131_072, thinking: true, partialMode: true, multimodal: true, thinkApi: "effort", reasoningEffortEnum: ["none", "minimal", "low", "medium", "high", "xhigh", "max"], tempRange: [0, 2] }],
|
|
114
|
+
["qwen3.8-max", { context: 1_000_000, maxOutput: 131_072, thinking: true, partialMode: true, multimodal: true, thinkApi: "effort", reasoningEffortEnum: ["xhigh", "medium", "low"], tempRange: [0, 2] }],
|
|
83
115
|
// qwen3.8-omni-flash / qwen3.8-27b — parent 80-token probe (batch §1.8-①): reasoning_content
|
|
84
116
|
// present, reasoning_tokens 49, `effort:"none"` removes it ⇒ thinking MEASURED; enum / maxOutput
|
|
85
117
|
// / image intake measured the same way. omni-flash: context = doc/web statement (1M class, not
|
|
86
|
-
// API-measured); partialMode /
|
|
118
|
+
// API-measured); partialMode / thinkApi / tempRange = same-family carry-over;
|
|
87
119
|
// reasoningEcho undeclared (cross-turn echo unverified — R-4). The server also takes audio, this
|
|
88
120
|
// repo's call path sends images only ⇒ multimodal below = image intake (no `modalities` field, §2.7).
|
|
89
|
-
["qwen3.8-omni-flash",{ context: 1_000_000, maxOutput: 131_072, thinking: true, partialMode: true, multimodal: true,
|
|
121
|
+
["qwen3.8-omni-flash",{ context: 1_000_000, maxOutput: 131_072, thinking: true, partialMode: true, multimodal: true, thinkApi: "effort", reasoningEffortEnum: ["none", "minimal", "low", "medium", "high", "xhigh", "max"], tempRange: [0, 2] }],
|
|
90
122
|
// 27b: context 262_144 = doc/web statement, the native value (1M is YaRN extrapolation, local
|
|
91
|
-
// deploy only); partialMode /
|
|
123
|
+
// deploy only); partialMode / thinkApi / tempRange same-family carry-over; reasoningEcho
|
|
92
124
|
// undeclared (cross-turn echo unverified — R-4).
|
|
93
|
-
["qwen3.8-27b", { context: 262_144, maxOutput: 131_072, thinking: true, partialMode: true, multimodal: true,
|
|
125
|
+
["qwen3.8-27b", { context: 262_144, maxOutput: 131_072, thinking: true, partialMode: true, multimodal: true, thinkApi: "effort", reasoningEffortEnum: ["none", "minimal", "low", "medium", "high", "xhigh", "max"], tempRange: [0, 2] }],
|
|
94
126
|
// No generic "qwen" fallback row: unlisted qwen names deliberately resolve to DEFAULT_SPEC
|
|
95
127
|
// (128K / 32K, no vision) — per-name disposition in docs/core/design/MODEL-SPECS.md §2.4.
|
|
96
128
|
// Do not re-add a blanket prefix row (silent inheritance is how missing rows stayed invisible).
|
|
@@ -100,41 +132,54 @@ const MODEL_SPECS = [
|
|
|
100
132
|
// ≠ 3.8 系七档);maxOutput 65_536 = **校验级**(400「Range of max_tokens should be [1, 65536]」;
|
|
101
133
|
// 65536 → 200)。thinking / multimodal = **实测**(裸请求 rc=143–239 默认开、none/minimal rc=0 可关;
|
|
102
134
|
// 64×64 纯红 PNG 五名受理)。context = **官方口径**(未探边,文档口径非 API 实测);partialMode /
|
|
103
|
-
//
|
|
135
|
+
// thinkApi / tempRange = **族沿用**(qwen3.7/3.8 行先例);reasoningEcho 不声明
|
|
104
136
|
// (跨轮回声未验——R-4)。日期戳快照名不登——前缀命中母名行(有意继承)。
|
|
105
|
-
["qwen3.6-flash", { context: 1_000_000, maxOutput: 65_536, thinking: true, partialMode: true, multimodal: true,
|
|
137
|
+
["qwen3.6-flash", { context: 1_000_000, maxOutput: 65_536, thinking: true, partialMode: true, multimodal: true, thinkApi: "effort", reasoningEffortEnum: ["none", "minimal", "low", "medium", "high", "xhigh"], tempRange: [0, 2] }],
|
|
106
138
|
// qwen3.6-plus:同形行(共享证据块见 flash 行上)——校验级 maxOutput / 六档枚举、官方口径 context、族沿用机制位。
|
|
107
|
-
["qwen3.6-plus", { context: 1_000_000, maxOutput: 65_536, thinking: true, partialMode: true, multimodal: true,
|
|
139
|
+
["qwen3.6-plus", { context: 1_000_000, maxOutput: 65_536, thinking: true, partialMode: true, multimodal: true, thinkApi: "effort", reasoningEffortEnum: ["none", "minimal", "low", "medium", "high", "xhigh"], tempRange: [0, 2] }],
|
|
108
140
|
// qwen3.6-max-preview:同形行——校验级 maxOutput / 六档枚举、官方口径 context、族沿用机制位;视觉通道实测 ✓ 但纯红图答「黑色」(抽样波动,如实记)。
|
|
109
|
-
["qwen3.6-max-preview", { context: 1_000_000, maxOutput: 65_536, thinking: true, partialMode: true, multimodal: true,
|
|
141
|
+
["qwen3.6-max-preview", { context: 1_000_000, maxOutput: 65_536, thinking: true, partialMode: true, multimodal: true, thinkApi: "effort", reasoningEffortEnum: ["none", "minimal", "low", "medium", "high", "xhigh"], tempRange: [0, 2] }],
|
|
110
142
|
// qwen3.6-27b:同形行——校验级 maxOutput / 六档枚举、官方口径 context(未探边)、族沿用机制位。
|
|
111
|
-
["qwen3.6-27b", { context: 1_000_000, maxOutput: 65_536, thinking: true, partialMode: true, multimodal: true,
|
|
143
|
+
["qwen3.6-27b", { context: 1_000_000, maxOutput: 65_536, thinking: true, partialMode: true, multimodal: true, thinkApi: "effort", reasoningEffortEnum: ["none", "minimal", "low", "medium", "high", "xhigh"], tempRange: [0, 2] }],
|
|
144
|
+
// qwen3.5-27b(2026-09-24 bench 名单批):context 262_144 = **官方口径(定价页分档佐证——[128K, 256K) 档在售;规格页未逐名核)**;
|
|
145
|
+
// maxOutput / 机制位 = **族沿用 qwen3.6-27b 行**;枚举 / 视觉面 = **未探**(不声明)。
|
|
146
|
+
["qwen3.5-27b", { context: 262_144, maxOutput: 65_536, thinking: true, partialMode: true, thinkApi: "effort", tempRange: [0, 2] }],
|
|
112
147
|
// qwen3.6-35b-a3b:MoE 后缀(a3b = 激活参数量级)——校验级 maxOutput / 六档枚举、官方口径 context、族沿用机制位。
|
|
113
|
-
["qwen3.6-35b-a3b", { context: 1_000_000, maxOutput: 65_536, thinking: true, partialMode: true, multimodal: true,
|
|
148
|
+
["qwen3.6-35b-a3b", { context: 1_000_000, maxOutput: 65_536, thinking: true, partialMode: true, multimodal: true, thinkApi: "effort", reasoningEffortEnum: ["none", "minimal", "low", "medium", "high", "xhigh"], tempRange: [0, 2] }],
|
|
114
149
|
// MiniMax series
|
|
115
|
-
|
|
150
|
+
// effort(`reasoning_effort`)在 MiniMax 族 = **无生效面**(**实测**:effort 被忽略——`none` / `medium` 均 rc 在场;
|
|
151
|
+
// off 路径 = `thinking:{type:"disabled"}` ✓ rc=0)——medium 照发仅口径统一(batch-params-judge §1.2 / KD-32④)。
|
|
152
|
+
["MiniMax-M3", { context: 1_000_000, maxOutput: 128_000, thinking: true, multimodal: true, thinkApi: "type", thinkEnabledValue: "adaptive", tempRange: [0, 2], noUsageStream: true }],
|
|
116
153
|
// MiMo series (Xiaomi — OpenAI-compatible https://api.xiaomimimo.com/v1; deep thinking via
|
|
117
154
|
// thinking.type, default ON). Family echo policy stays conservative ("required" — tool rounds
|
|
118
155
|
// always echo); 2026-09-22 re-probe: value / missing field / empty string all 200 — the
|
|
119
156
|
// 2026-09-20 "must be passed back" 400 was NOT reproduced. v2.5 rows aligned 2026-09-22:
|
|
120
|
-
// maxOutput 131_072 =
|
|
121
|
-
["mimo-v2.5-pro", { context: 1_000_000, maxOutput: 131_072, thinking: true,
|
|
122
|
-
["mimo-v2.5", { context: 1_000_000, maxOutput: 131_072, thinking: true, multimodal: true,
|
|
157
|
+
// maxOutput 131_072 = **校验级**.
|
|
158
|
+
["mimo-v2.5-pro", { context: 1_000_000, maxOutput: 131_072, thinking: true, thinkApi: "type", reasoningEcho: "required", tempRange: [0, 1.5] }],
|
|
159
|
+
["mimo-v2.5", { context: 1_000_000, maxOutput: 131_072, thinking: true, multimodal: true, thinkApi: "type", reasoningEcho: "required", tempRange: [0, 1.5] }],
|
|
123
160
|
// MiMo V2.6 series (2026-09-22 launch — three independent rows, each probed individually).
|
|
124
161
|
// maxOutput 131_072 / tempRange [0, 1.5] = **校验级** (400 "at most 131072 completion tokens" /
|
|
125
162
|
// "temperature must be within [0, 1.5]", per model); thinking = **实测** (bare request carries
|
|
126
163
|
// reasoning_content; thinking.type disabled → rc gone ⇒ thinkApi "type" = measured face) and
|
|
127
|
-
// multimodal = **实测** (8×8 pure-red PNG, pro / flash answered "Red");
|
|
128
|
-
// (
|
|
129
|
-
|
|
164
|
+
// multimodal = **实测** (8×8 pure-red PNG, pro / flash answered "Red"); context 1_000_000 = **官方口径**
|
|
165
|
+
// (docs); reasoningEcho = **族沿用**.
|
|
166
|
+
// effort(`reasoning_effort`)在三款 V2.6 = **无生效面**(**实测**:effort 被忽略——`none` / `medium` 均 rc 在场;
|
|
167
|
+
// off 路径 = `thinking:{type:"disabled"}` ✓ rc=0)——medium 照发仅口径统一(batch-params-judge §1.2 / KD-32④)。
|
|
168
|
+
["mimo-v2.6-pro", { context: 1_000_000, maxOutput: 131_072, thinking: true, multimodal: true, thinkApi: "type", reasoningEcho: "required", tempRange: [0, 1.5] }],
|
|
130
169
|
// mimo-v2.6-flash: same row shape as pro — maxOutput 131_072 / tempRange [0, 1.5] = **校验级**,
|
|
131
|
-
// thinking / multimodal
|
|
132
|
-
["mimo-v2.6-flash", { context: 1_000_000, maxOutput: 131_072, thinking: true, multimodal: true,
|
|
170
|
+
// thinking / multimodal = **实测**, context = **官方口径**, reasoningEcho = **族沿用**.
|
|
171
|
+
["mimo-v2.6-flash", { context: 1_000_000, maxOutput: 131_072, thinking: true, multimodal: true, thinkApi: "type", reasoningEcho: "required", tempRange: [0, 1.5] }],
|
|
133
172
|
// mimo-v2.6-pro-ultraspeed: same row shape — same grades as flash (**校验级** / **实测** /
|
|
134
173
|
// **官方口径** / **族沿用**); image answer at a 64-token budget was truncated — "Red" at 512.
|
|
135
|
-
["mimo-v2.6-pro-ultraspeed", { context: 1_000_000, maxOutput: 131_072, thinking: true, multimodal: true,
|
|
136
|
-
|
|
137
|
-
|
|
174
|
+
["mimo-v2.6-pro-ultraspeed", { context: 1_000_000, maxOutput: 131_072, thinking: true, multimodal: true, thinkApi: "type", reasoningEcho: "required", tempRange: [0, 1.5] }],
|
|
175
|
+
// minimax-m3(小写前缀行——与上方 MiniMax-M3 行同值,同族两写法):effort 同按**无生效面**处置
|
|
176
|
+
// (**实测**:effort 被忽略;off 路径 = `thinking:{type:"disabled"}` ✓ rc=0——batch-params-judge §1.2 / KD-32④)。
|
|
177
|
+
["minimax-m3", { context: 1_000_000, maxOutput: 128_000, thinking: true, multimodal: true, thinkApi: "type", thinkEnabledValue: "adaptive", tempRange: [0, 2], noUsageStream: true }],
|
|
178
|
+
["minimax-m1", { context: 256_000, maxOutput: 128_000, thinking: false, noUsageStream: true }],
|
|
179
|
+
// MiniMax-M2.7(前缀行——覆盖标准档与 -highspeed · 2026-09-24 bench 名单批):thinking = **实测**(裸请求 rc 在场);off 路径 **未找到**
|
|
180
|
+
// (`thinking:{type:"disabled"}` 不生效——如实,不声明 thinkApi);effort 被忽略 ⇒ **无生效面**(枚举不声明;medium 照发仅口径统一);
|
|
181
|
+
// 尺寸 / noUsageStream = **族沿用 minimax-m1 行**;视觉面 = **未探**(不声明)。
|
|
182
|
+
["MiniMax-M2.7", { context: 256_000, maxOutput: 128_000, thinking: true, noUsageStream: true }],
|
|
138
183
|
// Grok series (xAI — OpenAI-compatible)
|
|
139
184
|
// grok-4.x: 500K context per xAI Grok 4.6 spec (corrected 2026-08; earlier entries said 1M)
|
|
140
185
|
["grok-4.6", { context: 500_000, maxOutput: 64_000, thinking: false, multimodal: true, tempRange: [0, 2] }],
|
|
@@ -145,15 +190,21 @@ const MODEL_SPECS = [
|
|
|
145
190
|
["mistral-large", { context: 128_000, maxOutput: 32_000, thinking: false, multimodal: true, tempRange: [0, 2] }],
|
|
146
191
|
["codestral", { context: 256_000, maxOutput: 32_000, thinking: false, tempRange: [0, 2] }],
|
|
147
192
|
// Claude series (Anthropic)
|
|
148
|
-
["claude-opus-5", { context: 1_000_000, maxOutput: 128_000, thinking: false, multimodal: true,
|
|
149
|
-
["claude-sonnet-5", { context: 1_000_000, maxOutput: 128_000, thinking: false, multimodal: true,
|
|
150
|
-
["claude-opus-4", { context: 200_000, maxOutput: 32_000, thinking: false, multimodal: true,
|
|
151
|
-
["claude-sonnet-4", { context: 200_000, maxOutput: 32_000, thinking: false, multimodal: true,
|
|
152
|
-
["claude-3.5-haiku", { context: 200_000, maxOutput: 8_192, thinking: false,
|
|
193
|
+
["claude-opus-5", { context: 1_000_000, maxOutput: 128_000, thinking: false, multimodal: true, format: "anthropic" }],
|
|
194
|
+
["claude-sonnet-5", { context: 1_000_000, maxOutput: 128_000, thinking: false, multimodal: true, format: "anthropic" }],
|
|
195
|
+
["claude-opus-4", { context: 200_000, maxOutput: 32_000, thinking: false, multimodal: true, format: "anthropic" }],
|
|
196
|
+
["claude-sonnet-4", { context: 200_000, maxOutput: 32_000, thinking: false, multimodal: true, format: "anthropic" }],
|
|
197
|
+
["claude-3.5-haiku", { context: 200_000, maxOutput: 8_192, thinking: false, format: "anthropic" }],
|
|
198
|
+
// claude-fable-5.1(2026-09-25 批 §14.2 #2-6 · §1.7.1 父侧交付):**尺寸行**——context 1_000_000 / maxOutput 128_000
|
|
199
|
+
// (多源网络转述级,本机无该渠道——行值 + 行注即标级);thinking「always-on adaptive」= 弱源读数 ⇒ 零口径不落字段(§14.3)。
|
|
200
|
+
["claude-fable-5.1", { context: 1_000_000, maxOutput: 128_000 }],
|
|
153
201
|
// Gemini series (Google)
|
|
154
|
-
["gemini-3-pro", { context: 1_000_000, maxOutput: 64_000, thinking: false, multimodal: true,
|
|
155
|
-
["gemini-2.5-pro", { context: 2_000_000, maxOutput: 64_000, thinking: false, multimodal: true,
|
|
156
|
-
["gemini-2.5-flash", { context: 1_000_000, maxOutput: 64_000, thinking: false, multimodal: true,
|
|
202
|
+
["gemini-3-pro", { context: 1_000_000, maxOutput: 64_000, thinking: false, multimodal: true, format: "google", noUsageStream: true }],
|
|
203
|
+
["gemini-2.5-pro", { context: 2_000_000, maxOutput: 64_000, thinking: false, multimodal: true, format: "google", noUsageStream: true }],
|
|
204
|
+
["gemini-2.5-flash", { context: 1_000_000, maxOutput: 64_000, thinking: false, multimodal: true, format: "google", noUsageStream: true }],
|
|
205
|
+
// gemini-3.1-pro(2026-09-25 批 §14.2 #2-6 · §1.7.1 父侧交付):**尺寸行**——context 1_048_576 / maxOutput 65_536(多源
|
|
206
|
+
// 网络转述级,本机无该渠道——行值 + 行注即标级);thinking「有·计入输出预算」= 弱源读数 ⇒ 零口径不落字段(§14.3)。
|
|
207
|
+
["gemini-3.1-pro", { context: 1_048_576, maxOutput: 65_536 }],
|
|
157
208
|
// Tencent Hunyuan (TokenHub — 聚合网关 `https://tokenhub.tencentmaas.com/v1`;批 2026-09-20-channel-onboarding)
|
|
158
209
|
// hy3:thinking / thinkApi / effort 枚举 = **本渠道实测**——裸请求 reasoning_content 在场(tok=16),
|
|
159
210
|
// `reasoning_effort:"none"` 即消失(实测唯一有效 off 路径)。枚举 = 七值**受理级探针**(七值全 200 受理;
|
|
@@ -163,7 +214,7 @@ const MODEL_SPECS = [
|
|
|
163
214
|
// **参考实配**(网关对 max_tokens 不硬拒 ⇒ 上限未证);context 256_000 = **网络口径**(他仓/文档 256K,未本渠道实测)。
|
|
164
215
|
["hy3", { context: 256_000, maxOutput: 128_000, thinking: true, thinkApi: "effort", reasoningEffortEnum: ["none", "minimal", "low", "medium", "high", "xhigh", "max"] }],
|
|
165
216
|
// hy3-preview(在场实测:/models + 401 前验活;能力位**未探针**)——**尺寸行**:仅登记尺寸位,取值 =
|
|
166
|
-
// hy3 **同族沿用**(maxOutput 参考实配 / context 网络口径)。D-11
|
|
217
|
+
// hy3 **同族沿用**(maxOutput 参考实配 / context 网络口径)。D-11(2026-09-25 收窄现口径):能力位**无族据**一律不声明 ⇒ 该名无族据 ⇒ thinking / 枚举 / 视觉全不声明。
|
|
167
218
|
["hy3-preview", { context: 256_000, maxOutput: 128_000 }],
|
|
168
219
|
// hy4-preview(在场实测:/models + 401;能力位**未探针**)——尺寸行:取值 = hy3 族**同族沿用**
|
|
169
220
|
// (maxOutput 参考实配级取值 / context 网络口径;批次档 §1.2 未给该名尺寸行 ⇒ 上报清单 2,行注即标级)。
|
|
@@ -177,8 +228,19 @@ const MODEL_SPECS = [
|
|
|
177
228
|
// seed-lite = 同族全针(批次档 §1.2 lite 行:思考 tok=161 / 视觉 "Red" / 上限 131 072 / echo 真名)——
|
|
178
229
|
// context 同按 **官方口径** + **实测**下界标注;行独立(同值集 ≠ 同行:改一行不动另一行)。
|
|
179
230
|
["doubao-seed-2-0-lite-260428", { context: 256_000, maxOutput: 131_072, thinking: true, thinkApi: "effort", reasoningEffortEnum: ["none", "minimal", "low", "medium", "high", "xhigh", "max"], multimodal: true }],
|
|
231
|
+
// doubao-seed-2-1 三档(火山方舟 · 2026-09-24 bench 名单批 · 三行同形):thinking / thinkApi / 枚举 = **实测**
|
|
232
|
+
// (裸请求 rc 在场;`reasoning_effort:"none"` → rc=0;七值全 200、乱值 400 泛化 ⇒ **受理级**——等级低于 2.0 行的
|
|
233
|
+
// 「真校验」,同值集不混级);maxOutput 524_288 = **受理级**(262 144 / 524 288 均受理;**上限未证**);
|
|
234
|
+
// context = **族沿用 2.0 行**(官方口径未逐名取证);**视觉面未探**(不声明——如实标级,不冒充实测)。
|
|
235
|
+
["doubao-seed-2-1-pro-260915", { context: 256_000, maxOutput: 524_288, thinking: true, thinkApi: "effort", reasoningEffortEnum: ["none", "minimal", "low", "medium", "high", "xhigh", "max"] }],
|
|
236
|
+
["doubao-seed-2-1-turbo-260628", { context: 256_000, maxOutput: 524_288, thinking: true, thinkApi: "effort", reasoningEffortEnum: ["none", "minimal", "low", "medium", "high", "xhigh", "max"] }],
|
|
237
|
+
["doubao-seed-2-1-lite-260915", { context: 256_000, maxOutput: 524_288, thinking: true, thinkApi: "effort", reasoningEffortEnum: ["none", "minimal", "low", "medium", "high", "xhigh", "max"] }],
|
|
238
|
+
// step-3.7-flash(StepFun · 2026-09-25 批 §14.2 #2-6 · §1.7.1 父侧交付):**尺寸行**——context 262_144(多源 256K =
|
|
239
|
+
// 网络转述级;渠道未激活——400 "product is not activated");maxOutput 未取到 ⇒ 零口径——取兜底值 32_000(与建行前
|
|
240
|
+
// 生效值同值);行键 = 裸名(渠道名录形 stepfun/step-3.7-flash——命名空间剥离同命中)。
|
|
241
|
+
["step-3.7-flash", { context: 262_144, maxOutput: 32_000 }],
|
|
180
242
|
]
|
|
181
|
-
const DEFAULT_SPEC = { context: 128_000, maxOutput: 32_000
|
|
243
|
+
const DEFAULT_SPEC = { context: 128_000, maxOutput: 32_000 }
|
|
182
244
|
|
|
183
245
|
/** Look up spec by model name prefix (case-insensitive), conservative default for unknown models.
|
|
184
246
|
*
|
|
@@ -194,9 +256,11 @@ const SORTED_SPECS = [...MODEL_SPECS].sort((a, b) => b[0].length - a[0].length)
|
|
|
194
256
|
|
|
195
257
|
/** Single table lookup shared by specForModel / specMatch — prefix match (case-insensitive)
|
|
196
258
|
* with vendor-namespace stripping. Returns null on a miss (DEFAULT_SPEC is the caller-side
|
|
197
|
-
* fallback and is deliberately NOT returned here — `matched` needs the miss itself).
|
|
259
|
+
* fallback and is deliberately NOT returned here — `matched` needs the miss itself).
|
|
260
|
+
* 非串 model(外端脏载 / 手工档)归一等价空串 ⇒ 未命中 ⇒ 调用侧 DEFAULT_SPEC(#638 查表全性:
|
|
261
|
+
* 下游无类型门——`.toLowerCase` 只认串,非串归一后本函数恒 total,同 providerSpec 文档句)。 */
|
|
198
262
|
function lookupSpec(model) {
|
|
199
|
-
const m = (model
|
|
263
|
+
const m = (typeof model === "string" ? model : "").toLowerCase()
|
|
200
264
|
for (const [prefix, spec] of SORTED_SPECS) {
|
|
201
265
|
if (m.startsWith(prefix.toLowerCase())) return spec
|
|
202
266
|
}
|
|
@@ -215,7 +279,8 @@ function lookupSpec(model) {
|
|
|
215
279
|
* instead of silently degrading to the 128K default (IK5VGJ). The dedupe set is shared by
|
|
216
280
|
* specForModel / specMatch (PROVIDER.md §16 M5). */
|
|
217
281
|
function warnUnknownModel(model) {
|
|
218
|
-
|
|
282
|
+
// 非串 model(脏载)归一空串 ⇒ 不警告(未登记 ≠ 拼错——不刷屏;#638 与 lookupSpec 同归一)
|
|
283
|
+
const m = (typeof model === "string" ? model : "").toLowerCase()
|
|
219
284
|
if (m && !warnedModels.has(m)) {
|
|
220
285
|
warnedModels.add(m)
|
|
221
286
|
console.warn(`[config] model "${model}" not found in MODEL_SPECS — using default spec (128K context, 32K output). Check the model ID or add an alias.`)
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* notify-policy.mjs — 完成提示面**策略**(失焦门 + 单档 + 载荷成形 + 词键)——「桌面处理流 · VSC 对齐」批 R6 上提产物。
|
|
3
|
+
*
|
|
4
|
+
* 上提源 = 桌面现状超集 `thincoder-desktop/src/main/notify.mjs`(零宿主依赖 —— **纯搬,零语义改**);
|
|
5
|
+
* 对位锚(迁移前坐标)= VSC `thincoder-vscode/src/extension/notify.mjs:9-18`(失焦门同判据)+
|
|
6
|
+
* `panel-callbacks.mjs:236`(`!autoTurn` 门径)。平台落子(Electron `Notification` vs
|
|
7
|
+
* VSC `showInformationMessage`)= 宿主能力面(真端差登记 ①)⇒ **装配留端**(桌面 =
|
|
8
|
+
* `thincoder-desktop/src/main/main.mjs`;VSC = `notify.mjs` 宿主包装——已随 parity-b4 迁移落形);本档只承策略面。
|
|
9
|
+
*
|
|
10
|
+
* `notify`(平台落子)· `focused`(焦态判据)· `reveal`(点击面)· `localeOf`(语言取值缝——VSC
|
|
11
|
+
* wrapper 携 `vscode.env.language`,`normalizeLocale` 归一 `zh-CN → zh`;缺省 = `agent.config?.locale`,
|
|
12
|
+
* 桌面径零改)四件注入 ⇒ 平 node 直测。词键一键自此持本档(值 = 原 VSC 逐字 `notify.done`——该键已随
|
|
13
|
+
* parity-b4 迁移自 `thincoder-vscode/locales/{zh,en}.json:222` 删)。触发单档(`!autoTurn` 判据在调用面 —— 单回合
|
|
14
|
+
* 执行面;VSC 同判据):
|
|
15
|
+
* 用户回合完成(VSC 逐字同判据 = `panel-callbacks.mjs:236` 的 `!autoTurn` 门)
|
|
16
|
+
* `title` = 会话标题(`agent.title`——槽装载面在场;空 ∕ 不可得 ⇒ **零携**);点击 = 聚焦窗口 ∕
|
|
17
|
+
* 打开 thincoder 视图(reveal 语义 —— 宿主面;不切会话)。
|
|
18
|
+
* 消费面 = 桌面 `thincoder-desktop/src/main/notify.mjs`(端胶水 re-export);VSC `notify.mjs`(宿主包装——已随 parity-b4 迁移落形)。
|
|
19
|
+
*/
|
|
20
|
+
import { normalizeLocale } from "./i18n.mjs"
|
|
21
|
+
|
|
22
|
+
/** 词键值(zh ∕ en 常量对:`notify.done` = 原 VSC `locales/{zh,en}.json:222` 逐字——该键已随 parity-b4 迁移自 locales 删)。 */
|
|
23
|
+
export const NOTIFY_TEXTS = Object.freeze({
|
|
24
|
+
zh: "ThinCoder:本轮完成",
|
|
25
|
+
en: "ThinCoder: turn complete",
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
/** 零动作面(`notify` 注入缺位 = 提示面缺位 ⇒ 零连带 —— 回合链不受累、不抛;沿「禁假造」口径不落假通知)。 */
|
|
29
|
+
const SILENT = Object.freeze({ turnDone: () => false })
|
|
30
|
+
|
|
31
|
+
/** 提示面工厂:`notify(payload)` = 平台落子(载荷 `{ title?, body, reveal? }`)· `focused()` = 窗口聚焦判据
|
|
32
|
+
* (真 ⇒ 门闭合 · 缺省 = 恒聚焦 ⇒ 零通知)· `reveal()` = 点击面(宿主语义)· `localeOf(agent)` =
|
|
33
|
+
* 语言取值缝(缺省 = `agent?.config?.locale`)。返回单档 `turnDone`(返回值 = 是否落子,测试读数面)。 */
|
|
34
|
+
export function createNotifier({ notify = null, focused = null, reveal = null, localeOf = null } = {}) {
|
|
35
|
+
if (typeof notify !== "function") return SILENT
|
|
36
|
+
const isFocused = typeof focused === "function" ? focused : () => true
|
|
37
|
+
const langOf = (agent) => (normalizeLocale(typeof localeOf === "function" ? localeOf(agent) : agent?.config?.locale) === "zh" ? "zh" : "en")
|
|
38
|
+
const fire = ({ agent = null } = {}) => {
|
|
39
|
+
if (isFocused()) return false // 失焦门:聚焦 = no-op(never noise —— VSC `thincoder-vscode/src/extension/notify.mjs:9-18` 同判据)
|
|
40
|
+
const payload = { body: NOTIFY_TEXTS[langOf(agent)] }
|
|
41
|
+
const title = typeof agent?.title === "string" && agent.title.trim() !== "" ? agent.title : null
|
|
42
|
+
if (title !== null) payload.title = title // 会话标题在场才携(不可得 ⇒ 零携)
|
|
43
|
+
if (typeof reveal === "function") payload.reveal = reveal
|
|
44
|
+
try { notify(payload) } catch (error) { console.error("[notify] dispatch failed:", error) } // 平台抛 ⇒ 零连带
|
|
45
|
+
return true
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
/** 用户回合完成(`!autoTurn` 判据在调用面 —— 单回合执行面成功径)。 */
|
|
49
|
+
turnDone(vars) { return fire(vars) },
|
|
50
|
+
}
|
|
51
|
+
}
|