Skip to content

feat: add configurable adaptive thinking support (off by default)#45

Open
siripr4 wants to merge 2 commits intomainfrom
enable-adaptive-thinking
Open

feat: add configurable adaptive thinking support (off by default)#45
siripr4 wants to merge 2 commits intomainfrom
enable-adaptive-thinking

Conversation

@siripr4
Copy link
Contributor

@siripr4 siripr4 commented Mar 18, 2026

  • The config plumbs through AskForgeClient → Session → processStream → pi-ai stream().
  • The eval runner accepts a --thinking flag for A/B comparison runs.

Implements #38

- The config plumbs through AskForgeClient → Session → processStream → pi-ai stream().
- The eval runner accepts a --thinking flag for A/B comparison runs.
@siripr4 siripr4 self-assigned this Mar 18, 2026
Comment on lines +12 to +25
export type ThinkingMode = "off" | "adaptive";

/**
* Configuration for Claude's adaptive/extended thinking.
* Default: thinking is off. Enable via `mode: "adaptive"` for eval-gated rollout.
*/
export interface ThinkingConfig {
/** Thinking mode: "off" (default) or "adaptive" */
mode: ThinkingMode;
/** Effort level for adaptive thinking (Anthropic Opus 4.6+ only). Default: "high" */
effort?: "low" | "medium" | "high" | "max";
/** Explicit token budget for extended thinking (older Anthropic models). Ignored for adaptive. */
budgetTokens?: number;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some thoughts:

  • I feel like the thinking mode could just be on/off with effort being low/medium/high/max/adaptive.
  • Do you know how this setting would work with another model, say ChatGPT or Gemini. Does pi-ai provide a thinking config that we can re-use?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants