@@ -1,6 +1,6 @@
|
||||
import { join } from "node:path";
|
||||
import { Agent, type AgentMessage, type ThinkingLevel } from "@mariozechner/pi-agent-core";
|
||||
import { type Message, type Model, streamSimple } from "@mariozechner/pi-ai";
|
||||
import { clampThinkingLevel, type Message, type Model, streamSimple } from "@mariozechner/pi-ai";
|
||||
import { getAgentDir } from "../config.js";
|
||||
import { AgentSession } from "./agent-session.js";
|
||||
import { formatNoModelsAvailableMessage } from "./auth-guidance.js";
|
||||
@@ -262,8 +262,10 @@ export async function createAgentSession(options: CreateAgentSessionOptions = {}
|
||||
}
|
||||
|
||||
// Clamp to model capabilities
|
||||
if (!model || !model.reasoning) {
|
||||
if (!model) {
|
||||
thinkingLevel = "off";
|
||||
} else {
|
||||
thinkingLevel = clampThinkingLevel(model, thinkingLevel) as ThinkingLevel;
|
||||
}
|
||||
|
||||
const defaultActiveToolNames: ToolName[] = ["read", "bash", "edit", "write"];
|
||||
|
||||
Reference in New Issue
Block a user