Open-source, local-first AI agent team for your desktop: multi-agent group chats, computer use, browser, MCP, routines and approvals. macOS, Windows, Linux + Android. Built on pi.
TypeScript agentai-agentai-agentsai-assistantandroidautomationchatgptcoding-agentcomputer-usedesktop-appelectronllmlocal-firstmcpmulti-agentollamaopenaiprivacyself-hostedtypescript
import { type Bot, type ModelInfo, resolveThinkingLevel } from "@pibot/protocol";
/** A default model chooses the provider, while an explicit role chooses the thinking budget. */
export function roleThinking(requested: Bot["thinkingLevel"] | undefined, model: ModelInfo | null) {
return model ? resolveThinkingLevel(model, requested) : ("off" as const);
}