refactor(agents): Add "max" to all codebase reasoning enums accordingly
This commit is contained in:
@@ -35,7 +35,7 @@ export const AgentOverrideConfigSchema = z.object({
|
|||||||
})
|
})
|
||||||
.optional(),
|
.optional(),
|
||||||
/** Reasoning effort level (OpenAI). Overrides category and default settings. */
|
/** Reasoning effort level (OpenAI). Overrides category and default settings. */
|
||||||
reasoningEffort: z.enum(["none", "minimal", "low", "medium", "high", "xhigh"]).optional(),
|
reasoningEffort: z.enum(["none", "minimal", "low", "medium", "high", "xhigh", "max"]).optional(),
|
||||||
/** Text verbosity level. */
|
/** Text verbosity level. */
|
||||||
textVerbosity: z.enum(["low", "medium", "high"]).optional(),
|
textVerbosity: z.enum(["low", "medium", "high"]).optional(),
|
||||||
/** Provider-specific options. Passed directly to OpenCode SDK. */
|
/** Provider-specific options. Passed directly to OpenCode SDK. */
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ export const CategoryConfigSchema = z.object({
|
|||||||
budgetTokens: z.number().optional(),
|
budgetTokens: z.number().optional(),
|
||||||
})
|
})
|
||||||
.optional(),
|
.optional(),
|
||||||
reasoningEffort: z.enum(["none", "minimal", "low", "medium", "high", "xhigh"]).optional(),
|
reasoningEffort: z.enum(["none", "minimal", "low", "medium", "high", "xhigh", "max"]).optional(),
|
||||||
textVerbosity: z.enum(["low", "medium", "high"]).optional(),
|
textVerbosity: z.enum(["low", "medium", "high"]).optional(),
|
||||||
tools: z.record(z.string(), z.boolean()).optional(),
|
tools: z.record(z.string(), z.boolean()).optional(),
|
||||||
prompt_append: z.string().optional(),
|
prompt_append: z.string().optional(),
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { z } from "zod"
|
|||||||
export const FallbackModelObjectSchema = z.object({
|
export const FallbackModelObjectSchema = z.object({
|
||||||
model: z.string(),
|
model: z.string(),
|
||||||
variant: z.string().optional(),
|
variant: z.string().optional(),
|
||||||
reasoningEffort: z.enum(["none", "minimal", "low", "medium", "high", "xhigh"]).optional(),
|
reasoningEffort: z.enum(["none", "minimal", "low", "medium", "high", "xhigh", "max"]).optional(),
|
||||||
temperature: z.number().min(0).max(2).optional(),
|
temperature: z.number().min(0).max(2).optional(),
|
||||||
top_p: z.number().min(0).max(1).optional(),
|
top_p: z.number().min(0).max(1).optional(),
|
||||||
maxTokens: z.number().optional(),
|
maxTokens: z.number().optional(),
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ export const HEURISTIC_MODEL_FAMILY_REGISTRY: ReadonlyArray<HeuristicModelFamily
|
|||||||
family: "gpt-5",
|
family: "gpt-5",
|
||||||
includes: ["gpt-5"],
|
includes: ["gpt-5"],
|
||||||
variants: ["low", "medium", "high", "xhigh"],
|
variants: ["low", "medium", "high", "xhigh"],
|
||||||
reasoningEfforts: ["none", "minimal", "low", "medium", "high", "xhigh"],
|
reasoningEfforts: ["none", "minimal", "low", "medium", "high", "xhigh", "max"],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
family: "gpt-legacy",
|
family: "gpt-legacy",
|
||||||
|
|||||||
@@ -32,10 +32,10 @@ export type ModelSettingsCompatibilityChange = {
|
|||||||
from: string
|
from: string
|
||||||
to?: string
|
to?: string
|
||||||
reason:
|
reason:
|
||||||
| "unsupported-by-model-family"
|
| "unsupported-by-model-family"
|
||||||
| "unknown-model-family"
|
| "unknown-model-family"
|
||||||
| "unsupported-by-model-metadata"
|
| "unsupported-by-model-metadata"
|
||||||
| "max-output-limit"
|
| "max-output-limit"
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ModelSettingsCompatibilityResult = {
|
export type ModelSettingsCompatibilityResult = {
|
||||||
@@ -49,7 +49,7 @@ export type ModelSettingsCompatibilityResult = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const VARIANT_LADDER = ["low", "medium", "high", "xhigh", "max"]
|
const VARIANT_LADDER = ["low", "medium", "high", "xhigh", "max"]
|
||||||
const REASONING_LADDER = ["none", "minimal", "low", "medium", "high", "xhigh"]
|
const REASONING_LADDER = ["none", "minimal", "low", "medium", "high", "xhigh", "max"]
|
||||||
|
|
||||||
function downgradeWithinLadder(value: string, allowed: string[], ladder: string[]): string | undefined {
|
function downgradeWithinLadder(value: string, allowed: string[], ladder: string[]): string | undefined {
|
||||||
const requestedIndex = ladder.indexOf(value)
|
const requestedIndex = ladder.indexOf(value)
|
||||||
|
|||||||
Reference in New Issue
Block a user