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.
This commit is contained in:
can1357
2026-03-06 12:32:37 +01:00
parent b696842570
commit 8e3e0ebf9e
85 changed files with 8303 additions and 1863 deletions
@@ -3,6 +3,7 @@
*
* Shows how to select a specific model and thinking level.
*/
import { ThinkingLevel } from "@oh-my-pi/pi-agent-core";
import { getModel } from "@oh-my-pi/pi-ai";
import { createAgentSession, discoverAuthStorage, discoverModels } from "@oh-my-pi/pi-coding-agent";
@@ -32,7 +33,7 @@ console.log(
if (available.length > 0) {
const { session } = await createAgentSession({
model: available[0],
thinkingLevel: "medium", // off, low, medium, high
thinkingLevel: ThinkingLevel.Medium, // off, low, medium, high
authStorage,
modelRegistry,
});