Skip to content
Closed
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
31 changes: 22 additions & 9 deletions core/config/createNewAssistantFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,28 @@ models:
provider: openai
model: gpt-5
apiKey: YOUR_OPENAI_API_KEY_HERE
- uses: ollama/qwen2.5-coder-7b
- uses: anthropic/claude-4-sonnet
with:
ANTHROPIC_API_KEY: \${{ secrets.ANTHROPIC_API_KEY }}

# MCP Servers that Continue can access
# https://docs.continue.dev/customization/mcp-tools
mcpServers:
- uses: anthropic/memory-mcp
- name: qwen2.5-coder 7b
provider: ollama
model: qwen2.5-coder:7b
roles:
- apply
- autocomplete
- chat
- edit
- name: Claude 4 Sonnet
provider: anthropic
model: claude-sonnet-4-20250514
apiKey: \${{ secrets.ANTHROPIC_API_KEY }}
roles:
- chat
- edit
- apply
defaultCompletionOptions:
contextLength: 200000
maxTokens: 64000
capabilities:
- tool_use
- image_input
`;

export async function createNewAssistantFile(
Expand Down
128 changes: 91 additions & 37 deletions core/config/onboarding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,84 @@ export const LOCAL_ONBOARDING_CHAT_TITLE = "Llama 3.1 8B";
export const LOCAL_ONBOARDING_EMBEDDINGS_MODEL = "nomic-embed-text:latest";
export const LOCAL_ONBOARDING_EMBEDDINGS_TITLE = "Nomic Embed";

const ANTHROPIC_MODEL_CONFIG = {
slugs: ["anthropic/claude-sonnet-4-6", "anthropic/claude-opus-4-6"],
apiKeyInputName: "ANTHROPIC_API_KEY",
};
const OPENAI_MODEL_CONFIG = {
slugs: ["openai/gpt-4.1", "openai/o3", "openai/gpt-4.1-mini"],
apiKeyInputName: "OPENAI_API_KEY",
};
type OnboardingModel = NonNullable<ConfigYaml["models"]>[number];

// TODO: These need updating on the hub
const GEMINI_MODEL_CONFIG = {
slugs: ["google/gemini-3.1-pro-preview", "google/gemini-3-flash-preview"],
apiKeyInputName: "GEMINI_API_KEY",
};
// These model definitions are inlined copies of the corresponding Continue Hub
// blocks (e.g. anthropic/claude-sonnet-4-6) that onboarding previously resolved
// via `uses:` slugs. Since Hub/slug resolution has been removed, we reproduce
// the exact block contents here, with `apiKey` substituted for the block's
// `${{ inputs.*_API_KEY }}` placeholder. Keep these in sync with the Hub blocks.
const ANTHROPIC_ONBOARDING_MODELS = (apiKey: string): OnboardingModel[] => [
{
name: "Claude Sonnet 4.6",
provider: "anthropic",
model: "claude-sonnet-4-6",
apiKey,
roles: ["chat", "edit", "apply"],
defaultCompletionOptions: { contextLength: 200000, maxTokens: 64000 },
capabilities: ["tool_use", "image_input"],
},
{
name: "Claude Opus 4.6",
provider: "anthropic",
model: "claude-opus-4-6",
apiKey,
roles: ["chat", "edit", "apply"],
defaultCompletionOptions: { contextLength: 200000, maxTokens: 64000 },
capabilities: ["tool_use", "image_input"],
},
];

const OPENAI_ONBOARDING_MODELS = (apiKey: string): OnboardingModel[] => [
{
name: "OpenAI GPT-4.1",
provider: "openai",
model: "gpt-4.1-2025-04-14",
apiKey,
roles: ["chat", "edit", "apply"],
defaultCompletionOptions: { contextLength: 1047576, maxTokens: 32768 },
useLegacyCompletionsEndpoint: false,
},
{
name: "o3",
provider: "openai",
model: "o3",
apiKey,
roles: ["chat"],
defaultCompletionOptions: { contextLength: 200000, maxTokens: 100000 },
capabilities: ["image_input"],
},
{
name: "OpenAI GPT-4.1 mini",
provider: "openai",
model: "gpt-4.1-mini-2025-04-14",
apiKey,
roles: ["chat", "edit", "apply"],
defaultCompletionOptions: { contextLength: 1047576, maxTokens: 32768 },
useLegacyCompletionsEndpoint: false,
},
];

const GEMINI_ONBOARDING_MODELS = (apiKey: string): OnboardingModel[] => [
{
name: "Gemini 3 Pro Preview",
provider: "gemini",
model: "gemini-3-pro-preview",
apiKey,
roles: ["chat", "edit", "apply"],
defaultCompletionOptions: { contextLength: 1048576, maxTokens: 65536 },
capabilities: ["tool_use", "image_input"],
},
{
name: "Gemini 3 Flash Preview",
provider: "gemini",
model: "gemini-3-flash-preview",
apiKey,
roles: ["chat", "edit", "apply"],
defaultCompletionOptions: { contextLength: 1048576, maxTokens: 65536 },
capabilities: ["tool_use", "image_input"],
},
];

/**
* We set the "best" chat + autocopmlete models by default
Expand Down Expand Up @@ -70,47 +134,37 @@ export function setupProviderConfig(
provider: string,
apiKey: string,
): ConfigYaml {
let newModels;
let newModels: OnboardingModel[];

switch (provider) {
case "openai":
newModels = OPENAI_MODEL_CONFIG.slugs.map((slug) => ({
uses: slug,
with: {
[OPENAI_MODEL_CONFIG.apiKeyInputName]: apiKey,
},
}));
newModels = OPENAI_ONBOARDING_MODELS(apiKey);
break;
case "anthropic":
newModels = ANTHROPIC_MODEL_CONFIG.slugs.map((slug) => ({
uses: slug,
with: {
[ANTHROPIC_MODEL_CONFIG.apiKeyInputName]: apiKey,
},
}));
newModels = ANTHROPIC_ONBOARDING_MODELS(apiKey);
break;
case "gemini":
newModels = GEMINI_MODEL_CONFIG.slugs.map((slug) => ({
uses: slug,
with: {
[GEMINI_MODEL_CONFIG.apiKeyInputName]: apiKey,
},
}));
newModels = GEMINI_ONBOARDING_MODELS(apiKey);
break;
default:
throw new Error(`Unknown provider: ${provider}`);
}

const existingModels = config.models ?? [];

// Update API key on existing models; add new entries for any missing slugs
const isSameModel = (m: OnboardingModel, n: OnboardingModel) =>
"provider" in m &&
"provider" in n &&
m.provider === n.provider &&
m.model === n.model;

// Update API key on existing models; add new entries for any missing models
const updatedModels = existingModels.map((m) => {
if (!("uses" in m)) return m;
const match = newModels.find((n) => n.uses === m.uses);
return match ? { ...m, with: { ...m.with, ...match.with } } : m;
const match = newModels.find((n) => isSameModel(m, n));
return match ? { ...m, apiKey } : m;
});
const modelsToAdd = newModels.filter(
(n) => !existingModels.some((m) => "uses" in m && m.uses === n.uses),
(n) => !existingModels.some((m) => isSameModel(m, n)),
);

return { ...config, models: [...updatedModels, ...modelsToAdd] };
Expand Down
1 change: 0 additions & 1 deletion core/protocol/ideWebview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,5 @@ export type ToWebviewFromIdeProtocol = ToWebviewFromIdeOrCoreProtocol & {
updateApplyState: [ApplyState, void];
exitEditMode: [undefined, void];
focusEdit: [undefined, void];
generateRule: [undefined, void];
addToChat: [AddToChatPayload, void];
};
11 changes: 1 addition & 10 deletions extensions/vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "continue",
"icon": "media/icon.png",
"author": "Continue Dev, Inc",
"version": "1.3.39",
"version": "1.3.40",
"repository": {
"type": "git",
"url": "https://github.com/continuedev/continue"
Expand Down Expand Up @@ -370,12 +370,6 @@
"category": "Continue",
"title": "Continue: Reject Jump Suggestion"
},
{
"command": "continue.generateRule",
"category": "Continue",
"title": "Generate Rule",
"group": "Continue"
},
{
"command": "continue.openInNewWindow",
"category": "Continue",
Expand Down Expand Up @@ -524,9 +518,6 @@
{
"command": "continue.enterEnterpriseLicenseKey"
},
{
"command": "continue.generateRule"
},
{
"command": "continue.openInNewWindow"
}
Expand Down
4 changes: 0 additions & 4 deletions extensions/vscode/src/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -323,10 +323,6 @@ const getCommandsMap: (
editDecorationManager.clear();
void sidebar.webviewProtocol?.request("exitEditMode", undefined);
},
"continue.generateRule": async () => {
focusGUI();
void sidebar.webviewProtocol?.request("generateRule", undefined);
},
"continue.writeCommentsForCode": async () => {
streamInlineEdit(
"comment",
Expand Down
Loading
Loading