Elffuss BraidHub

kikocis/continue public

Merge pull request #5675 from t-kulmburg/yaml-maxStopWords

Feat: support maxStopWords model config option in yaml
Changeset158decf78aeeb9c7c5865fe109296d1aaac90408bdd0f7773ba75c8f3366a17d
AuthorNate Sesti <33237525+sestinj@users.noreply.github.com> · 2025-05-25 16:11 -07:00
CommitterGitHub <noreply@github.com> · 2025-05-25 16:11 -07:00
Parents10821691db22, d70c08f216d0

Browse the files at this changeset

4 files changed

modified core/config/util.ts +1 −0
@@ -77,6 +77,7 @@
7777 model: model.model,
7878 apiKey: model.apiKey,
7979 apiBase: model.apiBase,
80+ maxStopWords: model.maxStopWords,
8081 defaultCompletionOptions: model.completionOptions,
8182 };
8283 if (model.systemMessage) {
modified core/control-plane/schema.ts +1 −0
@@ -26,6 +26,7 @@
2626 apiKey: z.string().optional(),
2727 apiBase: z.string().optional(),
2828 contextLength: z.number().optional(),
29+ maxStopWords: z.number().optional(),
2930 template: z
3031 .enum([
3132 "llama2",
modified docs/docs/reference.md +1 −0
@@ -188,6 +188,7 @@
188188 not currently used.
189189 - `capabilities`: Array of strings denoting model capabilities, which will overwrite Continue's autodetection based on
190190 provider and model. Supported capabilities include `tool_use` and `image_input`.
191+- `maxStopWords`: Maximum number of stop words allowed, to avoid API errors with extensive lists.
191192 - `promptTemplates`: Can be used to override the default prompt templates for different model roles. Valid values are
192193 `chat`, [`edit`](./customize/model-roles/edit.mdx#prompt-templating), [
193194 `apply`](./customize/model-roles/apply.mdx#prompt-templating) and [
modified packages/config-yaml/src/schemas/models.ts +1 −0
@@ -117,6 +117,7 @@
117117 model: z.string(),
118118 apiKey: z.string().optional(),
119119 apiBase: z.string().optional(),
120+ maxStopWords: z.number().optional(),
120121 roles: modelRolesSchema.array().optional(),
121122 capabilities: modelCapabilitySchema.array().optional(),
122123 defaultCompletionOptions: completionOptionsSchema.optional(),