Files
oh-my-pi/packages/agent/src/thinking.ts
T
can1357 8e3e0ebf9e feat: introduced Effort enum and ThinkingConfig for model-aware reasoning
- Introduced Effort enum and ThinkingConfig metadata for per-model reasoning capabilities with min/max effort levels.
- Migrated thinking level API from string-based ThinkingLevel to structured Effort enum across agent and AI packages.
- Added model-thinking module with effort mapping, policy application, and semantic versioning utilities for provider-specific thinking modes.
- Removed supportsXhigh() function and replaced effort clamping with model-aware validation using ThinkingConfig metadata.
- Expanded models.json with thinking configuration objects for 50+ models including Claude, Gemini, and OpenAI variants.
- Added Python analysis scripts for edit tool usage patterns and tool invocation stream processing.
2026-03-06 12:35:01 +01:00

20 lines
507 B
TypeScript

import { Effort } from "@oh-my-pi/pi-ai";
/**
* Agent-local thinking selector.
*
* `off` disables reasoning, while `inherit` defers to a higher-level selector.
*/
export const ThinkingLevel = {
Inherit: "inherit",
Off: "off",
Minimal: Effort.Minimal,
Low: Effort.Low,
Medium: Effort.Medium,
High: Effort.High,
XHigh: Effort.XHigh,
} as const;
export type ThinkingLevel = (typeof ThinkingLevel)[keyof typeof ThinkingLevel];
export type ResolvedThinkingLevel = Exclude<ThinkingLevel, "inherit">;