fix(tools): add max_tools config to cap registered tools for OpenAI compatibility (fixes #2848)

This commit is contained in:
MoerAI
2026-03-27 11:11:56 +09:00
parent 1c9f4148d0
commit 82d89fd5fc
2 changed files with 30 additions and 1 deletions
+2
View File
@@ -21,6 +21,8 @@ export const ExperimentalConfigSchema = z.object({
hashline_edit: z.boolean().optional(),
/** Append fallback model info to session title when a runtime fallback occurs (default: false) */
model_fallback_title: z.boolean().optional(),
/** Maximum number of tools to register. When set, lower-priority tools are excluded to stay within provider limits (e.g., OpenAI's 128-tool cap). Accounts for ~20 OpenCode built-in tools. */
max_tools: z.number().int().min(1).optional(),
})
export type ExperimentalConfig = z.infer<typeof ExperimentalConfigSchema>