continue-custom/docs/customize/model-roles/edit.mdx
Dallin Romney ceb3bbbd9f
Remove Gemini 2.0 Flash from defaults and update Claude defaults to 4.6 (#11782)
chore: remove Gemini 2.0 Flash from defaults/UI/docs and update Claude defaults to 4.6

Gemini 2.0 Flash is no longer supported for new Gemini users. Remove it
from the add model form, onboarding defaults, config schema, docs, and
CometAPI supported models list. Replace with Gemini 2.5 Flash where
appropriate. Gemini 2.0 Flash remains in llm-info for existing users.

Update Claude model defaults to 4.6 series (Sonnet 4.6 and Opus 4.6) in
onboarding config, workspace block templates, and documentation examples.
2026-03-24 17:03:52 -07:00

65 lines
2 KiB
Text

---
title: Edit Role
description: Edit model role
keywords: [edit, editing, model, role]
sidebar_position: 3
---
import { ModelRecommendations } from '/snippets/ModelRecommendations.jsx'
It's often useful to select a different model to respond to Edit instructions than for Chat instructions, as Edits are often more code-specific and may require less conversational readability.
In Continue, you can add `edit` to a model's roles to specify that it can be used for Edit requests. If no edit models are specified, the selected `chat` model is used.
```yaml title="config.yaml"
name: My Config
version: 0.0.1
schema: v1
models:
- name: Claude Sonnet 4.6
provider: anthropic
model: claude-sonnet-4-6
apiKey: <YOUR_ANTHROPIC_API_KEY>
roles:
- edit
```
Explore edit models in [the hub](https://continue.dev/explore/models?roles=edit). Generally, our recommendations for Edit overlap with recommendations for Chat.
## Model Recommendations
<ModelRecommendations role="chat_edit" />
## Prompt templating
You can customize the prompt template used for editing code by setting the `promptTemplates.edit` property in your model configuration. Continue uses [Handlebars syntax](https://handlebarsjs.com/guide/) for templating.
Available variables for the edit template:
- `{{{userInput}}}` - The user's edit request/instruction
- `{{{language}}}` - The programming language of the code
- `{{{codeToEdit}}}` - The code that's being edited
- `{{{prefix}}}` - Content before the edit area
- `{{{suffix}}}` - Content after the edit area
- `{{{supportsCompletions}}}` - Whether the model supports completions API
- `{{{supportsPrefill}}}` - Whether the model supports prefill capability
Example:
```yaml
models:
- name: My Custom Edit Template
provider: openai
model: gpt-4o
promptTemplates:
edit: |
`Here is the code before editing:
\`\`\`{{{language}}}
{{{codeToEdit}}}
\`\`\`
Here is the edit requested:
"{{{userInput}}}"
Here is the code after editing:`
```