Harness spec 3.2.0 in the CLI: effort levels, reasoning round-trip, no absolute paths
ci / check (push) Canceled after 0s
ci / check (push) Canceled after 0s
Levels (models/schema.json levels): provider/effort.ts levelsOf/levelFields/ readLevel — `off` only with thinking_switch and sends enable_thinking false and no effort, `default` for a model that takes no efforts and sends nothing, a level not offered is read as the start level. The engine's effort is a level; /effort shows nothing for one level, a Thinking switch for [off, X], a list otherwise; the status bar follows. /v1/models' thinking_switch, efforts [] and capacity.parallel are read (lembas/webui.ts); session/capacity.ts counts parallel slots. Reasoning (context.md §8): an assistant message of the current turn carries reasoning_content (provider/common.ts turnReasoning, openai-chat.ts); step-boundary deliveries, nudges and the wrap-up are marked turn: false and do not start a turn. Paths (context.md §11): the <env> block names the project and, started below the root, that directory relative to it (assemble.ts envLines); instruction files and @ attachments are named from the root or as ~/…; file tools and bash resolve relative paths against the project root. The team rules (team/team.ts) and conformance runners for levels, reasoning, paths and team; the team runtime follows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
36 files changed
+1168
-153
No files matched your search
+5
-2
@@ -18,7 +18,7 @@ import { mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs"
|
||||
import { join } from "node:path"
|
||||
import { parse } from "yaml"
|
||||
import { connectionFiles, isLocal, paths } from "../config/paths.ts"
|
||||
import type { Connection, ModelSpec, WebuiConnection } from "../config/schema.ts"
|
||||
import { EFFORTS, type Connection, type ModelSpec, type WebuiConnection } from "../config/schema.ts"
|
||||
import { substituteDeep } from "../config/substitute.ts"
|
||||
import { instanceInfo, LembasError, models as listModels, normalise, personalization, type InstanceInfo, type Personalization, type ServedModel, type Tls } from "./client.ts"
|
||||
|
||||
@@ -94,12 +94,15 @@ export function specFor(m: ServedModel, connection: string): ModelSpec {
|
||||
if (m.max_output) out.max_output = m.max_output
|
||||
if (typeof m.temperature === "number" && m.temperature >= 0 && m.temperature <= 2) out.temperature = m.temperature
|
||||
if (typeof m.top_p === "number" && m.top_p >= 0 && m.top_p <= 1) out.top_p = m.top_p
|
||||
if (m.efforts?.length) out.efforts = m.efforts
|
||||
// [] is said: the model takes no efforts (its one level is `default`), unlike an absent list.
|
||||
if (Array.isArray(m.efforts)) out.efforts = m.efforts.filter((e) => (EFFORTS as readonly string[]).includes(e))
|
||||
if (m.effort) out.effort = m.effort
|
||||
if (m.thinking_switch === true) out.thinking_switch = true
|
||||
if (m.vision !== undefined) out.vision = m.vision
|
||||
if (m.tools !== undefined) out.tools = m.tools
|
||||
if (m.notes) out.notes = m.notes.slice(0, 300)
|
||||
if (m.capacity?.single_session) out.single_session = true
|
||||
if (Number.isInteger(m.capacity?.parallel) && m.capacity!.parallel! >= 1) out.parallel = m.capacity!.parallel
|
||||
if (m.capacity?.group) out.group = `${connection}:${m.capacity.group}`
|
||||
return out as ModelSpec
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user