Qwen3.8-Flash-Next on any consumer hardware: one-click install for Windows / Linux. Strata inference engine, OpenAI/Anthropic API on localhost, optional image input.
C++
owner decisions: goal, skill, workflow and fork tools back in the agent (short plain prompt kept); agent and chat default reasoning effort Medium, with a test per level (Off/Low/Medium/High/unset) on the chat_template_kwargs the server receives; Tune dialog switch reads 'Allow settings that change answers very slightly (same quality)' in all 8 languages, off by default, with a test
Niko12211ea66f60afe8
diff --git a/apps/host/scripts/make-tune-locales.py b/apps/host/scripts/make-tune-locales.pyindex dfd958701..4fa75b0dc 100644--- a/apps/host/scripts/make-tune-locales.py+++ b/apps/host/scripts/make-tune-locales.py@@ -34,7 +34,7 @@ KEYS = ["Thorough (up to 2 hours)","What you mostly do","Coding with long prompts",- "Allow settings that can change answers slightly",+ "Allow settings that change answers very slightly (same quality)","Saved tunings","In use","Use",@@ -58,7 +58,7 @@ T = {"这些选择还没有已保存的调优。","Strata 会在这台电脑上尝试不同的设置,并保留能让回答更快的设置。运行期间模型会被卸载,电脑会比较忙。","请先完成当前操作。", "花多长时间", "快速(约 20 分钟)", "彻底(最多 2 小时)", "你主要做什么",- "长提示的编程", "允许可能略微改变回答的设置", "已保存的调优", "使用中", "使用",+ "长提示的编程", "允许会让回答产生极细微差别的设置(质量相同)", "已保存的调优", "使用中", "使用","再次检查(约 2 分钟)", "再次调优", "开始调优", "正在调优你的模型",],"ja": [@@ -74,7 +74,7 @@ T = {"この選択に対する保存済みチューニングはまだありません。","Strata はこの PC でさまざまな設定を試し、回答が速くなるものを残します。実行中はモデルがアンロードされ、コンピューターは負荷が高くなります。","先に現在の操作を終えてください。", "かける時間", "クイック(約 20 分)", "じっくり(最大 2 時間)", "主な用途",- "長いプロンプトでのコーディング", "回答がわずかに変わる可能性のある設定も許可する", "保存済みチューニング", "使用中", "使用する",+ "長いプロンプトでのコーディング", "回答がごくわずかに変わる設定を許可する(品質は同じ)", "保存済みチューニング", "使用中", "使用する","もう一度チェック(約 2 分)", "もう一度チューニング", "チューニングを開始", "モデルをチューニング中",],"de": [@@ -90,7 +90,7 @@ T = {"Für diese Auswahl gibt es noch keine gespeicherte Abstimmung.","Strata probiert auf diesem PC verschiedene Einstellungen aus und behält die, die Antworten schneller machen. Dein Modell wird dabei entladen, und der Computer ist ausgelastet.","Beende zuerst den aktuellen Vorgang.", "Wie lange soll es dauern?", "Schnell (etwa 20 Minuten)", "Gründlich (bis zu 2 Stunden)", "Was du hauptsächlich machst",- "Programmieren mit langen Prompts", "Einstellungen erlauben, die Antworten leicht verändern können", "Gespeicherte Abstimmungen", "In Gebrauch", "Verwenden",+ "Programmieren mit langen Prompts", "Einstellungen erlauben, die Antworten minimal verändern (gleiche Qualität)", "Gespeicherte Abstimmungen", "In Gebrauch", "Verwenden","Erneut prüfen (etwa 2 Minuten)", "Erneut abstimmen", "Abstimmung starten", "Dein Modell wird abgestimmt",],"es": [@@ -106,7 +106,7 @@ T = {"Todavía no hay un ajuste guardado para estas opciones.","Strata prueba distintos ajustes en este PC y conserva los que hacen las respuestas más rápidas. Tu modelo se descarga mientras tanto y el ordenador estará ocupado.","Termina primero la operación actual.", "Cuánto tiempo dedicar", "Rápido (unos 20 minutos)", "A fondo (hasta 2 horas)", "Qué haces sobre todo",- "Programar con prompts largos", "Permitir ajustes que pueden cambiar ligeramente las respuestas", "Ajustes guardados", "En uso", "Usar",+ "Programar con prompts largos", "Permitir ajustes que cambian las respuestas muy ligeramente (misma calidad)", "Ajustes guardados", "En uso", "Usar","Comprobar de nuevo (unos 2 minutos)", "Ajustar de nuevo", "Empezar a ajustar", "Ajustando tu modelo",],"ru": [@@ -122,7 +122,7 @@ T = {"Для этих параметров пока нет сохранённой настройки.","Strata пробует на этом ПК разные настройки и оставляет те, что ускоряют ответы. Пока это идёт, модель выгружена, а компьютер занят.","Сначала завершите текущую операцию.", "Сколько времени потратить", "Быстро (около 20 минут)", "Тщательно (до 2 часов)", "Чем вы в основном занимаетесь",- "Программирование с длинными промптами", "Разрешить настройки, которые могут немного изменить ответы", "Сохранённые настройки", "Используется", "Использовать",+ "Программирование с длинными промптами", "Разрешить настройки, которые совсем немного меняют ответы (то же качество)", "Сохранённые настройки", "Используется", "Использовать","Проверить снова (около 2 минут)", "Настроить снова", "Начать настройку", "Настройка вашей модели",],"pt": [@@ -138,7 +138,7 @@ T = {"Ainda não há ajuste salvo para estas escolhas.","O Strata testa configurações diferentes neste PC e mantém as que deixam as respostas mais rápidas. Seu modelo é descarregado enquanto isso e o computador fica ocupado.","Termine primeiro a operação atual.", "Quanto tempo dedicar", "Rápido (cerca de 20 minutos)", "Completo (até 2 horas)", "O que você mais faz",- "Programação com prompts longos", "Permitir configurações que podem mudar um pouco as respostas", "Ajustes salvos", "Em uso", "Usar",+ "Programação com prompts longos", "Permitir ajustes que mudam as respostas muito ligeiramente (mesma qualidade)", "Ajustes salvos", "Em uso", "Usar","Verificar de novo (cerca de 2 minutos)", "Ajustar de novo", "Iniciar ajuste", "Ajustando o seu modelo",],"ko": [@@ -154,7 +154,7 @@ T = {"이 선택에 대해 저장된 최적화가 아직 없습니다.","Strata는 이 PC에서 여러 설정을 시험하고 답변을 더 빠르게 하는 설정만 남깁니다. 실행하는 동안 모델이 언로드되고 컴퓨터가 바쁝니다.","먼저 현재 작업을 끝내세요.", "얼마나 오래 할까요", "빠름 (약 20분)", "꼼꼼히 (최대 2시간)", "주로 하는 일",- "긴 프롬프트로 코딩", "답변을 조금 바꿀 수 있는 설정 허용", "저장된 최적화", "사용 중", "사용",+ "긴 프롬프트로 코딩", "답변이 아주 조금 달라질 수 있는 설정 허용 (같은 품질)", "저장된 최적화", "사용 중", "사용","다시 점검 (약 2분)", "다시 최적화", "최적화 시작", "모델을 최적화하는 중",],}diff --git a/apps/host/server/agent/agent-bridge.mjs b/apps/host/server/agent/agent-bridge.mjsindex b9182be16..e6b2a0a0b 100644--- a/apps/host/server/agent/agent-bridge.mjs+++ b/apps/host/server/agent/agent-bridge.mjs@@ -251,7 +251,7 @@ export function createAgentBridge({ dataDir, componentsDir = null, bundledDir =// The model and the chat's thinking level (the Reasoning menu) are sent to the Harness when either changed. A level the route does// not have (an API model with its own vocabulary) is dropped and the model's own default stands: never an error for the person.- const level = effortOf(thinking);+ const level = effortOf(thinking ?? 'Medium'); // the menu's default is Mediumconst wanted = `${route.route}/${route.modelId}/${level ?? ''}`;if (c.route !== wanted || c.routeGeneration !== runtime.generation) {const select = effort => runtime.gw.rpc('session/selectModel', { request: { sessionId, provider: route.route, model: route.modelId, ...(effort ? { reasoningEffort: effort } : {}) } });diff --git a/apps/host/server/agent/preset.mjs b/apps/host/server/agent/preset.mjsindex 8a473478a..79eec15ff 100644--- a/apps/host/server/agent/preset.mjs+++ b/apps/host/server/agent/preset.mjs@@ -17,10 +17,7 @@* preset (nothing can change); the Harness's plan mode needs an interactive review the app does not have.* - `tool-bash` / `tool-pwsh`: exactly one, by operating system (the Harness chooses the same at load).* - `tool-plugin-manager` stays disabled, as in `standard`.- * - Prompt size: a local model reads every tool schema and every instruction on every first message (about 9,000 tokens at- * the start, 20 s before the first word on a 64K model). The goal tools, the skill tool (no skill ships), and the- * workflow tool (3.4 KB of schema on its own) are left out; they are the largest and the least used. Helper agents,- * files, shell, search, todo, web fetch and present stay.+ * - The goal, skill, workflow and fork tools are kept (owner decision): the first message is slower, and the short plain system prompt below keeps it as small as it can be.*//** Plugin ids of the pinned Harness `standard` preset, in its order (the drift check). */@@ -30,9 +27,9 @@ export const STANDARD_PLUGIN_IDS = ['tool-ask-user', 'tool-todo', 'tool-web', 'present', 'tool-plugin-manager',];/** What we leave out of it. */-export const REMOVED_PLUGIN_IDS = ['tool-schedule', 'tool-ask-user', 'planning', 'skill-filesystem', 'tool-skill', 'command-goal', 'tool-goal'];+export const REMOVED_PLUGIN_IDS = ['tool-schedule', 'tool-ask-user', 'planning'];/** Plugins removed from inside the `delegation` group (the group stays: helper agents are a feature). */-export const REMOVED_DELEGATION_IDS = ['workflow-ptc', 'tool-workflow', 'tool-subagent-fork'];+export const REMOVED_DELEGATION_IDS = [];/*** The whole system prompt of an app chat. The Harness's own text is about 4.8 KB (about 1,200 tokens) of guidance for working on@@ -63,6 +60,10 @@ export function standardPreset({ platform = process.platform, search = false } ={ id: 'tool-fs', name: '@deepseek-ai/dsh-tool-fs' },{ id: 'tool-fs-search', name: '@deepseek-ai/dsh-tool-fs-search', config: { sampleOverCapGlobResults: false } },{ id: 'tool-jobs', name: '@deepseek-ai/dsh-tool-jobs' },+ { id: 'skill-filesystem', name: '@deepseek-ai/dsh-skill-filesystem' },+ { id: 'tool-skill', name: '@deepseek-ai/dsh-tool-skill' },+ { id: 'command-goal', name: '@deepseek-ai/dsh-command-goal' },+ { id: 'tool-goal', name: '@deepseek-ai/dsh-tool-goal' },{id: 'compaction', name: 'cordis:group', group: true, isolate: { compaction: true, toolResultPruner: true },config: [@@ -77,6 +78,9 @@ export function standardPreset({ platform = process.platform, search = false } ={ id: 'tool-subagent-control', name: '@deepseek-ai/dsh-tool-subagent-control' },{ id: 'tool-subagent-list-agents', name: '@deepseek-ai/dsh-tool-subagent-control/list-agents' },{ id: 'tool-subagent', name: '@deepseek-ai/dsh-tool-subagent', config: { provider: 'spawn', toolName: 'subagent', modelSelectionSettings: true } },+ { id: 'tool-subagent-fork', name: '@deepseek-ai/dsh-tool-subagent', config: { provider: 'fork', toolName: 'subagent_fork' } },+ { id: 'workflow-ptc', name: '@deepseek-ai/dsh-workflow-ptc', config: { provider: 'spawn' } },+ { id: 'tool-workflow', name: '@deepseek-ai/dsh-tool-workflow' },],},{ id: 'tool-todo', name: '@deepseek-ai/dsh-tool-todo', config: { allowParallelInProgress: true } },diff --git a/apps/host/server/index.mjs b/apps/host/server/index.mjsindex 469ff9056..2b55e2aaf 100644--- a/apps/host/server/index.mjs+++ b/apps/host/server/index.mjs@@ -492,7 +492,7 @@ async function runAgentTurn({ res, controller, chatId, body, message, workspaceI}}-async function runTurn({ message, history = [], onFrame, signal, client, workspaceId = null, sessionId = null, remoteModel = null, runtimeModelId = undefined, nativeModelId, images=[], useTools=false, thinking='high', thinkingBudget=0 }) {+async function runTurn({ message, history = [], onFrame, signal, client, workspaceId = null, sessionId = null, remoteModel = null, runtimeModelId = undefined, nativeModelId, images=[], useTools=false, thinking='medium', thinkingBudget=0 }) {if (remoteModel) return runRemoteTurn({ selection: remoteModel, message, history, onFrame, signal, workspaceId });if(native.hasLive()||nativeModelId){let instance;try{instance=native.resolveInstance(nativeModelId??native.state().defaultId);}catch(e){onFrame({type:'error',message:e.message});return {error:e.message};}const started=Date.now(),cancel=new AbortController();diff --git a/apps/host/src/components/ComposerControls.tsx b/apps/host/src/components/ComposerControls.tsxindex 6151a360f..485cfe971 100644--- a/apps/host/src/components/ComposerControls.tsx+++ b/apps/host/src/components/ComposerControls.tsx@@ -49,7 +49,7 @@ export function ComposerControls({ session, onPreview, onAttach, onError, onSlasconst attachLatest = useRef(onAttach);attachLatest.current = onAttach;const mode = modes.find(m => m.value === session?.preferences?.mode) ?? modes[0];- const effort = efforts.includes(session?.preferences?.thinking ?? '') ? session!.preferences!.thinking! : 'High';+ const effort = efforts.includes(session?.preferences?.thinking ?? '') ? session!.preferences!.thinking! : 'Medium';const budget = session?.preferences?.thinkingBudget ?? 0;const shortcut = MOD === '⌘' ? '⌘⇧A' : 'Ctrl+Shift+A';async function openFile(selected: File | undefined) {diff --git a/apps/host/src/components/NativeTune.tsx b/apps/host/src/components/NativeTune.tsxindex 75b366a99..3cae81c13 100644--- a/apps/host/src/components/NativeTune.tsx+++ b/apps/host/src/components/NativeTune.tsx@@ -89,7 +89,7 @@ export function NativeTune({ open, onClose, model, resourceProfile, vision }: {{other ? <p className="small inline-error" role="alert">{tr("Finish the current operation first.")}</p> : null}<label className="input-field"><span>{tr("How long to spend")}</span><Select value={mode} ariaLabel={tr("How long to spend")} options={[{ value: 'quick', label: 'Quick (about 20 minutes)' }, { value: 'thorough', label: 'Thorough (up to 2 hours)' }]} onChange={v => setMode(v as 'quick' | 'thorough')}/></label><label className="input-field"><span>{tr("What you mostly do")}</span><Select value={use} ariaLabel={tr("What you mostly do")} options={[{ value: 'chat', label: 'Chat' }, { value: 'coding', label: 'Coding with long prompts' }]} onChange={v => setUse(v as 'chat' | 'coding')}/></label>- <label className="check-label"><input type="checkbox" checked={allowSmall} onChange={e => setAllowSmall(e.target.checked)}/>{tr("Allow settings that can change answers slightly")}</label>+ <label className="check-label"><input type="checkbox" checked={allowSmall} onChange={e => setAllowSmall(e.target.checked)}/>{tr("Allow settings that change answers very slightly (same quality)")}</label>{status && status.presets.length ? <section className="stack"><h2 className="h4">{tr("Saved tunings")}</h2>{status.presets.map(p => <div className="row row--between" key={p.id}><span>{p.name}{p.active ? <small> {'·'} {tr("In use")}</small> : null}</span>diff --git a/apps/host/src/lib/store.ts b/apps/host/src/lib/store.tsindex 15dac43bc..5dd878fd3 100644--- a/apps/host/src/lib/store.ts+++ b/apps/host/src/lib/store.ts@@ -1334,7 +1334,7 @@ export async function sendMessage(text: string) {useTools:state.sessions.find(s=>s.id===sessionId)?.preferences?.useTools===true,// A chat set to plain talk (preferences.agent === false) never runs a tool: the host answers it directly....(state.sessions.find(s=>s.id===sessionId)?.preferences?.agent===false?{agent:false}:{}),- thinking:state.sessions.find(s=>s.id===sessionId)?.preferences?.thinking??'High',+ thinking:state.sessions.find(s=>s.id===sessionId)?.preferences?.thinking??'Medium',thinkingBudget:state.sessions.find(s=>s.id===sessionId)?.preferences?.thinkingBudget??0,// The Mode menu's choice for this chat, read when the turn starts; the host applies it to the agent.mode:state.sessions.find(s=>s.id===sessionId)?.preferences?.mode??'manual',diff --git a/apps/host/src/locales/tune-de.json b/apps/host/src/locales/tune-de.jsonindex 92462cccb..bd4a245c8 100644--- a/apps/host/src/locales/tune-de.json+++ b/apps/host/src/locales/tune-de.json@@ -29,7 +29,7 @@"tune28": "Gründlich (bis zu 2 Stunden)","tune29": "Was du hauptsächlich machst","tune30": "Programmieren mit langen Prompts",- "tune31": "Einstellungen erlauben, die Antworten leicht verändern können",+ "tune31": "Einstellungen erlauben, die Antworten minimal verändern (gleiche Qualität)","tune32": "Gespeicherte Abstimmungen","tune33": "In Gebrauch","tune34": "Verwenden",diff --git a/apps/host/src/locales/tune-en.json b/apps/host/src/locales/tune-en.jsonindex 30e2b76cf..3a289e468 100644--- a/apps/host/src/locales/tune-en.json+++ b/apps/host/src/locales/tune-en.json@@ -29,7 +29,7 @@"tune28": "Thorough (up to 2 hours)","tune29": "What you mostly do","tune30": "Coding with long prompts",- "tune31": "Allow settings that can change answers slightly",+ "tune31": "Allow settings that change answers very slightly (same quality)","tune32": "Saved tunings","tune33": "In use","tune34": "Use",diff --git a/apps/host/src/locales/tune-es.json b/apps/host/src/locales/tune-es.jsonindex 6c8df85de..752d3ec61 100644--- a/apps/host/src/locales/tune-es.json+++ b/apps/host/src/locales/tune-es.json@@ -29,7 +29,7 @@"tune28": "A fondo (hasta 2 horas)","tune29": "Qué haces sobre todo","tune30": "Programar con prompts largos",- "tune31": "Permitir ajustes que pueden cambiar ligeramente las respuestas",+ "tune31": "Permitir ajustes que cambian las respuestas muy ligeramente (misma calidad)","tune32": "Ajustes guardados","tune33": "En uso","tune34": "Usar",diff --git a/apps/host/src/locales/tune-ja.json b/apps/host/src/locales/tune-ja.jsonindex 87c74abf1..80b4546b1 100644--- a/apps/host/src/locales/tune-ja.json+++ b/apps/host/src/locales/tune-ja.json@@ -29,7 +29,7 @@"tune28": "じっくり(最大 2 時間)","tune29": "主な用途","tune30": "長いプロンプトでのコーディング",- "tune31": "回答がわずかに変わる可能性のある設定も許可する",+ "tune31": "回答がごくわずかに変わる設定を許可する(品質は同じ)","tune32": "保存済みチューニング","tune33": "使用中","tune34": "使用する",diff --git a/apps/host/src/locales/tune-ko.json b/apps/host/src/locales/tune-ko.jsonindex 8faca5adc..93fedb44e 100644--- a/apps/host/src/locales/tune-ko.json+++ b/apps/host/src/locales/tune-ko.json@@ -29,7 +29,7 @@"tune28": "꼼꼼히 (최대 2시간)","tune29": "주로 하는 일","tune30": "긴 프롬프트로 코딩",- "tune31": "답변을 조금 바꿀 수 있는 설정 허용",+ "tune31": "답변이 아주 조금 달라질 수 있는 설정 허용 (같은 품질)","tune32": "저장된 최적화","tune33": "사용 중","tune34": "사용",diff --git a/apps/host/src/locales/tune-pt.json b/apps/host/src/locales/tune-pt.jsonindex 39359010d..0d97159bb 100644--- a/apps/host/src/locales/tune-pt.json+++ b/apps/host/src/locales/tune-pt.json@@ -29,7 +29,7 @@"tune28": "Completo (até 2 horas)","tune29": "O que você mais faz","tune30": "Programação com prompts longos",- "tune31": "Permitir configurações que podem mudar um pouco as respostas",+ "tune31": "Permitir ajustes que mudam as respostas muito ligeiramente (mesma qualidade)","tune32": "Ajustes salvos","tune33": "Em uso","tune34": "Usar",diff --git a/apps/host/src/locales/tune-ru.json b/apps/host/src/locales/tune-ru.jsonindex 3f5fe5459..5a28027a9 100644--- a/apps/host/src/locales/tune-ru.json+++ b/apps/host/src/locales/tune-ru.json@@ -29,7 +29,7 @@"tune28": "Тщательно (до 2 часов)","tune29": "Чем вы в основном занимаетесь","tune30": "Программирование с длинными промптами",- "tune31": "Разрешить настройки, которые могут немного изменить ответы",+ "tune31": "Разрешить настройки, которые совсем немного меняют ответы (то же качество)","tune32": "Сохранённые настройки","tune33": "Используется","tune34": "Использовать",diff --git a/apps/host/src/locales/tune-zh.json b/apps/host/src/locales/tune-zh.jsonindex 458dbbbfd..836093f7e 100644--- a/apps/host/src/locales/tune-zh.json+++ b/apps/host/src/locales/tune-zh.json@@ -29,7 +29,7 @@"tune28": "彻底(最多 2 小时)","tune29": "你主要做什么","tune30": "长提示的编程",- "tune31": "允许可能略微改变回答的设置",+ "tune31": "允许会让回答产生极细微差别的设置(质量相同)","tune32": "已保存的调优","tune33": "使用中","tune34": "使用",diff --git a/apps/host/tests/agent-tools.test.mjs b/apps/host/tests/agent-tools.test.mjsindex 3c40bc5d6..5a6bf0afa 100644--- a/apps/host/tests/agent-tools.test.mjs+++ b/apps/host/tests/agent-tools.test.mjs@@ -105,7 +105,7 @@ test('the agent is offered exactly these tools: everything useful, no scheduler,const r = await rig(t);await r.run('inv', 'SCRIPT:echo hi');const offered = [...r.worker.requests].reverse().find(q => q.toolNames.length)?.toolNames.sort();- assert.deepEqual(offered, ['edit', 'glob', 'grep', 'interrupt_agent', 'job_kill', 'job_list', 'job_output', 'list_agents', 'present', 'pwsh', 'read', 'read_image', 'send_message', 'subagent', 'todo_write', 'web_fetch', 'working_directory', 'write'].sort());+ assert.deepEqual(offered, ['create_goal', 'edit', 'get_goal', 'glob', 'grep', 'interrupt_agent', 'job_kill', 'job_list', 'job_output', 'list_agents', 'present', 'pwsh', 'read', 'read_image', 'send_message', 'skill', 'subagent', 'subagent_fork', 'todo_write', 'update_goal', 'web_fetch', 'workflow', 'working_directory', 'write'].sort());assert.ok(!offered.some(n => n.startsWith('schedule_')) && !offered.includes('web_search') && !offered.includes('ask_user_question') && !offered.includes('exit_plan_mode'));});@@ -122,7 +122,8 @@ test('a tool from each family runs and shows a card the page can render', { skipassert.equal(last(await r.call('fam-j', 'job_list', {})).state, 'done');// plan / list familyassert.equal(last(await r.call('fam-t', 'todo_write', { todos: [{ content: 'check the build', status: 'pending' }] })).state, 'done');- // (the goal tools are not offered since the prompt trim: tests/functional-fixes.test.mjs pins that)+ const goal = last(await r.call('fam-goal', 'create_goal', { objective: 'finish the notes' }));+ assert.equal(goal.state, 'done'); assert.equal(goal.effect, 'Sets a goal to work towards.');// write family (Bypass: no card asks)const wrote = await r.call('fam-fs', 'write', { file_path: fwd(join(r.ws, 'new.txt')), content: 'made\n' });assert.equal(last(wrote).state, 'done'); assert.equal(readFileSync(join(r.ws, 'new.txt'), 'utf8').trim(), 'made');diff --git a/apps/host/tests/functional-fixes.test.mjs b/apps/host/tests/functional-fixes.test.mjsindex 5ea4e3e4c..da833f083 100644--- a/apps/host/tests/functional-fixes.test.mjs+++ b/apps/host/tests/functional-fixes.test.mjs@@ -115,8 +115,24 @@ test('items 3, 7, 10: what the agent sends the model is small, plain, and carrieconst req = worker.requests.find(r => r.toolNames.length);assert.ok(req, 'a request with tools');assert.equal(req.params.chat_template_kwargs.enable_thinking, false, 'Thinking Off reaches the model request');- for (const gone of ['workflow', 'create_goal', 'update_goal', 'get_goal', 'skill', 'subagent_fork']) assert.ok(!req.toolNames.includes(gone), `${gone} is not sent`);- for (const kept of ['pwsh', 'read', 'write', 'edit', 'glob', 'grep']) assert.ok(req.toolNames.includes(kept), `${kept} is still there`);- // 29,700 characters before the trim (about 7,500 tokens); the request now stays below 20,000 including the user's own message.- assert.ok(req.promptChars < 20_000, `first request is ${req.promptChars} characters`);+ for (const kept of ['pwsh', 'read', 'write', 'edit', 'glob', 'grep', 'workflow', 'create_goal', 'update_goal', 'get_goal', 'skill', 'subagent_fork']) assert.ok(req.toolNames.includes(kept), `${kept} is offered (owner decision: the goal, skill, workflow and fork tools stay)`);});++// The Reasoning menu in the agent: every level reaches the model server as chat_template_kwargs, and an unset menu is Medium (owner decision).+for (const [level, thinking, effort] of [['Off', 'Off', undefined], ['Low', 'Low', 'low'], ['Medium', 'Medium', 'medium'], ['High', 'High', 'high'], ['unset (Medium)', undefined, 'medium']]) {+ test(`agent Reasoning ${level}: the request carries chat_template_kwargs ${effort ? `enable_thinking true, reasoning_effort ${effort}` : 'enable_thinking false and no effort'}`, { skip }, async t => {+ const worker = await startScriptedWorker({});+ const dir = mkdtempSync(join(tmpdir(), 'strata-eff-'));+ const ws = join(dir, 'ws'); mkdirSync(ws, { recursive: true });+ const local = [{ id: 'i', baseUrl: worker.url, modelId: 'scripted-model', context: 65536 }];+ const bridge = createAgentBridge({ dataDir: dir, localInstances: () => local, connections: () => [], env: process.env, startTimeoutMs: 90_000 });+ t.after(async () => { await bridge.close(); await worker.close(); cleanup(dir); });+ worker.requests.length = 0;+ await bridge.runTurn({ chatId: `eff-${level}`, message: 'SCRIPT:echo hi', workspacePath: ws, mode: 'plan', ...(thinking ? { thinking } : {}), onFrame: () => {} });+ const req = worker.requests.find(r => r.toolNames.length);+ assert.ok(req, 'a request with tools');+ const kwargs = req.params.chat_template_kwargs;+ assert.equal(kwargs.enable_thinking, effort !== undefined);+ assert.equal(kwargs.reasoning_effort, effort);+ });+}diff --git a/apps/host/tests/tune-locales.test.mjs b/apps/host/tests/tune-locales.test.mjsindex a27bf2d14..ed52eccd4 100644--- a/apps/host/tests/tune-locales.test.mjs+++ b/apps/host/tests/tune-locales.test.mjs@@ -33,3 +33,13 @@ test('the Tune strings do not collide with the main catalog ids or texts, and trsetTranslationLanguage('en');assert.equal(tr('Tune this model'), 'Tune this model');});++test('the Tune dialog shows the answer-changing switch in plain words, off by default, in the simple dialog', async () => {+ const source = await readFile('src/components/NativeTune.tsx', 'utf8');+ const label = 'Allow settings that change answers very slightly (same quality)';+ assert.ok(Object.values(catalogs.en).includes(label), 'the label is in the catalogs');+ assert.ok(source.includes(`tr("${label}")`));+ assert.match(source, /\[allowSmall, setAllowSmall\] = useState\(false\)/);+ assert.match(source, /type="checkbox" checked=\{allowSmall\}/);+ assert.match(source, /allowSmallDifferences: allowSmall/);+});