From b85c82103e374bc158664f84b660aa63175323d4 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Wed, 25 Mar 2026 10:29:14 -0700 Subject: [PATCH] fix: add keepAlive to YAML completion options schema (#11801) * fix: add keepAlive to YAML completion options schema The keepAlive property was present in the JSON config schema but missing from the YAML config schema, causing it to be silently stripped during zod validation when users configured it under defaultCompletionOptions. Closes #4671 * Document keepAlive option in YAML config reference --------- Co-authored-by: continue[bot] <230936708+continue[bot]@users.noreply.github.com> --- docs/reference.mdx | 1 + packages/config-yaml/src/schemas/models.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/reference.mdx b/docs/reference.mdx index fd6f4e4ec..30b4c0ca8 100644 --- a/docs/reference.mdx +++ b/docs/reference.mdx @@ -110,6 +110,7 @@ The `models` section defines the language models used in your configuration. Mod - `stop`: An array of stop tokens that will terminate the completion. - `reasoning`: Boolean to enable thinking/reasoning for Anthropic Claude 3.7+ and some Ollama models. - `reasoningBudgetTokens`: Budget tokens for thinking/reasoning in Anthropic Claude 3.7+ models. + - `keepAlive`: For Ollama, the number of seconds to keep the model loaded after the last request (default: `1800`). - `requestOptions`: HTTP request options specific to the model. diff --git a/packages/config-yaml/src/schemas/models.ts b/packages/config-yaml/src/schemas/models.ts index 89856e35c..8d3555829 100644 --- a/packages/config-yaml/src/schemas/models.ts +++ b/packages/config-yaml/src/schemas/models.ts @@ -59,6 +59,7 @@ export const completionOptionsSchema = z.object({ reasoningBudgetTokens: z.number().optional(), promptCaching: z.boolean().optional(), stream: z.boolean().optional(), + keepAlive: z.number().optional(), }); export type CompletionOptions = z.infer;