- Registry-based model family detection (provider-agnostic) - Variant and reasoningEffort ladder downgrade logic - Three-tier resolution: metadata override → family heuristic → unknown drop - Comprehensive test suite covering all model families
46 lines
1.7 KiB
TypeScript
46 lines
1.7 KiB
TypeScript
import { z } from "zod"
|
|
import { FallbackModelsSchema } from "./fallback-models"
|
|
|
|
export const CategoryConfigSchema = z.object({
|
|
/** Human-readable description of the category's purpose. Shown in task prompt. */
|
|
description: z.string().optional(),
|
|
model: z.string().optional(),
|
|
fallback_models: FallbackModelsSchema.optional(),
|
|
variant: z.string().optional(),
|
|
temperature: z.number().min(0).max(2).optional(),
|
|
top_p: z.number().min(0).max(1).optional(),
|
|
maxTokens: z.number().optional(),
|
|
thinking: z
|
|
.object({
|
|
type: z.enum(["enabled", "disabled"]),
|
|
budgetTokens: z.number().optional(),
|
|
})
|
|
.optional(),
|
|
reasoningEffort: z.enum(["none", "minimal", "low", "medium", "high", "xhigh"]).optional(),
|
|
textVerbosity: z.enum(["low", "medium", "high"]).optional(),
|
|
tools: z.record(z.string(), z.boolean()).optional(),
|
|
prompt_append: z.string().optional(),
|
|
max_prompt_tokens: z.number().int().positive().optional(),
|
|
/** Mark agent as unstable - forces background mode for monitoring. Auto-enabled for gemini/minimax models. */
|
|
is_unstable_agent: z.boolean().optional(),
|
|
/** Disable this category. Disabled categories are excluded from task delegation. */
|
|
disable: z.boolean().optional(),
|
|
})
|
|
|
|
export const BuiltinCategoryNameSchema = z.enum([
|
|
"visual-engineering",
|
|
"ultrabrain",
|
|
"deep",
|
|
"artistry",
|
|
"quick",
|
|
"unspecified-low",
|
|
"unspecified-high",
|
|
"writing",
|
|
])
|
|
|
|
export const CategoriesConfigSchema = z.record(z.string(), CategoryConfigSchema)
|
|
|
|
export type CategoryConfig = z.infer<typeof CategoryConfigSchema>
|
|
export type CategoriesConfig = z.infer<typeof CategoriesConfigSchema>
|
|
export type BuiltinCategoryName = z.infer<typeof BuiltinCategoryNameSchema>
|