Skip to content

Feat: support maxStopWords model config option in yaml #5675

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions core/config/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export function addModel(
model: model.model,
apiKey: model.apiKey,
apiBase: model.apiBase,
maxStopWords: model.maxStopWords,
defaultCompletionOptions: model.completionOptions,
};
if (model.systemMessage) {
Expand Down
1 change: 1 addition & 0 deletions core/control-plane/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const modelDescriptionSchema = z.object({
apiKey: z.string().optional(),
apiBase: z.string().optional(),
contextLength: z.number().optional(),
maxStopWords: z.number().optional(),
template: z
.enum([
"llama2",
Expand Down
1 change: 1 addition & 0 deletions docs/docs/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ chat, editing, and summarizing.
not currently used.
- `capabilities`: Array of strings denoting model capabilities, which will overwrite Continue's autodetection based on
provider and model. Supported capabilities include `tool_use` and `image_input`.
- `maxStopWords`: Maximum number of stop words allowed, to avoid API errors with extensive lists.
- `promptTemplates`: Can be used to override the default prompt templates for different model roles. Valid values are
`chat`, [`edit`](./customize/model-roles/edit.mdx#prompt-templating), [
`apply`](./customize/model-roles/apply.mdx#prompt-templating) and [
Expand Down
1 change: 1 addition & 0 deletions packages/config-yaml/src/schemas/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ const baseModelFields = {
model: z.string(),
apiKey: z.string().optional(),
apiBase: z.string().optional(),
maxStopWords: z.number().optional(),
roles: modelRolesSchema.array().optional(),
capabilities: modelCapabilitySchema.array().optional(),
defaultCompletionOptions: completionOptionsSchema.optional(),
Expand Down
Loading