feat(ai): add max thinking level

This commit is contained in:
Mario Zechner
2026-07-09 22:30:53 +02:00
parent 8973ae28ab
commit fbdd46389c
61 changed files with 441 additions and 168 deletions
@@ -19,7 +19,7 @@ import {
import { getModel } from "../src/compat.ts";
import type { AssistantMessage, Context, Message, Model, Tool, ToolResultMessage, Transport } from "../src/types.ts";
type ThinkingLevel = "minimal" | "low" | "medium" | "high" | "xhigh";
type ThinkingLevel = "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
interface Args {
turns: number;
@@ -58,7 +58,14 @@ function parseArgs(argv: string[]): Args {
break;
case "--reasoning": {
const value = required(argv[++i], arg);
if (value !== "minimal" && value !== "low" && value !== "medium" && value !== "high" && value !== "xhigh") {
if (
value !== "minimal" &&
value !== "low" &&
value !== "medium" &&
value !== "high" &&
value !== "xhigh" &&
value !== "max"
) {
throw new Error(`Invalid --reasoning: ${value}`);
}
reasoning = value;
@@ -90,7 +97,7 @@ function printHelp(): void {
Options:
--turns <n> Number of user turns. Default: ${DEFAULT_TURNS}
--transport <mode> sse | websocket | websocket-cached | auto. Default: websocket-cached
--reasoning <level> minimal | low | medium | high | xhigh. Default: low
--reasoning <level> minimal | low | medium | high | xhigh | max. Default: low
--max-tokens <n> Max output tokens per model request. Default: ${DEFAULT_MAX_TOKENS}
--session-id <id> Session id for websocket/cache state
`);