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>
This commit is contained in:
Dallin Romney 2026-03-25 10:29:14 -07:00 • committed by GitHub
parent 653c6b9e5b
commit b85c82103e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 0 deletions

View file

@ -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.

View file

@ -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<typeof completionOptionsSchema>;