fix: centralize provider thinking profiles

This commit is contained in:
Peter Steinberger
2026-04-21 09:04:37 +01:00
parent 1cc2fc82ca
commit f1805ab54d
57 changed files with 718 additions and 572 deletions

View File

@@ -28,7 +28,17 @@ export type ThinkingCatalogEntry = {
reasoning?: boolean;
};
const BASE_THINKING_LEVELS: ThinkLevel[] = ["off", "minimal", "low", "medium", "high"];
export const BASE_THINKING_LEVELS: ThinkLevel[] = ["off", "minimal", "low", "medium", "high"];
export const THINKING_LEVEL_RANKS: Record<ThinkLevel, number> = {
off: 0,
minimal: 10,
low: 20,
medium: 30,
high: 40,
adaptive: 50,
xhigh: 60,
max: 70,
};
const NO_THINKING_LEVELS: ThinkLevel[] = [...BASE_THINKING_LEVELS];
export function isBinaryThinkingProvider(provider?: string | null): boolean {
@@ -102,10 +112,6 @@ export function formatXHighModelHint(): string {
return "provider models that advertise xhigh reasoning";
}
export function formatMaxModelHint(): string {
return "provider models that advertise max reasoning";
}
export function resolveThinkingDefaultForModel(params: {
provider: string;
model: string;