8e3e0ebf9e
- 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.
20 lines
507 B
TypeScript
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">;
|