Elffuss BraidHub

kikocis/continue public

Feat: allow maxStopWords model config option in yaml
Changesetb96e75bd23b88a627275d2e664d080c11a5e8d45f6cdd9361b7ce62a473cd5b0
AuthorTobias Kulmburg <t.kulmburg@netconomy.net> · 2025-05-14 22:13 +02:00
CommitterTobias Kulmburg <t.kulmburg@netconomy.net> · 2025-05-14 22:13 +02:00
Parentscfbd8cf979f7

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 +2 −1
@@ -107,7 +107,7 @@
107107 const promptTemplatesSchema = z.object({
108108 apply: z.string().optional(),
109109 chat: templateSchema.optional(),
110- edit: z.string().optional(),
110+ edit: z.string().optional(),
111111 autocomplete: z.string().optional(),
112112 });
113113 export type PromptTemplates = z.infer<typeof promptTemplatesSchema>;
@@ -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(),