Elffuss BraidHub

kikocis/continue public

Merge branch 'main' of github.com:continuedev/continue into jacob/feature/static
Changesetce6eaa070345d815f495a7f60abdd000057253687b802c50a345c8ffa86463d9
AuthorJacob Kim <jacob@continue.dev> · 2025-07-09 21:08 -07:00
CommitterJacob Kim <jacob@continue.dev> · 2025-07-09 21:08 -07:00
Parentsfd118b890200, 9f111bb59263

Browse the files at this changeset

295 files changed

added .continue/rules/dev-data-guide.md +200 −0
@@ -0,0 +1,200 @@
1+---
2+alwaysApply: false
3+---
4+
5+# Continue Development Data (Dev Data) Guide
6+
7+## Overview
8+
9+Development data (dev data) captures detailed information about how developers interact with LLM-aided development tools. Unlike basic telemetry, dev data includes lots of details into the complete software development workflow, including code context, user interactions, and development patterns.
10+
11+## Core Architecture
12+
13+### Primary Implementation Files
14+
15+- **`/core/data/log.ts`**: Main `DataLogger` class - singleton for event logging and remote transmission
16+- **`/packages/config-yaml/src/schemas/data/`**: Schema definitions for all event types
17+
18+### Storage Locations
19+
20+- **Default storage**: `~/.continue/dev_data/`
21+- **Event files**: `~/.continue/dev_data/{version}/{eventName}.jsonl`
22+
23+## Event Types and Schemas
24+
25+### Core Event Types
26+
27+1. **`tokensGenerated`**: LLM token usage tracking
28+2. **`autocomplete`**: Code completion interactions
29+3. **`chatInteraction`**: Chat-based development assistance
30+4. **`editInteraction`**: Code editing sessions
31+5. **`editOutcome`**: Results of edit operations
32+6. **`nextEditOutcome`**: Next Edit feature outcomes
33+7. **`chatFeedback`**: User feedback on AI responses
34+8. **`toolUsage`**: Tool interaction statistics
35+9. **`quickEdit`**: Quick edit functionality usage
36+
37+### Schema Versioning
38+
39+- **Version 0.1.0**: Initial schema implementation
40+- **Version 0.2.0**: Current schema with expanded fields and metadata
41+- **Schema files**: Located in `/packages/config-yaml/src/schemas/data/`
42+
43+### Base Schema Structure
44+
45+All events inherit from a base schema (`/packages/config-yaml/src/schemas/data/base.ts`):
46+
47+```typescript
48+{
49+ eventName: string,
50+ schema: string,
51+ timestamp: string,
52+ userId: string,
53+ userAgent: string,
54+ selectedProfileId: string
55+}
56+```
57+
58+## Key Integration Points
59+
60+### Autocomplete System
61+
62+- **File**: `/core/autocomplete/util/AutocompleteLoggingService.ts`
63+- **Purpose**: Tracks code completion acceptance/rejection, timing, and cache hits
64+- **Integration**: Called from autocomplete engine when completions are shown/accepted
65+
66+### Chat Interface
67+
68+- **Integration**: Chat interactions logged through `DataLogger.logDevData()`
69+- **Data**: Includes prompts, responses, context, and user feedback
70+- **Privacy**: Can be configured to exclude code content
71+
72+### Edit Features
73+
74+- **Files**: `/extensions/vscode/src/extension/EditOutcomeTracker.ts`, `/core/nextEdit/NextEditLoggingService.ts`
75+- **Purpose**: Track edit suggestions, acceptance rates, and outcomes
76+- **Integration**: Embedded in edit workflow to capture user decisions
77+
78+### LLM Token Tracking
79+
80+- **File**: `/core/llm/index.ts`
81+- **Purpose**: Track token usage across all LLM providers
82+- **Storage**: SQLite database for efficient querying and reporting
83+
84+## Configuration and Customization
85+
86+### Configuration Structure
87+
88+Dev data is configured through `data` blocks in your Continue config:
89+
90+```yaml
91+data:
92+ - name: "Local Development Data"
93+ destination: "file:///Users/developer/.continue/dev_data"
94+ schema: "0.2.0"
95+ level: "all"
96+ events: ["autocomplete", "chatInteraction", "editOutcome"]
97+
98+ - name: "Team Analytics"
99+ destination: "https://analytics.yourcompany.com/api/events"
100+ schema: "0.2.0"
101+ level: "noCode"
102+ apiKey: "your-api-key-here"
103+ events: ["tokensGenerated", "toolUsage"]
104+```
105+
106+### Configuration Options
107+
108+- **`destination`**: Where to send data (`file://` for local, `http://`/`https://` for remote)
109+- **`schema`**: Schema version to use (`"0.1.0"` or `"0.2.0"`)
110+- **`level`**: Data detail level (`"all"` includes code, `"noCode"` excludes code content)
111+- **`events`**: Array of event types to collect
112+- **`apiKey`**: Authentication for remote endpoints
113+
114+### Privacy Controls
115+
116+- **`"all"` level**: Includes code content (prefixes, suffixes, completions)
117+- **`"noCode"` level**: Excludes code content, only metadata and metrics
118+- **Local-first**: Data is always stored locally, remote transmission is optional
119+
120+## Making Changes to Dev Data
121+
122+### Adding New Event Types
123+
124+1. **Create schema**: Add new event schema in `/packages/config-yaml/src/schemas/data/`
125+2. **Update index**: Add to schema aggregator in `/packages/config-yaml/src/schemas/data/index.ts`
126+3. **Implement logging**: Add logging calls in relevant service files
127+4. **Update version**: Consider schema version bump if breaking changes
128+
129+### Modifying Existing Events
130+
131+1. **Schema changes**: Update schema files in `/packages/config-yaml/src/schemas/data/`
132+2. **Backward compatibility**: Ensure changes don't break existing data consumers
133+3. **Version management**: Increment schema version for breaking changes
134+4. **Test thoroughly**: Validate schema changes with existing data
135+
136+### Adding New Logging Points
137+
138+1. **Import DataLogger**: `import { DataLogger } from "core/data/log"`
139+2. **Log events**: Call `DataLogger.getInstance().logDevData(eventName, data)`
140+3. **Follow patterns**: Use existing logging services as examples
141+4. **Validate data**: Ensure logged data matches schema requirements
142+
143+### Debugging Dev Data Issues
144+
145+1. **Check local storage**: Verify files are being created in `~/.continue/dev_data/`
146+2. **Validate schemas**: Ensure event data matches expected schema format
147+3. **Review configuration**: Check `data` blocks in Continue config
148+4. **Test endpoints**: Verify remote endpoints are reachable and accepting data
149+
150+## Best Practices
151+
152+### When Adding New Events
153+
154+- Follow existing naming conventions for event types
155+- Include sufficient context for analysis without oversharing sensitive data
156+- Consider privacy implications and respect user configuration levels
157+- Add appropriate error handling and logging
158+
159+### When Modifying Schemas
160+
161+- Maintain backward compatibility when possible
162+- Document schema changes thoroughly
163+- Consider impact on existing data consumers
164+- Test with real development data
165+
166+### When Integrating Logging
167+
168+- Use the singleton pattern: `DataLogger.getInstance()`
169+- Log events at appropriate points in user workflow
170+- Respect user privacy settings and configuration
171+- Handle errors gracefully without disrupting user experience
172+
173+## Common Patterns
174+
175+### Service-Based Logging
176+
177+Most dev data logging follows a service pattern:
178+
179+```typescript
180+export class FeatureLoggingService {
181+ private dataLogger = DataLogger.getInstance();
182+
183+ logFeatureUsage(data: FeatureUsageData) {
184+ this.dataLogger.logDevData("featureUsage", data);
185+ }
186+}
187+```
188+
189+### Event-Driven Logging
190+
191+Events are typically logged at key interaction points:
192+
193+```typescript
194+// When user accepts autocomplete
195+onAutocompleteAccepted(completion: CompletionData) {
196+ AutocompleteLoggingService.getInstance().logAutocompleteAccepted(completion);
197+}
198+```
199+
200+This guide provides the foundation for understanding and working with Continue's dev data system. Always prioritize user privacy and follow established patterns when making changes.
added .github/workflows/compliance.yaml +197 −0
@@ -0,0 +1,197 @@
1+name: PR Compliance Checks
2+
3+on:
4+ pull_request:
5+ types: [opened, synchronize, reopened, ready_for_review]
6+ branches: [main]
7+ workflow_dispatch:
8+
9+concurrency:
10+ group: ${{ github.workflow }}-${{ github.ref }}
11+ cancel-in-progress: true
12+
13+jobs:
14+ conventional-commits:
15+ name: Validate Conventional Commits (Warning Only)
16+ runs-on: ubuntu-latest
17+ if: ${{ !github.event.pull_request.draft }}
18+ continue-on-error: true
19+ permissions:
20+ pull-requests: write
21+ issues: write
22+ contents: read
23+ steps:
24+ - name: Checkout code
25+ uses: actions/checkout@v4
26+ with:
27+ fetch-depth: 0
28+
29+ - name: Validate conventional commits
30+ id: commitlint
31+ uses: wagoid/commitlint-github-action@v6
32+ with:
33+ configFile: .commitlintrc.warning.json
34+ continue-on-error: true
35+
36+ - name: Add commit message guidance comment
37+ if: steps.commitlint.outcome == 'failure'
38+ uses: actions/github-script@v7
39+ with:
40+ script: |
41+ const { data: comments } = await github.rest.issues.listComments({
42+ owner: context.repo.owner,
43+ repo: context.repo.repo,
44+ issue_number: context.issue.number,
45+ });
46+
47+ const botComment = comments.find(comment =>
48+ comment.user.type === 'Bot' &&
49+ comment.body.includes('Conventional Commit Format')
50+ );
51+
52+ if (!botComment) {
53+ await github.rest.issues.createComment({
54+ owner: context.repo.owner,
55+ repo: context.repo.repo,
56+ issue_number: context.issue.number,
57+ body: [
58+ "## ⚠️ Conventional Commit Format",
59+ "",
60+ "Your commit messages don't follow the conventional commit format, but **this won't block your PR from being merged**. We recommend downloading [this extension](https://marketplace.visualstudio.com/items?itemName=vivaxy.vscode-conventional-commits) if you are using VS Code.",
61+ "",
62+ "### Expected Format:",
63+ "```",
64+ "<type>[optional scope]: <description>",
65+ "",
66+ "[optional body]",
67+ "",
68+ "[optional footer(s)]",
69+ "```",
70+ "",
71+ "### Examples:",
72+ "- `feat: add changelog generation support`",
73+ "- `fix: resolve login redirect issue`",
74+ "- `docs: update README with new instructions`",
75+ "- `chore: update dependencies`",
76+ "",
77+ "### Valid Types:",
78+ "`feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `build`, `ci`, `chore`, `revert`",
79+ "",
80+ "This helps with:",
81+ "- 📝 Automatic changelog generation",
82+ "- 🚀 Automated semantic versioning",
83+ "- 📊 Better project history tracking",
84+ "",
85+ "*This is a non-blocking warning - your PR can still be merged without fixing this.*"
86+ ].join('\n')
87+ });
88+ }
89+
90+ security-audit:
91+ name: Security Audit
92+ runs-on: ubuntu-latest
93+ if: ${{ !github.event.pull_request.draft }}
94+ permissions:
95+ security-events: write
96+ contents: read
97+ steps:
98+ - name: Checkout code
99+ uses: actions/checkout@v4
100+
101+ - name: Setup Node.js
102+ uses: actions/setup-node@v4
103+ with:
104+ node-version-file: ".nvmrc"
105+ cache: "npm"
106+
107+ - name: Install dependencies
108+ run: npm ci
109+
110+ - name: Fix vulnerabilities
111+ run: npm audit fix
112+
113+ - name: Run npm audit
114+ run: npm audit --audit-level=moderate
115+
116+ - name: Initialize CodeQL
117+ uses: github/codeql-action/init@v3
118+ with:
119+ languages: javascript
120+
121+ - name: Perform CodeQL Analysis
122+ uses: github/codeql-action/analyze@v3
123+
124+ # Use this for any files that we want to be certain exist
125+ # Basically creates a forcing function to discuss were anyone to want to remove them
126+ file-validation:
127+ name: Required Files Check
128+ runs-on: ubuntu-latest
129+ if: ${{ !github.event.pull_request.draft }}
130+ steps:
131+ - name: Checkout code
132+ uses: actions/checkout@v4
133+
134+ - name: Check required files
135+ run: |
136+ required_files=(
137+ "package.json"
138+ "package-lock.json"
139+ "README.md"
140+ "LICENSE"
141+ ".gitignore"
142+ "tsconfig.json"
143+ "SECURITY.md"
144+ "CONTRIBUTING.md"
145+ ".nvmrc"
146+ ".prettierrc"
147+ ".prettierignore"
148+ )
149+
150+ missing_files=()
151+ for file in "${required_files[@]}"; do
152+ if [[ ! -f "$file" ]]; then
153+ missing_files+=("$file")
154+ fi
155+ done
156+
157+ if [[ ${#missing_files[@]} -gt 0 ]]; then
158+ echo "❌ Missing required files:"
159+ printf '%s\n' "${missing_files[@]}"
160+ exit 1
161+ else
162+ echo "✅ All required files present"
163+ fi
164+
165+ compliance-summary:
166+ name: Compliance Summary
167+ runs-on: ubuntu-latest
168+ needs: [conventional-commits, security-audit, file-validation]
169+ if: always() && !github.event.pull_request.draft
170+ steps:
171+ - name: Check compliance status
172+ run: |
173+ echo "## 🔍 Compliance Check Results" >> $GITHUB_STEP_SUMMARY
174+ echo "" >> $GITHUB_STEP_SUMMARY
175+
176+ if [[ "${{ needs.conventional-commits.result }}" == "success" ]]; then
177+ echo "✅ Conventional Commits: PASSED" >> $GITHUB_STEP_SUMMARY
178+ elif [[ "${{ needs.conventional-commits.result }}" == "failure" ]]; then
179+ echo "⚠️ Conventional Commits: WARNING (non-blocking)" >> $GITHUB_STEP_SUMMARY
180+ else
181+ echo "❌ Conventional Commits: SKIPPED" >> $GITHUB_STEP_SUMMARY
182+ fi
183+
184+ if [[ "${{ needs.security-audit.result }}" == "success" ]]; then
185+ echo "✅ Security Audit: PASSED" >> $GITHUB_STEP_SUMMARY
186+ else
187+ echo "❌ Security Audit: FAILED" >> $GITHUB_STEP_SUMMARY
188+ fi
189+
190+ if [[ "${{ needs.file-validation.result }}" == "success" ]]; then
191+ echo "✅ File Validation: PASSED" >> $GITHUB_STEP_SUMMARY
192+ else
193+ echo "❌ File Validation: FAILED" >> $GITHUB_STEP_SUMMARY
194+ fi
195+
196+ echo "" >> $GITHUB_STEP_SUMMARY
197+ echo "📊 **Overall Status**: ${{ job.status }}" >> $GITHUB_STEP_SUMMARY
modified .github/workflows/jetbrains-release.yaml +1 −1
@@ -168,7 +168,7 @@
168168 key: ${{ runner.os }}-node-${{ hashFiles('gui/package-lock.json') }}
169169
170170 - name: Build packages (Unix)
171- run: ./scripts/build-packages.sh
171+ run: cd ../.. && ./scripts/build-packages.sh
172172
173173 # npm install core
174174 - name: Install core node_modules
modified .vscode/launch.json +0 −1
@@ -19,7 +19,6 @@
1919 "pauseForSourceMap": false,
2020 "outFiles": ["${workspaceFolder}/extensions/vscode/out/extension.js"],
2121 "preLaunchTask": "vscode-extension:build",
22- "postDebugTask": "Terminate All Tasks",
2322 "env": {
2423 // "CONTROL_PLANE_ENV": "local",
2524 "CONTINUE_GLOBAL_DIR": "${workspaceFolder}/extensions/.continue-debug"
modified .vscode/tasks.json +0 −13
@@ -223,19 +223,6 @@
223223 ],
224224 "type": "shell",
225225 "problemMatcher": []
226- },
227- {
228- "label": "Terminate All Tasks",
229- "command": "${input:terminate}",
230- "type": "shell"
231- }
232- ],
233- "inputs": [
234- {
235- "id": "terminate",
236- "type": "command",
237- "command": "workbench.action.tasks.terminate",
238- "args": "terminateAll"
239226 }
240227 ]
241228 }
modified core/autocomplete/CompletionProvider.ts +1 −1
@@ -260,7 +260,7 @@
260260 completionId: helper.input.completionId,
261261 gitRepo: await this.ide.getRepoName(helper.filepath),
262262 uniqueId: await this.ide.getUniqueId(),
263- timestamp: Date.now(),
263+ timestamp: new Date().toISOString(),
264264 ...helper.options,
265265 };
266266
modified core/autocomplete/util/types.ts +1 −1
@@ -41,6 +41,6 @@
4141 gitRepo?: string;
4242 completionId: string;
4343 uniqueId: string;
44- timestamp: number;
44+ timestamp: string;
4545 enabledStaticContextualization?: boolean;
4646 }
modified core/codeRenderer/CodeRenderer.ts +122 −15
@@ -8,8 +8,19 @@
88 * we rarely ever need syntax highlighting outside of
99 * creating a render of it.
1010 */
11+import {
12+ transformerMetaHighlight,
13+ transformerNotationDiff,
14+ transformerNotationFocus,
15+ transformerNotationHighlight,
16+} from "@shikijs/transformers";
1117 import { JSDOM } from "jsdom";
12-import { BundledTheme, codeToHtml, getSingletonHighlighter } from "shiki";
18+import {
19+ BundledLanguage,
20+ BundledTheme,
21+ getSingletonHighlighter,
22+ Highlighter,
23+} from "shiki";
1324 import { escapeForSVG, kebabOfStr } from "../util/text";
1425
1526 interface CodeRendererOptions {
@@ -42,6 +53,8 @@
4253 private currentTheme: string = "dark-plus";
4354 private editorBackground: string = "#000000";
4455 private editorForeground: string = "#FFFFFF";
56+ private editorLineHighlight: string = "#000000";
57+ private highlighter: Highlighter | null = null;
4558
4659 private constructor() {}
4760
@@ -62,13 +75,17 @@
6275 ? "dark-plus"
6376 : kebabOfStr(themeName);
6477
65- const highlighter = await getSingletonHighlighter({
78+ this.highlighter = await getSingletonHighlighter({
79+ langs: ["typescript"],
6680 themes: [this.currentTheme],
6781 });
6882
69- const th = highlighter.getTheme(this.currentTheme);
83+ const th = this.highlighter.getTheme(this.currentTheme);
84+
7085 this.editorBackground = th.bg;
7186 this.editorForeground = th.fg;
87+ this.editorLineHighlight =
88+ th.colors!["editor.lineHighlightBackground"] ?? "#000000";
7289 } else {
7390 this.currentTheme = "dark-plus";
7491 }
@@ -148,10 +165,29 @@
148165 async highlightCode(
149166 code: string,
150167 language: string = "javascript",
168+ currLineOffsetFromTop: number,
151169 ): Promise<string> {
152- return await codeToHtml(code, {
170+ const annotatedCode = code
171+ .split("\n")
172+ .map((line, i) =>
173+ i === currLineOffsetFromTop
174+ ? line + " \/\/ \[\!code highlight\]"
175+ : line,
176+ )
177+ .join("\n");
178+
179+ await this.highlighter!.loadLanguage(language as BundledLanguage);
180+
181+ return this.highlighter!.codeToHtml(annotatedCode, {
153182 lang: language,
154183 theme: this.currentTheme,
184+ transformers: [
185+ // transformerColorizedBrackets(),
186+ transformerMetaHighlight(),
187+ transformerNotationHighlight(),
188+ transformerNotationDiff(),
189+ transformerNotationFocus(),
190+ ],
155191 });
156192 }
157193
@@ -163,23 +199,40 @@
163199 dimensions: Dimensions,
164200 lineHeight: number,
165201 options: ConversionOptions,
202+ currLineOffsetFromTop: number,
166203 ): Promise<Buffer> {
167- const highlightedCodeHtml = await this.highlightCode(code, language);
204+ const strokeWidth = 1;
205+ const highlightedCodeHtml = await this.highlightCode(
206+ code,
207+ language,
208+ currLineOffsetFromTop,
209+ );
210+ // console.log(highlightedCodeHtml);
168211
169- const guts = this.convertShikiHtmlToSvgGut(
212+ const { guts, lineBackgrounds } = this.convertShikiHtmlToSvgGut(
170213 highlightedCodeHtml,
171214 fontSize,
172215 fontFamily,
173216 lineHeight,
217+ dimensions,
174218 );
175219 const backgroundColor = this.getBackgroundColor(highlightedCodeHtml);
176220
177- const svg = `<svg xmlns="http://www.w3.org/2000/svg" width="${dimensions.width}" height="${dimensions.height}">
221+ const svg = `<svg xmlns="http://www.w3.org/2000/svg" width="${dimensions.width}" height="${dimensions.height}" shape-rendering="crispEdges">
222+ <style>
223+ :root {
224+ --purple: rgb(112, 114, 209);
225+ --green: rgb(136, 194, 163);
226+ --blue: rgb(107, 166, 205);
227+ }
228+ </style>
178229 <g>
179- <rect width="${dimensions.width}" height="${dimensions.height}" fill="${backgroundColor}" stroke="${this.editorForeground}" stroke-width="1" />
230+ <rect x="0" y="0" rx="10" ry="10" width="${dimensions.width}" height="${dimensions.height}" fill="${this.editorBackground}" shape-rendering="crispEdges" />
231+ ${lineBackgrounds}
180232 ${guts}
181233 </g>
182234 </svg>`;
235+ console.log(svg);
183236
184237 return Buffer.from(svg, "utf8");
185238 }
@@ -189,7 +242,8 @@
189242 fontSize: number,
190243 fontFamily: string,
191244 lineHeight: number,
192- ): string {
245+ dimensions: Dimensions,
246+ ): { guts: string; lineBackgrounds: string } {
193247 const dom = new JSDOM(shikiHtml);
194248 const document = dom.window.document;
195249
@@ -204,19 +258,70 @@
204258 const el = node as HTMLElement;
205259 const style = el.getAttribute("style") || "";
206260 const colorMatch = style.match(/color:\s*(#[0-9a-fA-F]{6})/);
207- const fill = colorMatch ? ` fill="${colorMatch[1]}"` : "";
261+ const classes = el.getAttribute("class") || "";
262+ let fill = colorMatch ? ` fill="${colorMatch[1]}"` : "";
263+ if (classes.includes("highlighted")) {
264+ fill = ` fill="${this.editorLineHighlight}"`;
265+ }
208266 const content = el.textContent || "";
209267 return `<tspan xml:space="preserve"${fill}>${escapeForSVG(content)}</tspan>`;
210268 })
211269 .join("");
212270
213- const y = (index + 1) * lineHeight;
214- return `<text x="0" y="${y}" font-family="${fontFamily}" font-size="${fontSize.toString()}" xml:space="preserve">${spans}</text>`;
271+ // Typography notes:
272+ // Each line of code is a <text> inside a <rect>.
273+ // Math becomes interesting here; the y value is actually aligned to the topmost border.
274+ // So y = 0 will have the rect be flush with the top border.
275+ // More importantly, text will also be positioned that way.
276+ // Since y = 0 is the axis the text will align itself to, the default settings will actually have the text sitting "on top of" the y = 0 axis, which effectively shifts them up.
277+ // To prevent this, we want the alignment axis to be at the middle of each rect, and have the text align itself vertically to the center (skwered by the axis).
278+ // The first step is to add lineHeight / 2 to move the axis down.
279+ // The second step is to add 'dominant-baseline="central"' to vertically center the text.
280+ // Note that we choose "central" over "middle". "middle" will center the text too perfectly, which is actually undesirable!
281+ const y = index * lineHeight + lineHeight / 2;
282+ return `<text x="0" y="${y}" font-family="${fontFamily}" font-size="${fontSize.toString()}" xml:space="preserve" dominant-baseline="central" shape-rendering="crispEdges">${spans}</text>`;
215283 });
216284
217- return `
218- ${svgLines.join("\n")}
219- `.trim();
285+ const lineBackgrounds = lines
286+ .map((line, index) => {
287+ const classes = line?.getAttribute("class") || "";
288+ const bgColor = classes.includes("highlighted")
289+ ? this.editorLineHighlight
290+ : this.editorBackground;
291+ const y = index * lineHeight;
292+ const isFirst = index === 0;
293+ const isLast = index === lines.length - 1;
294+ const radius = 10;
295+ // SVG notes:
296+ // By default SVGs have anti-aliasing on.
297+ // This is undesirable in our case because pixel-perfect alignment of these rectangles will introduce thin gaps.
298+ // Turning it off with 'shape-rendering="crispEdges"' solves the issue.
299+ return isFirst
300+ ? `<path d="M ${0} ${y + lineHeight}
301+ L ${0} ${y + radius}
302+ Q ${0} ${y} ${radius} ${y}
303+ L ${dimensions.width - radius} ${y}
304+ Q ${dimensions.width} ${y} ${dimensions.width} ${y + radius}
305+ L ${dimensions.width} ${y + lineHeight}
306+ Z"
307+ fill="${bgColor}" />`
308+ : isLast
309+ ? `<path d="M ${0} ${y}
310+ L ${0} ${y + lineHeight - radius}
311+ Q ${0} ${y + lineHeight} ${radius} ${y + lineHeight}
312+ L ${dimensions.width - radius} ${y + lineHeight}
313+ Q ${dimensions.width} ${y + lineHeight} ${dimensions.width} ${y + lineHeight - 10}
314+ L ${dimensions.width} ${y}
315+ Z"
316+ fill="${bgColor}" />`
317+ : `<rect x="0" y="${y}" rx="${radius}" ry="${radius}" width="100%" height="${lineHeight}" fill="${bgColor}" shape-rendering="crispEdges" />`;
318+ })
319+ .join("\n");
320+
321+ return {
322+ guts: svgLines.join("\n"),
323+ lineBackgrounds,
324+ };
220325 }
221326
222327 getBackgroundColor(shikiHtml: string): string {
@@ -244,6 +349,7 @@
244349 dimensions: Dimensions,
245350 lineHeight: number,
246351 options: ConversionOptions,
352+ currLineOffsetFromTop: number,
247353 ): Promise<DataUri> {
248354 switch (options.imageType) {
249355 // case "png":
@@ -265,6 +371,7 @@
265371 dimensions,
266372 lineHeight,
267373 options,
374+ currLineOffsetFromTop,
268375 );
269376 return `data:image/svg+xml;base64,${svgBuffer.toString("base64")}`;
270377 }
modified core/config/load.ts +2 −0
@@ -643,6 +643,7 @@
643643 template: llm.template,
644644 completionOptions: llm.completionOptions,
645645 baseAgentSystemMessage: llm.baseAgentSystemMessage,
646+ basePlanSystemMessage: llm.basePlanSystemMessage,
646647 baseChatSystemMessage: llm.baseChatSystemMessage,
647648 requestOptions: llm.requestOptions,
648649 promptTemplates: serializePromptTemplates(llm.promptTemplates),
@@ -650,6 +651,7 @@
650651 roles: llm.roles,
651652 configurationStatus: llm.getConfigurationStatus(),
652653 apiKeyLocation: llm.apiKeyLocation,
654+ envSecretLocations: llm.envSecretLocations,
653655 };
654656 }
655657
modified core/config/types.ts +2 −0
@@ -1004,6 +1004,8 @@
10041004 type: "stdio";
10051005 command: string;
10061006 args: string[];
1007+ env?: Record<string, string>;
1008+ cwd?: string;
10071009 }
10081010
10091011 interface WebSocketOptions {
modified core/config/yaml/loadYaml.ts +1 −0
@@ -69,6 +69,7 @@
6969 command: server.command,
7070 args: server.args ?? [],
7171 env: server.env,
72+ cwd: server.cwd,
7273 } as any, // TODO: Fix the mcpServers types in config-yaml (discriminated union)
7374 timeout: server.connectionTimeout,
7475 };
added core/config/yaml/loadYaml.vitest.ts +128 −0
@@ -0,0 +1,128 @@
1+import { describe, it, expect } from "vitest";
2+import {
3+ validateConfigYaml,
4+ AssistantUnrolledNonNullable,
5+} from "@continuedev/config-yaml";
6+
7+describe("MCP Server cwd configuration", () => {
8+ describe("YAML schema validation", () => {
9+ it("should accept valid MCP server with cwd", () => {
10+ const config: AssistantUnrolledNonNullable = {
11+ name: "test-assistant",
12+ version: "1.0.0",
13+ mcpServers: [
14+ {
15+ name: "test-server",
16+ command: "node",
17+ args: ["server.js"],
18+ env: { NODE_ENV: "production" },
19+ cwd: "/path/to/project",
20+ connectionTimeout: 5000,
21+ },
22+ ],
23+ };
24+
25+ const errors = validateConfigYaml(config);
26+ expect(errors).toHaveLength(0);
27+ });
28+
29+ it("should accept MCP server without cwd", () => {
30+ const config: AssistantUnrolledNonNullable = {
31+ name: "test-assistant",
32+ version: "1.0.0",
33+ mcpServers: [
34+ {
35+ name: "test-server",
36+ command: "python",
37+ args: ["-m", "server"],
38+ },
39+ ],
40+ };
41+
42+ const errors = validateConfigYaml(config);
43+ expect(errors).toHaveLength(0);
44+ });
45+
46+ it("should accept relative paths in cwd", () => {
47+ const config: AssistantUnrolledNonNullable = {
48+ name: "test-assistant",
49+ version: "1.0.0",
50+ mcpServers: [
51+ {
52+ name: "test-server",
53+ command: "cargo",
54+ args: ["run"],
55+ cwd: "./rust-project",
56+ },
57+ ],
58+ };
59+
60+ const errors = validateConfigYaml(config);
61+ expect(errors).toHaveLength(0);
62+ });
63+
64+ it("should accept empty string cwd", () => {
65+ const config: AssistantUnrolledNonNullable = {
66+ name: "test-assistant",
67+ version: "1.0.0",
68+ mcpServers: [
69+ {
70+ name: "test-server",
71+ command: "deno",
72+ args: ["run", "server.ts"],
73+ cwd: "",
74+ },
75+ ],
76+ };
77+
78+ const errors = validateConfigYaml(config);
79+ expect(errors).toHaveLength(0);
80+ });
81+ });
82+
83+ describe("MCP server configuration examples", () => {
84+ it("should support common MCP server patterns with cwd", () => {
85+ const configs = [
86+ {
87+ name: "Local project MCP server",
88+ server: {
89+ name: "project-mcp",
90+ command: "npm",
91+ args: ["run", "mcp-server"],
92+ cwd: "/Users/developer/my-project",
93+ },
94+ },
95+ {
96+ name: "Python MCP with virtual environment",
97+ server: {
98+ name: "python-mcp",
99+ command: "python",
100+ args: ["-m", "my_mcp_server"],
101+ env: { PYTHONPATH: "./src" },
102+ cwd: "/home/user/python-project",
103+ },
104+ },
105+ {
106+ name: "Relative path MCP server",
107+ server: {
108+ name: "relative-mcp",
109+ command: "node",
110+ args: ["index.js"],
111+ cwd: "../mcp-servers/filesystem",
112+ },
113+ },
114+ ];
115+
116+ configs.forEach(({ name, server }) => {
117+ const config: AssistantUnrolledNonNullable = {
118+ name: "test-assistant",
119+ version: "1.0.0",
120+ mcpServers: [server],
121+ };
122+
123+ const errors = validateConfigYaml(config);
124+ expect(errors).toHaveLength(0);
125+ });
126+ });
127+ });
128+});
modified core/config/yaml/models.ts +7 −0
@@ -63,6 +63,7 @@
6363 template: model.promptTemplates?.chat,
6464 promptTemplates: model.promptTemplates,
6565 baseAgentSystemMessage: model.chatOptions?.baseAgentSystemMessage,
66+ basePlanSystemMessage: model.chatOptions?.basePlanSystemMessage,
6667 baseChatSystemMessage: model.chatOptions?.baseSystemMessage,
6768 capabilities: {
6869 tools: model.capabilities?.includes("tool_use"),
@@ -126,6 +127,12 @@
126127 if ("profile" in env && typeof env.profile === "string") {
127128 options.profile = env.profile;
128129 }
130+ if ("accessKeyId" in env && typeof env.accessKeyId === "string") {
131+ options.accessKeyId = env.accessKeyId;
132+ }
133+ if ("secretAccessKey" in env && typeof env.secretAccessKey === "string") {
134+ options.secretAccessKey = env.secretAccessKey;
135+ }
129136 if ("modelArn" in env && typeof env.modelArn === "string") {
130137 options.modelArn = env.modelArn;
131138 }
modified core/context/mcp/MCPConnection.ts +1 −0
@@ -329,6 +329,7 @@
329329 command,
330330 args,
331331 env,
332+ cwd: options.transport.cwd,
332333 stderr: "pipe",
333334 });
334335
modified core/context/mcp/MCPConnection.vitest.ts +22 −0
@@ -1,6 +1,7 @@
11 import { Client } from "@modelcontextprotocol/sdk/client/index.js";
22 import { beforeEach, describe, expect, it, vi } from "vitest";
33 import MCPConnection from "./MCPConnection";
4+import { StdioOptions } from "../../index.d.js";
45
56 describe("MCPConnection", () => {
67 beforeEach(() => {
@@ -25,6 +26,27 @@
2526 expect(conn.status).toBe("not-connected");
2627 });
2728
29+ it("should create instance with stdio transport including cwd", () => {
30+ const options = {
31+ name: "test-mcp",
32+ id: "test-id",
33+ transport: {
34+ type: "stdio" as const,
35+ command: "test-cmd",
36+ args: ["--test"],
37+ env: { TEST: "true" },
38+ cwd: "/path/to/working/directory",
39+ },
40+ };
41+
42+ const conn = new MCPConnection(options);
43+ expect(conn).toBeInstanceOf(MCPConnection);
44+ expect(conn.status).toBe("not-connected");
45+ if (conn.options.transport.type === "stdio") {
46+ expect(conn.options.transport.cwd).toBe("/path/to/working/directory");
47+ }
48+ });
49+
2850 it("should create instance with websocket transport", () => {
2951 const options = {
3052 name: "test-mcp",
modified core/context/providers/DocsContextProvider.ts +13 −6
@@ -145,6 +145,11 @@
145145 async loadSubmenuItems(
146146 args: LoadSubmenuItemsArgs,
147147 ): Promise<ContextSubmenuItem[]> {
148+ const { config } = args;
149+ // This set is used to filter out the docs that is not in docs config but exist in sqlite metadata
150+ const configDocsSet = new Set(
151+ config.docs?.map((doc) => doc.startUrl) || [],
152+ );
148153 // Get docs service
149154 const docsService = DocsService.getSingleton();
150155 if (!docsService) {
@@ -159,12 +164,14 @@
159164 // Get all indexed docs from the database
160165 const docs = (await docsService.listMetadata()) ?? [];
161166 for (const { startUrl, title, favicon } of docs) {
162- submenuItems.push({
163- title,
164- id: startUrl,
165- description: new URL(startUrl).hostname,
166- icon: favicon,
167- });
167+ if (configDocsSet.has(startUrl)) {
168+ submenuItems.push({
169+ title,
170+ id: startUrl,
171+ description: new URL(startUrl).hostname,
172+ icon: favicon,
173+ });
174+ }
168175 }
169176
170177 // Sort alphabetically
modified core/context/providers/HttpContextProvider.ts +4 −0
@@ -72,6 +72,10 @@
7272 description: item.description ?? "HTTP Context Item",
7373 content: item.content ?? "",
7474 name: item.name ?? this.options.title ?? "HTTP",
75+ uri: {
76+ type: item.uri.type,
77+ value: item.uri.value,
78+ },
7579 });
7680
7781 return Array.isArray(json)
modified core/context/retrieval/pipelines/BaseRetrievalPipeline.ts +4 −2
@@ -225,9 +225,11 @@
225225 .join("");
226226 const parsed = JSON.parse(responseContent);
227227 toolCalls = parsed.tools || [];
228- console.log("retrieveWithTools", toolCalls);
229228 } catch (e) {
230- console.log("Failed to parse tool selection response", e);
229+ console.log(
230+ `Failed to parse tool selection response: ${toolSelectionResponse.content}\n\n`,
231+ e,
232+ );
231233 return [];
232234 }
233235
modified core/edit/searchAndReplace/findSearchMatch.test.ts +593 −211
@@ -1,319 +1,546 @@
11 import { findSearchMatch } from "./findSearchMatch";
22
3-describe("findSearchMatch", () => {
4- describe("Exact matches", () => {
5- it("should find exact match at the beginning of file", () => {
6- const fileContent = `function hello() {
3+describe("Exact matches", () => {
4+ it("should find exact match at the beginning of file", () => {
5+ const fileContent = `function hello() {
76 console.log("world");
87 }`;
9- const searchContent = `function hello() {
8+ const searchContent = `function hello() {
109 console.log("world");
1110 }`;
1211
13- const result = findSearchMatch(fileContent, searchContent);
12+ const result = findSearchMatch(fileContent, searchContent);
1413
15- expect(result).toEqual({
16- startIndex: 0,
17- endIndex: fileContent.length,
18- });
14+ expect(result).toEqual({
15+ startIndex: 0,
16+ endIndex: fileContent.length,
17+ strategyName: "exactMatch",
1918 });
19+ });
2020
21- it("should find exact match in the middle of file", () => {
22- const fileContent = `const a = 1;
21+ it("should find exact match in the middle of file", () => {
22+ const fileContent = `const a = 1;
2323 function hello() {
2424 console.log("world");
2525 }
2626 const b = 2;`;
27- const searchContent = `function hello() {
27+ const searchContent = `function hello() {
2828 console.log("world");
2929 }`;
3030
31- const result = findSearchMatch(fileContent, searchContent);
31+ const result = findSearchMatch(fileContent, searchContent);
3232
33- expect(result).toEqual({
34- startIndex: 13, // After "const a = 1;\n"
35- endIndex: 13 + searchContent.length,
36- });
33+ expect(result).toEqual({
34+ startIndex: 13, // After "const a = 1;\n"
35+ endIndex: 13 + searchContent.length,
36+ strategyName: "exactMatch",
3737 });
38+ });
3839
39- it("should find exact match at the end of file", () => {
40- const fileContent = `const a = 1;
40+ it("should find exact match at the end of file", () => {
41+ const fileContent = `const a = 1;
4142 function hello() {
4243 console.log("world");
4344 }`;
44- const searchContent = `function hello() {
45+ const searchContent = `function hello() {
4546 console.log("world");
4647 }`;
4748
48- const result = findSearchMatch(fileContent, searchContent);
49+ const result = findSearchMatch(fileContent, searchContent);
4950
50- expect(result).toEqual({
51- startIndex: 13, // After "const a = 1;\n"
52- endIndex: fileContent.length,
53- });
51+ expect(result).toEqual({
52+ startIndex: 13, // After "const a = 1;\n"
53+ endIndex: fileContent.length,
54+ strategyName: "exactMatch",
5455 });
56+ });
5557
56- it("should find exact match with single line", () => {
57- const fileContent = `const a = 1;
58+ it("should find exact match with single line", () => {
59+ const fileContent = `const a = 1;
5860 const b = 2;
5961 const c = 3;`;
60- const searchContent = `const b = 2;`;
62+ const searchContent = `const b = 2;`;
6163
62- const result = findSearchMatch(fileContent, searchContent);
64+ const result = findSearchMatch(fileContent, searchContent);
6365
64- expect(result).toEqual({
65- startIndex: 13, // After "const a = 1;\n"
66- endIndex: 13 + searchContent.length,
67- });
66+ expect(result).toEqual({
67+ startIndex: 13, // After "const a = 1;\n"
68+ endIndex: 13 + searchContent.length,
69+ strategyName: "exactMatch",
6870 });
71+ });
6972
70- it("should find exact match with whitespace preserved", () => {
71- const fileContent = `function test() {
73+ it("should find exact match with whitespace preserved", () => {
74+ const fileContent = `function test() {
7275 const x = 1;
7376 const y = 2;
7477 }`;
75- const searchContent = ` const x = 1;
78+ const searchContent = ` const x = 1;
7679 const y = 2;`;
7780
78- const result = findSearchMatch(fileContent, searchContent);
81+ const result = findSearchMatch(fileContent, searchContent);
7982
80- // The actual indexOf result is 18, not 17
81- expect(result).toEqual({
82- startIndex: 18,
83- endIndex: 18 + searchContent.length,
84- });
83+ // The actual indexOf result is 18, not 17
84+ expect(result).toEqual({
85+ startIndex: 18,
86+ endIndex: 18 + searchContent.length,
87+ strategyName: "exactMatch",
8588 });
8689 });
87-
88- describe("Trimmed matches", () => {
89- it("should find trimmed match when exact match fails due to leading newlines", () => {
90- const fileContent = `function hello() {
90+});
91+
92+describe("Trimmed matches", () => {
93+ it("should find trimmed match when exact match fails due to leading newlines", () => {
94+ const fileContent = `function hello() {
9195 console.log("world");
9296 }`;
93- const searchContent = `\n\nfunction hello() {
97+ const searchContent = `\n\nfunction hello() {
9498 console.log("world");
9599 }\n\n`;
96100
97- const result = findSearchMatch(fileContent, searchContent);
101+ const result = findSearchMatch(fileContent, searchContent);
98102
99- expect(result).toEqual({
100- startIndex: 0,
101- endIndex: fileContent.length, // Uses trimmed length
102- });
103+ expect(result).toEqual({
104+ startIndex: 0,
105+ endIndex: fileContent.length, // Uses trimmed length
106+ strategyName: "trimmedMatch",
103107 });
108+ });
104109
105- it("should find trimmed match when exact match fails due to trailing newlines", () => {
106- const fileContent = `const a = 1;
110+ it("should find trimmed match when exact match fails due to trailing newlines", () => {
111+ const fileContent = `const a = 1;
107112 function hello() {
108113 return "world";
109114 }
110115 const b = 2;`;
111- const searchContent = `\nfunction hello() {
116+ const searchContent = `\nfunction hello() {
112117 return "world";
113118 }\n`;
114119
115- const result = findSearchMatch(fileContent, searchContent);
120+ const result = findSearchMatch(fileContent, searchContent);
116121
117- // The function finds the exact match first (at index 12), not the trimmed match
118- expect(result).toEqual({
119- startIndex: 12,
120- endIndex: 12 + searchContent.length,
121- });
122+ // The function finds the exact match first (at index 12), not the trimmed match
123+ expect(result).toEqual({
124+ startIndex: 12,
125+ endIndex: 12 + searchContent.length,
126+ strategyName: "exactMatch",
122127 });
128+ });
123129
124- it("should find trimmed match for single line with extra whitespace", () => {
125- const fileContent = `const a = 1;
130+ it("should find trimmed match for single line with extra whitespace", () => {
131+ const fileContent = `const a = 1;
126132 const b = 2;
127133 const c = 3;`;
128- const searchContent = `\n const b = 2; \n`;
134+ const searchContent = `\n const b = 2; \n`;
129135
130- const result = findSearchMatch(fileContent, searchContent);
136+ const result = findSearchMatch(fileContent, searchContent);
131137
132- const trimmedSearchContent = searchContent.trim();
133- const expectedStart = fileContent.indexOf(trimmedSearchContent);
138+ const trimmedSearchContent = searchContent.trim();
139+ const expectedStart = fileContent.indexOf(trimmedSearchContent);
134140
135- expect(result).toEqual({
136- startIndex: expectedStart,
137- endIndex: expectedStart + trimmedSearchContent.length,
138- });
141+ expect(result).toEqual({
142+ startIndex: expectedStart,
143+ endIndex: expectedStart + trimmedSearchContent.length,
144+ strategyName: "trimmedMatch",
139145 });
140146 });
141-
142- describe("Empty search content", () => {
143- it("should match at beginning for empty search content", () => {
144- const fileContent = `function hello() {
147+});
148+
149+describe("Empty search content", () => {
150+ it("should match at beginning for empty search content", () => {
151+ const fileContent = `function hello() {
145152 console.log("world");
146153 }`;
147- const searchContent = "";
154+ const searchContent = "";
148155
149- const result = findSearchMatch(fileContent, searchContent);
156+ const result = findSearchMatch(fileContent, searchContent);
150157
151- expect(result).toEqual({
152- startIndex: 0,
153- endIndex: 0,
154- });
158+ expect(result).toEqual({
159+ startIndex: 0,
160+ endIndex: 0,
161+ strategyName: "emptySearch",
155162 });
163+ });
156164
157- it("should match at beginning for whitespace-only search content", () => {
158- const fileContent = `function hello() {
165+ it("should match at beginning for whitespace-only search content", () => {
166+ const fileContent = `function hello() {
159167 console.log("world");
160168 }`;
161- const searchContent = "\n\n \t \n";
169+ const searchContent = "\n\n \t \n";
162170
163- const result = findSearchMatch(fileContent, searchContent);
171+ const result = findSearchMatch(fileContent, searchContent);
164172
165- expect(result).toEqual({
166- startIndex: 0,
167- endIndex: 0,
168- });
173+ expect(result).toEqual({
174+ startIndex: 0,
175+ endIndex: 0,
176+ strategyName: "emptySearch",
169177 });
178+ });
170179
171- it("should match at beginning for empty file and empty search", () => {
172- const fileContent = "";
173- const searchContent = "";
180+ it("should match at beginning for empty file and empty search", () => {
181+ const fileContent = "";
182+ const searchContent = "";
174183
175- const result = findSearchMatch(fileContent, searchContent);
184+ const result = findSearchMatch(fileContent, searchContent);
176185
177- expect(result).toEqual({
178- startIndex: 0,
179- endIndex: 0,
180- });
186+ expect(result).toEqual({
187+ startIndex: 0,
188+ endIndex: 0,
189+ strategyName: "emptySearch",
181190 });
182191 });
183-
184- describe("No matches", () => {
185- it("should return null when search content is not found", () => {
186- const fileContent = `function hello() {
192+});
193+
194+describe("No matches", () => {
195+ it("should return null when search content is not found", () => {
196+ const fileContent = `function hello() {
187197 console.log("world");
188198 }`;
189- const searchContent = `function goodbye() {
199+ const searchContent = `function goodbye() {
190200 console.log("world");
191201 }`;
192202
193- const result = findSearchMatch(fileContent, searchContent);
203+ const result = findSearchMatch(fileContent, searchContent);
194204
195- expect(result).toBeNull();
196- });
205+ expect(result?.strategyName).toEqual("jaroWinklerFuzzyMatch");
206+ });
197207
198- it("should return null when trimmed search content is not found", () => {
199- const fileContent = `function hello() {
208+ it("should return only fuzzy result when trimmed search content is not found", () => {
209+ const fileContent = `function hello() {
200210 console.log("world");
201211 }`;
202- const searchContent = `\n\nfunction goodbye() {
212+ const searchContent = `\n\nfunction goodbye() {
203213 console.log("world");
204214 }\n\n`;
205215
206- const result = findSearchMatch(fileContent, searchContent);
216+ const result = findSearchMatch(fileContent, searchContent);
207217
208- expect(result).toBeNull();
209- });
218+ expect(result?.strategyName).toEqual("jaroWinklerFuzzyMatch");
219+ });
220+});
210221
211- it("should return null for non-existent single line", () => {
212- const fileContent = `const a = 1;
213-const b = 2;
214-const c = 3;`;
215- const searchContent = `const d = 4;`;
222+describe("Edge cases", () => {
223+ it("should handle empty file with non-empty search", () => {
224+ const fileContent = "";
225+ const searchContent = "function hello() {}";
226+
227+ const result = findSearchMatch(fileContent, searchContent);
228+
229+ expect(result).toBeNull();
230+ });
216231
217- const result = findSearchMatch(fileContent, searchContent);
232+ it("should handle very large content", () => {
233+ const repeatedLine = "const x = 1;\n";
234+ const fileContent =
235+ repeatedLine.repeat(1000) +
236+ "const target = 2;\n" +
237+ repeatedLine.repeat(1000);
238+ const searchContent = "const target = 2;";
239+
240+ const result = findSearchMatch(fileContent, searchContent);
241+
242+ const expectedStart = repeatedLine.length * 1000;
243+ expect(result).toEqual({
244+ startIndex: expectedStart,
245+ endIndex: expectedStart + searchContent.length,
246+ strategyName: "exactMatch",
247+ });
248+ });
218249
219- expect(result).toBeNull();
250+ it("should handle special characters and symbols", () => {
251+ const fileContent = `const regex = /[a-zA-Z]+/g;
252+const symbols = !@#$%^&*();
253+const unicode = "🚀 Hello 世界";`;
254+ const searchContent = `const symbols = !@#$%^&*();`;
255+
256+ const result = findSearchMatch(fileContent, searchContent);
257+
258+ const expectedStart = fileContent.indexOf(searchContent);
259+ expect(result).toEqual({
260+ startIndex: expectedStart,
261+ endIndex: expectedStart + searchContent.length,
262+ strategyName: "exactMatch",
220263 });
264+ });
221265
222- it("should return null for partial match", () => {
223- const fileContent = `function hello() {
224- console.log("world");
266+ it("should prefer exact match over trimmed match", () => {
267+ const fileContent = `function test() {
268+ const x = 1;
269+}
270+
271+function test() {
272+ const x = 1;
225273 }`;
226- const searchContent = `function hello() {
227- console.log("universe");
274+ const searchContent = `function test() {
275+ const x = 1;
228276 }`;
229277
230- const result = findSearchMatch(fileContent, searchContent);
278+ const result = findSearchMatch(fileContent, searchContent);
231279
232- expect(result).toBeNull();
280+ // Should find the first exact match, not a trimmed version
281+ expect(result).toEqual({
282+ startIndex: 0,
283+ endIndex: searchContent.length,
284+ strategyName: "exactMatch",
233285 });
234286 });
235287
236- describe("Edge cases", () => {
237- it("should handle empty file with non-empty search", () => {
238- const fileContent = "";
239- const searchContent = "function hello() {}";
288+ it("should handle multiple occurrences and return first match", () => {
289+ const fileContent = `const a = 1;
290+const b = 2;
291+const a = 1;`;
292+ const searchContent = `const a = 1;`;
240293
241- const result = findSearchMatch(fileContent, searchContent);
294+ const result = findSearchMatch(fileContent, searchContent);
242295
243- expect(result).toBeNull();
296+ expect(result).toEqual({
297+ startIndex: 0,
298+ endIndex: searchContent.length,
299+ strategyName: "exactMatch",
244300 });
301+ });
302+});
303+
304+describe("Whitespace-ignored matches", () => {
305+ it("should match code with different indentation", () => {
306+ const fileContent = `function example() {
307+ const x = 1;
308+ const y = 2;
309+ return x + y;
310+}`;
311+ const searchContent = `const x=1;
312+const y=2;
313+return x+y;`;
314+
315+ const result = findSearchMatch(fileContent, searchContent);
316+
317+ expect(result).not.toBeNull();
318+ expect(result!.startIndex).toBe(20); // After "function example() {\n"
319+ expect(result!.endIndex).toBe(72); // End of " return x + y;"
320+ expect(result!.strategyName).toBe("whitespaceIgnoredMatch");
321+
322+ // Verify the matched content contains the original whitespace
323+ const matchedContent = fileContent.substring(
324+ result!.startIndex,
325+ result!.endIndex,
326+ );
327+ expect(matchedContent).toBe(`
328+ const x = 1;
329+ const y = 2;
330+ return x + y;`);
331+ });
245332
246- it("should handle very large content", () => {
247- const repeatedLine = "const x = 1;\n";
248- const fileContent =
249- repeatedLine.repeat(1000) +
250- "const target = 2;\n" +
251- repeatedLine.repeat(1000);
252- const searchContent = "const target = 2;";
333+ it("should match single line with different spacing", () => {
334+ const fileContent = `const a = 1;
335+const b = 2;
336+const c = 3;`;
337+ const searchContent = `const b=2;`;
338+
339+ const result = findSearchMatch(fileContent, searchContent);
340+
341+ expect(result).not.toBeNull();
342+ expect(result!.startIndex).toBe(12); // After "const a = 1;"
343+ expect(result!.endIndex).toBe(32); // End of "const b = 2;"
344+ expect(result!.strategyName).toBe("whitespaceIgnoredMatch");
345+
346+ // Verify the matched content preserves original spacing
347+ const matchedContent = fileContent.substring(
348+ result!.startIndex,
349+ result!.endIndex,
350+ );
351+ expect(matchedContent).toBe(`
352+const b = 2;`);
353+ });
253354
254- const result = findSearchMatch(fileContent, searchContent);
355+ it("should match with tabs vs spaces", () => {
356+ const fileContent = `function test() {
357+\tif (condition) {
358+\t\treturn true;
359+\t}
360+}`;
361+ const searchContent = `if (condition) {
362+ return true;
363+}`;
255364
256- const expectedStart = repeatedLine.length * 1000;
257- expect(result).toEqual({
258- startIndex: expectedStart,
259- endIndex: expectedStart + searchContent.length,
260- });
261- });
365+ const result = findSearchMatch(fileContent, searchContent);
366+
367+ expect(result).not.toBeNull();
368+ expect(result!.startIndex).toBe(17); // After "function test() {"
369+ expect(result!.endIndex).toBe(53); // End of "\t}"
370+ expect(result!.strategyName).toBe("whitespaceIgnoredMatch");
371+
372+ // Verify the matched content preserves original tabs
373+ const matchedContent = fileContent.substring(
374+ result!.startIndex,
375+ result!.endIndex,
376+ );
377+ expect(matchedContent).toBe(`
378+\tif (condition) {
379+\t\treturn true;
380+\t}`);
381+ });
262382
263- it("should handle special characters and symbols", () => {
264- const fileContent = `const regex = /[a-zA-Z]+/g;
265-const symbols = !@#$%^&*();
266-const unicode = "🚀 Hello 世界";`;
267- const searchContent = `const symbols = !@#$%^&*();`;
383+ it("should match complex whitespace patterns", () => {
384+ const fileContent = `const obj = {
385+ key1 : 'value1',
386+ key2 : 'value2',
387+ key3 : 'value3'
388+};`;
389+ const searchContent = `key1:'value1',
390+key2:'value2',
391+key3:'value3'`;
392+
393+ const result = findSearchMatch(fileContent, searchContent);
394+
395+ expect(result).not.toBeNull();
396+ expect(result!.startIndex).toBe(13); // After "const obj = {"
397+ expect(result!.endIndex).toBe(83); // End of " key3 : 'value3'"
398+ expect(result!.strategyName).toBe("whitespaceIgnoredMatch");
399+
400+ // Verify the matched content preserves original formatting
401+ const matchedContent = fileContent.substring(
402+ result!.startIndex,
403+ result!.endIndex,
404+ );
405+ expect(matchedContent).toBe(`
406+ key1 : 'value1',
407+ key2 : 'value2',
408+ key3 : 'value3'`);
409+ });
268410
269- const result = findSearchMatch(fileContent, searchContent);
411+ it("should handle newlines and mixed whitespace", () => {
412+ const fileContent = `function calc() {
270413
271- const expectedStart = fileContent.indexOf(searchContent);
272- expect(result).toEqual({
273- startIndex: expectedStart,
274- endIndex: expectedStart + searchContent.length,
275- });
414+
415+ let result = 0;
416+
417+ result += 5;
418+
419+
420+ return result;
421+}`;
422+ const searchContent = `let result=0;result+=5;return result;`;
423+
424+ const result = findSearchMatch(fileContent, searchContent);
425+
426+ expect(result).not.toBeNull();
427+ expect(result!.startIndex).toBe(17); // After "function calc() {\n\n"
428+ expect(result!.endIndex).toBe(78); // End of " return result;"
429+ expect(result!.strategyName).toBe("whitespaceIgnoredMatch");
430+
431+ // Verify the matched content includes all original whitespace
432+ const matchedContent = fileContent.substring(
433+ result!.startIndex,
434+ result!.endIndex,
435+ );
436+ expect(matchedContent).toBe(`
437+
438+
439+ let result = 0;
440+
441+ result += 5;
442+
443+
444+ return result;`);
445+ });
446+
447+ it("should prefer exact match over whitespace-ignored match", () => {
448+ const fileContent = `const x=1;
449+const x = 1;`;
450+ const searchContent = `const x=1;`;
451+
452+ const result = findSearchMatch(fileContent, searchContent);
453+
454+ // Should find the exact match first (at index 0), not the whitespace-ignored match
455+ expect(result).toEqual({
456+ startIndex: 0,
457+ endIndex: 10,
458+ strategyName: "exactMatch",
276459 });
460+ });
277461
278- it("should prefer exact match over trimmed match", () => {
279- const fileContent = `function test() {
280- const x = 1;
281-}
462+ it("should handle empty content after whitespace removal", () => {
463+ const fileContent = `function test() {
464+ return 1;
465+}`;
466+ const searchContent = `\n\n \t \n`;
467+
468+ const result = findSearchMatch(fileContent, searchContent);
469+
470+ // Should match at beginning for empty/whitespace-only content
471+ expect(result).toEqual({
472+ startIndex: 0,
473+ endIndex: 0,
474+ strategyName: "emptySearch",
475+ });
476+ });
282477
283-function test() {
284- const x = 1;
478+ it("should handle complex code blocks with different formatting", () => {
479+ const fileContent = `class Example {
480+ constructor(name) {
481+ this.name = name;
482+ this.value = 0;
483+ }
484+
485+ getValue() {
486+ return this.value;
487+ }
285488 }`;
286- const searchContent = `function test() {
287- const x = 1;
489+ const searchContent = `constructor(name){
490+this.name=name;
491+this.value=0;
288492 }`;
289493
290- const result = findSearchMatch(fileContent, searchContent);
494+ const result = findSearchMatch(fileContent, searchContent);
495+
496+ expect(result).not.toBeNull();
497+ expect(result!.startIndex).toBe(15); // After "class Example {"
498+ expect(result!.endIndex).toBe(95); // End of " }"
499+ expect(result!.strategyName).toBe("whitespaceIgnoredMatch");
500+
501+ // Verify the matched content preserves original formatting
502+ const matchedContent = fileContent.substring(
503+ result!.startIndex,
504+ result!.endIndex,
505+ );
506+ expect(matchedContent).toBe(`
507+ constructor(name) {
508+ this.name = name;
509+ this.value = 0;
510+ }`);
511+ });
291512
292- // Should find the first exact match, not a trimmed version
293- expect(result).toEqual({
294- startIndex: 0,
295- endIndex: searchContent.length,
296- });
297- });
513+ it("should return null when no close match exists", () => {
514+ const fileContent = `function hello() {
515+ console.log("world");
516+}`;
517+ const searchContent = `this has nothing to do with the other option`;
298518
299- it("should handle multiple occurrences and return first match", () => {
300- const fileContent = `const a = 1;
301-const b = 2;
302-const a = 1;`;
303- const searchContent = `const a = 1;`;
519+ const result = findSearchMatch(fileContent, searchContent);
304520
305- const result = findSearchMatch(fileContent, searchContent);
521+ expect(result).toBeNull();
522+ });
306523
307- expect(result).toEqual({
308- startIndex: 0,
309- endIndex: searchContent.length,
310- });
524+ it("should handle multiple potential matches and return first", () => {
525+ const fileContent = `const a=1;
526+const a = 1;
527+const a = 1;`;
528+ const searchContent = `const a=1;`;
529+
530+ const result = findSearchMatch(fileContent, searchContent);
531+
532+ // Should find the first exact match
533+ expect(result).toEqual({
534+ startIndex: 0,
535+ endIndex: 10,
536+ strategyName: "exactMatch",
311537 });
312538 });
313-
314- describe("Real-world scenarios", () => {
315- it("should match typical function replacement", () => {
316- const fileContent = `class Calculator {
539+});
540+
541+describe("Real-world scenarios", () => {
542+ it("should match typical function replacement", () => {
543+ const fileContent = `class Calculator {
317544 constructor() {
318545 this.result = 0;
319546 }
@@ -328,41 +555,43 @@
328555 return this;
329556 }
330557 }`;
331- const searchContent = ` reset() {
558+ const searchContent = ` reset() {
332559 this.result = 0;
333560 return this;
334561 }`;
335562
336- const result = findSearchMatch(fileContent, searchContent);
563+ const result = findSearchMatch(fileContent, searchContent);
337564
338- const expectedStart = fileContent.indexOf(searchContent);
339- expect(result).toEqual({
340- startIndex: expectedStart,
341- endIndex: expectedStart + searchContent.length,
342- });
565+ const expectedStart = fileContent.indexOf(searchContent);
566+ expect(result).toEqual({
567+ startIndex: expectedStart,
568+ endIndex: expectedStart + searchContent.length,
569+ strategyName: "exactMatch",
343570 });
571+ });
344572
345- it("should match import statement", () => {
346- const fileContent = `import React from 'react';
573+ it("should match import statement", () => {
574+ const fileContent = `import React from 'react';
347575 import { useState, useEffect } from 'react';
348576 import './App.css';
349577
350578 function App() {
351579 return <div>Hello World</div>;
352580 }`;
353- const searchContent = `import { useState, useEffect } from 'react';`;
354-
355- const result = findSearchMatch(fileContent, searchContent);
356-
357- const expectedStart = fileContent.indexOf(searchContent);
358- expect(result).toEqual({
359- startIndex: expectedStart,
360- endIndex: expectedStart + searchContent.length,
361- });
581+ const searchContent = `import { useState, useEffect } from 'react';`;
582+
583+ const result = findSearchMatch(fileContent, searchContent);
584+
585+ const expectedStart = fileContent.indexOf(searchContent);
586+ expect(result).toEqual({
587+ startIndex: expectedStart,
588+ endIndex: expectedStart + searchContent.length,
589+ strategyName: "exactMatch",
362590 });
591+ });
363592
364- it("should match comment block", () => {
365- const fileContent = `/**
593+ it("should match comment block", () => {
594+ const fileContent = `/**
366595 * This is a comment
367596 * that spans multiple lines
368597 */
@@ -370,16 +599,169 @@
370599 // Single line comment
371600 return true;
372601 }`;
373- const searchContent = `/**
602+ const searchContent = `/**
374603 * This is a comment
375604 * that spans multiple lines
376605 */`;
377606
378- const result = findSearchMatch(fileContent, searchContent);
607+ const result = findSearchMatch(fileContent, searchContent);
608+
609+ expect(result).toEqual({
610+ startIndex: 0,
611+ endIndex: searchContent.length,
612+ strategyName: "exactMatch",
613+ });
614+ });
615+
616+ describe("Jaro-Winkler fuzzy matching", () => {
617+ describe("Basic fuzzy matching", () => {
618+ it("should find fuzzy match for similar strings", () => {
619+ const fileContent = `function calculateSum(a, b) {
620+ return a + b;
621+}`;
622+ const searchContent = `function calculateSum(x, y) {
623+ return x + y;
624+}`;
625+
626+ const result = findSearchMatch(fileContent, searchContent);
627+
628+ expect(result).not.toBeNull();
629+ });
630+
631+ it("should find fuzzy match with minor typos", () => {
632+ const fileContent = `const message = "Hello World";`;
633+ const searchContent = `const mesage = "Hello World";`; // Missing 's' in 'message'
634+
635+ const result = findSearchMatch(fileContent, searchContent);
636+
637+ expect(result).not.toBeNull();
638+ expect(result?.startIndex).toBe(0);
639+ });
640+
641+ it("should find fuzzy match with different variable names", () => {
642+ const fileContent = `let userAge = 25;
643+let userName = "John";`;
644+ const searchContent = `let age = 25;
645+let name = "John";`;
646+
647+ const result = findSearchMatch(fileContent, searchContent);
648+
649+ expect(result).not.toBeNull();
650+ });
651+
652+ it("should find fuzzy match for similar function signature", () => {
653+ const fileContent = `function processUserData(userData) {
654+ validateInput(userData);
655+ return formatOutput(userData);
656+}`;
657+ const searchContent = `function processData(data) {
658+ validateInput(data);
659+ return formatOutput(data);
660+}`;
661+
662+ const result = findSearchMatch(fileContent, searchContent);
663+
664+ expect(result).not.toBeNull();
665+ });
666+ });
667+
668+ describe("Multi-line fuzzy matching", () => {
669+ it("should find fuzzy match for multi-line blocks", () => {
670+ const fileContent = `class Calculator {
671+ constructor() {
672+ this.result = 0;
673+ }
674+
675+ add(value) {
676+ this.result += value;
677+ return this;
678+ }
679+}`;
680+ const searchContent = `class Calculator {
681+ constructor() {
682+ this.value = 0;
683+ }
684+
685+ add(num) {
686+ this.value += num;
687+ return this;
688+ }
689+}`;
690+
691+ const result = findSearchMatch(fileContent, searchContent);
692+
693+ expect(result).not.toBeNull();
694+ });
695+
696+ it("should find fuzzy match for partial blocks", () => {
697+ const fileContent = `function processData(input) {
698+ const validated = validateInput(input);
699+ const processed = transformData(validated);
700+ const result = formatOutput(processed);
701+ return result;
702+}`;
703+ const searchContent = `const validated = validateInput(input);
704+ const processed = transformData(validated);`;
705+
706+ const result = findSearchMatch(fileContent, searchContent);
707+
708+ expect(result).not.toBeNull();
709+ });
710+ });
711+
712+ describe("Edge cases with fuzzy matching", () => {
713+ it("should handle empty search content with fuzzy matching enabled", () => {
714+ const fileContent = `function test() {}`;
715+ const searchContent = "";
716+
717+ const result = findSearchMatch(fileContent, searchContent);
718+
719+ expect(result).toEqual({
720+ startIndex: 0,
721+ endIndex: 0,
722+ strategyName: "emptySearch",
723+ });
724+ });
725+
726+ it("should handle empty file content with fuzzy matching enabled", () => {
727+ const fileContent = "";
728+ const searchContent = "function test() {}";
729+
730+ const result = findSearchMatch(fileContent, searchContent);
731+
732+ expect(result).toBeNull();
733+ });
734+
735+ it("should prefer exact match over fuzzy match", () => {
736+ const fileContent = `function test() { return true; }
737+function test() { return false; }`;
738+ const searchContent = `function test() { return true; }`;
739+
740+ const result = findSearchMatch(fileContent, searchContent);
741+
742+ expect(result).not.toBeNull();
743+ expect(result?.startIndex).toBe(0);
744+ });
745+
746+ it("should handle very short strings", () => {
747+ const fileContent = `a b c`;
748+ const searchContent = `a c`;
749+
750+ const result = findSearchMatch(fileContent, searchContent);
751+
752+ // Should not match due to low similarity
753+ expect(result).toBeNull();
754+ });
755+
756+ it("should handle special characters in fuzzy matching", () => {
757+ const fileContent = `const regex = /[a-zA-Z]+/g;
758+const symbols = !@#$%^&*();`;
759+ const searchContent = `const regex = /[a-zA-Z0-9]+/g;
760+const symbols = !@#$%^&*();`;
761+
762+ const result = findSearchMatch(fileContent, searchContent);
379763
380- expect(result).toEqual({
381- startIndex: 0,
382- endIndex: searchContent.length,
764+ expect(result).not.toBeNull();
383765 });
384766 });
385767 });
modified core/edit/searchAndReplace/findSearchMatch.ts +285 −23
@@ -1,54 +1,316 @@
11 /**
2- * Represents a match result with start and end character positions
2+ * Represents a basic match result with start and end character positions
33 */
4-export interface SearchMatchResult {
4+interface BasicMatchResult {
55 /** The starting character index of the match in the file content */
66 startIndex: number;
77 /** The ending character index of the match in the file content */
88 endIndex: number;
99 }
1010
11+/**
12+ * Represents a match result with start and end character positions
13+ */
14+export interface SearchMatchResult extends BasicMatchResult {
15+ /** The name of the strategy that successfully matched */
16+ strategyName: string;
17+}
18+
19+/**
20+ * Strategy function type for finding matches
21+ */
22+type MatchStrategy = (
23+ fileContent: string,
24+ searchContent: string,
25+) => BasicMatchResult | null;
26+
27+/**
28+ * Exact string matching strategy
29+ */
30+function exactMatch(
31+ fileContent: string,
32+ searchContent: string,
33+): BasicMatchResult | null {
34+ const exactIndex = fileContent.indexOf(searchContent);
35+ if (exactIndex !== -1) {
36+ return {
37+ startIndex: exactIndex,
38+ endIndex: exactIndex + searchContent.length,
39+ };
40+ }
41+ return null;
42+}
43+
44+/**
45+ * Trimmed content matching strategy
46+ */
47+function trimmedMatch(
48+ fileContent: string,
49+ searchContent: string,
50+): BasicMatchResult | null {
51+ const trimmedSearchContent = searchContent.trim();
52+ const trimmedIndex = fileContent.indexOf(trimmedSearchContent);
53+ if (trimmedIndex !== -1) {
54+ return {
55+ startIndex: trimmedIndex,
56+ endIndex: trimmedIndex + trimmedSearchContent.length,
57+ };
58+ }
59+ return null;
60+}
61+
62+/**
63+ * Whitespace-ignored matching strategy
64+ * Removes all whitespace from both content and search, then finds the match
65+ */
66+function whitespaceIgnoredMatch(
67+ fileContent: string,
68+ searchContent: string,
69+): BasicMatchResult | null {
70+ // Remove all whitespace (spaces, tabs, newlines, etc.)
71+ const strippedFileContent = fileContent.replace(/\s/g, "");
72+ const strippedSearchContent = searchContent.replace(/\s/g, "");
73+
74+ if (strippedSearchContent === "") {
75+ return null; // Empty search after stripping whitespace
76+ }
77+
78+ const strippedIndex = strippedFileContent.indexOf(strippedSearchContent);
79+ if (strippedIndex === -1) {
80+ return null;
81+ }
82+
83+ // Map the stripped position back to the original file content
84+ let originalStartIndex = 0;
85+ let strippedCharCount = 0;
86+
87+ // Find the original position by counting non-whitespace characters
88+ for (let i = 0; i < fileContent.length; i++) {
89+ if (strippedCharCount === strippedIndex) {
90+ originalStartIndex = i;
91+ break;
92+ }
93+ if (!/\s/.test(fileContent[i])) {
94+ strippedCharCount++;
95+ }
96+ }
97+
98+ // Find the end position by counting the length of the search content
99+ let originalEndIndex = originalStartIndex;
100+ let matchedChars = 0;
101+
102+ for (
103+ let i = originalStartIndex;
104+ i < fileContent.length && matchedChars < strippedSearchContent.length;
105+ i++
106+ ) {
107+ if (!/\s/.test(fileContent[i])) {
108+ matchedChars++;
109+ }
110+ originalEndIndex = i + 1;
111+ }
112+
113+ return {
114+ startIndex: originalStartIndex,
115+ endIndex: originalEndIndex,
116+ };
117+}
118+
119+/**
120+ * Calculate the Jaro similarity between two strings
121+ */
122+function jaroSimilarity(s1: string, s2: string): number {
123+ if (s1 === s2) return 1.0;
124+ if (s1.length === 0 || s2.length === 0) return 0.0;
125+
126+ const matchDistance = Math.floor(Math.max(s1.length, s2.length) / 2) - 1;
127+ if (matchDistance < 0) return 0.0;
128+
129+ const s1Matches = new Array(s1.length).fill(false);
130+ const s2Matches = new Array(s2.length).fill(false);
131+
132+ let matches = 0;
133+ let transpositions = 0;
134+
135+ // Find matches
136+ for (let i = 0; i < s1.length; i++) {
137+ const start = Math.max(0, i - matchDistance);
138+ const end = Math.min(i + matchDistance + 1, s2.length);
139+
140+ for (let j = start; j < end; j++) {
141+ if (s2Matches[j] || s1[i] !== s2[j]) continue;
142+ s1Matches[i] = true;
143+ s2Matches[j] = true;
144+ matches++;
145+ break;
146+ }
147+ }
148+
149+ if (matches === 0) return 0.0;
150+
151+ // Count transpositions
152+ let k = 0;
153+ for (let i = 0; i < s1.length; i++) {
154+ if (!s1Matches[i]) continue;
155+ while (!s2Matches[k]) k++;
156+ if (s1[i] !== s2[k]) transpositions++;
157+ k++;
158+ }
159+
160+ return (
161+ (matches / s1.length +
162+ matches / s2.length +
163+ (matches - transpositions / 2) / matches) /
164+ 3.0
165+ );
166+}
167+
168+/**
169+ * Calculate the Jaro-Winkler similarity between two strings
170+ */
171+function jaroWinklerSimilarity(
172+ s1: string,
173+ s2: string,
174+ prefixScale = 0.1,
175+): number {
176+ const jaroSim = jaroSimilarity(s1, s2);
177+
178+ if (jaroSim < 0.7) return jaroSim;
179+
180+ // Calculate common prefix length (up to 4 characters)
181+ let prefixLength = 0;
182+ const maxPrefix = Math.min(4, Math.min(s1.length, s2.length));
183+
184+ for (let i = 0; i < maxPrefix; i++) {
185+ if (s1[i] === s2[i]) {
186+ prefixLength++;
187+ } else {
188+ break;
189+ }
190+ }
191+
192+ return jaroSim + prefixLength * prefixScale * (1 - jaroSim);
193+}
194+
195+/**
196+ * Find the best fuzzy match for search content in file content using Jaro-Winkler
197+ */
198+function findFuzzyMatch(
199+ fileContent: string,
200+ searchContent: string,
201+ threshold: number = 0.9,
202+): BasicMatchResult | null {
203+ const searchLines = searchContent.split("\n");
204+ const fileLines = fileContent.split("\n");
205+
206+ let bestMatch: BasicMatchResult | null = null;
207+ let bestSimilarity = 0;
208+
209+ // Try matching the search content as a whole block
210+ const searchBlock = searchContent.trim();
211+ if (searchBlock.length > 5) {
212+ // Require minimum length for meaningful matches
213+ // Use sliding window approach for multi-line search
214+ for (let i = 0; i <= fileLines.length - searchLines.length; i++) {
215+ const candidateLines = fileLines.slice(i, i + searchLines.length);
216+ const candidateBlock = candidateLines.join("\n").trim();
217+
218+ if (candidateBlock.length < 5) continue; // Skip very short blocks
219+
220+ const similarity = jaroWinklerSimilarity(searchBlock, candidateBlock);
221+
222+ if (similarity >= threshold && similarity > bestSimilarity) {
223+ // Calculate character positions
224+ const linesBeforeMatch = fileLines.slice(0, i);
225+ const startIndex =
226+ linesBeforeMatch.join("\n").length +
227+ (linesBeforeMatch.length > 0 ? 1 : 0);
228+ const endIndex = startIndex + candidateBlock.length;
229+
230+ bestMatch = {
231+ startIndex,
232+ endIndex,
233+ };
234+ bestSimilarity = similarity;
235+ }
236+ }
237+ }
238+
239+ // Also try line-by-line matching for better granularity
240+ for (
241+ let searchLineIdx = 0;
242+ searchLineIdx < searchLines.length;
243+ searchLineIdx++
244+ ) {
245+ const searchLine = searchLines[searchLineIdx].trim();
246+ if (searchLine.length === 0 || searchLine.length < 3) continue; // Skip very short lines
247+
248+ for (let fileLineIdx = 0; fileLineIdx < fileLines.length; fileLineIdx++) {
249+ const fileLine = fileLines[fileLineIdx].trim();
250+ if (fileLine.length === 0 || fileLine.length < 3) continue; // Skip very short lines
251+
252+ const similarity = jaroWinklerSimilarity(searchLine, fileLine);
253+
254+ if (similarity >= threshold && similarity > bestSimilarity) {
255+ // Calculate character positions for the line
256+ const linesBeforeMatch = fileLines.slice(0, fileLineIdx);
257+ const startIndex =
258+ linesBeforeMatch.join("\n").length +
259+ (linesBeforeMatch.length > 0 ? 1 : 0);
260+ const endIndex = startIndex + fileLines[fileLineIdx].length;
261+
262+ bestMatch = {
263+ startIndex,
264+ endIndex,
265+ };
266+ bestSimilarity = similarity;
267+ }
268+ }
269+ }
270+
271+ return bestMatch;
272+}
273+
274+/**
275+ * Ordered list of matching strategies to try with their names
276+ */
277+const matchingStrategies: Array<{ strategy: MatchStrategy; name: string }> = [
278+ { strategy: exactMatch, name: "exactMatch" },
279+ { strategy: trimmedMatch, name: "trimmedMatch" },
280+ { strategy: whitespaceIgnoredMatch, name: "whitespaceIgnoredMatch" },
281+ { strategy: findFuzzyMatch, name: "jaroWinklerFuzzyMatch" },
282+];
283+
11284 /**
12285 * Find the exact match position for search content in file content.
13- * Uses simple exact matching with trimmed newlines for MVP.
286+ * Uses multiple matching strategies in order of preference.
14287 *
15288 * Matching Strategy:
16289 * 1. If search content is empty, matches at the beginning of file (position 0)
17- * 2. Try exact string match first
18- * 3. Fallback to trimmed content match if exact match fails
290+ * 2. Try each matching strategy in order until one succeeds
19291 *
20292 * @param fileContent - The complete content of the file to search in
21293 * @param searchContent - The content to search for
294+ * @param config - Configuration options for matching behavior
22295 * @returns Match result with character positions, or null if no match found
23296 */
24297 export function findSearchMatch(
25298 fileContent: string,
26299 searchContent: string,
27300 ): SearchMatchResult | null {
28- // Strip leading/trailing newlines for basic matching strategy
29301 const trimmedSearchContent = searchContent.trim();
30302
31303 if (trimmedSearchContent === "") {
32304 // Empty search content matches the beginning of the file
33- return { startIndex: 0, endIndex: 0 };
34- }
35-
36- // Try exact match first
37- const exactIndex = fileContent.indexOf(searchContent);
38- if (exactIndex !== -1) {
39- return {
40- startIndex: exactIndex,
41- endIndex: exactIndex + searchContent.length,
42- };
305+ return { startIndex: 0, endIndex: 0, strategyName: "emptySearch" };
43306 }
44307
45- // Fallback: try trimmed content match
46- const trimmedIndex = fileContent.indexOf(trimmedSearchContent);
47- if (trimmedIndex !== -1) {
48- return {
49- startIndex: trimmedIndex,
50- endIndex: trimmedIndex + trimmedSearchContent.length,
51- };
308+ // Try each matching strategy in order
309+ for (const { strategy, name } of matchingStrategies) {
310+ const result = strategy(fileContent, searchContent);
311+ if (result !== null) {
312+ return { ...result, strategyName: name };
313+ }
52314 }
53315
54316 return null;
modified core/edit/streamDiffLines.ts +5 −1
@@ -55,7 +55,11 @@
5555 }
5656
5757 function modelIsInept(model: string): boolean {
58- return !(model.includes("gpt") || model.includes("claude"));
58+ return !(
59+ model.includes("gpt") ||
60+ model.includes("claude") ||
61+ model.includes("nova")
62+ );
5963 }
6064
6165 export async function* streamDiffLines({
modified core/index.d.ts +12 −3
@@ -428,7 +428,7 @@
428428 completion: string;
429429 }
430430
431-export type MessageModes = "chat" | "agent";
431+export type MessageModes = "chat" | "agent" | "plan";
432432
433433 export type ToolStatus =
434434 | "generating"
@@ -568,6 +568,7 @@
568568 title?: string;
569569 uniqueId?: string;
570570 baseAgentSystemMessage?: string;
571+ basePlanSystemMessage?: string;
571572 baseChatSystemMessage?: string;
572573 autocompleteOptions?: Partial<TabAutocompleteOptions>;
573574 contextLength?: number;
@@ -583,6 +584,7 @@
583584
584585 // continueProperties
585586 apiKeyLocation?: string;
587+ envSecretLocations?: Record<string, string>;
586588 apiBase?: string;
587589 orgScopeId?: string | null;
588590
@@ -611,6 +613,8 @@
611613 // AWS options
612614 profile?: string;
613615 modelArn?: string;
616+ accessKeyId?: string;
617+ secretAccessKey?: string;
614618
615619 // AWS and VertexAI Options
616620 region?: string;
@@ -1084,6 +1088,7 @@
10841088
10851089 apiBase?: string;
10861090 apiKeyLocation?: string;
1091+ envSecretLocations?: Record<string, string>;
10871092 orgScopeId?: string | null;
10881093
10891094 onPremProxyUrl?: string | null;
@@ -1093,6 +1098,7 @@
10931098 template?: TemplateType;
10941099 completionOptions?: BaseCompletionOptions;
10951100 baseAgentSystemMessage?: string;
1101+ basePlanSystemMessage?: string;
10961102 baseChatSystemMessage?: string;
10971103 requestOptions?: RequestOptions;
10981104 promptTemplates?: { [key: string]: string };
@@ -1165,6 +1171,7 @@
11651171 command: string;
11661172 args: string[];
11671173 env?: Record<string, string>;
1174+ cwd?: string;
11681175 requestOptions?: RequestOptions;
11691176 }
11701177
@@ -1707,9 +1714,11 @@
17071714
17081715 export type RuleSource =
17091716 | "default-chat"
1717+ | "default-plan"
17101718 | "default-agent"
1711- | "model-chat-options"
1712- | "model-agent-options"
1719+ | "model-options-chat"
1720+ | "model-options-plan"
1721+ | "model-options-agent"
17131722 | "rules-block"
17141723 | "json-systemMessage"
17151724 | ".continuerules";
modified core/indexing/LanceDbIndex.ts +18 −1
@@ -234,6 +234,23 @@
234234 return results;
235235 }
236236
237+ /**
238+ * Due to a bug in indexing, some indexes have vectors
239+ * without the surrounding []. These would fail to parse
240+ * but this allows such existing indexes to function properly
241+ */
242+ private parseVector(vector: string): number[] {
243+ try {
244+ return JSON.parse(vector);
245+ } catch (err) {
246+ try {
247+ return JSON.parse(`[${vector}]`);
248+ } catch (err2) {
249+ throw new Error(`Failed to parse vector: ${vector}`, { cause: err2 });
250+ }
251+ }
252+ }
253+
237254 async *update(
238255 tag: IndexTag,
239256 results: RefreshIndexResults,
@@ -297,7 +314,7 @@
297314 const lanceRows: LanceDbRow[] = [];
298315 for (const item of cachedItems) {
299316 try {
300- const vector = JSON.parse(item.vector);
317+ const vector = this.parseVector(item.vector);
301318 const { uuid, startLine, endLine, contents } = item;
302319
303320 lanceRows.push({
modified core/indexing/docs/DocsService.ts +87 −11
@@ -107,6 +107,17 @@
107107 );
108108 };
109109
110+const siteIndexingConfigsAreEqualExceptTitleAndFavicon = (
111+ config1: SiteIndexingConfig,
112+ config2: SiteIndexingConfig,
113+) => {
114+ return (
115+ config1.startUrl === config2.startUrl &&
116+ config1.maxDepth === config2.maxDepth &&
117+ config1.useLocalCrawling === config2.useLocalCrawling
118+ );
119+};
120+
110121 /*
111122 General process:
112123 - On config update:
@@ -395,6 +406,21 @@
395406 siteIndexingConfig: SiteIndexingConfig,
396407 ): Promise<boolean> {
397408 try {
409+ // Set a initial status when retrieving cache
410+ this.handleStatusUpdate({
411+ type: "docs",
412+ id: startUrl,
413+ embeddingsProviderId: embeddingId,
414+ isReindexing: false,
415+ title: siteIndexingConfig.title,
416+ debugInfo: "Loaded from cache",
417+ icon: siteIndexingConfig.faviconUrl,
418+ url: startUrl,
419+ progress: 0,
420+ description: "Try to retrieve cache",
421+ status: "indexing",
422+ });
423+
398424 const cacheHit = await this.tryFetchFromCache(startUrl, embeddingId);
399425
400426 if (cacheHit) {
@@ -429,7 +455,8 @@
429455 siteIndexingConfig: SiteIndexingConfig,
430456 forceReindex: boolean = false,
431457 ): Promise<void> {
432- const { startUrl, useLocalCrawling, maxDepth } = siteIndexingConfig;
458+ const { startUrl, useLocalCrawling, maxDepth, faviconUrl } =
459+ siteIndexingConfig;
433460
434461 // First, if indexing is already in process, don't attempt
435462 // This queue is necessary because indexAndAdd is invoked circularly by config edits
@@ -685,7 +712,9 @@
685712 await this.deleteIndexes(startUrl);
686713 }
687714
688- const favicon = await fetchFavicon(new URL(siteIndexingConfig.startUrl));
715+ const favicon =
716+ faviconUrl ||
717+ (await fetchFavicon(new URL(siteIndexingConfig.startUrl)));
689718
690719 if (this.shouldCancel(startUrl, startedWithEmbedder)) {
691720 return;
@@ -718,10 +747,6 @@
718747 void this.ide.showToast("info", `Successfully indexed ${startUrl}`);
719748 }
720749
721- this.messenger?.send("refreshSubmenuItems", {
722- providers: ["docs"],
723- });
724-
725750 removeFromFailedGlobalContext(siteIndexingConfig);
726751 } catch (e) {
727752 console.error(
@@ -766,14 +791,22 @@
766791 const siteEmbeddings = JSON.parse(data) as SiteIndexingResults;
767792
768793 // Try to get a favicon for the site
769- const favicon = await fetchFavicon(new URL(startUrl));
794+ const favicon =
795+ this.statuses.get(startUrl)?.icon ||
796+ (await fetchFavicon(new URL(startUrl)));
797+
798+ // Always try to make the title match what users set in the config
799+ const title =
800+ this.statuses.get(startUrl)?.title ||
801+ siteEmbeddings.title ||
802+ new URL(startUrl).hostname;
770803
771804 // Add the cached embeddings to our database
772805 await this.add({
773806 favicon,
774807 siteIndexingConfig: {
775808 startUrl,
776- title: siteEmbeddings.title || new URL(startUrl).hostname,
809+ title,
777810 },
778811 chunks: siteEmbeddings.chunks,
779812 embeddings: siteEmbeddings.chunks.map((c) => c.embedding),
@@ -910,6 +943,10 @@
910943 );
911944
912945 if (cacheHit) {
946+ // If cache hit, refresh the submenu items for docs
947+ this.messenger?.send("refreshSubmenuItems", {
948+ providers: ["docs"],
949+ });
913950 // If cache hit, retry the search once
914951 return await this.retrieveChunks(startUrl, vector, nRetrieve, true);
915952 }
@@ -987,8 +1024,7 @@
9871024 const currentStartUrls = currentlyIndexedDocs.map((doc) => doc.startUrl);
9881025
9891026 // Anything found in old config, new config, AND sqlite that doesn't match should be reindexed
990- // TODO if only favicon and title change, only update, don't embed
991- // Otherwise anything found in new config that isn't in sqlite should be added/indexed
1027+ // Anything found in new config that isn't in sqlite should be added/indexed
9921028 const addedDocs: SiteIndexingConfig[] = [];
9931029 const changedDocs: SiteIndexingConfig[] = [];
9941030 for (const doc of newConfigDocs) {
@@ -999,12 +1035,26 @@
9991035 (d) => d.startUrl === doc.startUrl,
10001036 );
10011037
1038+ // TODO: Changes to the docs config made while Continue isn't running won't be caught
10021039 if (oldConfigDoc && !siteIndexingConfigsAreEqual(oldConfigDoc, doc)) {
1003- changedDocs.push(doc);
1040+ // When only the title or faviconUrl changed, Update the sqlite metadate instead of reindexing
1041+ if (
1042+ siteIndexingConfigsAreEqualExceptTitleAndFavicon(
1043+ oldConfigDoc,
1044+ doc,
1045+ )
1046+ ) {
1047+ await this.updateMetadataInSqlite(doc);
1048+ } else {
1049+ changedDocs.push(doc);
1050+ }
10041051 } else {
10051052 if (forceReindex) {
10061053 changedDocs.push(doc);
10071054 } else {
1055+ // This is a temperary fix to catch the changes to the docs config that were made when Continue isn't running
1056+ // We only update title and faviconUrl here
1057+ await this.updateMetadataInSqlite(doc);
10081058 // if get's here, not changed, no update needed, mark as complete
10091059 this.handleStatusUpdate({
10101060 type: "docs",
@@ -1036,6 +1086,10 @@
10361086 console.error("Error syncing docs index on config update", e);
10371087 } finally {
10381088 this.isSyncing = false;
1089+ // Refresh the submenu items for docs
1090+ this.messenger?.send("refreshSubmenuItems", {
1091+ providers: ["docs"],
1092+ });
10391093 }
10401094 }
10411095
@@ -1182,6 +1236,27 @@
11821236 );
11831237 }
11841238
1239+ private async updateMetadataInSqlite(siteIndexingConfig: SiteIndexingConfig) {
1240+ const { startUrl, title, faviconUrl } = siteIndexingConfig;
1241+ const favicon = faviconUrl || (await fetchFavicon(new URL(startUrl)));
1242+ if (!this.config.selectedModelByRole.embed) {
1243+ console.warn(
1244+ `Attempting to add metadata for ${startUrl} without embeddings provider specified`,
1245+ );
1246+ return;
1247+ }
1248+
1249+ const db = await this.getOrCreateSqliteDb();
1250+
1251+ await db.run(
1252+ `UPDATE ${DocsService.sqlitebTableName} SET title = ?, favicon = ? WHERE startUrl = ? AND embeddingsProviderId = ?`,
1253+ title,
1254+ favicon,
1255+ startUrl,
1256+ this.config.selectedModelByRole.embed.embeddingId,
1257+ );
1258+ }
1259+
11851260 private addToConfig(siteIndexingConfig: SiteIndexingConfig) {
11861261 // Handles the case where a user has manually added the doc to config.json
11871262 // so it already exists in the file
@@ -1286,5 +1361,6 @@
12861361 this.messenger?.send("refreshSubmenuItems", {
12871362 providers: ["docs"],
12881363 });
1364+ this.statuses.delete(startUrl);
12891365 }
12901366 }
modified core/llm/autodetect.ts +6 −0
@@ -46,6 +46,7 @@
4646 const PROVIDER_HANDLES_TEMPLATING: string[] = [
4747 "lmstudio",
4848 "openai",
49+ "nvidia",
4950 "ollama",
5051 "together",
5152 "novita",
@@ -237,6 +238,11 @@
237238 return "none";
238239 }
239240
241+ // Nova Pro requests always sent through Converse API, so formatting not necessary
242+ if (lower.includes("nova")) {
243+ return "none";
244+ }
245+
240246 if (lower.includes("codestral")) {
241247 return "none";
242248 }
modified core/llm/autodetect.vitest.ts +13 −0
@@ -106,6 +106,19 @@
106106 expect(autodetectTemplateType("codestral-22b")).toBe("none");
107107 });
108108
109+test("autodetectTemplateType returns 'none' for Nova models", () => {
110+ expect(autodetectTemplateType("nova")).toBe("none");
111+ expect(autodetectTemplateType("Nova")).toBe("none");
112+ expect(autodetectTemplateType("nova-pro")).toBe("none");
113+ expect(autodetectTemplateType("nova-lite")).toBe("none");
114+ expect(autodetectTemplateType("nova-micro")).toBe("none");
115+ expect(autodetectTemplateType("nova-premier")).toBe("none");
116+ expect(autodetectTemplateType("amazon-nova-pro")).toBe("none");
117+ expect(autodetectTemplateType("amazon-nova-lite")).toBe("none");
118+ expect(autodetectTemplateType("amazon-nova-micro")).toBe("none");
119+ expect(autodetectTemplateType("amazon-nova-premier")).toBe("none");
120+});
121+
109122 test("autodetectTemplateType returns 'alpaca' for Alpaca and Wizard models", () => {
110123 expect(autodetectTemplateType("alpaca")).toBe("alpaca");
111124 expect(autodetectTemplateType("Alpaca")).toBe("alpaca");
modified core/llm/constants.ts +1 −0
@@ -15,6 +15,7 @@
1515 export enum LLMConfigurationStatuses {
1616 VALID = "valid",
1717 MISSING_API_KEY = "missing-api-key",
18+ MISSING_ENV_SECRET = "missing-env-secret",
1819 }
1920
2021 export {
modified core/llm/defaultSystemMessages.ts +16 −5
@@ -1,7 +1,4 @@
1-export const DEFAULT_CHAT_SYSTEM_MESSAGE_URL =
2- "https://github.com/continuedev/continue/blob/main/core/llm/defaultSystemMessages.ts";
3-
4-export const DEFAULT_AGENT_SYSTEM_MESSAGE_URL =
1+export const DEFAULT_SYSTEM_MESSAGES_URL =
52 "https://github.com/continuedev/continue/blob/main/core/llm/defaultSystemMessages.ts";
63
74 export const CODEBLOCK_FORMATTING_INSTRUCTIONS = `\
@@ -54,7 +51,7 @@
5451 You are in chat mode.
5552
5653 If the user asks to make changes to files offer that they can use the Apply Button on the code block, or switch to Agent Mode to make the suggested updates automatically.
57- If needed consisely explain to the user they can switch to agent mode using the Mode Selector dropdown and provide no other details.
54+ If needed concisely explain to the user they can switch to agent mode using the Mode Selector dropdown and provide no other details.
5855
5956 ${CODEBLOCK_FORMATTING_INSTRUCTIONS}
6057 ${EDIT_CODE_INSTRUCTIONS}
@@ -66,3 +63,17 @@
6663
6764 ${CODEBLOCK_FORMATTING_INSTRUCTIONS}
6865 </important_rules>`;
66+
67+// The note about read-only tools is for MCP servers
68+// For now, all MCP tools are included so model can decide if they are read-only
69+export const DEFAULT_PLAN_SYSTEM_MESSAGE = `\
70+<important_rules>
71+ You are in plan mode, in which you help the user understand and construct a plan.
72+ Only use read-only tools. Do not use any tools that would write to non-temporary files.
73+ If the user wants to make changes, offer that they can switch to Agent mode to give you access to write tools to make the suggested updates.
74+
75+${CODEBLOCK_FORMATTING_INSTRUCTIONS}
76+${EDIT_CODE_INSTRUCTIONS}
77+
78+ In plan mode, only write code when directly suggesting changes. Prioritize understanding and developing a plan.
79+</important_rules>`;
modified core/llm/index.ts +8 −0
@@ -141,6 +141,7 @@
141141
142142 title?: string;
143143 baseChatSystemMessage?: string;
144+ basePlanSystemMessage?: string;
144145 baseAgentSystemMessage?: string;
145146 contextLength: number;
146147 maxStopWords?: number | undefined;
@@ -155,6 +156,7 @@
155156
156157 // continueProperties
157158 apiKeyLocation?: string;
159+ envSecretLocations?: Record<string, string>;
158160 apiBase?: string;
159161 orgScopeId?: string | null;
160162
@@ -172,6 +174,8 @@
172174 accountId?: string;
173175 aiGatewaySlug?: string;
174176 profile?: string | undefined;
177+ accessKeyId?: string;
178+ secretAccessKey?: string;
175179
176180 // For IBM watsonx
177181 deploymentId?: string;
@@ -209,6 +213,7 @@
209213 this.title = options.title;
210214 this.uniqueId = options.uniqueId ?? "None";
211215 this.baseAgentSystemMessage = options.baseAgentSystemMessage;
216+ this.basePlanSystemMessage = options.basePlanSystemMessage;
212217 this.baseChatSystemMessage = options.baseChatSystemMessage;
213218 this.contextLength =
214219 options.contextLength ?? llmInfo?.contextLength ?? DEFAULT_CONTEXT_LENGTH;
@@ -246,6 +251,7 @@
246251
247252 // continueProperties
248253 this.apiKeyLocation = options.apiKeyLocation;
254+ this.envSecretLocations = options.envSecretLocations;
249255 this.orgScopeId = options.orgScopeId;
250256 this.apiBase = options.apiBase;
251257
@@ -270,6 +276,8 @@
270276 this.region = options.region;
271277 this.projectId = options.projectId;
272278 this.profile = options.profile;
279+ this.accessKeyId = options.accessKeyId;
280+ this.secretAccessKey = options.secretAccessKey;
273281
274282 this.openaiAdapter = this.createOpenAiAdapter();
275283
modified core/llm/llms/Bedrock.ts +11 −8
@@ -71,11 +71,7 @@
7171 if (!options.apiBase) {
7272 this.apiBase = `https://bedrock-runtime.${options.region}.amazonaws.com`;
7373 }
74- if (options.profile) {
75- this.profile = options.profile;
76- } else {
77- this.profile = "bedrock";
78- }
74+
7975 this.requestOptions = {
8076 region: options.region,
8177 headers: {},
@@ -609,17 +605,24 @@
609605 }
610606
611607 private async _getCredentials() {
608+ if (this.accessKeyId && this.secretAccessKey) {
609+ return {
610+ accessKeyId: this.accessKeyId,
611+ secretAccessKey: this.secretAccessKey,
612+ };
613+ }
614+ const profile = this.profile ?? "bedrock";
612615 try {
613616 return await fromNodeProviderChain({
614- profile: this.profile,
617+ profile: profile,
615618 ignoreCache: true,
616619 })();
617620 } catch (e) {
618621 console.warn(
619- `AWS profile with name ${this.profile} not found in ~/.aws/credentials, using default profile`,
622+ `AWS profile with name ${profile} not found in ~/.aws/credentials, using default profile`,
620623 );
621- return await fromNodeProviderChain()();
622624 }
625+ return await fromNodeProviderChain()();
623626 }
624627
625628 // EMBED //
modified core/llm/llms/VertexAI.ts +149 −27
@@ -1,4 +1,4 @@
1-import { GoogleAuth } from "google-auth-library";
1+import { AuthClient, GoogleAuth, JWT, auth } from "google-auth-library";
22
33 import { streamResponse, streamSse } from "@continuedev/fetch";
44 import { ChatMessage, CompletionOptions, LLMOptions } from "../../index.js";
@@ -14,30 +14,40 @@
1414 declare vertexProvider: "mistral" | "anthropic" | "gemini" | "unknown";
1515 declare anthropicInstance: Anthropic;
1616 declare geminiInstance: Gemini;
17+ static AUTH_SCOPES = "https://www.googleapis.com/auth/cloud-platform";
1718
1819 static defaultOptions: Partial<LLMOptions> | undefined = {
1920 maxEmbeddingBatchSize: 250,
2021 region: "us-central1",
2122 };
2223
23- private clientPromise = new GoogleAuth({
24- scopes: "https://www.googleapis.com/auth/cloud-platform",
25- })
26- .getClient()
27- .catch((e) => {
28- console.warn(`Failed to load credentials for Vertex AI: ${e.message}`);
29- });
24+ private clientPromise: Promise<AuthClient | void>;
3025
31- private static getDefaultApiBaseFrom(options: LLMOptions) {
32- const { region, projectId } = options;
33- if (!region || !projectId) {
34- throw new Error(
35- "region and projectId must be defined if apiBase is not provided",
36- );
37- }
38- return `https://${region}-aiplatform.googleapis.com/v1/projects/${projectId}/locations/${region}/`;
39- }
26+ /*
27+ Vertex Supports 3 different URL formats
28+ 1. Standard VertexAI: e.g. https://{location}-aiplatform.googleapis.com/v1/projects/{project}/locations/{location}/publishers/google/models/{model}:streamGenerateContent
29+ 2. Tuned model: e.g. https://{location}-aiplatform.googleapis.com/v1/projects/{project}/locations/{location}/endpoints/{endpoint}:streamGenerateContent
30+ 3. Express mode: e.g. https://aiplatform.googleapis.com/v1/publishers/google/models/{model}:streamGenerateContent?key={API_KEY} // see https://cloud.google.com/vertex-ai/generative-ai/docs/start/express-mode/overview
31+
32+ Authentication can be done using the following
33+ 2. Access token obtained using Google Auth client, passed to endpoint that includes full model path with project id and region
34+ 1. API Key (express mode), region and projectId will be ignored
4035
36+ In all cases we have defined apiBase to be up to everything including the location.
37+ Standard api base: https://{location}-aiplatform.googleapis.com/v1/projects/{project}/locations/{location}/
38+ Express api base: https://aiplatform.googleapis.com/v1/
39+ TODO endpoints is not currently supported (api base is same as standard but we don't have a way to add endpoint name yet
40+
41+ Note that VertexAI uses the term "service endpoint" and "model", like:
42+ {service-endpoint}/v1/{model}:streamGenerateContent
43+ So "model" includes the project, location, publisher, etc
44+
45+ Express mode has limited support
46+ and CRITICALLY is only available to NEW users who had NOT used cloud services before.
47+ However it is pretty common as gemini becomes more popular.
48+ Only Gemini models are supported for now
49+ https://cloud.google.com/vertex-ai/generative-ai/docs/start/express-mode/overview#models
50+ */
4151 constructor(_options: LLMOptions) {
4252 if (_options.region !== "us-central1") {
4353 // Any region outside of us-central1 has a max batch size of 5.
@@ -47,7 +57,7 @@
4757 );
4858 }
4959 super(_options);
50- this.apiBase ??= VertexAI.getDefaultApiBaseFrom(_options);
60+
5161 this.vertexProvider =
5262 _options.model.includes("mistral") ||
5363 _options.model.includes("codestral") ||
@@ -58,24 +68,130 @@
5868 : _options.model.includes("gemini")
5969 ? "gemini"
6070 : "unknown";
71+
72+ // Set client authentication promise
73+ const { apiKey, region, projectId, env } = _options;
74+ const keyFile = env?.keyFile;
75+ const keyJson = env?.keyJson;
76+
77+ // Acceptable authentication methods:
78+ // apiKey only
79+ // region and projectId AND (keyFile OR keyJson OR nothing)
80+
81+ if (apiKey) {
82+ // Consider warning here instead of throwing error
83+ if (region || projectId || keyFile || keyJson) {
84+ throw new Error(
85+ "Vertex in express mode (api key only) cannot be configured with region, projectId, keyFile, or keyJson",
86+ );
87+ // console.warn(
88+ // "Region, projectId, and key path/file are ignored when apiKey is set. See VertexAI Express Mode docs https://cloud.google.com/vertex-ai/generative-ai/docs/start/express-mode/overview",
89+ // );
90+ }
91+ if (this.vertexProvider !== "gemini") {
92+ throw new Error(
93+ "VertexAI: only gemini models are supported in express (apiKey) mode. See https://cloud.google.com/vertex-ai/generative-ai/docs/start/express-mode/overview#models",
94+ );
95+ }
96+ } else {
97+ if (!region && !projectId) {
98+ throw new Error(
99+ "region and projectId are required for VertexAI (when not using express/apiKey mode)",
100+ );
101+ }
102+ if (keyFile && keyJson) {
103+ throw new Error(
104+ "VertexAI credentials can be configured with either keyFile or keyJson but not both",
105+ );
106+ }
107+ }
108+
109+ if (keyJson) {
110+ // Loading keys from manually set JSON
111+ if (typeof keyJson !== "string") {
112+ throw new Error("VertexAI: keyJson must be a JSON string");
113+ }
114+ try {
115+ const parsed = JSON.parse(keyJson);
116+ if (!parsed?.private_key) {
117+ throw new Error("VertexAI: keyJson must contain a valid private key");
118+ }
119+ parsed.private_key = parsed.private_key.replace(/\\n/g, "\n");
120+ const jsonClient = auth.fromJSON(parsed);
121+ if (jsonClient instanceof JWT) {
122+ jsonClient.scopes = [VertexAI.AUTH_SCOPES];
123+ } else {
124+ throw new Error("VertexAI: keyJson must be a valid JWT");
125+ }
126+ this.clientPromise = Promise.resolve(jsonClient);
127+ } catch (e) {
128+ throw new Error("VertexAI: Failed to parse keyJson");
129+ }
130+ } else if (keyFile) {
131+ // Loading keys from manually set file path
132+ if (typeof keyFile !== "string") {
133+ throw new Error("VertexAI: keyFile must be a string");
134+ }
135+ this.clientPromise = new GoogleAuth({
136+ scopes: VertexAI.AUTH_SCOPES,
137+ keyFile,
138+ })
139+ .getClient()
140+ .catch((e) => {
141+ console.warn(
142+ `Failed to load credentials for Vertex AI: ${e.message}`,
143+ );
144+ });
145+ } else {
146+ // Loading keys from local credentials or environment variable
147+ this.clientPromise = new GoogleAuth({
148+ scopes: VertexAI.AUTH_SCOPES,
149+ })
150+ .getClient()
151+ .catch((e) => {
152+ console.warn(
153+ `Failed to load credentials for Vertex AI: ${e.message}`,
154+ );
155+ });
156+ }
157+
158+ // Set api base
159+ if (!this.apiBase) {
160+ if (apiKey) {
161+ // Express mode
162+ this.apiBase = `https://aiplatform.googleapis.com/v1/`;
163+ } else {
164+ this.apiBase = `https://${region}-aiplatform.googleapis.com/v1/projects/${projectId}/locations/${region}/`;
165+ }
166+ }
167+
168+ // Uses instances of other LLMs since underlying functionality is the same
61169 this.anthropicInstance = new Anthropic(_options);
62170 this.geminiInstance = new Gemini(_options);
63171 }
64172
65- async fetch(url: RequestInfo | URL, init?: RequestInit) {
66- const client = await this.clientPromise;
67- const result = await client?.getAccessToken();
68- if (!result?.token) {
69- throw new Error(
70- "Could not get an access token. Set up your Google Application Default Credentials.",
71- );
173+ async fetch(url: URL, init?: RequestInit) {
174+ const headers: Record<string, string> = {
175+ "Content-Type": "application/json",
176+ };
177+ if (this.apiKey) {
178+ url.searchParams.set("key", this.apiKey);
179+ } else {
180+ const client = await this.clientPromise;
181+ const result = await client?.getAccessToken();
182+ if (!result?.token) {
183+ throw new Error(
184+ "Could not get an access token. Set up your Google Application Default Credentials.",
185+ );
186+ }
187+ headers.Authorization = `Bearer ${result.token}`;
72188 }
189+
73190 return await super.fetch(url, {
74191 ...init,
75192 headers: {
76- "Content-Type": "application/json",
77- Authorization: `Bearer ${result.token}`,
78193 ...init?.headers,
194+ ...headers,
79195 },
80196 });
81197 }
@@ -85,6 +201,10 @@
85201 const convertedArgs = this.anthropicInstance.convertArgs(options);
86202
87203 // Remove the `model` property and add `anthropic_version`
204+ // For claude 4 models
205+ // anthropic_version is a required parameter and must be set to "vertex-2024-10-22".
206+
207+ // const
88208 const { model, ...finalOptions } = convertedArgs;
89209 return {
90210 ...finalOptions,
@@ -104,6 +224,8 @@
104224 this.cacheBehavior?.cacheSystemMessage && systemMessage
105225 );
106226
227+ // <code>/v1/publishers/anthropic/models/claude-3-5-sonnet-20240620:streamRawPredict
228+
107229 const apiURL = new URL(
108230 `publishers/anthropic/models/${options.model}:streamRawPredict`,
109231 this.apiBase,
modified core/llm/llms/index.ts +4 −4
@@ -8,7 +8,6 @@
88 LLMOptions,
99 } from "../..";
1010 import { renderTemplatedString } from "../../util/handlebars/renderTemplatedString";
11-import { DEFAULT_CHAT_SYSTEM_MESSAGE } from "../defaultSystemMessages";
1211 import { BaseLLM } from "../index";
1312 import Anthropic from "./Anthropic";
1413 import Asksage from "./Asksage";
@@ -141,9 +140,9 @@
141140
142141 let baseChatSystemMessage: string | undefined = undefined;
143142 if (desc.systemMessage !== undefined) {
144- baseChatSystemMessage = DEFAULT_CHAT_SYSTEM_MESSAGE;
145- baseChatSystemMessage += "\n\n";
146- baseChatSystemMessage += await renderTemplatedString(
143+ // baseChatSystemMessage = DEFAULT_CHAT_SYSTEM_MESSAGE;
144+ // baseChatSystemMessage += "\n\n";
145+ baseChatSystemMessage = await renderTemplatedString(
147146 Handlebars,
148147 desc.systemMessage,
149148 {},
@@ -163,6 +162,7 @@
163162 cls.defaultOptions?.completionOptions?.maxTokens,
164163 },
165164 baseChatSystemMessage,
165+ basePlanSystemMessage: baseChatSystemMessage,
166166 baseAgentSystemMessage: baseChatSystemMessage,
167167 logger: llmLogger,
168168 uniqueId,
modified core/llm/llms/stubs/ContinueProxy.ts +17 −4
@@ -40,6 +40,7 @@
4040 this.apiType = undefined;
4141 this.actualApiBase = options.apiBase;
4242 this.apiKeyLocation = options.apiKeyLocation;
43+ this.envSecretLocations = options.envSecretLocations;
4344 this.orgScopeId = options.orgScopeId;
4445 this.onPremProxyUrl = options.onPremProxyUrl;
4546 if (this.onPremProxyUrl) {
@@ -60,6 +61,7 @@
6061 protected extraBodyProperties(): Record<string, any> {
6162 const continueProperties: ContinueProperties = {
6263 apiKeyLocation: this.apiKeyLocation,
64+ envSecretLocations: this.envSecretLocations,
6365 apiBase: this.actualApiBase,
6466 orgScopeId: this.orgScopeId ?? null,
6567 env: this.configEnv,
@@ -70,13 +72,24 @@
7072 }
7173
7274 getConfigurationStatus() {
73- if (!this.apiKeyLocation) {
75+ if (!this.apiKeyLocation && !this.envSecretLocations) {
7476 return LLMConfigurationStatuses.VALID;
7577 }
7678
77- const secretLocation = decodeSecretLocation(this.apiKeyLocation);
78- if (secretLocation.secretType === SecretType.NotFound) {
79- return LLMConfigurationStatuses.MISSING_API_KEY;
79+ if (this.apiKeyLocation) {
80+ const secretLocation = decodeSecretLocation(this.apiKeyLocation);
81+ if (secretLocation.secretType === SecretType.NotFound) {
82+ return LLMConfigurationStatuses.MISSING_API_KEY;
83+ }
84+ }
85+
86+ if (this.envSecretLocations) {
87+ for (const secretLocation of Object.values(this.envSecretLocations)) {
88+ const decoded = decodeSecretLocation(secretLocation);
89+ if (decoded.secretType === SecretType.NotFound) {
90+ return LLMConfigurationStatuses.MISSING_ENV_SECRET;
91+ }
92+ }
8093 }
8194
8295 return LLMConfigurationStatuses.VALID;
modified core/llm/rules/getSystemMessageWithRules.ts +4 −0
@@ -324,6 +324,10 @@
324324 return applicableRules;
325325 };
326326
327+export function getRuleId(rule: RuleWithSource): string {
328+ return rule.slug ?? rule.ruleFile ?? rule.name ?? rule.source;
329+}
330+
327331 export const getSystemMessageWithRules = ({
328332 baseSystemMessage,
329333 userMessage,
modified core/llm/toolSupport.ts +7 −0
@@ -19,6 +19,7 @@
1919 "claude-3-7",
2020 "claude-3.7",
2121 "claude-sonnet-4",
22+ "claude-4-sonnet",
2223 "gpt-4",
2324 "o3",
2425 "gemini",
@@ -33,6 +34,7 @@
3334 "claude-3-7",
3435 "claude-3.7",
3536 "claude-sonnet-4",
37+ "claude-4-sonnet",
3638 "claude-opus-4",
3739 ].some((part) => model.toLowerCase().startsWith(part))
3840 ) {
@@ -95,7 +97,12 @@
9597 "claude-3-7-sonnet",
9698 "claude-3.7-sonnet",
9799 "claude-sonnet-4",
100+ "claude-4-sonnet",
98101 "claude-opus-4",
102+ "nova-lite",
103+ "nova-pro",
104+ "nova-micro",
105+ "nova-premier",
99106 ].some((part) => model.toLowerCase().includes(part))
100107 ) {
101108 return true;
modified core/package-lock.json +0 −0

Not shown: the file is larger than the hub shows, or this page holds as much as it shows. View the file.

modified core/package.json +2 −0
@@ -18,6 +18,8 @@
1818 "@babel/preset-env": "^7.24.7",
1919 "@biomejs/biome": "1.6.4",
2020 "@google/generative-ai": "^0.11.4",
21+ "@shikijs/colorized-brackets": "^3.7.0",
22+ "@shikijs/transformers": "^3.7.0",
2123 "@types/diff": "^7.0.1",
2224 "@types/follow-redirects": "^1.14.4",
2325 "@types/jest": "^29.5.12",
modified core/tools/definitions/searchAndReplaceInFile.ts +6 −2
@@ -22,7 +22,7 @@
2222 function: {
2323 name: BuiltInToolNames.SearchAndReplaceInFile,
2424 description:
25- "Description: Request to replace sections of content in an existing file using SEARCH/REPLACE blocks that define exact changes to specific parts of the file. This tool should be used when you need to make targeted changes to specific parts of a file.",
25+ "Request to replace sections of content in an existing file using SEARCH/REPLACE blocks that define exact changes to specific parts of the file. This tool should be used when you need to make targeted changes to specific parts of a file.",
2626 parameters: {
2727 type: "object",
2828 required: ["filepath", "diff"],
@@ -56,7 +56,11 @@
5656 * Include just the changing lines, and a few surrounding lines if needed for uniqueness.
5757 * Do not include long runs of unchanging lines in SEARCH/REPLACE blocks.
5858 * Each line must be complete. Never truncate lines mid-way through as this can cause matching failures.
59-4. Special operations:
59+4. Splitting up tool calls:
60+ * When making multiple closely related edits to the same file, you should try to use multiple SEARCH/REPLACE blocks in a single tool call, rather than making multiple separate tool calls
61+ * If you need to make follow up edits or group your work into logical segments, it is okay to perform additional tool calls
62+ * DO NOT make back-to-back tool calls. Instead interleave with brief explanation of what each will do. For example, instead of [explanation, tool call, tool call] you should do [explanation, tool call, explanation, tool call]
63+5. Special operations:
6064 * To move code: Use two SEARCH/REPLACE blocks (one to delete from original + one to insert at new location)
6165 * To delete code: Use empty REPLACE section
6266
modified core/tools/implementations/fetchUrlContent.ts +29 −1
@@ -1,6 +1,34 @@
11 import { ToolImpl } from ".";
22 import { getUrlContextItems } from "../../context/providers/URLContextProvider";
33
4+const DEFAULT_FETCH_URL_CHAR_LIMIT = 20000;
5+
46 export const fetchUrlContentImpl: ToolImpl = async (args, extras) => {
5- return getUrlContextItems(args.url, extras.fetch);
7+ const contextItems = await getUrlContextItems(args.url, extras.fetch);
8+
9+ // Track truncated content
10+ const truncatedUrls: string[] = [];
11+
12+ // Check and truncate each context item
13+ const processedItems = contextItems.map((item) => {
14+ if (item.content.length > DEFAULT_FETCH_URL_CHAR_LIMIT) {
15+ truncatedUrls.push(args.url);
16+ return {
17+ ...item,
18+ content: item.content.substring(0, DEFAULT_FETCH_URL_CHAR_LIMIT),
19+ };
20+ }
21+ return item;
22+ });
23+
24+ // Add truncation warning if needed
25+ if (truncatedUrls.length > 0) {
26+ processedItems.push({
27+ name: "URL content truncation warning",
28+ description: "Informs that URL content was truncated",
29+ content: `The content from ${truncatedUrls.join(", ")} was truncated because it exceeded the ${DEFAULT_FETCH_URL_CHAR_LIMIT} character limit. If you need more content, consider fetching specific sections or using a more targeted approach.`,
30+ });
31+ }
32+
33+ return processedItems;
634 };
added core/tools/implementations/fetchUrlContent.vitest.ts +91 −0
@@ -0,0 +1,91 @@
1+import { expect, test, vi } from "vitest";
2+import { fetchUrlContentImpl } from "./fetchUrlContent";
3+
4+vi.mock("../../context/providers/URLContextProvider", () => ({
5+ getUrlContextItems: vi.fn(),
6+}));
7+
8+import { ToolExtras } from "../..";
9+import { getUrlContextItems } from "../../context/providers/URLContextProvider";
10+const mockExtras = {
11+ fetch: vi.fn() as any,
12+ ide: {} as any,
13+} as unknown as ToolExtras;
14+
15+test("fetchUrlContent should not truncate content under character limit", async () => {
16+ const shortContent = "This is a short content";
17+ const mockContextItems = [
18+ {
19+ name: "Test URL",
20+ description: "Test URL description",
21+ content: shortContent,
22+ },
23+ ];
24+
25+ (getUrlContextItems as any).mockResolvedValue(mockContextItems);
26+
27+ const result = await fetchUrlContentImpl(
28+ { url: "https://example.com" },
29+ mockExtras,
30+ );
31+
32+ expect(result).toHaveLength(1);
33+ expect(result[0].content).toBe(shortContent);
34+});
35+
36+test("fetchUrlContent should truncate content exceeding character limit", async () => {
37+ const DEFAULT_FETCH_URL_CHAR_LIMIT = 20000;
38+ // Create a string exceeding the character limit
39+ const longContent = "a".repeat(DEFAULT_FETCH_URL_CHAR_LIMIT + 1000);
40+ const mockContextItems = [
41+ {
42+ name: "Test URL",
43+ description: "Test URL description",
44+ content: longContent,
45+ },
46+ ];
47+
48+ (getUrlContextItems as any).mockResolvedValue(mockContextItems);
49+
50+ const result = await fetchUrlContentImpl(
51+ { url: "https://example.com" },
52+ mockExtras,
53+ );
54+
55+ expect(result).toHaveLength(2); // Original item + warning
56+ expect(result[0].content.length).toBe(DEFAULT_FETCH_URL_CHAR_LIMIT);
57+ expect(result[1].name).toBe("URL content truncation warning");
58+ expect(result[1].content).toContain("was truncated");
59+ expect(result[1].content).toContain("20000 character limit");
60+});
61+
62+test("fetchUrlContent should add truncation warning with multiple truncated items", async () => {
63+ const DEFAULT_FETCH_URL_CHAR_LIMIT = 20000;
64+ // Create strings exceeding the character limit
65+ const longContent1 = "a".repeat(DEFAULT_FETCH_URL_CHAR_LIMIT + 500);
66+ const longContent2 = "b".repeat(DEFAULT_FETCH_URL_CHAR_LIMIT + 1000);
67+ const mockContextItems = [
68+ {
69+ name: "Test URL 1",
70+ description: "Test URL description 1",
71+ content: longContent1,
72+ },
73+ {
74+ name: "Test URL 2",
75+ description: "Test URL description 2",
76+ content: longContent2,
77+ },
78+ ];
79+
80+ (getUrlContextItems as any).mockResolvedValue(mockContextItems);
81+
82+ const result = await fetchUrlContentImpl(
83+ { url: "https://example.com" },
84+ mockExtras,
85+ );
86+
87+ expect(result).toHaveLength(3); // Two original items + warning
88+ expect(result[0].content.length).toBe(DEFAULT_FETCH_URL_CHAR_LIMIT);
89+ expect(result[1].content.length).toBe(DEFAULT_FETCH_URL_CHAR_LIMIT);
90+ expect(result[2].name).toBe("URL content truncation warning");
91+});
modified core/tools/implementations/lsTool.ts +38 −9
@@ -2,30 +2,59 @@
22 import { walkDir } from "../../indexing/walkDir";
33 import { resolveRelativePathInDir } from "../../util/ideUtils";
44
5+export function resolveLsToolDirPath(dirPath: string | undefined) {
6+ if (!dirPath || dirPath === ".") {
7+ return "/";
8+ }
9+ if (dirPath.startsWith(".")) {
10+ return dirPath.slice(1);
11+ }
12+ return dirPath.replace(/\\/g, "/");
13+}
14+
15+const MAX_LS_TOOL_LINES = 200;
16+
517 export const lsToolImpl: ToolImpl = async (args, extras) => {
6- const uri = await resolveRelativePathInDir(args.dirPath, extras.ide);
18+ const dirPath = resolveLsToolDirPath(args?.dirPath);
19+ const uri = await resolveRelativePathInDir(dirPath, extras.ide);
720 if (!uri) {
821 throw new Error(
9- `Directory ${args.dirPath} not found. Make sure to use forward-slash paths. Do not use e.g. "."`,
22+ `Directory ${args.dirPath} not found. Make sure to use forward-slash paths`,
1023 );
1124 }
1225
1326 const entries = await walkDir(uri, extras.ide, {
1427 returnRelativeUrisPaths: true,
1528 include: "both",
16- recursive: args.recursive ?? false,
29+ recursive: args?.recursive ?? false,
1730 });
1831
19- const content =
20- entries.length > 0
21- ? entries.join("\n")
22- : `No files/folders found in ${args.dirPath}`;
32+ const lines = entries.slice(0, MAX_LS_TOOL_LINES);
2333
24- return [
34+ let content =
35+ lines.length > 0
36+ ? lines.join("\n")
37+ : `No files/folders found in ${dirPath}`;
38+
39+ const contextItems = [
2540 {
2641 name: "File/folder list",
27- description: `Files/folders in ${args.dirPath}`,
42+ description: `Files/folders in ${dirPath}`,
2843 content,
2944 },
3045 ];
46+
47+ if (entries.length > MAX_LS_TOOL_LINES) {
48+ let warningContent = `${entries.length - MAX_LS_TOOL_LINES} ls entries were truncated`;
49+ if (args?.recursive) {
50+ warningContent += ". Try using a non-recursive search";
51+ }
52+ contextItems.push({
53+ name: "ls truncation warning",
54+ description: "Informs the model that ls results were truncated",
55+ content: warningContent,
56+ });
57+ }
58+
59+ return contextItems;
3160 };
added core/tools/implementations/lsTool.vitest.ts +96 −0
@@ -0,0 +1,96 @@
1+import { expect, test, vi } from "vitest";
2+import { ToolExtras } from "../..";
3+import * as walkDirModule from "../../indexing/walkDir";
4+import { lsToolImpl, resolveLsToolDirPath } from "./lsTool";
5+
6+vi.mock("../../indexing/walkDir");
7+
8+const mockExtras = {
9+ ide: {
10+ fileExists: async (path: string) => true,
11+ getWorkspaceDirs: async () => ["dir1"],
12+ },
13+} as unknown as ToolExtras;
14+
15+test("resolveLsToolDirPath handles undefined path", () => {
16+ expect(resolveLsToolDirPath(undefined)).toBe("/");
17+});
18+
19+test("resolveLsToolDirPath handles empty string", () => {
20+ expect(resolveLsToolDirPath("")).toBe("/");
21+});
22+
23+test("resolveLsToolDirPath handles dot", () => {
24+ expect(resolveLsToolDirPath(".")).toBe("/");
25+});
26+
27+test("resolveLsToolDirPath handles dot relative", () => {
28+ expect(resolveLsToolDirPath("./hi")).toBe("/hi");
29+});
30+
31+test("resolveLsToolDirPath normalizes backslashes to forward slashes", () => {
32+ expect(resolveLsToolDirPath("path\\to\\dir")).toBe("path/to/dir");
33+});
34+
35+test("resolveLsToolDirPath preserves forward slashes", () => {
36+ expect(resolveLsToolDirPath("path/to/dir")).toBe("path/to/dir");
37+});
38+
39+test("lsToolImpl truncates output when entries exceed MAX_LS_TOOL_LINES", async () => {
40+ // Generate more than MAX_LS_TOOL_LINES entries (which is 200)
41+ const mockEntries = Array.from({ length: 250 }, (_, i) => `file${i}.txt`);
42+
43+ // Mock walkDir to return our large array
44+ vi.spyOn(walkDirModule, "walkDir").mockResolvedValue(mockEntries);
45+
46+ const result = await lsToolImpl(
47+ { dirPath: "testDir", recursive: true },
48+ mockExtras,
49+ );
50+
51+ // Check that the result contains the truncation message
52+ expect(result.length).toBe(2);
53+ expect(result[0].content).toContain("file1.txt");
54+ expect(result[0].content).toContain("file199.txt");
55+ expect(result[1].content).toContain("Try using a non-recursive search");
56+ expect(result[1].content).toContain("50 ls entries were truncated");
57+
58+ // Check that only MAX_LS_TOOL_LINES entries are included
59+ const contentLines = result[0].content.split("\n");
60+ // Account for the truncation message line
61+ expect(contentLines.length).toBe(200);
62+
63+ // Check the suggestion to use non-recursive search is included
64+ expect(result[1].content).toContain("Try using a non-recursive search");
65+});
66+
67+test("lsToolImpl shows truncation message without suggestion for non-recursive search", async () => {
68+ // Generate more than MAX_LS_TOOL_LINES entries
69+ const mockEntries = Array.from({ length: 250 }, (_, i) => `file${i}.txt`);
70+
71+ // Mock walkDir to return our large array
72+ vi.spyOn(walkDirModule, "walkDir").mockResolvedValue(mockEntries);
73+
74+ const result = await lsToolImpl(
75+ { dirPath: "testDir", recursive: false },
76+ mockExtras,
77+ );
78+
79+ // Check that the result contains the truncation message
80+ expect(result.length).toBe(2);
81+ expect(result[1].content).toContain("50 ls entries were truncated");
82+
83+ // Check that the suggestion to use non-recursive search is NOT included
84+ expect(result[1].content).not.toContain("Try using a non-recursive search");
85+});
86+
87+test("lsToolImpl shows message when no files are found", async () => {
88+ // Mock walkDir to return empty array
89+ vi.spyOn(walkDirModule, "walkDir").mockResolvedValue([]);
90+
91+ const result = await lsToolImpl({ dirPath: "emptyDir" }, mockExtras);
92+
93+ // Check that the result contains the "no files found" message
94+ expect(result.length).toBe(1);
95+ expect(result[0].content).toBe("No files/folders found in emptyDir");
96+});
modified core/tools/implementations/searchWeb.ts +30 −2
@@ -1,8 +1,36 @@
1+import { ToolImpl } from ".";
12 import { fetchSearchResults } from "../../context/providers/WebContextProvider";
23
3-import { ToolImpl } from ".";
4+const DEFAULT_WEB_SEARCH_CHAR_LIMIT = 8000;
45
56 export const searchWebImpl: ToolImpl = async (args, extras) => {
67 const webResults = await fetchSearchResults(args.query, 5, extras.fetch);
7- return webResults;
8+
9+ // Track truncated results
10+ const truncatedResults: string[] = [];
11+
12+ // Check and truncate each result
13+ const processedResults = webResults.map((result, index) => {
14+ if (result.content.length > DEFAULT_WEB_SEARCH_CHAR_LIMIT) {
15+ truncatedResults.push(
16+ result.name || result.description || `Result #${index + 1}`,
17+ );
18+ return {
19+ ...result,
20+ content: result.content.substring(0, DEFAULT_WEB_SEARCH_CHAR_LIMIT),
21+ };
22+ }
23+ return result;
24+ });
25+
26+ // Add truncation warning if needed
27+ if (truncatedResults.length > 0) {
28+ processedResults.push({
29+ name: "Web search truncation warning",
30+ description: "Informs that search results were truncated",
31+ content: `The content from the following search results was truncated because it exceeded the ${DEFAULT_WEB_SEARCH_CHAR_LIMIT} character limit: ${truncatedResults.join(", ")}. For more detailed information, consider refining your search query.`,
32+ });
33+ }
34+
35+ return processedResults;
836 };
added core/tools/implementations/searchWeb.vitest.ts +107 −0
@@ -0,0 +1,107 @@
1+import { expect, test, vi } from "vitest";
2+import { searchWebImpl } from "./searchWeb";
3+
4+// Mock the fetchSearchResults function
5+vi.mock("../../context/providers/WebContextProvider", () => ({
6+ fetchSearchResults: vi.fn(),
7+}));
8+const mockExtras = {
9+ fetch: vi.fn() as any,
10+ ide: {} as any,
11+} as unknown as ToolExtras;
12+
13+import { ToolExtras } from "../..";
14+import { fetchSearchResults } from "../../context/providers/WebContextProvider";
15+
16+test("searchWeb should not truncate results under character limit", async () => {
17+ const shortContent = "This is a short search result content";
18+ const mockSearchResults = [
19+ {
20+ name: "Result 1",
21+ description: "Search result description 1",
22+ content: shortContent,
23+ },
24+ {
25+ name: "Result 2",
26+ description: "Search result description 2",
27+ content: shortContent,
28+ },
29+ ];
30+
31+ (fetchSearchResults as any).mockResolvedValue(mockSearchResults);
32+
33+ const result = await searchWebImpl({ query: "test query" }, mockExtras);
34+
35+ expect(result).toHaveLength(2);
36+ expect(result[0].content).toBe(shortContent);
37+ expect(result[1].content).toBe(shortContent);
38+});
39+
40+test("searchWeb should truncate results exceeding character limit", async () => {
41+ const DEFAULT_WEB_SEARCH_CHAR_LIMIT = 8000;
42+ // Create a string exceeding the character limit
43+ const longContent = "a".repeat(DEFAULT_WEB_SEARCH_CHAR_LIMIT + 1000);
44+ const shortContent = "This is a short search result content";
45+ const mockSearchResults = [
46+ {
47+ name: "Result 1",
48+ description: "Search result description 1",
49+ content: longContent,
50+ },
51+ {
52+ name: "Result 2",
53+ description: "Search result description 2",
54+ content: shortContent,
55+ },
56+ ];
57+
58+ (fetchSearchResults as any).mockResolvedValue(mockSearchResults);
59+
60+ const result = await searchWebImpl({ query: "test query" }, mockExtras);
61+
62+ expect(result).toHaveLength(3); // Two results + warning
63+ expect(result[0].content.length).toBe(DEFAULT_WEB_SEARCH_CHAR_LIMIT);
64+ expect(result[1].content).toBe(shortContent);
65+ expect(result[2].name).toBe("Web search truncation warning");
66+ expect(result[2].content).toContain("truncated");
67+ expect(result[2].content).toContain("Result 1");
68+ expect(result[2].content).not.toContain("Result 2");
69+});
70+
71+test("searchWeb should include all truncated results in the warning", async () => {
72+ const DEFAULT_WEB_SEARCH_CHAR_LIMIT = 8000;
73+ // Create strings exceeding the character limit
74+ const longContent1 = "a".repeat(DEFAULT_WEB_SEARCH_CHAR_LIMIT + 500);
75+ const longContent2 = "b".repeat(DEFAULT_WEB_SEARCH_CHAR_LIMIT + 1000);
76+ const shortContent = "This is a short search result content";
77+ const mockSearchResults = [
78+ {
79+ name: "Result 1",
80+ description: "Search result description 1",
81+ content: longContent1,
82+ },
83+ {
84+ name: "Result 2",
85+ description: "Search result description 2",
86+ content: longContent2,
87+ },
88+ {
89+ name: "Result 3",
90+ description: "Search result description 3",
91+ content: shortContent,
92+ },
93+ ];
94+
95+ (fetchSearchResults as any).mockResolvedValue(mockSearchResults);
96+
97+ const result = await searchWebImpl({ query: "test query" }, mockExtras);
98+
99+ expect(result).toHaveLength(4); // Three results + warning
100+ expect(result[0].content.length).toBe(DEFAULT_WEB_SEARCH_CHAR_LIMIT);
101+ expect(result[1].content.length).toBe(DEFAULT_WEB_SEARCH_CHAR_LIMIT);
102+ expect(result[2].content).toBe(shortContent);
103+ expect(result[3].name).toBe("Web search truncation warning");
104+ expect(result[3].content).toContain("Result 1");
105+ expect(result[3].content).toContain("Result 2");
106+ expect(result[3].content).not.toContain("Result 3");
107+});
modified core/tools/implementations/viewDiff.ts +26 −2
@@ -1,15 +1,39 @@
11 import { ToolImpl } from ".";
2+import { ContextItem } from "../..";
23 import { getDiffsFromCache } from "../../autocomplete/snippets/gitDiffCache";
34
5+export const DEFAULT_GIT_DIFF_LINE_LIMIT = 5000;
6+
47 export const viewDiffImpl: ToolImpl = async (args, extras) => {
58 const diffs = await getDiffsFromCache(extras.ide); // const diffs = await extras.ide.getDiff(true);
69 // TODO includeUnstaged should be an option
710
8- return [
11+ const combinedDiff = diffs.join("\n");
12+ const diffLines = combinedDiff.split("\n");
13+
14+ let truncated = false;
15+ let processedDiff = combinedDiff;
16+
17+ if (diffLines.length > DEFAULT_GIT_DIFF_LINE_LIMIT) {
18+ truncated = true;
19+ processedDiff = diffLines.slice(0, DEFAULT_GIT_DIFF_LINE_LIMIT).join("\n");
20+ }
21+
22+ const contextItems: ContextItem[] = [
923 {
1024 name: "Diff",
1125 description: "The current git diff",
12- content: diffs.join("\n"),
26+ content: processedDiff,
1327 },
1428 ];
29+
30+ if (truncated) {
31+ contextItems.push({
32+ name: "Diff truncation warning",
33+ description: "Informs that git diff was truncated",
34+ content: `The git diff was truncated because it exceeded ${DEFAULT_GIT_DIFF_LINE_LIMIT} lines. Consider viewing specific files or focusing on smaller changes.`,
35+ });
36+ }
37+
38+ return contextItems;
1539 };
added core/tools/implementations/viewDiff.vitest.ts +87 −0
@@ -0,0 +1,87 @@
1+import { expect, test, vi } from "vitest";
2+import { DEFAULT_GIT_DIFF_LINE_LIMIT, viewDiffImpl } from "./viewDiff";
3+
4+// Mock the getDiffsFromCache function
5+vi.mock("../../autocomplete/snippets/gitDiffCache", () => ({
6+ getDiffsFromCache: vi.fn(),
7+}));
8+
9+import { ToolExtras } from "../..";
10+import { getDiffsFromCache } from "../../autocomplete/snippets/gitDiffCache";
11+const mockExtras = {
12+ fetch: vi.fn() as any,
13+ ide: {} as any,
14+} as unknown as ToolExtras;
15+
16+test("viewDiff should not truncate diffs under line limit", async () => {
17+ // Create a small diff with just a few lines
18+ const smallDiff = [
19+ "diff --git a/file1.txt b/file1.txt",
20+ "index 1234..5678 100644",
21+ "--- a/file1.txt",
22+ "+++ b/file1.txt",
23+ "@@ -1,3 +1,4 @@",
24+ " line1",
25+ "-line2",
26+ "+line2 modified",
27+ "+line3 added",
28+ ];
29+
30+ (getDiffsFromCache as any).mockResolvedValue(smallDiff);
31+
32+ const result = await viewDiffImpl({}, mockExtras);
33+
34+ expect(result).toHaveLength(1); // Just the diff, no warning
35+ expect(result[0].name).toBe("Diff");
36+ expect(result[0].content).toBe(smallDiff.join("\n"));
37+});
38+
39+test("viewDiff should truncate diffs exceeding line limit", async () => {
40+ // Create a large diff that exceeds the line limit
41+ const largeDiffLines = Array(DEFAULT_GIT_DIFF_LINE_LIMIT + 1000).fill(
42+ "line content",
43+ );
44+ const largeDiff = [
45+ "diff --git a/file1.txt b/file1.txt",
46+ "index 1234..5678 100644",
47+ ...largeDiffLines,
48+ ];
49+
50+ (getDiffsFromCache as any).mockResolvedValue([largeDiff.join("\n")]);
51+
52+ const result = await viewDiffImpl({}, mockExtras);
53+
54+ expect(result).toHaveLength(2); // Diff + warning
55+
56+ // Count the number of lines in the result
57+ const resultLines = result[0].content.split("\n");
58+ expect(resultLines.length).toBe(DEFAULT_GIT_DIFF_LINE_LIMIT);
59+
60+ // Check the warning
61+ expect(result[1].name).toBe("Diff truncation warning");
62+ expect(result[1].content).toContain("truncated");
63+ expect(result[1].content).toContain(`${DEFAULT_GIT_DIFF_LINE_LIMIT} lines`);
64+});
65+
66+test("viewDiff should handle multiple diffs correctly", async () => {
67+ const DEFAULT_GIT_DIFF_LINE_LIMIT = 5000;
68+
69+ // Create multiple diffs that together exceed the line limit
70+ const diff1Lines = Array(3000).fill("diff1 line");
71+ const diff2Lines = Array(3000).fill("diff2 line");
72+ const diff1 = diff1Lines.join("\n");
73+ const diff2 = diff2Lines.join("\n");
74+
75+ (getDiffsFromCache as any).mockResolvedValue([diff1, diff2]);
76+
77+ const result = await viewDiffImpl({}, mockExtras);
78+
79+ expect(result).toHaveLength(2); // Diff + warning
80+
81+ // Count the number of lines in the result
82+ const resultLines = result[0].content.split("\n");
83+ expect(resultLines.length).toBe(DEFAULT_GIT_DIFF_LINE_LIMIT);
84+
85+ // Check the warning
86+ expect(result[1].name).toBe("Diff truncation warning");
87+});
modified core/tools/index.ts +6 −7
@@ -39,14 +39,13 @@
3939 params: ConfigDependentToolParams,
4040 ): Tool[] => [
4141 requestRuleTool(params),
42+ // Search and replace is now generally available
43+ searchAndReplaceInFileTool,
44+ // Keep edit file tool available for models that need it
45+ editFileTool,
4246 ...(params.enableExperimentalTools
43- ? [
44- searchAndReplaceInFileTool,
45- viewRepoMapTool,
46- viewSubdirectoryTool,
47- codebaseTool,
48- ]
49- : [editFileTool]),
47+ ? [viewRepoMapTool, viewSubdirectoryTool, codebaseTool]
48+ : []),
5049 ];
5150
5251 export const getToolsForIde = async (ide: IDE): Promise<Tool[]> =>
deleted docs/docs/advanced/00-overview.mdx +0 −56
@@ -1,56 +0,0 @@
1----
2-title: Overview
3-description: Deep dive into Continue's advanced features, context providers, and configuration options
4-keywords:
5- [advanced, context, providers, model providers, configuration, deep dives]
6----
7-
8-# Advanced Topics
9-
10-Explore Continue's advanced capabilities for power users and complex development scenarios.
11-
12-## Context Providers
13-
14-Master how Continue understands your codebase with powerful context providers for code, documentation, and more.
15-
16-[Explore Context Providers →](./custom-providers)
17-
18-## Context Integration
19-
20-Specialized context features for codebase understanding and documentation integration.
21-
22-[Browse Context Features →](./context/codebase.mdx)
23-
24-## Deep Dives
25-
26-Detailed technical explanations of Continue's internal workings and advanced configuration options.
27-
28-[Read Deep Dives →](./deep-dives/configuration.md)
29-
30-## Model Providers
31-
32-Configure and optimize different AI model providers for your specific needs and infrastructure.
33-
34-[Configure Providers →](./model-providers/top-level/openai.mdx)
35-
36-## Model Roles
37-
38-Understand how different models can be assigned specific roles in your development workflow.
39-
40-[Learn Model Roles →](./model-roles/00-intro.mdx)
41-
42-## Reference
43-
44-Complete configuration reference and API documentation.
45-
46-[View Reference →](/reference)
47-
48-## Troubleshooting
49-
50-Solutions to common issues and debugging techniques.
51-
52-[Get Help →](/troubleshooting)
53-
54----
55-
56-These advanced topics help you get the most out of Continue in complex development environments.
deleted docs/docs/advanced/context/_category_.json +0 −4
@@ -1,4 +0,0 @@
1-{
2- "label": "Context",
3- "position": 2
4-}
deleted docs/docs/advanced/context/codebase.mdx +0 −99
@@ -1,99 +0,0 @@
1----
2-description: Talk to your codebase
3-keywords: [talk, embeddings, reranker, codebase, experimental]
4----
5-
6-import TabItem from "@theme/TabItem";
7-import Tabs from "@theme/Tabs";
8-
9-# @Codebase
10-
11-Continue indexes your codebase so that it can later automatically pull in the most relevant context from throughout your workspace. This is done via a combination of embeddings-based retrieval and keyword search. By default, all embeddings are calculated locally using `transformers.js` and stored locally in `~/.continue/index`.
12-
13-:::info[`transformers.js cannot be used in JetBrains`]
14-Currently, `transformers.js` cannot be used in JetBrains IDEs. However, you can select a differet embeddings model from [the list here](../model-roles/embeddings.mdx).
15-:::
16-
17-Currently, the codebase retrieval feature is available as the "codebase" and "folder" context providers. You can use them by typing `@Codebase` or `@Folder` in the input box, and then asking a question. The contents of the input box will be compared with the embeddings from the rest of the codebase (or folder) to determine relevant files.
18-
19-Here are some common use cases where it can be useful:
20-
21-- Asking high-level questions about your codebase
22- - "How do I add a new endpoint to the server?"
23- - "Do we use VS Code's CodeLens feature anywhere?"
24- - "Is there any code written already to convert HTML to markdown?"
25-- Generate code using existing samples as reference
26- - "Generate a new React component with a date picker, using the same patterns as existing components"
27- - "Write a draft of a CLI application for this project using Python's argparse"
28- - "Implement the `foo` method in the `bar` class, following the patterns seen in other subclasses of `baz`.
29-- Use `@Folder` to ask questions about a specific folder, increasing the likelihood of relevant results
30- - "What is the main purpose of this folder?"
31- - "How do we use VS Code's CodeLens API?"
32- - Or any of the above examples, but with `@Folder` instead of `@Codebase`
33-
34-Here are use cases where it is not useful:
35-
36-- When you need the LLM to see _literally every_ file in your codebase
37- - "Find everywhere where the `foo` function is called"
38- - "Review our codebase and find any spelling mistakes"
39-- Refactoring
40- - "Add a new parameter to the `bar` function and update usages"
41-
42-## Configuration
43-
44-There are a few options that let you configure the behavior of the `@codebase` context provider, which are the same for the `@folder` context provider:
45-
46-<Tabs groupId="config-example">
47- <TabItem value="yaml" label="YAML">
48- ```yaml title="config.yaml"
49- context:
50- - provider: codebase
51- params:
52- nRetrieve: 25
53- nFinal: 5
54- useReranking: true
55- ```
56- </TabItem>
57- <TabItem value="json" label="JSON">
58- ```json title="config.json"
59- {
60- "contextProviders": [
61- {
62- "name": "codebase",
63- "params": {
64- "nRetrieve": 25,
65- "nFinal": 5,
66- "useReranking": true
67- }
68- }
69- ]
70- }
71- ```
72- </TabItem>
73-</Tabs>
74-
75-### `nRetrieve`
76-
77-Number of results to initially retrieve from vector database (default: 25)
78-
79-### `nFinal`
80-
81-Final number of results to use after re-ranking (default: 5)
82-
83-### `useReranking`
84-
85-Whether to use re-ranking, which will allow initial selection of `nRetrieve` results, then will use an LLM to select the top `nFinal` results (default: true)
86-
87-## Ignore files during indexing
88-
89-Continue respects `.gitignore` files in order to determine which files should not be indexed. If you'd like to exclude additional files, you can add them to a `.continueignore` file, which follows the exact same rules as `.gitignore`.
90-
91-Continue also supports a **global** `.continueignore` file that will be respected for all workspaces, which can be created at `~/.continue/.continueignore`.
92-
93-If you want to see exactly what files Continue has indexed, the metadata is stored in `~/.continue/index/index.sqlite`. You can use a tool like [DB Browser for SQLite](https://sqlitebrowser.org/) to view the `tag_catalog` table within this file.
94-
95-If you need to force a refresh of the index, reload the VS Code window with <kbd>cmd/ctrl</kbd> + <kbd>shift</kbd> + <kbd>p</kbd> + "Reload Window".
96-
97-## Repository map
98-
99-Models in the Claude 3, Llama 3.1/3.2, Gemini 1.5, and GPT-4o families will automatically use a [repository map](../custom-providers.mdx#repository-map) during codebase retrieval, which allows the model to understand the structure of your codebase and use it to answer questions. Currently, the repository map only contains the filepaths in the codebase.
deleted docs/docs/advanced/context/documentation.mdx +0 −408
@@ -1,408 +0,0 @@
1----
2-description: Learn how to access and search your project's documentation directly within Continue
3-keywords:
4- [
5- documentation,
6- indexing,
7- context provider,
8- embeddings,
9- docs,
10- embedder,
11- embeddings provider,
12- documentation,
13- ]
14-toc_max_heading_level: 5
15----
16-
17-import TabItem from "@theme/TabItem";
18-import Tabs from "@theme/Tabs";
19-
20-# @Docs
21-
22-The [`@Docs` context provider](../custom-providers#docs) allows you to efficiently reference documentation directly within Continue.
23-
24-## Enabling the `@Docs` context provider
25-
26-To enable the `@Docs` context provider, add it to the list of context providers in your `config.json` file.
27-
28-<Tabs groupId="config-example">
29- <TabItem value="yaml" label="YAML">
30- ```yaml title="config.yaml"
31- context:
32- - provider: docs
33- ```
34- </TabItem>
35- <TabItem value="json" label="JSON">
36- ```json title="config.json"
37- {
38- "contextProviders": [
39- {
40- "name": "docs"
41- }
42- ]
43- }
44- ```
45- </TabItem>
46-</Tabs>
47-
48-## How It Works
49-
50-The `@Docs` context provider works by
51-
52-1. Crawling specified documentation sites
53-2. Generating embeddings for the chunked content
54-3. Storing the embeddings locally on your machine
55-4. Embedding chat input to include similar documentation chunks as context
56-
57-## Indexing Your Own Documentation
58-
59-### Hub `docs` Blocks
60-
61-@Docs uses [`docs` blocks](../../hub/blocks/block-types.md#docs) in Assistants from the hub. Visit the hub to [explore `docs` blocks](https://hub.continue.dev/explore/docs) or [create your own](https://hub.continue.dev/new?type=block&blockType=docs).
62-
63-### Through the `@Docs` Context Provider
64-
65-To add a single documentation site, we recommend using the **Add Documentation** Form within the GUI. This can be accessed
66-
67-- from the `@Docs` context provider - type `@Docs` in the chat, hit `Enter`, and search for `Add Docs`
68-- from the `More` page (three dots icon) in the `@docs indexes` section
69- the `@Docs` context provider.
70-
71-In the **Add Documentation** Form, enter a `Title` and `Start URL` for the site.
72-
73-- `Title`: The name of the documentation site, used for identification in the UI.
74-- `Start URL`: The URL where the indexing process should begin.
75-
76-Indexing will begin upon submission. Progress can be viewed in the form or later in the `@docs indexes` section of the `More` page.
77-
78-Documentation sources may be suggested based on package files in your repo. This currently works for Python `requirements.txt` files and Node.js (Javascript/Typescript) `package.json` files.
79-
80-- Packages with a valid documentation URL (with a `+` icon) can be clicked to immediately kick off indexing
81-- Packages with partial information (with a pen icon) can be clicked to fill the form with the available information
82-- Note that you can hover over the information icon to see where the package suggestion was found.
83-
84-![Add documentation form](/img/docs-form.png)
85-
86-### In a configuration file
87-
88-For bulk documentation site adds or edits, we recommend editing your global configuration file directly. Documentation sites are stored in an array within `docs` in your global configuration, as follows:
89-
90-<Tabs groupId="config-example">
91- <TabItem value="yaml" label="YAML">
92- ```yaml title="config.yaml"
93- docs:
94- - title: Nest.js
95- startUrl: https://docs.nestjs.com/
96- faviconUrl: https://docs.nestjs.com/favicon.ico
97- ```
98- </TabItem>
99- <TabItem value="json" label="JSON">
100- ```json title="config.json"
101- {
102- "docs": [
103- {
104- "title": "Nest.js",
105- "startUrl": "https://docs.nestjs.com/",
106- "faviconUrl": "https://docs.nestjs.com/favicon.ico"
107- }
108- ]
109- }
110- ```
111- </TabItem>
112-</Tabs>
113-
114-See [the config reference](/reference) for all documentation site configuration options.
115-
116-Indexing will re-sync upon saving the configuration file.
117-
118-## Configuration
119-
120-### Using Your Embeddings Provider
121-
122-If you have set up an [embeddings provider](../model-roles/embeddings.mdx), @docs will use your embeddings provider. Switching embeddings providers will trigger a re-index of all documentation sites in your configuration.
123-
124-### Reranking
125-
126-As with [@Codebase context provider configuration](./codebase#configuration), you can adjust the reranking behavior of the `@Docs` context provider with the `nRetrieve`, `nFinal`, and `useReranking`.
127-
128-<Tabs groupId="config-example">
129- <TabItem value="yaml" label="YAML">
130- ```yaml title="config.yaml"
131- context:
132- - provider: docs
133- params:
134- nRetrieve: 25 # The number of docs to retrieve from the embeddings query
135- nFinal: 5 # The number of docs chunks to return IF reranking
136- useReranking: true # use reranking if a reranker is configured (defaults to true)
137- ```
138- </TabItem>
139- <TabItem value="json" label="JSON">
140- ```json title="config.json"
141- {
142- "contextProviders": [
143- {
144- "name": "docs",
145- "params": {
146- "nRetrieve": 25, // The number of docs to retrieve from the embeddings query
147- "nFinal": 5, // The number of docs chunks to return IF reranking
148- "useReranking": true // use reranking if a reranker is configured (defaults to true)
149- }
150- }
151- ]
152- }
153- ```
154- </TabItem>
155-</Tabs>
156-
157-### GitHub
158-
159-The GitHub API rate limits public requests to 60 per hour. If you want to reliably index GitHub repos, you can add a github token to your config file:
160-
161-<Tabs groupId="config-example">
162- <TabItem value="yaml" label="YAML">
163- ```yaml title="config.yaml"
164- context:
165- - provider: docs
166- params:
167- githubToken: <GITHUB_TOKEN>
168- ```
169- </TabItem>
170- <TabItem value="json" label="JSON">
171- ```json title="config.json"
172- {
173- "contextProviders": [
174- {
175- "name": "docs",
176- "params": {
177- "githubToken": "github_..."
178- }
179- }
180- ]
181- }
182- ```
183- </TabItem>
184-</Tabs>
185-
186-### Local Crawling
187-
188-By default, Continue crawls documentation sites using a specialized crawling service that provides the best experience for most users and documentation sites.
189-
190-If your documentation is private, you can skip the default crawler and use a local crawler instead by setting `useLocalCrawling` to `true`.
191-
192-<Tabs groupId="config-example">
193- <TabItem value="yaml" label="YAML">
194- ```yaml title="config.yaml"
195- docs:
196- - title: My Private Docs
197- startUrl: http://10.2.1.2/docs
198- faviconUrl: http://10.2.1.2/docs/assets/favicon.ico,
199- useLocalCrawling: true
200- ```
201- </TabItem>
202- <TabItem value="json" label="JSON">
203- ```json title="config.json"
204- {
205- "docs": [
206- {
207- "title": "My Private Docs",
208- "startUrl": "http://10.2.1.2/docs",
209- "faviconUrl": "http://10.2.1.2/docs/assets/favicon.ico",
210- "useLocalCrawling": true
211- }
212- ]
213- }
214- ```
215- </TabItem>
216-</Tabs>
217-
218-:::info
219-Chromium crawling has been deprecated
220-{/* The default local crawler is a lightweight tool that cannot render sites that are dynamically generated using JavaScript. If your sites need to be rendered, you can enable the experimental `Use Chromium for Docs Crawling` feature from your [User Settings Page](../deep-dives/settings.md) This will download and install Chromium to `~/.continue/.utils`, and use it as the local crawler. */}
221-:::
222-
223-Further notes:
224-
225-- If the site is only locally accessible, the default crawler will fail anyways and fall back to the local crawler. `useLocalCrawling` is especially useful if the URL itself is confidential.
226-- For GitHub Repos this has no effect because only the GitHub Crawler will be used, and if the repo is private it can only be accessed with a priveleged GitHub token anyways.
227-
228-## Managing your docs indexes
229-
230-You can view indexing statuses and manage your documentation sites from the `@docs indexes` section of the `More` page (three dots)
231-
232-- Continue does not automatically re-index your docs. Use `Click to re-index` to trigger a reindex for a specific source
233-- While a site is indexing, click `Cancel indexing` to cancel the process
234-- Failed indexing attempts will show an error status bar and icon
235-- Delete a documentation site from your configuration using the trash icon
236-
237-![More Page @docs indexes section](/img/docs-indexes.png)
238-
239-You can also view the overall status of currently indexing docs from a hideable progress bar at the bottom of the chat page
240-
241-![Documentation indexing peek](/img/docs-indexing-peek.png)
242-
243-You can also use the following IDE command to force a re-index of all docs: `Continue: Docs Force Re-Index`.
244-
245-## Examples
246-
247-### VS Code minimal setup
248-
249-The following configuration example works out of the box for VS Code. This uses the built-in embeddings provider with no reranking.
250-
251-<Tabs groupId="config-example">
252- <TabItem value="yaml" label="YAML">
253- ```yaml title="config.yaml"
254- context:
255- - provider: docs
256-
257- docs:
258- - title: Nest.js
259- startUrl: https://docs.nestjs.com/
260- ```
261- </TabItem>
262- <TabItem value="json" label="JSON">
263- ```json title="config.json"
264- {
265- "contextProviders": [
266- {
267- "name": "docs",
268- }
269- ],
270- "docs": [
271- {
272- "title": "Nest.js",
273- "startUrl": "https://docs.nestjs.com/",
274- },
275- ]
276- }
277- ```
278- </TabItem>
279-</Tabs>
280-
281-### Jetbrains minimal setup
282-
283-Here is the equivalent minimal example for Jetbrains, which requires setting up an [embeddings provider](../model-roles/embeddings.mdx).
284-
285-<Tabs groupId="config-example">
286- <TabItem value="yaml" label="YAML">
287- ```yaml title="config.yaml"
288- models:
289- - name: LMStudio embedder
290- provider: lmstudio
291- model: nomic-ai/nomic-embed-text-v1.5-GGUF
292- roles:
293- - embed
294- context:
295- - provider: docs
296- docs:
297- - title: Nest.js
298- startUrl: https://docs.nestjs.com/
299- ```
300- </TabItem>
301- <TabItem value="json" label="JSON">
302- ```json title="config.json"
303- {
304- "contextProviders": [
305- {
306- "name": "docs",
307- }
308- ],
309- "docs": [
310- {
311- "title": "Nest.js",
312- "startUrl": "https://docs.nestjs.com/",
313- },
314- ],
315- "embeddingsProvider": {
316- "provider": "lmstudio",
317- "model": "nomic-ai/nomic-embed-text-v1.5-GGUF"
318- }
319- }
320- ```
321- </TabItem>
322-</Tabs>
323-
324-### Full-power setup (VS Code or Jetbrains)
325-
326-The following configuration example includes:
327-
328-- Examples of both public and private documentation sources
329-- A custom embeddings provider
330-- A reranker model available, with reranking parameters customized
331-- A GitHub token to enable GitHub crawling
332-
333-<Tabs groupId="config-example">
334- <TabItem value="yaml" label="YAML">
335- ```yaml title="config.yaml"
336- models:
337- - name: LMStudio Nomic Text
338- provider: lmstudio
339- model: nomic-ai/nomic-embed-text-v1.5-GGUF
340- roles:
341- - embed
342- - name: Voyage Rerank-2
343- provider: voyage
344- apiKey: <VOYAGE_API_KEY>
345- model: rerank-2
346- roles:
347- - rerank
348- context:
349- - provider: docs
350- params:
351- githubToken: <GITHUB_TOKEN>
352- nRetrieve: 25
353- nFinal: 5
354- useReranking: true
355- docs:
356- - title: Nest.js
357- startUrl: https://docs.nestjs.com/
358- - title: My Private Docs
359- startUrl: http://10.2.1.2/docs
360- faviconUrl: http://10.2.1.2/docs/assets/favicon.ico
361- maxDepth: 4
362- useLocalCrawling: true
363- ```
364- </TabItem>
365- <TabItem value="json" label="JSON">
366- ```json title="config.json"
367- {
368- "contextProviders": [
369- {
370- "name": "docs",
371- "params": {
372- "githubToken": "github_...",
373- "nRetrieve": 25,
374- "nFinal": 5,
375- "useReranking": true
376- }
377- }
378- ],
379- "docs": [
380- {
381- "title": "Nest.js",
382- "startUrl": "https://docs.nestjs.com/"
383- },
384- {
385- "title": "My Private Docs",
386- "startUrl": "http://10.2.1.2/docs",
387- "faviconUrl": "http://10.2.1.2/docs/assets/favicon.ico",
388- "maxDepth": 4,
389- "useLocalCrawling": true
390- }
391- ],
392- "reranker": {
393- "name": "voyage",
394- "params": {
395- "model": "rerank-2",
396- "apiKey": "<YOUR_VOYAGE_API_KEY>"
397- }
398- },
399- "embeddingsProvider": {
400- "provider": "lmstudio",
401- "model": "nomic-ai/nomic-embed-text-v1.5-GGUF"
402- }
403- }
404- ```
405- </TabItem>
406-</Tabs>
407-
408-{/* This could also involve enabling Chromium as a backup for local documentation the [User Settings Page](../deep-dives/settings.md). */}
deleted docs/docs/advanced/custom-providers.mdx +0 −1059
@@ -1,1059 +0,0 @@
1----
2-title: Context Providers
3-description: Type '@' to select content to the LLM as context
4-keywords: [context, "@", provider, LLM]
5----
6-
7-import TabItem from "@theme/TabItem";
8-import Tabs from "@theme/Tabs";
9-
10-Context Providers allow you to type '@' and see a dropdown of content that can all be fed to the LLM as context. Every context provider is a plugin, which means if you want to reference some source of information that you don't see here, you can request (or build!) a new context provider.
11-
12-As an example, say you are working on solving a new GitHub Issue. You type '@Issue' and select the one you are working on. Continue can now see the issue title and contents. You also know that the issue is related to the files 'readme.md' and 'helloNested.py', so you type '@readme' and '@hello' to find and select them. Now these 3 "Context Items" are displayed inline with the rest of your input.
13-
14-![Context Items](/img/context-provider-example.png)
15-
16-## Context blocks
17-
18-You can add context providers to assistants using [`context` blocks](../hub/blocks/block-types.md#context). Explore available context blocks in [the hub](https://hub.continue.dev/explore/context).
19-
20-## Built-in Context Providers
21-
22-You can add any built-in context-providers in your config file as shown below:
23-
24-### `@File`
25-
26-Reference any file in your current workspace.
27-
28-<Tabs groupId="config-example">
29- <TabItem value="yaml" label="YAML">
30- ```yaml title="config.yaml"
31- context:
32- - provider: file
33- ```
34- </TabItem>
35- <TabItem value="json" label="JSON">
36- ```json title="config.json"
37- {
38- "contextProviders": [
39- {
40- "name": "file"
41- }
42- ]
43- }
44- ```
45- </TabItem>
46-</Tabs>
47-
48-### `@Code`
49-
50-Reference specific functions or classes from throughout your project.
51-
52-<Tabs groupId="config-example">
53- <TabItem value="yaml" label="YAML">
54- ```yaml title="config.yaml"
55- context:
56- - provider: code
57- ```
58- </TabItem>
59- <TabItem value="json" label="JSON">
60- ```json title="config.json"
61- {
62- "contextProviders": [
63- {
64- "name": "code"
65- }
66- ]
67- }
68- ```
69- </TabItem>
70-</Tabs>
71-
72-### `@Git Diff`
73-
74-Reference all of the changes you've made to your current branch. This is useful if you want to summarize what you've done or ask for a general review of your work before committing.
75-
76-<Tabs groupId="config-example">
77- <TabItem value="yaml" label="YAML">
78- ```yaml title="config.yaml"
79- context:
80- - provider: diff
81- ```
82- </TabItem>
83- <TabItem value="json" label="JSON">
84- ```json title="config.json"
85- {
86- "contextProviders": [
87- {
88- "name": "diff"
89- }
90- ]
91- }
92- ```
93- </TabItem>
94-</Tabs>
95-
96-### `@Current File`
97-
98-Reference the currently open file.
99-
100-<Tabs groupId="config-example">
101- <TabItem value="yaml" label="YAML">
102- ```yaml title="config.yaml"
103- context:
104- - provider: currentFile
105- ```
106- </TabItem>
107- <TabItem value="json" label="JSON">
108- ```json title="config.json"
109- {
110- "contextProviders": [
111- {
112- "name": "currentFile"
113- }
114- ]
115- }
116- ```
117- </TabItem>
118-</Tabs>
119-
120-### `@Terminal`
121-
122-Reference the last command you ran in your IDE's terminal and its output.
123-
124-<Tabs groupId="config-example">
125- <TabItem value="yaml" label="YAML">
126- ```yaml title="config.yaml"
127- context:
128- - provider: terminal
129- ```
130- </TabItem>
131- <TabItem value="json" label="JSON">
132- ```json title="config.json"
133- {
134- "contextProviders": [
135- {
136- "name": "terminal"
137- }
138- ]
139- }
140- ```
141- </TabItem>
142-</Tabs>
143-
144-### `@Docs`
145-
146-Reference the contents from any documentation site.
147-
148-<Tabs groupId="config-example">
149- <TabItem value="yaml" label="YAML">
150- ```yaml title="config.yaml"
151- context:
152- - provider: docs
153- ```
154- </TabItem>
155- <TabItem value="json" label="JSON">
156- ```json title="config.json"
157- {
158- "contextProviders": [
159- {
160- "name": "docs"
161- }
162- ]
163- }
164- ```
165- </TabItem>
166-</Tabs>
167-
168-Note that this will only enable the `@Docs` context provider.
169-
170-To use it, you need to add a documentation site to your config file. See the [docs](./context/documentation.mdx) page for more information.
171-
172-### `@Open`
173-
174-Reference the contents of all of your open files. Set `onlyPinned` to `true` to only reference pinned files.
175-
176-<Tabs groupId="config-example">
177- <TabItem value="yaml" label="YAML">
178- ```yaml title="config.yaml"
179- context:
180- - provider: open
181- params:
182- onlyPinned: true
183- ```
184- </TabItem>
185- <TabItem value="json" label="JSON">
186- ```json title="config.json"
187- {
188- "contextProviders": [
189- {
190- "name": "open",
191- "params": {
192- "onlyPinned": true
193- }
194- }
195- ]
196- }
197- ```
198- </TabItem>
199-</Tabs>
200-
201-### `@Web`
202-
203-Reference relevant pages from across the web, automatically determined from your input.
204-
205-Optionally, set `n` to limit the number of results returned (default 6).
206-
207-<Tabs groupId="config-example">
208- <TabItem value="yaml" label="YAML">
209- ```yaml title="config.yaml"
210- context:
211- - provider: web
212- params:
213- n: 5
214- ```
215- </TabItem>
216- <TabItem value="json" label="JSON">
217- ```json title="config.json"
218- {
219- "contextProviders": [
220- {
221- "name": "web",
222- "params": {
223- "n": 5
224- }
225- }
226- ]
227- }
228- ```
229- </TabItem>
230-</Tabs>
231-
232-### `@Codebase`
233-
234-Reference the most relevant snippets from your codebase.
235-
236-<Tabs groupId="config-example">
237- <TabItem value="yaml" label="YAML">
238- ```yaml title="config.yaml"
239- context:
240- - provider: codebase
241- ```
242- </TabItem>
243- <TabItem value="json" label="JSON">
244- ```json title="config.json"
245- {
246- "contextProviders": [
247- {
248- "name": "codebase"
249- }
250- ]
251- }
252- ```
253- </TabItem>
254-</Tabs>
255-
256-Read more about indexing and retrieval [here](./context/codebase.mdx).
257-
258-### `@Folder`
259-
260-Uses the same retrieval mechanism as `@Codebase`, but only on a single folder.
261-
262-<Tabs groupId="config-example">
263- <TabItem value="yaml" label="YAML">
264- ```yaml title="config.yaml"
265- context:
266- - provider: folder
267- ```
268- </TabItem>
269- <TabItem value="json" label="JSON">
270- ```json title="config.json"
271- {
272- "contextProviders": [
273- {
274- "name": "folder"
275- }
276- ]
277- }
278- ```
279- </TabItem>
280-</Tabs>
281-
282-### `@Search`
283-
284-Reference the results of codebase search, just like the results you would get from VS Code search.
285-
286-<Tabs groupId="config-example">
287- <TabItem value="yaml" label="YAML">
288- ```yaml title="config.yaml"
289- context:
290- - provider: search
291- params:
292- maxResults: 100 # optional, defaults to 200
293- ```
294- </TabItem>
295- <TabItem value="json" label="JSON">
296- ```json title="config.json"
297- {
298- "contextProviders": [
299- {
300- "name": "search",
301- "params": {
302- "maxResults": 100 // optional, defaults to 200
303- }
304- }
305- ]
306- }
307- ```
308- </TabItem>
309-</Tabs>
310-
311-This context provider is powered by [ripgrep](https://github.com/BurntSushi/ripgrep).
312-
313-### `@Url`
314-
315-Reference the markdown converted contents of a given URL.
316-
317-<Tabs groupId="config-example">
318- <TabItem value="yaml" label="YAML">
319- ```yaml title="config.yaml"
320- context:
321- - provider: url
322- ```
323- </TabItem>
324- <TabItem value="json" label="JSON">
325- ```json title="config.json"
326- {
327- "contextProviders": [
328- {
329- "name": "url"
330- }
331- ]
332- }
333- ```
334- </TabItem>
335-</Tabs>
336-
337-### `@Clipboard`
338-
339-Reference recent clipboard items
340-
341-<Tabs groupId="config-example">
342- <TabItem value="yaml" label="YAML">
343- ```yaml title="config.yaml"
344- context:
345- - provider: clipboard
346- ```
347- </TabItem>
348- <TabItem value="json" label="JSON">
349- ```json title="config.json"
350- {
351- "contextProviders": [
352- {
353- "name": "clipboard"
354- }
355- ]
356- }
357- ```
358- </TabItem>
359-</Tabs>
360-
361-### `@Tree`
362-
363-Reference the structure of your current workspace.
364-
365-<Tabs groupId="config-example">
366- <TabItem value="yaml" label="YAML">
367- ```yaml title="config.yaml"
368- context:
369- - provider: tree
370- ```
371- </TabItem>
372- <TabItem value="json" label="JSON">
373- ```json title="config.json"
374- {
375- "contextProviders": [
376- {
377- "name": "tree"
378- }
379- ]
380- }
381- ```
382- </TabItem>
383-</Tabs>
384-
385-### `@Problems`
386-
387-Get Problems from the current file.
388-
389-<Tabs groupId="config-example">
390- <TabItem value="yaml" label="YAML">
391- ```yaml title="config.yaml"
392- context:
393- - provider: problems
394- ```
395- </TabItem>
396- <TabItem value="json" label="JSON">
397- ```json title="config.json"
398- {
399- "contextProviders": [
400- {
401- "name": "problems"
402- }
403- ]
404- }
405- ```
406- </TabItem>
407-</Tabs>
408-
409-### `@Debugger`
410-
411-Reference the contents of the local variables in the debugger. Currently only available in VS Code.
412-
413-<Tabs groupId="config-example">
414- <TabItem value="yaml" label="YAML">
415- ```yaml title="config.yaml"
416- context:
417- - provider: debugger
418- params:
419- stackDepth: 3
420- ```
421- </TabItem>
422- <TabItem value="json" label="JSON">
423- ```json title="config.json"
424- {
425- "contextProviders": [
426- {
427- "name": "debugger",
428- "params": {
429- "stackDepth": 3
430- }
431- }
432- ]
433- }
434- ```
435- </TabItem>
436-</Tabs>
437-
438-Uses the top _n_ levels (defaulting to 3) of the call stack for that thread.
439-
440-### `@Repository Map`
441-
442-Reference the outline of your codebase. By default, signatures are included along with file in the repo map.
443-
444-`includeSignatures` params can be set to false to exclude signatures. This could be necessary for large codebases and/or to reduce context size significantly. Signatures will not be included if indexing is disabled.
445-
446-<Tabs groupId="config-example">
447- <TabItem value="yaml" label="YAML">
448- ```yaml title="config.yaml"
449- context:
450- - provider: repo-map
451- params:
452- includeSignatures: false # default true
453- ```
454- </TabItem>
455- <TabItem value="json" label="JSON">
456- ```json title="config.json"
457- {
458- "contextProviders": [
459- {
460- "name": "repo-map",
461- "params": {
462- "includeSignatures": false // default true
463- }
464- }
465- ]
466- }
467- ```
468- </TabItem>
469-</Tabs>
470-
471-Provides a list of files and the call signatures of top-level classes, functions, and methods in those files. This helps the model better understand how a particular piece of code relates to the rest of the codebase.
472-
473-In the submenu that appears, you can select either `Entire codebase`, or specify a subfolder to generate the repostiory map from.
474-
475-This context provider is inpsired by [Aider's repository map](https://aider.chat/2023/10/22/repomap.html).
476-
477-### `@Operating System`
478-
479-Reference the architecture and platform of your current operating system.
480-
481-<Tabs groupId="config-example">
482- <TabItem value="yaml" label="YAML">
483- ```yaml title="config.yaml"
484- context:
485- - provider: os
486- ```
487- </TabItem>
488- <TabItem value="json" label="JSON">
489- ```json title="config.json"
490- {
491- "contextProviders": [
492- {
493- "name": "os"
494- }
495- ]
496- }
497- ```
498- </TabItem>
499-</Tabs>
500-
501-### Model Context Protocol
502-
503-The [Model Context Protocol](https://modelcontextprotocol.io/introduction) is a standard proposed by Anthropic to unify prompts, context, and tool use. Continue supports any MCP server with the MCP context provider. Read their [quickstart](https://modelcontextprotocol.io/quickstart) to learn how to set up a local server and then set up your configuration like this:
504-
505-<Tabs groupId="config-example">
506- <TabItem value="yaml" label="YAML">
507- ```yaml title="config.yaml"
508- mcpServers:
509- - name: My MCP Server
510- command: uvx
511- args:
512- - mcp-server-sqlite
513- - --db-path
514- - /Users/NAME/test.db
515- ```
516- </TabItem>
517- <TabItem value="json" label="JSON">
518- ```json title="config.json"
519- {
520- "experimental": {
521- "modelContextProtocolServers": [
522- {
523- "transport": {
524- "type": "stdio",
525- "command": "uvx",
526- "args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"]
527- }
528- }
529- ]
530- }
531- }
532- ```
533- </TabItem>
534-</Tabs>
535-
536-You'll then be able to type "@" and see "MCP" in the context providers dropdown.
537-
538-### `@Issue`
539-
540-Reference the conversation in a GitHub issue.
541-
542-<Tabs groupId="config-example">
543- <TabItem value="yaml" label="YAML">
544- ```yaml title="config.yaml"
545- context:
546- - provider: issue
547- params:
548- repos:
549- - owner: continuedev
550- repo: continue
551- githubToken: ghp_xxx
552- ```
553- </TabItem>
554- <TabItem value="json" label="JSON">
555- ```json title="config.json"
556- {
557- "contextProviders": [
558- {
559- "name": "issue",
560- "params": {
561- "repos": [
562- {
563- "owner": "continuedev",
564- "repo": "continue"
565- }
566- ],
567- "githubToken": "ghp_xxx"
568- }
569- }
570- ]
571- }
572- ```
573- </TabItem>
574-</Tabs>
575-
576-Make sure to include your own [GitHub personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token) to avoid being rate-limited.
577-
578-### `@Database`
579-
580-Reference table schemas from Sqlite, Postgres, MSSQL, and MySQL databases.
581-
582-<Tabs groupId="config-example">
583- <TabItem value="yaml" label="YAML">
584- ```yaml title="config.yaml"
585- context:
586- - provider: database
587- params:
588- connections:
589- - name: examplePostgres
590- connection_type: postgres
591- connection:
592- user: username
593- host: localhost
594- database: exampleDB
595- password: yourPassword
596- port: 5432
597- - name: exampleMssql
598- connection_type: mssql
599- connection:
600- user: username
601- server: localhost
602- database: exampleDB
603- password: yourPassword
604- - name: exampleSqlite
605- connection_type: sqlite
606- connection:
607- filename: /path/to/your/sqlite/database.db
608- ```
609- </TabItem>
610- <TabItem value="json" label="JSON">
611- ```json title="config.json"
612- {
613- "contextProviders": [
614- {
615- "name": "database",
616- "params": {
617- "connections": [
618- {
619- "name": "examplePostgres",
620- "connection_type": "postgres",
621- "connection": {
622- "user": "username",
623- "host": "localhost",
624- "database": "exampleDB",
625- "password": "yourPassword",
626- "port": 5432
627- }
628- },
629- {
630- "name": "exampleMssql",
631- "connection_type": "mssql",
632- "connection": {
633- "user": "username",
634- "server": "localhost",
635- "database": "exampleDB",
636- "password": "yourPassword"
637- }
638- },
639- {
640- "name": "exampleSqlite",
641- "connection_type": "sqlite",
642- "connection": {
643- "filename": "/path/to/your/sqlite/database.db"
644- }
645- }
646- ]
647- }
648- }
649- ]
650- }
651- ```
652- </TabItem>
653-</Tabs>
654-
655-Each connection should include a unique name, the `connection_type`, and the necessary connection parameters specific to each database type.
656-
657-Available connection types:
658-
659-- `postgres`
660-- `mysql`
661-- `sqlite`
662-
663-### `@Postgres`
664-
665-Reference the schema of a table, and some sample rows
666-
667-<Tabs groupId="config-example">
668- <TabItem value="yaml" label="YAML">
669- ```yaml title="config.yaml"
670- context:
671- - provider: postgres
672- params:
673- host: localhost
674- port: 5436
675- user: myuser
676- password: catsarecool
677- database: animals
678- schema: public
679- sampleRows: 3
680- ```
681- </TabItem>
682- <TabItem value="json" label="JSON">
683- ```json title="config.json"
684- {
685- "contextProviders": [
686- {
687- "name": "postgres",
688- "params": {
689- "host": "localhost",
690- "port": 5436,
691- "user": "myuser",
692- "password": "catsarecool",
693- "database": "animals",
694- "schema": "public",
695- "sampleRows": 3
696- }
697- }
698- ]
699- }
700- ```
701- </TabItem>
702-</Tabs>
703-
704-The only required settings are those for creating the database connection: `host`, `port`, `user`, `password`, and `database`.
705-
706-By default, the `schema` filter is set to `public`, and the `sampleRows` is set to 3. You may unset the schema if you want to include tables from all schemas.
707-
708-[Here is a short demo.](https://github.com/continuedev/continue/pull/859)
709-
710-### `@Google`
711-
712-Reference the results of a Google search.
713-
714-<Tabs groupId="config-example">
715- <TabItem value="yaml" label="YAML">
716- ```yaml title="config.yaml"
717- context:
718- - provider: google
719- params:
720- serperApiKey: <YOUR_SERPER.DEV_API_KEY>
721- ```
722- </TabItem>
723- <TabItem value="json" label="JSON">
724- ```json title="config.json"
725- {
726- "contextProviders": [
727- {
728- "name": "google",
729- "params": {
730- "serperApiKey": "<YOUR_SERPER.DEV_API_KEY>"
731- }
732- }
733- ]
734- }
735- ```
736- </TabItem>
737-</Tabs>
738-
739-For example, type "@Google python tutorial" if you want to search and discuss ways of learning Python.
740-
741-Note: You can get an API key for free at [serper.dev](https://serper.dev).
742-
743-### `@Gitlab Merge Request`
744-
745-Reference an open MR for this branch on GitLab.
746-
747-<Tabs groupId="config-example">
748- <TabItem value="yaml" label="YAML">
749- ```yaml title="config.yaml"
750- context:
751- - provider: gitlab-mr
752- params:
753- token: "..."
754- ```
755- </TabItem>
756- <TabItem value="json" label="JSON">
757- ```json title="config.json"
758- {
759- "contextProviders": [
760- {
761- "name": "gitlab-mr",
762- "params": {
763- "token": "..."
764- }
765- }
766- ]
767- }
768- ```
769- </TabItem>
770-</Tabs>
771-
772-You will need to create a [personal access token](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html) with the `read_api` scope.
773-
774-#### Using Self-Hosted GitLab
775-
776-You can specify the domain to communicate with by setting the `domain` parameter in your configurtion. By default this is set to `gitlab.com`.
777-
778-<Tabs groupId="config-example">
779- <TabItem value="yaml" label="YAML">
780- ```yaml title="config.yaml"
781- context:
782- - provider: gitlab-mr
783- params:
784- token: "..."
785- domain: "gitlab.example.com"
786- ```
787- </TabItem>
788- <TabItem value="json" label="JSON">
789- ```json title="config.json"
790- {
791- "contextProviders": [
792- {
793- "name": "gitlab-mr",
794- "params": {
795- "token": "...",
796- "domain": "gitlab.example.com"
797- }
798- }
799- ]
800- }
801- ```
802- </TabItem>
803-</Tabs>
804-
805-#### Filtering Comments
806-
807-If you select some code to be edited, you can have the context provider filter out comments for other files. To enable this feature, set `filterComments` to `true`.
808-
809-### `@Jira`
810-
811-Reference the conversation in a Jira issue.
812-
813-<Tabs groupId="config-example">
814- <TabItem value="yaml" label="YAML">
815- ```yaml title="config.yaml"
816- context:
817- - provider: jira
818- params:
819- domain: company.atlassian.net
820- token: ATATT...
821- ```
822- </TabItem>
823- <TabItem value="json" label="JSON">
824- ```json title="config.json"
825- {
826- "contextProviders": [
827- {
828- "name": "jira",
829- "params": {
830- "domain": "company.atlassian.net",
831- "token": "ATATT..."
832- }
833- }
834- ]
835- }
836- ```
837- </TabItem>
838-</Tabs>
839-
840-Make sure to include your own [Atlassian API Token](https://id.atlassian.com/manage-profile/security/api-tokens), or use your `email` and `token`, with token set to your password for basic authentication. If you use your own Atlassian API Token, don't configure your email.
841-
842-#### Jira Datacenter Support
843-
844-This context provider supports both Jira API version 2 and 3. It will use version 3 by default since
845-that's what the cloud version uses, but if you have the datacenter version of Jira, you'll need
846-to set the API Version to 2 using the `apiVersion` property.
847-
848-<Tabs groupId="config-example">
849- <TabItem value="yaml" label="YAML">
850- ```yaml title="config.yaml"
851- context:
852- - provider: jira
853- params:
854- apiVersion: "2"
855- ```
856- </TabItem>
857- <TabItem value="json" label="JSON">
858- ```json title="config.json"
859- {
860- "contextProviders": [
861- {
862- "name": "jira",
863- "params": {
864- "apiVersion": "2"
865- }
866- }
867- ]
868- }
869- ```
870- </TabItem>
871-</Tabs>
872-
873-#### Issue Query
874-
875-By default, the following query will be used to find issues:
876-
877-```jql
878-assignee = currentUser() AND resolution = Unresolved order by updated DESC
879-```
880-
881-You can override this query by setting the `issueQuery` parameter.
882-
883-#### Max results
884-
885-You can set the `maxResults` parameter to limit the number of results returned. The default is `50`.
886-
887-### `@Discord`
888-
889-Reference the messages in a Discord channel.
890-
891-<Tabs groupId="config-example">
892- <TabItem value="yaml" label="YAML">
893- ```yaml title="config.yaml"
894- context:
895- - provider: discord
896- params:
897- discordKey: "bot token"
898- guildId: "1234567890"
899- channels:
900- - id: "123456"
901- name: "example-channel"
902- - id: "678901"
903- name: "example-channel-2"
904- ```
905- </TabItem>
906- <TabItem value="json" label="JSON">
907- ```json title="config.json"
908- {
909- "contextProviders": [
910- {
911- "name": "discord",
912- "params": {
913- "discordKey": "bot token",
914- "guildId": "1234567890",
915- "channels": [
916- {
917- "id": "123456",
918- "name": "example-channel"
919- },
920- {
921- "id": "678901",
922- "name": "example-channel-2"
923- }
924- ]
925- }
926- }
927- ]
928- }
929- ```
930- </TabItem>
931-</Tabs>
932-
933-Make sure to include your own [Bot Token](https://discord.com/developers/applications), and join it to your related server . If you want more granular control over which channels are searched, you can specify a list of channel IDs to search in. If you don't want to specify any channels, just include the guild id(Server ID) and all channels will be included. The provider only reads text channels.
934-
935-### `@HTTP`
936-
937-The HttpContextProvider makes a POST request to the url passed in the configuration. The server must return 200 OK with a ContextItem object or an array of ContextItems.
938-
939-<Tabs groupId="config-example">
940- <TabItem value="yaml" label="YAML">
941- ```yaml title="config.yaml"
942- context:
943- - provider: http
944- params:
945- url: "https://api.example.com/v1/users"
946- ```
947- </TabItem>
948- <TabItem value="json" label="JSON">
949- ```json title="config.json"
950- {
951- "contextProviders": [
952- {
953- "name": "http",
954- "params": {
955- "url": "https://api.example.com/v1/users"
956- }
957- }
958- ]
959- }
960- ```
961- </TabItem>
962-</Tabs>
963-
964-The receiving URL should expect to receive the following parameters:
965-
966-```js title="POST parameters"
967-{
968- query: string,
969- fullInput: string
970-}
971-```
972-
973-The response 200 OK should be a JSON object with the following structure:
974-
975-```json title="Response"
976-[
977- {
978- "name": "",
979- "description": "",
980- "content": ""
981- }
982-]
983-
984-// OR
985-{
986- "name": "",
987- "description": "",
988- "content": ""
989-}
990-```
991-
992-### `@Commits`
993-
994-Reference specific git commit metadata and diff or all of the recent commits.
995-
996-<Tabs groupId="config-example">
997- <TabItem value="yaml" label="YAML">
998- ```yaml title="config.yaml"
999- context:
1000- - provider: commit
1001- params:
1002- Depth: 50
1003- LastXCommitsDepth: 10
1004- ```
1005- </TabItem>
1006- <TabItem value="json" label="JSON">
1007- ```json title="config.json"
1008- {
1009- "contextProviders": [
1010- {
1011- "name": "commit",
1012- "params": {
1013- "Depth": 50,
1014- "LastXCommitsDepth": 10
1015- }
1016- }
1017- ]
1018- }
1019- ```
1020- </TabItem>
1021-</Tabs>
1022-
1023-The depth is how many commits will be loaded into the submenu, defaults to 50.
1024-The LastXCommitsDepth is how many recent commits will be included, defaults to 10.
1025-
1026-### `@Greptile`
1027-
1028-Query a [Greptile](https://www.greptile.com/) index of the current repo/branch.
1029-
1030-<Tabs groupId="config-example">
1031- <TabItem value="yaml" label="YAML">
1032- ```yaml title="config.yaml"
1033- context:
1034- - provider: greptile
1035- params:
1036- greptileToken: "..."
1037- githubToken: "..."
1038- ```
1039- </TabItem>
1040- <TabItem value="json" label="JSON">
1041- ```json title="config.json"
1042- {
1043- "contextProviders": [
1044- {
1045- "name": "greptile",
1046- "params": {
1047- "GreptileToken": "...",
1048- "GithubToken": "..."
1049- }
1050- }
1051- ]
1052- }
1053- ```
1054- </TabItem>
1055-</Tabs>
1056-
1057-### Requesting Context Providers
1058-
1059-Not seeing what you want? Create an issue [here](https://github.com/continuedev/continue/issues/new?assignees=TyDunn&labels=enhancement&projects=&template=feature-request-%F0%9F%92%AA.md&title=) to request a new Context Provider.
deleted docs/docs/advanced/deep-dives/_apply.md +0 −16
@@ -1,16 +0,0 @@
1----
2-description: Learn how to use the Apply feature
3-keywords: [apply, speculative]
4-toc_max_heading_level: 5
5----
6-
7-<!-- This is a work in progress and excluded by prefixing the file name with an underscore -->
8-
9-# Apply
10-
11-## Instant Diff Apply
12-
13-If you have large files (exeeding the output token of your model) the edit apply will delete all lines that exceed the model window. To mitigate you can instead of applying the changes directly, ask the chat LLM to "generate a unified diff".
14-The resulting diff (if the LLM has not made a mistake) can be instantly applied, changing only the lines that need to change.
15-
16-Explainer Video: https://youtu.be/b7Xxsot4gyw
deleted docs/docs/advanced/deep-dives/_category_.json +0 −4
@@ -1,4 +0,0 @@
1-{
2- "label": "Deep Dives",
3- "position": 3
4-}
deleted docs/docs/advanced/deep-dives/autocomplete.mdx +0 −162
@@ -1,162 +0,0 @@
1----
2-title: Autocomplete
3-keywords: [autocomplete]
4----
5-
6-import TabItem from "@theme/TabItem";
7-import Tabs from "@theme/Tabs";
8-
9-### Setting up with Codestral (recommended)
10-
11-If you want to have the best autocomplete experience, we recommend using Codestral, which is available through the [Mistral API](https://console.mistral.ai/). To do this, obtain an API key and add it to your config:
12-
13-<Tabs groupId="hub-config-example">
14- <TabItem value="hub" label="Hub">
15- [Mistral Codestral model block](https://hub.continue.dev/mistral/codestral)
16- </TabItem>
17- <TabItem value="yaml" label="YAML">
18- ```yaml title="config.yaml"
19- models:
20- - name: Codestral
21- provider: mistral
22- model: codestral-latest
23- apiKey: <YOUR_CODESTRAL_API_KEY>
24- roles:
25- - autocomplete
26- ```
27- </TabItem>
28- <TabItem value="json" label="JSON">
29- ```json title="config.json"
30- {
31- "tabAutocompleteModel": {
32- "title": "Codestral",
33- "provider": "mistral",
34- "model": "codestral-latest",
35- "apiKey": "<YOUR_CODESTRAL_API_KEY>"
36- }
37- }
38- ```
39- </TabItem>
40-</Tabs>
41-
42-:::tip[Codestral API Key]
43-The API keys for Codestral and the general Mistral APIs are different. If you are using Codestral, you probably want a Codestral API key, but if you are sharing the key as a team or otherwise want to use `api.mistral.ai`, then make sure to set `"apiBase": "https://api.mistral.ai/v1"` in your `tabAutocompleteModel`.
44-:::
45-
46-### Setting up with Ollama (default)
47-
48-If you'd like to run your autocomplete model locally, we recommend using Ollama. To do this, first download the latest version of Ollama from [here](https://ollama.ai). Then, run the following command to download our recommended model:
49-
50-```bash
51-ollama run qwen2.5-coder:1.5b
52-```
53-
54-Then, add the model to your configuration:
55-
56-<Tabs groupId="hub-config-example">
57- <TabItem value="hub" label="Hub">
58- [Ollama Qwen 2.5 Coder 1.5B model block](https://hub.continue.dev/ollama/qwen2.5-coder-1.5b)
59- </TabItem>
60- <TabItem value="yaml" label="YAML">
61- ```yaml title="config.yaml"
62- models:
63- - name: Qwen 1.5b Autocomplete Model
64- provider: ollama
65- model: qwen2.5-coder:1.5b
66- roles:
67- - autocomplete
68- ```
69- </TabItem>
70- <TabItem value="json" label="JSON">
71- ```json title="config.json"
72- {
73- "tabAutocompleteModel": {
74- "title": "Qwen 1.5b Autocomplete Model",
75- "provider": "ollama",
76- "model": "qwen2.5-coder:1.5b",
77- }
78- }
79- ```
80- </TabItem>
81-</Tabs>
82-
83-Once the model has been downloaded, you should begin to see completions in VS Code.
84-
85-## Configuration Options
86-
87-### Hub Autocomplete models
88-
89-Explore autocomplete model configurations on [the hub](https://hub.continue.dev/explore/models?roles=autocomplete)
90-
91-### Autocomplete User Settings
92-
93-{/* - `Use autocomplete cache`: If on, caches completions */}
94-The following settings can be configured for autocompletion in the IDE extension [User Settings Page](./settings.md):
95-
96-- `Multiline Autocompletions`: Controls multiline completions for autocomplete. Can be set to `always`, `never`, or `auto`. Defaults to `auto`
97-- `Disable autocomplete in files`: List of comma-separated glob pattern to disable autocomplete in matching files. E.g., "\_/.md, \*/.txt"
98-
99-### `config.json` Configuration
100-
101-The `config.json` configuration format (deprecated) offers further configuration options through `tabAutocompleteOptions`. See the [JSON Reference](/reference) for more details.
102-
103-## FAQs
104-
105-### I want better completions, should I use GPT-4?
106-
107-Perhaps surprisingly, the answer is no. The models that we suggest for autocomplete are trained with a highly specific prompt format, which allows them to respond to requests for completing code (see examples of these prompts [here](https://github.com/continuedev/continue/blob/main/core/autocomplete/templating/AutocompleteTemplate.ts)). Some of the best commercial models like GPT-4 or Claude are not trained with this prompt format, which means that they won't generate useful completions. Luckily, a huge model is not required for great autocomplete. Most of the state-of-the-art autocomplete models are no more than 10b parameters, and increasing beyond this does not significantly improve performance.
108-
109-### I'm not seeing any completions
110-
111-Follow these steps to ensure that everything is set up correctly:
112-
113-1. Make sure you have the "Enable Tab Autocomplete" setting checked (in VS Code, you can toggle by clicking the "Continue" button in the status bar, and in JetBrains by going to Settings -> Tools -> Continue).
114-2. Make sure you have downloaded Ollama.
115-3. Run `ollama run qwen2.5-coder:1.5b` to verify that the model is downloaded.
116-4. Make sure that any other completion providers are disabled (e.g. Copilot), as they may interfere.
117-5. Check the output of the logs to find any potential errors: <kbd>cmd/ctrl</kbd> + <kbd>shift</kbd> + <kbd>P</kbd> -> "Toggle Developer Tools" -> "Console" tab in VS Code, ~/.continue/logs/core.log in JetBrains.
118-6. Check VS Code settings to make sure that `"editor.inlineSuggest.enabled"` is set to `true` (use <kbd>cmd/ctrl</kbd> + <kbd>,</kbd> then search for this and check the box)
119-7. If you are still having issues, please let us know in our [Discord](https://discord.gg/vapESyrFmJ) and we'll help as soon as possible.
120-
121-### Completions are only ever single-line
122-
123-To ensure that you receive multi-line completions, you can set `"multilineCompletions": "always"` in `tabAutocompleteOptions`. By default, it is `"auto"`. If you still find that you are only seeing single-line completions, this may be because some models tend to produce shorter completions when starting in the middle of a file. You can try temporarily moving text below your cursor out of your active file, or switching to a larger model.
124-
125-### Can I configure a "trigger key" for autocomplete?
126-
127-Yes, in VS Code, if you don't want to be shown suggestions automatically you can:
128-
129-1. Set `"editor.inlineSuggest.enabled": false` in VS Code settings to disable automatic suggestions
130-2. Open "Keyboard Shortcuts" (cmd/ctrl+k, cmd/ctrl+s) and search for `editor.action.inlineSuggest.trigger`
131-3. Click the "+" icon to add a new keybinding
132-4. Press the key combination you want to use to trigger suggestions (e.g. <kbd>cmd/ctrl</kbd> + <kbd>space</kbd>)
133-5. Now whenever you want to see a suggestion, you can press your key binding (e.g. <kbd>cmd/ctrl</kbd> + <kbd>space</kbd>) to trigger suggestions manually
134-
135-### Is there a shortcut to accept one line at a time?
136-
137-This is a built-in feature of VS Code, but it's just a bit hidden. Follow these settings to reassign the keyboard shortcuts in VS Code:
138-
139-1. Press `Ctrl+Shift+P`, type the command: `Preferences: Open Keyboard Shortcuts`, and enter the keyboard shortcuts settings page.
140-2. Search for `editor.action.inlineSuggest.acceptNextLine`.
141-3. Set the key binding to `Tab`.
142-4. Set the trigger condition (when) to `inlineSuggestionVisible && !editorReadonly`.
143- This will make multi-line completion (including continue and from VS Code built-in or other plugin snippets) still work, and you will see multi-line completion. However, Tab will only fill in one line at a time. Any unnecessary code can be canceled with `Esc`.
144- If you need to apply all the code, just press `Tab` multiple times.
145-
146-### How to turn off autocomplete
147-
148-#### VS Code
149-
150-Click the "Continue" button in the status panel at the bottom right of the screen. The checkmark will become a "cancel" symbol and you will no longer see completions. You can click again to turn it back on.
151-
152-Alternatively, open VS Code settings, search for "Continue" and uncheck the box for "Enable Tab Autocomplete".
153-
154-You can also use the default shortcut to disable autocomplete directly using a chord: press and hold <kbd>ctrl/cmd</kbd> + <kbd>K</kbd> (continue holding <kbd>ctrl/cmd</kbd>) and press <kbd>ctrl/cmd</kbd> + <kbd>A</kbd>. This will turn off autocomplete without navigating through settings.
155-
156-#### JetBrains
157-
158-Open Settings -> Tools -> Continue and uncheck the box for "Enable Tab Autocomplete".
159-
160-#### Feedback
161-
162-If you're turning off autocomplete, we'd love to hear how we can improve! Please let us know in our [Discord](https://discord.gg/vapESyrFmJ) or file an issue on GitHub.
deleted docs/docs/advanced/deep-dives/configuration.md +0 −86
@@ -1,86 +0,0 @@
1----
2-description: Configuration
3-keywords: [config, settings, customize]
4----
5-
6-# Configuration
7-
8-You can easily access your assistant configuration from the Continue Chat sidebar. Open the sidebar by pressing <kbd>cmd/ctrl</kbd> + <kbd>L</kbd> (VS Code) or <kbd>cmd/ctrl</kbd> + <kbd>J</kbd> (JetBrains) and click the Assistant selector above the main chat input. Then, you can hover over an assistant and click the `new window` (hub assistants) or `gear` (local assistants) icon.
9-
10-![configure an assistant](/img/configure-continue.png)
11-
12-## Hub Assistants
13-
14-Hub Assistants can be managed in [the Hub](https://hub.continue.dev). See [Editing an Assistant](../../hub/assistants/edit-an-assistant.md)
15-
16-## YAML Config
17-
18-Local user-level configuration is stored and can be edited in your home directory in `config.yaml`:
19-
20-- `~/.continue/config.yaml` (MacOS / Linux)
21-- `%USERPROFILE%\.continue\config.yaml` (Windows)
22-
23-To open this `config.yaml`, you need to open the assistants dropdown in the top-right portion of the chat input. On that dropdown beside the "Local Assistant" option, select the cog icon. It will open the local `config.yaml`.
24-
25-![local-config-open-steps](/img/local-config-open-steps.png)
26-
27-When editing this file, you can see the available options suggested as you type, or check the reference below. When you save a config file from the IDE, Continue will automatically refresh to take into account your changes. A config file is automatically created the first time you use Continue, and always automatically generated with default values if it doesn't exist.
28-
29-See the full reference for `config.yaml` [here](/reference).
30-
31-## Deprecated configuration methods
32-
33-:::info
34-View the `config.json` migration guide [here](../yaml-migration.mdx)
35-:::
36-
37-- [`config.json`](/reference) - The original configuration format which is stored in a file at the same location as `config.yaml`
38-- [`.continuerc.json`](#continuercjson) - Workspace-level configuration
39-- [`config.ts`](#configts) - Advanced configuration (probably unnecessary) - a TypeScript file in your home directory that can be used to programmatically modify (_merged_) the `config.json` schema:
40- - `~/.continue/config.ts` (MacOS / Linux)
41- - `%USERPROFILE%\.continue\config.ts` (Windows)
42-
43-### `.continuerc.json`
44-
45-The format of `.continuerc.json` is the same as `config.json`, plus one _additional_ property `mergeBehavior`, which can be set to either "merge" or "overwrite". If set to "merge" (the default), `.continuerc.json` will be applied on top of `config.json` (arrays and objects are merged). If set to "overwrite", then every top-level property of `.continuerc.json` will overwrite that property from `config.json`.
46-
47-Example
48-
49-```json title=".continuerc.json"
50-{
51- "tabAutocompleteOptions": {
52- "disable": true
53- },
54- "mergeBehavior": "overwrite"
55-}
56-```
57-
58-### `config.ts`
59-
60-`config.yaml` or `config.json` can handle the vast majority of necessary configuration, so we recommend using it whenever possible. However, if you need to programmatically extend Continue configuration, you can use a `config.ts` file, placed at `~/.continue/config.ts` (MacOS / Linux) or `%USERPROFILE%\.continue\config.ts` (Windows).
61-
62-`config.ts` must export a `modifyConfig` function, like:
63-
64-```ts title="config.ts"
65-export function modifyConfig(config: Config): Config {
66- config.slashCommands?.push({
67- name: "commit",
68- description: "Write a commit message",
69- run: async function* (sdk) {
70- // The getDiff function takes a boolean parameter that indicates whether
71- // to include unstaged changes in the diff or not.
72- const diff = await sdk.ide.getDiff(false); // Pass false to exclude unstaged changes
73- for await (const message of sdk.llm.streamComplete(
74- `${diff}\n\nWrite a commit message for the above changes. Use no more than 20 tokens to give a brief description in the imperative mood (e.g. 'Add feature' not 'Added feature'):`,
75- new AbortController().signal,
76- {
77- maxTokens: 20,
78- },
79- )) {
80- yield message;
81- }
82- },
83- });
84- return config;
85-}
86-```
deleted docs/docs/advanced/deep-dives/development-data.md +0 −21
@@ -1,21 +0,0 @@
1----
2-title: Development Data
3-description: Collecting data on how you build software
4-keywords: [development data, dev data, LLM-aided development]
5----
6-
7-# Development Data
8-
9-When you use Continue, you automatically collect data on how you build software. By default, this development data is saved to `.continue/dev_data` on your local machine.
10-
11-You can read more about how development data is generated as a byproduct of LLM-aided development and why we believe that you should start collecting it now: [It’s time to collect data on how you build software](https://blog.continue.dev/its-time-to-collect-data-on-how-you-build-software)
12-
13-## Custom Data Destinations
14-
15-You can also configure custom destinations for your data, including remote HTTP endpoints and local file directories.
16-
17-For hub assistants, data destinations are configured in `data` blocks. Visit the hub to [explore example data blocks](https://hub.continue.dev/explore/data) or [create your own](https://hub.continue.dev/new?type=block&blockType=data).
18-
19-See more details about adding `data` blocks to your configuration files in the [YAML specification](/reference#data)
20-
21-When sending development data to your own HTTP endpoint, it will receive an event JSON blob at the given `schema` version. You can view event names, schema versions, and fields [here in the source code](https://github.com/continuedev/continue/tree/main/packages/config-yaml/src/schemas/data).
deleted docs/docs/advanced/deep-dives/mcp.mdx +0 −181
@@ -1,181 +0,0 @@
1----
2-title: MCP
3-description: MCP use and customization
4-keywords: [tool, use, function calling, claude, automatic]
5----
6-
7-import TabItem from "@theme/TabItem";
8-import Tabs from "@theme/Tabs";
9-
10-# MCP
11-
12-As AI systems get better, they're still held back by their training data and
13-can't access real-time information or specialized tools. The [Model Context
14-Protocol](https://modelcontextprotocol.io/introduction) (MCP) fixes this by
15-letting AI models connect with outside data sources, tools, and environments.
16-This allows smooth sharing of information and abilities between AI systems and
17-the wider digital world. This standard, created by Anthropic to bring together
18-prompts, context, and tool use, is key for building truly useful AI experiences
19-that can be set up with custom tools.
20-
21-## How it works
22-
23-Currently custom tools can be configured using the Model Context
24-Protocol standard to unify prompts, context, and tool use.
25-
26-MCP Servers can be added to hub Assistants using `mcpServers` blocks. You can
27-explore available MCP server blocks
28-[here](https://hub.continue.dev/explore/mcp).
29-
30-:::info
31-MCP can only be used in the **agent** mode.
32-:::
33-
34-## Quick Start
35-
36-Below is a quick example of setting up a new MCP server for use in your assistant:
37-
38-1. Create a folder called `.continue/mcpServers` at the top level of your workspace
39-2. Add a file called `playwright-mcp.yaml` to this folder.
40-3. Write the following contents to `playwright-mcp.yaml` and save.
41-
42-```yaml title=".continue/mcpServers/playwright-mcp.yaml"
43-name: Playwright mcpServer
44-version: 0.0.1
45-schema: v1
46-mcpServers:
47- - name: Browser search
48- command: npx
49- args:
50- - "@playwright/mcp@latest"
51-```
52-
53-Now test your MCP server by prompting the following command:
54-
55-```
56-Open the browser and navigate Hacker News. Save the top 10 headlines in a hn.txt file.
57-```
58-
59-The result will be a generated file called `hn.txt` in the current working directory.
60-
61-![playwright mcp](/img/mcp-playwright.png)
62-
63-## Using MCP Servers
64-
65-To set up your own MCP server, read the [MCP
66-quickstart](https://modelcontextprotocol.io/quickstart) and then [create an
67-`mcpServers`
68-block](https://hub.continue.dev/new?type=block&blockType=mcpServers) or add a local MCP
69-server block to your [config file](./configuration.md):
70-
71-<Tabs groupId="config.yaml">
72- <TabItem value="yaml" label="YAML">
73- ```yaml title="config.yaml"
74- mcpServers:
75- - name: SQLite MCP
76- command: npx
77- args:
78- - "-y"
79- - "mcp-sqlite"
80- - "/path/to/your/database.db"
81-
82-````
83-</TabItem>
84-<TabItem value="json" label="JSON">
85-```json title="config.json"
86-{
87- "experimental": {
88- "modelContextProtocolServers": [
89- {
90- "transport": {
91- "type": "stdio",
92- "command": "uvx",
93- "args": ["mcp-server-sqlite", "--db-path", "/path/to/your/database.db"]
94- }
95- }
96- ]
97- }
98-}
99-````
100-
101- </TabItem>
102-</Tabs>
103-
104-### Syntax
105-
106-MCP blocks follow the established syntax for blocks, with a few additional properties specific to MCP servers.
107-
108-- `name` (**required**): A display name for the MCP server.
109-- `command` (**required**): The command to run to start the MCP server.
110-- `type` (optional): The type of the MCP server: `sse`, `stdio`, `streamable-http`
111-- `args` (optional): Arguments to pass to the command.
112-- `env` (optional): Secrets to be injected into the command as environment variables.
113-
114-### Transport Types
115-
116-MCP now supports remote server connections through HTTP-based transports, expanding beyond the traditional local stdio transport method. This enables integration with cloud-hosted MCP servers and distributed architectures.
117-
118-#### Server-Sent Events (SSE) Transport
119-
120-For real-time streaming communication, use the SSE transport:
121-
122-```yaml
123-mcpServers:
124- - name: Name
125- type: sse
126- url: https://....
127-```
128-
129-#### Standard Input/Output (stdio)
130-
131-For local MCP servers that communicate via standard input and output:
132-
133-```yaml
134-mcpServers:
135- - name: Name
136- type: stdio
137- command: npx
138- args:
139- - "@modelcontextprotocol/server-sqlite"
140- - "/path/to/your/database.db"
141-```
142-
143-#### Streamable HTTP Transport
144-
145-For standard HTTP-based communication with streaming capabilities:
146-
147-```yaml
148-mcpServers:
149- - name: Name
150- type: streamable-http
151- url: https://....
152-```
153-
154-These remote transport options allow you to connect to MCP servers hosted on remote infrastructure, enabling more flexible deployment architectures and shared server resources across multiple clients.
155-
156-For detailed information about transport mechanisms and their use cases, refer to the official MCP documentation on [transports](https://modelcontextprotocol.io/docs/concepts/transports#server-sent-events-sse).
157-
158-### Working with Secrets
159-
160-With some MCP servers you will need to use API keys or other secrets. You can leverage locally stored environments secrets
161-as well as access hosted secrets in the Continue Hub. To leverage Hub secrets, you can use the `inputs` property in your MCP env block instead of `secrets`.
162-
163-```yaml
164-mcpServers:
165- - name: Supabase MCP
166- command: npx
167- args:
168- - -y
169- - "@supabase/mcp-server-supabase@latest"
170- - --access-token
171- - ${{ secrets.SUPABASE_TOKEN }}
172- env:
173- SUPABASE_TOKEN: ${{ secrets.SUPABASE_TOKEN }}
174- - name: GitHub
175- command: npx
176- args:
177- - "-y"
178- - "@modelcontextprotocol/server-github"
179- env:
180- GITHUB_PERSONAL_ACCESS_TOKEN: ${{ secrets.GITHUB_PERSONAL_ACCESS_TOKEN }}
181-```
deleted docs/docs/advanced/deep-dives/prompts.md +0 −58
@@ -1,58 +0,0 @@
1----
2-title: Prompts
3----
4-
5-Prompts are reusable instructions that can be referenced at any time during chat. They are especially useful as context for repetitive and/or complex tasks.
6-
7-:::info
8-Prompts were previously defined in a `.prompt` file format, but for consistency we now recommend using the same Markdown format as [rules](./rules.mdx) and adding `alwaysApply: false` to the frontmatter so that they are manually triggered.
9-:::
10-
11-### Quick Start
12-
13-Below is a quick example of setting up a prompt file:
14-
15-1. Create a folder called `.continue/rules` at the top level of your workspace
16-2. Add a file called `review-prompt.md` to this folder.
17-3. Write the following contents to `review-prompt.md` and save.
18-
19-```md title="review-prompt.md"
20----
21-name: Redux best practices review
22-alwaysApply: false
23----
24-
25-Review the currently open file for adherence to Redux best practices, as explained in their style guide at https://redux.js.org/style-guide/.
26-```
27-
28-Now to use this prompt, you can open Chat, type <kbd>/</kbd>, select the prompt, and type out any additional instructions you'd like to add.
29-
30-## Further Examples
31-
32-Below are more examples to get you started. You can also visit the Hub to [explore prompts](https://hub.continue.dev/explore/prompts) or [create your own](https://hub.continue.dev/new?type=block&blockType=prompts).
33-
34-### Security review
35-
36-```md title="security-review.md"
37----
38-name: Security best practices review
39-alwaysApply: false
40----
41-
42-Review the changes in the current git diff for these security best practices:
43-
44-- Does the architecture follow security-by-design principles?
45-- Are there potential security vulnerabilities in the system design?
46-- Is sensitive data handled appropriately throughout the lifecycle?
47-```
48-
49-### Pull in commonly used files for tasks
50-
51-```md title="typeorm-entity-generator.md"
52----
53-name: Generate a new TypeORM entity
54-alwaysApply: false
55----
56-
57-Referencing `src/db/dataSource.ts` and `src/db/entity/SampleEntity.ts`, generate a new TypeORM entity based on the following requirements:
58-```
deleted docs/docs/advanced/deep-dives/rules.mdx +0 −189
@@ -1,189 +0,0 @@
1----
2-description: Rules are used to provide instructions to the model for Chat, Edit, and Agent requests.
3-keywords: [rules, .continuerules, system, prompt, message]
4----
5-
6-import TabItem from "@theme/TabItem";
7-import Tabs from "@theme/Tabs";
8-
9-# Rules
10-
11-Rules provide instructions to the model for [Chat](../../features/chat/quick-start), [Edit](../../features/edit/quick-start), and [Agent](../../features/agent/quick-start) requests.
12-
13-:::info Rules are not included in [autocomplete](./autocomplete.mdx) or [apply](../model-roles/apply.mdx).
14-:::
15-
16-## How it works
17-
18-You can view the current rules by clicking the pen icon above the main toolbar:
19-
20-![rules input toolbar section](/img/notch-rules.png)
21-
22-To form the system message, rules are joined with new lines, in the order they appear in the toolbar. This includes the base chat system message ([see below](#chat-system-message)).
23-
24-## Quick Start
25-
26-Below is a quick example of setting up a new rule file:
27-
28-1. Create a folder called `.continue/rules` at the top level of your workspace
29-2. Add a file called `pirates-rule.md` to this folder.
30-3. Write the following contents to `pirates-rule.md` and save.
31-
32-```md title=".continue/rules/pirates-rule.md"
33----
34-name: Pirate rule
35----
36-
37-- Talk like a pirate.
38-```
39-
40-Now test your rules by asking a question about a file in chat.
41-
42-![pirate rule test](/img/pirate-rule-test.png)
43-
44-## Creating `rules` blocks
45-
46-Rules can be added locally using the "Add Rules" button while viewing the Local Assistant's rules.
47-
48-![add local rules button](/img/add-local-rules.png)
49-
50-:::info Automatically create local rule blocks
51-When in Agent mode, you can prompt the agent to create a rule for you using the `create_rule_block` tool if enabled.
52-
53-For example, you can say "Create a rule for this", and a rule will be created for you in `.continue/rules` based on your conversation.
54-:::
55-
56-Rules can also be added to an Assistant on the Continue Hub.
57-
58-Explore available rules [here](https://hub.continue.dev), or [create your own](https://hub.continue.dev/new?type=block&blockType=rules) in the Hub.
59-
60-### Syntax
61-
62-:::info
63-
64-Rules were originally defined in YAML format (demonstrated below), but we introduced Markdown for easier editing. While both are still supported, we recommend Markdown.
65-
66-:::
67-
68-Rules blocks can be simple text, written in YAML configuration files, or as Markdown (`.md`) files. They can have the following properties:
69-
70-- `name` (**required** for YAML): A display name/title for the rule
71-- `globs` (optional): When files are provided as context that match this glob pattern, the rule will be included. This can be either a single pattern (e.g., `"**/*.{ts,tsx}"`) or an array of patterns (e.g., `["src/**/*.ts", "tests/**/*.ts"]`).
72-- `regex` (optional): When files are provided as context and their content matches this regex pattern, the rule will be included. This can be either a single pattern (e.g., `"^import .* from '.*';$"`) or an array of patterns (e.g., `["^import .* from '.*';$", "^export .* from '.*';$"]`).
73-- `description` (optional): A description for the rule. Agents may read this description when `alwaysApply` is false to determine whether the rule should be pulled into context.
74-- `alwaysApply`: Determines whether the rule is always included. Behavior is described below:
75- - `true`: Always included, regardless of file context
76- - `false`: Included if globs exist AND match file context, or the agent decides to pull the rule into context based on it's description
77- - `undefined` (default behavior): Included if no globs exist OR globs exist and match
78-
79-<Tabs groupId="rules-example">
80- <TabItem value="md" label="Markdown">
81- ```yaml title="doc-standards.md"
82- ---
83- name: Documentation Standards
84- globs: docs/**/*.{md,mdx}
85- alwaysApply: false
86- description: Standards for writing and maintaining Continue Docs
87- ---
88-
89-# Continue Docs Standards
90-
91-- Follow Docusaurus documentation standards
92-- Include YAML frontmatter with title, description, and keywords
93-- Use consistent heading hierarchy starting with h2 (##)
94-- Include relevant Admonition components for tips, warnings, and info
95-- Use descriptive alt text for images
96-- Include cross-references to related documentation
97-- Reference other docs with relative paths
98-- Keep paragraphs concise and scannable
99-- Use code blocks with appropriate language tags
100-
101- ````
102- </TabItem>
103- <TabItem value="yaml" label="YAML">
104-
105- ```yaml title="doc-standards.yaml"
106- name: Documentation Standards
107- version: 1.0.0
108- schema: v1
109-
110- rules:
111- - name: Documentation Standards
112- globs: docs/**/*.{md,mdx}
113- alwaysApply: false
114- rule: >
115- - Follow Docusaurus documentation standards
116- - Include YAML frontmatter with title, description, and keywords
117- - Use consistent heading hierarchy starting with h2 (##)
118- - Include relevant Admonition components for tips, warnings, and info
119- - Use descriptive alt text for images
120- - Include cross-references to related documentation
121- - Reference other docs with relative paths
122- - Keep paragraphs concise and scannable
123- - Use code blocks with appropriate language tags
124- ````
125-
126- </TabItem>
127-
128- </Tabs>
129-
130-### `.continue/rules` folder
131-
132-You can create project-specific rules by adding a `.continue/rules` folder to the root of your project and adding new rule files.
133-
134-```md title=".continue/rules/new-rule.md"
135----
136-name: New rule
137----
138-
139-Always give concise responses
140-```
141-
142-This is also done when selecting "Add Rule" in the Assistant settings. This will create a new folder in `.continue/rules` with a default file named `new-rule.md`.
143-
144-### Examples
145-
146-If you want concise answers:
147-
148-```md title=".continue/rules/concise-rule.md"
149----
150-name: Always give concise answers
151----
152-
153-Please provide concise answers. Don't explain obvious concepts.
154-You can assume that I am knowledgable about most programming topics.
155-```
156-
157-If you want to ensure certain practices are followed, for example in React:
158-
159-```md title=".continue/rules/functional-rule.md"
160----
161-name: Always use functional components
162----
163-
164-Whenever you are writing React code, make sure to
165-
166-- use functional components instead of class components
167-- use hooks for state management
168-- define an interface for your component props
169-- use Tailwind CSS for styling
170-- modularize components into smaller, reusable pieces
171-```
172-
173-### Chat System Message
174-
175-Continue includes a simple default system message for [Chat](../../features/chat/quick-start) and [Agent](../../features/agent/quick-start) requests, to help the model provide reliable codeblock formats in its output.
176-
177-This can be viewed in the rules section of the toolbar (see above), or in the source code [here](https://github.com/continuedev/continue/blob/main/core/llm/constructMessages.ts#L4).
178-
179-Advanced users can override this system message for a specific model if needed by using `chatOptions.baseSystemMessage`. See the [`config.yaml` reference](/reference#models).
180-
181-### `.continuerules`
182-
183-:::warning
184-
185-`.continuerules` will be deprecated in a future release. Please use the `.continue/rules` folder instead.
186-
187-:::
188-
189-You can create project-specific rules by adding a `.continuerules` file to the root of your project. This file is raw text and its full contents will be used as rules.
deleted docs/docs/advanced/deep-dives/settings.md +0 −42
@@ -1,42 +0,0 @@
1----
2-title: User Settings Page
3-description: Reference for Adjusting User-Specific Settings
4-keywords: [config, settings, configuration, customize, customization, sidebar]
5----
6-
7-# The User Settings Page
8-
9-The **User Settings page** can be accessed by clicking the gear icon in the header of the Continue sidebar and then selecting the "Settings" tab.
10-
11-![settings](/img/settings-header.png)
12-
13-Which takes you to this page (select the "Settings" tab):
14-
15-![User Settings Page](/img/settings-page.png)
16-
17-Below that, the following settings which are not part of a configuration file are available:
18-
19-- `Show Session Tabs`: If on, displays tabs above the chat as an alternative way to organize and access your sessions. Off by default
20-- `Wrap Codeblocks`: If on, enables text wrapping in code blocks. Off by default.
21-- `Show Chat Scrollbar`: If on, enables a scrollbar in the chat window. Off by default.
22-- `Text-to-Speech Output`: If on, reads LLM responses aloud with TTS. Off by default.
23-- `Enable Session Titles`: If on, generates summary titles for each chat session after the first message, using the current Chat model. On by default.
24-- `Format Markdown`: If off, shows responses as raw text. On by default.
25-- `Allow Anonymous Telemetry`: If on, allows Continue to send anonymous telemetry. **On** by default.
26-- `Enable Indexing`: Enables indexing of the codebase for the @codebase and @code context providers. **On** by default.
27-- `Font Size`: Specifies base font size for UI elements
28-- `Multiline Autocompletions`: Controls multiline completions for autocomplete. Can be set to `always`, `never`, or `auto`. Defaults to `auto`
29-- `Autocomplete timeout`: Maximum time in milliseconds for autocomplete request/retreival. Defaults to 150
30-- `Autocomplete debounce`: Minimum time in milliseconds to trigger an autocomplete request after a change. Defaults to 250
31-- `Disable autocomplete in files`: List of comma-separated glob pattern to disable autocomplete in matching files. E.g., `**/*.{txt,md}`
32-
33-### Experimental settings
34-
35-At the bottom of the User Settings page there is an "Experimental Settings" section which contains new or otherwise experimental settings, including:
36-
37-- `Auto-Accept Agent Edits`: **CAUTION: Be very careful with this setting. When turned on, Agent mode's edit tool can make changes to files with no manual review or guaranteed stopping point. If on, diffs generated by the edit tool are automatically accepted and Agent proceeds with the next conversational turn.** Off by default.
38-
39-<!-- - `Use autocomplete cache`: If on, caches completions. -->
40-<!-- - `Use Chromium for Docs Crawling`: Use Chromium to crawl docs locally. Useful if the default Cheerio crawler fails on sites that require JavaScript rendering. Downloads and installs Chromium to ~/.continue/.utils. Off by default -->
41-<!-- - `Codeblock Actions Position`: Sets the position for the actions that show when hovering over codeblocks. Defaults to `top` -->
42-<!-- - `Workspace prompts path`: Where to find Prompt Files in a workspace - replaces the default .continue/prompts -->
deleted docs/docs/advanced/deep-dives/slash-commands.mdx +0 −33
@@ -1,33 +0,0 @@
1----
2-title: Slash commands
3-description: Shortcuts that can be activated by prefacing your input with '/'
4-keywords: [slash command, custom commands, step]
5----
6-
7-import TabItem from "@theme/TabItem";
8-import Tabs from "@theme/Tabs";
9-
10-![actions](/img/actions.gif)
11-
12-## Slash commands
13-
14-Slash commands are shortcuts that can be activated by typing '/' in a chat session (press <kbd>cmd/ctrl</kbd> + <kbd>L</kbd> (VS Code) or <kbd>cmd/ctrl</kbd> + <kbd>J</kbd> (JetBrains)), and selecting from the dropdown.
15-![slash-commands](/img/slash-commands.png)
16-
17-Slash commands can be combined with additional instructions, including [context providers](../custom-providers.mdx) or highlighted code.
18-
19-## Prompts
20-
21-### Assistant prompt blocks
22-
23-The easiest way to add a slash command is by adding [`prompt` blocks](../../hub/blocks/block-types.md#prompts) to your assistant, which show up as slash commands in [Chat](../../features/chat/how-it-works.mdx).
24-
25-### Prompt files
26-
27-It is also possible to write your own slash command by defining a “.prompt file.” Prompt files can be as simple as a text file, but also include templating so that you can refer to files, URLs, highlighted code, and more.
28-
29-Learn more about prompt files [here](./prompts.md)
30-
31-### MCP Server prompts
32-
33-Any prompts provided by [Model Context Protocol](https://modelcontextprotocol.io/introduction) servers are also accessible in chat as Slash Commands. See the [MCP Server Deep Dive](./mcp.mdx) for more details.
deleted docs/docs/advanced/deep-dives/vscode-actions.md +0 −49
@@ -1,49 +0,0 @@
1----
2-title: VS Code Actions
3-description: VS Code Actions
4-keywords: [vscode, quick actions, quick, actions]
5----
6-
7-### Other triggers for Actions (VS Code)
8-
9-:::info
10-Currently all of these are only available in VS Code
11-:::
12-
13-To make common use cases even more accessible, we provide a handful of other ways to invoke actions in VS Code.
14-
15-## Quick actions
16-
17-Quick Actions are displayed as buttons above top-level classes and functions in your source code, letting you invoke actions with one click. They will edit that class or function, but nothing outside of it. They can also be customized with [.prompt files](./prompts.md) to perform custom actions.
18-
19-![quick-actions](/img/quick-actions.png)
20-
21-By default, quick actions are disabled, but can be enabled with the “Continue: Enable Quick Actions” in VS Code settings.
22-
23-## Right click actions
24-
25-Right click actions let you highlight a desired region of code, right click, and then select an action from the dropdown menu.
26-
27-The highlighted code you’ve selected will be included in your prompt alongside a pre-written set of instructions depending on the selected action. This is the only section of code that the model will attempt to edit.
28-
29-Right click actions that generate inline diffs use the same prompt and response processing logic as [Edit](../../features/edit/how-it-works.mdx).
30-
31-![context-menu](/img/context-menu.png)
32-
33-## Debug action
34-
35-The debug action is a special built-in keyboard shortcut in the VS Code extension. Use <kbd>cmd/ctrl</kbd> + <kbd>shift</kbd> + <kbd>R</kbd> to instantly copy the contents of the most recent terminal output into the chat sidebar and get debugging advice. There is no additional, non-visible information sent to the language model.
36-
37-```
38-I got the following error, can you please help explain how to fix it?
39-
40-[ERROR_MESSAGE]
41-```
42-
43-## Quick fixes
44-
45-Whenever you see red/yellow underlines in your code indicating errors, you can place your cursor nearby and VS Code will display a lightbulb icon. Either clicking the lightbulb or using the keyboard shortcut <kbd>cmd/ctrl</kbd> + <kbd>.</kbd> will show a dropdown menu of quick fixes. One of these will be the “Ask Continue” action. Either click or use <kbd>cmd/ctrl</kbd> + <kbd>.</kbd> again and Continue will attempt to help solve the problem.
46-
47-Similarly to the debug action, quick actions transparently inject a prompt into the chat window. When you select “Ask Continue”, the 3 lines above and below the error are sent to the chat followed by the question “How do I fix the following problem in the above code?: [ERROR_MESSAGE]”.
48-
49-![ask-continue](/img/ask-continue.png)
deleted docs/docs/advanced/json-reference.md +0 −530
@@ -1,530 +0,0 @@
1----
2-title: config.json Reference
3-description: Reference for the Continue _config.json_ configuration file
4-keywords: [config, config_schema.json, json]
5----
6-
7-:::info
8-We recently introduced a new configuration format, `config.yaml`, to replace `config.json`. See the `config.yaml` reference and migration guide [here](/reference).
9-:::
10-
11-Below are details for each property that can be set in `config.json`. The config schema code is found in [`extensions/vscode/config_schema.json`](https://github.com/continuedev/continue/blob/main/extensions/vscode/config_schema.json).
12-
13-**All properties at all levels are optional unless explicitly marked required**
14-
15-### `models`
16-
17-Your **chat** models are defined here, which are used for [Chat](/features/chat/how-it-works), [Edit](/features/edit/how-it-works) and [VS Code actions](/advanced/deep-dives/vscode-actions).
18-
19-Each model has specific configuration options tailored to its provider and functionality, which can be seen as suggestions while editing the json.
20-
21-**Properties:**
22-
23-- `title` (**required**): The title to assign to your model, shown in dropdowns, etc.
24-- `provider` (**required**): The provider of the model, which determines the type and interaction method. Options inclued `openai`, `ollama`, `xAI`, etc., see IntelliJ suggestions.
25-- `model` (**required**): The name of the model, used for prompt template auto-detection. Use `AUTODETECT` special name to get all available models.
26-- `apiKey`: API key required by providers like OpenAI, Anthropic, Cohere, and xAI.
27-- `apiBase`: The base URL of the LLM API.
28-- `contextLength`: Maximum context length of the model, typically in tokens (default: 2048).
29-- `maxStopWords`: Maximum number of stop words allowed, to avoid API errors with extensive lists.
30-- `template`: Chat template to format messages. Auto-detected for most models but can be overridden. See intelliJ suggestions.
31-- `promptTemplates`: A mapping of prompt template names (e.g., `edit`) to template strings. [Customization Guide](https://docs.continue.dev/model-setup/configuration#customizing-the-edit-prompt).
32-- `completionOptions`: Model-specific completion options, same format as top-level [`completionOptions`](#completionoptions), which they override.
33-- `systemMessage`: A system message that will precede responses from the LLM.
34-- `requestOptions`: Model-specific HTTP request options, same format as top-level [`requestOptions`](#requestoptions), which they override.
35-- `apiType`: Specifies the type of API (`openai` or `azure`).
36-- `apiVersion`: Azure API version (e.g., `2023-07-01-preview`).
37-- `engine`: Engine for Azure OpenAI requests.
38-- `capabilities`: Override auto-detected capabilities:
39- - `uploadImage`: Boolean indicating if the model supports image uploads.
40- - `tools`: Boolean indicating if the model supports tool use.
41-
42-_(AWS Only)_
43-
44-- `profile`: AWS security profile for authorization.
45-- `modelArn`: AWS ARN for imported models (e.g., for `bedrockimport` provider).
46-- `region`: Region where the model is hosted (e.g., `us-east-1`, `eu-central-1`).
47-
48-Example:
49-
50-```json title="config.json"
51-{
52- "models": [
53- {
54- "title": "Ollama",
55- "provider": "ollama",
56- "model": "AUTODETECT"
57- },
58- {
59- "model": "gpt-4o",
60- "contextLength": 128000,
61- "title": "GPT-4o",
62- "provider": "openai",
63- "apiKey": "YOUR_API_KEY"
64- }
65- ]
66-}
67-```
68-
69-### `tabAutocompleteModel`
70-
71-Specifies the model or models for tab autocompletion, defaulting to an Ollama instance. This property uses the same format as `models`. Can be an array of models or an object for one model.
72-
73-Example
74-
75-```json title="config.json"
76-{
77- "tabAutocompleteModel": {
78- "title": "My Starcoder",
79- "provider": "ollama",
80- "model": "starcoder2:3b"
81- }
82-}
83-```
84-
85-### `tabAutocompleteOptions`
86-
87-Specifies options for tab autocompletion behavior.
88-
89-**Properties:**
90-
91-- `disable`: If `true`, disables tab autocomplete (default: `false`).
92-- `maxPromptTokens`: Maximum number of tokens for the prompt (default: `1024`).
93-- `debounceDelay`: Delay (in ms) before triggering autocomplete (default: `350`).
94-- `maxSuffixPercentage`: Maximum percentage of prompt for suffix (default: `0.2`).
95-- `prefixPercentage`: Percentage of input for prefix (default: `0.3`).
96-- `template`: Template string for autocomplete, using Mustache templating. You can use the `{{{ prefix }}}`, `{{{ suffix }}}`, `{{{ filename }}}`, `{{{ reponame }}}`, and `{{{ language }}}` variables.
97-- `onlyMyCode`: If `true`, only includes code within the repository (default: `true`).
98-
99-Example
100-
101-```json title="config.json"
102-{
103- "tabAutocompleteOptions": {
104- "debounceDelay": 500,
105- "maxPromptTokens": 1500,
106- "disableInFiles": ["*.md"]
107- }
108-}
109-```
110-
111-### `embeddingsProvider`
112-
113-Embeddings model settings - the model used for @Codebase and @docs.
114-
115-**Properties:**
116-
117-- `provider` (**required**): Specifies the embeddings provider, with options including `transformers.js`, `ollama`, `openai`, `cohere`, `gemini`, etc
118-- `model`: Model name for embeddings.
119-- `apiKey`: API key for the provider.
120-- `apiBase`: Base URL for API requests.
121-- `requestOptions`: Additional HTTP request settings specific to the embeddings provider.
122-- `maxEmbeddingChunkSize`: Maximum tokens per document chunk. Minimum is 128 tokens.
123-- `maxEmbeddingBatchSize`: Maximum number of chunks per request. Minimum is 1 chunk.
124-
125-(AWS ONLY)
126-
127-- `region`: Specifies the region hosting the model.
128-- `profile`: AWS security profile.
129-
130-Example:
131-
132-```json title="config.json"
133-{
134- "embeddingsProvider": {
135- "provider": "openai",
136- "model": "text-embedding-ada-002",
137- "apiKey": "<API_KEY>",
138- "maxEmbeddingChunkSize": 256,
139- "maxEmbeddingBatchSize": 5
140- }
141-}
142-```
143-
144-### `completionOptions`
145-
146-Parameters that control the behavior of text generation and completion settings. Top-level `completionOptions` apply to all models, _unless overridden at the model level_.
147-
148-**Properties:**
149-
150-- `stream`: Whether to stream the LLM response. Currently only respected by the `anthropic` and `ollama` providers; other providers will always stream (default: `true`).
151-- `temperature`: Controls the randomness of the completion. Higher values result in more diverse outputs.
152-- `topP`: The cumulative probability for nucleus sampling. Lower values limit responses to tokens within the top probability mass.
153-- `topK`: The maximum number of tokens considered at each step. Limits the generated text to tokens within this probability.
154-- `presencePenalty`: Discourages the model from generating tokens that have already appeared in the output.
155-- `frequencyPenalty`: Penalizes tokens based on their frequency in the text, reducing repetition.
156-- `mirostat`: Enables Mirostat sampling, which controls the perplexity during text generation. Supported by Ollama, LM Studio, and llama.cpp providers (default: `0`, where `0` = disabled, `1` = Mirostat, and `2` = Mirostat 2.0).
157-- `stop`: An array of stop tokens that, when encountered, will terminate the completion. Allows specifying multiple end conditions.
158-- `maxTokens`: The maximum number of tokens to generate in a completion (default: `2048`).
159-- `numThreads`: The number of threads used during the generation process. Available only for Ollama as `num_thread`.
160-- `keepAlive`: For Ollama, this parameter sets the number of seconds to keep the model loaded after the last request, unloading it from memory if inactive (default: `1800` seconds, or 30 minutes).
161-- `numGpu`: For Ollama, this parameter overrides the number of gpu layers that will be used to load the model into VRAM.
162-- `useMmap`: For Ollama, this parameter allows the model to be mapped into memory. If disabled can enhance response time on low end devices but will slow down the stream.
163-- `reasoning`: Enables thinking/reasoning for Anthropic Claude 3.7+ models.
164-- `reasoningBudgetTokens`: Sets budget tokens for thinking/reasoning in Anthropic Claude 3.7+ models.
165-
166-Example
167-
168-```json title="config.json"
169-{
170- "completionOptions": {
171- "stream": false,
172- "temperature": 0.5
173- }
174-}
175-```
176-
177-### `requestOptions`
178-
179-Default HTTP request options that apply to all models and context providers, unless overridden at the model level.
180-
181-**Properties:**
182-
183-- `timeout`: Timeout for each request to the LLM (default: 7200 seconds).
184-- `verifySsl`: Whether to verify SSL certificates for requests.
185-- `caBundlePath`: Path to a custom CA bundle for HTTP requests - path to `.pem` file (or array of paths)
186-- `proxy`: Proxy URL to use for HTTP requests.
187-- `headers`: Custom headers for HTTP requests.
188-- `extraBodyProperties`: Additional properties to merge with the HTTP request body.
189-- `noProxy`: List of hostnames that should bypass the specified proxy.
190-- `clientCertificate`: Client certificate for HTTP requests.
191-
192- - `cert`: Path to the client certificate file.
193- - `key`: Path to the client certificate key file.
194- - `passphrase`: Optional passphrase for the client certificate key file.
195-
196-Example
197-
198-```json title="config.json"
199-{
200- "requestOptions": {
201- "headers": {
202- "X-Auth-Token": "xxx"
203- }
204- }
205-}
206-```
207-
208-### `reranker`
209-
210-Configuration for the reranker model used in response ranking.
211-
212-**Properties:**
213-
214-- `name` (**required**): Reranker name, e.g., `cohere`, `voyage`, `llm`, `huggingface-tei`, `bedrock`
215-- `params`:
216- - `model`: Model name
217- - `apiKey`: Api key
218- - `region`: Region (for Bedrock only)
219-
220-Example
221-
222-```json title="config.json"
223-{
224- "reranker": {
225- "name": "voyage",
226- "params": {
227- "model": "rerank-2",
228- "apiKey": "<VOYAGE_API_KEY>"
229- }
230- }
231-}
232-```
233-
234-### `docs`
235-
236-List of documentation sites to index.
237-
238-**Properties:**
239-
240-- `title` (**required**): Title of the documentation site, displayed in dropdowns, etc.
241-- `startUrl` (**required**): Start page for crawling - usually root or intro page for docs
242-<!-- - `rootUrl`: Crawler will only index docs within this domain - pages that contain this URL -->
243-- `maxDepth`: Maximum link depth for crawling. Default `4`
244-- `favicon`: URL for site favicon (default is `/favicon.ico` from `startUrl`).
245-- `useLocalCrawling`: Skip the default crawler and only crawl using a local crawler.
246-
247-Example
248-
249-```json title="config.json"
250-"docs": [
251- {
252- "title": "Continue",
253- "startUrl": "https://docs.continue.dev/intro",
254- "faviconUrl": "https://docs.continue.dev/favicon.ico",
255- }
256-]
257-```
258-
259-### `slashCommands`
260-
261-Custom commands initiated by typing "/" in the sidebar. Commands include predefined functionality or may be user-defined.
262-
263-**Properties:**
264-
265-- `name`: The command name. Options include "issue", "share", "cmd", "http", "commit", and "review".
266-- `description`: Brief description of the command.
267-- `step`: (Deprecated) Used for built-in commands; set the name for pre-configured options.
268-- `params`: Additional parameters to configure command behavior (command-specific - see code for command)
269-
270-The following commands are built-in and can be added to `config.json` to make them visible:
271-
272-#### `/share`
273-
274-Generate a shareable markdown transcript of your current chat history.
275-
276-```json title="config.json"
277-{
278- "slashCommands": [
279- {
280- "name": "share",
281- "description": "Export the current chat session to markdown",
282- "params": { "outputDir": "~/.continue/session-transcripts" }
283- }
284- ]
285-}
286-```
287-
288-Use the `outputDir` parameter to specify where you want to the markdown file to be saved.
289-
290-#### `/cmd`
291-
292-Generate a shell command from natural language and (only in VS Code) automatically paste it into the terminal.
293-
294-```json title="config.json"
295-{
296- "slashCommands": [
297- {
298- "name": "cmd",
299- "description": "Generate a shell command"
300- }
301- ]
302-}
303-```
304-
305-#### `/commit`
306-
307-Shows the LLM your current git diff and asks it to generate a commit message.
308-
309-```json title="config.json"
310-{
311- "slashCommands": [
312- {
313- "name": "commit",
314- "description": "Generate a commit message for the current changes"
315- }
316- ]
317-}
318-```
319-
320-#### `/http`
321-
322-Write a custom slash command at your own HTTP endpoint. Set 'url' in the params object for the endpoint you have setup. The endpoint should return a sequence of string updates, which will be streamed to the Continue sidebar. See our basic [FastAPI example](https://github.com/continuedev/continue/blob/74002369a5e435735b83278fb965e004ae38a97d/core/context/providers/context_provider_server.py#L34-L45) for reference.
323-
324-```json title="config.json"
325-{
326- "slashCommands": [
327- {
328- "name": "http",
329- "description": "Does something custom",
330- "params": { "url": "<my server endpoint>" }
331- }
332- ]
333-}
334-```
335-
336-#### `/issue`
337-
338-Describe the issue you'd like to generate, and Continue will turn into a well-formatted title and body, then give you a link to the draft so you can submit. Make sure to set the URL of the repository you want to generate issues for.
339-
340-```json title="config.json"
341-{
342- "slashCommands": [
343- {
344- "name": "issue",
345- "description": "Generate a link to a drafted GitHub issue",
346- "params": { "repositoryUrl": "https://github.com/continuedev/continue" }
347- }
348- ]
349-}
350-```
351-
352-#### `/onboard`
353-
354-The onboard slash command helps to familiarize yourself with a new project by analyzing the project structure, READMEs, and dependency files. It identifies key folders, explains their purpose, and highlights popular packages used. Additionally, it offers insights into the project's architecture.
355-
356-```json title="config.json"
357-{
358- "slashCommands": [
359- {
360- "name": "onboard",
361- "description": "Familiarize yourself with the codebase"
362- }
363- ]
364-}
365-```
366-
367-Example:
368-
369-```json title="config.json"
370-{
371- "slashCommands": [
372- {
373- "name": "commit",
374- "description": "Generate a commit message"
375- },
376- {
377- "name": "share",
378- "description": "Export this session as markdown"
379- },
380- {
381- "name": "cmd",
382- "description": "Generate a shell command"
383- }
384- ]
385-}
386-```
387-
388-### `customCommands`
389-
390-User-defined commands for prompt shortcuts in the sidebar, allowing quick access to common actions.
391-
392-**Properties:**
393-
394-- `name`: The name of the custom command.
395-- `prompt`: Text prompt for the command.
396-- `description`: Brief description explaining the command's function.
397-
398-Example:
399-
400-```json title="config.json"
401-{
402- "customCommands": [
403- {
404- "name": "test",
405- "prompt": "Write a comprehensive set of unit tests for the selected code. It should setup, run tests that check for correctness including important edge cases, and teardown. Ensure that the tests are complete and sophisticated. Give the tests just as chat output, don't edit any file.",
406- "description": "Write unit tests for highlighted code"
407- }
408- ]
409-}
410-```
411-
412-### `contextProviders`
413-
414-List of the pre-defined context providers that will show up as options while typing in the chat, and their customization with `params`.
415-
416-**Properties:**
417-
418-- `name`: Name of the context provider, e.g. `docs` or `web`
419-- `params`: A context-provider-specific record of params to configure the context behavior
420-
421-Example
422-
423-```json title="config.json"
424-{
425- "contextProviders": [
426- {
427- "name": "code",
428- "params": {}
429- },
430- {
431- "name": "docs",
432- "params": {}
433- },
434- {
435- "name": "diff",
436- "params": {}
437- },
438- {
439- "name": "open",
440- "params": {}
441- }
442- ]
443-}
444-```
445-
446-### `userToken`
447-
448-An optional token that identifies the user, primarily for authenticated services.
449-
450-### `systemMessage`
451-
452-Defines a system message that appears before every response from the language model, providing guidance or context.
453-
454-### `experimental`
455-
456-Several experimental config parameters are available, as described below:
457-
458-`experimental`:
459-
460-- `defaultContext`: Defines the default context for the LLM. Uses the same format as `contextProviders` but includes an additional `query` property to specify custom query parameters.=
461-- `modelRoles`:
462- - `inlineEdit`: Model title for inline edits.
463- - `applyCodeBlock`: Model title for applying code blocks.
464- - `repoMapFileSelection`: Model title for repo map selections.
465-- `quickActions`: Array of custom quick actions
466- - `title` (**required**): Display title for the quick action.
467- - `prompt` (**required**): Prompt for quick action.
468- - `sendToChat`: If `true`, sends result to chat; else inserts in document. Default is `false`.
469-- `contextMenuPrompts`:
470- - `comment`: Prompt for commenting code.
471- - `docstring`: Prompt for adding docstrings.
472- - `fix`: Prompt for fixing code.
473- - `optimize`: Prompt for optimizing code.
474-- `modelContextProtocolServers`: See [Model Context Protocol](/customization/mcp-tools)
475-
476-Example
477-
478-```json title="config.json"
479-{
480- "experimental": {
481- "modelRoles": {
482- "inlineEdit": "Edit Model"
483- },
484- "quickActions": [
485- {
486- "title": "Tags",
487- "prompt": "Return a list of any function and class names from the included code block",
488- "sendToChat": true
489- }
490- ],
491- "contextMenuPrompts": {
492- "fixGrammar": "Fix grammar in the above but allow for typos."
493- },
494- "modelContextProtocolServers": [
495- {
496- "transport": {
497- "type": "stdio",
498- "command": "uvx",
499- "args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"]
500- }
501- }
502- ]
503- }
504-}
505-```
506-
507-### Fully deprecated settings
508-
509-Some deprecated `config.json` settings are no longer stored in config and have been moved to be editable through the [User Settings Page](/advanced/deep-dives/settings). If found in `config.json`, they will be auto-migrated to User Settings and removed from `config.json`.
510-
511-- `allowAnonymousTelemetry`: This value will be migrated to the safest merged value (`false` if either are `false`).
512-- `promptPath`: This value will override during migration.
513-- `disableIndexing`: This value will be migrated to the safest merged value (`true` if either are `true`).
514-- `disableSessionTitles`/`ui.getChatTitles`: This value will be migrated to the safest merged value (`true` if either are `true`). `getChatTitles` takes precedence if set to false
515-- `tabAutocompleteOptions`
516- - `useCache`: This value will override during migration.
517- - `disableInFiles`: This value will be migrated to the safest merged value (arrays of file matches merged/deduplicated)
518- - `multilineCompletions`: This value will override during migration.
519-- `experimental`
520- - `useChromiumForDocsCrawling`: This value will override during migration.
521- - `readResponseTTS`: This value will override during migration.
522-- `ui` - all will override during migration
523-
524- - `codeBlockToolbarPosition`
525- - `fontSize`
526- - `codeWrap`
527- - `displayRawMarkdown`
528- - `showChatScrollbar`
529-
530- See [User Settings Page](/advanced/deep-dives/settings) for more information about each option.
deleted docs/docs/advanced/model-providers/_category_.json +0 −4
@@ -1,4 +0,0 @@
1-{
2- "label": "Model Providers",
3- "position": 4
4-}
deleted docs/docs/advanced/model-providers/assets/watsonx2.gif +0 −0

Not shown: the file is larger than the hub shows, or this page holds as much as it shows. View the file.

deleted docs/docs/advanced/model-providers/llamastack.mdx +0 −113
@@ -1,113 +0,0 @@
1-import TabItem from "@theme/TabItem";
2-import Tabs from "@theme/Tabs";
3-
4-# Llama Stack
5-
6-[Llama Stack](https://llama-stack.readthedocs.io/en/latest/index.html) is an open-source library that standardizes the core building blocks that simplify AI application development. It codifies best practices across the Llama ecosystem. More specifically, it provides
7-
8-- **Unified API layer** for Inference, RAG, Agents, Tools, Safety, Evals, and Telemetry.
9-- **Plugin architecture** to support the rich ecosystem of different API implementations in various environments, including local development, on-premises, cloud, and mobile.
10-- **Prepackaged verified distributions** which offer a one-stop solution for developers to get started quickly and reliably in any environment.
11-- **Multiple developer interfaces** like CLI and SDKs for Python, Typescript, iOS, and Android.
12-- **Standalone applications** as examples for how to build production-grade AI applications with Llama Stack.
13-
14-To try Llama Stack locally, run:
15-
16-```shell
17-curl -LsSf https://github.com/meta-llama/llama-stack/raw/main/install.sh | bash
18-```
19-
20-Learn more about how to get started with llama stack in this [guide](https://llama-stack.readthedocs.io/en/latest/getting_started/index.html)
21-
22-## Chat model
23-
24-We recommend configuring **Llama 4 Maverick** as your chat model.
25-
26-<Tabs groupId="config-example">
27- <TabItem value="yaml" label="YAML">
28- ```yaml title="config.yaml"
29- models:
30- - name: Llama4 Maverick
31- provider: llamastack
32- model: meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8
33- apiBase: http://<llama stack endpoint>/v1/openai/v1/
34- ```
35- </TabItem>
36- <TabItem value="json" label="JSON">
37- ```json title="config.json"
38- {
39- "models": [
40- {
41- "title": "Llama4 Maverick",
42- "provider": "llamastack",
43- "model": "meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8",
44- "apiBase": "http://<llama stack endpoint>/v1/openai/v1/"
45- }
46- ]
47- }
48- ```
49- </TabItem>
50-</Tabs>
51-
52-## Autocomplete model
53-
54-We recommend configuring **CodeLlama 7B** as your autocomplete model.
55-
56-<Tabs groupId="config-example">
57- <TabItem value="yaml" label="YAML">
58- ```yaml title="config.yaml"
59- models:
60- - name: CodeLlama 7B
61- provider: llamastack
62- model: codellama:7b
63- apiBase: http://<llama stack endpoint>/v1/openai/v1/
64- roles:
65- - autocomplete
66- ```
67- </TabItem>
68- <TabItem value="json" label="JSON">
69- ```json title="config.json"
70- {
71- "tabAutocompleteModel": {
72- "title": "CodeLlama 7B",
73- "provider": "llamastack",
74- "model": "codellama:7b",
75- "apiBase": "http://<llama stack endpoint>/v1/openai/v1/"
76- }
77- }
78- ```
79- </TabItem>
80-</Tabs>
81-
82-## Embeddings model
83-
84-By default, Llama Stack uses **all-MiniLM-L6-v2** as the embeddings model.
85-
86-<Tabs groupId="config-example">
87- <TabItem value="yaml" label="YAML">
88- ```yaml title="config.yaml"
89- models:
90- - name: all-MiniLM-L6-v2
91- provider: llamastack
92- model: all-MiniLM-L6-v2
93- apiBase: http://<llama stack endpoint>/v1/openai/v1/
94- roles:
95- - embed
96- ```
97- </TabItem>
98- <TabItem value="json" label="JSON">
99- ```json title="config.json"
100- {
101- "embeddingsProvider": {
102- "provider": "llamastack",
103- "model": "all-MiniLM-L6-v2",
104- "apiBase": "http://<llama stack endpoint>/v1/openai/v1/"
105- }
106- }
107- ```
108- </TabItem>
109-</Tabs>
110-
111-## Reranking model
112-
113-Llama Stack currently did not support Reranking API yet.
deleted docs/docs/advanced/model-providers/more/SambaNova.mdx +0 −34
@@ -1,34 +0,0 @@
1-import TabItem from "@theme/TabItem";
2-import Tabs from "@theme/Tabs";
3-
4-# SambaNova Cloud
5-
6-The SambaNova Cloud is a cloud platform for running large AI models with the world record open source models performance. You can follow the instructions in [this blog post](https://sambanova.ai/blog/accelerating-coding-with-sambanova-cloud?ref=blog.continue.dev) to configure your setup.
7-
8-<Tabs groupId="config-example">
9- <TabItem value="yaml" label="YAML">
10- ```yaml title="config.yaml"
11- models:
12- - name: SambaNova Llama 4 Scout
13- provider: sambanova
14- model: Llama-4-Scout-17B-16E-Instruct
15- apiKey: <YOUR_SAMBANOVA_API_KEY>
16- ```
17- </TabItem>
18- <TabItem value="json" label="JSON">
19- ```json title="config.json"
20- {
21- "models": [
22- {
23- "title": "SambaNova Llama 4 Scout",
24- "provider": "sambanova",
25- "model": "Llama-4-Scout-17B-16E-Instruct",
26- "apiKey": "<YOUR_SAMBANOVA_API_KEY>"
27- }
28- ]
29- }
30- ```
31- </TabItem>
32-</Tabs>
33-
34-[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/SambaNova.ts)
deleted docs/docs/advanced/model-providers/more/_category_.json +0 −4
@@ -1,4 +0,0 @@
1-{
2- "label": "More Providers",
3- "position": 2
4-}
deleted docs/docs/advanced/model-providers/more/asksage.mdx +0 −91
@@ -1,91 +0,0 @@
1-# Ask Sage
2-
3-import TabItem from "@theme/TabItem";
4-import Tabs from "@theme/Tabs";
5-
6-:::info
7-To get an Ask Sage API key login to the Ask Sage platform (If you don't have an account, you can create one [here](https://chat.asksage.ai/)) and follow the instructions in the Ask Sage Docs: [Ask Sage API Key](https://docs.asksage.ai/docs/api-documentation/api-documentation.html)
8-:::
9-
10-## Configuration
11-
12-To use the Ask Sage models, you can use the following
13-
14-<Tabs groupId="config-example">
15- <TabItem value="yaml" label="YAML">
16- ```yaml title="config.yaml"
17- models:
18- - name: GPT-4 gov
19- provider: askSage
20- model: gpt4-gov
21- apiBase: https://api.asksage.ai/server/
22- apiKey: <YOUR_ASK_SAGE_API_KEY>
23- ```
24- </TabItem>
25- <TabItem value="json" label="JSON">
26- ```json title="config.json"
27- {
28- "models": [
29- {
30- "title": "GPT-4 gov",
31- "provider": "askSage",
32- "model": "gpt4-gov",
33- "apiBase": "https://api.asksage.ai/server/",
34- "apiKey": "<YOUR_ASK_SAGE_API_KEY>"
35- }
36- ]
37- }
38- ```
39- </TabItem>
40-</Tabs>
41-
42-The `apiBase` will be listed on the Ask Sage platform when you generate an `API key`. You will see context as shown below:
43-
44-> Server API for query/training etc.:
45->
46-> - Documentation: https://app.swaggerhub.com/apis-docs/NICOLASCHAILLAN_1/server_ask-sage_api/1.0
47-> - URL for this API is: https://api.asksage.ai/server/
48-
49-## Usage
50-
51-Currently, the setup for the models provided by Ask Sage is to support the following two functionalities provided by Continue.Dev:
52-
53-- `Chat` to understand and iterate on code in the sidebar
54-- `Edit` to modify code without leaving your current file
55-
56-More models, functionalities and documentation will be added in the future for Ask Sage Integration.
57-
58-> We recommend to utilize the `OpenAI` or `Anthropic` models for the best performance and results for the `Chat` and `Edit` functionalities.
59-
60-## Ask Sage Documentation
61-
62-Ask Sage documentation is not available with Continue.Dev, so if you have any questions or need help with Ask Sage type `@ask` and select the `Ask Sage` option in the chat. Then procced to ask your question about Ask Sage.
63-
64-## Current Models From Ask Sage Supported
65-
66-The current Models available provided by Ask Sage are:
67-
68-| Index | Model | Added |
69-| ----- | --------------------- | ----- |
70-| 1 | GPT-4 Gov | ✅ |
71-| 2 | GPT-4o Gov | ✅ |
72-| 3 | GPT-4o-mini Gov | ✅ |
73-| 4 | GPT-3.5-Turbo Gov | ✅ |
74-| 5 | GPT-4o | ✅ |
75-| 6 | GPT-4o-mini | ✅ |
76-| 7 | GPT-4 | ✅ |
77-| 8 | GPT-4-32K | ✅ |
78-| 9 | GPT-o1 | ✅ |
79-| 10 | GPT-o1-mini | ✅ |
80-| 10 | GPT-o3-mini | ✅ |
81-| 11 | GPT-3.5-turbo | ✅ |
82-| 12 | Claude 3.5 Sonnet Gov | ✅ |
83-| 13 | Claude 3 Opus | ✅ |
84-| 14 | Claude 3 Sonet | ✅ |
85-| 15 | Claude 3.5 Sonnet | ✅ |
86-| 16 | Grok (xAI) | ✅ |
87-| 17 | Groq Llama 3.3 | ✅ |
88-| 18 | Groq 70B | ✅ |
89-| 19 | Gemini Pro | ✅ |
90-| 20 | llama 3 | ✅ |
91-| 21 | Mistral Large | ✅ |
deleted docs/docs/advanced/model-providers/more/cerebras.mdx +0 −36
@@ -1,36 +0,0 @@
1-# Cerebras Inference
2-
3-import TabItem from "@theme/TabItem";
4-import Tabs from "@theme/Tabs";
5-
6-Cerebras Inference uses specialized silicon to provides fast inference.
7-
8-1. Create an account in the portal [here](https://cloud.cerebras.ai/).
9-2. Create and copy the API key for use in Continue.
10-3. Update your Continue config file:
11-
12-<Tabs groupId="config-example">
13- <TabItem value="yaml" label="YAML">
14- ```yaml title="config.yaml"
15- models:
16- - name: Cerebras Llama 3.1 70B
17- provider: cerebras
18- model: llama3.1-70b
19- apiKey: <YOUR_CEREBRAS_API_KEY>
20- ```
21- </TabItem>
22- <TabItem value="json" label="JSON">
23- ```json title="config.json"
24- {
25- "models": [
26- {
27- "title": "Cerebras Llama 3.1 70B",
28- "provider": "cerebras",
29- "model": "llama3.1-70b",
30- "apiKey": "<YOUR_CEREBRAS_API_KEY>"
31- }
32- ]
33- }
34- ```
35- </TabItem>
36-</Tabs>
deleted docs/docs/advanced/model-providers/more/cloudflare.mdx +0 −87
@@ -1,87 +0,0 @@
1-import TabItem from "@theme/TabItem";
2-import Tabs from "@theme/Tabs";
3-
4-# Cloudflare Workers AI
5-
6-Cloudflare Workers AI can be used for both chat and tab autocompletion in Continue. Here is an example of Cloudflare Workers AI configuration:
7-
8-<Tabs groupId="config-example">
9- <TabItem value="yaml" label="YAML">
10- ```yaml title="config.yaml"
11- models:
12- - name: Llama 3 8B
13- provider: cloudflare
14- apiKey: <YOUR_CLOUDFARE_API_KEY>
15- model: "@cf/meta/llama-3-8b-instruct"
16- contextLength: 2400
17- defaultCompletionOptions:
18- maxTokens: 500
19- roles:
20- - chat
21- env:
22- accountId: YOUR CLOUDFLARE ACCOUNT ID
23- - name: DeepSeek Coder 6.7b Instruct
24- provider: cloudflare
25- apiKey: <YOUR_CLOUDFARE_API_KEY>
26- model: "@hf/thebloke/deepseek-coder-6.7b-instruct-awq"
27- contextLength: 2400
28- defaultCompletionOptions:
29- maxTokens: 500
30- roles:
31- - chat
32- env:
33- accountId: YOUR CLOUDFLARE ACCOUNT ID
34- - name: DeepSeek 7b
35- provider: cloudflare
36- apiKey: <YOUR_CLOUDFARE_API_KEY>
37- model: "@hf/thebloke/deepseek-coder-6.7b-base-awq"
38- roles:
39- - autocomplete
40- env:
41- accountId: YOUR CLOUDFLARE ACCOUNT ID
42- ```
43- </TabItem>
44- <TabItem value="json" label="JSON">
45- ```json title="config.json"
46- {
47- "models": [
48- {
49- "title": "Llama 3 8B",
50- "provider": "cloudflare",
51- "accountId": "YOUR CLOUDFLARE ACCOUNT ID",
52- "apiKey": "YOUR CLOUDFLARE API KEY",
53- "contextLength": 2400,
54- "completionOptions": {
55- "maxTokens": 500
56- },
57- "model": "@cf/meta/llama-3-8b-instruct"
58- },
59- {
60- "title": "DeepSeek Coder 6.7b Instruct",
61- "provider": "cloudflare",
62- "accountId": "YOUR CLOUDFLARE ACCOUNT ID",
63- "apiKey": "YOUR CLOUDFLARE API KEY",
64- "contextLength": 2400,
65- "completionOptions": {
66- "maxTokens": 500
67- },
68- "model": "@hf/thebloke/deepseek-coder-6.7b-instruct-awq"
69- }
70- ],
71- "tabAutocompleteModel": {
72- "title": "DeepSeek 7b",
73- "provider": "cloudflare",
74- "accountId": "YOUR CLOUDFLARE ACCOUNT ID",
75- "apiKey": "YOUR CLOUDFLARE API KEY",
76- "model": "@hf/thebloke/deepseek-coder-6.7b-base-awq"
77- }
78- }
79- ```
80- </TabItem>
81-</Tabs>
82-
83-Visit the [Cloudflare dashboard](https://dash.cloudflare.com/) to [create an API key](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/).
84-
85-Review [available models](https://developers.cloudflare.com/workers-ai/models/) on Workers AI
86-
87-[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Cloudflare.ts)
deleted docs/docs/advanced/model-providers/more/cohere.mdx +0 −102
@@ -1,102 +0,0 @@
1-import TabItem from "@theme/TabItem";
2-import Tabs from "@theme/Tabs";
3-
4-# Cohere
5-
6-Before using Cohere, visit the [Cohere dashboard](https://dashboard.cohere.com/api-keys) to create an API key.
7-
8-## Chat model
9-
10-We recommend configuring **Command A** as your chat model.
11-
12-<Tabs groupId="config-example">
13- <TabItem value="yaml" label="YAML">
14- ```yaml title="config.yaml"
15- models:
16- - name: Command A 03-2025
17- provider: cohere
18- model: command-a-03-2025
19- apiKey: <YOUR_COHERE_API_KEY>
20- ```
21- </TabItem>
22- <TabItem value="json" label="JSON">
23- ```json title="config.json"
24- {
25- "models": [
26- {
27- "title": "Command A 03-2025",
28- "provider": "cohere",
29- "model": "command-a-03-2025",
30- "apiKey": "<YOUR_COHERE_API_KEY>"
31- }
32- ]
33- }
34- ```
35- </TabItem>
36-</Tabs>
37-
38-## Autocomplete model
39-
40-Cohere currently does not offer any autocomplete models.
41-
42-[Click here](../../model-roles/autocomplete.md) to see a list of autocomplete model providers.
43-
44-## Embeddings model
45-
46-We recommend configuring **embed-v4.0** as your embeddings model.
47-
48-<Tabs groupId="config-example">
49- <TabItem value="yaml" label="YAML">
50- ```yaml title="config.yaml"
51- models:
52- - name: Cohere Embed v4.0
53- provider: cohere
54- model: embed-v4.0
55- apiKey: <YOUR_COHERE_API_KEY>
56- roles:
57- - embed
58- ```
59- </TabItem>
60- <TabItem value="json" label="JSON">
61- ```json title="config.json"
62- {
63- "embeddingsProvider": {
64- "provider": "cohere",
65- "model": "embed-v4.0",
66- "apiKey": "<YOUR_COHERE_API_KEY>"
67- }
68- }
69- ```
70- </TabItem>
71-</Tabs>
72-
73-## Reranking model
74-
75-We recommend configuring **rerank-v3.5** as your reranking model.
76-
77-<Tabs groupId="config-example">
78- <TabItem value="yaml" label="YAML">
79- ```yaml title="config.yaml"
80- models:
81- - name: Cohere Rerank v3.5
82- provider: cohere
83- model: rerank-v3.5
84- apiKey: <YOUR_COHERE_API_KEY>
85- roles:
86- - rerank
87- ```
88- </TabItem>
89- <TabItem value="json" label="JSON">
90- ```json title="config.json"
91- {
92- "reranker": {
93- "name": "cohere",
94- "params": {
95- "model": "rerank-v3.5",
96- "apiKey": "<YOUR_COHERE_API_KEY>"
97- }
98- }
99- }
100- ```
101- </TabItem>
102-</Tabs>
deleted docs/docs/advanced/model-providers/more/deepinfra.mdx +0 −34
@@ -1,34 +0,0 @@
1-import Tabs from "@theme/Tabs";
2-import TabItem from "@theme/TabItem";
3-
4-# DeepInfra
5-
6-[DeepInfra](https://deepinfra.com) provides inference for open-source models at very low cost. To get started with DeepInfra, obtain your API key [here](https://deepinfra.com/dash). Then, find the model you want to use [here](https://deepinfra.com/models?type=text-generation) and copy the name of the model. Continue can then be configured to use the `DeepInfra` LLM class, like the example here:
7-
8-<Tabs groupId="config-example">
9- <TabItem value="yaml" label="YAML">
10- ```yaml title="config.yaml"
11- models:
12- - name: DeepInfra
13- provider: deepinfra
14- model: mistralai/Mixtral-8x7B-Instruct-v0.1
15- apiKey: <YOUR_DEEP_INFRA_API_KEY>
16- ```
17- </TabItem>
18- <TabItem value="json" label="JSON">
19- ```json title="config.json"
20- {
21- "models": [
22- {
23- "provider": "deepinfra",
24- "title": "DeepInfra",
25- "model": "mistralai/Mixtral-8x7B-Instruct-v0.1",
26- "apiKey": "<YOUR_DEEP_INFRA_API_KEY>"
27- }
28- ]
29- }
30- ```
31- </TabItem>
32-</Tabs>
33-
34-[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/DeepInfra.ts)
deleted docs/docs/advanced/model-providers/more/flowise.mdx +0 −34
@@ -1,34 +0,0 @@
1-import TabItem from "@theme/TabItem";
2-import Tabs from "@theme/Tabs";
3-
4-# Flowise
5-
6-[Flowise](https://flowiseai.com/) is a low-code/no-code drag & drop tool with the aim to make it easy for people to visualize and build LLM apps. Continue can then be configured to use the `Flowise` LLM class, like the example here:
7-
8-<Tabs groupId="config-example">
9- <TabItem value="yaml" label="YAML">
10- ```yaml title="config.yaml"
11- models:
12- - name: Flowise
13- provider: flowise
14- model: <MODEL>
15- apiBase: <API_BASE>
16- ```
17- </TabItem>
18- <TabItem value="json" label="JSON">
19- ```json title="config.json"
20- {
21- "models": [
22- {
23- "provider": "flowise",
24- "title": "Flowise",
25- "model": "<MODEL>",
26- "apiBase": "<API_BASE>"
27- }
28- ]
29- }
30- ```
31- </TabItem>
32-</Tabs>
33-
34-[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Flowise.ts)
deleted docs/docs/advanced/model-providers/more/function-network.mdx +0 −116
@@ -1,116 +0,0 @@
1----
2-title: Function Network
3-slug: ../function-network
4----
5-
6-import TabItem from "@theme/TabItem";
7-import Tabs from "@theme/Tabs";
8-
9-# Function Network
10-
11-> Private, Affordable User-Owned AI
12-
13-:::info
14-
15-To get an API key, login to the Function Network Developer Platform. If you don't have an account, you can create one [here](https://www.function.network/join-waitlist).
16-
17-:::
18-
19-## Chat model
20-
21-Function Network supports a number of models for chat. We recommend using LLama 3.1 70b or Qwen2.5-Coder-32B-Instruct.
22-
23-<Tabs groupId="config-example">
24- <TabItem value="yaml" label="YAML">
25- ```yaml title="config.yaml"
26- models:
27- - name: Llama 3.1 70b
28- provider: function-network
29- model: meta/llama-3.1-70b-instruct
30- apiKey: <YOUR_FUNCTION_NETWORK_API_KEY>
31- roles:
32- - chat
33- ```
34- </TabItem>
35- <TabItem value="json" label="JSON">
36- ```json title="config.json"
37- {
38- "models": [
39- {
40- "title": "Llama 3.1 70b",
41- "provider": "function-network",
42- "model": "meta/llama-3.1-70b-instruct",
43- "apiKey": "<YOUR_FUNCTION_NETWORK_API_KEY>"
44- }
45- ]
46- }
47- ```
48- </TabItem>
49-</Tabs>
50-
51-[Click here](https://docs.function.network/models-supported/chat-and-code-completion) to see a list of chat model providers.
52-
53-## Autocomplete model
54-
55-Function Network supports a number of models for autocomplete. We recommend using Llama 3.1 8b or Qwen2.5-Coder-1.5B.
56-
57-<Tabs groupId="config-example">
58- <TabItem value="yaml" label="YAML">
59- ```yaml title="config.yaml"
60- models:
61- - name: Deepseek Coder 6.7b
62- provider: function-network
63- model: thebloke/deepseek-coder-6.7b-base-awq
64- apiKey: <YOUR_FUNCTION_NETWORK_API_KEY>
65- roles:
66- - autocomplete
67- ```
68- </TabItem>
69- <TabItem value="json" label="JSON">
70- ```json title="config.json"
71- {
72- "tabAutocompleteModel": {
73- "title": "Deepseek Coder 6.7b",
74- "provider": "function-network",
75- "model": "thebloke/deepseek-coder-6.7b-base-awq",
76- "apiKey": "<YOUR_FUNCTION_NETWORK_API_KEY>"
77- }
78- }
79- ```
80- </TabItem>
81-</Tabs>
82-
83-## Embeddings model
84-
85-Function Network supports a number of models for embeddings. We recommend using baai/bge-base-en-v1.5.
86-
87-<Tabs groupId="config-example">
88- <TabItem value="yaml" label="YAML">
89- ```yaml title="config.yaml"
90- models:
91- - name: BGE Base En
92- provider: function-network
93- model: baai/bge-base-en-v1.5
94- apiKey: <YOUR_FUNCTION_NETWORK_API_KEY>
95- roles:
96- - embed
97- ```
98- </TabItem>
99- <TabItem value="json" label="JSON">
100- ```json title="config.json"
101- {
102- "embeddingsProvider": {
103- "provider": "function-network",
104- "model": "baai/bge-base-en-v1.5",
105- "apiKey": "<YOUR_FUNCTION_NETWORK_API_KEY>"
106- }
107- }
108- ```
109- </TabItem>
110-</Tabs>
111-
112-[Click here](https://docs.function.network/models-supported/embeddings) to see a list of embeddings model providers.
113-
114-## Reranking model
115-
116-Function Network currently does not offer any reranking models.
deleted docs/docs/advanced/model-providers/more/groq.mdx +0 −41
@@ -1,41 +0,0 @@
1-import TabItem from "@theme/TabItem";
2-import Tabs from "@theme/Tabs";
3-
4-# Groq
5-
6-:::info
7-Check if your chosen model is still supported by referring to the [model documentation](https://console.groq.com/docs/models). If a model has been deprecated, you may encounter a 404 error when attempting to use it.
8-:::
9-
10-Groq provides the fastest available inference for open-source language models, including the entire Llama 3.1 family.
11-
12-1. Obtain an API key [here](https://console.groq.com/keys)
13-2. Update your Continue config file like this:
14-
15-<Tabs groupId="config-example">
16- <TabItem value="yaml" label="YAML">
17- ```yaml title="config.yaml"
18- models:
19- - name: Llama 3.3 70b Versatile
20- provider: groq
21- model: llama-3.3-70b-versatile
22- apiKey: <YOUR_GROQ_API_KEY>
23- roles:
24- - chat
25- ```
26- </TabItem>
27- <TabItem value="json" label="JSON">
28- ```json title="config.json"
29- {
30- "models": [
31- {
32- "title": "Llama 3.3 70b Versatile",
33- "provider": "groq",
34- "model": "llama-3.3-70b-versatile",
35- "apiKey": "<YOUR_GROQ_API_KEY>"
36- }
37- ]
38- }
39- ```
40- </TabItem>
41-</Tabs>
deleted docs/docs/advanced/model-providers/more/huggingfaceinferenceapi.mdx +0 −36
@@ -1,36 +0,0 @@
1-import Tabs from "@theme/Tabs";
2-import TabItem from "@theme/TabItem";
3-
4-# HuggingFace Inference Endpoints
5-
6-Hugging Face Inference Endpoints are an easy way to setup instances of open-source language models on any cloud. Sign up for an account and add billing [here](https://huggingface.co/settings/billing), access the Inference Endpoints [here](https://ui.endpoints.huggingface.co), click on “New endpoint”, and fill out the form (e.g. select a model like [WizardCoder-Python-34B-V1.0](https://huggingface.co/WizardLM/WizardCoder-Python-34B-V1.0)), and then deploy your model by clicking “Create Endpoint”. Change `~/.continue/config.json` to look like this:
7-
8-<Tabs groupId="config-example">
9- <TabItem value="yaml" label="YAML">
10- ```yaml title="config.yaml"
11- models:
12- - name: Hugging Face Inference API
13- provider: huggingface-inference-api
14- model: MODEL_NAME
15- apiKey: <YOUR_HF_TOKEN>
16- apiBase: <YOUR_HF_INFERENCE_API_ENDPOINT_URL>
17- ```
18- </TabItem>
19- <TabItem value="json" label="JSON">
20- ```json title="config.json"
21- {
22- "models": [
23- {
24- "title": "Hugging Face Inference API",
25- "provider": "huggingface-inference-api",
26- "model": "MODEL_NAME",
27- "apiKey": "<YOUR_HF_TOKEN>",
28- "apiBase": "<YOUR_HF_INFERENCE_API_ENDPOINT_URL>"
29- }
30- ]
31- }
32- ```
33- </TabItem>
34-</Tabs>
35-
36-[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/HuggingFaceInferenceAPI.ts)
deleted docs/docs/advanced/model-providers/more/ipex_llm.mdx +0 −66
@@ -1,66 +0,0 @@
1-import TabItem from "@theme/TabItem";
2-import Tabs from "@theme/Tabs";
3-
4-# IPEX-LLM
5-
6-:::info
7-[**IPEX-LLM**](https://github.com/intel-analytics/ipex-llm) is a PyTorch library for running LLM on Intel CPU and GPU (e.g., local PC with iGPU, discrete GPU such as Arc A-Series, Flex and Max) with very low latency.
8-:::
9-
10-IPEX-LLM supports accelerated Ollama backend to be hosted on Intel GPU. Refer to [this guide](https://ipex-llm.readthedocs.io/en/latest/doc/LLM/Quickstart/ollama_quickstart.html) from IPEX-LLM official documentation about how to install and run Ollama serve accelerated by IPEX-LLM on Intel GPU. You can then configure Continue to use the IPEX-LLM accelerated `"ollama"` provider as follows:
11-
12-<Tabs groupId="config-example">
13- <TabItem value="yaml" label="YAML">
14- ```yaml title="config.yaml"
15- models:
16- - name: IPEX-LLM
17- provider: ollama
18- model: AUTODETECT
19- ```
20- </TabItem>
21- <TabItem value="json" label="JSON">
22- ```json title="config.json"
23- {
24- "models": [
25- {
26- "title": "IPEX-LLM",
27- "provider": "ollama",
28- "model": "AUTODETECT"
29- }
30- ]
31- }
32- ```
33- </TabItem>
34-</Tabs>
35-
36-If you would like to reach the Ollama service from another machine, make sure you set or export the environment variable `OLLAMA_HOST=0.0.0.0` before executing the command `ollama serve`. Then, in the Continue configuration, set `'apiBase'` to correspond with the IP address / port of the remote machine. That is, Continue can be configured to be:
37-
38-<Tabs groupId="config-example">
39- <TabItem value="yaml" label="YAML">
40- ```yaml title="config.yaml"
41- models:
42- - name: IPEX-LLM
43- provider: ollama
44- model: AUTODETECT
45- apiBase: http://your-ollama-service-ip:11434
46- ```
47- </TabItem>
48- <TabItem value="json" label="JSON">
49- ```json title="config.json"
50- {
51- "models": [
52- {
53- "title": "IPEX-LLM",
54- "provider": "ollama",
55- "model": "AUTODETECT",
56- "apiBase": "http://your-ollama-service-ip:11434"
57- }
58- ]
59- }
60- ```
61- </TabItem>
62-</Tabs>
63-
64-:::tip
65-If you would like to preload the model before your first conversation with that model in Continue, you could refer to [here](https://ipex-llm.readthedocs.io/en/latest/doc/LLM/Quickstart/continue_quickstart.html#pull-and-prepare-the-model) for more information.
66-:::
deleted docs/docs/advanced/model-providers/more/kindo.mdx +0 −69
@@ -1,69 +0,0 @@
1-import TabItem from "@theme/TabItem";
2-import Tabs from "@theme/Tabs";
3-
4-# Kindo
5-
6-Kindo offers centralized control over your organization's AI operations, ensuring data protection and compliance with internal policies while supporting various commercial and open-source models. To get started, sign up [here](https://app.kindo.ai/), create an API key in [Settings > API > API Keys](https://app.kindo.ai/settings/api), and choose a model from the list of supported models in the "Available Models" tab or copy and paste the config in [Plugins > Your Configuration](https://app.kindo.ai/plugins).
7-
8-## Config Example
9-
10-<Tabs groupId="config-example">
11- <TabItem value="yaml" label="YAML">
12- ```yaml title="config.yaml"
13- models:
14- - name: Claude 3.5 Sonnet
15- provider: kindo
16- model: claude-3-5-sonnet
17- apiKey: <YOUR_KINDO_API_KEY>
18- ```
19- </TabItem>
20- <TabItem value="json" label="JSON">
21- ```json title="config.json"
22- {
23- "models": [
24- {
25- "title": "Claude 3.5 Sonnet",
26- "provider": "kindo",
27- "model": "claude-3-5-sonnet",
28- "apiKey": "<YOUR_KINDO_API_KEY>"
29- }
30- ]
31- }
32- ```
33- </TabItem>
34-</Tabs>
35-
36-## Tab Autocomplete Config Example
37-
38-<Tabs groupId="config-example">
39- <TabItem value="yaml" label="YAML">
40- ```yaml title="config.yaml"
41- models:
42- - name: WhiteRabbitNeo
43- provider: kindo
44- model: /models/WhiteRabbitNeo-33B-DeepSeekCoder
45- apiKey: <YOUR_KINDO_API_KEY>
46- roles:
47- - autocomplete
48- ```
49- </TabItem>
50- <TabItem value="json" label="JSON">
51- ```json title="config.json"
52- {
53- "tabAutocompleteModel": [
54- {
55- "title": "WhiteRabbitNeo",
56- "provider": "kindo",
57- "model": "/models/WhiteRabbitNeo-33B-DeepSeekCoder",
58- "apiKey": "<YOUR_KINDO_API_KEY>",
59- "template": "none"
60- }
61- ]
62- }
63- ```
64- </TabItem>
65-</Tabs>
66-
67-## Security
68-
69-To update your organization's model access, adjust the controls in [security settings](https://app.kindo.ai/security-settings).
deleted docs/docs/advanced/model-providers/more/llamacpp.mdx +0 −40
@@ -1,40 +0,0 @@
1-import TabItem from "@theme/TabItem";
2-import Tabs from "@theme/Tabs";
3-
4-# LlamaCpp
5-
6-Run the llama.cpp server binary to start the API server. If running on a remote server, be sure to set host to 0.0.0.0:
7-
8-```bash
9-.\server.exe -c 4096 --host 0.0.0.0 -t 16 --mlock -m models\meta\llama\codellama-7b-instruct.Q8_0.gguf
10-```
11-
12-After it's up and running, change `~/.continue/config.json` to look like this:
13-
14-<Tabs groupId="config-example">
15- <TabItem value="yaml" label="YAML">
16- ```yaml title="config.yaml"
17- models:
18- - name: Llama CPP
19- provider: llama.cpp
20- model: MODEL_NAME
21- apiBase: http://localhost:8080
22- ```
23- </TabItem>
24- <TabItem value="json" label="JSON">
25- ```json title="config.json"
26- {
27- "models": [
28- {
29- "title": "Llama CPP",
30- "provider": "llama.cpp",
31- "model": "MODEL_NAME",
32- "apiBase": "http://localhost:8080"
33- }
34- ]
35- }
36- ```
37- </TabItem>
38-</Tabs>
39-
40-[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/LlamaCpp.ts)
deleted docs/docs/advanced/model-providers/more/llamafile.mdx +0 −32
@@ -1,32 +0,0 @@
1-import Tabs from "@theme/Tabs";
2-import TabItem from "@theme/TabItem";
3-
4-# Llamafile
5-
6-A [llamafile](https://github.com/Mozilla-Ocho/llamafile#readme) is a self-contained binary that can run an open-source LLM. You can configure this provider in your config.json as follows:
7-
8-<Tabs groupId="config-example">
9- <TabItem value="yaml" label="YAML">
10- ```yaml title="config.yaml"
11- models:
12- - name: Llamafile
13- provider: llamafile
14- model: mistral-7b
15- ```
16- </TabItem>
17- <TabItem value="json" label="JSON">
18- ```json title="config.json"
19- {
20- "models": [
21- {
22- "title": "Llamafile",
23- "provider": "llamafile",
24- "model": "mistral-7b"
25- }
26- ]
27- }
28- ```
29- </TabItem>
30-</Tabs>
31-
32-[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Llamafile.ts)
deleted docs/docs/advanced/model-providers/more/lmstudio.mdx +0 −88
@@ -1,88 +0,0 @@
1-import TabItem from "@theme/TabItem";
2-import Tabs from "@theme/Tabs";
3-
4-# LM Studio
5-
6-[LM Studio](https://lmstudio.ai) is an application for Mac, Windows, and Linux that makes it easy to locally run open-source models and comes with a great UI. To get started with LM Studio, download from the website, use the UI to download a model, and then start the local inference server. Continue can then be configured to use the `LMStudio` LLM class:
7-
8-<Tabs groupId="config-example">
9- <TabItem value="yaml" label="YAML">
10- ```yaml title="config.yaml"
11- models:
12- - name: LM Studio
13- provider: lmstudio
14- model: llama2-7b
15- ```
16- </TabItem>
17- <TabItem value="json" label="JSON">
18- ```json title="config.json"
19- {
20- "models": [
21- {
22- "title": "LM Studio",
23- "provider": "lmstudio",
24- "model": "llama2-7b"
25- }
26- ]
27- }
28- ```
29- </TabItem>
30-</Tabs>
31-
32-### Embeddings model
33-
34-LMStudio supports embeddings endpoints, and comes with the `nomic-ai/nomic-embed-text-v1.5-GGUF` model (as of Nov 2024, check your models)
35-
36-<Tabs groupId="config-example">
37- <TabItem value="yaml" label="YAML">
38- ```yaml title="config.yaml"
39- models:
40- - name: Nomic Embed Text
41- provider: lmstudio
42- model: nomic-ai/nomic-embed-text-v1.5-GGUF
43- roles:
44- - embed
45- ```
46- </TabItem>
47- <TabItem value="json" label="JSON">
48- ```json title="config.json"
49- {
50- "embeddingsProvider": {
51- "provider": "lmstudio",
52- "model": "nomic-ai/nomic-embed-text-v1.5-GGUF"
53- }
54- }
55- ```
56- </TabItem>
57-</Tabs>
58-
59-## Setting up a remote instance
60-
61-To configure a remote instance of LM Studio, add the `"apiBase"` property to your model in config.json:
62-
63-<Tabs groupId="config-example">
64- <TabItem value="yaml" label="YAML">
65- ```yaml title="config.yaml"
66- models:
67- - name: Nomic Embed Text
68- provider: lmstudio
69- model: nomic-ai/nomic-embed-text-v1.5-GGUF
70- roles:
71- - embed
72- ```
73- </TabItem>
74- <TabItem value="json" label="JSON">
75- ```json title="config.json"
76- {
77- "embeddingsProvider": {
78- "provider": "lmstudio",
79- "model": "nomic-ai/nomic-embed-text-v1.5-GGUF"
80- }
81- }
82- ```
83- </TabItem>
84-</Tabs>
85-
86-This `apiBase` will now be used instead of the default `http://localhost:1234/v1`.
87-
88-[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/LMStudio.ts)
deleted docs/docs/advanced/model-providers/more/moonshot.mdx +0 −94
@@ -1,94 +0,0 @@
1-import TabItem from "@theme/TabItem";
2-import Tabs from "@theme/Tabs";
3-
4-# Moonshot
5-
6-[Moonshot AI](https://platform.moonshot.cn/) provides high-quality large language model services with competitive pricing and excellent performance.
7-
8-## Configuration
9-
10-To use Moonshot AI models, you need to:
11-
12-1. Get an API key from [Moonshot AI Platform](https://platform.moonshot.cn/)
13-2. Add the following configuration:
14-
15-<Tabs groupId="config-example">
16- <TabItem value="yaml" label="YAML">
17- ```yaml title="config.yaml"
18- models:
19- - name: Moonshot
20- provider: moonshot
21- model: moonshot-v1-8k
22- apiKey: <YOUR_MOONSHOT_API_KEY>
23- ```
24- </TabItem>
25- <TabItem value="json" label="JSON">
26- ```json title="config.json"
27- {
28- "models": [
29- {
30- "title": "Moonshot",
31- "provider": "moonshot",
32- "model": "moonshot-v1-8k",
33- "apiKey": "<YOUR_MOONSHOT_API_KEY>"
34- }
35- ]
36- }
37- ```
38- </TabItem>
39-</Tabs>
40-
41-## Available Models
42-
43-Moonshot AI currently provides the following models:
44-
45-- `moonshot-v1-8k`: Base model with 8K context window
46-- `moonshot-v1-32k`: Base model with 32K context window
47-- `moonshot-v1-128k`: Base model with 128K context window
48-
49-## Configuration Options
50-
51-| Option | Description | Default |
52-| --------- | ----------------- | ----------------------------- |
53-| `apiKey` | Moonshot API key | Required |
54-| `apiBase` | API base URL | `https://api.moonshot.cn/v1/` |
55-| `model` | Model name to use | `moonshot-v1-8k` |
56-
57-## Example
58-
59-Here's a complete configuration example:
60-
61-<Tabs groupId="config-example">
62- <TabItem value="yaml" label="YAML">
63- ```yaml title="config.yaml"
64- models:
65- - name: Moonshot-8K
66- provider: moonshot
67- model: moonshot-v1-8k
68- apiKey: <YOUR_MOONSHOT_API_KEY>
69- defaultCompletionOptions:
70- temperature: 0.7
71- topP: 0.95
72- maxTokens: 2048
73- ```
74- </TabItem>
75- <TabItem value="json" label="JSON">
76- ```json title="config.json"
77- {
78- "models": [
79- {
80- "title": "Moonshot-8K",
81- "provider": "moonshot",
82- "model": "moonshot-v1-8k",
83- "apiKey": "<YOUR_MOONSHOT_API_KEY>",
84- "completionOptions": {
85- "temperature": 0.7,
86- "topP": 0.95,
87- "maxTokens": 2048
88- }
89- }
90- ]
91- }
92- ```
93- </TabItem>
94-</Tabs>
deleted docs/docs/advanced/model-providers/more/morph.mdx +0 −112
@@ -1,112 +0,0 @@
1-import Tabs from "@theme/Tabs";
2-import TabItem from "@theme/TabItem";
3-
4-# Morph
5-
6-Morph provides a fast apply model that helps you quickly and accurately apply code changes from chat suggestions to your files. It's optimized for speed and precision when integrating generated code into your existing codebase. You can sign up for Morph's generous free tier [here](https://morphllm.com/dashboard). Then, update your configuration file as follows:
7-
8-<Tabs groupId="config-example">
9- <TabItem value="yaml" label="YAML">
10- ```yaml title="config.yaml"
11- models:
12- - uses: morphllm/morph-v0
13- with:
14- MORPH_API_KEY: ${{ secrets.MORPH_API_KEY }}
15-```
16-or
17-```yaml title="config.yaml"
18- - name: Morph Fast Apply
19- provider: openai
20- model: morph-v2
21- apiKey: <YOUR_MORPH_API_KEY>
22- apiBase: https://api.morphllm.com/v1/
23- roles:
24- - apply
25- promptTemplates:
26- apply: "<code>{{{ original_code }}}</code>\n<update>{{{ new_code }}}</update>"
27- ```
28- </TabItem>
29- <TabItem value="json" label="JSON">
30- ```json title="config.json"
31- {
32- "models": [
33- {
34- "title": "Morph Fast Apply",
35- "provider": "openai",
36- "model": "morph-v2",
37- "apiKey": "<YOUR_MORPH_API_KEY>",
38- "apiBase": "https://api.morphllm.com/v1/",
39- "roles": ["apply"],
40- "promptTemplates": {
41- "apply": "<code>{{{ original_code }}}</code>\n<update>{{{ new_code }}}</update>"
42- }
43- }
44- ]
45- }
46- ```
47- </TabItem>
48-</Tabs>
49-
50-## Embeddings model
51-
52-We recommend configuring **morph-embedding-v2** as your embeddings model.
53-
54-<Tabs groupId="config-example">
55- <TabItem value="yaml" label="YAML">
56- ```yaml title="config.yaml"
57- models:
58- - name: Morph Embeddings
59- provider: openai
60- model: morph-embedding-v2
61- apiKey: <YOUR_MORPH_API_KEY>
62- apiBase: https://api.morphllm.com/v1/
63- roles:
64- - embed
65- ```
66- </TabItem>
67- <TabItem value="json" label="JSON">
68- ```json title="config.json"
69- {
70- "embeddingsProvider": {
71- "provider": "openai",
72- "model": "morph-embedding-v2",
73- "apiKey": "<YOUR_MORPH_API_KEY>",
74- "apiBase": "https://api.morphllm.com/v1/"
75- }
76- }
77- ```
78- </TabItem>
79-</Tabs>
80-
81-## Reranking model
82-
83-We recommend configuring **morph-rerank-v2** as your reranking model.
84-
85-<Tabs groupId="config-example">
86- <TabItem value="yaml" label="YAML">
87- ```yaml title="config.yaml"
88- models:
89- - name: Morph Reranker
90- provider: cohere
91- model: morph-rerank-v2
92- apiKey: <YOUR_MORPH_API_KEY>
93- apiBase: https://api.morphllm.com/v1/
94- roles:
95- - rerank
96- ```
97- </TabItem>
98- <TabItem value="json" label="JSON">
99- ```json title="config.json"
100- {
101- "reranker": {
102- "name": "cohere",
103- "params": {
104- "model": "morph-rerank-v2",
105- "apiKey": "<YOUR_MORPH_API_KEY>",
106- "apiBase": "https://api.morphllm.com/v1/"
107- }
108- }
109- }
110- ```
111- </TabItem>
112-</Tabs>
deleted docs/docs/advanced/model-providers/more/msty.mdx +0 −79
@@ -1,79 +0,0 @@
1-import TabItem from "@theme/TabItem";
2-import Tabs from "@theme/Tabs";
3-
4-# Msty
5-
6-[Msty](https://msty.app/) is an application for Windows, Mac, and Linux that makes it really easy to run online as well as local open-source models, including Llama-2, DeepSeek Coder, etc. No need to fidget with your terminal, run a command, or anything. Just download the app from the website, click a button, and you are up and running. Continue can then be configured to use the `Msty` LLM class:
7-
8-<Tabs groupId="config-example">
9- <TabItem value="yaml" label="YAML">
10- ```yaml title="config.yaml"
11- models:
12- - name: Msty
13- provider: msty
14- model: deepseek-coder:6.7b
15- ```
16- </TabItem>
17- <TabItem value="json" label="JSON">
18- ```json title="config.json"
19- {
20- "models": [
21- {
22- "title": "Msty",
23- "provider": "msty",
24- "model": "deepseek-coder:6.7b",
25- }
26- ]
27- }
28- ```
29- </TabItem>
30-</Tabs>
31-
32-## Completion Options
33-
34-In addition to the model type, you can also configure some of the parameters that Msty uses to run the model.
35-
36-- temperature: options.temperature - This is a parameter that controls the randomness of the generated text. Higher values result in more creative but potentially less coherent outputs, while lower values lead to more predictable and focused outputs.
37-- top_p: options.topP - This sets a threshold (between 0 and 1) to control how diverse the predicted tokens should be. The model generates tokens that are likely according to their probability distribution, but also considers the top-k most probable tokens.
38-- top_k: options.topK - This parameter limits the number of unique tokens to consider when generating the next token in the sequence. Higher values increase the variety of generated sequences, while lower values lead to more focused outputs.
39-- num_predict: options.maxTokens - This determines the maximum number of tokens (words or characters) to generate for the given input prompt.
40-- num_thread: options.numThreads - This is the multi-threading configuration option that controls how many threads the model uses for parallel processing. Higher values may lead to faster generation times but could also increase memory usage and complexity. Set this to one or two lower than the number of threads your CPU can handle to leave some for your GUI when running the model locally.
41-- use_mmap: options.useMmap - For Ollama, this parameter allows the model to be mapped into memory. If disabled can enhance response time on low end devices but will slow down the stream.
42-
43-## Authentication
44-
45-If you need to send custom headers for authentication, you may use the `requestOptions.headers` property like this:
46-
47-<Tabs groupId="config-example">
48- <TabItem value="yaml" label="YAML">
49- ```yaml title="config.yaml"
50- models:
51- - name: Msty
52- provider: msty
53- model: deepseek-coder:6.7b
54- requestOptions:
55- headers:
56- Authorization: Bearer xxx
57- ```
58- </TabItem>
59- <TabItem value="json" label="JSON">
60- ```json title="config.json"
61- {
62- "models": [
63- {
64- "title": "Msty",
65- "provider": "msty",
66- "model": "deepseek-coder:6.7b",
67- "requestOptions": {
68- "headers": {
69- "Authorization": "Bearer xxx"
70- }
71- }
72- }
73- ]
74- }
75- ```
76- </TabItem>
77-</Tabs>
78-
79-[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Msty.ts)
deleted docs/docs/advanced/model-providers/more/ncompass.mdx +0 −34
@@ -1,34 +0,0 @@
1-import Tabs from "@theme/Tabs";
2-import TabItem from "@theme/TabItem";
3-
4-# nCompass
5-
6-The nCompass Technologies API exposes an extremely fast inference engine for open-source language models. You can sign up [here](https://app.ncompass.tech/api-settings), copy your API key on the initial welcome screen, and then hit the play button on any model from the [nCompass Models list](https://ncompass.tech/models). Change `~/.continue/config.json` to look like this:
7-
8-<Tabs groupId="config-example">
9- <TabItem value="yaml" label="YAML">
10- ```yaml title="Package or config.yaml"
11- models:
12- - name: Ncompass Gemma 3 Coder
13- provider: ncompass
14- model: google/gemma-3-27b-it
15- apiKey: <YOUR_NCOMPASS_API_KEY>
16- ```
17- </TabItem>
18- <TabItem value="json" label="JSON">
19- ```json title="config.json"
20- {
21- "models": [
22- {
23- "title": "Ncompass Gemma 3 Coder",
24- "provider": "ncompass",
25- "model": "google/gemma-3-27b-it",
26- "apiKey": "<YOUR_NCOMPASS_API_KEY>"
27- }
28- ]
29- }
30- ```
31- </TabItem>
32-</Tabs>
33-
34-[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/NCompass.ts)
deleted docs/docs/advanced/model-providers/more/nebius.mdx +0 −67
@@ -1,67 +0,0 @@
1-import TabItem from "@theme/TabItem";
2-import Tabs from "@theme/Tabs";
3-
4-# Nebius AI Studio
5-
6-You can get an API key from the [Nebius AI Studio API keys page](https://studio.nebius.ai/settings/api-keys)
7-
8-## Availible models
9-
10-Available models can be found on the [Nebius AI Studio models page](https://studio.nebius.ai/models/text2text)
11-
12-## Chat model
13-
14-<Tabs groupId="config-example">
15- <TabItem value="yaml" label="YAML">
16- ```yaml title="config.yaml"
17- models:
18- - name: DeepSeek R1
19- provider: nebius
20- model: deepseek-ai/DeepSeek-R1
21- apiKey: <YOUR_NEBIUS_API_KEY>
22- ```
23- </TabItem>
24- <TabItem value="json" label="JSON">
25- ```json title="config.json"
26- {
27- "models": [
28- {
29- "title": "DeepSeek R1",
30- "provider": "nebius",
31- "model": "deepseek-ai/DeepSeek-R1",
32- "apiKey": "<YOUR_NEBIUS_API_KEY>"
33- }
34- ]
35- }
36- ```
37- </TabItem>
38-</Tabs>
39-
40-## Embeddings model
41-
42-Available models can be found on the [Nebius AI Studio embeddings page](https://studio.nebius.ai/models/embedding)
43-
44-<Tabs groupId="config-example">
45- <TabItem value="yaml" label="YAML">
46- ```yaml title="config.yaml"
47- models:
48- - name: BAAI Embedder
49- provider: nebius
50- model: BAAI/bge-en-icl
51- apiKey: <YOUR_NEBIUS_API_KEY>
52- roles:
53- - embed
54- ```
55- </TabItem>
56- <TabItem value="json" label="JSON">
57- ```json title="config.json"
58- {
59- "embeddingsProvider": {
60- "provider": "nebius",
61- "model": "BAAI/bge-en-icl",
62- "apiKey": "<YOUR_NEBIUS_API_KEY>"
63- }
64- }
65- ```
66- </TabItem>
67-</Tabs>
deleted docs/docs/advanced/model-providers/more/novita.mdx +0 −34
@@ -1,34 +0,0 @@
1-import TabItem from "@theme/TabItem";
2-import Tabs from "@theme/Tabs";
3-
4-# Novita
5-
6-[Novita AI](https://novita.ai?utm_source=github_continuedev&utm_medium=github_readme&utm_campaign=github_link) offers an affordable, reliable, and simple inference platform with scalable [LLM API](https://novita.ai/docs/model-api/reference/introduction.html), empowering developers to build AI applications. Try the [Novita AI Llama 3 API Demo](https://novita.ai/model-api/product/llm-api/playground/meta-llama-llama-3.1-70b-instruct?utm_source=github_continuedev&utm_medium=github_readme&utm_campaign=github_link) today!. You can sign up [here](https://novita.ai/user/login?&redirect=/&utm_source=github_continuedev&utm_medium=github_readme&utm_campaign=github_link), copy your API key on the [Key Management](https://novita.ai/settings/key-management?utm_source=github_continuedev&utm_medium=github_readme&utm_campaign=github_link), and then hit the play button on any model from the [Novita AI Models list](https://novita.ai/llm-api?utm_source=github_continuedev&utm_medium=github_readme&utm_campaign=github_link). Change `~/.continue/config.json` to look like this:
7-
8-<Tabs groupId="config-example">
9- <TabItem value="yaml" label="YAML">
10- ```yaml title="config.yaml"
11- models:
12- - name: Llama 3.1 8B
13- provider: novita
14- model: meta-llama/llama-3.1-8b-instruct
15- apiKey: <YOUR_NOVITA_API_KEY>
16- ```
17- </TabItem>
18- <TabItem value="json" label="JSON">
19- ```json title="config.json"
20- {
21- "models": [
22- {
23- "title": "Llama 3.1 8B",
24- "provider": "novita",
25- "model": "meta-llama/llama-3.1-8b-instruct",
26- "apiKey": "<YOUR_NOVITA_API_KEY>"
27- }
28- ]
29- }
30- ```
31- </TabItem>
32-</Tabs>
33-
34-[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Novita.ts)
deleted docs/docs/advanced/model-providers/more/nvidia.mdx +0 −81
@@ -1,81 +0,0 @@
1----
2-title: NVIDIA
3----
4-
5-import TabItem from "@theme/TabItem";
6-import Tabs from "@theme/Tabs";
7-
8-:::info
9-[View the docs](https://docs.nvidia.com/nim/large-language-models/latest/getting-started.html#option-1-from-api-catalog) to learn how to get an API key.
10-:::
11-
12-## Chat model
13-
14-We recommend configuring **Nemotron-4-340B-Instruct** as your chat model.
15-
16-<Tabs groupId="config-example">
17- <TabItem value="yaml" label="YAML">
18- ```yaml title="config.yaml"
19- models:
20- - name: Nemotron-4-340B-Instruct
21- provider: nvidia
22- model: nvidia-nemotron-4-340b-instruct
23- apiKey: <YOUR_NVIDIA_API_KEY>
24- ```
25- </TabItem>
26- <TabItem value="json" label="JSON">
27- ```json title="config.json"
28- {
29- "models": [
30- {
31- "title": "Nemotron-4-340B-Instruct",
32- "provider": "nvidia",
33- "model": "nvidia-nemotron-4-340b-instruct",
34- "apiKey": "<YOUR_NVIDIA_API_KEY>"
35- }
36- ]
37- }
38- ```
39- </TabItem>
40-</Tabs>
41-
42-## Autocomplete model
43-
44-NVIDIA currently does not offer any autocomplete models.
45-
46-[Click here](../../model-roles/autocomplete.md) to see a list of autocomplete model providers.
47-
48-## Embeddings model
49-
50-We recommend configuring **NVIDIA Retrieval QA Mistral 7B** as your embeddings model.
51-
52-<Tabs groupId="config-example">
53- <TabItem value="yaml" label="YAML">
54- ```yaml title="config.yaml"
55- models:
56- - name: Nvidia Embedder
57- provider: nvidia
58- model: nvidia/nv-embedqa-mistral-7b-v2
59- apiKey: <YOUR_NVIDIA_API_KEY>
60- roles:
61- - embed
62- ```
63- </TabItem>
64- <TabItem value="json" label="JSON">
65- ```json title="config.json"
66- {
67- "embeddingsProvider": {
68- "provider": "nvidia",
69- "model": "nvidia/nv-embedqa-mistral-7b-v2",
70- "apiKey": "<YOUR_NVIDIA_API_KEY>"
71- }
72- }
73- ```
74- </TabItem>
75-</Tabs>
76-
77-## Reranking model
78-
79-NVIDIA currently does not offer any reranking models.
80-
81-[Click here](../../model-roles/reranking.mdx) to see a list of reranking model providers.
deleted docs/docs/advanced/model-providers/more/openrouter.mdx +0 −74
@@ -1,74 +0,0 @@
1-import TabItem from "@theme/TabItem";
2-import Tabs from "@theme/Tabs";
3-
4-# OpenRouter
5-
6-OpenRouter is a unified interface for commercial and open-source models, giving you access to the best models at the best prices. You can sign up [here](https://openrouter.ai/signup), create your API key on the [keys page](https://openrouter.ai/keys), and then choose a model from the [list of supported models](https://openrouter.ai/models).
7-
8-Change `~/.continue/config.json` to look like the following.
9-
10-<Tabs groupId="config-example">
11- <TabItem value="yaml" label="YAML">
12- ```yaml title="config.yaml"
13- models:
14- - name: OpenRouter LLaMA 70 8B
15- provider: openrouter
16- model: meta-llama/llama-3-70b-instruct
17- apiBase: https://openrouter.ai/api/v1
18- apiKey: <YOUR_OPEN_ROUTER_API_KEY>
19- ```
20- </TabItem>
21- <TabItem value="json" label="JSON">
22- ```json title="config.json"
23- {
24- "models": [
25- {
26- "title": "OpenRouter LLaMA 70 8B",
27- "provider": "openrouter",
28- "model": "meta-llama/llama-3-70b-instruct",
29- "apiBase": "https://openrouter.ai/api/v1",
30- "apiKey": "<YOUR_OPEN_ROUTER_API_KEY>"
31- }
32- ]
33- }
34- ```
35- </TabItem>
36-</Tabs>
37-
38-To utilize features such as provider preferences or model routing configuration, include these parameters inside the `models[].requestsOptions.extraBodyProperties` field of your plugin config.
39-
40-For example, to prevent extra long prompts from being compressed, you can explicitly turn off the feature like so:
41-
42-<Tabs groupId="config-example">
43- <TabItem value="yaml" label="YAML">
44- ```yaml title="config.yaml"
45- models:
46- - name: Example Model
47- provider: exampleProvider
48- model: example-model
49- requestOptions:
50- extraBodyProperties:
51- transforms: []
52- ```
53- </TabItem>
54- <TabItem value="json" label="JSON">
55- ```json title="config.json"
56- {
57- "models": [
58- {
59- "title": "Example Model",
60- "provider": "exampleProvider",
61- "model": "example-model",
62- "requestOptions": {
63- "extraBodyProperties": {
64- "transforms": []
65- }
66- }
67- }
68- ]
69- }
70- ```
71- </TabItem>
72-</Tabs>
73-
74-Learn more about available settings [here](https://openrouter.ai/docs).
deleted docs/docs/advanced/model-providers/more/openvino_model_server.mdx +0 −29
@@ -1,29 +0,0 @@
1-# OpenVINO™ Model Server
2-
3-:::info
4-[**OpenVINO™ Mode Server**](https://github.com/openvinotoolkit/model_server) is scalable inference server for models optimized with OpenVINO™ for Intel CPU, iGPU, GPU and NPU.
5-:::
6-
7-OpenVINO™ Mode Server supports text generation via OpenAI Chat Completions API. Simply select OpenAI provider to point `apiBase` to running OVMS instance. Refer [to this demo](https://docs.openvino.ai/2025/model-server/ovms_demos_code_completion_vsc.html) on official OVMS documentation to easily set up your own local server.
8-
9-Example configuration once OVMS is launched:
10-
11-```yaml title="config.yaml"
12-models:
13- - name: OVMS CodeLlama-7b-Instruct-hf
14- provider: openai
15- model: codellama/CodeLlama-7b-Instruct-hf
16- apiKey: unused
17- apiBase: http://localhost:5555/v3
18- roles:
19- - chat
20- - edit
21- - apply
22- - name: OVMS Qwen2.5-Coder-1.5B
23- provider: openai
24- model: Qwen/Qwen2.5-Coder-1.5B
25- apiKey: unused
26- apiBase: http://localhost:5555/v3
27- roles:
28- - autocomplete
29-```
deleted docs/docs/advanced/model-providers/more/ovhcloud.mdx +0 −72
@@ -1,72 +0,0 @@
1----
2-title: OVHcloud AI Endpoints
3----
4-
5-import TabItem from "@theme/TabItem";
6-import Tabs from "@theme/Tabs";
7-
8-OVHcloud AI Endpoints is a serverless inference API that provides access to a curated selection of models (e.g., Llama, Mistral, Qwen, Deepseek). It is designed with security and data privacy in mind and is compliant with GDPR.
9-
10-:::info
11-To get started, create an API key on the OVHcloud [AI Endpoints website](https://endpoints.ai.cloud.ovh.net/). For more information, including pricing, visit the OVHcloud [AI Endpoints product page](https://www.ovhcloud.com/en/public-cloud/ai-endpoints/).
12-:::
13-
14-## Chat model
15-
16-We recommend configuring **Qwen2.5-Coder-32B-Instruct** as your chat model.
17-Check our [catalog](https://endpoints.ai.cloud.ovh.net/catalog) to see all of our models hsoted on AI Endpoints.
18-
19-<Tabs groupId="config-example">
20- <TabItem value="yaml" label="YAML">
21- ```yaml title="config.yaml"
22- models:
23- - name: Qwen2.5-Coder-32B-Instruct
24- provider: ovhcloud
25- model: qwen2.5-coder-32b
26- apiKey: <YOUR_AIENDPOINTS_API_KEY>
27- ```
28- </TabItem>
29- <TabItem value="json" label="JSON">
30- ```json title="config.json"
31- {
32- "models": [
33- {
34- "title": "Qwen2.5-Coder-32B-Instruct",
35- "provider": "ovhcloud",
36- "model": "qwen2.5-coder-32b",
37- "apiKey": "<YOUR_AIENDPOINTS_API_KEY>"
38- }
39- ]
40- }
41- ```
42- </TabItem>
43-</Tabs>
44-
45-## Embeddings model
46-
47-We recommend configuring **bge-multilingual-gemma2** as your embeddings model.
48-
49-<Tabs groupId="config-example">
50- <TabItem value="yaml" label="YAML">
51- ```yaml title="config.yaml"
52- models:
53- - name: BGE Multilingual Gemma2
54- provider: ovhcloud
55- model: bge-multilingual-gemma2
56- apiKey: <YOUR_AIENDPOINTS_API_KEY>
57- roles:
58- - embed
59- ```
60- </TabItem>
61- <TabItem value="json" label="JSON">
62- ```json title="config.json"
63- {
64- "embeddingsProvider": {
65- "provider": "ovhcloud",
66- "model": "bge-multilingual-gemma2",
67- "apiKey": "<YOUR_AIENDPOINTS_API_KEY>"
68- }
69- }
70- ```
71- </TabItem>
72-</Tabs>
deleted docs/docs/advanced/model-providers/more/relace.mdx +0 −38
@@ -1,38 +0,0 @@
1-import Tabs from "@theme/Tabs";
2-import TabItem from "@theme/TabItem";
3-
4-# Relace
5-
6-Relace provides a fast apply model through their API that helps you reliably and almost instantly apply chat suggestions to your codebase. You can sign up and obtain an API key [here](https://app.relace.ai/settings/api-keys). Then, change your configuration file to look like this:
7-
8-<Tabs groupId="config-example">
9- <TabItem value="yaml" label="YAML">
10- ```yaml title="Package or config.yaml"
11- models:
12- - name: Relace Fast Apply
13- provider: relace
14- model: Fast-Apply
15- apiKey: <YOUR_RELACE_API_KEY>
16- roles:
17- - apply
18- promptTemplates:
19- apply: "{{{ new_code }}}"
20- ```
21- </TabItem>
22- <TabItem value="json" label="JSON">
23- ```json title="config.json"
24- {
25- "models": [
26- {
27- "title": "Relace Fast Apply",
28- "provider": "relace",
29- "model": "Fast-Apply",
30- "apiKey": "<YOUR_RELACE_API_KEY>"
31- }
32- ]
33- }
34- ```
35- </TabItem>
36-</Tabs>
37-
38-[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Relace.ts)
deleted docs/docs/advanced/model-providers/more/replicatellm.mdx +0 −36
@@ -1,36 +0,0 @@
1-import TabItem from "@theme/TabItem";
2-import Tabs from "@theme/Tabs";
3-
4-# ReplicateLLM
5-
6-Replicate is a great option for newly released language models or models that you've deployed through their platform. Sign up for an account [here](https://replicate.ai/), copy your API key, and then select any model from the [Replicate Streaming List](https://replicate.com/collections/streaming-language-models). Change `~/.continue/config.json` to look like this:
7-
8-<Tabs groupId="config-example">
9- <TabItem value="yaml" label="YAML">
10- ```yaml title="config.yaml"
11- models:
12- - name: Replicate CodeLLama
13- provider: replicate
14- model: codellama-13b
15- apiKey: <YOUR_REPLICATE_API_KEY>
16- ```
17- </TabItem>
18- <TabItem value="json" label="JSON">
19- ```json title="config.json"
20- {
21- "models": [
22- {
23- "title": "Replicate CodeLLama",
24- "provider": "replicate",
25- "model": "codellama-13b",
26- "apiKey": "<YOUR_REPLICATE_API_KEY>"
27- }
28- ]
29- }
30- ```
31- </TabItem>
32-</Tabs>
33-
34-If you don't specify the `model` parameter, it will default to `replicate/llama-2-70b-chat:58d078176e02c219e11eb4da5a02a7830a283b14cf8f94537af893ccff5ee781`.
35-
36-[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Replicate.ts)
deleted docs/docs/advanced/model-providers/more/sagemaker.mdx +0 −57
@@ -1,57 +0,0 @@
1-import Tabs from "@theme/Tabs";
2-import TabItem from "@theme/TabItem";
3-
4-# AWS SageMaker
5-
6-SageMaker can be used for both chat and embedding models. Chat models are supported for endpoints deployed with [LMI](https://docs.djl.ai/docs/serving/serving/docs/lmi/index.html), and embedding models are supported for endpoints deployed with [HuggingFace TEI](https://huggingface.co/blog/sagemaker-huggingface-embedding)
7-
8-Here is an example Sagemaker configuration setup:
9-
10-<Tabs groupId="config-example">
11- <TabItem value="yaml" label="YAML">
12- ```yaml title="config.yaml"
13- models:
14- - name: deepseek-6.7b-instruct
15- provider: sagemaker
16- model: lmi-model-deepseek-coder-xxxxxxx
17- region: us-west-2
18- roles:
19- - chat
20- - name: mxbai-embed
21- provider: sagemaker
22- model: mxbai-embed-large-v1-endpoint
23- roles:
24- - embed
25- ```
26- </TabItem>
27- <TabItem value="json" label="JSON">
28- ```json title="config.json"
29- {
30- "models": [
31- {
32- "title": "deepseek-6.7b-instruct",
33- "provider": "sagemaker",
34- "model": "lmi-model-deepseek-coder-xxxxxxx",
35- "region": "us-west-2"
36- }
37- ],
38- "embeddingsProvider": {
39- "provider": "sagemaker",
40- "model": "mxbai-embed-large-v1-endpoint"
41- }
42- }
43- ```
44- </TabItem>
45-</Tabs>
46-
47-The value in model should be the SageMaker endpoint name you deployed.
48-
49-Authentication will be through temporary or long-term credentials in
50-~/.aws/credentials under a profile called "sagemaker".
51-
52-```title="~/.aws/credentials
53-[sagemaker]
54-aws_access_key_id = abcdefg
55-aws_secret_access_key = hijklmno
56-aws_session_token = pqrstuvwxyz # Optional: means short term creds.
57-```
deleted docs/docs/advanced/model-providers/more/scaleway.mdx +0 −78
@@ -1,78 +0,0 @@
1----
2-title: Scaleway
3----
4-
5-import TabItem from "@theme/TabItem";
6-import Tabs from "@theme/Tabs";
7-
8-:::info
9-Scaleway Generative APIs give you instant access to leading AI models hosted in European data centers, ideal for developers requiring low latency, full data privacy, and compliance with EU AI Act.
10-You can generate your API key in [Scaleway's console](https://console.scaleway.com/generative-api/models).
11-Read the [quickstart documentation here](https://www.scaleway.com/en/docs/ai-data/generative-apis/quickstart/).
12-:::
13-
14-## Chat model
15-
16-We recommend configuring **Qwen2.5-Coder-32B-Instruct** as your chat model.
17-[Click here](https://www.scaleway.com/en/docs/ai-data/generative-apis/reference-content/supported-models/) to see the list of available chat models.
18-
19-<Tabs groupId="config-example">
20- <TabItem value="yaml" label="YAML">
21- ```yaml title="config.yaml"
22- models:
23- - name: Qwen2.5-Coder-32B-Instruct
24- provider: scaleway
25- model: qwen2.5-coder-32b-instruct
26- apiKey: <YOUR_SCALEWAY_API_KEY>
27- ```
28- </TabItem>
29- <TabItem value="json" label="JSON">
30- ```json title="config.json"
31- {
32- "models": [
33- {
34- "title": "Qwen2.5-Coder-32B-Instruct",
35- "provider": "scaleway",
36- "model": "qwen2.5-coder-32b-instruct",
37- "apiKey": "<YOUR_SCALEWAY_API_KEY>"
38- }
39- ]
40- }
41- ```
42- </TabItem>
43-</Tabs>
44-
45-## Autocomplete model
46-
47-Scaleway currently does not offer any autocomplete models.
48-
49-[Click here](../../model-roles/autocomplete.md) to see a list of autocomplete model providers.
50-
51-## Embeddings model
52-
53-We recommend configuring **BGE-Multilingual-Gemma2** as your embeddings model.
54-
55-<Tabs groupId="config-example">
56- <TabItem value="yaml" label="YAML">
57- ```yaml title="config.yaml"
58- models:
59- - name: BGE Multilingual Gemma2
60- provider: scaleway
61- model: bge-multilingual-gemma2
62- apiKey: <YOUR_SCALEWAY_API_KEY>
63- roles:
64- - embed
65- ```
66- </TabItem>
67- <TabItem value="json" label="JSON">
68- ```json title="config.json"
69- {
70- "embeddingsProvider": {
71- "provider": "scaleway",
72- "model": "bge-multilingual-gemma2",
73- "apiKey": "<YOUR_SCALEWAY_API_KEY>"
74- }
75- }
76- ```
77- </TabItem>
78-</Tabs>
deleted docs/docs/advanced/model-providers/more/siliconflow.mdx +0 −88
@@ -1,88 +0,0 @@
1----
2-title: SiliconFlow
3----
4-
5-import Tabs from "@theme/Tabs";
6-import TabItem from "@theme/TabItem";
7-
8-:::info
9-You can get an API key from the [Silicon Cloud](https://cloud.siliconflow.cn/account/ak).
10-:::
11-
12-## Chat model
13-
14-We recommend configuring **Qwen/Qwen2.5-Coder-32B-Instruct** as your chat model.
15-
16-<Tabs groupId="config-example">
17- <TabItem value="yaml" label="YAML">
18- ```yaml title="config.yaml"
19- models:
20- - name: Qwen
21- provider: siliconflow
22- model: Qwen/Qwen2.5-Coder-32B-Instruct
23- apiKey: <YOUR_SILICONFLOW_API_KEY>
24- roles:
25- - chat
26- ```
27- </TabItem>
28- <TabItem value="json" label="JSON">
29- ```json title="config.json"
30- {
31- "models": [
32- {
33- "title": "Qwen",
34- "provider": "siliconflow",
35- "model": "Qwen/Qwen2.5-Coder-32B-Instruct",
36- "apiKey": "<YOUR_SILICONFLOW_API_KEY>"
37- }
38- ]
39- }
40- ```
41- </TabItem>
42-</Tabs>
43-
44-## Autocomplete model
45-
46-We recommend configuring **Qwen/Qwen2.5-Coder-7B-Instruct** as your autocomplete model.
47-
48-<Tabs groupId="config-example">
49- <TabItem value="yaml" label="YAML">
50- ```yaml title="config.yaml"
51- models:
52- - name: Qwen
53- provider: siliconflow
54- model: Qwen/Qwen2.5-Coder-32B-Instruct
55- apiKey: <YOUR_SILICONFLOW_API_KEY>
56- roles:
57- - autocomplete
58- ```
59- </TabItem>
60- <TabItem value="json" label="JSON">
61- ```json title="config.json"
62- {
63- "models": [
64- {
65- "title": "Qwen",
66- "provider": "siliconflow",
67- "model": "Qwen/Qwen2.5-Coder-32B-Instruct",
68- "apiKey": "<YOUR_SILICONFLOW_API_KEY>"
69- }
70- ]
71- "tabAutocompleteModel": {
72- "title": "Qwen",
73- "provider": "siliconflow",
74- "model": "Qwen/Qwen2.5-Coder-7B-Instruct",
75- "apiKey": "<YOUR_SILICONFLOW_API_KEY>"
76- }
77- }
78- ```
79- </TabItem>
80-</Tabs>
81-
82-## Embeddings model
83-
84-SiliconFlow provide some embeddings models. [Click here](https://siliconflow.cn/models) to see a list of embeddings models.
85-
86-## Reranking model
87-
88-SiliconFlow provide some reranking models. [Click here](https://siliconflow.cn/models) to see a list of reranking models.
deleted docs/docs/advanced/model-providers/more/textgenwebui.mdx +0 −32
@@ -1,32 +0,0 @@
1-import TabItem from "@theme/TabItem";
2-import Tabs from "@theme/Tabs";
3-
4-# TextGenWebUI
5-
6-TextGenWebUI is a comprehensive, open-source language model UI and local server. You can set it up with an OpenAI-compatible server plugin, and then configure it like this:
7-
8-<Tabs groupId="config-example">
9- <TabItem value="yaml" label="YAML">
10- ```yaml title="config.yaml"
11- models:
12- - name: Text Generation WebUI
13- provider: text-gen-webui
14- apiBase: http://localhost:5000/v1
15- model: MODEL_NAME
16- ```
17- </TabItem>
18- <TabItem value="json" label="JSON">
19- ```json title="config.json"
20- {
21- "models": [
22- {
23- "title": "Text Generation WebUI",
24- "provider": "text-gen-webui",
25- "apiBase": "http://localhost:5000/v1",
26- "model": "MODEL_NAME"
27- }
28- ]
29- }
30- ```
31- </TabItem>
32-</Tabs>
deleted docs/docs/advanced/model-providers/more/together.mdx +0 −34
@@ -1,34 +0,0 @@
1-import TabItem from "@theme/TabItem";
2-import Tabs from "@theme/Tabs";
3-
4-# Together
5-
6-The Together API is a cloud platform for running large AI models. You can sign up [here](https://api.together.xyz/signup), copy your API key on the initial welcome screen, and then hit the play button on any model from the [Together Models list](https://docs.together.ai/docs/serverless-models). Change `~/.continue/config.json` to look like this:
7-
8-<Tabs groupId="config-example">
9- <TabItem value="yaml" label="YAML">
10- ```yaml title="config.yaml"
11- models:
12- - name: Together Qwen2.5 Coder
13- provider: together
14- model: Qwen/Qwen2.5-Coder-32B-Instruct
15- apiKey: <YOUR_TOGETHER_API_KEY>
16- ```
17- </TabItem>
18- <TabItem value="json" label="JSON">
19- ```json title="config.json"
20- {
21- "models": [
22- {
23- "title": "Together Qwen2.5 Coder",
24- "provider": "together",
25- "model": "Qwen/Qwen2.5-Coder-32B-Instruct",
26- "apiKey": "<YOUR_TOGETHER_API_KEY>"
27- }
28- ]
29- }
30- ```
31- </TabItem>
32-</Tabs>
33-
34-[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Together.ts)
deleted docs/docs/advanced/model-providers/more/venice.md +0 −35
@@ -1,35 +0,0 @@
1-# Venice
2-
3-Venice.AI is a privacy focused generative AI platform, allowing users to interact with open-source LLMs without storing any private user data. To get started with Venice's API, either purchase a pro account, stake $VVV to obtain daily inference allotments or fund your account with USD and head over to https://venice.ai/settings/api. Venice hosts state of the art open-source AI models and supports the OpenAI API standard, allowing users to easily interact with the platform. Learn more about the Venice API at https://venice.ai/api.
4-
5-Change `~/.continue/config.json` to look like the following.
6-
7-```json title="config.json"
8-{
9- "models": [
10- {
11- "provider": "venice",
12- "title": "Autodetect",
13- "model": "AUTODETECT",
14- "apiKey": "..."
15- }
16- ]
17-}
18-```
19-
20-To utilize features offered by the venice API that are not apart of the standard OpenAI API schema, include these as `venice_parameters`
21-
22-For example, to use models with no system prompt, you can explicitly turn off the feature like so:
23-
24-```json title="config.json"
25-{
26- "completionOptions": {
27- "venice_parameters": {
28- "include_venice_system_prompt" : false
29- },
30- ...
31- }
32-}
33-```
34-
35-Learn more about available settings [here](https://docs.venice.ai/api-reference/api-spec).
deleted docs/docs/advanced/model-providers/more/vllm.mdx +0 −107
@@ -1,107 +0,0 @@
1-import TabItem from "@theme/TabItem";
2-import Tabs from "@theme/Tabs";
3-
4-# vLLM
5-
6-vLLM is an open-source library for fast LLM inference which typically is used to serve multiple users at the same time. It can also be used to run a large model on multiple GPU:s (e.g. when it doesn´t fit in a single GPU). Run their OpenAI-compatible server using `vllm serve`. See their [server documentation](https://docs.vllm.ai/en/latest/serving/openai_compatible_server.html) and the [engine arguments documentation](https://docs.vllm.ai/en/latest/usage/engine_args.html).
7-
8-```shell
9-vllm serve meta-llama/Meta-Llama-3.1-8B-Instruct
10-```
11-
12-## Chat model
13-
14-We recommend configuring **Llama3.1 8B** as your chat model.
15-
16-<Tabs groupId="config-example">
17- <TabItem value="yaml" label="YAML">
18- ```yaml title="config.yaml"
19- models:
20- - name: Llama3.1 8B Instruct
21- provider: vllm
22- model: meta-llama/Meta-Llama-3.1-8B-Instruct
23- apiBase: http://<vllm chat endpoint>/v1
24- ```
25- </TabItem>
26- <TabItem value="json" label="JSON">
27- ```json title="config.json"
28- {
29- "models": [
30- {
31- "title": "Llama3.1 8B Instruct",
32- "provider": "vllm",
33- "model": "meta-llama/Meta-Llama-3.1-8B-Instruct",
34- "apiBase": "http://<vllm chat endpoint>/v1"
35- }
36- ]
37- }
38- ```
39- </TabItem>
40-</Tabs>
41-
42-## Autocomplete model
43-
44-We recommend configuring **Qwen2.5-Coder 1.5B** as your autocomplete model.
45-
46-<Tabs groupId="config-example">
47- <TabItem value="yaml" label="YAML">
48- ```yaml title="config.yaml"
49- models:
50- - name: Qwen2.5-Coder 1.5B
51- provider: vllm
52- model: Qwen/Qwen2.5-Coder-1.5B
53- apiBase: http://<vllm autocomplete endpoint>/v1
54- roles:
55- - autocomplete
56- ```
57- </TabItem>
58- <TabItem value="json" label="JSON">
59- ```json title="config.json"
60- {
61- "tabAutocompleteModel": {
62- "title": "Qwen2.5-Coder 1.5B",
63- "provider": "vllm",
64- "model": "Qwen/Qwen2.5-Coder-1.5B",
65- "apiBase": "http://<vllm autocomplete endpoint>/v1"
66- }
67- }
68- ```
69- </TabItem>
70-</Tabs>
71-
72-## Embeddings model
73-
74-We recommend configuring **Nomic Embed Text** as your embeddings model.
75-
76-<Tabs groupId="config-example">
77- <TabItem value="yaml" label="YAML">
78- ```yaml title="config.yaml"
79- models:
80- - name: VLLM Nomad Embed Text
81- provider: vllm
82- model: nomic-ai/nomic-embed-text-v1
83- apiBase: http://<vllm embed endpoint>/v1
84- roles:
85- - embed
86- ```
87- </TabItem>
88- <TabItem value="json" label="JSON">
89- ```json title="config.json"
90- {
91- "embeddingsProvider": {
92- "provider": "vllm",
93- "model": "nomic-ai/nomic-embed-text-v1",
94- "apiBase": "http://<vllm embed endpoint>/v1"
95- }
96- }
97- ```
98- </TabItem>
99-</Tabs>
100-
101-## Reranking model
102-
103-Continue automatically handles vLLM's response format (which uses `results` instead of `data`).
104-
105-[Click here](../../model-roles/reranking.mdx) to see a list of reranking model providers.
106-
107-The continue implementation uses [OpenAI](../top-level/openai.mdx) under the hood. [View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Vllm.ts)
deleted docs/docs/advanced/model-providers/more/watsonx.mdx +0 −279
@@ -1,279 +0,0 @@
1-import TabItem from "@theme/TabItem";
2-import Tabs from "@theme/Tabs";
3-
4-# IBM watsonx
5-
6-watsonx, developed by IBM, offers a variety of pre-trained AI foundation models that can be used for natural language processing (NLP), computer vision, and speech recognition tasks.
7-
8-## Setup
9-
10-Accessing watsonx models can be done either through watsonx SaaS on IBM Cloud or using a dedicated watsonx.ai Software instance.
11-
12-### watsonx.ai SaaS - IBM Cloud
13-
14-To get started with watsonx SaaS, visit the [registration page](https://dataplatform.cloud.ibm.com/registration/stepone?context=wx). If you do not have an existing IBM Cloud account, you can sign up for a free trial.
15-
16-To authenticate to watsonx.ai SaaS with Continue, you will need to create a project and [set up an API key](https://www.ibm.com/docs/en/mas-cd/continuous-delivery?topic=cli-creating-your-cloud-api-key). Then, in continue:
17-
18-- Set **apiBase** to your watsonx SaaS endpoint, e.g. `https://us-south.ml.cloud.ibm.com` for US South region.
19-- Set **projectId** to your watsonx project ID.
20-- Set **apiKey** to your watsonx API Key.
21-
22-### watsonx.ai Software
23-
24-To authenticate to your watsonx.ai Software instance with Continue, you can use either `username/password` or `ZenApiKey` method:
25-
26-1. _Option 1_ (Recommended): using `ZenApiKey` authentication:
27- - Set **apiBase** to your watsonx software endpoint, e.g. `https://cpd-watsonx.apps.example.com`.
28- - Set **projectId** to your watsonx project ID.
29- - Set **apiKey** to your watsonx Zen API Key. To generate it:
30- 1. Log in to the CPD web client.
31- 2. From the toolbar, click your avatar.
32- 3. Click **Profile and settings**.
33- 4. Click **API key** > **Generate new key**.
34- 5. Click **Generate**.
35- 6. Click **Copy** and save your key somewhere safe. You cannot recover this key if you lose it.
36- 7. Generate your ZenApiKey by running the following command in your preferred terminal: `echo "<username>:<apikey>" | base64`, replacing `<username>` with your CPD username and `<apikey>` with the API Key you just created.
37-2. _Option 2_: using `username/password` authentication:
38- - Set **apiBase** to your watsonx software endpoint, e.g. `https://cpd-watsonx.apps.example.com`.
39- - Set **projectId** to your watsonx project ID.
40- - Set **API Key** to your watsonx Username and Password using `username:password` as format.
41-
42-## Configuration
43-
44-Add the following configuration:
45-
46-<Tabs groupId="config-example">
47- <TabItem value="yaml" label="YAML">
48- ```yaml title="config.yaml"
49- models:
50- - name: watsonx - Model Name
51- provider: watsonx
52- model: model ID
53- apiBase: https://us-south.ml.cloud.ibm.com
54- apiKey: API_KEY/ZENAPI_KEY/USERNAME:PASSWORD
55- env:
56- projectId: PROJECT_ID
57- apiVersion: 2024-03-14
58- ```
59- </TabItem>
60- <TabItem value="json" label="JSON">
61- ```json title="config.json"
62- {
63- "models": [
64- {
65- "model": "model ID",
66- "title": "watsonx - Model Name",
67- "provider": "watsonx",
68- "apiBase": "https://us-south.ml.cloud.ibm.com",
69- "projectId": "PROJECT_ID",
70- "apiKey": "API_KEY/ZENAPI_KEY/USERNAME:PASSWORD",
71- "apiVersion": "2024-03-14"
72- }
73- ]
74- }
75- ```
76- </TabItem>
77-</Tabs>
78-
79-`apiVersion` is optional and defaults to the latest version.
80-
81-If you are using a custom deployment endpoint, set `deploymentID` to the model's deployment ID. You can find it in the watsonx.ai Prompt Lab UI by selecting the corresponding model and opening the `</>` tab on the right, which will display the endpoint's URL containing the deployment ID.
82-
83-<Tabs groupId="config-example">
84- <TabItem value="yaml" label="YAML">
85- ```yaml title="config.yaml"
86- models:
87- - name: watsonx - Model Name
88- provider: watsonx
89- model: model ID
90- apiBase: watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com
91- apiKey: API_KEY/ZENAPI_KEY/USERNAME:PASSWORD
92- env:
93- apiVersion: 2024-03-14
94- deploymentId: DEPLOYMENT_ID
95- ```
96- </TabItem>
97- <TabItem value="json" label="JSON">
98- ```json title="config.json"
99- {
100- "models": [
101- {
102- "model": "model ID",
103- "title": "watsonx - Model Name",
104- "provider": "watsonx",
105- "apiBase": "watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com",
106- "apiKey": "API_KEY/ZENAPI_KEY/USERNAME:PASSWORD",
107- "apiVersion": "2024-03-14",
108- "deploymentId": "DEPLOYMENT_ID"
109- }
110- ]
111- }
112- ```
113- </TabItem>
114-</Tabs>
115-
116-### Configuration Options
117-
118-Make sure to specify a template name, such as `granite` or `llama3`, and to set the `contextLength` to the model's context window size.
119-You can also configure generation parameters, such as temperature, topP, topK, frequency penalty, and stop sequences:
120-
121-<Tabs groupId="config-example">
122- <TabItem value="yaml" label="YAML">
123- ```yaml title="config.yaml"
124- models:
125- - name: Granite Code 20b
126- provider: watsonx
127- model: ibm/granite-20b-code-instruct
128- apiBase: watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com
129- apiKey: API_KEY/ZENAPI_KEY/USERNAME:PASSWORD
130- template: granite
131- defaultCompletionOptions:
132- contextLength: 8000
133- temperature: 0.1
134- topP: 0.3
135- topK: 20
136- maxTokens: 2000
137- frequencyPenalty: 1.1
138- stop:
139- - Question:
140- - "\n\n\n"
141- env:
142- projectId: PROJECT_ID
143- apiVersion: 2024-03-14
144-
145- ```
146- </TabItem>
147- <TabItem value="json" label="JSON">
148- ```json title="config.json"
149- {
150- "models": [
151- {
152- "model": "ibm/granite-20b-code-instruct",
153- "title": "Granite Code 20b",
154- "provider": "watsonx",
155- "apiBase": "watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com",
156- "projectId": "PROJECT_ID",
157- "apiKey": "API_KEY/ZENAPI_KEY/USERNAME:PASSWORD",
158- "apiVersion": "2024-03-14",
159- "template": "granite",
160- "contextLength": 8000,
161- "completionOptions": {
162- "temperature": 0.1,
163- "topP": 0.3,
164- "topK": 20,
165- "maxTokens": 2000,
166- "frequencyPenalty": 1.1,
167- "stop": ["Question:", "\n\n\n"]
168- }
169- }
170- ]
171- }
172- ```
173- </TabItem>
174-</Tabs>
175-
176-## Tab Auto Complete Model
177-
178-Granite models are recommended for tab auto complete. The configuration is similar to that of the chat models:
179-
180-<Tabs groupId="config-example">
181- <TabItem value="yaml" label="YAML">
182- ```yaml title="config.yaml"
183- models:
184- - name: Granite Code 8b
185- provider: watsonx
186- model: ibm/granite-8b-code-instruct
187- apiBase: watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com
188- projectId: PROJECT_ID
189- apiKey: API_KEY/ZENAPI_KEY/USERNAME:PASSWORD
190- apiVersion: 2024-03-14
191- roles:
192- - autocomplete
193- ```
194- </TabItem>
195- <TabItem value="json" label="JSON">
196- ```json title="config.json"
197- {
198- "tabAutocompleteModel": {
199- "model": "ibm/granite-8b-code-instruct",
200- "title": "Granite Code 8b",
201- "provider": "watsonx",
202- "apiBase": "watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com",
203- "projectId": "PROJECT_ID",
204- "apiKey": "API_KEY/ZENAPI_KEY/USERNAME:PASSWORD",
205- "apiVersion": "2024-03-14",
206- "contextLength": 4000
207- }
208- }
209- ```
210- </TabItem>
211-</Tabs>
212-
213-## Embeddings Model
214-
215-To view the list of available embeddings models, visit [this page](https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-data/fm-models-embed.html?context=wx&pos=2#ibm-provided).
216-
217-<Tabs groupId="config-example">
218- <TabItem value="yaml" label="YAML">
219- ```yaml title="config.yaml"
220- models:
221- - name: Watsonx Embedder
222- provider: watsonx
223- model: ibm/slate-30m-english-rtrvr-v2
224- apiBase: https://us-south.ml.cloud.ibm.com
225- projectId: PROJECT_ID
226- apiKey: API_KEY/ZENAPI_KEY/USERNAME:PASSWORD
227- apiVersion: 2024-03-14
228- roles:
229- - embed
230- ```
231- </TabItem>
232- <TabItem value="json" label="JSON">
233- ```json title="config.json"
234- {
235- "embeddingsProvider": {
236- "provider": "watsonx",
237- "model": "ibm/slate-30m-english-rtrvr-v2",
238- "apiBase": "watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com",
239- "projectId": "PROJECT_ID",
240- "apiKey": "API_KEY/ZENAPI_KEY/USERNAME:PASSWORD",
241- "apiVersion": "2024-03-14"
242- }
243- }
244- ```
245- </TabItem>
246-</Tabs>
247-
248-## Reranker
249-
250-<Tabs groupId="config-example">
251- <TabItem value="yaml" label="YAML">
252- ```yaml title="config.yaml"
253- models:
254- - name: Watsonx Reranker
255- provider: watsonx
256- model: cross-encoder/ms-marco-minilm-l-12-v2
257- apiBase: https://us-south.ml.cloud.ibm.com
258- projectId: PROJECT_ID
259- apiKey: API_KEY/ZENAPI_KEY/USERNAME:PASSWORD
260- apiVersion: 2024-03-14
261- ```
262- </TabItem>
263- <TabItem value="json" label="JSON">
264- ```json title="config.json"
265- {
266- "reranker": {
267- "name": "watsonx",
268- "params": {
269- "model": "cross-encoder/ms-marco-minilm-l-12-v2",
270- "apiBase": "watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com",
271- "projectId": "PROJECT_ID",
272- "apiKey": "API_KEY/ZENAPI_KEY/USERNAME:PASSWORD",
273- "apiVersion": "2024-03-14"
274- }
275- }
276- }
277- ```
278- </TabItem>
279-</Tabs>
deleted docs/docs/advanced/model-providers/top-level/_category_.json +0 −4
@@ -1,4 +0,0 @@
1-{
2- "label": "Popular Providers",
3- "position": 1
4-}
deleted docs/docs/advanced/model-providers/top-level/anthropic.mdx +0 −109
@@ -1,109 +0,0 @@
1----
2-title: Anthropic
3-slug: ../anthropic
4----
5-
6-import TabItem from "@theme/TabItem";
7-import Tabs from "@theme/Tabs";
8-
9-:::info
10-You can get an API key from the [Anthropic console](https://console.anthropic.com/account/keys).
11-:::
12-
13-## Chat model
14-
15-We recommend configuring **Claude 4 Sonnet** as your chat model.
16-
17-<Tabs groupId="config-example">
18- <TabItem value="yaml" label="YAML">
19- ```yaml title="config.yaml"
20- models:
21- - name: Claude 4 Sonnet
22- provider: anthropic
23- model: claude-sonnet-4-20250514
24- apiKey: <YOUR_ANTHROPIC_API_KEY>
25- ```
26- </TabItem>
27- <TabItem value="json" label="JSON">
28- ```json title="config.json"
29- {
30- "models": [
31- {
32- "title": "Claude 4 Sonnet",
33- "provider": "anthropic",
34- "model": "claude-sonnet-4-latest",
35- "apiKey": "<YOUR_ANTHROPIC_API_KEY>"
36- }
37- ]
38- }
39- ```
40- </TabItem>
41-</Tabs>
42-
43-## Autocomplete model
44-
45-Anthropic currently does not offer any autocomplete models.
46-
47-[Click here](../../model-roles/autocomplete.md) to see a list of autocomplete model providers.
48-
49-## Embeddings model
50-
51-Anthropic currently does not offer any embeddings models.
52-
53-[Click here](../../model-roles/embeddings.mdx) to see a list of embeddings model providers.
54-
55-## Reranking model
56-
57-Anthropic currently does not offer any reranking models.
58-
59-[Click here](../../model-roles/reranking.mdx) to see a list of reranking model providers.
60-
61-## Prompt caching
62-
63-Anthropic supports [prompt caching with Claude](https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching), which allows Claude models to cache system messages and conversation history between requests to improve performance and reduce costs.
64-
65-Prompt caching is generally available for:
66-
67-- Claude 4 Sonnet
68-- Claude 3.7 Sonnet
69-- Claude 3.5 Sonnet
70-- Claude 3.5 Haiku
71-
72-To enable caching of the system message and the turn-by-turn conversation, update your model configuration as follows:
73-
74-<Tabs groupId="config-example">
75- <TabItem value="yaml" label="YAML">
76- ```yaml title="config.yaml"
77- models:
78- - name: Anthropic
79- provider: anthropic
80- model: claude-sonnet-4-20250514
81- apiKey: <YOUR_ANTHROPIC_API_KEY>
82- roles:
83- - chat
84- defaultCompletionOptions:
85- promptCaching: true
86- ```
87- </TabItem>
88- <TabItem value="json" label="JSON">
89- ```json title="config.json"
90- {
91- "models": [
92- {
93- "cacheBehavior": {
94- "cacheSystemMessage": true,
95- "cacheConversation": true
96- },
97- "title": "Anthropic",
98- "provider": "anthropic",
99- "model": "claude-sonnet-4-latest",
100- "defaultCompletionOptions": {
101- "promptCaching": true
102- },
103- "apiKey": "<YOUR_ANTHROPIC_API_KEY>"
104- }
105- ]
106- }
107- ```
108- </TabItem>
109-</Tabs>
deleted docs/docs/advanced/model-providers/top-level/azure.mdx +0 −169
@@ -1,169 +0,0 @@
1----
2-title: Azure AI Foundry
3-slug: ../azure
4----
5-
6-import TabItem from "@theme/TabItem";
7-import Tabs from "@theme/Tabs";
8-
9-Azure AI Foundry is a cloud-based service that provides access to models from OpenAI, Mistral AI, and others, integrated with the security and enterprise features of the Microsoft Azure platform. To get started, create an Azure AI Foundry resource in the [Azure portal](https://portal.azure.com).
10-
11-:::info
12-
13-For details on OpenAI model setup, see [Azure OpenAI Service configuration](#azure-openai-service-configuration).
14-
15-:::
16-
17-## Chat model
18-
19-We recommend configuring **GPT-4o** as your chat model.
20-
21-<Tabs groupId="config-example">
22- <TabItem value="yaml" label="YAML">
23- ```yaml title="config.yaml"
24- models:
25- - name: GPT-4o
26- provider: azure
27- model: gpt-4o
28- apiBase: <YOUR_DEPLOYMENT_BASE>
29- apiKey: <YOUR_AZURE_API_KEY> # If you use subscription key, try using Azure gateway to rename it apiKey
30- env:
31- deployment: <YOUR_DEPLOYMENT_NAME>
32- apiType: azure-foundry # Or "azure-openai" if using OpenAI models
33- ```
34- </TabItem>
35- <TabItem value="json" label="JSON">
36- ```json title="config.json"
37- {
38- "models": [{
39- "title": "GPT-4o",
40- "provider": "azure",
41- "model": "gpt-4o",
42- "apiBase": "<YOUR_DEPLOYMENT_BASE>",
43- "deployment": "<YOUR_DEPLOYMENT_NAME>",
44- "apiKey": "<YOUR_AZURE_API_KEY>", // If you use subscription key, try using Azure gateway to rename it apiKey
45- "apiType": "azure-foundry" // Or "azure-openai" if using OpenAI models
46- }]
47- }
48- ```
49- </TabItem>
50-</Tabs>
51-
52-## Autocomplete model
53-
54-We recommend configuring **Codestral** as your autocomplete model. If you use Azure AI Foundry to deploy Codestral:
55-
56-<Tabs groupId="config-example">
57- <TabItem value="yaml" label="YAML">
58- ```yaml title="config.yaml"
59- models:
60- - name: Codestral
61- provider: mistral
62- model: codestral-latest
63- apiBase: https://<YOUR_MODEL_NAME>.<YOUR_REGION>.models.ai.azure.com/v1
64- apiKey: <YOUR_AZURE_API_KEY>
65- roles:
66- - autocomplete
67- ```
68- </TabItem>
69- <TabItem value="json" label="JSON">
70- ```json title="config.json"
71- {
72- "tabAutocompleteModel": {
73- "title": "Codestral",
74- "provider": "mistral",
75- "model": "codestral-latest",
76- "apiBase": "https://<YOUR_MODEL_NAME>.<YOUR_REGION>.models.ai.azure.com/v1",
77- "apiKey": "<YOUR_AZURE_API_KEY>"
78- }
79- }
80- ```
81- </TabItem>
82-</Tabs>
83-
84-## Embeddings model
85-
86-We recommend configuring **text-embedding-3-large** as your embeddings model.
87-
88-<Tabs groupId="config-example">
89- <TabItem value="yaml" label="YAML">
90- ```yaml title="config.yaml"
91- models:
92- - name: Text Embedding-3 Large
93- provider: azure
94- model: text-embedding-3-large
95- apiBase: <YOUR_DEPLOYMENT_BASE>
96- apiKey: <YOUR_AZURE_API_KEY>
97- env:
98- deployment: <YOUR_DEPLOYMENT_NAME>
99- apiType: azure
100- ```
101- </TabItem>
102- <TabItem value="json" label="JSON">
103- ```json title="config.json"
104- {
105- "embeddingsProvider": {
106- "provider": "azure",
107- "model": "text-embedding-3-large",
108- "apiBase": "<YOUR_DEPLOYMENT_BASE>",
109- "deployment": "<YOUR_DEPLOYMENT_NAME>",
110- "apiKey": "<YOUR_AZURE_API_KEY>",
111- "apiType": "azure-foundry" // Or "azure-openai" if using OpenAI models
112- }
113- }
114- ```
115- </TabItem>
116-</Tabs>
117-
118-## Reranking model
119-
120-Azure OpenAI currently does not offer any reranking models.
121-
122-[Click here](../../model-roles/reranking.mdx) to see a list of reranking models.
123-
124-## Privacy
125-
126-If you'd like to use OpenAI models but are concerned about privacy, you can use the Azure OpenAI service, which is GDPR and HIPAA compliant.
127-
128-:::info[Getting access]
129-[Click here](https://azure.microsoft.com/en-us/products/ai-services/openai-service) to apply for access to the Azure OpenAI service. Response times are typically within a few days.
130-:::
131-
132-## Azure OpenAI Service configuration
133-
134-Azure OpenAI Service requires a handful of additional parameters to be configured, such as a deployment name and API base URL.
135-
136-To find this information in _Azure AI Foundry_, first select the model that you would like to connect. Then visit _Endpoint_ > _Target URI_.
137-
138-For example, a Target URI of `https://just-an-example.openai.azure.com/openai/deployments/gpt-4o-july/chat/completions?api-version=2023-03-15-preview` would map to the following:
139-
140-<Tabs groupId="config-example">
141- <TabItem value="yaml" label="YAML">
142- ```yaml title="config.yaml"
143- models:
144- - name: GPT-4o Azure
145- model: gpt-4o
146- provider: azure
147- apiBase: https://just-an-example.openai.azure.com
148- apiKey: <YOUR_AZURE_API_KEY>
149- env:
150- apiVersion: 2023-03-15-preview
151- deployment: gpt-4o-july
152- apiType: azure-openai
153- ```
154- </TabItem>
155- <TabItem value="json" label="JSON">
156- ```json title="config.json"
157- {
158- "title": "GPT-4o Azure",
159- "model": "gpt-4o",
160- "provider": "azure",
161- "apiBase": "https://just-an-example.openai.azure.com",
162- "deployment": "gpt-4o-july",
163- "apiVersion": "2023-03-15-preview",
164- "apiKey": "<YOUR_AZURE_API_KEY>",
165- "apiType": "azure-openai"
166- }
167- ```
168- </TabItem>
169-</Tabs>
deleted docs/docs/advanced/model-providers/top-level/bedrock.mdx +0 −235
@@ -1,235 +0,0 @@
1----
2-title: Amazon Bedrock
3-slug: ../bedrock
4----
5-
6-import TabItem from "@theme/TabItem";
7-import Tabs from "@theme/Tabs";
8-
9-Amazon Bedrock is a fully managed service on AWS that provides access to foundation models from various AI companies through a single API.
10-
11-## Chat model
12-
13-We recommend configuring **Claude 3.7 Sonnet** as your chat model.
14-
15-<Tabs groupId="config-example">
16- <TabItem value="yaml" label="YAML">
17- ```yaml title="config.yaml"
18- models:
19- - name: Claude 3.7 Sonnet
20- provider: bedrock
21- model: us.anthropic.claude-3-7-sonnet-20250219-v1:0
22- env:
23- region: us-east-1
24- profile: bedrock
25- roles:
26- - chat
27- ```
28- </TabItem>
29- <TabItem value="json" label="JSON">
30- ```json title="config.json"
31- {
32- "models": [
33- {
34- "title": "Claude 3.7 Sonnet",
35- "provider": "bedrock",
36- "model": "us.anthropic.claude-3-7-sonnet-20250219-v1:0",
37- "region": "us-east-1",
38- "profile": "bedrock"
39- }
40- ]
41- }
42- ```
43- </TabItem>
44-</Tabs>
45-
46-> If you run into the following error when connecting to the new Claude 3.5 Sonnet 2 models from AWS - `400 Invocation of model ID anthropic.claude-3-5-sonnet-20241022-v2:0 with on-demand throughput isn't supported. Retry your request with the ID or ARN of an inference profile that contains this model.`
47-
48-> You can fix this using the following config:
49-
50-<Tabs groupId="config-example">
51- <TabItem value="yaml" label="YAML">
52- ```yaml title="config.yaml"
53- models:
54- - name: Claude 3.5 Sonnet
55- provider: bedrock
56- model: us.anthropic.claude-3-5-sonnet-20241022-v2:0
57- env:
58- region: us-east-1
59- profile: bedrock
60- roles:
61- - chat
62- ```
63- </TabItem>
64- <TabItem value="json" label="JSON">
65- ```json title="config.json"
66- {
67- "models": [
68- {
69- "title": "Claude 3.5 Sonnet",
70- "provider": "bedrock",
71- "model": "us.anthropic.claude-3-5-sonnet-20241022-v2:0",
72- "region": "us-east-1",
73- "profile": "bedrock"
74- }
75- ]
76- }
77- ```
78- </TabItem>
79-</Tabs>
80-
81-## Autocomplete model
82-
83-Bedrock currently does not offer any autocomplete models. However, [Codestral from Mistral](https://mistral.ai/news/codestral-2501/) and [Point from Poolside](https://aws.amazon.com/bedrock/poolside/) will be supported in the near future.
84-
85-In the meantime, you can view a list of autocomplete model providers [here](../../model-roles/autocomplete.md).
86-
87-## Embeddings model
88-
89-We recommend configuring [`amazon.titan-embed-text-v2:0`](https://docs.aws.amazon.com/bedrock/latest/devguide/models.html#amazon.titan-embed-text-v2-0) as your embeddings model.
90-
91-<Tabs groupId="config-example">
92- <TabItem value="yaml" label="YAML">
93- ```yaml title="config.yaml"
94- models:
95- - name: Embeddings Model
96- provider: bedrock
97- model: amazon.titan-embed-text-v2:0
98- env:
99- region: us-west-2
100- roles:
101- - embed
102- ```
103- </TabItem>
104- <TabItem value="json" label="JSON">
105- ```json title="config.json"
106- {
107- "embeddingsProvider": {
108- "title": "Embeddings Model",
109- "provider": "bedrock",
110- "model": "amazon.titan-embed-text-v2:0",
111- "region": "us-west-2"
112- }
113- }
114- ```
115- </TabItem>
116-</Tabs>
117-
118-## Reranking model
119-
120-We recommend configuring `cohere.rerank-v3-5:0` as your reranking model, you may also use `amazon.rerank-v1:0`.
121-
122-<Tabs groupId="config-example">
123- <TabItem value="yaml" label="YAML">
124- ```yaml title="config.yaml"
125- models:
126- - name: Bedrock Reranker
127- provider: bedrock
128- model: cohere.rerank-v3-5:0
129- env:
130- region: us-west-2
131- roles:
132- - rerank
133- ```
134- </TabItem>
135- <TabItem value="json" label="JSON">
136- ```json title="config.json"
137- {
138- "reranker": {
139- "name": "bedrock",
140- "params": {
141- "model": "cohere.rerank-v3-5:0",
142- "region": "us-west-2"
143- }
144- }
145- }
146- ```
147- </TabItem>
148-</Tabs>
149-
150-## Prompt caching
151-
152-Bedrock allows Claude models to cache tool payloads, system messages, and chat
153-messages between requests. Enable this behavior by adding
154-`promptCaching: true` under `defaultCompletionOptions` in your model
155-configuration.
156-
157-Prompt caching is generally available for:
158-
159-- Claude 3.7 Sonnet
160-- Claude 3.5 Haiku
161-- Amazon Nova Micro
162-- Amazon Nova Lite
163-- Amazon Nova Pro
164-
165-Customers who were granted access to Claude 3.5 Sonnet v2 during the prompt
166-caching preview will retain that access, but it cannot be enabled for new users
167-on that model.
168-
169-```yaml title="config.yaml"
170-models:
171- - name: Claude 3.7 Sonnet
172- provider: bedrock
173- model: us.anthropic.claude-3-7-sonnet-20250219-v1:0
174- defaultCompletionOptions:
175- promptCaching: true
176-```
177-
178-Prompt caching is not supported in JSON configuration files, so use the YAML syntax above to enable it.
179-
180-## Authentication
181-
182-Authentication will be through temporary or long-term credentials in
183-`~/.aws/credentials` under a configured profile (e.g. "bedrock").
184-
185-```title="~/.aws/credentials
186-[bedrock]
187-aws_access_key_id = abcdefg
188-aws_secret_access_key = hijklmno
189-aws_session_token = pqrstuvwxyz # Optional: means short term creds.
190-```
191-
192-## Custom Imported Models
193-
194-To setup Bedrock using custom imported models, add the following to your config file:
195-
196-<Tabs groupId="config-example">
197- <TabItem value="yaml" label="YAML">
198- ```yaml title="config.yaml"
199- models:
200- - name: AWS Bedrock deepseek-coder-6.7b-instruct
201- provider: bedrockimport
202- model: deepseek-coder-6.7b-instruct
203- env:
204- region: us-west-2
205- profile: bedrock
206- modelArn: arn:aws:bedrock:us-west-2:XXXXX:imported-model/XXXXXX
207- ```
208- </TabItem>
209- <TabItem value="json" label="JSON">
210- ```json title="config.json"
211- {
212- "models": [
213- {
214- "title": "AWS Bedrock deepseek-coder-6.7b-instruct",
215- "provider": "bedrockimport",
216- "model": "deepseek-coder-6.7b-instruct",
217- "modelArn": "arn:aws:bedrock:us-west-2:XXXXX:imported-model/XXXXXX",
218- "region": "us-west-2",
219- "profile": "bedrock"
220- }
221- ]
222- }
223- ```
224- </TabItem>
225-</Tabs>
226-
227-Authentication will be through temporary or long-term credentials in
228-~/.aws/credentials under a configured profile (e.g. "bedrock").
229-
230-```title="~/.aws/credentials
231-[bedrock]
232-aws_access_key_id = abcdefg
233-aws_secret_access_key = hijklmno
234-aws_session_token = pqrstuvwxyz # Optional: means short term creds.
235-```
deleted docs/docs/advanced/model-providers/top-level/deepseek.mdx +0 −83
@@ -1,83 +0,0 @@
1----
2-title: DeepSeek
3-slug: ../deepseek
4----
5-
6-import TabItem from "@theme/TabItem";
7-import Tabs from "@theme/Tabs";
8-
9-:::info
10-You can get an API key from the [DeepSeek console](https://www.deepseek.com/).
11-:::
12-
13-## Chat model
14-
15-We recommend configuring **DeepSeek Chat** as your chat model.
16-
17-<Tabs groupId="config-example">
18- <TabItem value="yaml" label="YAML">
19- ```yaml title="config.yaml"
20- models:
21- - name: DeepSeek Chat
22- provider: deepseek
23- model: deepseek-chat
24- apiKey: <YOUR_DEEPSEEK_API_KEY>
25- ```
26- </TabItem>
27- <TabItem value="json" label="JSON">
28- ```json title="config.json"
29- {
30- "models": [
31- {
32- "title": "DeepSeek Chat",
33- "provider": "deepseek",
34- "model": "deepseek-chat",
35- "apiKey": "<YOUR_DEEPSEEK_API_KEY>"
36- }
37- ]
38- }
39- ```
40- </TabItem>
41-</Tabs>
42-
43-## Autocomplete model
44-
45-We recommend configuring **DeepSeek Coder** as your autocomplete model.
46-
47-<Tabs groupId="config-example">
48- <TabItem value="yaml" label="YAML">
49- ```yaml title="config.yaml"
50- models:
51- - name: DeepSeek Coder
52- provider: deepseek
53- model: deepseek-coder
54- apiKey: <YOUR_DEEPSEEK_API_KEY>
55- roles:
56- - autocomplete
57- ```
58- </TabItem>
59- <TabItem value="json" label="JSON">
60- ```json title="config.json"
61- {
62- "tabAutocompleteModel": {
63- "title": "DeepSeek Coder",
64- "provider": "deepseek",
65- "model": "deepseek-coder",
66- "apiKey": "<YOUR_DEEPSEEK_API_KEY>"
67- }
68- }
69- ```
70- </TabItem>
71-</Tabs>
72-
73-## Embeddings model
74-
75-DeepSeek currently does not offer any embeddings models.
76-
77-[Click here](../../model-roles/embeddings.mdx) to see a list of embeddings model providers.
78-
79-## Reranking model
80-
81-DeepSeek currently does not offer any reranking models.
82-
83-[Click here](../../model-roles/reranking.mdx) to see a list of reranking model providers.
deleted docs/docs/advanced/model-providers/top-level/gemini.mdx +0 −82
@@ -1,82 +0,0 @@
1----
2-title: Gemini
3-slug: ../gemini
4----
5-
6-import TabItem from "@theme/TabItem";
7-import Tabs from "@theme/Tabs";
8-
9-:::info
10-You can get an API key from the [Google AI Studio](https://aistudio.google.com/).
11-:::
12-
13-## Chat model
14-
15-We recommend configuring **Gemini 2.0 Flash** as your chat model.
16-
17-<Tabs groupId="config-example">
18- <TabItem value="yaml" label="YAML">
19- ```yaml title="config.yaml"
20- models:
21- - name: Gemini 2.0 Flash
22- provider: gemini
23- model: gemini-2.0-flash
24- apiKey: <YOUR_GEMINI_API_KEY>
25- ```
26- </TabItem>
27- <TabItem value="json" label="JSON">
28- ```json title="config.json"
29- {
30- "models": [
31- {
32- "title": "Gemini 2.0 Flash",
33- "provider": "gemini",
34- "model": "gemini-2.0-flash",
35- "apiKey": "<YOUR_GEMINI_API_KEY>"
36- }
37- ]
38- }
39- ```
40- </TabItem>
41-</Tabs>
42-
43-## Autocomplete model
44-
45-Gemini currently does not offer any autocomplete models.
46-
47-[Click here](../../model-roles/autocomplete.md) to see a list of autocomplete model providers.
48-
49-## Embeddings model
50-
51-We recommend configuring **text-embedding-004** as your embeddings model.
52-
53-<Tabs groupId="config-example">
54- <TabItem value="yaml" label="YAML">
55- ```yaml title="config.yaml"
56- models:
57- - name: Gemini Embeddings
58- provider: gemini
59- model: models/text-embedding-004
60- apiKey: <YOUR_GEMINI_API_KEY>
61- roles:
62- - embed
63- ```
64- </TabItem>
65- <TabItem value="json" label="JSON">
66- ```json title="config.json"
67- {
68- "embeddingsProvider": {
69- "provider": "gemini",
70- "model": "models/text-embedding-004",
71- "apiKey": "<YOUR_GEMINI_API_KEY>"
72- }
73- }
74- ```
75- </TabItem>
76-</Tabs>
77-
78-## Reranking model
79-
80-Gemini currently does not offer any reranking models.
81-
82-[Click here](../../model-roles/reranking.mdx) to see a list of reranking model providers.
deleted docs/docs/advanced/model-providers/top-level/inception.mdx +0 −81
@@ -1,81 +0,0 @@
1----
2-title: Inception
3-slug: ../inception
4----
5-
6-import TabItem from "@theme/TabItem";
7-import Tabs from "@theme/Tabs";
8-
9-:::info
10-You can get an API key from the [Inception Dashboard](https://platform.inceptionlabs.ai/dashboard/api-keys).
11-:::
12-
13-## Chat model
14-
15-We recommend configuring **Mercury Coder Small** as your chat model.
16-
17-<Tabs groupId="config-example">
18- <TabItem value="yaml" label="YAML">
19- ```yaml title="config.yaml"
20- models:
21- - uses: inceptionlabs/mercury-coder-small
22- with:
23- INCEPTION_API_KEY: ${{ secrets.INCEPTION_API_KEY }}
24- ```
25- </TabItem>
26- <TabItem value="json" label="JSON">
27- ```json title="config.json"
28- {
29- "models": [
30- {
31- "title": "Mercury Coder Small",
32- "provider": "inception",
33- "model": "mercury-coder-small",
34- "apiKey": "<INCEPTION_API_KEY>"
35- }
36- ]
37- }
38- ```
39- </TabItem>
40-</Tabs>
41-
42-## Autocomplete model
43-
44-We also recommend configuring **Mercury Coder Small** as your autocomplete model.
45-
46-<Tabs groupId="config-example">
47- <TabItem value="yaml" label="YAML">
48- ```yaml title="config.yaml"
49- models:
50- - uses: inceptionlabs/mercury-coder-small
51- with:
52- INCEPTION_API_KEY: ${{ secrets.INCEPTION_API_KEY }}
53- ```
54- </TabItem>
55- <TabItem value="json" label="JSON">
56- ```json title="config.json"
57- {
58- "tabAutocompleteModel": [
59- {
60- "title": "Mercury Coder Small",
61- "provider": "inception",
62- "model": "mercury-coder-small",
63- "apiKey": "<INCEPTION_API_KEY>"
64- }
65- ]
66- }
67- ```
68- </TabItem>
69-</Tabs>
70-
71-## Embeddings model
72-
73-Inception currently does not offer any embeddings models.
74-
75-[Click here](../../model-roles/embeddings.mdx) to see a list of embeddings model providers.
76-
77-## Reranking model
78-
79-Inception currently does not offer any reranking models.
80-
81-[Click here](../../model-roles/reranking.mdx) to see a list of reranking model providers.
deleted docs/docs/advanced/model-providers/top-level/mistral.mdx +0 −110
@@ -1,110 +0,0 @@
1----
2-title: Mistral
3-slug: ../mistral
4----
5-
6-import TabItem from "@theme/TabItem";
7-import Tabs from "@theme/Tabs";
8-
9-:::info
10-You can get an API key from the [Mistral Dashboard](https://console.mistral.ai). Note that the API key for Codestral (codestral.mistral.ai) is different from for all other models (api.mistral.ai). If you are using a Codestral API key, you should set the `apiBase` to `https://codestral.mistral.ai/v1`. Otherwise, we will default to using `https://api.mistral.ai/v1`.
11-:::
12-
13-## Chat model
14-
15-We recommend configuring **Mistral Large** as your chat model.
16-
17-<Tabs groupId="config-example">
18- <TabItem value="yaml" label="YAML">
19- ```yaml title="config.yaml"
20- models:
21- - name: Mistral Large
22- provider: mistral
23- model: mistral-large-latest
24- apiKey: <YOUR_MISTRAL_API_KEY>
25- roles:
26- - chat
27- ```
28- </TabItem>
29- <TabItem value="json" label="JSON">
30- ```json title="config.json"
31- {
32- "models": [
33- {
34- "title": "Mistral Large",
35- "provider": "mistral",
36- "model": "mistral-large-latest",
37- "apiKey": "<YOUR_MISTRAL_API_KEY>"
38- }
39- ]
40- }
41- ```
42- </TabItem>
43-</Tabs>
44-
45-## Autocomplete model
46-
47-We recommend configuring **Codestral** as your autocomplete model.
48-
49-<Tabs groupId="config-example">
50- <TabItem value="yaml" label="YAML">
51- ```yaml title="config.yaml"
52- models:
53- - name: Codestral
54- provider: mistral
55- model: codestral-latest
56- # apiBase: https://codestral.mistral.ai/v1 # Do this if you are using a Codestral API key
57- roles:
58- - autocomplete
59- ```
60- </TabItem>
61- <TabItem value="json" label="JSON">
62- ```json title="config.json"
63- {
64- "tabAutocompleteModel": {
65- "title": "Codestral",
66- "provider": "mistral",
67- "model": "codestral-latest"
68- // "apiBase": "https://codestral.mistral.ai/v1" // Do this if you are using a Codestral API key
69- }
70- }
71- ```
72- </TabItem>
73-</Tabs>
74-
75-## Embeddings model
76-
77-We recommend configuring **Mistral Embed** as your embeddings model.
78-
79-<Tabs groupId="config-example">
80- <TabItem value="yaml" label="YAML">
81- ```yaml title="config.yaml"
82- models:
83- - name: Mistral Embed
84- provider: mistral
85- model: mistral-embed
86- apiKey: <YOUR_MISTRAL_API_KEY>
87- apiBase: https://api.mistral.ai/v1
88- roles:
89- - embed
90- ```
91- </TabItem>
92- <TabItem value="json" label="JSON">
93- ```json title="config.json"
94- {
95- "embeddingsProvider": {
96- "provider": "mistral",
97- "model": "mistral-embed",
98- "apiKey": "<YOUR_MISTRAL_API_KEY>",
99- "apiBase": "https://api.mistral.ai/v1"
100- }
101- }
102- ```
103- </TabItem>
104-</Tabs>
105-
106-## Reranking model
107-
108-Mistral currently does not offer any reranking models.
109-
110-[Click here](../../model-roles/reranking.mdx) to see a list of reranking model providers.
deleted docs/docs/advanced/model-providers/top-level/ollama.mdx +0 −128
@@ -1,128 +0,0 @@
1----
2-title: Ollama
3-slug: ../ollama
4----
5-
6-import TabItem from "@theme/TabItem";
7-import Tabs from "@theme/Tabs";
8-
9-Ollama is an open-source tool that allows to run large language models (LLMs) locally on their own computers. To use Ollama, you can install it [here](https://ollama.ai/download) and download the model you want to run with the `ollama run` command.
10-
11-## Chat model
12-
13-We recommend configuring **Llama3.1 8B** as your chat model.
14-
15-<Tabs groupId="config-example">
16- <TabItem value="yaml" label="YAML">
17- ```yaml title="config.yaml"
18- models:
19- - name: Llama3.1 8B
20- provider: ollama
21- model: llama3.1:8b
22- ```
23- </TabItem>
24- <TabItem value="json" label="JSON">
25- ```json title="config.json"
26- {
27- "models": [
28- {
29- "title": "Llama3.1 8B",
30- "provider": "ollama",
31- "model": "llama3.1:8b"
32- }
33- ]
34- }
35- ```
36- </TabItem>
37-</Tabs>
38-
39-## Autocomplete model
40-
41-We recommend configuring **Qwen2.5-Coder 1.5B** as your autocomplete model.
42-
43-<Tabs groupId="config-example">
44- <TabItem value="yaml" label="YAML">
45- ```yaml title="config.yaml"
46- models:
47- - name: Qwen2.5-Coder 1.5B
48- provider: ollama
49- model: qwen2.5-coder:1.5b-base
50- roles:
51- - autocomplete
52- ```
53- </TabItem>
54- <TabItem value="json" label="JSON">
55- ```json title="config.json"
56- {
57- "tabAutocompleteModel": {
58- "title": "Qwen2.5-Coder 1.5B",
59- "provider": "ollama",
60- "model": "qwen2.5-coder:1.5b-base"
61- }
62- }
63- ```
64- </TabItem>
65-</Tabs>
66-
67-## Embeddings model
68-
69-We recommend configuring **Nomic Embed Text** as your embeddings model.
70-
71-<Tabs groupId="config-example">
72- <TabItem value="yaml" label="YAML">
73- ```yaml title="config.yaml"
74- models:
75- - name: Nomic Embed Text
76- provider: ollama
77- model: nomic-embed-text
78- roles:
79- - embed
80- ```
81- </TabItem>
82- <TabItem value="json" label="JSON">
83- ```json title="config.json"
84- {
85- "embeddingsProvider": {
86- "provider": "ollama",
87- "model": "nomic-embed-text"
88- }
89- }
90- ```
91- </TabItem>
92-</Tabs>
93-
94-## Reranking model
95-
96-Ollama currently does not offer any reranking models.
97-
98-[Click here](../../model-roles/reranking.mdx) to see a list of reranking model providers.
99-
100-## Using a remote instance
101-
102-To configure a remote instance of Ollama, add the `"apiBase"` property to your model in config.json:
103-
104-<Tabs groupId="config-example">
105- <TabItem value="yaml" label="YAML">
106- ```yaml title="config.yaml"
107- models:
108- - name: Llama3.1 8B
109- provider: ollama
110- model: llama3.1:8b
111- apiBase: http://<my endpoint>:11434
112- ```
113- </TabItem>
114- <TabItem value="json" label="JSON">
115- ```json title="config.json"
116- {
117- "models": [
118- {
119- "title": "Llama3.1 8B",
120- "provider": "ollama",
121- "model": "llama3.1:8b",
122- "apiBase": "http://<my endpoint>:11434"
123- }
124- ]
125- }
126- ```
127- </TabItem>
128-</Tabs>
deleted docs/docs/advanced/model-providers/top-level/openai.mdx +0 −160
@@ -1,160 +0,0 @@
1----
2-title: OpenAI
3-slug: ../openai
4----
5-
6-import TabItem from "@theme/TabItem";
7-import Tabs from "@theme/Tabs";
8-
9-:::info
10-You can get an API key from the [OpenAI console](https://platform.openai.com/account/api-keys)
11-:::
12-
13-## Chat model
14-
15-We recommend configuring **GPT-4o** as your chat model.
16-
17-<Tabs groupId="config-example">
18- <TabItem value="yaml" label="YAML">
19- ```yaml title="config.yaml"
20- models:
21- - name: GPT-4o
22- provider: openai
23- model: gpt-4o
24- apiKey: <YOUR_OPENAI_API_KEY>
25- ```
26- </TabItem>
27- <TabItem value="json" label="JSON">
28- ```json title="config.json"
29- {
30- "models": [
31- {
32- "title": "GPT-4o",
33- "provider": "openai",
34- "model": "gpt-4o",
35- "apiKey": "<YOUR_OPENAI_API_KEY>"
36- }
37- ]
38- }
39- ```
40- </TabItem>
41-</Tabs>
42-
43-## Autocomplete model
44-
45-OpenAI currently does not offer any autocomplete models.
46-
47-[Click here](../../model-roles/autocomplete.md) to see a list of autocomplete model providers.
48-
49-## Embeddings model
50-
51-We recommend configuring **text-embedding-3-large** as your embeddings model.
52-
53-<Tabs groupId="config-example">
54- <TabItem value="yaml" label="YAML">
55- ```yaml title="config.yaml"
56- models:
57- - name: OpenAI Embeddings
58- provider: openai
59- model: text-embedding-3-large
60- apiKey: <YOUR_OPENAI_API_KEY>
61- roles:
62- - embed
63- ```
64- </TabItem>
65- <TabItem value="json" label="JSON">
66- ```json title="config.json"
67- {
68- "embeddingsProvider": {
69- "provider": "openai",
70- "model": "text-embedding-3-large",
71- "apiKey": "<YOUR_OPENAI_API_KEY>"
72- }
73- }
74- ```
75- </TabItem>
76-</Tabs>
77-
78-## Reranking model
79-
80-OpenAI currently does not offer any reranking models.
81-
82-[Click here](../../model-roles/reranking.mdx) to see a list of reranking model providers.
83-
84-## OpenAI compatible servers / APIs
85-
86-OpenAI compatible servers
87-
88-- [KoboldCpp](https://github.com/lostruins/koboldcpp)
89-- [text-gen-webui](https://github.com/oobabooga/text-generation-webui/tree/main/extensions/openai#setup--installation)
90-- [FastChat](https://github.com/lm-sys/FastChat/blob/main/docs/openai_api.md)
91-- [LocalAI](https://localai.io/basics/getting_started/)
92-- [llama-cpp-python](https://github.com/abetlen/llama-cpp-python#web-server)
93-- [TensorRT-LLM](https://github.com/NVIDIA/trt-llm-as-openai-windows?tab=readme-ov-file#examples)
94-- [vLLM](https://docs.vllm.ai/en/latest/serving/openai_compatible_server.html)
95-- [BerriAI/litellm](https://github.com/BerriAI/litellm)
96-
97-OpenAI compatible APIs
98-
99-- [Anyscale Endpoints](https://github.com/continuedev/deploy-os-code-llm#others)
100-- [Anyscale Private Endpoints](https://github.com/continuedev/deploy-os-code-llm#anyscale-private-endpoints)
101-
102-If you are using an OpenAI compatible server / API, you can change the `apiBase` like this:
103-
104-<Tabs groupId="config-example">
105- <TabItem value="yaml" label="YAML">
106- ```yaml title="config.yaml"
107- models:
108- - name: OpenAI-compatible server / API
109- provider: openai
110- model: MODEL_NAME
111- apiBase: http://localhost:8000/v1
112- apiKey: <YOUR_CUSTOM_API_KEY>
113- ```
114- </TabItem>
115- <TabItem value="json" label="JSON">
116- ```json title="config.json"
117- {
118- "models": [
119- {
120- "title": "OpenAI-compatible server / API",
121- "provider": "openai",
122- "model": "MODEL_NAME",
123- "apiKey": "<YOUR_CUSTOM_API_KEY>",
124- "apiBase": "http://localhost:8000/v1"
125- }
126- ]
127- }
128- ```
129- </TabItem>
130-</Tabs>
131-
132-To force usage of `chat/completions` instead of `completions` endpoint you can set:
133-
134-<Tabs groupId="config-example">
135- <TabItem value="yaml" label="YAML">
136- ```yaml title="config.yaml"
137- models:
138- - name: OpenAI-compatible server / API
139- provider: openai
140- model: MODEL_NAME
141- apiBase: http://localhost:8000/v1
142- useLegacyCompletionsEndpoint: true
143- ```
144- </TabItem>
145- <TabItem value="json" label="JSON">
146- ```json title="config.json"
147- {
148- "models": [
149- {
150- "title": "OpenAI-compatible server / API",
151- "provider": "openai",
152- "model": "MODEL_NAME",
153- "apiBase": "http://localhost:8000/v1",
154- "useLegacyCompletionsEndpoint": true
155- }
156- ]
157- }
158- ```
159- </TabItem>
160-</Tabs>
deleted docs/docs/advanced/model-providers/top-level/vertexai.mdx +0 −116
@@ -1,116 +0,0 @@
1----
2-title: Vertex AI
3-slug: ../vertexai
4----
5-
6-import TabItem from "@theme/TabItem";
7-import Tabs from "@theme/Tabs";
8-
9-:::info
10-You need to enable the [Vertex AI API](https://console.cloud.google.com/marketplace/product/google/aiplatform.googleapis.com) and set up the [Google Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc).
11-:::
12-
13-## Chat model
14-
15-We recommend configuring **Claude 3.5 Sonnet** as your chat model.
16-
17-<Tabs groupId="config-example">
18- <TabItem value="yaml" label="YAML">
19- ```yaml title="config.yaml"
20- models:
21- - name: Claude 3.5 Sonnet
22- provider: vertexai
23- model: claude-3-5-sonnet-20240620
24- env:
25- projectId: <PROJECT_ID>
26- region: us-east5
27- ```
28- </TabItem>
29- <TabItem value="json" label="JSON">
30- ```json title="config.json"
31- {
32- "models": [
33- {
34- "title": "Claude 3.5 Sonnet",
35- "provider": "vertexai",
36- "model": "claude-3-5-sonnet-20240620",
37- "projectId": "[PROJECT_ID]",
38- "region": "us-east5"
39- }
40- ]
41- }
42- ```
43- </TabItem>
44-</Tabs>
45-
46-## Autocomplete model
47-
48-We recommend configuring **Codestral** or **code-gecko** as your autocomplete model.
49-
50-<Tabs groupId="config-example">
51- <TabItem value="yaml" label="YAML">
52- ```yaml title="config.yaml"
53- models:
54- - name: Codestral (Vertex AI)
55- provider: vertexai
56- model: codestral
57- roles:
58- - autocomplete
59- env:
60- projectId: <PROJECT_ID>
61- region: us-central1
62-
63- ```
64- </TabItem>
65- <TabItem value="json" label="JSON">
66- ```json title="config.json"
67- {
68- "tabAutocompleteModel": {
69- "title": "Codestral (Vertex AI)",
70- "provider": "vertexai",
71- "model": "codestral",
72- "projectId": "[PROJECT_ID]",
73- "region": "us-central1"
74- }
75- }
76- ```
77- </TabItem>
78-</Tabs>
79-
80-## Embeddings model
81-
82-We recommend configuring **text-embedding-004** as your embeddings model.
83-
84-<Tabs groupId="config-example">
85- <TabItem value="yaml" label="YAML">
86- ```yaml title="config.yaml"
87- models:
88- - name: Text Embedding-004
89- provider: vertexai
90- model: text-embedding-004
91- env:
92- projectId: <PROJECT_ID>
93- region: us-central1
94- roles:
95- - embed
96- ```
97- </TabItem>
98- <TabItem value="json" label="JSON">
99- ```json title="config.json"
100- {
101- "embeddingsProvider": {
102- "provider": "vertexai",
103- "model": "text-embedding-004",
104- "projectId": "[PROJECT_ID]",
105- "region": "us-central1"
106- }
107- }
108- ```
109- </TabItem>
110-</Tabs>
111-
112-## Reranking model
113-
114-Vertex AI currently does not offer any reranking models.
115-
116-[Click here](../../model-roles/reranking.mdx) to see a list of reranking model providers.
deleted docs/docs/advanced/model-providers/top-level/xAI.mdx +0 −62
@@ -1,62 +0,0 @@
1----
2-title: xAI
3-slug: ../xai
4----
5-
6-import TabItem from "@theme/TabItem";
7-import Tabs from "@theme/Tabs";
8-
9-:::info
10-You can get an API key from the [xAI console](https://console.x.ai/)
11-:::
12-
13-## Chat model
14-
15-We recommend configuring **grok-2-latest** as your chat model. For information on other available models, visit [xAI Documentation](https://docs.x.ai/docs/models).
16-
17-<Tabs groupId="hub-config-example">
18- <TabItem value="hub" label="Config">
19- Add the [xAI Grok 2 model block](https://hub.continue.dev/xai/grok-2) on the hub.
20- </TabItem>
21- <TabItem value="yaml" label="YAML">
22- ```yaml title="config.yaml"
23- models:
24- - name: Grok 2
25- provider: xAI
26- model: grok-2-latest
27- apiKey: <YOUR_XAI_API_KEY>
28- ```
29- </TabItem>
30- <TabItem value="json" label="JSON">
31- ```json title="config.json"
32- {
33- "models": [
34- {
35- "title": "Grok 2",
36- "provider": "xAI",
37- "model": "grok-2-latest",
38- "apiKey": "<YOUR_XAI_API_KEY>"
39- }
40- ]
41- }
42- ```
43- </TabItem>
44-</Tabs>
45-
46-## Autocomplete model
47-
48-xAI currently does not offer any autocomplete models.
49-
50-[Click here](../../model-roles/autocomplete.md) to see a list of autocomplete model providers.
51-
52-## Embeddings model
53-
54-xAI currently does not offer any embeddings models.
55-
56-[Click here](../../model-roles/embeddings.mdx) to see a list of embeddings model providers.
57-
58-## Reranking model
59-
60-xAI currently does not offer any reranking models.
61-
62-[Click here](../../model-roles/reranking.mdx) to see a list of reranking model providers.
deleted docs/docs/advanced/model-roles/00-intro.mdx +0 −31
@@ -1,31 +0,0 @@
1----
2-title: Intro to Roles
3-description: Apply model role
4-keywords: [apply, model, role]
5-sidebar_position: 0
6-sidebar_label: Introduction
7----
8-
9-import TabItem from "@theme/TabItem";
10-import Tabs from "@theme/Tabs";
11-
12-Models in Continue can be configured to be used for various roles in the extension.
13-
14-- [`chat`](./chat.mdx): Used for chat conversations in the extension sidebar
15-- [`autocomplete`](./autocomplete.md): Used for autocomplete code suggestions in the editor
16-- [`edit`](./edit.mdx): Used to generate code based on edit prompts
17-- [`apply`](./apply.mdx): Used to decide how to apply edits to a file
18-- [`embed`](./embeddings.mdx): Used to generate embeddings used for vector search (@Codebase and @Docs context providers)
19-- [`rerank`](./reranking.mdx): Used to rerank results from vector search
20-
21-These roles can be specified for a `config.yaml` model block using `roles`. See the [YAML Specification](/reference#models) for more details.
22-
23-## Selecting model roles
24-
25-You can control which of the models in your assistant for a given role will be currently used for that role. Above the main input, click the 3 dots and then the cube icon to expand the `Models` section. Then you can use the dropdowns to select an active model for each role.
26-
27-![Settings Active Models Section](/img/settings-model-roles.png)
28-
29-:::info
30-`roles` are not explicitly defined within `config.json` (deprecated) - they are infered by the top level keys like `embeddingsProvider`
31-:::
deleted docs/docs/advanced/model-roles/_category_.json +0 −4
@@ -1,4 +0,0 @@
1-{
2- "label": "Model Roles",
3- "position": 5
4-}
deleted docs/docs/advanced/model-roles/apply.mdx +0 −42
@@ -1,42 +0,0 @@
1----
2-title: Apply Role
3-description: Apply model role
4-keywords: [apply, model, role]
5-sidebar_position: 4
6----
7-
8-When editing code, Chat and Edit model output often doesn't clearly align with existing code. A model with the `apply` role is used to generate a more precise diff to apply changes to a file.
9-
10-## Recommended Apply models
11-
12-We recommend [Morph Fast Apply](https://morphllm.com) or [Relace's Instant Apply model](https://hub.continue.dev/relace/instant-apply) for the fastest Apply experience. You can sign up for Morph's free tier [here](https://morphllm.com/dashboard) or get a Relace API key [here](https://app.relace.ai/settings/api-keys).
13-
14-However, most Chat models can also be used for applying code changes. We recommend smaller/cheaper models for the task, such as Claude 3.5 Haiku.
15-
16-:::info
17-Explore all apply models in [the Hub](https://hub.continue.dev/explore/models?roles=apply)
18-:::
19-
20-## Prompt templating
21-
22-You can customize the prompt template used for applying code changes by setting the `promptTemplates.apply` property in your model configuration. Continue uses [Handlebars syntax](https://handlebarsjs.com/guide/) for templating.
23-
24-Available variables for the apply template:
25-
26-- `{{{original_code}}}` - The original code before changes
27-- `{{{new_code}}}` - The new code after changes
28-
29-Example:
30-
31-```yaml
32-models:
33- - name: My Custom Apply Template
34- provider: anthropic
35- model: claude-3-5-sonnet-latest
36- promptTemplates:
37- apply: |
38- Original: {{{original_code}}}
39- New: {{{new_code}}}
40-
41- Please generate the final code without any markers or explanations.
42-```
deleted docs/docs/advanced/model-roles/autocomplete.md +0 −41
@@ -1,41 +0,0 @@
1----
2-title: Autocomplete Role
3-description: Autocomplete model role
4-keywords: [autocomplete, model, role]
5-sidebar_position: 2
6----
7-
8-An "autocomplete model" is an LLM that is trained on a special format called fill-in-the-middle (FIM). This format is designed to be given the prefix and suffix of a code file and predict what goes between. This task is very specific, which on one hand means that the models can be smaller (even a 3B parameter model can perform well). On the other hand, this means that Chat models, though larger, will often perform poorly even with extensive prompting.
9-
10-In Continue, autocomplete models are used to display inline [Autocomplete](../../features/autocomplete/quick-start) suggestions as you type. Autocomplete models are designated by adding the `autocomplete` to the model's `roles` in `config.yaml`.
11-
12-## Recommended Autocomplete models
13-
14-Visit the [Autocomplete Deep Dive](../deep-dives/autocomplete.mdx) for recommended models and more details.
15-
16-## Prompt templating
17-
18-You can customize the prompt template used when autocomplete happens by setting the `promptTemplates.autocomplete` property in your model configuration. Continue uses [Handlebars syntax](https://handlebarsjs.com/guide/) for templating.
19-
20-Available variables for the apply template:
21-
22-- `{{{prefix}}}` - the code before your cursor
23-- `{{{suffix}}}` - the code after your cursor
24-- `{{{filename}}}` - the name of the file your cursor currently is
25-- `{{{reponame}}}` - the name of the folder where the codebase is
26-- `{{{language}}}` - the name of the programming language in full (ex. Typescript)
27-
28-Example:
29-
30-```yaml
31-models:
32- - name: My Custom Autocomplete Template
33- provider: ollama
34- model: qwen2.5-coder:1.5b
35- promptTemplates:
36- autocomplete: |
37- `
38- globalThis.importantFunc = importantFunc
39- <|fim_prefix|>{{{prefix}}}<|fim_suffix|>{{{suffix}}}<|fim_middle|>
40- `
41-```
deleted docs/docs/advanced/model-roles/chat.mdx +0 −407
@@ -1,407 +0,0 @@
1----
2-title: Chat Role
3-description: Chat model role
4-keywords: [chat, model, role]
5-sidebar_position: 1
6----
7-
8-import TabItem from "@theme/TabItem";
9-import Tabs from "@theme/Tabs";
10-
11-A "chat model" is an LLM that is trained to respond in a conversational format. Because they should be able to answer general questions and generate complex code, the best chat models are typically large, often 405B+ parameters.
12-
13-In Continue, these models are used for normal [Chat](../../features/chat/quick-start) and [VS Code actions](../deep-dives/vscode-actions.md). The selected chat model will also be used for [Edit](../../features/edit/quick-start) and [Apply](./apply.mdx) if no `edit` or `apply` models are specified, respectively.
14-
15-## Recommended Chat models
16-
17-## Best overall experience
18-
19-For the best overall Chat experience, you will want to use a 400B+ parameter model or one of the frontier models.
20-
21-### Claude Sonnet 3.7 from Anthropic
22-
23-Our current top recommendation is Claude 3.7 Sonnet from [Anthropic](../model-providers/top-level/anthropic.mdx).
24-
25-<Tabs groupId="hub-config-example">
26- <TabItem value="hub" label="Hub">
27- View the [Claude 3.7 Sonnet model block](https://hub.continue.dev/anthropic/claude-3-7-sonnet) on the hub.
28- </TabItem>
29- <TabItem value="yaml" label="YAML">
30- ```yaml title="config.yaml"
31- models:
32- - name: Claude 3.7 Sonnet
33- provider: anthropic
34- model: claude-3-7-sonnet-latest
35- apiKey: <YOUR_ANTHROPIC_API_KEY>
36- ```
37- </TabItem>
38- <TabItem value="json" label="JSON">
39- ```json title="config.json"
40- {
41- "models": [
42- {
43- "title": "Claude 3.5 Sonnet",
44- "provider": "anthropic",
45- "model": "claude-3-5-sonnet-latest",
46- "apiKey": "<YOUR_ANTHROPIC_API_KEY>"
47- }
48- ]
49- }
50- ```
51- </TabItem>
52-</Tabs>
53-
54-### Gemma from Google DeepMind
55-
56-If you prefer to use an open-weight model, then the Gemma family of Models from Google DeepMind is a good choice. You will need to decide if you use it through a SaaS model provider, e.g. [Together](../model-providers/more/together.mdx), or self-host it, e.g. [Ollama](../model-providers/top-level/ollama.mdx).
57-
58-<Tabs groupId="config-example">
59- <TabItem value="hub" label="Hub">
60- <Tabs groupId="providers">
61- <TabItem value="Ollama">
62- Add the [Ollama Gemma 3 27B block](https://hub.continue.dev/ollama/gemma3-27b) from the hub
63- </TabItem>
64- <TabItem value="Together">
65- Add the [Together Gemma 2 27B Instruct block](https://hub.continue.dev/togetherai/gemma-2-instruct-27b) from the hub
66- </TabItem>
67- </Tabs>
68- </TabItem>
69- <TabItem value="yaml" label="YAML">
70- <Tabs groupId="providers">
71- <TabItem value="Ollama">
72- ```yaml title="config.yaml"
73- models:
74- - name: "Gemma 3 27B"
75- provider: "ollama"
76- model: "gemma3:27b"
77- ```
78- </TabItem>
79- <TabItem value="Together">
80- ```yaml title="config.yaml"
81- models:
82- - name: "Gemma 3 27B"
83- provider: "together"
84- model: "google/gemma-2-27b-it"
85- apiKey: <YOUR_TOGETHER_API_KEY>
86- ```
87- </TabItem>
88- </Tabs>
89- </TabItem>
90- <TabItem value="json" label="JSON">
91- <Tabs groupId="providers">
92- <TabItem value="Ollama">
93- ```json title="config.json"
94- {
95- "models": [
96- {
97- "title": "Gemma 3 27B",
98- "provider": "ollama",
99- "model": "gemma3:27b"
100- }
101- ]
102- }
103- ```
104- </TabItem>
105- <TabItem value="Together">
106- ```json title="config.json"
107- {
108- "models": [
109- {
110- "title": "Gemma 3 27B",
111- "provider": "together",
112- "model": "google/gemma-2-27b-it",
113- "apiKey": "<YOUR_TOGETHER_API_KEY>"
114- }
115- ]
116- }
117- ```
118- </TabItem>
119- </Tabs>
120- </TabItem>
121-</Tabs>
122-
123-### GPT-4o from OpenAI
124-
125-If you prefer to use a model from [OpenAI](../model-providers/top-level/openai.mdx), then we recommend GPT-4o.
126-
127-<Tabs groupId="hub-config-example">
128- <TabItem value="hub" label="Hub">
129- Add the [OpenAI GPT-4o block](https://hub.continue.dev/openai/gpt-4o) from the hub
130- </TabItem>
131- <TabItem value="yaml" label="YAML">
132- ```yaml title="config.yaml"
133- models:
134- - name: GPT-4o
135- provider: openai
136- model: ''
137- apiKey: <YOUR_OPENAI_API_KEY>
138- ```
139- </TabItem>
140- <TabItem value="json" label="JSON">
141- ```json title="config.json"
142- {
143- "models": [
144- {
145- "title": "GPT-4o",
146- "provider": "openai",
147- "model": "",
148- "apiKey": "<YOUR_OPENAI_API_KEY>"
149- }
150- ]
151- }
152- ```
153- </TabItem>
154-</Tabs>
155-
156-### Grok-2 from xAI
157-
158-If you prefer to use a model from [xAI](../model-providers/top-level/xAI.mdx), then we recommend Grok-2.
159-
160-<Tabs groupId="hub-config-example">
161- <TabItem value="hub" label="Hub">
162- Add the [xAI Grok-2 block](https://hub.continue.dev/xai/grok-2) from the hub
163- </TabItem>
164- <TabItem value="yaml" label="YAML">
165- ```yaml title="config.yaml"
166- models:
167- - name: Grok-2
168- provider: xAI
169- model: grok-2-latest
170- apiKey: <YOUR_XAI_API_KEY>
171- ```
172- </TabItem>
173- <TabItem value="json" label="JSON">
174- ```json title="config.json"
175- {
176- "models": [
177- {
178- "title": "Grok-2",
179- "provider": "xAI",
180- "model": "grok-2-latest",
181- "apiKey": "<YOUR_XAI_API_KEY>"
182- }
183- ]
184- }
185- ```
186- </TabItem>
187-</Tabs>
188-
189-### Gemini 2.0 Flash from Google
190-
191-If you prefer to use a model from [Google](../model-providers/top-level/gemini.mdx), then we recommend Gemini 2.0 Flash.
192-
193-<Tabs groupId="hub-config-example">
194- <TabItem value="hub" label="Hub">
195- Add the [Gemini 2.0 Flash block](https://hub.continue.dev/google/gemini-2.0-flash) from the hub
196- </TabItem>
197- <TabItem value="yaml" label="YAML">
198- ```yaml title="config.yaml"
199- models:
200- - name: Gemini 2.0 Flash
201- provider: gemini
202- model: gemini-2.0-flash
203- apiKey: <YOUR_GEMINI_API_KEY>
204- ```
205- </TabItem>
206- <TabItem value="json" label="JSON">
207- ```json title="config.json"
208- {
209- "models": [
210- {
211- "title": "Gemini 2.0 Flash",
212- "provider": "gemini",
213- "model": "gemini-2.0-flash",
214- "apiKey": "<YOUR_GEMINI_API_KEY>"
215- }
216- ]
217- }
218- ```
219- </TabItem>
220-</Tabs>
221-
222-## Local, offline experience
223-
224-For the best local, offline Chat experience, you will want to use a model that is large but fast enough on your machine.
225-
226-### Llama 3.1 8B
227-
228-If your local machine can run an 8B parameter model, then we recommend running Llama 3.1 8B on your machine (e.g. using [Ollama](../model-providers/top-level/ollama.mdx) or [LM Studio](../model-providers/more/lmstudio.mdx)).
229-
230-<Tabs groupId="hub-config-example">
231- <TabItem value="hub" label="Hub">
232- <Tabs groupId="providers">
233- <TabItem value="ollama" label="Ollama">
234- Add the [Ollama Llama 3.1 8b block](https://hub.continue.dev/ollama/llama3.1-8b) from the hub
235- </TabItem>
236- {/* HUB_TODO nonexistent block */}
237- {/* <TabItem value="lmstudio" label="LM Studio">
238- Add the [LM Studio Llama 3.1 8b block](https://hub.continue.dev/explore/models) from the hub
239- </TabItem> */}
240- </Tabs>
241- </TabItem>
242- <TabItem value="yaml" label="YAML">
243- <Tabs groupId="providers">
244- <TabItem value="Ollama">
245- ```yaml title="config.yaml"
246- models:
247- - name: Llama 3.1 8B
248- provider: ollama
249- model: llama3.1:8b
250- ```
251- </TabItem>
252- <TabItem value="LM Studio">
253- ```yaml title="config.yaml"
254- models:
255- - name: Llama 3.1 8B
256- provider: lmstudio
257- model: llama3.1:8b
258- ```
259- </TabItem>
260- <TabItem value="Msty">
261- ```yaml title="config.yaml"
262- models:
263- - name: Llama 3.1 8B
264- provider: msty
265- model: llama3.1:8b
266- ```
267- </TabItem>
268- </Tabs>
269- </TabItem>
270- <TabItem value="json" label="JSON">
271- <Tabs groupId="providers">
272- <TabItem value="Ollama">
273- ```json title="config.json"
274- {
275- "models": [
276- {
277- "title": "Llama 3.1 8B",
278- "provider": "ollama",
279- "model": "llama3.1:8b"
280- }
281- ]
282- }
283- ```
284- </TabItem>
285- <TabItem value="LM Studio">
286- ```json title="config.json"
287- {
288- "models": [
289- {
290- "title": "Llama 3.1 8B",
291- "provider": "lmstudio",
292- "model": "llama3.1-8b"
293- }
294- ]
295- }
296- ```
297- </TabItem>
298- <TabItem value="Msty">
299- ```json title="config.json"
300- {
301- "models": [
302- {
303- "title": "Llama 3.1 8B",
304- "provider": "msty",
305- "model": "llama3.1-8b"
306- }
307- ]
308- }
309- ```
310- </TabItem>
311- </Tabs>
312- </TabItem>
313-</Tabs>
314-
315-### DeepSeek Coder 2 16B
316-
317-If your local machine can run a 16B parameter model, then we recommend running DeepSeek Coder 2 16B (e.g. using [Ollama](../model-providers/top-level/ollama.mdx) or [LM Studio](../model-providers/more/lmstudio.mdx)).
318-
319-<Tabs groupId="config-example">
320- {/* HUB_TODO nonexistent blocks */}
321- {/* <TabItem value="hub" label="Hub">
322- <Tabs groupId="providers">
323- <TabItem value="ollama" label="Ollama">
324- Add the [Ollama Deepseek Coder 2 16B block](https://hub.continue.dev/explore/models) from the hub
325- </TabItem>
326- <TabItem value="lmstudio" label="LM Studio">
327- Add the [LM Studio Deepseek Coder 2 16B block](https://hub.continue.dev/explore/models) from the hub
328- </TabItem>
329- </Tabs>
330- </TabItem> */}
331- <TabItem value="yaml" label="YAML">
332- <Tabs groupId="providers">
333- <TabItem value="Ollama">
334- ```yaml title="config.yaml"
335- models:
336- - name: DeepSeek Coder 2 16B
337- provider: ollama
338- model: deepseek-coder-v2:16b
339- ```
340- </TabItem>
341- <TabItem value="LM Studio">
342- ```yaml title="config.yaml"
343- models:
344- - name: DeepSeek Coder 2 16B
345- provider: lmstudio
346- model: deepseek-coder-v2:16b
347- ```
348- </TabItem>
349- <TabItem value="Msty">
350- ```yaml title="config.yaml"
351- models:
352- - name: DeepSeek Coder 2 16B
353- provider: msty
354- model: deepseek-coder-v2:16b
355- ```
356- </TabItem>
357- </Tabs>
358- </TabItem>
359- <TabItem value="json" label="JSON">
360- <Tabs groupId="providers">
361- <TabItem value="Ollama">
362- ```json title="config.json"
363- {
364- "models": [
365- {
366- "title": "DeepSeek Coder 2 16B",
367- "provider": "ollama",
368- "model": "deepseek-coder-v2:16b",
369- "apiBase": "http://localhost:11434"
370- }
371- ]
372- }
373- ```
374- </TabItem>
375- <TabItem value="LM Studio">
376- ```json title="config.json"
377- {
378- "models": [
379- {
380- "title": "DeepSeek Coder 2 16B",
381- "provider": "lmstudio",
382- "model": "deepseek-coder-v2:16b"
383- }
384- ]
385- }
386- ```
387- </TabItem>
388- <TabItem value="Msty">
389- ```json title="config.json"
390- {
391- "models": [
392- {
393- "title": "DeepSeek Coder 2 16B",
394- "provider": "msty",
395- "model": "deepseek-coder-v2:16b"
396- }
397- ]
398- }
399- ```
400- </TabItem>
401- </Tabs>
402- </TabItem>
403-</Tabs>
404-
405-## Other experiences
406-
407-There are many more models and providers you can use with Chat beyond those mentioned above. Read more [here](../model-roles/chat.mdx)
deleted docs/docs/advanced/model-roles/edit.mdx +0 −82
@@ -1,82 +0,0 @@
1----
2-title: Edit Role
3-description: Edit model role
4-keywords: [edit, editing, model, role]
5-sidebar_position: 3
6----
7-
8-import TabItem from "@theme/TabItem";
9-import Tabs from "@theme/Tabs";
10-
11-It's often useful to select a different model to respond to Edit prompts than for chat prompts, as Edits are often more code-specific and may require less conversational readability.
12-
13-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.
14-
15-<Tabs groupId="config-example">
16- <TabItem value="yaml" label="YAML">
17- Use model roles.
18- ```yaml title="config.yaml"
19- models:
20- - name: Claude 3.5 Sonnet
21- provider: anthropic
22- model: claude-3-5-sonnet-latest
23- apiKey: <YOUR_ANTHROPIC_API_KEY>
24- roles:
25- - edit
26- ```
27- </TabItem>
28- <TabItem value="json" label="JSON">
29- Set the `experimental.modelRoles.inlineEdit` property in `config.json`.
30- ```json title="config.json"
31- {
32- "models": {
33- "name": "Claude 3.5 Sonnet",
34- "provider": "anthropic",
35- "model": "claude-3-5-sonnet-latest",
36- "apiKey": "<YOUR_ANTHROPIC_API_KEY>"
37- },
38- "experimental": {
39- "modelRoles": {
40- "inlineEdit": "Claude 3.5 Sonnet",
41- }
42- }
43- }
44- ```
45- </TabItem>
46-</Tabs>
47-
48-Explore edit models in [the hub](https://hub.continue.dev/explore/models?roles=edit). Generally, our recommendations for Edit overlap with recommendations for Chat.
49-
50-## Prompt templating
51-
52-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.
53-
54-Available variables for the edit template:
55-
56-- `{{{userInput}}}` - The user's edit request/instruction
57-- `{{{language}}}` - The programming language of the code
58-- `{{{codeToEdit}}}` - The code that's being edited
59-- `{{{prefix}}}` - Content before the edit area
60-- `{{{suffix}}}` - Content after the edit area
61-- `{{{supportsCompletions}}}` - Whether the model supports completions API
62-- `{{{supportsPrefill}}}` - Whether the model supports prefill capability
63-
64-Example:
65-
66-```yaml
67-models:
68- - name: My Custom Edit Template
69- provider: openai
70- model: gpt-4o
71- promptTemplates:
72- edit: |
73- `Here is the code before editing:
74- \`\`\`{{{language}}}
75- {{{codeToEdit}}}
76- \`\`\`
77-
78- Here is the edit requested:
79- "{{{userInput}}}"
80-
81- Here is the code after editing:`
82-```
deleted docs/docs/advanced/model-roles/embeddings.mdx +0 −154
@@ -1,154 +0,0 @@
1----
2-title: Embed Role
3-description: Embed model role
4-keywords: [embedding, model, role, embeddings]
5-sidebar_position: 5
6----
7-
8-import TabItem from "@theme/TabItem";
9-import Tabs from "@theme/Tabs";
10-
11-An "embeddings model" is trained to convert a piece of text into a vector, which can later be rapidly compared to other vectors to determine similarity between the pieces of text. Embeddings models are typically much smaller than LLMs, and will be extremely fast and cheap in comparison.
12-
13-In Continue, embeddings are generated during indexing and then used by [@Codebase](../context/codebase.mdx) to perform similarity search over your codebase.
14-
15-You can add `embed` to a model's `roles` to specify that it can be used to embed.
16-
17-:::info[Built-in model (VS Code only)]
18-`transformers.js` is used as a built-in embeddings model in VS Code. In JetBrains, there currently is no built-in embedder.
19-:::
20-
21-## Recommended embedding models
22-
23-If you have the ability to use any model, we recommend `voyage-code-3`, which is listed below along with the rest of the options for embeddings models.
24-
25-If you want to generate embeddings locally, we recommend using `nomic-embed-text` with [Ollama](../model-providers/top-level/ollama.mdx#embeddings-model).
26-
27-### Voyage AI
28-
29-After obtaining an API key from [here](https://www.voyageai.com/), you can configure like this:
30-
31-<Tabs groupId="hub-config-example">
32- <TabItem value="hub" label="Hub">
33- [Voyage Code 3 Embedder Block](https://hub.continue.dev/voyageai/voyage-code-3)
34- </TabItem>
35- <TabItem value="yaml" label="YAML">
36- ```yaml title="config.yaml"
37- models:
38- - name: Voyage Code 3
39- provider: voyage
40- model: voyage-code-3
41- apiKey: <YOUR_VOYAGE_API_KEY>
42- roles:
43- - embed
44- ```
45- </TabItem>
46- <TabItem value="json" label="JSON">
47- ```json title="config.json"
48- {
49- "embeddingsProvider": {
50- "provider": "voyage",
51- "model": "voyage-code-3",
52- "apiKey": "<YOUR_VOYAGE_API_KEY>"
53- }
54- }
55- ```
56- </TabItem>
57-</Tabs>
58-
59-### Ollama
60-
61-See [here](../model-providers/top-level/ollama.mdx#embeddings-model) for instructions on how to use Ollama for embeddings.
62-
63-### Transformers.js (currently VS Code only)
64-
65-[Transformers.js](https://huggingface.co/docs/transformers.js/index) is a JavaScript port of the popular [Transformers](https://huggingface.co/transformers/) library. It allows embeddings to be calculated entirely locally. The model used is `all-MiniLM-L6-v2`, which is shipped alongside the Continue extension.
66-
67-<Tabs groupId="config-example">
68- <TabItem value="yaml" label="YAML">
69- ```yaml title="config.yaml"
70- models:
71- - name: default-transformers
72- provider: transformers.js
73- roles:
74- - embed
75- ```
76- </TabItem>
77- <TabItem value="json" label="JSON">
78- ```json title="config.json"
79- {
80- "embeddingsProvider": {
81- "provider": "transformers.js"
82- }
83- }
84- ```
85- </TabItem>
86-</Tabs>
87-
88-### Text Embeddings Inference
89-
90-[Hugging Face Text Embeddings Inference](https://huggingface.co/docs/text-embeddings-inference/en/index) enables you to host your own embeddings endpoint. You can configure embeddings to use your endpoint as follows:
91-
92-<Tabs groupId="config-example">
93- {/* HUB_TODO nonexistent block */}
94- {/* <TabItem value="hub" label="Hub">
95- [HuggingFace Text Embedder Block](https://hub.continue.dev/)
96- </TabItem> */}
97- <TabItem value="yaml" label="YAML">
98- ```yaml title="config.yaml"
99- models:
100- - name: Huggingface TEI Embedder
101- provider: huggingface-tei
102- apiBase: http://localhost:8080
103- apiKey: <YOUR_TEI_API_KEY>
104- roles: [embed]
105- ```
106- </TabItem>
107- <TabItem value="json" label="JSON">
108- ```json title="config.json"
109- {
110- "embeddingsProvider": {
111- "provider": "huggingface-tei",
112- "apiBase": "http://localhost:8080",
113- "apiKey": "<YOUR_TEI_API_KEY>"
114- }
115- }
116- ```
117- </TabItem>
118-</Tabs>
119-
120-### OpenAI
121-
122-See [here](../model-providers/top-level/openai.mdx#embeddings-model) for instructions on how to use OpenAI for embeddings.
123-
124-### Cohere
125-
126-See [here](../model-providers/more/cohere.mdx#embeddings-model) for instructions on how to use Cohere for embeddings.
127-
128-### Gemini
129-
130-See [here](../model-providers/top-level/gemini.mdx#embeddings-model) for instructions on how to use Gemini for embeddings.
131-
132-### Vertex
133-
134-See [here](../model-providers/top-level/vertexai.mdx#embeddings-model) for instructions on how to use Vertex for embeddings.
135-
136-### Mistral
137-
138-See [here](../model-providers/top-level/mistral.mdx#embeddings-model) for instructions on how to use Mistral for embeddings.
139-
140-### NVIDIA
141-
142-See [here](../model-providers/more/nvidia.mdx#embeddings-model) for instructions on how to use NVIDIA for embeddings.
143-
144-### Bedrock
145-
146-See [here](../model-providers/top-level/bedrock.mdx#embeddings-model) for instructions on how to use Bedrock for embeddings.
147-
148-### WatsonX
149-
150-See [here](../model-providers/more/watsonx.mdx#embeddings-model) for instructions on how to use WatsonX for embeddings.
151-
152-### LMStudio
153-
154-See [here](../model-providers/more/lmstudio.mdx#embeddings-model) for instructions on how to use LMStudio for embeddings.
deleted docs/docs/advanced/model-roles/reranking.mdx +0 −156
@@ -1,156 +0,0 @@
1----
2-title: Rerank Role
3-description: Rerank model role
4-keywords: [rerank, reranking, model, role]
5-sidebar_position: 6
6----
7-
8-import TabItem from "@theme/TabItem";
9-import Tabs from "@theme/Tabs";
10-
11-A "reranking model" is trained to take two pieces of text (often a user question and a document) and return a relevancy score between 0 and 1, estimating how useful the document will be in answering the question. Rerankers are typically much smaller than LLMs, and will be extremely fast and cheap in comparison.
12-
13-In Continue, rerankers are designated using the `rerank` role and used by [@Codebase](../context/codebase.mdx) in order to select the most relevant code snippets after vector search.
14-
15-## Recommended reranking models
16-
17-If you have the ability to use any model, we recommend `rerank-2` by Voyage AI, which is listed below along with the rest of the options for rerankers.
18-
19-### Voyage AI
20-
21-Voyage AI offers the best reranking model for code with their `rerank-2` model. After obtaining an API key from [here](https://www.voyageai.com/), you can configure a reranker as follows:
22-
23-<Tabs groupId="hub-config-example">
24- <TabItem value="hub" label="Hub">
25- [Voyage Rerank 2 Block](https://hub.continue.dev/voyageai/rerank-2)
26- </TabItem>
27- <TabItem value="yaml" label="YAML">
28- ```yaml title="config.yaml"
29- models:
30- - name: My Voyage Reranker
31- provider: voyage
32- apiKey: <YOUR_VOYAGE_API_KEY>
33- model: rerank-2
34- roles:
35- - rerank
36- ```
37- </TabItem>
38- <TabItem value="json" label="JSON">
39- ```json title="config.json"
40- {
41- "reranker": {
42- "name": "voyage",
43- "params": {
44- "model": "rerank-2",
45- "apiKey": "<YOUR_VOYAGE_API_KEY>"
46- }
47- }
48- }
49- ```
50- </TabItem>
51-</Tabs>
52-
53-### Cohere
54-
55-See Cohere's documentation for rerankers [here](https://docs.cohere.com/docs/rerank-2).
56-
57-<Tabs groupId="config-example">
58- {/* HUB_TODO block doesn't exist */}
59- {/* <TabItem value="hub" label="Hub">
60- [Cohere Reranker English v3](https://hub.continue.dev/)
61- </TabItem> */}
62- <TabItem value="yaml" label="YAML">
63- ```yaml title="config.yaml"
64- models:
65- - name: Cohere Reranker
66- provider: cohere
67- model: rerank-english-v3.0
68- apiKey: <YOUR_COHERE_API_KEY>
69- roles:
70- - rerank
71- ```
72- </TabItem>
73- <TabItem value="json" label="JSON">
74- ```json title="config.json"
75- {
76- "reranker": {
77- "name": "cohere",
78- "params": {
79- "model": "rerank-english-v3.0",
80- "apiKey": "<YOUR_COHERE_API_KEY>"
81- }
82- }
83- }
84- ```
85- </TabItem>
86-</Tabs>
87-
88-### LLM
89-
90-If you only have access to a single LLM, then you can use it as a reranker. This is discouraged unless truly necessary, because it will be much more expensive and still less accurate than any of the above models trained specifically for the task. Note that this will not work if you are using a local model, for example with Ollama, because too many parallel requests need to be made.
91-
92-<Tabs groupId="config-example">
93- {/* HUB_TODO block doesn't exist */}
94- {/* <TabItem value="hub" label="Hub">
95- [GPT-4o LLM Reranker Block](https://hub.continue.dev/)
96- </TabItem> */}
97- <TabItem value="yaml" label="YAML">
98- ```yaml title="config.yaml"
99- models:
100- - name: LLM Reranker
101- provider: openai
102- model: gpt-4o
103- roles:
104- - rerank
105- ```
106- </TabItem>
107- <TabItem value="json" label="JSON">
108- ```json title="config.json"
109- {
110- "reranker": {
111- "name": "llm",
112- "params": {
113- "modelTitle": "My Model Title"
114- }
115- }
116- }
117- ```
118- </TabItem>
119-</Tabs>
120-
121-The `"modelTitle"` field must match one of the models in your "models" array in config.json.
122-
123-### Text Embeddings Inference
124-
125-[Hugging Face Text Embeddings Inference](https://huggingface.co/docs/text-embeddings-inference/en/index) enables you to host your own [reranker endpoint](https://huggingface.github.io/text-embeddings-inference/#/Text%20Embeddings%20Inference/rerank). You can configure your reranker as follows:
126-
127-<Tabs groupId="config-example">
128- {/* HUB_TODO */}
129- {/* <TabItem value="hub" label="Hub">
130- [HuggingFace TEI Reranker block](https://hub.continue.dev/)
131- </TabItem> */}
132- <TabItem value="yaml" label="YAML">
133- ```yaml title="config.yaml"
134- models:
135- - name: Huggingface-tei Reranker
136- provider: huggingface-tei
137- apiBase: http://localhost:8080
138- apiKey: <YOUR_TEI_API_KEY>
139- roles:
140- - rerank
141- ```
142- </TabItem>
143- <TabItem value="json" label="JSON">
144- ```json title="config.json"
145- {
146- "reranker": {
147- "name": "huggingface-tei",
148- "params": {
149- "apiBase": "http://localhost:8080",
150- "apiKey": "<YOUR_TEI_API_KEY>"
151- }
152- }
153- }
154- ```
155- </TabItem>
156-</Tabs>
deleted docs/docs/advanced/telemetry.mdx +0 −31
@@ -1,31 +0,0 @@
1----
2-title: Telemetry
3-description: Learn how Continue collects anonymous usage information and how you can opt out.
4-keywords: [telemetry, anonymous, usage info, opt out]
5----
6-
7-## Overview
8-
9-The open-source Continue Extensions collect and report **anonymous** usage information to help us improve our product. This data enables us to understand user interactions and optimize the user experience effectively. You can opt out of telemetry collection at any time if you prefer not to share your usage information.
10-
11-We utilize [Posthog](https://posthog.com/), an open-source platform for product analytics, to gather and store this data. For transparency, you can review the implementation code [here](https://github.com/continuedev/continue/blob/main/gui/src/hooks/CustomPostHogProvider.tsx) or read our [official privacy policy](https://continue.dev/privacy).
12-
13-## Tracking Policy
14-
15-All data collected by the open-source Continue extensions is anonymized and stripped of personally identifiable information (PII) before being sent to PostHog. We are committed to maintaining the privacy and security of your data.
16-
17-## What We Track
18-
19-The following usage information is collected and reported:
20-
21-- **Suggestion Interactions:** Whether you accept or reject suggestions (excluding the actual code or prompts involved).
22-- **Model and Command Information:** The name of the model and command used.
23-- **Token Metrics:** The number of tokens generated.
24-- **System Information:** The name of your operating system (OS) and integrated development environment (IDE).
25-- **Pageviews:** General pageview statistics.
26-
27-## How to Opt Out
28-
29-You can disable anonymous telemetry by visiting the [User Settings Page](./deep-dives/settings.md) and toggling "Allow Anonymous Telemetry" off.
30-
31-Alternatively in VS Code, you can disable telemetry through your VS Code settings by unchecking the "Continue: Telemetry Enabled" box (this will override the Settings Page settings). VS Code settings can be accessed with `File` > `Preferences` > `Settings` (or use the keyboard shortcut <kbd>ctrl</kbd> + <kbd>,</kbd> on Windows/Linux or <kbd>cmd</kbd> + <kbd>,</kbd> on macOS).
deleted docs/docs/advanced/yaml-migration.mdx +0 −358
@@ -1,358 +0,0 @@
1----
2-title: Config Migration to YAML
3-description: Reference for migrating from JSON to YAML Continue configuration.
4-keywords: [config, yaml, configuration, customize, customization, migration]
5----
6-
7-# Migrating Config to YAML
8-
9-Continue's YAML configuration format provides more readable, maintainable, consistent configuration files, as well as new configuration options and removal of some old configuration options. YAML is the preferred format and will be used to integrate with future Continue products. Below is a brief guide for migration from `config.json` to `config.yaml`.
10-
11-See also
12-
13-- [Intro to YAML](https://yaml.org/)
14-- [JSON Continue Config Reference](/reference)
15-- [YAML Continue Config Reference](/reference)
16-
17-## Create YAML file
18-
19-Create a `config.yaml` file in your Continue Global Directory (`~/.continue` on Mac, `%USERPROFILE%\.continue`) alongside your current `config.json` file. If a `config.yaml` file is present, it will be loaded instead of `config.json`.
20-
21-Give your configuration a `name` and a `version`:
22-
23-```yaml title="config.yaml"
24-name: my-configuration
25-version: 0.0.1
26-schema: v1
27-```
28-
29-### Models
30-
31-Add all model configurations in `config.json`, including models in `models`, `tabAutocompleteModel`, `embeddingsProvider`, and `reranker`, to the `models` section of your new YAML config file. A new `roles` YAML field specifies which roles a model can be used for, with possible values `chat`, `autocomplete`, `embed`, `rerank`, `edit`, `apply`, `summarize`.
32-
33-- `models` in config should have `roles: [chat]`
34-- `tabAutocompleteModel`(s) in config should have `roles: [autocomplete]`
35-- `embeddingsProvider` in config should have `roles: [embed]`
36-- `reranker` in config should have `roles: [rerank]`
37-- `experimental.modelRoles` is replaced by simply adding roles to the model
38- - `inlineEdit` -> e.g. `roles: [chat, edit]`
39- - `applyCodeBlock` -> e.g. `roles: [chat, apply]`
40-
41-Model-level `requestOptions` remain, with minor changes. See [YAML Continue Config Reference](/reference#models)
42-
43-Model-level `completionOptions` are replaced by `defaultCompletionOptions`, with minor changes. See [YAML Continue Config Reference](/reference#models)
44-
45-<!-- TODO - ollama autodetect supported? -->
46-
47-**Before**
48-
49-```json title="config.json""
50-{
51- "models": [
52- {
53- "title": "GPT-4",
54- "provider": "openai",
55- "model": "gpt-4",
56- "apiKey": "<YOUR_OPENAI_API_KEY>",
57- "completionOptions": {
58- "temperature": 0.5,
59- "maxTokens": 2000
60- }
61- },
62- {
63- "title": "Ollama",
64- "provider": "ollama",
65- "model": "AUTODETECT"
66- },
67- {
68- "title": "My Open AI Compatible Model",
69- "provider": "openai",
70- "apiBase": "http://3.3.3.3/v1",
71- "model": "my-openai-compatible-model",
72- "requestOptions": {
73- "headers": { "X-Auth-Token": "<API_KEY>" }
74- }
75- }
76- ],
77- "tabAutocompleteModel": {
78- "title": "My Starcoder",
79- "provider": "ollama",
80- "model": "starcoder2:3b"
81- },
82- "embeddingsProvider": {
83- "provider": "openai",
84- "model": "text-embedding-ada-002",
85- "apiKey": "<YOUR_OPENAI_API_KEY>",
86- "maxEmbeddingChunkSize": 256,
87- "maxEmbeddingBatchSize": 5
88- },
89- "reranker": {
90- "name": "voyage",
91- "params": {
92- "model": "rerank-2",
93- "apiKey": "<YOUR_VOYAGE_API_KEY>"
94- }
95- }
96-}
97-```
98-
99-**After**
100-
101-```yaml title="config.yaml"
102-models:
103- - name: GPT-4
104- provider: openai
105- model: gpt-4
106- apiKey: <YOUR_OPENAI_KEY>
107- defaultCompletionOptions:
108- temperature: 0.5
109- maxTokens: 2000
110- roles:
111- - chat
112- - edit
113-
114- - name: My Voyage Reranker
115- provider: voyage
116- apiKey: <YOUR_VOYAGE_KEY>
117- roles:
118- - rerank
119-
120- - name: My Starcoder
121- provider: ollama
122- model: starcoder2:3b
123- roles:
124- - autocomplete
125-
126- - name: My Ada Embedder
127- provider: openai
128- apiKey: <YOUR_ADA_API_KEY>
129- roles:
130- - embed
131- embedOptions:
132- - maxChunkSize: 256
133- - maxBatchSize: 5
134-
135- - name: Ollama Autodetect
136- provider: ollama
137- model: AUTODETECT
138-
139- - name: My Open AI Compatible Model - Apply
140- provider: openai
141- model: my-openai-compatible-model
142- apiBase: http://3.3.3.3/v1
143- requestOptions:
144- headers:
145- X-Auth-Token: <MY_API_KEY>
146- roles:
147- - chat
148- - apply
149-```
150-
151-Note that the `repoMapFileSelection` experimental model role has been deprecated and is only available in `config.json`.
152-
153-### Context Providers
154-
155-The JSON `contextProviders` field is replaced by the YAML `context` array.
156-
157-- JSON `name` maps to `provider`
158-- JSON `params` map to `params`
159-
160-**Before**
161-
162-```json title="config.json""
163-{
164- "contextProviders": [
165- {
166- "name": "docs"
167- },
168- {
169- "name": "codebase",
170- "params": {
171- "nRetrieve": 30,
172- "nFinal": 3
173- }
174- },
175- {
176- "name": "diff",
177- "params": {}
178- }
179- ]
180-}
181-```
182-
183-**After**
184-
185-```yaml title="config.yaml"
186-context:
187- - provider: docs
188-
189- - provider: codebase
190- params:
191- nRetrieve: 30
192- nFinal: 3
193-
194- - provider: diff
195-```
196-
197-### System Message
198-
199-The `systemMessage` property has been replaced with a `rules` property that takes an array of strings.
200-
201-**Before**
202-
203-```json title="config.json""
204-{
205- "systemMessage": "Always give concise responses"
206-}
207-```
208-
209-**After**
210-
211-```yaml title="config.yaml"
212-rules:
213- - Always give concise responses
214-```
215-
216-### Prompts
217-
218-Rather than with `customCommands`, you can now use the `prompts` field to define custom prompts.
219-
220-**Before**
221-
222-```json title="config.json""
223-{
224- "customCommands": [
225- {
226- "name": "check",
227- "description": "Check for mistakes in my code",
228- "prompt": "{{{ input }}}\n\nPlease read the highlighted code and check for any mistakes. You should look for the following, and be extremely vigilant:\n- Syntax errors\n- Logic errors\n- Security vulnerabilities\n- Performance issues\n- Anything else that looks wrong\n\nOnce you find an error, please explain it as clearly as possible, but without using extra words. For example, instead of saying 'I think there is a syntax error on line 5', you should say 'Syntax error on line 5'. Give your answer as one bullet point per mistake found."
229- }
230- ]
231-}
232-```
233-
234-**After**
235-
236-```yaml title="config.yaml"
237-prompts:
238- - name: check
239- description: Check for mistakes in my code
240- prompt: |
241- Please read the highlighted code and check for any mistakes. You should look for the following, and be extremely vigilant:
242- - Syntax errors
243- - Logic errors
244- - Security vulnerabilities
245- - Performance issues
246- - Anything else that looks wrong
247-
248- Once you find an error, please explain it as clearly as possible, but without using extra words. For example, instead of saying 'I think there is a syntax error on line 5', you should say 'Syntax error on line 5'. Give your answer as one bullet point per mistake found.
249-```
250-
251-### Documentation
252-
253-Documentation is largely the same, but the `title` property has been replaced with `name`. The `startUrl`, `rootUrl`, and `faviconUrl` properties remain.
254-
255-**Before**
256-
257-```json title="config.json""
258-{
259- "docs": [
260- {
261- "startUrl": "https://docs.nestjs.com/",
262- "title": "nest.js"
263- },
264- {
265- "startUrl": "https://mysite.com/docs/",
266- "title": "My site"
267- }
268- ]
269-}
270-```
271-
272-**After**
273-
274-```yaml title="config.yaml"
275-docs:
276- - name: nest.js
277- startUrl: https://docs.nestjs.com/
278-
279- - name: My site
280- startUrl: https://mysite.com/docs/
281-```
282-
283-### MCP Servers
284-
285-**Properties:**
286-
287-- `name` (**required**): The name of the MCP server.
288-- `command` (**required**): The command used to start the server.
289-- `args`: An optional array of arguments for the command.
290-- `env`: An optional map of environment variables for the server process.
291-
292-**Before**
293-
294-```json title="config.json""
295-{
296- "experimental": {
297- "modelContextProtocolServers": [
298- {
299- "transport": {
300- "type": "stdio",
301- "command": "uvx",
302- "args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"],
303- "env": {
304- "KEY": "<VALUE>"
305- }
306- }
307- }
308- ]
309- }
310-}
311-```
312-
313-**After**
314-
315-```yaml title="config.yaml"
316-mcpServers:
317- - name: My MCP Server
318- command: uvx
319- args:
320- - mcp-server-sqlite
321- - --db-path
322- - /Users/NAME/test.db
323- env:
324- KEY: <VALUE>
325-```
326-
327----
328-
329-## Deprecated configuration options
330-
331-Some deprecated `config.json` settings are no longer stored in config and have been moved to be editable through the [User Settings Page](./deep-dives/settings.md) (Gear Icon). If found in `config.json`, they will be auto-migrated to User Settings and removed from `config.json`.
332-
333-See the [JSON Config Reference](/reference) for more information on fully deprecated options.
334-
335-The following top-level fields from `config.json` still work when using `config.json` but have been deprecated and don't have a YAML equivalent:
336-
337-- Slash commands (JSON `slashCommands`)
338-- top-level `requestOptions`
339-- top-level `completionOptions`
340-- `tabAutocompleteOptions`
341- - `disable`
342- - `maxPromptTokens`
343- - `debounceDelay`
344- - `maxSuffixPercentage`
345- - `prefixPercentage`
346- - `template`
347- - `onlyMyCode`
348-- `analytics`
349-
350-The following top-level fields from `config.json` have been deprecated. Most UI-related and user-specific options will move into a settings page in the UI
351-
352-- `customCommands`
353-- `experimental`
354-- `userToken`
355-
356-## New Configuration options
357-
358-The YAML configuration format offers new configuration options not available in the JSON format. See the [YAML Config Reference](/reference) for more information.
modified docs/docs/customization/00-overview.mdx +6 −6
@@ -6,11 +6,11 @@
66
77 Continue can be deeply customized. For example you might:
88
9-- **Change your Model Provider**. Continue allows you to choose your favorite or even add multiple model providers. This allows you to use different models for different tasks, or to try another model if you're not happy with the results from your current model. Continue supports all of the popular model providers, including OpenAI, Anthropic, Microsoft/Azure, Mistral, and more. You can even self host your own model provider if you'd like. Learn more about [model providers](../advanced/model-providers/top-level/openai.mdx).
10-- **Select different models for specific tasks**. Different Continue features can use different models. We call these _model roles_. For example, you can use a different model for chat than you do for autocomplete. Learn more about [model roles](../advanced/model-roles/00-intro.mdx).
11-- **Add a Context Provider**. Context providers allow you to add information to your prompts, giving your LLM additional context to work with. Context providers allow you to reference snippets from your codebase, or lookup relevant documentation, or use a search engine to find information and much more. Learn more about [context providers](../advanced/custom-providers.mdx).
12-- **Create a Slash Command**. Slash commands allow you to easily add custom functionality to Continue. You can use a slash command that allows you to generate a shell command from natural language, or perhaps generate a commit message, or create your own custom command to do whatever you want. Learn more about [slash commands](../advanced/deep-dives/slash-commands.mdx).
13-- **Call external tools and functions**. Unchain your LLM with the power of tools using [Agent](../features/agent/quick-start.mdx). Add custom tools using [MCP Servers](../advanced/deep-dives/mcp.mdx)
9+- **Change your Model Provider**. Continue allows you to choose your favorite or even add multiple model providers. This allows you to use different models for different tasks, or to try another model if you're not happy with the results from your current model. Continue supports all of the popular model providers, including OpenAI, Anthropic, Microsoft/Azure, Mistral, and more. You can even self host your own model provider if you'd like. Learn more about [model providers](../customize/model-providers/top-level/openai.mdx).
10+- **Select different models for specific tasks**. Different Continue features can use different models. We call these _model roles_. For example, you can use a different model for chat than you do for autocomplete. Learn more about [model roles](../customize/model-roles/00-intro.mdx).
11+- **Add a Context Provider**. Context providers allow you to add information to your prompts, giving your LLM additional context to work with. Context providers allow you to reference snippets from your codebase, or lookup relevant documentation, or use a search engine to find information and much more. Learn more about [context providers](../customize/custom-providers.mdx).
12+- **Create a Slash Command**. Slash commands allow you to easily add custom functionality to Continue. You can use a slash command that allows you to generate a shell command from natural language, or perhaps generate a commit message, or create your own custom command to do whatever you want. Learn more about [slash commands](../customize/deep-dives/slash-commands.mdx).
13+- **Call external tools and functions**. Unchain your LLM with the power of tools using [Agent](../features/agent/quick-start.mdx). Add custom tools using [MCP Servers](../customize/deep-dives/mcp.mdx)
1414
1515 Whatever you choose, you'll probably start by editing your Assistant.
1616
@@ -21,4 +21,4 @@
2121 ![configure an assistant](/img/configure-continue.png)
2222
2323 - See [Editing Hub Assistants](../hub/assistants/edit-an-assistant.md) for more details on managing your hub assistant
24-- See the [Config Deep Dive](../advanced/deep-dives/configuration.md) for more details on configuring local assistants.
24+- See the [Config Deep Dive](../customize/deep-dives/configuration.md) for more details on configuring local assistants.
modified docs/docs/customization/mcp-tools.mdx +1 −20
@@ -18,23 +18,4 @@
1818
1919 ## Learn More
2020
21-Learn more in the [MCP deep dive](../advanced/deep-dives/mcp.mdx), and view [`mcpServers`](/reference#mcpservers) in the YAML Reference for more details.
22-description: Model Context Protocol servers provide specialized functionality
23-keywords: [mcp, blocks, model context protocol, integrations, tools]
24-sidebar_position: 4
25-
26----
27-
28-Model Context Protocol servers provide specialized functionality:
29-
30-- Enable integration with external tools and systems
31-- Create extensible interfaces for custom capabilities
32-- Support more complex interactions with your development environment
33-- Allow partners to contribute specialized functionality
34-- Database Connectors: Understand schema and data models during development
35-
36-![MCP Blocks Overview](/img/mcp-blocks-overview.png)
37-
38-## Learn More
39-
40-Learn more in the [MCP deep dive](../advanced/deep-dives/mcp.mdx), and view [`mcpServers`](/reference#mcpservers) in the YAML Reference for more details.
21+Learn more in the [MCP deep dive](../customize/deep-dives/mcp.mdx), and view [`mcpServers`](/reference#mcpservers) in the YAML Reference for more details.
modified docs/docs/customization/models.mdx +8 −8
@@ -8,17 +8,17 @@
88
99 These blocks form the foundation of the entire assistant experience, offering different specialized capabilities:
1010
11-- **[Chat](../advanced/model-roles/chat.mdx)**: Power conversational interactions about code and provide detailed guidance
12-- **[Edit](../advanced/model-roles/edit.mdx)**: Handle complex code transformations and refactoring tasks
13-- **[Apply](../advanced/model-roles/apply.mdx)**: Execute targeted code modifications with high accuracy
14-- **[Autocomplete](../advanced/model-roles/autocomplete.md)**: Provide real-time suggestions as developers type
15-- **[Embedding](../advanced/model-roles/embeddings.mdx)**: Transform code into vector representations for semantic search
16-- **[Reranker](../advanced/model-roles/reranking.mdx)**: Improve search relevance by ordering results based on semantic meaning
11+- **[Chat](../customize/model-roles/chat.mdx)**: Power conversational interactions about code and provide detailed guidance
12+- **[Edit](../customize/model-roles/edit.mdx)**: Handle complex code transformations and refactoring tasks
13+- **[Apply](../customize/model-roles/apply.mdx)**: Execute targeted code modifications with high accuracy
14+- **[Autocomplete](../customize/model-roles/autocomplete.md)**: Provide real-time suggestions as developers type
15+- **[Embedding](../customize/model-roles/embeddings.mdx)**: Transform code into vector representations for semantic search
16+- **[Reranker](../customize/model-roles/reranking.mdx)**: Improve search relevance by ordering results based on semantic meaning
1717
1818 ![Model Blocks Overview](/img/model-blocks-overview.png)
1919
2020 ## Learn More
2121
22-Continue supports [many model providers](../advanced/model-providers/top-level/openai.mdx), including Anthropic, OpenAI, Gemini, Ollama, Amazon Bedrock, Azure, xAI, DeepSeek, and more. Models can have various roles like `chat`, `edit`, `apply`, `autocomplete`, `embed`, and `rerank`.
22+Continue supports [many model providers](../customize/model-providers/top-level/openai.mdx), including Anthropic, OpenAI, Gemini, Ollama, Amazon Bedrock, Azure, xAI, DeepSeek, and more. Models can have various roles like `chat`, `edit`, `apply`, `autocomplete`, `embed`, and `rerank`.
2323
24-Read more about roles [here](../advanced/model-roles/00-intro.mdx) and view [`models`](/reference#models) in the YAML Reference.
24+Read more about roles [here](../customize/model-roles/00-intro.mdx) and view [`models`](/reference#models) in the YAML Reference.
modified docs/docs/customization/prompts.mdx +1 −1
@@ -18,4 +18,4 @@
1818
1919 ## Learn More
2020
21-Prompt blocks have the same syntax as [prompt files](../advanced/deep-dives/prompts.md). The `config.yaml` spec for `prompts` can be found [here](/reference#prompts).
21+Prompt blocks have the same syntax as [prompt files](../customize/deep-dives/prompts.md). The `config.yaml` spec for `prompts` can be found [here](/reference#prompts).
modified docs/docs/customization/rules.mdx +1 −1
@@ -22,4 +22,4 @@
2222
2323 ## Learn More
2424
25-Learn more in the [rules deep dive](../advanced/deep-dives/rules.mdx), and view [`rules`](/reference#rules) in the YAML Reference for more details.
25+Learn more in the [rules deep dive](../customize/deep-dives/rules.mdx), and view [`rules`](/reference#rules) in the YAML Reference for more details.
added docs/docs/customize/00-overview.mdx +56 −0
@@ -0,0 +1,56 @@
1+---
2+title: Overview
3+description: Deep dive into Continue's advanced features, context providers, and configuration options
4+keywords:
5+ [advanced, context, providers, model providers, configuration, deep dives]
6+---
7+
8+# Advanced Topics
9+
10+Explore Continue's advanced capabilities for power users and complex development scenarios.
11+
12+## Context Providers
13+
14+Master how Continue understands your codebase with powerful context providers for code, documentation, and more.
15+
16+[Explore Context Providers →](./custom-providers)
17+
18+## Context Integration
19+
20+Specialized context features for codebase understanding and documentation integration.
21+
22+[Browse Context Features →](./context/codebase.mdx)
23+
24+## Deep Dives
25+
26+Detailed technical explanations of Continue's internal workings and advanced configuration options.
27+
28+[Read Deep Dives →](./deep-dives/configuration.md)
29+
30+## Model Providers
31+
32+Configure and optimize different AI model providers for your specific needs and infrastructure.
33+
34+[Configure Providers →](./model-providers/top-level/openai.mdx)
35+
36+## Model Roles
37+
38+Understand how different models can be assigned specific roles in your development workflow.
39+
40+[Learn Model Roles →](./model-roles/00-intro.mdx)
41+
42+## Reference
43+
44+Complete configuration reference and API documentation.
45+
46+[View Reference →](/reference)
47+
48+## Troubleshooting
49+
50+Solutions to common issues and debugging techniques.
51+
52+[Get Help →](/troubleshooting)
53+
54+---
55+
56+These advanced topics help you get the most out of Continue in complex development environments.
added docs/docs/customize/context/_category_.json +4 −0
@@ -0,0 +1,4 @@
1+{
2+ "label": "Context",
3+ "position": 2
4+}
added docs/docs/customize/context/codebase.mdx +99 −0
@@ -0,0 +1,99 @@
1+---
2+description: Talk to your codebase
3+keywords: [talk, embeddings, reranker, codebase, experimental]
4+---
5+
6+import TabItem from "@theme/TabItem";
7+import Tabs from "@theme/Tabs";
8+
9+# @Codebase
10+
11+Continue indexes your codebase so that it can later automatically pull in the most relevant context from throughout your workspace. This is done via a combination of embeddings-based retrieval and keyword search. By default, all embeddings are calculated locally using `transformers.js` and stored locally in `~/.continue/index`.
12+
13+:::info[`transformers.js cannot be used in JetBrains`]
14+Currently, `transformers.js` cannot be used in JetBrains IDEs. However, you can select a differet embeddings model from [the list here](../model-roles/embeddings.mdx).
15+:::
16+
17+Currently, the codebase retrieval feature is available as the "codebase" and "folder" context providers. You can use them by typing `@Codebase` or `@Folder` in the input box, and then asking a question. The contents of the input box will be compared with the embeddings from the rest of the codebase (or folder) to determine relevant files.
18+
19+Here are some common use cases where it can be useful:
20+
21+- Asking high-level questions about your codebase
22+ - "How do I add a new endpoint to the server?"
23+ - "Do we use VS Code's CodeLens feature anywhere?"
24+ - "Is there any code written already to convert HTML to markdown?"
25+- Generate code using existing samples as reference
26+ - "Generate a new React component with a date picker, using the same patterns as existing components"
27+ - "Write a draft of a CLI application for this project using Python's argparse"
28+ - "Implement the `foo` method in the `bar` class, following the patterns seen in other subclasses of `baz`.
29+- Use `@Folder` to ask questions about a specific folder, increasing the likelihood of relevant results
30+ - "What is the main purpose of this folder?"
31+ - "How do we use VS Code's CodeLens API?"
32+ - Or any of the above examples, but with `@Folder` instead of `@Codebase`
33+
34+Here are use cases where it is not useful:
35+
36+- When you need the LLM to see _literally every_ file in your codebase
37+ - "Find everywhere where the `foo` function is called"
38+ - "Review our codebase and find any spelling mistakes"
39+- Refactoring
40+ - "Add a new parameter to the `bar` function and update usages"
41+
42+## Configuration
43+
44+There are a few options that let you configure the behavior of the `@codebase` context provider, which are the same for the `@folder` context provider:
45+
46+<Tabs groupId="config-example">
47+ <TabItem value="yaml" label="YAML">
48+ ```yaml title="config.yaml"
49+ context:
50+ - provider: codebase
51+ params:
52+ nRetrieve: 25
53+ nFinal: 5
54+ useReranking: true
55+ ```
56+ </TabItem>
57+ <TabItem value="json" label="JSON">
58+ ```json title="config.json"
59+ {
60+ "contextProviders": [
61+ {
62+ "name": "codebase",
63+ "params": {
64+ "nRetrieve": 25,
65+ "nFinal": 5,
66+ "useReranking": true
67+ }
68+ }
69+ ]
70+ }
71+ ```
72+ </TabItem>
73+</Tabs>
74+
75+### `nRetrieve`
76+
77+Number of results to initially retrieve from vector database (default: 25)
78+
79+### `nFinal`
80+
81+Final number of results to use after re-ranking (default: 5)
82+
83+### `useReranking`
84+
85+Whether to use re-ranking, which will allow initial selection of `nRetrieve` results, then will use an LLM to select the top `nFinal` results (default: true)
86+
87+## Ignore files during indexing
88+
89+Continue respects `.gitignore` files in order to determine which files should not be indexed. If you'd like to exclude additional files, you can add them to a `.continueignore` file, which follows the exact same rules as `.gitignore`.
90+
91+Continue also supports a **global** `.continueignore` file that will be respected for all workspaces, which can be created at `~/.continue/.continueignore`.
92+
93+If you want to see exactly what files Continue has indexed, the metadata is stored in `~/.continue/index/index.sqlite`. You can use a tool like [DB Browser for SQLite](https://sqlitebrowser.org/) to view the `tag_catalog` table within this file.
94+
95+If you need to force a refresh of the index, reload the VS Code window with <kbd>cmd/ctrl</kbd> + <kbd>shift</kbd> + <kbd>p</kbd> + "Reload Window".
96+
97+## Repository map
98+
99+Models in the Claude 3, Llama 3.1/3.2, Gemini 1.5, and GPT-4o families will automatically use a [repository map](../custom-providers.mdx#repository-map) during codebase retrieval, which allows the model to understand the structure of your codebase and use it to answer questions. Currently, the repository map only contains the filepaths in the codebase.
added docs/docs/customize/context/documentation.mdx +408 −0
@@ -0,0 +1,408 @@
1+---
2+description: Learn how to access and search your project's documentation directly within Continue
3+keywords:
4+ [
5+ documentation,
6+ indexing,
7+ context provider,
8+ embeddings,
9+ docs,
10+ embedder,
11+ embeddings provider,
12+ documentation,
13+ ]
14+toc_max_heading_level: 5
15+---
16+
17+import TabItem from "@theme/TabItem";
18+import Tabs from "@theme/Tabs";
19+
20+# @Docs
21+
22+The [`@Docs` context provider](../custom-providers#docs) allows you to efficiently reference documentation directly within Continue.
23+
24+## Enabling the `@Docs` context provider
25+
26+To enable the `@Docs` context provider, add it to the list of context providers in your `config.json` file.
27+
28+<Tabs groupId="config-example">
29+ <TabItem value="yaml" label="YAML">
30+ ```yaml title="config.yaml"
31+ context:
32+ - provider: docs
33+ ```
34+ </TabItem>
35+ <TabItem value="json" label="JSON">
36+ ```json title="config.json"
37+ {
38+ "contextProviders": [
39+ {
40+ "name": "docs"
41+ }
42+ ]
43+ }
44+ ```
45+ </TabItem>
46+</Tabs>
47+
48+## How It Works
49+
50+The `@Docs` context provider works by
51+
52+1. Crawling specified documentation sites
53+2. Generating embeddings for the chunked content
54+3. Storing the embeddings locally on your machine
55+4. Embedding chat input to include similar documentation chunks as context
56+
57+## Indexing Your Own Documentation
58+
59+### Hub `docs` Blocks
60+
61+@Docs uses [`docs` blocks](../../hub/blocks/block-types.md#docs) in Assistants from the hub. Visit the hub to [explore `docs` blocks](https://hub.continue.dev/explore/docs) or [create your own](https://hub.continue.dev/new?type=block&blockType=docs).
62+
63+### Through the `@Docs` Context Provider
64+
65+To add a single documentation site, we recommend using the **Add Documentation** Form within the GUI. This can be accessed
66+
67+- from the `@Docs` context provider - type `@Docs` in the chat, hit `Enter`, and search for `Add Docs`
68+- from the `More` page (three dots icon) in the `@docs indexes` section
69+ the `@Docs` context provider.
70+
71+In the **Add Documentation** Form, enter a `Title` and `Start URL` for the site.
72+
73+- `Title`: The name of the documentation site, used for identification in the UI.
74+- `Start URL`: The URL where the indexing process should begin.
75+
76+Indexing will begin upon submission. Progress can be viewed in the form or later in the `@docs indexes` section of the `More` page.
77+
78+Documentation sources may be suggested based on package files in your repo. This currently works for Python `requirements.txt` files and Node.js (Javascript/Typescript) `package.json` files.
79+
80+- Packages with a valid documentation URL (with a `+` icon) can be clicked to immediately kick off indexing
81+- Packages with partial information (with a pen icon) can be clicked to fill the form with the available information
82+- Note that you can hover over the information icon to see where the package suggestion was found.
83+
84+![Add documentation form](/img/docs-form.png)
85+
86+### In a configuration file
87+
88+For bulk documentation site adds or edits, we recommend editing your global configuration file directly. Documentation sites are stored in an array within `docs` in your global configuration, as follows:
89+
90+<Tabs groupId="config-example">
91+ <TabItem value="yaml" label="YAML">
92+ ```yaml title="config.yaml"
93+ docs:
94+ - title: Nest.js
95+ startUrl: https://docs.nestjs.com/
96+ faviconUrl: https://docs.nestjs.com/favicon.ico
97+ ```
98+ </TabItem>
99+ <TabItem value="json" label="JSON">
100+ ```json title="config.json"
101+ {
102+ "docs": [
103+ {
104+ "title": "Nest.js",
105+ "startUrl": "https://docs.nestjs.com/",
106+ "faviconUrl": "https://docs.nestjs.com/favicon.ico"
107+ }
108+ ]
109+ }
110+ ```
111+ </TabItem>
112+</Tabs>
113+
114+See [the config reference](/reference) for all documentation site configuration options.
115+
116+Indexing will re-sync upon saving the configuration file.
117+
118+## Configuration
119+
120+### Using Your Embeddings Provider
121+
122+If you have set up an [embeddings provider](../model-roles/embeddings.mdx), @docs will use your embeddings provider. Switching embeddings providers will trigger a re-index of all documentation sites in your configuration.
123+
124+### Reranking
125+
126+As with [@Codebase context provider configuration](./codebase#configuration), you can adjust the reranking behavior of the `@Docs` context provider with the `nRetrieve`, `nFinal`, and `useReranking`.
127+
128+<Tabs groupId="config-example">
129+ <TabItem value="yaml" label="YAML">
130+ ```yaml title="config.yaml"
131+ context:
132+ - provider: docs
133+ params:
134+ nRetrieve: 25 # The number of docs to retrieve from the embeddings query
135+ nFinal: 5 # The number of docs chunks to return IF reranking
136+ useReranking: true # use reranking if a reranker is configured (defaults to true)
137+ ```
138+ </TabItem>
139+ <TabItem value="json" label="JSON">
140+ ```json title="config.json"
141+ {
142+ "contextProviders": [
143+ {
144+ "name": "docs",
145+ "params": {
146+ "nRetrieve": 25, // The number of docs to retrieve from the embeddings query
147+ "nFinal": 5, // The number of docs chunks to return IF reranking
148+ "useReranking": true // use reranking if a reranker is configured (defaults to true)
149+ }
150+ }
151+ ]
152+ }
153+ ```
154+ </TabItem>
155+</Tabs>
156+
157+### GitHub
158+
159+The GitHub API rate limits public requests to 60 per hour. If you want to reliably index GitHub repos, you can add a github token to your config file:
160+
161+<Tabs groupId="config-example">
162+ <TabItem value="yaml" label="YAML">
163+ ```yaml title="config.yaml"
164+ context:
165+ - provider: docs
166+ params:
167+ githubToken: <GITHUB_TOKEN>
168+ ```
169+ </TabItem>
170+ <TabItem value="json" label="JSON">
171+ ```json title="config.json"
172+ {
173+ "contextProviders": [
174+ {
175+ "name": "docs",
176+ "params": {
177+ "githubToken": "github_..."
178+ }
179+ }
180+ ]
181+ }
182+ ```
183+ </TabItem>
184+</Tabs>
185+
186+### Local Crawling
187+
188+By default, Continue crawls documentation sites using a specialized crawling service that provides the best experience for most users and documentation sites.
189+
190+If your documentation is private, you can skip the default crawler and use a local crawler instead by setting `useLocalCrawling` to `true`.
191+
192+<Tabs groupId="config-example">
193+ <TabItem value="yaml" label="YAML">
194+ ```yaml title="config.yaml"
195+ docs:
196+ - title: My Private Docs
197+ startUrl: http://10.2.1.2/docs
198+ faviconUrl: http://10.2.1.2/docs/assets/favicon.ico,
199+ useLocalCrawling: true
200+ ```
201+ </TabItem>
202+ <TabItem value="json" label="JSON">
203+ ```json title="config.json"
204+ {
205+ "docs": [
206+ {
207+ "title": "My Private Docs",
208+ "startUrl": "http://10.2.1.2/docs",
209+ "faviconUrl": "http://10.2.1.2/docs/assets/favicon.ico",
210+ "useLocalCrawling": true
211+ }
212+ ]
213+ }
214+ ```
215+ </TabItem>
216+</Tabs>
217+
218+:::info
219+Chromium crawling has been deprecated
220+{/* The default local crawler is a lightweight tool that cannot render sites that are dynamically generated using JavaScript. If your sites need to be rendered, you can enable the experimental `Use Chromium for Docs Crawling` feature from your [User Settings Page](../deep-dives/settings.md) This will download and install Chromium to `~/.continue/.utils`, and use it as the local crawler. */}
221+:::
222+
223+Further notes:
224+
225+- If the site is only locally accessible, the default crawler will fail anyways and fall back to the local crawler. `useLocalCrawling` is especially useful if the URL itself is confidential.
226+- For GitHub Repos this has no effect because only the GitHub Crawler will be used, and if the repo is private it can only be accessed with a priveleged GitHub token anyways.
227+
228+## Managing your docs indexes
229+
230+You can view indexing statuses and manage your documentation sites from the `@docs indexes` section of the `More` page (three dots)
231+
232+- Continue does not automatically re-index your docs. Use `Click to re-index` to trigger a reindex for a specific source
233+- While a site is indexing, click `Cancel indexing` to cancel the process
234+- Failed indexing attempts will show an error status bar and icon
235+- Delete a documentation site from your configuration using the trash icon
236+
237+![More Page @docs indexes section](/img/docs-indexes.png)
238+
239+You can also view the overall status of currently indexing docs from a hideable progress bar at the bottom of the chat page
240+
241+![Documentation indexing peek](/img/docs-indexing-peek.png)
242+
243+You can also use the following IDE command to force a re-index of all docs: `Continue: Docs Force Re-Index`.
244+
245+## Examples
246+
247+### VS Code minimal setup
248+
249+The following configuration example works out of the box for VS Code. This uses the built-in embeddings provider with no reranking.
250+
251+<Tabs groupId="config-example">
252+ <TabItem value="yaml" label="YAML">
253+ ```yaml title="config.yaml"
254+ context:
255+ - provider: docs
256+
257+ docs:
258+ - title: Nest.js
259+ startUrl: https://docs.nestjs.com/
260+ ```
261+ </TabItem>
262+ <TabItem value="json" label="JSON">
263+ ```json title="config.json"
264+ {
265+ "contextProviders": [
266+ {
267+ "name": "docs",
268+ }
269+ ],
270+ "docs": [
271+ {
272+ "title": "Nest.js",
273+ "startUrl": "https://docs.nestjs.com/",
274+ },
275+ ]
276+ }
277+ ```
278+ </TabItem>
279+</Tabs>
280+
281+### Jetbrains minimal setup
282+
283+Here is the equivalent minimal example for Jetbrains, which requires setting up an [embeddings provider](../model-roles/embeddings.mdx).
284+
285+<Tabs groupId="config-example">
286+ <TabItem value="yaml" label="YAML">
287+ ```yaml title="config.yaml"
288+ models:
289+ - name: LMStudio embedder
290+ provider: lmstudio
291+ model: nomic-ai/nomic-embed-text-v1.5-GGUF
292+ roles:
293+ - embed
294+ context:
295+ - provider: docs
296+ docs:
297+ - title: Nest.js
298+ startUrl: https://docs.nestjs.com/
299+ ```
300+ </TabItem>
301+ <TabItem value="json" label="JSON">
302+ ```json title="config.json"
303+ {
304+ "contextProviders": [
305+ {
306+ "name": "docs",
307+ }
308+ ],
309+ "docs": [
310+ {
311+ "title": "Nest.js",
312+ "startUrl": "https://docs.nestjs.com/",
313+ },
314+ ],
315+ "embeddingsProvider": {
316+ "provider": "lmstudio",
317+ "model": "nomic-ai/nomic-embed-text-v1.5-GGUF"
318+ }
319+ }
320+ ```
321+ </TabItem>
322+</Tabs>
323+
324+### Full-power setup (VS Code or Jetbrains)
325+
326+The following configuration example includes:
327+
328+- Examples of both public and private documentation sources
329+- A custom embeddings provider
330+- A reranker model available, with reranking parameters customized
331+- A GitHub token to enable GitHub crawling
332+
333+<Tabs groupId="config-example">
334+ <TabItem value="yaml" label="YAML">
335+ ```yaml title="config.yaml"
336+ models:
337+ - name: LMStudio Nomic Text
338+ provider: lmstudio
339+ model: nomic-ai/nomic-embed-text-v1.5-GGUF
340+ roles:
341+ - embed
342+ - name: Voyage Rerank-2
343+ provider: voyage
344+ apiKey: <VOYAGE_API_KEY>
345+ model: rerank-2
346+ roles:
347+ - rerank
348+ context:
349+ - provider: docs
350+ params:
351+ githubToken: <GITHUB_TOKEN>
352+ nRetrieve: 25
353+ nFinal: 5
354+ useReranking: true
355+ docs:
356+ - title: Nest.js
357+ startUrl: https://docs.nestjs.com/
358+ - title: My Private Docs
359+ startUrl: http://10.2.1.2/docs
360+ faviconUrl: http://10.2.1.2/docs/assets/favicon.ico
361+ maxDepth: 4
362+ useLocalCrawling: true
363+ ```
364+ </TabItem>
365+ <TabItem value="json" label="JSON">
366+ ```json title="config.json"
367+ {
368+ "contextProviders": [
369+ {
370+ "name": "docs",
371+ "params": {
372+ "githubToken": "github_...",
373+ "nRetrieve": 25,
374+ "nFinal": 5,
375+ "useReranking": true
376+ }
377+ }
378+ ],
379+ "docs": [
380+ {
381+ "title": "Nest.js",
382+ "startUrl": "https://docs.nestjs.com/"
383+ },
384+ {
385+ "title": "My Private Docs",
386+ "startUrl": "http://10.2.1.2/docs",
387+ "faviconUrl": "http://10.2.1.2/docs/assets/favicon.ico",
388+ "maxDepth": 4,
389+ "useLocalCrawling": true
390+ }
391+ ],
392+ "reranker": {
393+ "name": "voyage",
394+ "params": {
395+ "model": "rerank-2",
396+ "apiKey": "<YOUR_VOYAGE_API_KEY>"
397+ }
398+ },
399+ "embeddingsProvider": {
400+ "provider": "lmstudio",
401+ "model": "nomic-ai/nomic-embed-text-v1.5-GGUF"
402+ }
403+ }
404+ ```
405+ </TabItem>
406+</Tabs>
407+
408+{/* This could also involve enabling Chromium as a backup for local documentation the [User Settings Page](../deep-dives/settings.md). */}
added docs/docs/customize/custom-providers.mdx +1086 −0
@@ -0,0 +1,1086 @@
1+---
2+title: Context Providers
3+description: Type '@' to select content to the LLM as context
4+keywords: [context, "@", provider, LLM]
5+---
6+
7+import TabItem from "@theme/TabItem";
8+import Tabs from "@theme/Tabs";
9+
10+Context Providers allow you to type '@' and see a dropdown of content that can all be fed to the LLM as context. Every context provider is a plugin, which means if you want to reference some source of information that you don't see here, you can request (or build!) a new context provider.
11+
12+As an example, say you are working on solving a new GitHub Issue. You type '@Issue' and select the one you are working on. Continue can now see the issue title and contents. You also know that the issue is related to the files 'readme.md' and 'helloNested.py', so you type '@readme' and '@hello' to find and select them. Now these 3 "Context Items" are displayed inline with the rest of your input.
13+
14+![Context Items](/img/context-provider-example.png)
15+
16+## Context blocks
17+
18+You can add context providers to assistants using [`context` blocks](../hub/blocks/block-types.md#context). Explore available context blocks in [the hub](https://hub.continue.dev/explore/context).
19+
20+## Built-in Context Providers
21+
22+You can add any built-in context-providers in your config file as shown below:
23+
24+### `@File`
25+
26+Reference any file in your current workspace.
27+
28+<Tabs groupId="config-example">
29+ <TabItem value="yaml" label="YAML">
30+ ```yaml title="config.yaml"
31+ context:
32+ - provider: file
33+ ```
34+ </TabItem>
35+ <TabItem value="json" label="JSON">
36+ ```json title="config.json"
37+ {
38+ "contextProviders": [
39+ {
40+ "name": "file"
41+ }
42+ ]
43+ }
44+ ```
45+ </TabItem>
46+</Tabs>
47+
48+### `@Code`
49+
50+Reference specific functions or classes from throughout your project.
51+
52+<Tabs groupId="config-example">
53+ <TabItem value="yaml" label="YAML">
54+ ```yaml title="config.yaml"
55+ context:
56+ - provider: code
57+ ```
58+ </TabItem>
59+ <TabItem value="json" label="JSON">
60+ ```json title="config.json"
61+ {
62+ "contextProviders": [
63+ {
64+ "name": "code"
65+ }
66+ ]
67+ }
68+ ```
69+ </TabItem>
70+</Tabs>
71+
72+### `@Git Diff`
73+
74+Reference all of the changes you've made to your current branch. This is useful if you want to summarize what you've done or ask for a general review of your work before committing.
75+
76+<Tabs groupId="config-example">
77+ <TabItem value="yaml" label="YAML">
78+ ```yaml title="config.yaml"
79+ context:
80+ - provider: diff
81+ ```
82+ </TabItem>
83+ <TabItem value="json" label="JSON">
84+ ```json title="config.json"
85+ {
86+ "contextProviders": [
87+ {
88+ "name": "diff"
89+ }
90+ ]
91+ }
92+ ```
93+ </TabItem>
94+</Tabs>
95+
96+### `@Current File`
97+
98+Reference the currently open file.
99+
100+<Tabs groupId="config-example">
101+ <TabItem value="yaml" label="YAML">
102+ ```yaml title="config.yaml"
103+ context:
104+ - provider: currentFile
105+ ```
106+ </TabItem>
107+ <TabItem value="json" label="JSON">
108+ ```json title="config.json"
109+ {
110+ "contextProviders": [
111+ {
112+ "name": "currentFile"
113+ }
114+ ]
115+ }
116+ ```
117+ </TabItem>
118+</Tabs>
119+
120+### `@Terminal`
121+
122+Reference the last command you ran in your IDE's terminal and its output.
123+
124+<Tabs groupId="config-example">
125+ <TabItem value="yaml" label="YAML">
126+ ```yaml title="config.yaml"
127+ context:
128+ - provider: terminal
129+ ```
130+ </TabItem>
131+ <TabItem value="json" label="JSON">
132+ ```json title="config.json"
133+ {
134+ "contextProviders": [
135+ {
136+ "name": "terminal"
137+ }
138+ ]
139+ }
140+ ```
141+ </TabItem>
142+</Tabs>
143+
144+### `@Docs`
145+
146+Reference the contents from any documentation site.
147+
148+<Tabs groupId="config-example">
149+ <TabItem value="yaml" label="YAML">
150+ ```yaml title="config.yaml"
151+ context:
152+ - provider: docs
153+ ```
154+ </TabItem>
155+ <TabItem value="json" label="JSON">
156+ ```json title="config.json"
157+ {
158+ "contextProviders": [
159+ {
160+ "name": "docs"
161+ }
162+ ]
163+ }
164+ ```
165+ </TabItem>
166+</Tabs>
167+
168+Note that this will only enable the `@Docs` context provider.
169+
170+To use it, you need to add a documentation site to your config file. See the [docs](./context/documentation.mdx) page for more information.
171+
172+### `@Open`
173+
174+Reference the contents of all of your open files. Set `onlyPinned` to `true` to only reference pinned files.
175+
176+<Tabs groupId="config-example">
177+ <TabItem value="yaml" label="YAML">
178+ ```yaml title="config.yaml"
179+ context:
180+ - provider: open
181+ params:
182+ onlyPinned: true
183+ ```
184+ </TabItem>
185+ <TabItem value="json" label="JSON">
186+ ```json title="config.json"
187+ {
188+ "contextProviders": [
189+ {
190+ "name": "open",
191+ "params": {
192+ "onlyPinned": true
193+ }
194+ }
195+ ]
196+ }
197+ ```
198+ </TabItem>
199+</Tabs>
200+
201+### `@Web`
202+
203+Reference relevant pages from across the web, automatically determined from your input.
204+
205+Optionally, set `n` to limit the number of results returned (default 6).
206+
207+<Tabs groupId="config-example">
208+ <TabItem value="yaml" label="YAML">
209+ ```yaml title="config.yaml"
210+ context:
211+ - provider: web
212+ params:
213+ n: 5
214+ ```
215+ </TabItem>
216+ <TabItem value="json" label="JSON">
217+ ```json title="config.json"
218+ {
219+ "contextProviders": [
220+ {
221+ "name": "web",
222+ "params": {
223+ "n": 5
224+ }
225+ }
226+ ]
227+ }
228+ ```
229+ </TabItem>
230+</Tabs>
231+
232+### `@Codebase`
233+
234+Reference the most relevant snippets from your codebase.
235+
236+<Tabs groupId="config-example">
237+ <TabItem value="yaml" label="YAML">
238+ ```yaml title="config.yaml"
239+ context:
240+ - provider: codebase
241+ ```
242+ </TabItem>
243+ <TabItem value="json" label="JSON">
244+ ```json title="config.json"
245+ {
246+ "contextProviders": [
247+ {
248+ "name": "codebase"
249+ }
250+ ]
251+ }
252+ ```
253+ </TabItem>
254+</Tabs>
255+
256+Read more about indexing and retrieval [here](./context/codebase.mdx).
257+
258+### `@Folder`
259+
260+Uses the same retrieval mechanism as `@Codebase`, but only on a single folder.
261+
262+<Tabs groupId="config-example">
263+ <TabItem value="yaml" label="YAML">
264+ ```yaml title="config.yaml"
265+ context:
266+ - provider: folder
267+ ```
268+ </TabItem>
269+ <TabItem value="json" label="JSON">
270+ ```json title="config.json"
271+ {
272+ "contextProviders": [
273+ {
274+ "name": "folder"
275+ }
276+ ]
277+ }
278+ ```
279+ </TabItem>
280+</Tabs>
281+
282+### `@Search`
283+
284+Reference the results of codebase search, just like the results you would get from VS Code search.
285+
286+<Tabs groupId="config-example">
287+ <TabItem value="yaml" label="YAML">
288+ ```yaml title="config.yaml"
289+ context:
290+ - provider: search
291+ params:
292+ maxResults: 100 # optional, defaults to 200
293+ ```
294+ </TabItem>
295+ <TabItem value="json" label="JSON">
296+ ```json title="config.json"
297+ {
298+ "contextProviders": [
299+ {
300+ "name": "search",
301+ "params": {
302+ "maxResults": 100 // optional, defaults to 200
303+ }
304+ }
305+ ]
306+ }
307+ ```
308+ </TabItem>
309+</Tabs>
310+
311+This context provider is powered by [ripgrep](https://github.com/BurntSushi/ripgrep).
312+
313+### `@Url`
314+
315+Reference the markdown converted contents of a given URL.
316+
317+<Tabs groupId="config-example">
318+ <TabItem value="yaml" label="YAML">
319+ ```yaml title="config.yaml"
320+ context:
321+ - provider: url
322+ ```
323+ </TabItem>
324+ <TabItem value="json" label="JSON">
325+ ```json title="config.json"
326+ {
327+ "contextProviders": [
328+ {
329+ "name": "url"
330+ }
331+ ]
332+ }
333+ ```
334+ </TabItem>
335+</Tabs>
336+
337+### `@Clipboard`
338+
339+Reference recent clipboard items
340+
341+<Tabs groupId="config-example">
342+ <TabItem value="yaml" label="YAML">
343+ ```yaml title="config.yaml"
344+ context:
345+ - provider: clipboard
346+ ```
347+ </TabItem>
348+ <TabItem value="json" label="JSON">
349+ ```json title="config.json"
350+ {
351+ "contextProviders": [
352+ {
353+ "name": "clipboard"
354+ }
355+ ]
356+ }
357+ ```
358+ </TabItem>
359+</Tabs>
360+
361+### `@Tree`
362+
363+Reference the structure of your current workspace.
364+
365+<Tabs groupId="config-example">
366+ <TabItem value="yaml" label="YAML">
367+ ```yaml title="config.yaml"
368+ context:
369+ - provider: tree
370+ ```
371+ </TabItem>
372+ <TabItem value="json" label="JSON">
373+ ```json title="config.json"
374+ {
375+ "contextProviders": [
376+ {
377+ "name": "tree"
378+ }
379+ ]
380+ }
381+ ```
382+ </TabItem>
383+</Tabs>
384+
385+### `@Problems`
386+
387+Get Problems from the current file.
388+
389+<Tabs groupId="config-example">
390+ <TabItem value="yaml" label="YAML">
391+ ```yaml title="config.yaml"
392+ context:
393+ - provider: problems
394+ ```
395+ </TabItem>
396+ <TabItem value="json" label="JSON">
397+ ```json title="config.json"
398+ {
399+ "contextProviders": [
400+ {
401+ "name": "problems"
402+ }
403+ ]
404+ }
405+ ```
406+ </TabItem>
407+</Tabs>
408+
409+### `@Debugger`
410+
411+Reference the contents of the local variables in the debugger. Currently only available in VS Code.
412+
413+<Tabs groupId="config-example">
414+ <TabItem value="yaml" label="YAML">
415+ ```yaml title="config.yaml"
416+ context:
417+ - provider: debugger
418+ params:
419+ stackDepth: 3
420+ ```
421+ </TabItem>
422+ <TabItem value="json" label="JSON">
423+ ```json title="config.json"
424+ {
425+ "contextProviders": [
426+ {
427+ "name": "debugger",
428+ "params": {
429+ "stackDepth": 3
430+ }
431+ }
432+ ]
433+ }
434+ ```
435+ </TabItem>
436+</Tabs>
437+
438+Uses the top _n_ levels (defaulting to 3) of the call stack for that thread.
439+
440+### `@Repository Map`
441+
442+Reference the outline of your codebase. By default, signatures are included along with file in the repo map.
443+
444+`includeSignatures` params can be set to false to exclude signatures. This could be necessary for large codebases and/or to reduce context size significantly. Signatures will not be included if indexing is disabled.
445+
446+<Tabs groupId="config-example">
447+ <TabItem value="yaml" label="YAML">
448+ ```yaml title="config.yaml"
449+ context:
450+ - provider: repo-map
451+ params:
452+ includeSignatures: false # default true
453+ ```
454+ </TabItem>
455+ <TabItem value="json" label="JSON">
456+ ```json title="config.json"
457+ {
458+ "contextProviders": [
459+ {
460+ "name": "repo-map",
461+ "params": {
462+ "includeSignatures": false // default true
463+ }
464+ }
465+ ]
466+ }
467+ ```
468+ </TabItem>
469+</Tabs>
470+
471+Provides a list of files and the call signatures of top-level classes, functions, and methods in those files. This helps the model better understand how a particular piece of code relates to the rest of the codebase.
472+
473+In the submenu that appears, you can select either `Entire codebase`, or specify a subfolder to generate the repostiory map from.
474+
475+This context provider is inpsired by [Aider's repository map](https://aider.chat/2023/10/22/repomap.html).
476+
477+### `@Operating System`
478+
479+Reference the architecture and platform of your current operating system.
480+
481+<Tabs groupId="config-example">
482+ <TabItem value="yaml" label="YAML">
483+ ```yaml title="config.yaml"
484+ context:
485+ - provider: os
486+ ```
487+ </TabItem>
488+ <TabItem value="json" label="JSON">
489+ ```json title="config.json"
490+ {
491+ "contextProviders": [
492+ {
493+ "name": "os"
494+ }
495+ ]
496+ }
497+ ```
498+ </TabItem>
499+</Tabs>
500+
501+### Model Context Protocol
502+
503+The [Model Context Protocol](https://modelcontextprotocol.io/introduction) is a standard proposed by Anthropic to unify prompts, context, and tool use. Continue supports any MCP server with the MCP context provider. Read their [quickstart](https://modelcontextprotocol.io/quickstart) to learn how to set up a local server and then set up your configuration like this:
504+
505+<Tabs groupId="config-example">
506+ <TabItem value="yaml" label="YAML">
507+ ```yaml title="config.yaml"
508+ mcpServers:
509+ - name: My MCP Server
510+ command: uvx
511+ args:
512+ - mcp-server-sqlite
513+ - --db-path
514+ - /Users/NAME/test.db
515+ ```
516+ </TabItem>
517+ <TabItem value="json" label="JSON">
518+ ```json title="config.json"
519+ {
520+ "experimental": {
521+ "modelContextProtocolServers": [
522+ {
523+ "transport": {
524+ "type": "stdio",
525+ "command": "uvx",
526+ "args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"]
527+ }
528+ }
529+ ]
530+ }
531+ }
532+ ```
533+ </TabItem>
534+</Tabs>
535+
536+You'll then be able to type "@" and see "MCP" in the context providers dropdown.
537+
538+### `@Issue`
539+
540+Reference the conversation in a GitHub issue.
541+
542+<Tabs groupId="config-example">
543+ <TabItem value="yaml" label="YAML">
544+ ```yaml title="config.yaml"
545+ context:
546+ - provider: issue
547+ params:
548+ repos:
549+ - owner: continuedev
550+ repo: continue
551+ githubToken: ghp_xxx
552+ ```
553+ </TabItem>
554+ <TabItem value="json" label="JSON">
555+ ```json title="config.json"
556+ {
557+ "contextProviders": [
558+ {
559+ "name": "issue",
560+ "params": {
561+ "repos": [
562+ {
563+ "owner": "continuedev",
564+ "repo": "continue"
565+ }
566+ ],
567+ "githubToken": "ghp_xxx"
568+ }
569+ }
570+ ]
571+ }
572+ ```
573+ </TabItem>
574+</Tabs>
575+
576+Make sure to include your own [GitHub personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token) to avoid being rate-limited.
577+
578+### `@Database`
579+
580+Reference table schemas from Sqlite, Postgres, MSSQL, and MySQL databases.
581+
582+<Tabs groupId="config-example">
583+ <TabItem value="yaml" label="YAML">
584+ ```yaml title="config.yaml"
585+ context:
586+ - provider: database
587+ params:
588+ connections:
589+ - name: examplePostgres
590+ connection_type: postgres
591+ connection:
592+ user: username
593+ host: localhost
594+ database: exampleDB
595+ password: yourPassword
596+ port: 5432
597+ - name: exampleMssql
598+ connection_type: mssql
599+ connection:
600+ user: username
601+ server: localhost
602+ database: exampleDB
603+ password: yourPassword
604+ - name: exampleSqlite
605+ connection_type: sqlite
606+ connection:
607+ filename: /path/to/your/sqlite/database.db
608+ ```
609+ </TabItem>
610+ <TabItem value="json" label="JSON">
611+ ```json title="config.json"
612+ {
613+ "contextProviders": [
614+ {
615+ "name": "database",
616+ "params": {
617+ "connections": [
618+ {
619+ "name": "examplePostgres",
620+ "connection_type": "postgres",
621+ "connection": {
622+ "user": "username",
623+ "host": "localhost",
624+ "database": "exampleDB",
625+ "password": "yourPassword",
626+ "port": 5432
627+ }
628+ },
629+ {
630+ "name": "exampleMssql",
631+ "connection_type": "mssql",
632+ "connection": {
633+ "user": "username",
634+ "server": "localhost",
635+ "database": "exampleDB",
636+ "password": "yourPassword"
637+ }
638+ },
639+ {
640+ "name": "exampleSqlite",
641+ "connection_type": "sqlite",
642+ "connection": {
643+ "filename": "/path/to/your/sqlite/database.db"
644+ }
645+ }
646+ ]
647+ }
648+ }
649+ ]
650+ }
651+ ```
652+ </TabItem>
653+</Tabs>
654+
655+Each connection should include a unique name, the `connection_type`, and the necessary connection parameters specific to each database type.
656+
657+Available connection types:
658+
659+- `postgres`
660+- `mysql`
661+- `sqlite`
662+
663+### `@Postgres`
664+
665+Reference the schema of a table, and some sample rows
666+
667+<Tabs groupId="config-example">
668+ <TabItem value="yaml" label="YAML">
669+ ```yaml title="config.yaml"
670+ context:
671+ - provider: postgres
672+ params:
673+ host: localhost
674+ port: 5436
675+ user: myuser
676+ password: catsarecool
677+ database: animals
678+ schema: public
679+ sampleRows: 3
680+ ```
681+ </TabItem>
682+ <TabItem value="json" label="JSON">
683+ ```json title="config.json"
684+ {
685+ "contextProviders": [
686+ {
687+ "name": "postgres",
688+ "params": {
689+ "host": "localhost",
690+ "port": 5436,
691+ "user": "myuser",
692+ "password": "catsarecool",
693+ "database": "animals",
694+ "schema": "public",
695+ "sampleRows": 3
696+ }
697+ }
698+ ]
699+ }
700+ ```
701+ </TabItem>
702+</Tabs>
703+
704+The only required settings are those for creating the database connection: `host`, `port`, `user`, `password`, and `database`.
705+
706+By default, the `schema` filter is set to `public`, and the `sampleRows` is set to 3. You may unset the schema if you want to include tables from all schemas.
707+
708+[Here is a short demo.](https://github.com/continuedev/continue/pull/859)
709+
710+### `@Google`
711+
712+Reference the results of a Google search.
713+
714+<Tabs groupId="config-example">
715+ <TabItem value="yaml" label="YAML">
716+ ```yaml title="config.yaml"
717+ context:
718+ - provider: google
719+ params:
720+ serperApiKey: <YOUR_SERPER.DEV_API_KEY>
721+ ```
722+ </TabItem>
723+ <TabItem value="json" label="JSON">
724+ ```json title="config.json"
725+ {
726+ "contextProviders": [
727+ {
728+ "name": "google",
729+ "params": {
730+ "serperApiKey": "<YOUR_SERPER.DEV_API_KEY>"
731+ }
732+ }
733+ ]
734+ }
735+ ```
736+ </TabItem>
737+</Tabs>
738+
739+For example, type "@Google python tutorial" if you want to search and discuss ways of learning Python.
740+
741+Note: You can get an API key for free at [serper.dev](https://serper.dev).
742+
743+### `@Gitlab Merge Request`
744+
745+Reference an open MR for this branch on GitLab.
746+
747+<Tabs groupId="config-example">
748+ <TabItem value="yaml" label="YAML">
749+ ```yaml title="config.yaml"
750+ context:
751+ - provider: gitlab-mr
752+ params:
753+ token: "..."
754+ ```
755+ </TabItem>
756+ <TabItem value="json" label="JSON">
757+ ```json title="config.json"
758+ {
759+ "contextProviders": [
760+ {
761+ "name": "gitlab-mr",
762+ "params": {
763+ "token": "..."
764+ }
765+ }
766+ ]
767+ }
768+ ```
769+ </TabItem>
770+</Tabs>
771+
772+You will need to create a [personal access token](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html) with the `read_api` scope.
773+
774+#### Using Self-Hosted GitLab
775+
776+You can specify the domain to communicate with by setting the `domain` parameter in your configurtion. By default this is set to `gitlab.com`.
777+
778+<Tabs groupId="config-example">
779+ <TabItem value="yaml" label="YAML">
780+ ```yaml title="config.yaml"
781+ context:
782+ - provider: gitlab-mr
783+ params:
784+ token: "..."
785+ domain: "gitlab.example.com"
786+ ```
787+ </TabItem>
788+ <TabItem value="json" label="JSON">
789+ ```json title="config.json"
790+ {
791+ "contextProviders": [
792+ {
793+ "name": "gitlab-mr",
794+ "params": {
795+ "token": "...",
796+ "domain": "gitlab.example.com"
797+ }
798+ }
799+ ]
800+ }
801+ ```
802+ </TabItem>
803+</Tabs>
804+
805+#### Filtering Comments
806+
807+If you select some code to be edited, you can have the context provider filter out comments for other files. To enable this feature, set `filterComments` to `true`.
808+
809+### `@Jira`
810+
811+Reference the conversation in a Jira issue.
812+
813+<Tabs groupId="config-example">
814+ <TabItem value="yaml" label="YAML">
815+ ```yaml title="config.yaml"
816+ context:
817+ - provider: jira
818+ params:
819+ domain: company.atlassian.net
820+ token: ATATT...
821+ ```
822+ </TabItem>
823+ <TabItem value="json" label="JSON">
824+ ```json title="config.json"
825+ {
826+ "contextProviders": [
827+ {
828+ "name": "jira",
829+ "params": {
830+ "domain": "company.atlassian.net",
831+ "token": "ATATT..."
832+ }
833+ }
834+ ]
835+ }
836+ ```
837+ </TabItem>
838+</Tabs>
839+
840+Make sure to include your own [Atlassian API Token](https://id.atlassian.com/manage-profile/security/api-tokens), or use your `email` and `token`, with token set to your password for basic authentication. If you use your own Atlassian API Token, don't configure your email.
841+
842+#### Jira Datacenter Support
843+
844+This context provider supports both Jira API version 2 and 3. It will use version 3 by default since
845+that's what the cloud version uses, but if you have the datacenter version of Jira, you'll need
846+to set the API Version to 2 using the `apiVersion` property.
847+
848+<Tabs groupId="config-example">
849+ <TabItem value="yaml" label="YAML">
850+ ```yaml title="config.yaml"
851+ context:
852+ - provider: jira
853+ params:
854+ apiVersion: "2"
855+ ```
856+ </TabItem>
857+ <TabItem value="json" label="JSON">
858+ ```json title="config.json"
859+ {
860+ "contextProviders": [
861+ {
862+ "name": "jira",
863+ "params": {
864+ "apiVersion": "2"
865+ }
866+ }
867+ ]
868+ }
869+ ```
870+ </TabItem>
871+</Tabs>
872+
873+#### Issue Query
874+
875+By default, the following query will be used to find issues:
876+
877+```jql
878+assignee = currentUser() AND resolution = Unresolved order by updated DESC
879+```
880+
881+You can override this query by setting the `issueQuery` parameter.
882+
883+#### Max results
884+
885+You can set the `maxResults` parameter to limit the number of results returned. The default is `50`.
886+
887+### `@Discord`
888+
889+Reference the messages in a Discord channel.
890+
891+<Tabs groupId="config-example">
892+ <TabItem value="yaml" label="YAML">
893+ ```yaml title="config.yaml"
894+ context:
895+ - provider: discord
896+ params:
897+ discordKey: "bot token"
898+ guildId: "1234567890"
899+ channels:
900+ - id: "123456"
901+ name: "example-channel"
902+ - id: "678901"
903+ name: "example-channel-2"
904+ ```
905+ </TabItem>
906+ <TabItem value="json" label="JSON">
907+ ```json title="config.json"
908+ {
909+ "contextProviders": [
910+ {
911+ "name": "discord",
912+ "params": {
913+ "discordKey": "bot token",
914+ "guildId": "1234567890",
915+ "channels": [
916+ {
917+ "id": "123456",
918+ "name": "example-channel"
919+ },
920+ {
921+ "id": "678901",
922+ "name": "example-channel-2"
923+ }
924+ ]
925+ }
926+ }
927+ ]
928+ }
929+ ```
930+ </TabItem>
931+</Tabs>
932+
933+Make sure to include your own [Bot Token](https://discord.com/developers/applications), and join it to your related server . If you want more granular control over which channels are searched, you can specify a list of channel IDs to search in. If you don't want to specify any channels, just include the guild id(Server ID) and all channels will be included. The provider only reads text channels.
934+
935+### `@HTTP`
936+
937+The HttpContextProvider makes a POST request to the url passed in the configuration. The server must return 200 OK with a ContextItem object or an array of ContextItems.
938+
939+<Tabs groupId="config-example">
940+ <TabItem value="yaml" label="YAML">
941+ ```yaml title="config.yaml"
942+ context:
943+ - provider: http
944+ params:
945+ url: "https://api.example.com/v1/users"
946+ ```
947+ </TabItem>
948+ <TabItem value="json" label="JSON">
949+ ```json title="config.json"
950+ {
951+ "contextProviders": [
952+ {
953+ "name": "http",
954+ "params": {
955+ "url": "https://api.example.com/v1/users"
956+ }
957+ }
958+ ]
959+ }
960+ ```
961+ </TabItem>
962+</Tabs>
963+
964+The receiving URL should expect to receive the following parameters:
965+
966+```js title="POST parameters"
967+{
968+ query: string,
969+ fullInput: string
970+}
971+```
972+
973+The response 200 OK should be a JSON object with the following structure:
974+
975+```json title="Response"
976+[
977+ {
978+ "name": "",
979+ "description": "",
980+ "content": ""
981+ }
982+]
983+
984+// OR
985+{
986+ "name": "",
987+ "description": "",
988+ "content": ""
989+}
990+
991+// For response context items with hyperlinks
992+
993+[
994+ {
995+ "name": "",
996+ "description": "",
997+ "content": "",
998+ "uri": {
999+ "type": "file" or "url",
1000+ "value": "file:///path/to/file" or "https://example.com",
1001+ }
1002+ }
1003+]
1004+
1005+// OR
1006+
1007+{
1008+ "name": "",
1009+ "description": "",
1010+ "content": "",
1011+ "uri": {
1012+ "type": "file" or "url",
1013+ "value": "file:///path/to/file" or "https://example.com",
1014+ }
1015+}
1016+
1017+```
1018+
1019+### `@Commits`
1020+
1021+Reference specific git commit metadata and diff or all of the recent commits.
1022+
1023+<Tabs groupId="config-example">
1024+ <TabItem value="yaml" label="YAML">
1025+ ```yaml title="config.yaml"
1026+ context:
1027+ - provider: commit
1028+ params:
1029+ Depth: 50
1030+ LastXCommitsDepth: 10
1031+ ```
1032+ </TabItem>
1033+ <TabItem value="json" label="JSON">
1034+ ```json title="config.json"
1035+ {
1036+ "contextProviders": [
1037+ {
1038+ "name": "commit",
1039+ "params": {
1040+ "Depth": 50,
1041+ "LastXCommitsDepth": 10
1042+ }
1043+ }
1044+ ]
1045+ }
1046+ ```
1047+ </TabItem>
1048+</Tabs>
1049+
1050+The depth is how many commits will be loaded into the submenu, defaults to 50.
1051+The LastXCommitsDepth is how many recent commits will be included, defaults to 10.
1052+
1053+### `@Greptile`
1054+
1055+Query a [Greptile](https://www.greptile.com/) index of the current repo/branch.
1056+
1057+<Tabs groupId="config-example">
1058+ <TabItem value="yaml" label="YAML">
1059+ ```yaml title="config.yaml"
1060+ context:
1061+ - provider: greptile
1062+ params:
1063+ greptileToken: "..."
1064+ githubToken: "..."
1065+ ```
1066+ </TabItem>
1067+ <TabItem value="json" label="JSON">
1068+ ```json title="config.json"
1069+ {
1070+ "contextProviders": [
1071+ {
1072+ "name": "greptile",
1073+ "params": {
1074+ "GreptileToken": "...",
1075+ "GithubToken": "..."
1076+ }
1077+ }
1078+ ]
1079+ }
1080+ ```
1081+ </TabItem>
1082+</Tabs>
1083+
1084+### Requesting Context Providers
1085+
1086+Not seeing what you want? Create an issue [here](https://github.com/continuedev/continue/issues/new?assignees=TyDunn&labels=enhancement&projects=&template=feature-request-%F0%9F%92%AA.md&title=) to request a new Context Provider.
added docs/docs/customize/deep-dives/_apply.md +16 −0
@@ -0,0 +1,16 @@
1+---
2+description: Learn how to use the Apply feature
3+keywords: [apply, speculative]
4+toc_max_heading_level: 5
5+---
6+
7+<!-- This is a work in progress and excluded by prefixing the file name with an underscore -->
8+
9+# Apply
10+
11+## Instant Diff Apply
12+
13+If you have large files (exeeding the output token of your model) the edit apply will delete all lines that exceed the model window. To mitigate you can instead of applying the changes directly, ask the chat LLM to "generate a unified diff".
14+The resulting diff (if the LLM has not made a mistake) can be instantly applied, changing only the lines that need to change.
15+
16+Explainer Video: https://youtu.be/b7Xxsot4gyw
added docs/docs/customize/deep-dives/_category_.json +4 −0
@@ -0,0 +1,4 @@
1+{
2+ "label": "Deep Dives",
3+ "position": 3
4+}
added docs/docs/customize/deep-dives/autocomplete.mdx +162 −0
@@ -0,0 +1,162 @@
1+---
2+title: Autocomplete
3+keywords: [autocomplete]
4+---
5+
6+import TabItem from "@theme/TabItem";
7+import Tabs from "@theme/Tabs";
8+
9+### Setting up with Codestral (recommended)
10+
11+If you want to have the best autocomplete experience, we recommend using Codestral, which is available through the [Mistral API](https://console.mistral.ai/). To do this, obtain an API key and add it to your config:
12+
13+<Tabs groupId="hub-config-example">
14+ <TabItem value="hub" label="Hub">
15+ [Mistral Codestral model block](https://hub.continue.dev/mistral/codestral)
16+ </TabItem>
17+ <TabItem value="yaml" label="YAML">
18+ ```yaml title="config.yaml"
19+ models:
20+ - name: Codestral
21+ provider: mistral
22+ model: codestral-latest
23+ apiKey: <YOUR_CODESTRAL_API_KEY>
24+ roles:
25+ - autocomplete
26+ ```
27+ </TabItem>
28+ <TabItem value="json" label="JSON">
29+ ```json title="config.json"
30+ {
31+ "tabAutocompleteModel": {
32+ "title": "Codestral",
33+ "provider": "mistral",
34+ "model": "codestral-latest",
35+ "apiKey": "<YOUR_CODESTRAL_API_KEY>"
36+ }
37+ }
38+ ```
39+ </TabItem>
40+</Tabs>
41+
42+:::tip[Codestral API Key]
43+The API keys for Codestral and the general Mistral APIs are different. If you are using Codestral, you probably want a Codestral API key, but if you are sharing the key as a team or otherwise want to use `api.mistral.ai`, then make sure to set `"apiBase": "https://api.mistral.ai/v1"` in your `tabAutocompleteModel`.
44+:::
45+
46+### Setting up with Ollama (default)
47+
48+If you'd like to run your autocomplete model locally, we recommend using Ollama. To do this, first download the latest version of Ollama from [here](https://ollama.ai). Then, run the following command to download our recommended model:
49+
50+```bash
51+ollama run qwen2.5-coder:1.5b
52+```
53+
54+Then, add the model to your configuration:
55+
56+<Tabs groupId="hub-config-example">
57+ <TabItem value="hub" label="Hub">
58+ [Ollama Qwen 2.5 Coder 1.5B model block](https://hub.continue.dev/ollama/qwen2.5-coder-1.5b)
59+ </TabItem>
60+ <TabItem value="yaml" label="YAML">
61+ ```yaml title="config.yaml"
62+ models:
63+ - name: Qwen 1.5b Autocomplete Model
64+ provider: ollama
65+ model: qwen2.5-coder:1.5b
66+ roles:
67+ - autocomplete
68+ ```
69+ </TabItem>
70+ <TabItem value="json" label="JSON">
71+ ```json title="config.json"
72+ {
73+ "tabAutocompleteModel": {
74+ "title": "Qwen 1.5b Autocomplete Model",
75+ "provider": "ollama",
76+ "model": "qwen2.5-coder:1.5b",
77+ }
78+ }
79+ ```
80+ </TabItem>
81+</Tabs>
82+
83+Once the model has been downloaded, you should begin to see completions in VS Code.
84+
85+## Configuration Options
86+
87+### Hub Autocomplete models
88+
89+Explore autocomplete model configurations on [the hub](https://hub.continue.dev/explore/models?roles=autocomplete)
90+
91+### Autocomplete User Settings
92+
93+{/* - `Use autocomplete cache`: If on, caches completions */}
94+The following settings can be configured for autocompletion in the IDE extension [User Settings Page](../settings.md):
95+
96+- `Multiline Autocompletions`: Controls multiline completions for autocomplete. Can be set to `always`, `never`, or `auto`. Defaults to `auto`
97+- `Disable autocomplete in files`: List of comma-separated glob pattern to disable autocomplete in matching files. E.g., "\_/.md, \*/.txt"
98+
99+### `config.json` Configuration
100+
101+The `config.json` configuration format (deprecated) offers further configuration options through `tabAutocompleteOptions`. See the [JSON Reference](/reference) for more details.
102+
103+## FAQs
104+
105+### I want better completions, should I use GPT-4?
106+
107+Perhaps surprisingly, the answer is no. The models that we suggest for autocomplete are trained with a highly specific prompt format, which allows them to respond to requests for completing code (see examples of these prompts [here](https://github.com/continuedev/continue/blob/main/core/autocomplete/templating/AutocompleteTemplate.ts)). Some of the best commercial models like GPT-4 or Claude are not trained with this prompt format, which means that they won't generate useful completions. Luckily, a huge model is not required for great autocomplete. Most of the state-of-the-art autocomplete models are no more than 10b parameters, and increasing beyond this does not significantly improve performance.
108+
109+### I'm not seeing any completions
110+
111+Follow these steps to ensure that everything is set up correctly:
112+
113+1. Make sure you have the "Enable Tab Autocomplete" setting checked (in VS Code, you can toggle by clicking the "Continue" button in the status bar, and in JetBrains by going to Settings -> Tools -> Continue).
114+2. Make sure you have downloaded Ollama.
115+3. Run `ollama run qwen2.5-coder:1.5b` to verify that the model is downloaded.
116+4. Make sure that any other completion providers are disabled (e.g. Copilot), as they may interfere.
117+5. Check the output of the logs to find any potential errors: <kbd>cmd/ctrl</kbd> + <kbd>shift</kbd> + <kbd>P</kbd> -> "Toggle Developer Tools" -> "Console" tab in VS Code, ~/.continue/logs/core.log in JetBrains.
118+6. Check VS Code settings to make sure that `"editor.inlineSuggest.enabled"` is set to `true` (use <kbd>cmd/ctrl</kbd> + <kbd>,</kbd> then search for this and check the box)
119+7. If you are still having issues, please let us know in our [Discord](https://discord.gg/vapESyrFmJ) and we'll help as soon as possible.
120+
121+### Completions are only ever single-line
122+
123+To ensure that you receive multi-line completions, you can set `"multilineCompletions": "always"` in `tabAutocompleteOptions`. By default, it is `"auto"`. If you still find that you are only seeing single-line completions, this may be because some models tend to produce shorter completions when starting in the middle of a file. You can try temporarily moving text below your cursor out of your active file, or switching to a larger model.
124+
125+### Can I configure a "trigger key" for autocomplete?
126+
127+Yes, in VS Code, if you don't want to be shown suggestions automatically you can:
128+
129+1. Set `"editor.inlineSuggest.enabled": false` in VS Code settings to disable automatic suggestions
130+2. Open "Keyboard Shortcuts" (cmd/ctrl+k, cmd/ctrl+s) and search for `editor.action.inlineSuggest.trigger`
131+3. Click the "+" icon to add a new keybinding
132+4. Press the key combination you want to use to trigger suggestions (e.g. <kbd>cmd/ctrl</kbd> + <kbd>space</kbd>)
133+5. Now whenever you want to see a suggestion, you can press your key binding (e.g. <kbd>cmd/ctrl</kbd> + <kbd>space</kbd>) to trigger suggestions manually
134+
135+### Is there a shortcut to accept one line at a time?
136+
137+This is a built-in feature of VS Code, but it's just a bit hidden. Follow these settings to reassign the keyboard shortcuts in VS Code:
138+
139+1. Press `Ctrl+Shift+P`, type the command: `Preferences: Open Keyboard Shortcuts`, and enter the keyboard shortcuts settings page.
140+2. Search for `editor.action.inlineSuggest.acceptNextLine`.
141+3. Set the key binding to `Tab`.
142+4. Set the trigger condition (when) to `inlineSuggestionVisible && !editorReadonly`.
143+ This will make multi-line completion (including continue and from VS Code built-in or other plugin snippets) still work, and you will see multi-line completion. However, Tab will only fill in one line at a time. Any unnecessary code can be canceled with `Esc`.
144+ If you need to apply all the code, just press `Tab` multiple times.
145+
146+### How to turn off autocomplete
147+
148+#### VS Code
149+
150+Click the "Continue" button in the status panel at the bottom right of the screen. The checkmark will become a "cancel" symbol and you will no longer see completions. You can click again to turn it back on.
151+
152+Alternatively, open VS Code settings, search for "Continue" and uncheck the box for "Enable Tab Autocomplete".
153+
154+You can also use the default shortcut to disable autocomplete directly using a chord: press and hold <kbd>ctrl/cmd</kbd> + <kbd>K</kbd> (continue holding <kbd>ctrl/cmd</kbd>) and press <kbd>ctrl/cmd</kbd> + <kbd>A</kbd>. This will turn off autocomplete without navigating through settings.
155+
156+#### JetBrains
157+
158+Open Settings -> Tools -> Continue and uncheck the box for "Enable Tab Autocomplete".
159+
160+#### Feedback
161+
162+If you're turning off autocomplete, we'd love to hear how we can improve! Please let us know in our [Discord](https://discord.gg/vapESyrFmJ) or file an issue on GitHub.
added docs/docs/customize/deep-dives/configuration.md +86 −0
@@ -0,0 +1,86 @@
1+---
2+description: Configuration
3+keywords: [config, settings, customize]
4+---
5+
6+# Configuration
7+
8+You can easily access your assistant configuration from the Continue Chat sidebar. Open the sidebar by pressing <kbd>cmd/ctrl</kbd> + <kbd>L</kbd> (VS Code) or <kbd>cmd/ctrl</kbd> + <kbd>J</kbd> (JetBrains) and click the Assistant selector above the main chat input. Then, you can hover over an assistant and click the `new window` (hub assistants) or `gear` (local assistants) icon.
9+
10+![configure an assistant](/img/configure-continue.png)
11+
12+## Hub Assistants
13+
14+Hub Assistants can be managed in [the Hub](https://hub.continue.dev). See [Editing an Assistant](../../hub/assistants/edit-an-assistant.md)
15+
16+## YAML Config
17+
18+Local user-level configuration is stored and can be edited in your home directory in `config.yaml`:
19+
20+- `~/.continue/config.yaml` (MacOS / Linux)
21+- `%USERPROFILE%\.continue\config.yaml` (Windows)
22+
23+To open this `config.yaml`, you need to open the assistants dropdown in the top-right portion of the chat input. On that dropdown beside the "Local Assistant" option, select the cog icon. It will open the local `config.yaml`.
24+
25+![local-config-open-steps](/img/local-config-open-steps.png)
26+
27+When editing this file, you can see the available options suggested as you type, or check the reference below. When you save a config file from the IDE, Continue will automatically refresh to take into account your changes. A config file is automatically created the first time you use Continue, and always automatically generated with default values if it doesn't exist.
28+
29+See the full reference for `config.yaml` [here](/reference).
30+
31+## Deprecated configuration methods
32+
33+:::info
34+View the `config.json` migration guide [here](../yaml-migration.mdx)
35+:::
36+
37+- [`config.json`](/reference) - The original configuration format which is stored in a file at the same location as `config.yaml`
38+- [`.continuerc.json`](#continuercjson) - Workspace-level configuration
39+- [`config.ts`](#configts) - Advanced configuration (probably unnecessary) - a TypeScript file in your home directory that can be used to programmatically modify (_merged_) the `config.json` schema:
40+ - `~/.continue/config.ts` (MacOS / Linux)
41+ - `%USERPROFILE%\.continue\config.ts` (Windows)
42+
43+### `.continuerc.json`
44+
45+The format of `.continuerc.json` is the same as `config.json`, plus one _additional_ property `mergeBehavior`, which can be set to either "merge" or "overwrite". If set to "merge" (the default), `.continuerc.json` will be applied on top of `config.json` (arrays and objects are merged). If set to "overwrite", then every top-level property of `.continuerc.json` will overwrite that property from `config.json`.
46+
47+Example
48+
49+```json title=".continuerc.json"
50+{
51+ "tabAutocompleteOptions": {
52+ "disable": true
53+ },
54+ "mergeBehavior": "overwrite"
55+}
56+```
57+
58+### `config.ts`
59+
60+`config.yaml` or `config.json` can handle the vast majority of necessary configuration, so we recommend using it whenever possible. However, if you need to programmatically extend Continue configuration, you can use a `config.ts` file, placed at `~/.continue/config.ts` (MacOS / Linux) or `%USERPROFILE%\.continue\config.ts` (Windows).
61+
62+`config.ts` must export a `modifyConfig` function, like:
63+
64+```ts title="config.ts"
65+export function modifyConfig(config: Config): Config {
66+ config.slashCommands?.push({
67+ name: "commit",
68+ description: "Write a commit message",
69+ run: async function* (sdk) {
70+ // The getDiff function takes a boolean parameter that indicates whether
71+ // to include unstaged changes in the diff or not.
72+ const diff = await sdk.ide.getDiff(false); // Pass false to exclude unstaged changes
73+ for await (const message of sdk.llm.streamComplete(
74+ `${diff}\n\nWrite a commit message for the above changes. Use no more than 20 tokens to give a brief description in the imperative mood (e.g. 'Add feature' not 'Added feature'):`,
75+ new AbortController().signal,
76+ {
77+ maxTokens: 20,
78+ },
79+ )) {
80+ yield message;
81+ }
82+ },
83+ });
84+ return config;
85+}
86+```
added docs/docs/customize/deep-dives/development-data.md +21 −0
@@ -0,0 +1,21 @@
1+---
2+title: Development Data
3+description: Collecting data on how you build software
4+keywords: [development data, dev data, LLM-aided development]
5+---
6+
7+# Development Data
8+
9+When you use Continue, you automatically collect data on how you build software. By default, this development data is saved to `.continue/dev_data` on your local machine.
10+
11+You can read more about how development data is generated as a byproduct of LLM-aided development and why we believe that you should start collecting it now: [It’s time to collect data on how you build software](https://blog.continue.dev/its-time-to-collect-data-on-how-you-build-software)
12+
13+## Custom Data Destinations
14+
15+You can also configure custom destinations for your data, including remote HTTP endpoints and local file directories.
16+
17+For hub assistants, data destinations are configured in `data` blocks. Visit the hub to [explore example data blocks](https://hub.continue.dev/explore/data) or [create your own](https://hub.continue.dev/new?type=block&blockType=data).
18+
19+See more details about adding `data` blocks to your configuration files in the [YAML specification](/reference#data)
20+
21+When sending development data to your own HTTP endpoint, it will receive an event JSON blob at the given `schema` version. You can view event names, schema versions, and fields [here in the source code](https://github.com/continuedev/continue/tree/main/packages/config-yaml/src/schemas/data).
added docs/docs/customize/deep-dives/mcp.mdx +192 −0
@@ -0,0 +1,192 @@
1+---
2+title: MCP
3+description: MCP use and customization
4+keywords: [tool, use, function calling, claude, automatic]
5+---
6+
7+import TabItem from "@theme/TabItem";
8+import Tabs from "@theme/Tabs";
9+
10+# MCP
11+
12+As AI systems get better, they're still held back by their training data and
13+can't access real-time information or specialized tools. The [Model Context
14+Protocol](https://modelcontextprotocol.io/introduction) (MCP) fixes this by
15+letting AI models connect with outside data sources, tools, and environments.
16+This allows smooth sharing of information and abilities between AI systems and
17+the wider digital world. This standard, created by Anthropic to bring together
18+prompts, context, and tool use, is key for building truly useful AI experiences
19+that can be set up with custom tools.
20+
21+## How it works
22+
23+Currently custom tools can be configured using the Model Context
24+Protocol standard to unify prompts, context, and tool use.
25+
26+MCP Servers can be added to hub Assistants using `mcpServers` blocks. You can
27+explore available MCP server blocks
28+[here](https://hub.continue.dev/explore/mcp).
29+
30+:::info
31+MCP can only be used in the **agent** mode.
32+:::
33+
34+## Quick Start
35+
36+Below is a quick example of setting up a new MCP server for use in your assistant:
37+
38+1. Create a folder called `.continue/mcpServers` at the top level of your workspace
39+2. Add a file called `playwright-mcp.yaml` to this folder.
40+3. Write the following contents to `playwright-mcp.yaml` and save.
41+
42+```yaml title=".continue/mcpServers/playwright-mcp.yaml"
43+name: Playwright mcpServer
44+version: 0.0.1
45+schema: v1
46+mcpServers:
47+ - name: Browser search
48+ command: npx
49+ args:
50+ - "@playwright/mcp@latest"
51+```
52+
53+Now test your MCP server by prompting the following command:
54+
55+```
56+Open the browser and navigate Hacker News. Save the top 10 headlines in a hn.txt file.
57+```
58+
59+The result will be a generated file called `hn.txt` in the current working directory.
60+
61+![playwright mcp](/img/mcp-playwright.png)
62+
63+## Using MCP Servers
64+
65+To set up your own MCP server, read the [MCP
66+quickstart](https://modelcontextprotocol.io/quickstart) and then [create an
67+`mcpServers`
68+block](https://hub.continue.dev/new?type=block&blockType=mcpServers) or add a local MCP
69+server block to your [config file](./configuration.md):
70+
71+<Tabs groupId="config.yaml">
72+ <TabItem value="yaml" label="YAML">
73+ ```yaml title="config.yaml"
74+ mcpServers:
75+ - name: SQLite MCP
76+ command: npx
77+ args:
78+ - "-y"
79+ - "mcp-sqlite"
80+ - "/path/to/your/database.db"
81+
82+````
83+</TabItem>
84+<TabItem value="json" label="JSON">
85+```json title="config.json"
86+{
87+ "experimental": {
88+ "modelContextProtocolServers": [
89+ {
90+ "transport": {
91+ "type": "stdio",
92+ "command": "uvx",
93+ "args": ["mcp-server-sqlite", "--db-path", "/path/to/your/database.db"]
94+ }
95+ }
96+ ]
97+ }
98+}
99+````
100+
101+ </TabItem>
102+</Tabs>
103+
104+### Syntax
105+
106+MCP blocks follow the established syntax for blocks, with a few additional properties specific to MCP servers.
107+
108+- `name` (**required**): A display name for the MCP server.
109+- `command` (**required**): The command to run to start the MCP server.
110+- `type` (optional): The type of the MCP server: `sse`, `stdio`, `streamable-http`
111+- `args` (optional): Arguments to pass to the command.
112+- `env` (optional): Secrets to be injected into the command as environment variables.
113+- `cwd` (optional): Working directory to run the command in. Can be absolute or relative path.
114+
115+### Transport Types
116+
117+MCP now supports remote server connections through HTTP-based transports, expanding beyond the traditional local stdio transport method. This enables integration with cloud-hosted MCP servers and distributed architectures.
118+
119+#### Server-Sent Events (SSE) Transport
120+
121+For real-time streaming communication, use the SSE transport:
122+
123+```yaml
124+mcpServers:
125+ - name: Name
126+ type: sse
127+ url: https://....
128+```
129+
130+#### Standard Input/Output (stdio)
131+
132+For local MCP servers that communicate via standard input and output:
133+
134+```yaml
135+mcpServers:
136+ - name: SQLite Server
137+ type: stdio
138+ command: npx
139+ args:
140+ - "@modelcontextprotocol/server-sqlite"
141+ - "./database.db"
142+ cwd: "/path/to/project"
143+
144+ - name: Local Project Server
145+ command: npm
146+ args:
147+ - "run"
148+ - "mcp-server"
149+ cwd: "./my-project"
150+ env:
151+ NODE_ENV: "production"
152+```
153+
154+#### Streamable HTTP Transport
155+
156+For standard HTTP-based communication with streaming capabilities:
157+
158+```yaml
159+mcpServers:
160+ - name: Name
161+ type: streamable-http
162+ url: https://....
163+```
164+
165+These remote transport options allow you to connect to MCP servers hosted on remote infrastructure, enabling more flexible deployment architectures and shared server resources across multiple clients.
166+
167+For detailed information about transport mechanisms and their use cases, refer to the official MCP documentation on [transports](https://modelcontextprotocol.io/docs/concepts/transports#server-sent-events-sse).
168+
169+### Working with Secrets
170+
171+With some MCP servers you will need to use API keys or other secrets. You can leverage locally stored environments secrets
172+as well as access hosted secrets in the Continue Hub. To leverage Hub secrets, you can use the `inputs` property in your MCP env block instead of `secrets`.
173+
174+```yaml
175+mcpServers:
176+ - name: Supabase MCP
177+ command: npx
178+ args:
179+ - -y
180+ - "@supabase/mcp-server-supabase@latest"
181+ - --access-token
182+ - ${{ secrets.SUPABASE_TOKEN }}
183+ env:
184+ SUPABASE_TOKEN: ${{ secrets.SUPABASE_TOKEN }}
185+ - name: GitHub
186+ command: npx
187+ args:
188+ - "-y"
189+ - "@modelcontextprotocol/server-github"
190+ env:
191+ GITHUB_PERSONAL_ACCESS_TOKEN: ${{ secrets.GITHUB_PERSONAL_ACCESS_TOKEN }}
192+```
added docs/docs/customize/deep-dives/prompts.md +58 −0
@@ -0,0 +1,58 @@
1+---
2+title: Prompts
3+---
4+
5+Prompts are reusable instructions that can be referenced at any time during chat. They are especially useful as context for repetitive and/or complex tasks.
6+
7+:::info
8+Prompts were previously defined in a `.prompt` file format, but for consistency we now recommend using the same Markdown format as [rules](./rules.mdx) and adding `alwaysApply: false` to the frontmatter so that they are manually triggered.
9+:::
10+
11+### Quick Start
12+
13+Below is a quick example of setting up a prompt file:
14+
15+1. Create a folder called `.continue/rules` at the top level of your workspace
16+2. Add a file called `review-prompt.md` to this folder.
17+3. Write the following contents to `review-prompt.md` and save.
18+
19+```md title="review-prompt.md"
20+---
21+name: Redux best practices review
22+alwaysApply: false
23+---
24+
25+Review the currently open file for adherence to Redux best practices, as explained in their style guide at https://redux.js.org/style-guide/.
26+```
27+
28+Now to use this prompt, you can open Chat, type <kbd>/</kbd>, select the prompt, and type out any additional instructions you'd like to add.
29+
30+## Further Examples
31+
32+Below are more examples to get you started. You can also visit the Hub to [explore prompts](https://hub.continue.dev/explore/prompts) or [create your own](https://hub.continue.dev/new?type=block&blockType=prompts).
33+
34+### Security review
35+
36+```md title="security-review.md"
37+---
38+name: Security best practices review
39+alwaysApply: false
40+---
41+
42+Review the changes in the current git diff for these security best practices:
43+
44+- Does the architecture follow security-by-design principles?
45+- Are there potential security vulnerabilities in the system design?
46+- Is sensitive data handled appropriately throughout the lifecycle?
47+```
48+
49+### Pull in commonly used files for tasks
50+
51+```md title="typeorm-entity-generator.md"
52+---
53+name: Generate a new TypeORM entity
54+alwaysApply: false
55+---
56+
57+Referencing `src/db/dataSource.ts` and `src/db/entity/SampleEntity.ts`, generate a new TypeORM entity based on the following requirements:
58+```
added docs/docs/customize/deep-dives/rules.mdx +189 −0
@@ -0,0 +1,189 @@
1+---
2+description: Rules are used to provide instructions to the model for Chat, Edit, and Agent requests.
3+keywords: [rules, .continuerules, system, prompt, message]
4+---
5+
6+import TabItem from "@theme/TabItem";
7+import Tabs from "@theme/Tabs";
8+
9+# Rules
10+
11+Rules provide instructions to the model for [Chat](../../features/chat/quick-start), [Edit](../../features/edit/quick-start), and [Agent](../../features/agent/quick-start) requests.
12+
13+:::info Rules are not included in [autocomplete](./autocomplete.mdx) or [apply](../model-roles/apply.mdx).
14+:::
15+
16+## How it works
17+
18+You can view the current rules by clicking the pen icon above the main toolbar:
19+
20+![rules input toolbar section](/img/notch-rules.png)
21+
22+To form the system message, rules are joined with new lines, in the order they appear in the toolbar. This includes the base chat system message ([see below](#chat-system-message)).
23+
24+## Quick Start
25+
26+Below is a quick example of setting up a new rule file:
27+
28+1. Create a folder called `.continue/rules` at the top level of your workspace
29+2. Add a file called `pirates-rule.md` to this folder.
30+3. Write the following contents to `pirates-rule.md` and save.
31+
32+```md title=".continue/rules/pirates-rule.md"
33+---
34+name: Pirate rule
35+---
36+
37+- Talk like a pirate.
38+```
39+
40+Now test your rules by asking a question about a file in chat.
41+
42+![pirate rule test](/img/pirate-rule-test.png)
43+
44+## Creating `rules` blocks
45+
46+Rules can be added locally using the "Add Rules" button while viewing the Local Assistant's rules.
47+
48+![add local rules button](/img/add-local-rules.png)
49+
50+:::info Automatically create local rule blocks
51+When in Agent mode, you can prompt the agent to create a rule for you using the `create_rule_block` tool if enabled.
52+
53+For example, you can say "Create a rule for this", and a rule will be created for you in `.continue/rules` based on your conversation.
54+:::
55+
56+Rules can also be added to an Assistant on the Continue Hub.
57+
58+Explore available rules [here](https://hub.continue.dev), or [create your own](https://hub.continue.dev/new?type=block&blockType=rules) in the Hub.
59+
60+### Syntax
61+
62+:::info
63+
64+Rules were originally defined in YAML format (demonstrated below), but we introduced Markdown for easier editing. While both are still supported, we recommend Markdown.
65+
66+:::
67+
68+Rules blocks can be simple text, written in YAML configuration files, or as Markdown (`.md`) files. They can have the following properties:
69+
70+- `name` (**required** for YAML): A display name/title for the rule
71+- `globs` (optional): When files are provided as context that match this glob pattern, the rule will be included. This can be either a single pattern (e.g., `"**/*.{ts,tsx}"`) or an array of patterns (e.g., `["src/**/*.ts", "tests/**/*.ts"]`).
72+- `regex` (optional): When files are provided as context and their content matches this regex pattern, the rule will be included. This can be either a single pattern (e.g., `"^import .* from '.*';$"`) or an array of patterns (e.g., `["^import .* from '.*';$", "^export .* from '.*';$"]`).
73+- `description` (optional): A description for the rule. Agents may read this description when `alwaysApply` is false to determine whether the rule should be pulled into context.
74+- `alwaysApply`: Determines whether the rule is always included. Behavior is described below:
75+ - `true`: Always included, regardless of file context
76+ - `false`: Included if globs exist AND match file context, or the agent decides to pull the rule into context based on it's description
77+ - `undefined` (default behavior): Included if no globs exist OR globs exist and match
78+
79+<Tabs groupId="rules-example">
80+ <TabItem value="md" label="Markdown">
81+ ```yaml title="doc-standards.md"
82+ ---
83+ name: Documentation Standards
84+ globs: docs/**/*.{md,mdx}
85+ alwaysApply: false
86+ description: Standards for writing and maintaining Continue Docs
87+ ---
88+
89+# Continue Docs Standards
90+
91+- Follow Docusaurus documentation standards
92+- Include YAML frontmatter with title, description, and keywords
93+- Use consistent heading hierarchy starting with h2 (##)
94+- Include relevant Admonition components for tips, warnings, and info
95+- Use descriptive alt text for images
96+- Include cross-references to related documentation
97+- Reference other docs with relative paths
98+- Keep paragraphs concise and scannable
99+- Use code blocks with appropriate language tags
100+
101+ ````
102+ </TabItem>
103+ <TabItem value="yaml" label="YAML">
104+
105+ ```yaml title="doc-standards.yaml"
106+ name: Documentation Standards
107+ version: 1.0.0
108+ schema: v1
109+
110+ rules:
111+ - name: Documentation Standards
112+ globs: docs/**/*.{md,mdx}
113+ alwaysApply: false
114+ rule: >
115+ - Follow Docusaurus documentation standards
116+ - Include YAML frontmatter with title, description, and keywords
117+ - Use consistent heading hierarchy starting with h2 (##)
118+ - Include relevant Admonition components for tips, warnings, and info
119+ - Use descriptive alt text for images
120+ - Include cross-references to related documentation
121+ - Reference other docs with relative paths
122+ - Keep paragraphs concise and scannable
123+ - Use code blocks with appropriate language tags
124+ ````
125+
126+ </TabItem>
127+
128+ </Tabs>
129+
130+### `.continue/rules` folder
131+
132+You can create project-specific rules by adding a `.continue/rules` folder to the root of your project and adding new rule files.
133+
134+```md title=".continue/rules/new-rule.md"
135+---
136+name: New rule
137+---
138+
139+Always give concise responses
140+```
141+
142+This is also done when selecting "Add Rule" in the Assistant settings. This will create a new folder in `.continue/rules` with a default file named `new-rule.md`.
143+
144+### Examples
145+
146+If you want concise answers:
147+
148+```md title=".continue/rules/concise-rule.md"
149+---
150+name: Always give concise answers
151+---
152+
153+Please provide concise answers. Don't explain obvious concepts.
154+You can assume that I am knowledgable about most programming topics.
155+```
156+
157+If you want to ensure certain practices are followed, for example in React:
158+
159+```md title=".continue/rules/functional-rule.md"
160+---
161+name: Always use functional components
162+---
163+
164+Whenever you are writing React code, make sure to
165+
166+- use functional components instead of class components
167+- use hooks for state management
168+- define an interface for your component props
169+- use Tailwind CSS for styling
170+- modularize components into smaller, reusable pieces
171+```
172+
173+### Chat System Message
174+
175+Continue includes a simple default system message for [Chat](../../features/chat/quick-start) and [Agent](../../features/agent/quick-start) requests, to help the model provide reliable codeblock formats in its output.
176+
177+This can be viewed in the rules section of the toolbar (see above), or in the source code [here](https://github.com/continuedev/continue/blob/main/core/llm/constructMessages.ts#L4).
178+
179+Advanced users can override this system message for a specific model if needed by using `chatOptions.baseSystemMessage`. See the [`config.yaml` reference](/reference#models).
180+
181+### `.continuerules`
182+
183+:::warning
184+
185+`.continuerules` will be deprecated in a future release. Please use the `.continue/rules` folder instead.
186+
187+:::
188+
189+You can create project-specific rules by adding a `.continuerules` file to the root of your project. This file is raw text and its full contents will be used as rules.
added docs/docs/customize/deep-dives/slash-commands.mdx +33 −0
@@ -0,0 +1,33 @@
1+---
2+title: Slash commands
3+description: Shortcuts that can be activated by prefacing your input with '/'
4+keywords: [slash command, custom commands, step]
5+---
6+
7+import TabItem from "@theme/TabItem";
8+import Tabs from "@theme/Tabs";
9+
10+![actions](/img/actions.gif)
11+
12+## Slash commands
13+
14+Slash commands are shortcuts that can be activated by typing '/' in a chat session (press <kbd>cmd/ctrl</kbd> + <kbd>L</kbd> (VS Code) or <kbd>cmd/ctrl</kbd> + <kbd>J</kbd> (JetBrains)), and selecting from the dropdown.
15+![slash-commands](/img/slash-commands.png)
16+
17+Slash commands can be combined with additional instructions, including [context providers](../custom-providers.mdx) or highlighted code.
18+
19+## Prompts
20+
21+### Assistant prompt blocks
22+
23+The easiest way to add a slash command is by adding [`prompt` blocks](../../hub/blocks/block-types.md#prompts) to your assistant, which show up as slash commands in [Chat](../../features/chat/how-it-works.mdx).
24+
25+### Prompt files
26+
27+It is also possible to write your own slash command by defining a “.prompt file.” Prompt files can be as simple as a text file, but also include templating so that you can refer to files, URLs, highlighted code, and more.
28+
29+Learn more about prompt files [here](./prompts.md)
30+
31+### MCP Server prompts
32+
33+Any prompts provided by [Model Context Protocol](https://modelcontextprotocol.io/introduction) servers are also accessible in chat as Slash Commands. See the [MCP Server Deep Dive](./mcp.mdx) for more details.
added docs/docs/customize/deep-dives/vscode-actions.md +49 −0
@@ -0,0 +1,49 @@
1+---
2+title: VS Code Actions
3+description: VS Code Actions
4+keywords: [vscode, quick actions, quick, actions]
5+---
6+
7+### Other triggers for Actions (VS Code)
8+
9+:::info
10+Currently all of these are only available in VS Code
11+:::
12+
13+To make common use cases even more accessible, we provide a handful of other ways to invoke actions in VS Code.
14+
15+## Quick actions
16+
17+Quick Actions are displayed as buttons above top-level classes and functions in your source code, letting you invoke actions with one click. They will edit that class or function, but nothing outside of it. They can also be customized with [.prompt files](./prompts.md) to perform custom actions.
18+
19+![quick-actions](/img/quick-actions.png)
20+
21+By default, quick actions are disabled, but can be enabled with the “Continue: Enable Quick Actions” in VS Code settings.
22+
23+## Right click actions
24+
25+Right click actions let you highlight a desired region of code, right click, and then select an action from the dropdown menu.
26+
27+The highlighted code you’ve selected will be included in your prompt alongside a pre-written set of instructions depending on the selected action. This is the only section of code that the model will attempt to edit.
28+
29+Right click actions that generate inline diffs use the same prompt and response processing logic as [Edit](../../features/edit/how-it-works.mdx).
30+
31+![context-menu](/img/context-menu.png)
32+
33+## Debug action
34+
35+The debug action is a special built-in keyboard shortcut in the VS Code extension. Use <kbd>cmd/ctrl</kbd> + <kbd>shift</kbd> + <kbd>R</kbd> to instantly copy the contents of the most recent terminal output into the chat sidebar and get debugging advice. There is no additional, non-visible information sent to the language model.
36+
37+```
38+I got the following error, can you please help explain how to fix it?
39+
40+[ERROR_MESSAGE]
41+```
42+
43+## Quick fixes
44+
45+Whenever you see red/yellow underlines in your code indicating errors, you can place your cursor nearby and VS Code will display a lightbulb icon. Either clicking the lightbulb or using the keyboard shortcut <kbd>cmd/ctrl</kbd> + <kbd>.</kbd> will show a dropdown menu of quick fixes. One of these will be the “Ask Continue” action. Either click or use <kbd>cmd/ctrl</kbd> + <kbd>.</kbd> again and Continue will attempt to help solve the problem.
46+
47+Similarly to the debug action, quick actions transparently inject a prompt into the chat window. When you select “Ask Continue”, the 3 lines above and below the error are sent to the chat followed by the question “How do I fix the following problem in the above code?: [ERROR_MESSAGE]”.
48+
49+![ask-continue](/img/ask-continue.png)
added docs/docs/customize/json-reference.md +530 −0
@@ -0,0 +1,530 @@
1+---
2+title: config.json Reference
3+description: Reference for the Continue _config.json_ configuration file
4+keywords: [config, config_schema.json, json]
5+---
6+
7+:::info
8+We recently introduced a new configuration format, `config.yaml`, to replace `config.json`. See the `config.yaml` reference and migration guide [here](/reference).
9+:::
10+
11+Below are details for each property that can be set in `config.json`. The config schema code is found in [`extensions/vscode/config_schema.json`](https://github.com/continuedev/continue/blob/main/extensions/vscode/config_schema.json).
12+
13+**All properties at all levels are optional unless explicitly marked required**
14+
15+### `models`
16+
17+Your **chat** models are defined here, which are used for [Chat](/features/chat/how-it-works), [Edit](/features/edit/how-it-works) and [VS Code actions](/customize/deep-dives/vscode-actions).
18+
19+Each model has specific configuration options tailored to its provider and functionality, which can be seen as suggestions while editing the json.
20+
21+**Properties:**
22+
23+- `title` (**required**): The title to assign to your model, shown in dropdowns, etc.
24+- `provider` (**required**): The provider of the model, which determines the type and interaction method. Options inclued `openai`, `ollama`, `xAI`, etc., see IntelliJ suggestions.
25+- `model` (**required**): The name of the model, used for prompt template auto-detection. Use `AUTODETECT` special name to get all available models.
26+- `apiKey`: API key required by providers like OpenAI, Anthropic, Cohere, and xAI.
27+- `apiBase`: The base URL of the LLM API.
28+- `contextLength`: Maximum context length of the model, typically in tokens (default: 2048).
29+- `maxStopWords`: Maximum number of stop words allowed, to avoid API errors with extensive lists.
30+- `template`: Chat template to format messages. Auto-detected for most models but can be overridden. See intelliJ suggestions.
31+- `promptTemplates`: A mapping of prompt template names (e.g., `edit`) to template strings. [Customization Guide](https://docs.continue.dev/model-setup/configuration#customizing-the-edit-prompt).
32+- `completionOptions`: Model-specific completion options, same format as top-level [`completionOptions`](#completionoptions), which they override.
33+- `systemMessage`: A system message that will precede responses from the LLM.
34+- `requestOptions`: Model-specific HTTP request options, same format as top-level [`requestOptions`](#requestoptions), which they override.
35+- `apiType`: Specifies the type of API (`openai` or `azure`).
36+- `apiVersion`: Azure API version (e.g., `2023-07-01-preview`).
37+- `engine`: Engine for Azure OpenAI requests.
38+- `capabilities`: Override auto-detected capabilities:
39+ - `uploadImage`: Boolean indicating if the model supports image uploads.
40+ - `tools`: Boolean indicating if the model supports tool use.
41+
42+_(AWS Only)_
43+
44+- `profile`: AWS security profile for authorization.
45+- `modelArn`: AWS ARN for imported models (e.g., for `bedrockimport` provider).
46+- `region`: Region where the model is hosted (e.g., `us-east-1`, `eu-central-1`).
47+
48+Example:
49+
50+```json title="config.json"
51+{
52+ "models": [
53+ {
54+ "title": "Ollama",
55+ "provider": "ollama",
56+ "model": "AUTODETECT"
57+ },
58+ {
59+ "model": "gpt-4o",
60+ "contextLength": 128000,
61+ "title": "GPT-4o",
62+ "provider": "openai",
63+ "apiKey": "YOUR_API_KEY"
64+ }
65+ ]
66+}
67+```
68+
69+### `tabAutocompleteModel`
70+
71+Specifies the model or models for tab autocompletion, defaulting to an Ollama instance. This property uses the same format as `models`. Can be an array of models or an object for one model.
72+
73+Example
74+
75+```json title="config.json"
76+{
77+ "tabAutocompleteModel": {
78+ "title": "My Starcoder",
79+ "provider": "ollama",
80+ "model": "starcoder2:3b"
81+ }
82+}
83+```
84+
85+### `tabAutocompleteOptions`
86+
87+Specifies options for tab autocompletion behavior.
88+
89+**Properties:**
90+
91+- `disable`: If `true`, disables tab autocomplete (default: `false`).
92+- `maxPromptTokens`: Maximum number of tokens for the prompt (default: `1024`).
93+- `debounceDelay`: Delay (in ms) before triggering autocomplete (default: `350`).
94+- `maxSuffixPercentage`: Maximum percentage of prompt for suffix (default: `0.2`).
95+- `prefixPercentage`: Percentage of input for prefix (default: `0.3`).
96+- `template`: Template string for autocomplete, using Mustache templating. You can use the `{{{ prefix }}}`, `{{{ suffix }}}`, `{{{ filename }}}`, `{{{ reponame }}}`, and `{{{ language }}}` variables.
97+- `onlyMyCode`: If `true`, only includes code within the repository (default: `true`).
98+
99+Example
100+
101+```json title="config.json"
102+{
103+ "tabAutocompleteOptions": {
104+ "debounceDelay": 500,
105+ "maxPromptTokens": 1500,
106+ "disableInFiles": ["*.md"]
107+ }
108+}
109+```
110+
111+### `embeddingsProvider`
112+
113+Embeddings model settings - the model used for @Codebase and @docs.
114+
115+**Properties:**
116+
117+- `provider` (**required**): Specifies the embeddings provider, with options including `transformers.js`, `ollama`, `openai`, `cohere`, `gemini`, etc
118+- `model`: Model name for embeddings.
119+- `apiKey`: API key for the provider.
120+- `apiBase`: Base URL for API requests.
121+- `requestOptions`: Additional HTTP request settings specific to the embeddings provider.
122+- `maxEmbeddingChunkSize`: Maximum tokens per document chunk. Minimum is 128 tokens.
123+- `maxEmbeddingBatchSize`: Maximum number of chunks per request. Minimum is 1 chunk.
124+
125+(AWS ONLY)
126+
127+- `region`: Specifies the region hosting the model.
128+- `profile`: AWS security profile.
129+
130+Example:
131+
132+```json title="config.json"
133+{
134+ "embeddingsProvider": {
135+ "provider": "openai",
136+ "model": "text-embedding-ada-002",
137+ "apiKey": "<API_KEY>",
138+ "maxEmbeddingChunkSize": 256,
139+ "maxEmbeddingBatchSize": 5
140+ }
141+}
142+```
143+
144+### `completionOptions`
145+
146+Parameters that control the behavior of text generation and completion settings. Top-level `completionOptions` apply to all models, _unless overridden at the model level_.
147+
148+**Properties:**
149+
150+- `stream`: Whether to stream the LLM response. Currently only respected by the `anthropic` and `ollama` providers; other providers will always stream (default: `true`).
151+- `temperature`: Controls the randomness of the completion. Higher values result in more diverse outputs.
152+- `topP`: The cumulative probability for nucleus sampling. Lower values limit responses to tokens within the top probability mass.
153+- `topK`: The maximum number of tokens considered at each step. Limits the generated text to tokens within this probability.
154+- `presencePenalty`: Discourages the model from generating tokens that have already appeared in the output.
155+- `frequencyPenalty`: Penalizes tokens based on their frequency in the text, reducing repetition.
156+- `mirostat`: Enables Mirostat sampling, which controls the perplexity during text generation. Supported by Ollama, LM Studio, and llama.cpp providers (default: `0`, where `0` = disabled, `1` = Mirostat, and `2` = Mirostat 2.0).
157+- `stop`: An array of stop tokens that, when encountered, will terminate the completion. Allows specifying multiple end conditions.
158+- `maxTokens`: The maximum number of tokens to generate in a completion (default: `2048`).
159+- `numThreads`: The number of threads used during the generation process. Available only for Ollama as `num_thread`.
160+- `keepAlive`: For Ollama, this parameter sets the number of seconds to keep the model loaded after the last request, unloading it from memory if inactive (default: `1800` seconds, or 30 minutes).
161+- `numGpu`: For Ollama, this parameter overrides the number of gpu layers that will be used to load the model into VRAM.
162+- `useMmap`: For Ollama, this parameter allows the model to be mapped into memory. If disabled can enhance response time on low end devices but will slow down the stream.
163+- `reasoning`: Enables thinking/reasoning for Anthropic Claude 3.7+ models.
164+- `reasoningBudgetTokens`: Sets budget tokens for thinking/reasoning in Anthropic Claude 3.7+ models.
165+
166+Example
167+
168+```json title="config.json"
169+{
170+ "completionOptions": {
171+ "stream": false,
172+ "temperature": 0.5
173+ }
174+}
175+```
176+
177+### `requestOptions`
178+
179+Default HTTP request options that apply to all models and context providers, unless overridden at the model level.
180+
181+**Properties:**
182+
183+- `timeout`: Timeout for each request to the LLM (default: 7200 seconds).
184+- `verifySsl`: Whether to verify SSL certificates for requests.
185+- `caBundlePath`: Path to a custom CA bundle for HTTP requests - path to `.pem` file (or array of paths)
186+- `proxy`: Proxy URL to use for HTTP requests.
187+- `headers`: Custom headers for HTTP requests.
188+- `extraBodyProperties`: Additional properties to merge with the HTTP request body.
189+- `noProxy`: List of hostnames that should bypass the specified proxy.
190+- `clientCertificate`: Client certificate for HTTP requests.
191+
192+ - `cert`: Path to the client certificate file.
193+ - `key`: Path to the client certificate key file.
194+ - `passphrase`: Optional passphrase for the client certificate key file.
195+
196+Example
197+
198+```json title="config.json"
199+{
200+ "requestOptions": {
201+ "headers": {
202+ "X-Auth-Token": "xxx"
203+ }
204+ }
205+}
206+```
207+
208+### `reranker`
209+
210+Configuration for the reranker model used in response ranking.
211+
212+**Properties:**
213+
214+- `name` (**required**): Reranker name, e.g., `cohere`, `voyage`, `llm`, `huggingface-tei`, `bedrock`
215+- `params`:
216+ - `model`: Model name
217+ - `apiKey`: Api key
218+ - `region`: Region (for Bedrock only)
219+
220+Example
221+
222+```json title="config.json"
223+{
224+ "reranker": {
225+ "name": "voyage",
226+ "params": {
227+ "model": "rerank-2",
228+ "apiKey": "<VOYAGE_API_KEY>"
229+ }
230+ }
231+}
232+```
233+
234+### `docs`
235+
236+List of documentation sites to index.
237+
238+**Properties:**
239+
240+- `title` (**required**): Title of the documentation site, displayed in dropdowns, etc.
241+- `startUrl` (**required**): Start page for crawling - usually root or intro page for docs
242+<!-- - `rootUrl`: Crawler will only index docs within this domain - pages that contain this URL -->
243+- `maxDepth`: Maximum link depth for crawling. Default `4`
244+- `favicon`: URL for site favicon (default is `/favicon.ico` from `startUrl`).
245+- `useLocalCrawling`: Skip the default crawler and only crawl using a local crawler.
246+
247+Example
248+
249+```json title="config.json"
250+"docs": [
251+ {
252+ "title": "Continue",
253+ "startUrl": "https://docs.continue.dev/intro",
254+ "faviconUrl": "https://docs.continue.dev/favicon.ico",
255+ }
256+]
257+```
258+
259+### `slashCommands`
260+
261+Custom commands initiated by typing "/" in the sidebar. Commands include predefined functionality or may be user-defined.
262+
263+**Properties:**
264+
265+- `name`: The command name. Options include "issue", "share", "cmd", "http", "commit", and "review".
266+- `description`: Brief description of the command.
267+- `step`: (Deprecated) Used for built-in commands; set the name for pre-configured options.
268+- `params`: Additional parameters to configure command behavior (command-specific - see code for command)
269+
270+The following commands are built-in and can be added to `config.json` to make them visible:
271+
272+#### `/share`
273+
274+Generate a shareable markdown transcript of your current chat history.
275+
276+```json title="config.json"
277+{
278+ "slashCommands": [
279+ {
280+ "name": "share",
281+ "description": "Export the current chat session to markdown",
282+ "params": { "outputDir": "~/.continue/session-transcripts" }
283+ }
284+ ]
285+}
286+```
287+
288+Use the `outputDir` parameter to specify where you want to the markdown file to be saved.
289+
290+#### `/cmd`
291+
292+Generate a shell command from natural language and (only in VS Code) automatically paste it into the terminal.
293+
294+```json title="config.json"
295+{
296+ "slashCommands": [
297+ {
298+ "name": "cmd",
299+ "description": "Generate a shell command"
300+ }
301+ ]
302+}
303+```
304+
305+#### `/commit`
306+
307+Shows the LLM your current git diff and asks it to generate a commit message.
308+
309+```json title="config.json"
310+{
311+ "slashCommands": [
312+ {
313+ "name": "commit",
314+ "description": "Generate a commit message for the current changes"
315+ }
316+ ]
317+}
318+```
319+
320+#### `/http`
321+
322+Write a custom slash command at your own HTTP endpoint. Set 'url' in the params object for the endpoint you have setup. The endpoint should return a sequence of string updates, which will be streamed to the Continue sidebar. See our basic [FastAPI example](https://github.com/continuedev/continue/blob/74002369a5e435735b83278fb965e004ae38a97d/core/context/providers/context_provider_server.py#L34-L45) for reference.
323+
324+```json title="config.json"
325+{
326+ "slashCommands": [
327+ {
328+ "name": "http",
329+ "description": "Does something custom",
330+ "params": { "url": "<my server endpoint>" }
331+ }
332+ ]
333+}
334+```
335+
336+#### `/issue`
337+
338+Describe the issue you'd like to generate, and Continue will turn into a well-formatted title and body, then give you a link to the draft so you can submit. Make sure to set the URL of the repository you want to generate issues for.
339+
340+```json title="config.json"
341+{
342+ "slashCommands": [
343+ {
344+ "name": "issue",
345+ "description": "Generate a link to a drafted GitHub issue",
346+ "params": { "repositoryUrl": "https://github.com/continuedev/continue" }
347+ }
348+ ]
349+}
350+```
351+
352+#### `/onboard`
353+
354+The onboard slash command helps to familiarize yourself with a new project by analyzing the project structure, READMEs, and dependency files. It identifies key folders, explains their purpose, and highlights popular packages used. Additionally, it offers insights into the project's architecture.
355+
356+```json title="config.json"
357+{
358+ "slashCommands": [
359+ {
360+ "name": "onboard",
361+ "description": "Familiarize yourself with the codebase"
362+ }
363+ ]
364+}
365+```
366+
367+Example:
368+
369+```json title="config.json"
370+{
371+ "slashCommands": [
372+ {
373+ "name": "commit",
374+ "description": "Generate a commit message"
375+ },
376+ {
377+ "name": "share",
378+ "description": "Export this session as markdown"
379+ },
380+ {
381+ "name": "cmd",
382+ "description": "Generate a shell command"
383+ }
384+ ]
385+}
386+```
387+
388+### `customCommands`
389+
390+User-defined commands for prompt shortcuts in the sidebar, allowing quick access to common actions.
391+
392+**Properties:**
393+
394+- `name`: The name of the custom command.
395+- `prompt`: Text prompt for the command.
396+- `description`: Brief description explaining the command's function.
397+
398+Example:
399+
400+```json title="config.json"
401+{
402+ "customCommands": [
403+ {
404+ "name": "test",
405+ "prompt": "Write a comprehensive set of unit tests for the selected code. It should setup, run tests that check for correctness including important edge cases, and teardown. Ensure that the tests are complete and sophisticated. Give the tests just as chat output, don't edit any file.",
406+ "description": "Write unit tests for highlighted code"
407+ }
408+ ]
409+}
410+```
411+
412+### `contextProviders`
413+
414+List of the pre-defined context providers that will show up as options while typing in the chat, and their customization with `params`.
415+
416+**Properties:**
417+
418+- `name`: Name of the context provider, e.g. `docs` or `web`
419+- `params`: A context-provider-specific record of params to configure the context behavior
420+
421+Example
422+
423+```json title="config.json"
424+{
425+ "contextProviders": [
426+ {
427+ "name": "code",
428+ "params": {}
429+ },
430+ {
431+ "name": "docs",
432+ "params": {}
433+ },
434+ {
435+ "name": "diff",
436+ "params": {}
437+ },
438+ {
439+ "name": "open",
440+ "params": {}
441+ }
442+ ]
443+}
444+```
445+
446+### `userToken`
447+
448+An optional token that identifies the user, primarily for authenticated services.
449+
450+### `systemMessage`
451+
452+Defines a system message that appears before every response from the language model, providing guidance or context.
453+
454+### `experimental`
455+
456+Several experimental config parameters are available, as described below:
457+
458+`experimental`:
459+
460+- `defaultContext`: Defines the default context for the LLM. Uses the same format as `contextProviders` but includes an additional `query` property to specify custom query parameters.=
461+- `modelRoles`:
462+ - `inlineEdit`: Model title for inline edits.
463+ - `applyCodeBlock`: Model title for applying code blocks.
464+ - `repoMapFileSelection`: Model title for repo map selections.
465+- `quickActions`: Array of custom quick actions
466+ - `title` (**required**): Display title for the quick action.
467+ - `prompt` (**required**): Prompt for quick action.
468+ - `sendToChat`: If `true`, sends result to chat; else inserts in document. Default is `false`.
469+- `contextMenuPrompts`:
470+ - `comment`: Prompt for commenting code.
471+ - `docstring`: Prompt for adding docstrings.
472+ - `fix`: Prompt for fixing code.
473+ - `optimize`: Prompt for optimizing code.
474+- `modelContextProtocolServers`: See [Model Context Protocol](/customization/mcp-tools)
475+
476+Example
477+
478+```json title="config.json"
479+{
480+ "experimental": {
481+ "modelRoles": {
482+ "inlineEdit": "Edit Model"
483+ },
484+ "quickActions": [
485+ {
486+ "title": "Tags",
487+ "prompt": "Return a list of any function and class names from the included code block",
488+ "sendToChat": true
489+ }
490+ ],
491+ "contextMenuPrompts": {
492+ "fixGrammar": "Fix grammar in the above but allow for typos."
493+ },
494+ "modelContextProtocolServers": [
495+ {
496+ "transport": {
497+ "type": "stdio",
498+ "command": "uvx",
499+ "args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"]
500+ }
501+ }
502+ ]
503+ }
504+}
505+```
506+
507+### Fully deprecated settings
508+
509+Some deprecated `config.json` settings are no longer stored in config and have been moved to be editable through the [User Settings Page](/customize/settings). If found in `config.json`, they will be auto-migrated to User Settings and removed from `config.json`.
510+
511+- `allowAnonymousTelemetry`: This value will be migrated to the safest merged value (`false` if either are `false`).
512+- `promptPath`: This value will override during migration.
513+- `disableIndexing`: This value will be migrated to the safest merged value (`true` if either are `true`).
514+- `disableSessionTitles`/`ui.getChatTitles`: This value will be migrated to the safest merged value (`true` if either are `true`). `getChatTitles` takes precedence if set to false
515+- `tabAutocompleteOptions`
516+ - `useCache`: This value will override during migration.
517+ - `disableInFiles`: This value will be migrated to the safest merged value (arrays of file matches merged/deduplicated)
518+ - `multilineCompletions`: This value will override during migration.
519+- `experimental`
520+ - `useChromiumForDocsCrawling`: This value will override during migration.
521+ - `readResponseTTS`: This value will override during migration.
522+- `ui` - all will override during migration
523+
524+ - `codeBlockToolbarPosition`
525+ - `fontSize`
526+ - `codeWrap`
527+ - `displayRawMarkdown`
528+ - `showChatScrollbar`
529+
530+ See [User Settings Page](/customize/settings) for more information about each option.
added docs/docs/customize/model-providers/_category_.json +4 −0
@@ -0,0 +1,4 @@
1+{
2+ "label": "Model Providers",
3+ "position": 4
4+}
added docs/docs/customize/model-providers/assets/watsonx2.gif +0 −0

Not shown: the file is larger than the hub shows, or this page holds as much as it shows. View the file.

added docs/docs/customize/model-providers/llamastack.mdx +113 −0
@@ -0,0 +1,113 @@
1+import TabItem from "@theme/TabItem";
2+import Tabs from "@theme/Tabs";
3+
4+# Llama Stack
5+
6+[Llama Stack](https://llama-stack.readthedocs.io/en/latest/index.html) is an open-source library that standardizes the core building blocks that simplify AI application development. It codifies best practices across the Llama ecosystem. More specifically, it provides
7+
8+- **Unified API layer** for Inference, RAG, Agents, Tools, Safety, Evals, and Telemetry.
9+- **Plugin architecture** to support the rich ecosystem of different API implementations in various environments, including local development, on-premises, cloud, and mobile.
10+- **Prepackaged verified distributions** which offer a one-stop solution for developers to get started quickly and reliably in any environment.
11+- **Multiple developer interfaces** like CLI and SDKs for Python, Typescript, iOS, and Android.
12+- **Standalone applications** as examples for how to build production-grade AI applications with Llama Stack.
13+
14+To try Llama Stack locally, run:
15+
16+```shell
17+curl -LsSf https://github.com/meta-llama/llama-stack/raw/main/install.sh | bash
18+```
19+
20+Learn more about how to get started with llama stack in this [guide](https://llama-stack.readthedocs.io/en/latest/getting_started/index.html)
21+
22+## Chat model
23+
24+We recommend configuring **Llama 4 Maverick** as your chat model.
25+
26+<Tabs groupId="config-example">
27+ <TabItem value="yaml" label="YAML">
28+ ```yaml title="config.yaml"
29+ models:
30+ - name: Llama4 Maverick
31+ provider: llamastack
32+ model: meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8
33+ apiBase: http://<llama stack endpoint>/v1/openai/v1/
34+ ```
35+ </TabItem>
36+ <TabItem value="json" label="JSON">
37+ ```json title="config.json"
38+ {
39+ "models": [
40+ {
41+ "title": "Llama4 Maverick",
42+ "provider": "llamastack",
43+ "model": "meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8",
44+ "apiBase": "http://<llama stack endpoint>/v1/openai/v1/"
45+ }
46+ ]
47+ }
48+ ```
49+ </TabItem>
50+</Tabs>
51+
52+## Autocomplete model
53+
54+We recommend configuring **CodeLlama 7B** as your autocomplete model.
55+
56+<Tabs groupId="config-example">
57+ <TabItem value="yaml" label="YAML">
58+ ```yaml title="config.yaml"
59+ models:
60+ - name: CodeLlama 7B
61+ provider: llamastack
62+ model: codellama:7b
63+ apiBase: http://<llama stack endpoint>/v1/openai/v1/
64+ roles:
65+ - autocomplete
66+ ```
67+ </TabItem>
68+ <TabItem value="json" label="JSON">
69+ ```json title="config.json"
70+ {
71+ "tabAutocompleteModel": {
72+ "title": "CodeLlama 7B",
73+ "provider": "llamastack",
74+ "model": "codellama:7b",
75+ "apiBase": "http://<llama stack endpoint>/v1/openai/v1/"
76+ }
77+ }
78+ ```
79+ </TabItem>
80+</Tabs>
81+
82+## Embeddings model
83+
84+By default, Llama Stack uses **all-MiniLM-L6-v2** as the embeddings model.
85+
86+<Tabs groupId="config-example">
87+ <TabItem value="yaml" label="YAML">
88+ ```yaml title="config.yaml"
89+ models:
90+ - name: all-MiniLM-L6-v2
91+ provider: llamastack
92+ model: all-MiniLM-L6-v2
93+ apiBase: http://<llama stack endpoint>/v1/openai/v1/
94+ roles:
95+ - embed
96+ ```
97+ </TabItem>
98+ <TabItem value="json" label="JSON">
99+ ```json title="config.json"
100+ {
101+ "embeddingsProvider": {
102+ "provider": "llamastack",
103+ "model": "all-MiniLM-L6-v2",
104+ "apiBase": "http://<llama stack endpoint>/v1/openai/v1/"
105+ }
106+ }
107+ ```
108+ </TabItem>
109+</Tabs>
110+
111+## Reranking model
112+
113+Llama Stack currently did not support Reranking API yet.
added docs/docs/customize/model-providers/more/SambaNova.mdx +34 −0
@@ -0,0 +1,34 @@
1+import TabItem from "@theme/TabItem";
2+import Tabs from "@theme/Tabs";
3+
4+# SambaNova Cloud
5+
6+The SambaNova Cloud is a cloud platform for running large AI models with the world record open source models performance. You can follow the instructions in [this blog post](https://sambanova.ai/blog/accelerating-coding-with-sambanova-cloud?ref=blog.continue.dev) to configure your setup.
7+
8+<Tabs groupId="config-example">
9+ <TabItem value="yaml" label="YAML">
10+ ```yaml title="config.yaml"
11+ models:
12+ - name: SambaNova Llama 4 Scout
13+ provider: sambanova
14+ model: Llama-4-Scout-17B-16E-Instruct
15+ apiKey: <YOUR_SAMBANOVA_API_KEY>
16+ ```
17+ </TabItem>
18+ <TabItem value="json" label="JSON">
19+ ```json title="config.json"
20+ {
21+ "models": [
22+ {
23+ "title": "SambaNova Llama 4 Scout",
24+ "provider": "sambanova",
25+ "model": "Llama-4-Scout-17B-16E-Instruct",
26+ "apiKey": "<YOUR_SAMBANOVA_API_KEY>"
27+ }
28+ ]
29+ }
30+ ```
31+ </TabItem>
32+</Tabs>
33+
34+[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/SambaNova.ts)
added docs/docs/customize/model-providers/more/_category_.json +4 −0
@@ -0,0 +1,4 @@
1+{
2+ "label": "More Providers",
3+ "position": 2
4+}
added docs/docs/customize/model-providers/more/asksage.mdx +91 −0
@@ -0,0 +1,91 @@
1+# Ask Sage
2+
3+import TabItem from "@theme/TabItem";
4+import Tabs from "@theme/Tabs";
5+
6+:::info
7+To get an Ask Sage API key login to the Ask Sage platform (If you don't have an account, you can create one [here](https://chat.asksage.ai/)) and follow the instructions in the Ask Sage Docs: [Ask Sage API Key](https://docs.asksage.ai/docs/api-documentation/api-documentation.html)
8+:::
9+
10+## Configuration
11+
12+To use the Ask Sage models, you can use the following
13+
14+<Tabs groupId="config-example">
15+ <TabItem value="yaml" label="YAML">
16+ ```yaml title="config.yaml"
17+ models:
18+ - name: GPT-4 gov
19+ provider: askSage
20+ model: gpt4-gov
21+ apiBase: https://api.asksage.ai/server/
22+ apiKey: <YOUR_ASK_SAGE_API_KEY>
23+ ```
24+ </TabItem>
25+ <TabItem value="json" label="JSON">
26+ ```json title="config.json"
27+ {
28+ "models": [
29+ {
30+ "title": "GPT-4 gov",
31+ "provider": "askSage",
32+ "model": "gpt4-gov",
33+ "apiBase": "https://api.asksage.ai/server/",
34+ "apiKey": "<YOUR_ASK_SAGE_API_KEY>"
35+ }
36+ ]
37+ }
38+ ```
39+ </TabItem>
40+</Tabs>
41+
42+The `apiBase` will be listed on the Ask Sage platform when you generate an `API key`. You will see context as shown below:
43+
44+> Server API for query/training etc.:
45+>
46+> - Documentation: https://app.swaggerhub.com/apis-docs/NICOLASCHAILLAN_1/server_ask-sage_api/1.0
47+> - URL for this API is: https://api.asksage.ai/server/
48+
49+## Usage
50+
51+Currently, the setup for the models provided by Ask Sage is to support the following two functionalities provided by Continue.Dev:
52+
53+- `Chat` to understand and iterate on code in the sidebar
54+- `Edit` to modify code without leaving your current file
55+
56+More models, functionalities and documentation will be added in the future for Ask Sage Integration.
57+
58+> We recommend to utilize the `OpenAI` or `Anthropic` models for the best performance and results for the `Chat` and `Edit` functionalities.
59+
60+## Ask Sage Documentation
61+
62+Ask Sage documentation is not available with Continue.Dev, so if you have any questions or need help with Ask Sage type `@ask` and select the `Ask Sage` option in the chat. Then procced to ask your question about Ask Sage.
63+
64+## Current Models From Ask Sage Supported
65+
66+The current Models available provided by Ask Sage are:
67+
68+| Index | Model | Added |
69+| ----- | --------------------- | ----- |
70+| 1 | GPT-4 Gov | ✅ |
71+| 2 | GPT-4o Gov | ✅ |
72+| 3 | GPT-4o-mini Gov | ✅ |
73+| 4 | GPT-3.5-Turbo Gov | ✅ |
74+| 5 | GPT-4o | ✅ |
75+| 6 | GPT-4o-mini | ✅ |
76+| 7 | GPT-4 | ✅ |
77+| 8 | GPT-4-32K | ✅ |
78+| 9 | GPT-o1 | ✅ |
79+| 10 | GPT-o1-mini | ✅ |
80+| 10 | GPT-o3-mini | ✅ |
81+| 11 | GPT-3.5-turbo | ✅ |
82+| 12 | Claude 3.5 Sonnet Gov | ✅ |
83+| 13 | Claude 3 Opus | ✅ |
84+| 14 | Claude 3 Sonet | ✅ |
85+| 15 | Claude 3.5 Sonnet | ✅ |
86+| 16 | Grok (xAI) | ✅ |
87+| 17 | Groq Llama 3.3 | ✅ |
88+| 18 | Groq 70B | ✅ |
89+| 19 | Gemini Pro | ✅ |
90+| 20 | llama 3 | ✅ |
91+| 21 | Mistral Large | ✅ |
added docs/docs/customize/model-providers/more/cerebras.mdx +36 −0
@@ -0,0 +1,36 @@
1+# Cerebras Inference
2+
3+import TabItem from "@theme/TabItem";
4+import Tabs from "@theme/Tabs";
5+
6+Cerebras Inference uses specialized silicon to provides fast inference.
7+
8+1. Create an account in the portal [here](https://cloud.cerebras.ai/).
9+2. Create and copy the API key for use in Continue.
10+3. Update your Continue config file:
11+
12+<Tabs groupId="config-example">
13+ <TabItem value="yaml" label="YAML">
14+ ```yaml title="config.yaml"
15+ models:
16+ - name: Cerebras Llama 3.1 70B
17+ provider: cerebras
18+ model: llama3.1-70b
19+ apiKey: <YOUR_CEREBRAS_API_KEY>
20+ ```
21+ </TabItem>
22+ <TabItem value="json" label="JSON">
23+ ```json title="config.json"
24+ {
25+ "models": [
26+ {
27+ "title": "Cerebras Llama 3.1 70B",
28+ "provider": "cerebras",
29+ "model": "llama3.1-70b",
30+ "apiKey": "<YOUR_CEREBRAS_API_KEY>"
31+ }
32+ ]
33+ }
34+ ```
35+ </TabItem>
36+</Tabs>
added docs/docs/customize/model-providers/more/cloudflare.mdx +87 −0
@@ -0,0 +1,87 @@
1+import TabItem from "@theme/TabItem";
2+import Tabs from "@theme/Tabs";
3+
4+# Cloudflare Workers AI
5+
6+Cloudflare Workers AI can be used for both chat and tab autocompletion in Continue. Here is an example of Cloudflare Workers AI configuration:
7+
8+<Tabs groupId="config-example">
9+ <TabItem value="yaml" label="YAML">
10+ ```yaml title="config.yaml"
11+ models:
12+ - name: Llama 3 8B
13+ provider: cloudflare
14+ apiKey: <YOUR_CLOUDFARE_API_KEY>
15+ model: "@cf/meta/llama-3-8b-instruct"
16+ contextLength: 2400
17+ defaultCompletionOptions:
18+ maxTokens: 500
19+ roles:
20+ - chat
21+ env:
22+ accountId: YOUR CLOUDFLARE ACCOUNT ID
23+ - name: DeepSeek Coder 6.7b Instruct
24+ provider: cloudflare
25+ apiKey: <YOUR_CLOUDFARE_API_KEY>
26+ model: "@hf/thebloke/deepseek-coder-6.7b-instruct-awq"
27+ contextLength: 2400
28+ defaultCompletionOptions:
29+ maxTokens: 500
30+ roles:
31+ - chat
32+ env:
33+ accountId: YOUR CLOUDFLARE ACCOUNT ID
34+ - name: DeepSeek 7b
35+ provider: cloudflare
36+ apiKey: <YOUR_CLOUDFARE_API_KEY>
37+ model: "@hf/thebloke/deepseek-coder-6.7b-base-awq"
38+ roles:
39+ - autocomplete
40+ env:
41+ accountId: YOUR CLOUDFLARE ACCOUNT ID
42+ ```
43+ </TabItem>
44+ <TabItem value="json" label="JSON">
45+ ```json title="config.json"
46+ {
47+ "models": [
48+ {
49+ "title": "Llama 3 8B",
50+ "provider": "cloudflare",
51+ "accountId": "YOUR CLOUDFLARE ACCOUNT ID",
52+ "apiKey": "YOUR CLOUDFLARE API KEY",
53+ "contextLength": 2400,
54+ "completionOptions": {
55+ "maxTokens": 500
56+ },
57+ "model": "@cf/meta/llama-3-8b-instruct"
58+ },
59+ {
60+ "title": "DeepSeek Coder 6.7b Instruct",
61+ "provider": "cloudflare",
62+ "accountId": "YOUR CLOUDFLARE ACCOUNT ID",
63+ "apiKey": "YOUR CLOUDFLARE API KEY",
64+ "contextLength": 2400,
65+ "completionOptions": {
66+ "maxTokens": 500
67+ },
68+ "model": "@hf/thebloke/deepseek-coder-6.7b-instruct-awq"
69+ }
70+ ],
71+ "tabAutocompleteModel": {
72+ "title": "DeepSeek 7b",
73+ "provider": "cloudflare",
74+ "accountId": "YOUR CLOUDFLARE ACCOUNT ID",
75+ "apiKey": "YOUR CLOUDFLARE API KEY",
76+ "model": "@hf/thebloke/deepseek-coder-6.7b-base-awq"
77+ }
78+ }
79+ ```
80+ </TabItem>
81+</Tabs>
82+
83+Visit the [Cloudflare dashboard](https://dash.cloudflare.com/) to [create an API key](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/).
84+
85+Review [available models](https://developers.cloudflare.com/workers-ai/models/) on Workers AI
86+
87+[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Cloudflare.ts)
added docs/docs/customize/model-providers/more/cohere.mdx +102 −0
@@ -0,0 +1,102 @@
1+import TabItem from "@theme/TabItem";
2+import Tabs from "@theme/Tabs";
3+
4+# Cohere
5+
6+Before using Cohere, visit the [Cohere dashboard](https://dashboard.cohere.com/api-keys) to create an API key.
7+
8+## Chat model
9+
10+We recommend configuring **Command A** as your chat model.
11+
12+<Tabs groupId="config-example">
13+ <TabItem value="yaml" label="YAML">
14+ ```yaml title="config.yaml"
15+ models:
16+ - name: Command A 03-2025
17+ provider: cohere
18+ model: command-a-03-2025
19+ apiKey: <YOUR_COHERE_API_KEY>
20+ ```
21+ </TabItem>
22+ <TabItem value="json" label="JSON">
23+ ```json title="config.json"
24+ {
25+ "models": [
26+ {
27+ "title": "Command A 03-2025",
28+ "provider": "cohere",
29+ "model": "command-a-03-2025",
30+ "apiKey": "<YOUR_COHERE_API_KEY>"
31+ }
32+ ]
33+ }
34+ ```
35+ </TabItem>
36+</Tabs>
37+
38+## Autocomplete model
39+
40+Cohere currently does not offer any autocomplete models.
41+
42+[Click here](../../model-roles/autocomplete.md) to see a list of autocomplete model providers.
43+
44+## Embeddings model
45+
46+We recommend configuring **embed-v4.0** as your embeddings model.
47+
48+<Tabs groupId="config-example">
49+ <TabItem value="yaml" label="YAML">
50+ ```yaml title="config.yaml"
51+ models:
52+ - name: Cohere Embed v4.0
53+ provider: cohere
54+ model: embed-v4.0
55+ apiKey: <YOUR_COHERE_API_KEY>
56+ roles:
57+ - embed
58+ ```
59+ </TabItem>
60+ <TabItem value="json" label="JSON">
61+ ```json title="config.json"
62+ {
63+ "embeddingsProvider": {
64+ "provider": "cohere",
65+ "model": "embed-v4.0",
66+ "apiKey": "<YOUR_COHERE_API_KEY>"
67+ }
68+ }
69+ ```
70+ </TabItem>
71+</Tabs>
72+
73+## Reranking model
74+
75+We recommend configuring **rerank-v3.5** as your reranking model.
76+
77+<Tabs groupId="config-example">
78+ <TabItem value="yaml" label="YAML">
79+ ```yaml title="config.yaml"
80+ models:
81+ - name: Cohere Rerank v3.5
82+ provider: cohere
83+ model: rerank-v3.5
84+ apiKey: <YOUR_COHERE_API_KEY>
85+ roles:
86+ - rerank
87+ ```
88+ </TabItem>
89+ <TabItem value="json" label="JSON">
90+ ```json title="config.json"
91+ {
92+ "reranker": {
93+ "name": "cohere",
94+ "params": {
95+ "model": "rerank-v3.5",
96+ "apiKey": "<YOUR_COHERE_API_KEY>"
97+ }
98+ }
99+ }
100+ ```
101+ </TabItem>
102+</Tabs>
added docs/docs/customize/model-providers/more/deepinfra.mdx +34 −0
@@ -0,0 +1,34 @@
1+import Tabs from "@theme/Tabs";
2+import TabItem from "@theme/TabItem";
3+
4+# DeepInfra
5+
6+[DeepInfra](https://deepinfra.com) provides inference for open-source models at very low cost. To get started with DeepInfra, obtain your API key [here](https://deepinfra.com/dash). Then, find the model you want to use [here](https://deepinfra.com/models?type=text-generation) and copy the name of the model. Continue can then be configured to use the `DeepInfra` LLM class, like the example here:
7+
8+<Tabs groupId="config-example">
9+ <TabItem value="yaml" label="YAML">
10+ ```yaml title="config.yaml"
11+ models:
12+ - name: DeepInfra
13+ provider: deepinfra
14+ model: mistralai/Mixtral-8x7B-Instruct-v0.1
15+ apiKey: <YOUR_DEEP_INFRA_API_KEY>
16+ ```
17+ </TabItem>
18+ <TabItem value="json" label="JSON">
19+ ```json title="config.json"
20+ {
21+ "models": [
22+ {
23+ "provider": "deepinfra",
24+ "title": "DeepInfra",
25+ "model": "mistralai/Mixtral-8x7B-Instruct-v0.1",
26+ "apiKey": "<YOUR_DEEP_INFRA_API_KEY>"
27+ }
28+ ]
29+ }
30+ ```
31+ </TabItem>
32+</Tabs>
33+
34+[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/DeepInfra.ts)
added docs/docs/customize/model-providers/more/flowise.mdx +34 −0
@@ -0,0 +1,34 @@
1+import TabItem from "@theme/TabItem";
2+import Tabs from "@theme/Tabs";
3+
4+# Flowise
5+
6+[Flowise](https://flowiseai.com/) is a low-code/no-code drag & drop tool with the aim to make it easy for people to visualize and build LLM apps. Continue can then be configured to use the `Flowise` LLM class, like the example here:
7+
8+<Tabs groupId="config-example">
9+ <TabItem value="yaml" label="YAML">
10+ ```yaml title="config.yaml"
11+ models:
12+ - name: Flowise
13+ provider: flowise
14+ model: <MODEL>
15+ apiBase: <API_BASE>
16+ ```
17+ </TabItem>
18+ <TabItem value="json" label="JSON">
19+ ```json title="config.json"
20+ {
21+ "models": [
22+ {
23+ "provider": "flowise",
24+ "title": "Flowise",
25+ "model": "<MODEL>",
26+ "apiBase": "<API_BASE>"
27+ }
28+ ]
29+ }
30+ ```
31+ </TabItem>
32+</Tabs>
33+
34+[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Flowise.ts)
added docs/docs/customize/model-providers/more/function-network.mdx +116 −0
@@ -0,0 +1,116 @@
1+---
2+title: Function Network
3+slug: ../function-network
4+---
5+
6+import TabItem from "@theme/TabItem";
7+import Tabs from "@theme/Tabs";
8+
9+# Function Network
10+
11+> Private, Affordable User-Owned AI
12+
13+:::info
14+
15+To get an API key, login to the Function Network Developer Platform. If you don't have an account, you can create one [here](https://www.function.network/join-waitlist).
16+
17+:::
18+
19+## Chat model
20+
21+Function Network supports a number of models for chat. We recommend using LLama 3.1 70b or Qwen2.5-Coder-32B-Instruct.
22+
23+<Tabs groupId="config-example">
24+ <TabItem value="yaml" label="YAML">
25+ ```yaml title="config.yaml"
26+ models:
27+ - name: Llama 3.1 70b
28+ provider: function-network
29+ model: meta/llama-3.1-70b-instruct
30+ apiKey: <YOUR_FUNCTION_NETWORK_API_KEY>
31+ roles:
32+ - chat
33+ ```
34+ </TabItem>
35+ <TabItem value="json" label="JSON">
36+ ```json title="config.json"
37+ {
38+ "models": [
39+ {
40+ "title": "Llama 3.1 70b",
41+ "provider": "function-network",
42+ "model": "meta/llama-3.1-70b-instruct",
43+ "apiKey": "<YOUR_FUNCTION_NETWORK_API_KEY>"
44+ }
45+ ]
46+ }
47+ ```
48+ </TabItem>
49+</Tabs>
50+
51+[Click here](https://docs.function.network/models-supported/chat-and-code-completion) to see a list of chat model providers.
52+
53+## Autocomplete model
54+
55+Function Network supports a number of models for autocomplete. We recommend using Llama 3.1 8b or Qwen2.5-Coder-1.5B.
56+
57+<Tabs groupId="config-example">
58+ <TabItem value="yaml" label="YAML">
59+ ```yaml title="config.yaml"
60+ models:
61+ - name: Deepseek Coder 6.7b
62+ provider: function-network
63+ model: thebloke/deepseek-coder-6.7b-base-awq
64+ apiKey: <YOUR_FUNCTION_NETWORK_API_KEY>
65+ roles:
66+ - autocomplete
67+ ```
68+ </TabItem>
69+ <TabItem value="json" label="JSON">
70+ ```json title="config.json"
71+ {
72+ "tabAutocompleteModel": {
73+ "title": "Deepseek Coder 6.7b",
74+ "provider": "function-network",
75+ "model": "thebloke/deepseek-coder-6.7b-base-awq",
76+ "apiKey": "<YOUR_FUNCTION_NETWORK_API_KEY>"
77+ }
78+ }
79+ ```
80+ </TabItem>
81+</Tabs>
82+
83+## Embeddings model
84+
85+Function Network supports a number of models for embeddings. We recommend using baai/bge-base-en-v1.5.
86+
87+<Tabs groupId="config-example">
88+ <TabItem value="yaml" label="YAML">
89+ ```yaml title="config.yaml"
90+ models:
91+ - name: BGE Base En
92+ provider: function-network
93+ model: baai/bge-base-en-v1.5
94+ apiKey: <YOUR_FUNCTION_NETWORK_API_KEY>
95+ roles:
96+ - embed
97+ ```
98+ </TabItem>
99+ <TabItem value="json" label="JSON">
100+ ```json title="config.json"
101+ {
102+ "embeddingsProvider": {
103+ "provider": "function-network",
104+ "model": "baai/bge-base-en-v1.5",
105+ "apiKey": "<YOUR_FUNCTION_NETWORK_API_KEY>"
106+ }
107+ }
108+ ```
109+ </TabItem>
110+</Tabs>
111+
112+[Click here](https://docs.function.network/models-supported/embeddings) to see a list of embeddings model providers.
113+
114+## Reranking model
115+
116+Function Network currently does not offer any reranking models.
added docs/docs/customize/model-providers/more/groq.mdx +41 −0
@@ -0,0 +1,41 @@
1+import TabItem from "@theme/TabItem";
2+import Tabs from "@theme/Tabs";
3+
4+# Groq
5+
6+:::info
7+Check if your chosen model is still supported by referring to the [model documentation](https://console.groq.com/docs/models). If a model has been deprecated, you may encounter a 404 error when attempting to use it.
8+:::
9+
10+Groq provides the fastest available inference for open-source language models, including the entire Llama 3.1 family.
11+
12+1. Obtain an API key [here](https://console.groq.com/keys)
13+2. Update your Continue config file like this:
14+
15+<Tabs groupId="config-example">
16+ <TabItem value="yaml" label="YAML">
17+ ```yaml title="config.yaml"
18+ models:
19+ - name: Llama 3.3 70b Versatile
20+ provider: groq
21+ model: llama-3.3-70b-versatile
22+ apiKey: <YOUR_GROQ_API_KEY>
23+ roles:
24+ - chat
25+ ```
26+ </TabItem>
27+ <TabItem value="json" label="JSON">
28+ ```json title="config.json"
29+ {
30+ "models": [
31+ {
32+ "title": "Llama 3.3 70b Versatile",
33+ "provider": "groq",
34+ "model": "llama-3.3-70b-versatile",
35+ "apiKey": "<YOUR_GROQ_API_KEY>"
36+ }
37+ ]
38+ }
39+ ```
40+ </TabItem>
41+</Tabs>
added docs/docs/customize/model-providers/more/huggingfaceinferenceapi.mdx +36 −0
@@ -0,0 +1,36 @@
1+import Tabs from "@theme/Tabs";
2+import TabItem from "@theme/TabItem";
3+
4+# HuggingFace Inference Endpoints
5+
6+Hugging Face Inference Endpoints are an easy way to setup instances of open-source language models on any cloud. Sign up for an account and add billing [here](https://huggingface.co/settings/billing), access the Inference Endpoints [here](https://ui.endpoints.huggingface.co), click on “New endpoint”, and fill out the form (e.g. select a model like [WizardCoder-Python-34B-V1.0](https://huggingface.co/WizardLM/WizardCoder-Python-34B-V1.0)), and then deploy your model by clicking “Create Endpoint”. Change `~/.continue/config.json` to look like this:
7+
8+<Tabs groupId="config-example">
9+ <TabItem value="yaml" label="YAML">
10+ ```yaml title="config.yaml"
11+ models:
12+ - name: Hugging Face Inference API
13+ provider: huggingface-inference-api
14+ model: MODEL_NAME
15+ apiKey: <YOUR_HF_TOKEN>
16+ apiBase: <YOUR_HF_INFERENCE_API_ENDPOINT_URL>
17+ ```
18+ </TabItem>
19+ <TabItem value="json" label="JSON">
20+ ```json title="config.json"
21+ {
22+ "models": [
23+ {
24+ "title": "Hugging Face Inference API",
25+ "provider": "huggingface-inference-api",
26+ "model": "MODEL_NAME",
27+ "apiKey": "<YOUR_HF_TOKEN>",
28+ "apiBase": "<YOUR_HF_INFERENCE_API_ENDPOINT_URL>"
29+ }
30+ ]
31+ }
32+ ```
33+ </TabItem>
34+</Tabs>
35+
36+[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/HuggingFaceInferenceAPI.ts)
added docs/docs/customize/model-providers/more/ipex_llm.mdx +66 −0
@@ -0,0 +1,66 @@
1+import TabItem from "@theme/TabItem";
2+import Tabs from "@theme/Tabs";
3+
4+# IPEX-LLM
5+
6+:::info
7+[**IPEX-LLM**](https://github.com/intel-analytics/ipex-llm) is a PyTorch library for running LLM on Intel CPU and GPU (e.g., local PC with iGPU, discrete GPU such as Arc A-Series, Flex and Max) with very low latency.
8+:::
9+
10+IPEX-LLM supports accelerated Ollama backend to be hosted on Intel GPU. Refer to [this guide](https://ipex-llm.readthedocs.io/en/latest/doc/LLM/Quickstart/ollama_quickstart.html) from IPEX-LLM official documentation about how to install and run Ollama serve accelerated by IPEX-LLM on Intel GPU. You can then configure Continue to use the IPEX-LLM accelerated `"ollama"` provider as follows:
11+
12+<Tabs groupId="config-example">
13+ <TabItem value="yaml" label="YAML">
14+ ```yaml title="config.yaml"
15+ models:
16+ - name: IPEX-LLM
17+ provider: ollama
18+ model: AUTODETECT
19+ ```
20+ </TabItem>
21+ <TabItem value="json" label="JSON">
22+ ```json title="config.json"
23+ {
24+ "models": [
25+ {
26+ "title": "IPEX-LLM",
27+ "provider": "ollama",
28+ "model": "AUTODETECT"
29+ }
30+ ]
31+ }
32+ ```
33+ </TabItem>
34+</Tabs>
35+
36+If you would like to reach the Ollama service from another machine, make sure you set or export the environment variable `OLLAMA_HOST=0.0.0.0` before executing the command `ollama serve`. Then, in the Continue configuration, set `'apiBase'` to correspond with the IP address / port of the remote machine. That is, Continue can be configured to be:
37+
38+<Tabs groupId="config-example">
39+ <TabItem value="yaml" label="YAML">
40+ ```yaml title="config.yaml"
41+ models:
42+ - name: IPEX-LLM
43+ provider: ollama
44+ model: AUTODETECT
45+ apiBase: http://your-ollama-service-ip:11434
46+ ```
47+ </TabItem>
48+ <TabItem value="json" label="JSON">
49+ ```json title="config.json"
50+ {
51+ "models": [
52+ {
53+ "title": "IPEX-LLM",
54+ "provider": "ollama",
55+ "model": "AUTODETECT",
56+ "apiBase": "http://your-ollama-service-ip:11434"
57+ }
58+ ]
59+ }
60+ ```
61+ </TabItem>
62+</Tabs>
63+
64+:::tip
65+If you would like to preload the model before your first conversation with that model in Continue, you could refer to [here](https://ipex-llm.readthedocs.io/en/latest/doc/LLM/Quickstart/continue_quickstart.html#pull-and-prepare-the-model) for more information.
66+:::
added docs/docs/customize/model-providers/more/kindo.mdx +69 −0
@@ -0,0 +1,69 @@
1+import TabItem from "@theme/TabItem";
2+import Tabs from "@theme/Tabs";
3+
4+# Kindo
5+
6+Kindo offers centralized control over your organization's AI operations, ensuring data protection and compliance with internal policies while supporting various commercial and open-source models. To get started, sign up [here](https://app.kindo.ai/), create an API key in [Settings > API > API Keys](https://app.kindo.ai/settings/api), and choose a model from the list of supported models in the "Available Models" tab or copy and paste the config in [Plugins > Your Configuration](https://app.kindo.ai/plugins).
7+
8+## Config Example
9+
10+<Tabs groupId="config-example">
11+ <TabItem value="yaml" label="YAML">
12+ ```yaml title="config.yaml"
13+ models:
14+ - name: Claude 3.5 Sonnet
15+ provider: kindo
16+ model: claude-3-5-sonnet
17+ apiKey: <YOUR_KINDO_API_KEY>
18+ ```
19+ </TabItem>
20+ <TabItem value="json" label="JSON">
21+ ```json title="config.json"
22+ {
23+ "models": [
24+ {
25+ "title": "Claude 3.5 Sonnet",
26+ "provider": "kindo",
27+ "model": "claude-3-5-sonnet",
28+ "apiKey": "<YOUR_KINDO_API_KEY>"
29+ }
30+ ]
31+ }
32+ ```
33+ </TabItem>
34+</Tabs>
35+
36+## Tab Autocomplete Config Example
37+
38+<Tabs groupId="config-example">
39+ <TabItem value="yaml" label="YAML">
40+ ```yaml title="config.yaml"
41+ models:
42+ - name: WhiteRabbitNeo
43+ provider: kindo
44+ model: /models/WhiteRabbitNeo-33B-DeepSeekCoder
45+ apiKey: <YOUR_KINDO_API_KEY>
46+ roles:
47+ - autocomplete
48+ ```
49+ </TabItem>
50+ <TabItem value="json" label="JSON">
51+ ```json title="config.json"
52+ {
53+ "tabAutocompleteModel": [
54+ {
55+ "title": "WhiteRabbitNeo",
56+ "provider": "kindo",
57+ "model": "/models/WhiteRabbitNeo-33B-DeepSeekCoder",
58+ "apiKey": "<YOUR_KINDO_API_KEY>",
59+ "template": "none"
60+ }
61+ ]
62+ }
63+ ```
64+ </TabItem>
65+</Tabs>
66+
67+## Security
68+
69+To update your organization's model access, adjust the controls in [security settings](https://app.kindo.ai/security-settings).
added docs/docs/customize/model-providers/more/llamacpp.mdx +40 −0
@@ -0,0 +1,40 @@
1+import TabItem from "@theme/TabItem";
2+import Tabs from "@theme/Tabs";
3+
4+# LlamaCpp
5+
6+Run the llama.cpp server binary to start the API server. If running on a remote server, be sure to set host to 0.0.0.0:
7+
8+```bash
9+.\server.exe -c 4096 --host 0.0.0.0 -t 16 --mlock -m models\meta\llama\codellama-7b-instruct.Q8_0.gguf
10+```
11+
12+After it's up and running, change `~/.continue/config.json` to look like this:
13+
14+<Tabs groupId="config-example">
15+ <TabItem value="yaml" label="YAML">
16+ ```yaml title="config.yaml"
17+ models:
18+ - name: Llama CPP
19+ provider: llama.cpp
20+ model: MODEL_NAME
21+ apiBase: http://localhost:8080
22+ ```
23+ </TabItem>
24+ <TabItem value="json" label="JSON">
25+ ```json title="config.json"
26+ {
27+ "models": [
28+ {
29+ "title": "Llama CPP",
30+ "provider": "llama.cpp",
31+ "model": "MODEL_NAME",
32+ "apiBase": "http://localhost:8080"
33+ }
34+ ]
35+ }
36+ ```
37+ </TabItem>
38+</Tabs>
39+
40+[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/LlamaCpp.ts)
added docs/docs/customize/model-providers/more/llamafile.mdx +32 −0
@@ -0,0 +1,32 @@
1+import Tabs from "@theme/Tabs";
2+import TabItem from "@theme/TabItem";
3+
4+# Llamafile
5+
6+A [llamafile](https://github.com/Mozilla-Ocho/llamafile#readme) is a self-contained binary that can run an open-source LLM. You can configure this provider in your config.json as follows:
7+
8+<Tabs groupId="config-example">
9+ <TabItem value="yaml" label="YAML">
10+ ```yaml title="config.yaml"
11+ models:
12+ - name: Llamafile
13+ provider: llamafile
14+ model: mistral-7b
15+ ```
16+ </TabItem>
17+ <TabItem value="json" label="JSON">
18+ ```json title="config.json"
19+ {
20+ "models": [
21+ {
22+ "title": "Llamafile",
23+ "provider": "llamafile",
24+ "model": "mistral-7b"
25+ }
26+ ]
27+ }
28+ ```
29+ </TabItem>
30+</Tabs>
31+
32+[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Llamafile.ts)
added docs/docs/customize/model-providers/more/lmstudio.mdx +88 −0
@@ -0,0 +1,88 @@
1+import TabItem from "@theme/TabItem";
2+import Tabs from "@theme/Tabs";
3+
4+# LM Studio
5+
6+[LM Studio](https://lmstudio.ai) is an application for Mac, Windows, and Linux that makes it easy to locally run open-source models and comes with a great UI. To get started with LM Studio, download from the website, use the UI to download a model, and then start the local inference server. Continue can then be configured to use the `LMStudio` LLM class:
7+
8+<Tabs groupId="config-example">
9+ <TabItem value="yaml" label="YAML">
10+ ```yaml title="config.yaml"
11+ models:
12+ - name: LM Studio
13+ provider: lmstudio
14+ model: llama2-7b
15+ ```
16+ </TabItem>
17+ <TabItem value="json" label="JSON">
18+ ```json title="config.json"
19+ {
20+ "models": [
21+ {
22+ "title": "LM Studio",
23+ "provider": "lmstudio",
24+ "model": "llama2-7b"
25+ }
26+ ]
27+ }
28+ ```
29+ </TabItem>
30+</Tabs>
31+
32+### Embeddings model
33+
34+LMStudio supports embeddings endpoints, and comes with the `nomic-ai/nomic-embed-text-v1.5-GGUF` model (as of Nov 2024, check your models)
35+
36+<Tabs groupId="config-example">
37+ <TabItem value="yaml" label="YAML">
38+ ```yaml title="config.yaml"
39+ models:
40+ - name: Nomic Embed Text
41+ provider: lmstudio
42+ model: nomic-ai/nomic-embed-text-v1.5-GGUF
43+ roles:
44+ - embed
45+ ```
46+ </TabItem>
47+ <TabItem value="json" label="JSON">
48+ ```json title="config.json"
49+ {
50+ "embeddingsProvider": {
51+ "provider": "lmstudio",
52+ "model": "nomic-ai/nomic-embed-text-v1.5-GGUF"
53+ }
54+ }
55+ ```
56+ </TabItem>
57+</Tabs>
58+
59+## Setting up a remote instance
60+
61+To configure a remote instance of LM Studio, add the `"apiBase"` property to your model in config.json:
62+
63+<Tabs groupId="config-example">
64+ <TabItem value="yaml" label="YAML">
65+ ```yaml title="config.yaml"
66+ models:
67+ - name: Nomic Embed Text
68+ provider: lmstudio
69+ model: nomic-ai/nomic-embed-text-v1.5-GGUF
70+ roles:
71+ - embed
72+ ```
73+ </TabItem>
74+ <TabItem value="json" label="JSON">
75+ ```json title="config.json"
76+ {
77+ "embeddingsProvider": {
78+ "provider": "lmstudio",
79+ "model": "nomic-ai/nomic-embed-text-v1.5-GGUF"
80+ }
81+ }
82+ ```
83+ </TabItem>
84+</Tabs>
85+
86+This `apiBase` will now be used instead of the default `http://localhost:1234/v1`.
87+
88+[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/LMStudio.ts)
added docs/docs/customize/model-providers/more/moonshot.mdx +94 −0
@@ -0,0 +1,94 @@
1+import TabItem from "@theme/TabItem";
2+import Tabs from "@theme/Tabs";
3+
4+# Moonshot
5+
6+[Moonshot AI](https://platform.moonshot.cn/) provides high-quality large language model services with competitive pricing and excellent performance.
7+
8+## Configuration
9+
10+To use Moonshot AI models, you need to:
11+
12+1. Get an API key from [Moonshot AI Platform](https://platform.moonshot.cn/)
13+2. Add the following configuration:
14+
15+<Tabs groupId="config-example">
16+ <TabItem value="yaml" label="YAML">
17+ ```yaml title="config.yaml"
18+ models:
19+ - name: Moonshot
20+ provider: moonshot
21+ model: moonshot-v1-8k
22+ apiKey: <YOUR_MOONSHOT_API_KEY>
23+ ```
24+ </TabItem>
25+ <TabItem value="json" label="JSON">
26+ ```json title="config.json"
27+ {
28+ "models": [
29+ {
30+ "title": "Moonshot",
31+ "provider": "moonshot",
32+ "model": "moonshot-v1-8k",
33+ "apiKey": "<YOUR_MOONSHOT_API_KEY>"
34+ }
35+ ]
36+ }
37+ ```
38+ </TabItem>
39+</Tabs>
40+
41+## Available Models
42+
43+Moonshot AI currently provides the following models:
44+
45+- `moonshot-v1-8k`: Base model with 8K context window
46+- `moonshot-v1-32k`: Base model with 32K context window
47+- `moonshot-v1-128k`: Base model with 128K context window
48+
49+## Configuration Options
50+
51+| Option | Description | Default |
52+| --------- | ----------------- | ----------------------------- |
53+| `apiKey` | Moonshot API key | Required |
54+| `apiBase` | API base URL | `https://api.moonshot.cn/v1/` |
55+| `model` | Model name to use | `moonshot-v1-8k` |
56+
57+## Example
58+
59+Here's a complete configuration example:
60+
61+<Tabs groupId="config-example">
62+ <TabItem value="yaml" label="YAML">
63+ ```yaml title="config.yaml"
64+ models:
65+ - name: Moonshot-8K
66+ provider: moonshot
67+ model: moonshot-v1-8k
68+ apiKey: <YOUR_MOONSHOT_API_KEY>
69+ defaultCompletionOptions:
70+ temperature: 0.7
71+ topP: 0.95
72+ maxTokens: 2048
73+ ```
74+ </TabItem>
75+ <TabItem value="json" label="JSON">
76+ ```json title="config.json"
77+ {
78+ "models": [
79+ {
80+ "title": "Moonshot-8K",
81+ "provider": "moonshot",
82+ "model": "moonshot-v1-8k",
83+ "apiKey": "<YOUR_MOONSHOT_API_KEY>",
84+ "completionOptions": {
85+ "temperature": 0.7,
86+ "topP": 0.95,
87+ "maxTokens": 2048
88+ }
89+ }
90+ ]
91+ }
92+ ```
93+ </TabItem>
94+</Tabs>
added docs/docs/customize/model-providers/more/morph.mdx +112 −0
@@ -0,0 +1,112 @@
1+import Tabs from "@theme/Tabs";
2+import TabItem from "@theme/TabItem";
3+
4+# Morph
5+
6+Morph provides a fast apply model that helps you quickly and accurately apply code changes from chat suggestions to your files. It's optimized for speed and precision when integrating generated code into your existing codebase. You can sign up for Morph's generous free tier [here](https://morphllm.com/dashboard). Then, update your configuration file as follows:
7+
8+<Tabs groupId="config-example">
9+ <TabItem value="yaml" label="YAML">
10+ ```yaml title="config.yaml"
11+ models:
12+ - uses: morphllm/morph-v0
13+ with:
14+ MORPH_API_KEY: ${{ secrets.MORPH_API_KEY }}
15+```
16+or
17+```yaml title="config.yaml"
18+ - name: Morph Fast Apply
19+ provider: openai
20+ model: morph-v2
21+ apiKey: <YOUR_MORPH_API_KEY>
22+ apiBase: https://api.morphllm.com/v1/
23+ roles:
24+ - apply
25+ promptTemplates:
26+ apply: "<code>{{{ original_code }}}</code>\n<update>{{{ new_code }}}</update>"
27+ ```
28+ </TabItem>
29+ <TabItem value="json" label="JSON">
30+ ```json title="config.json"
31+ {
32+ "models": [
33+ {
34+ "title": "Morph Fast Apply",
35+ "provider": "openai",
36+ "model": "morph-v2",
37+ "apiKey": "<YOUR_MORPH_API_KEY>",
38+ "apiBase": "https://api.morphllm.com/v1/",
39+ "roles": ["apply"],
40+ "promptTemplates": {
41+ "apply": "<code>{{{ original_code }}}</code>\n<update>{{{ new_code }}}</update>"
42+ }
43+ }
44+ ]
45+ }
46+ ```
47+ </TabItem>
48+</Tabs>
49+
50+## Embeddings model
51+
52+We recommend configuring **morph-embedding-v2** as your embeddings model.
53+
54+<Tabs groupId="config-example">
55+ <TabItem value="yaml" label="YAML">
56+ ```yaml title="config.yaml"
57+ models:
58+ - name: Morph Embeddings
59+ provider: openai
60+ model: morph-embedding-v2
61+ apiKey: <YOUR_MORPH_API_KEY>
62+ apiBase: https://api.morphllm.com/v1/
63+ roles:
64+ - embed
65+ ```
66+ </TabItem>
67+ <TabItem value="json" label="JSON">
68+ ```json title="config.json"
69+ {
70+ "embeddingsProvider": {
71+ "provider": "openai",
72+ "model": "morph-embedding-v2",
73+ "apiKey": "<YOUR_MORPH_API_KEY>",
74+ "apiBase": "https://api.morphllm.com/v1/"
75+ }
76+ }
77+ ```
78+ </TabItem>
79+</Tabs>
80+
81+## Reranking model
82+
83+We recommend configuring **morph-rerank-v2** as your reranking model.
84+
85+<Tabs groupId="config-example">
86+ <TabItem value="yaml" label="YAML">
87+ ```yaml title="config.yaml"
88+ models:
89+ - name: Morph Reranker
90+ provider: cohere
91+ model: morph-rerank-v2
92+ apiKey: <YOUR_MORPH_API_KEY>
93+ apiBase: https://api.morphllm.com/v1/
94+ roles:
95+ - rerank
96+ ```
97+ </TabItem>
98+ <TabItem value="json" label="JSON">
99+ ```json title="config.json"
100+ {
101+ "reranker": {
102+ "name": "cohere",
103+ "params": {
104+ "model": "morph-rerank-v2",
105+ "apiKey": "<YOUR_MORPH_API_KEY>",
106+ "apiBase": "https://api.morphllm.com/v1/"
107+ }
108+ }
109+ }
110+ ```
111+ </TabItem>
112+</Tabs>
added docs/docs/customize/model-providers/more/msty.mdx +79 −0
@@ -0,0 +1,79 @@
1+import TabItem from "@theme/TabItem";
2+import Tabs from "@theme/Tabs";
3+
4+# Msty
5+
6+[Msty](https://msty.app/) is an application for Windows, Mac, and Linux that makes it really easy to run online as well as local open-source models, including Llama-2, DeepSeek Coder, etc. No need to fidget with your terminal, run a command, or anything. Just download the app from the website, click a button, and you are up and running. Continue can then be configured to use the `Msty` LLM class:
7+
8+<Tabs groupId="config-example">
9+ <TabItem value="yaml" label="YAML">
10+ ```yaml title="config.yaml"
11+ models:
12+ - name: Msty
13+ provider: msty
14+ model: deepseek-coder:6.7b
15+ ```
16+ </TabItem>
17+ <TabItem value="json" label="JSON">
18+ ```json title="config.json"
19+ {
20+ "models": [
21+ {
22+ "title": "Msty",
23+ "provider": "msty",
24+ "model": "deepseek-coder:6.7b",
25+ }
26+ ]
27+ }
28+ ```
29+ </TabItem>
30+</Tabs>
31+
32+## Completion Options
33+
34+In addition to the model type, you can also configure some of the parameters that Msty uses to run the model.
35+
36+- temperature: options.temperature - This is a parameter that controls the randomness of the generated text. Higher values result in more creative but potentially less coherent outputs, while lower values lead to more predictable and focused outputs.
37+- top_p: options.topP - This sets a threshold (between 0 and 1) to control how diverse the predicted tokens should be. The model generates tokens that are likely according to their probability distribution, but also considers the top-k most probable tokens.
38+- top_k: options.topK - This parameter limits the number of unique tokens to consider when generating the next token in the sequence. Higher values increase the variety of generated sequences, while lower values lead to more focused outputs.
39+- num_predict: options.maxTokens - This determines the maximum number of tokens (words or characters) to generate for the given input prompt.
40+- num_thread: options.numThreads - This is the multi-threading configuration option that controls how many threads the model uses for parallel processing. Higher values may lead to faster generation times but could also increase memory usage and complexity. Set this to one or two lower than the number of threads your CPU can handle to leave some for your GUI when running the model locally.
41+- use_mmap: options.useMmap - For Ollama, this parameter allows the model to be mapped into memory. If disabled can enhance response time on low end devices but will slow down the stream.
42+
43+## Authentication
44+
45+If you need to send custom headers for authentication, you may use the `requestOptions.headers` property like this:
46+
47+<Tabs groupId="config-example">
48+ <TabItem value="yaml" label="YAML">
49+ ```yaml title="config.yaml"
50+ models:
51+ - name: Msty
52+ provider: msty
53+ model: deepseek-coder:6.7b
54+ requestOptions:
55+ headers:
56+ Authorization: Bearer xxx
57+ ```
58+ </TabItem>
59+ <TabItem value="json" label="JSON">
60+ ```json title="config.json"
61+ {
62+ "models": [
63+ {
64+ "title": "Msty",
65+ "provider": "msty",
66+ "model": "deepseek-coder:6.7b",
67+ "requestOptions": {
68+ "headers": {
69+ "Authorization": "Bearer xxx"
70+ }
71+ }
72+ }
73+ ]
74+ }
75+ ```
76+ </TabItem>
77+</Tabs>
78+
79+[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Msty.ts)
added docs/docs/customize/model-providers/more/ncompass.mdx +34 −0
@@ -0,0 +1,34 @@
1+import Tabs from "@theme/Tabs";
2+import TabItem from "@theme/TabItem";
3+
4+# nCompass
5+
6+The nCompass Technologies API exposes an extremely fast inference engine for open-source language models. You can sign up [here](https://app.ncompass.tech/api-settings), copy your API key on the initial welcome screen, and then hit the play button on any model from the [nCompass Models list](https://ncompass.tech/models). Change `~/.continue/config.json` to look like this:
7+
8+<Tabs groupId="config-example">
9+ <TabItem value="yaml" label="YAML">
10+ ```yaml title="Package or config.yaml"
11+ models:
12+ - name: Ncompass Gemma 3 Coder
13+ provider: ncompass
14+ model: google/gemma-3-27b-it
15+ apiKey: <YOUR_NCOMPASS_API_KEY>
16+ ```
17+ </TabItem>
18+ <TabItem value="json" label="JSON">
19+ ```json title="config.json"
20+ {
21+ "models": [
22+ {
23+ "title": "Ncompass Gemma 3 Coder",
24+ "provider": "ncompass",
25+ "model": "google/gemma-3-27b-it",
26+ "apiKey": "<YOUR_NCOMPASS_API_KEY>"
27+ }
28+ ]
29+ }
30+ ```
31+ </TabItem>
32+</Tabs>
33+
34+[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/NCompass.ts)
added docs/docs/customize/model-providers/more/nebius.mdx +67 −0
@@ -0,0 +1,67 @@
1+import TabItem from "@theme/TabItem";
2+import Tabs from "@theme/Tabs";
3+
4+# Nebius AI Studio
5+
6+You can get an API key from the [Nebius AI Studio API keys page](https://studio.nebius.ai/settings/api-keys)
7+
8+## Availible models
9+
10+Available models can be found on the [Nebius AI Studio models page](https://studio.nebius.ai/models/text2text)
11+
12+## Chat model
13+
14+<Tabs groupId="config-example">
15+ <TabItem value="yaml" label="YAML">
16+ ```yaml title="config.yaml"
17+ models:
18+ - name: DeepSeek R1
19+ provider: nebius
20+ model: deepseek-ai/DeepSeek-R1
21+ apiKey: <YOUR_NEBIUS_API_KEY>
22+ ```
23+ </TabItem>
24+ <TabItem value="json" label="JSON">
25+ ```json title="config.json"
26+ {
27+ "models": [
28+ {
29+ "title": "DeepSeek R1",
30+ "provider": "nebius",
31+ "model": "deepseek-ai/DeepSeek-R1",
32+ "apiKey": "<YOUR_NEBIUS_API_KEY>"
33+ }
34+ ]
35+ }
36+ ```
37+ </TabItem>
38+</Tabs>
39+
40+## Embeddings model
41+
42+Available models can be found on the [Nebius AI Studio embeddings page](https://studio.nebius.ai/models/embedding)
43+
44+<Tabs groupId="config-example">
45+ <TabItem value="yaml" label="YAML">
46+ ```yaml title="config.yaml"
47+ models:
48+ - name: BAAI Embedder
49+ provider: nebius
50+ model: BAAI/bge-en-icl
51+ apiKey: <YOUR_NEBIUS_API_KEY>
52+ roles:
53+ - embed
54+ ```
55+ </TabItem>
56+ <TabItem value="json" label="JSON">
57+ ```json title="config.json"
58+ {
59+ "embeddingsProvider": {
60+ "provider": "nebius",
61+ "model": "BAAI/bge-en-icl",
62+ "apiKey": "<YOUR_NEBIUS_API_KEY>"
63+ }
64+ }
65+ ```
66+ </TabItem>
67+</Tabs>
added docs/docs/customize/model-providers/more/novita.mdx +34 −0
@@ -0,0 +1,34 @@
1+import TabItem from "@theme/TabItem";
2+import Tabs from "@theme/Tabs";
3+
4+# Novita
5+
6+[Novita AI](https://novita.ai?utm_source=github_continuedev&utm_medium=github_readme&utm_campaign=github_link) offers an affordable, reliable, and simple inference platform with scalable [LLM API](https://novita.ai/docs/model-api/reference/introduction.html), empowering developers to build AI applications. Try the [Novita AI Llama 3 API Demo](https://novita.ai/model-api/product/llm-api/playground/meta-llama-llama-3.1-70b-instruct?utm_source=github_continuedev&utm_medium=github_readme&utm_campaign=github_link) today!. You can sign up [here](https://novita.ai/user/login?&redirect=/&utm_source=github_continuedev&utm_medium=github_readme&utm_campaign=github_link), copy your API key on the [Key Management](https://novita.ai/settings/key-management?utm_source=github_continuedev&utm_medium=github_readme&utm_campaign=github_link), and then hit the play button on any model from the [Novita AI Models list](https://novita.ai/llm-api?utm_source=github_continuedev&utm_medium=github_readme&utm_campaign=github_link). Change `~/.continue/config.json` to look like this:
7+
8+<Tabs groupId="config-example">
9+ <TabItem value="yaml" label="YAML">
10+ ```yaml title="config.yaml"
11+ models:
12+ - name: Llama 3.1 8B
13+ provider: novita
14+ model: meta-llama/llama-3.1-8b-instruct
15+ apiKey: <YOUR_NOVITA_API_KEY>
16+ ```
17+ </TabItem>
18+ <TabItem value="json" label="JSON">
19+ ```json title="config.json"
20+ {
21+ "models": [
22+ {
23+ "title": "Llama 3.1 8B",
24+ "provider": "novita",
25+ "model": "meta-llama/llama-3.1-8b-instruct",
26+ "apiKey": "<YOUR_NOVITA_API_KEY>"
27+ }
28+ ]
29+ }
30+ ```
31+ </TabItem>
32+</Tabs>
33+
34+[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Novita.ts)
added docs/docs/customize/model-providers/more/nvidia.mdx +81 −0
@@ -0,0 +1,81 @@
1+---
2+title: NVIDIA
3+---
4+
5+import TabItem from "@theme/TabItem";
6+import Tabs from "@theme/Tabs";
7+
8+:::info
9+[View the docs](https://docs.nvidia.com/nim/large-language-models/latest/getting-started.html#option-1-from-api-catalog) to learn how to get an API key.
10+:::
11+
12+## Chat model
13+
14+We recommend configuring **Nemotron-4-340B-Instruct** as your chat model.
15+
16+<Tabs groupId="config-example">
17+ <TabItem value="yaml" label="YAML">
18+ ```yaml title="config.yaml"
19+ models:
20+ - name: Nemotron-4-340B-Instruct
21+ provider: nvidia
22+ model: nvidia-nemotron-4-340b-instruct
23+ apiKey: <YOUR_NVIDIA_API_KEY>
24+ ```
25+ </TabItem>
26+ <TabItem value="json" label="JSON">
27+ ```json title="config.json"
28+ {
29+ "models": [
30+ {
31+ "title": "Nemotron-4-340B-Instruct",
32+ "provider": "nvidia",
33+ "model": "nvidia-nemotron-4-340b-instruct",
34+ "apiKey": "<YOUR_NVIDIA_API_KEY>"
35+ }
36+ ]
37+ }
38+ ```
39+ </TabItem>
40+</Tabs>
41+
42+## Autocomplete model
43+
44+NVIDIA currently does not offer any autocomplete models.
45+
46+[Click here](../../model-roles/autocomplete.md) to see a list of autocomplete model providers.
47+
48+## Embeddings model
49+
50+We recommend configuring **NVIDIA Retrieval QA Mistral 7B** as your embeddings model.
51+
52+<Tabs groupId="config-example">
53+ <TabItem value="yaml" label="YAML">
54+ ```yaml title="config.yaml"
55+ models:
56+ - name: Nvidia Embedder
57+ provider: nvidia
58+ model: nvidia/nv-embedqa-mistral-7b-v2
59+ apiKey: <YOUR_NVIDIA_API_KEY>
60+ roles:
61+ - embed
62+ ```
63+ </TabItem>
64+ <TabItem value="json" label="JSON">
65+ ```json title="config.json"
66+ {
67+ "embeddingsProvider": {
68+ "provider": "nvidia",
69+ "model": "nvidia/nv-embedqa-mistral-7b-v2",
70+ "apiKey": "<YOUR_NVIDIA_API_KEY>"
71+ }
72+ }
73+ ```
74+ </TabItem>
75+</Tabs>
76+
77+## Reranking model
78+
79+NVIDIA currently does not offer any reranking models.
80+
81+[Click here](../../model-roles/reranking.mdx) to see a list of reranking model providers.
added docs/docs/customize/model-providers/more/openrouter.mdx +74 −0
@@ -0,0 +1,74 @@
1+import TabItem from "@theme/TabItem";
2+import Tabs from "@theme/Tabs";
3+
4+# OpenRouter
5+
6+OpenRouter is a unified interface for commercial and open-source models, giving you access to the best models at the best prices. You can sign up [here](https://openrouter.ai/signup), create your API key on the [keys page](https://openrouter.ai/keys), and then choose a model from the [list of supported models](https://openrouter.ai/models).
7+
8+Change `~/.continue/config.json` to look like the following.
9+
10+<Tabs groupId="config-example">
11+ <TabItem value="yaml" label="YAML">
12+ ```yaml title="config.yaml"
13+ models:
14+ - name: OpenRouter LLaMA 70 8B
15+ provider: openrouter
16+ model: meta-llama/llama-3-70b-instruct
17+ apiBase: https://openrouter.ai/api/v1
18+ apiKey: <YOUR_OPEN_ROUTER_API_KEY>
19+ ```
20+ </TabItem>
21+ <TabItem value="json" label="JSON">
22+ ```json title="config.json"
23+ {
24+ "models": [
25+ {
26+ "title": "OpenRouter LLaMA 70 8B",
27+ "provider": "openrouter",
28+ "model": "meta-llama/llama-3-70b-instruct",
29+ "apiBase": "https://openrouter.ai/api/v1",
30+ "apiKey": "<YOUR_OPEN_ROUTER_API_KEY>"
31+ }
32+ ]
33+ }
34+ ```
35+ </TabItem>
36+</Tabs>
37+
38+To utilize features such as provider preferences or model routing configuration, include these parameters inside the `models[].requestsOptions.extraBodyProperties` field of your plugin config.
39+
40+For example, to prevent extra long prompts from being compressed, you can explicitly turn off the feature like so:
41+
42+<Tabs groupId="config-example">
43+ <TabItem value="yaml" label="YAML">
44+ ```yaml title="config.yaml"
45+ models:
46+ - name: Example Model
47+ provider: exampleProvider
48+ model: example-model
49+ requestOptions:
50+ extraBodyProperties:
51+ transforms: []
52+ ```
53+ </TabItem>
54+ <TabItem value="json" label="JSON">
55+ ```json title="config.json"
56+ {
57+ "models": [
58+ {
59+ "title": "Example Model",
60+ "provider": "exampleProvider",
61+ "model": "example-model",
62+ "requestOptions": {
63+ "extraBodyProperties": {
64+ "transforms": []
65+ }
66+ }
67+ }
68+ ]
69+ }
70+ ```
71+ </TabItem>
72+</Tabs>
73+
74+Learn more about available settings [here](https://openrouter.ai/docs).
added docs/docs/customize/model-providers/more/openvino_model_server.mdx +29 −0
@@ -0,0 +1,29 @@
1+# OpenVINO™ Model Server
2+
3+:::info
4+[**OpenVINO™ Mode Server**](https://github.com/openvinotoolkit/model_server) is scalable inference server for models optimized with OpenVINO™ for Intel CPU, iGPU, GPU and NPU.
5+:::
6+
7+OpenVINO™ Mode Server supports text generation via OpenAI Chat Completions API. Simply select OpenAI provider to point `apiBase` to running OVMS instance. Refer [to this demo](https://docs.openvino.ai/2025/model-server/ovms_demos_code_completion_vsc.html) on official OVMS documentation to easily set up your own local server.
8+
9+Example configuration once OVMS is launched:
10+
11+```yaml title="config.yaml"
12+models:
13+ - name: OVMS CodeLlama-7b-Instruct-hf
14+ provider: openai
15+ model: codellama/CodeLlama-7b-Instruct-hf
16+ apiKey: unused
17+ apiBase: http://localhost:5555/v3
18+ roles:
19+ - chat
20+ - edit
21+ - apply
22+ - name: OVMS Qwen2.5-Coder-1.5B
23+ provider: openai
24+ model: Qwen/Qwen2.5-Coder-1.5B
25+ apiKey: unused
26+ apiBase: http://localhost:5555/v3
27+ roles:
28+ - autocomplete
29+```
added docs/docs/customize/model-providers/more/ovhcloud.mdx +72 −0
@@ -0,0 +1,72 @@
1+---
2+title: OVHcloud AI Endpoints
3+---
4+
5+import TabItem from "@theme/TabItem";
6+import Tabs from "@theme/Tabs";
7+
8+OVHcloud AI Endpoints is a serverless inference API that provides access to a curated selection of models (e.g., Llama, Mistral, Qwen, Deepseek). It is designed with security and data privacy in mind and is compliant with GDPR.
9+
10+:::info
11+To get started, create an API key on the OVHcloud [AI Endpoints website](https://endpoints.ai.cloud.ovh.net/). For more information, including pricing, visit the OVHcloud [AI Endpoints product page](https://www.ovhcloud.com/en/public-cloud/ai-endpoints/).
12+:::
13+
14+## Chat model
15+
16+We recommend configuring **Qwen2.5-Coder-32B-Instruct** as your chat model.
17+Check our [catalog](https://endpoints.ai.cloud.ovh.net/catalog) to see all of our models hsoted on AI Endpoints.
18+
19+<Tabs groupId="config-example">
20+ <TabItem value="yaml" label="YAML">
21+ ```yaml title="config.yaml"
22+ models:
23+ - name: Qwen2.5-Coder-32B-Instruct
24+ provider: ovhcloud
25+ model: qwen2.5-coder-32b
26+ apiKey: <YOUR_AIENDPOINTS_API_KEY>
27+ ```
28+ </TabItem>
29+ <TabItem value="json" label="JSON">
30+ ```json title="config.json"
31+ {
32+ "models": [
33+ {
34+ "title": "Qwen2.5-Coder-32B-Instruct",
35+ "provider": "ovhcloud",
36+ "model": "qwen2.5-coder-32b",
37+ "apiKey": "<YOUR_AIENDPOINTS_API_KEY>"
38+ }
39+ ]
40+ }
41+ ```
42+ </TabItem>
43+</Tabs>
44+
45+## Embeddings model
46+
47+We recommend configuring **bge-multilingual-gemma2** as your embeddings model.
48+
49+<Tabs groupId="config-example">
50+ <TabItem value="yaml" label="YAML">
51+ ```yaml title="config.yaml"
52+ models:
53+ - name: BGE Multilingual Gemma2
54+ provider: ovhcloud
55+ model: bge-multilingual-gemma2
56+ apiKey: <YOUR_AIENDPOINTS_API_KEY>
57+ roles:
58+ - embed
59+ ```
60+ </TabItem>
61+ <TabItem value="json" label="JSON">
62+ ```json title="config.json"
63+ {
64+ "embeddingsProvider": {
65+ "provider": "ovhcloud",
66+ "model": "bge-multilingual-gemma2",
67+ "apiKey": "<YOUR_AIENDPOINTS_API_KEY>"
68+ }
69+ }
70+ ```
71+ </TabItem>
72+</Tabs>
added docs/docs/customize/model-providers/more/relace.mdx +38 −0
@@ -0,0 +1,38 @@
1+import Tabs from "@theme/Tabs";
2+import TabItem from "@theme/TabItem";
3+
4+# Relace
5+
6+Relace provides a fast apply model through their API that helps you reliably and almost instantly apply chat suggestions to your codebase. You can sign up and obtain an API key [here](https://app.relace.ai/settings/api-keys). Then, change your configuration file to look like this:
7+
8+<Tabs groupId="config-example">
9+ <TabItem value="yaml" label="YAML">
10+ ```yaml title="Package or config.yaml"
11+ models:
12+ - name: Relace Fast Apply
13+ provider: relace
14+ model: Fast-Apply
15+ apiKey: <YOUR_RELACE_API_KEY>
16+ roles:
17+ - apply
18+ promptTemplates:
19+ apply: "{{{ new_code }}}"
20+ ```
21+ </TabItem>
22+ <TabItem value="json" label="JSON">
23+ ```json title="config.json"
24+ {
25+ "models": [
26+ {
27+ "title": "Relace Fast Apply",
28+ "provider": "relace",
29+ "model": "Fast-Apply",
30+ "apiKey": "<YOUR_RELACE_API_KEY>"
31+ }
32+ ]
33+ }
34+ ```
35+ </TabItem>
36+</Tabs>
37+
38+[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Relace.ts)
added docs/docs/customize/model-providers/more/replicatellm.mdx +36 −0
@@ -0,0 +1,36 @@
1+import TabItem from "@theme/TabItem";
2+import Tabs from "@theme/Tabs";
3+
4+# ReplicateLLM
5+
6+Replicate is a great option for newly released language models or models that you've deployed through their platform. Sign up for an account [here](https://replicate.ai/), copy your API key, and then select any model from the [Replicate Streaming List](https://replicate.com/collections/streaming-language-models). Change `~/.continue/config.json` to look like this:
7+
8+<Tabs groupId="config-example">
9+ <TabItem value="yaml" label="YAML">
10+ ```yaml title="config.yaml"
11+ models:
12+ - name: Replicate CodeLLama
13+ provider: replicate
14+ model: codellama-13b
15+ apiKey: <YOUR_REPLICATE_API_KEY>
16+ ```
17+ </TabItem>
18+ <TabItem value="json" label="JSON">
19+ ```json title="config.json"
20+ {
21+ "models": [
22+ {
23+ "title": "Replicate CodeLLama",
24+ "provider": "replicate",
25+ "model": "codellama-13b",
26+ "apiKey": "<YOUR_REPLICATE_API_KEY>"
27+ }
28+ ]
29+ }
30+ ```
31+ </TabItem>
32+</Tabs>
33+
34+If you don't specify the `model` parameter, it will default to `replicate/llama-2-70b-chat:58d078176e02c219e11eb4da5a02a7830a283b14cf8f94537af893ccff5ee781`.
35+
36+[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Replicate.ts)
added docs/docs/customize/model-providers/more/sagemaker.mdx +57 −0
@@ -0,0 +1,57 @@
1+import Tabs from "@theme/Tabs";
2+import TabItem from "@theme/TabItem";
3+
4+# AWS SageMaker
5+
6+SageMaker can be used for both chat and embedding models. Chat models are supported for endpoints deployed with [LMI](https://docs.djl.ai/docs/serving/serving/docs/lmi/index.html), and embedding models are supported for endpoints deployed with [HuggingFace TEI](https://huggingface.co/blog/sagemaker-huggingface-embedding)
7+
8+Here is an example Sagemaker configuration setup:
9+
10+<Tabs groupId="config-example">
11+ <TabItem value="yaml" label="YAML">
12+ ```yaml title="config.yaml"
13+ models:
14+ - name: deepseek-6.7b-instruct
15+ provider: sagemaker
16+ model: lmi-model-deepseek-coder-xxxxxxx
17+ region: us-west-2
18+ roles:
19+ - chat
20+ - name: mxbai-embed
21+ provider: sagemaker
22+ model: mxbai-embed-large-v1-endpoint
23+ roles:
24+ - embed
25+ ```
26+ </TabItem>
27+ <TabItem value="json" label="JSON">
28+ ```json title="config.json"
29+ {
30+ "models": [
31+ {
32+ "title": "deepseek-6.7b-instruct",
33+ "provider": "sagemaker",
34+ "model": "lmi-model-deepseek-coder-xxxxxxx",
35+ "region": "us-west-2"
36+ }
37+ ],
38+ "embeddingsProvider": {
39+ "provider": "sagemaker",
40+ "model": "mxbai-embed-large-v1-endpoint"
41+ }
42+ }
43+ ```
44+ </TabItem>
45+</Tabs>
46+
47+The value in model should be the SageMaker endpoint name you deployed.
48+
49+Authentication will be through temporary or long-term credentials in
50+~/.aws/credentials under a profile called "sagemaker".
51+
52+```title="~/.aws/credentials
53+[sagemaker]
54+aws_access_key_id = abcdefg
55+aws_secret_access_key = hijklmno
56+aws_session_token = pqrstuvwxyz # Optional: means short term creds.
57+```
added docs/docs/customize/model-providers/more/scaleway.mdx +78 −0
@@ -0,0 +1,78 @@
1+---
2+title: Scaleway
3+---
4+
5+import TabItem from "@theme/TabItem";
6+import Tabs from "@theme/Tabs";
7+
8+:::info
9+Scaleway Generative APIs give you instant access to leading AI models hosted in European data centers, ideal for developers requiring low latency, full data privacy, and compliance with EU AI Act.
10+You can generate your API key in [Scaleway's console](https://console.scaleway.com/generative-api/models).
11+Read the [quickstart documentation here](https://www.scaleway.com/en/docs/ai-data/generative-apis/quickstart/).
12+:::
13+
14+## Chat model
15+
16+We recommend configuring **Qwen2.5-Coder-32B-Instruct** as your chat model.
17+[Click here](https://www.scaleway.com/en/docs/ai-data/generative-apis/reference-content/supported-models/) to see the list of available chat models.
18+
19+<Tabs groupId="config-example">
20+ <TabItem value="yaml" label="YAML">
21+ ```yaml title="config.yaml"
22+ models:
23+ - name: Qwen2.5-Coder-32B-Instruct
24+ provider: scaleway
25+ model: qwen2.5-coder-32b-instruct
26+ apiKey: <YOUR_SCALEWAY_API_KEY>
27+ ```
28+ </TabItem>
29+ <TabItem value="json" label="JSON">
30+ ```json title="config.json"
31+ {
32+ "models": [
33+ {
34+ "title": "Qwen2.5-Coder-32B-Instruct",
35+ "provider": "scaleway",
36+ "model": "qwen2.5-coder-32b-instruct",
37+ "apiKey": "<YOUR_SCALEWAY_API_KEY>"
38+ }
39+ ]
40+ }
41+ ```
42+ </TabItem>
43+</Tabs>
44+
45+## Autocomplete model
46+
47+Scaleway currently does not offer any autocomplete models.
48+
49+[Click here](../../model-roles/autocomplete.md) to see a list of autocomplete model providers.
50+
51+## Embeddings model
52+
53+We recommend configuring **BGE-Multilingual-Gemma2** as your embeddings model.
54+
55+<Tabs groupId="config-example">
56+ <TabItem value="yaml" label="YAML">
57+ ```yaml title="config.yaml"
58+ models:
59+ - name: BGE Multilingual Gemma2
60+ provider: scaleway
61+ model: bge-multilingual-gemma2
62+ apiKey: <YOUR_SCALEWAY_API_KEY>
63+ roles:
64+ - embed
65+ ```
66+ </TabItem>
67+ <TabItem value="json" label="JSON">
68+ ```json title="config.json"
69+ {
70+ "embeddingsProvider": {
71+ "provider": "scaleway",
72+ "model": "bge-multilingual-gemma2",
73+ "apiKey": "<YOUR_SCALEWAY_API_KEY>"
74+ }
75+ }
76+ ```
77+ </TabItem>
78+</Tabs>
added docs/docs/customize/model-providers/more/siliconflow.mdx +88 −0
@@ -0,0 +1,88 @@
1+---
2+title: SiliconFlow
3+---
4+
5+import Tabs from "@theme/Tabs";
6+import TabItem from "@theme/TabItem";
7+
8+:::info
9+You can get an API key from the [Silicon Cloud](https://cloud.siliconflow.cn/account/ak).
10+:::
11+
12+## Chat model
13+
14+We recommend configuring **Qwen/Qwen2.5-Coder-32B-Instruct** as your chat model.
15+
16+<Tabs groupId="config-example">
17+ <TabItem value="yaml" label="YAML">
18+ ```yaml title="config.yaml"
19+ models:
20+ - name: Qwen
21+ provider: siliconflow
22+ model: Qwen/Qwen2.5-Coder-32B-Instruct
23+ apiKey: <YOUR_SILICONFLOW_API_KEY>
24+ roles:
25+ - chat
26+ ```
27+ </TabItem>
28+ <TabItem value="json" label="JSON">
29+ ```json title="config.json"
30+ {
31+ "models": [
32+ {
33+ "title": "Qwen",
34+ "provider": "siliconflow",
35+ "model": "Qwen/Qwen2.5-Coder-32B-Instruct",
36+ "apiKey": "<YOUR_SILICONFLOW_API_KEY>"
37+ }
38+ ]
39+ }
40+ ```
41+ </TabItem>
42+</Tabs>
43+
44+## Autocomplete model
45+
46+We recommend configuring **Qwen/Qwen2.5-Coder-7B-Instruct** as your autocomplete model.
47+
48+<Tabs groupId="config-example">
49+ <TabItem value="yaml" label="YAML">
50+ ```yaml title="config.yaml"
51+ models:
52+ - name: Qwen
53+ provider: siliconflow
54+ model: Qwen/Qwen2.5-Coder-32B-Instruct
55+ apiKey: <YOUR_SILICONFLOW_API_KEY>
56+ roles:
57+ - autocomplete
58+ ```
59+ </TabItem>
60+ <TabItem value="json" label="JSON">
61+ ```json title="config.json"
62+ {
63+ "models": [
64+ {
65+ "title": "Qwen",
66+ "provider": "siliconflow",
67+ "model": "Qwen/Qwen2.5-Coder-32B-Instruct",
68+ "apiKey": "<YOUR_SILICONFLOW_API_KEY>"
69+ }
70+ ]
71+ "tabAutocompleteModel": {
72+ "title": "Qwen",
73+ "provider": "siliconflow",
74+ "model": "Qwen/Qwen2.5-Coder-7B-Instruct",
75+ "apiKey": "<YOUR_SILICONFLOW_API_KEY>"
76+ }
77+ }
78+ ```
79+ </TabItem>
80+</Tabs>
81+
82+## Embeddings model
83+
84+SiliconFlow provide some embeddings models. [Click here](https://siliconflow.cn/models) to see a list of embeddings models.
85+
86+## Reranking model
87+
88+SiliconFlow provide some reranking models. [Click here](https://siliconflow.cn/models) to see a list of reranking models.
added docs/docs/customize/model-providers/more/textgenwebui.mdx +32 −0
@@ -0,0 +1,32 @@
1+import TabItem from "@theme/TabItem";
2+import Tabs from "@theme/Tabs";
3+
4+# TextGenWebUI
5+
6+TextGenWebUI is a comprehensive, open-source language model UI and local server. You can set it up with an OpenAI-compatible server plugin, and then configure it like this:
7+
8+<Tabs groupId="config-example">
9+ <TabItem value="yaml" label="YAML">
10+ ```yaml title="config.yaml"
11+ models:
12+ - name: Text Generation WebUI
13+ provider: text-gen-webui
14+ apiBase: http://localhost:5000/v1
15+ model: MODEL_NAME
16+ ```
17+ </TabItem>
18+ <TabItem value="json" label="JSON">
19+ ```json title="config.json"
20+ {
21+ "models": [
22+ {
23+ "title": "Text Generation WebUI",
24+ "provider": "text-gen-webui",
25+ "apiBase": "http://localhost:5000/v1",
26+ "model": "MODEL_NAME"
27+ }
28+ ]
29+ }
30+ ```
31+ </TabItem>
32+</Tabs>
added docs/docs/customize/model-providers/more/together.mdx +34 −0
@@ -0,0 +1,34 @@
1+import TabItem from "@theme/TabItem";
2+import Tabs from "@theme/Tabs";
3+
4+# Together
5+
6+The Together API is a cloud platform for running large AI models. You can sign up [here](https://api.together.xyz/signup), copy your API key on the initial welcome screen, and then hit the play button on any model from the [Together Models list](https://docs.together.ai/docs/serverless-models). Change `~/.continue/config.json` to look like this:
7+
8+<Tabs groupId="config-example">
9+ <TabItem value="yaml" label="YAML">
10+ ```yaml title="config.yaml"
11+ models:
12+ - name: Together Qwen2.5 Coder
13+ provider: together
14+ model: Qwen/Qwen2.5-Coder-32B-Instruct
15+ apiKey: <YOUR_TOGETHER_API_KEY>
16+ ```
17+ </TabItem>
18+ <TabItem value="json" label="JSON">
19+ ```json title="config.json"
20+ {
21+ "models": [
22+ {
23+ "title": "Together Qwen2.5 Coder",
24+ "provider": "together",
25+ "model": "Qwen/Qwen2.5-Coder-32B-Instruct",
26+ "apiKey": "<YOUR_TOGETHER_API_KEY>"
27+ }
28+ ]
29+ }
30+ ```
31+ </TabItem>
32+</Tabs>
33+
34+[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Together.ts)
added docs/docs/customize/model-providers/more/venice.md +35 −0
@@ -0,0 +1,35 @@
1+# Venice
2+
3+Venice.AI is a privacy focused generative AI platform, allowing users to interact with open-source LLMs without storing any private user data. To get started with Venice's API, either purchase a pro account, stake $VVV to obtain daily inference allotments or fund your account with USD and head over to https://venice.ai/settings/api. Venice hosts state of the art open-source AI models and supports the OpenAI API standard, allowing users to easily interact with the platform. Learn more about the Venice API at https://venice.ai/api.
4+
5+Change `~/.continue/config.json` to look like the following.
6+
7+```json title="config.json"
8+{
9+ "models": [
10+ {
11+ "provider": "venice",
12+ "title": "Autodetect",
13+ "model": "AUTODETECT",
14+ "apiKey": "..."
15+ }
16+ ]
17+}
18+```
19+
20+To utilize features offered by the venice API that are not apart of the standard OpenAI API schema, include these as `venice_parameters`
21+
22+For example, to use models with no system prompt, you can explicitly turn off the feature like so:
23+
24+```json title="config.json"
25+{
26+ "completionOptions": {
27+ "venice_parameters": {
28+ "include_venice_system_prompt" : false
29+ },
30+ ...
31+ }
32+}
33+```
34+
35+Learn more about available settings [here](https://docs.venice.ai/api-reference/api-spec).
added docs/docs/customize/model-providers/more/vllm.mdx +107 −0
@@ -0,0 +1,107 @@
1+import TabItem from "@theme/TabItem";
2+import Tabs from "@theme/Tabs";
3+
4+# vLLM
5+
6+vLLM is an open-source library for fast LLM inference which typically is used to serve multiple users at the same time. It can also be used to run a large model on multiple GPU:s (e.g. when it doesn´t fit in a single GPU). Run their OpenAI-compatible server using `vllm serve`. See their [server documentation](https://docs.vllm.ai/en/latest/serving/openai_compatible_server.html) and the [engine arguments documentation](https://docs.vllm.ai/en/latest/usage/engine_args.html).
7+
8+```shell
9+vllm serve meta-llama/Meta-Llama-3.1-8B-Instruct
10+```
11+
12+## Chat model
13+
14+We recommend configuring **Llama3.1 8B** as your chat model.
15+
16+<Tabs groupId="config-example">
17+ <TabItem value="yaml" label="YAML">
18+ ```yaml title="config.yaml"
19+ models:
20+ - name: Llama3.1 8B Instruct
21+ provider: vllm
22+ model: meta-llama/Meta-Llama-3.1-8B-Instruct
23+ apiBase: http://<vllm chat endpoint>/v1
24+ ```
25+ </TabItem>
26+ <TabItem value="json" label="JSON">
27+ ```json title="config.json"
28+ {
29+ "models": [
30+ {
31+ "title": "Llama3.1 8B Instruct",
32+ "provider": "vllm",
33+ "model": "meta-llama/Meta-Llama-3.1-8B-Instruct",
34+ "apiBase": "http://<vllm chat endpoint>/v1"
35+ }
36+ ]
37+ }
38+ ```
39+ </TabItem>
40+</Tabs>
41+
42+## Autocomplete model
43+
44+We recommend configuring **Qwen2.5-Coder 1.5B** as your autocomplete model.
45+
46+<Tabs groupId="config-example">
47+ <TabItem value="yaml" label="YAML">
48+ ```yaml title="config.yaml"
49+ models:
50+ - name: Qwen2.5-Coder 1.5B
51+ provider: vllm
52+ model: Qwen/Qwen2.5-Coder-1.5B
53+ apiBase: http://<vllm autocomplete endpoint>/v1
54+ roles:
55+ - autocomplete
56+ ```
57+ </TabItem>
58+ <TabItem value="json" label="JSON">
59+ ```json title="config.json"
60+ {
61+ "tabAutocompleteModel": {
62+ "title": "Qwen2.5-Coder 1.5B",
63+ "provider": "vllm",
64+ "model": "Qwen/Qwen2.5-Coder-1.5B",
65+ "apiBase": "http://<vllm autocomplete endpoint>/v1"
66+ }
67+ }
68+ ```
69+ </TabItem>
70+</Tabs>
71+
72+## Embeddings model
73+
74+We recommend configuring **Nomic Embed Text** as your embeddings model.
75+
76+<Tabs groupId="config-example">
77+ <TabItem value="yaml" label="YAML">
78+ ```yaml title="config.yaml"
79+ models:
80+ - name: VLLM Nomad Embed Text
81+ provider: vllm
82+ model: nomic-ai/nomic-embed-text-v1
83+ apiBase: http://<vllm embed endpoint>/v1
84+ roles:
85+ - embed
86+ ```
87+ </TabItem>
88+ <TabItem value="json" label="JSON">
89+ ```json title="config.json"
90+ {
91+ "embeddingsProvider": {
92+ "provider": "vllm",
93+ "model": "nomic-ai/nomic-embed-text-v1",
94+ "apiBase": "http://<vllm embed endpoint>/v1"
95+ }
96+ }
97+ ```
98+ </TabItem>
99+</Tabs>
100+
101+## Reranking model
102+
103+Continue automatically handles vLLM's response format (which uses `results` instead of `data`).
104+
105+[Click here](../../model-roles/reranking.mdx) to see a list of reranking model providers.
106+
107+The continue implementation uses [OpenAI](../top-level/openai.mdx) under the hood. [View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Vllm.ts)
added docs/docs/customize/model-providers/more/watsonx.mdx +279 −0
@@ -0,0 +1,279 @@
1+import TabItem from "@theme/TabItem";
2+import Tabs from "@theme/Tabs";
3+
4+# IBM watsonx
5+
6+watsonx, developed by IBM, offers a variety of pre-trained AI foundation models that can be used for natural language processing (NLP), computer vision, and speech recognition tasks.
7+
8+## Setup
9+
10+Accessing watsonx models can be done either through watsonx SaaS on IBM Cloud or using a dedicated watsonx.ai Software instance.
11+
12+### watsonx.ai SaaS - IBM Cloud
13+
14+To get started with watsonx SaaS, visit the [registration page](https://dataplatform.cloud.ibm.com/registration/stepone?context=wx). If you do not have an existing IBM Cloud account, you can sign up for a free trial.
15+
16+To authenticate to watsonx.ai SaaS with Continue, you will need to create a project and [set up an API key](https://www.ibm.com/docs/en/mas-cd/continuous-delivery?topic=cli-creating-your-cloud-api-key). Then, in continue:
17+
18+- Set **apiBase** to your watsonx SaaS endpoint, e.g. `https://us-south.ml.cloud.ibm.com` for US South region.
19+- Set **projectId** to your watsonx project ID.
20+- Set **apiKey** to your watsonx API Key.
21+
22+### watsonx.ai Software
23+
24+To authenticate to your watsonx.ai Software instance with Continue, you can use either `username/password` or `ZenApiKey` method:
25+
26+1. _Option 1_ (Recommended): using `ZenApiKey` authentication:
27+ - Set **apiBase** to your watsonx software endpoint, e.g. `https://cpd-watsonx.apps.example.com`.
28+ - Set **projectId** to your watsonx project ID.
29+ - Set **apiKey** to your watsonx Zen API Key. To generate it:
30+ 1. Log in to the CPD web client.
31+ 2. From the toolbar, click your avatar.
32+ 3. Click **Profile and settings**.
33+ 4. Click **API key** > **Generate new key**.
34+ 5. Click **Generate**.
35+ 6. Click **Copy** and save your key somewhere safe. You cannot recover this key if you lose it.
36+ 7. Generate your ZenApiKey by running the following command in your preferred terminal: `echo "<username>:<apikey>" | base64`, replacing `<username>` with your CPD username and `<apikey>` with the API Key you just created.
37+2. _Option 2_: using `username/password` authentication:
38+ - Set **apiBase** to your watsonx software endpoint, e.g. `https://cpd-watsonx.apps.example.com`.
39+ - Set **projectId** to your watsonx project ID.
40+ - Set **API Key** to your watsonx Username and Password using `username:password` as format.
41+
42+## Configuration
43+
44+Add the following configuration:
45+
46+<Tabs groupId="config-example">
47+ <TabItem value="yaml" label="YAML">
48+ ```yaml title="config.yaml"
49+ models:
50+ - name: watsonx - Model Name
51+ provider: watsonx
52+ model: model ID
53+ apiBase: https://us-south.ml.cloud.ibm.com
54+ apiKey: API_KEY/ZENAPI_KEY/USERNAME:PASSWORD
55+ env:
56+ projectId: PROJECT_ID
57+ apiVersion: 2024-03-14
58+ ```
59+ </TabItem>
60+ <TabItem value="json" label="JSON">
61+ ```json title="config.json"
62+ {
63+ "models": [
64+ {
65+ "model": "model ID",
66+ "title": "watsonx - Model Name",
67+ "provider": "watsonx",
68+ "apiBase": "https://us-south.ml.cloud.ibm.com",
69+ "projectId": "PROJECT_ID",
70+ "apiKey": "API_KEY/ZENAPI_KEY/USERNAME:PASSWORD",
71+ "apiVersion": "2024-03-14"
72+ }
73+ ]
74+ }
75+ ```
76+ </TabItem>
77+</Tabs>
78+
79+`apiVersion` is optional and defaults to the latest version.
80+
81+If you are using a custom deployment endpoint, set `deploymentID` to the model's deployment ID. You can find it in the watsonx.ai Prompt Lab UI by selecting the corresponding model and opening the `</>` tab on the right, which will display the endpoint's URL containing the deployment ID.
82+
83+<Tabs groupId="config-example">
84+ <TabItem value="yaml" label="YAML">
85+ ```yaml title="config.yaml"
86+ models:
87+ - name: watsonx - Model Name
88+ provider: watsonx
89+ model: model ID
90+ apiBase: watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com
91+ apiKey: API_KEY/ZENAPI_KEY/USERNAME:PASSWORD
92+ env:
93+ apiVersion: 2024-03-14
94+ deploymentId: DEPLOYMENT_ID
95+ ```
96+ </TabItem>
97+ <TabItem value="json" label="JSON">
98+ ```json title="config.json"
99+ {
100+ "models": [
101+ {
102+ "model": "model ID",
103+ "title": "watsonx - Model Name",
104+ "provider": "watsonx",
105+ "apiBase": "watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com",
106+ "apiKey": "API_KEY/ZENAPI_KEY/USERNAME:PASSWORD",
107+ "apiVersion": "2024-03-14",
108+ "deploymentId": "DEPLOYMENT_ID"
109+ }
110+ ]
111+ }
112+ ```
113+ </TabItem>
114+</Tabs>
115+
116+### Configuration Options
117+
118+Make sure to specify a template name, such as `granite` or `llama3`, and to set the `contextLength` to the model's context window size.
119+You can also configure generation parameters, such as temperature, topP, topK, frequency penalty, and stop sequences:
120+
121+<Tabs groupId="config-example">
122+ <TabItem value="yaml" label="YAML">
123+ ```yaml title="config.yaml"
124+ models:
125+ - name: Granite Code 20b
126+ provider: watsonx
127+ model: ibm/granite-20b-code-instruct
128+ apiBase: watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com
129+ apiKey: API_KEY/ZENAPI_KEY/USERNAME:PASSWORD
130+ template: granite
131+ defaultCompletionOptions:
132+ contextLength: 8000
133+ temperature: 0.1
134+ topP: 0.3
135+ topK: 20
136+ maxTokens: 2000
137+ frequencyPenalty: 1.1
138+ stop:
139+ - Question:
140+ - "\n\n\n"
141+ env:
142+ projectId: PROJECT_ID
143+ apiVersion: 2024-03-14
144+
145+ ```
146+ </TabItem>
147+ <TabItem value="json" label="JSON">
148+ ```json title="config.json"
149+ {
150+ "models": [
151+ {
152+ "model": "ibm/granite-20b-code-instruct",
153+ "title": "Granite Code 20b",
154+ "provider": "watsonx",
155+ "apiBase": "watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com",
156+ "projectId": "PROJECT_ID",
157+ "apiKey": "API_KEY/ZENAPI_KEY/USERNAME:PASSWORD",
158+ "apiVersion": "2024-03-14",
159+ "template": "granite",
160+ "contextLength": 8000,
161+ "completionOptions": {
162+ "temperature": 0.1,
163+ "topP": 0.3,
164+ "topK": 20,
165+ "maxTokens": 2000,
166+ "frequencyPenalty": 1.1,
167+ "stop": ["Question:", "\n\n\n"]
168+ }
169+ }
170+ ]
171+ }
172+ ```
173+ </TabItem>
174+</Tabs>
175+
176+## Tab Auto Complete Model
177+
178+Granite models are recommended for tab auto complete. The configuration is similar to that of the chat models:
179+
180+<Tabs groupId="config-example">
181+ <TabItem value="yaml" label="YAML">
182+ ```yaml title="config.yaml"
183+ models:
184+ - name: Granite Code 8b
185+ provider: watsonx
186+ model: ibm/granite-8b-code-instruct
187+ apiBase: watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com
188+ projectId: PROJECT_ID
189+ apiKey: API_KEY/ZENAPI_KEY/USERNAME:PASSWORD
190+ apiVersion: 2024-03-14
191+ roles:
192+ - autocomplete
193+ ```
194+ </TabItem>
195+ <TabItem value="json" label="JSON">
196+ ```json title="config.json"
197+ {
198+ "tabAutocompleteModel": {
199+ "model": "ibm/granite-8b-code-instruct",
200+ "title": "Granite Code 8b",
201+ "provider": "watsonx",
202+ "apiBase": "watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com",
203+ "projectId": "PROJECT_ID",
204+ "apiKey": "API_KEY/ZENAPI_KEY/USERNAME:PASSWORD",
205+ "apiVersion": "2024-03-14",
206+ "contextLength": 4000
207+ }
208+ }
209+ ```
210+ </TabItem>
211+</Tabs>
212+
213+## Embeddings Model
214+
215+To view the list of available embeddings models, visit [this page](https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-data/fm-models-embed.html?context=wx&pos=2#ibm-provided).
216+
217+<Tabs groupId="config-example">
218+ <TabItem value="yaml" label="YAML">
219+ ```yaml title="config.yaml"
220+ models:
221+ - name: Watsonx Embedder
222+ provider: watsonx
223+ model: ibm/slate-30m-english-rtrvr-v2
224+ apiBase: https://us-south.ml.cloud.ibm.com
225+ projectId: PROJECT_ID
226+ apiKey: API_KEY/ZENAPI_KEY/USERNAME:PASSWORD
227+ apiVersion: 2024-03-14
228+ roles:
229+ - embed
230+ ```
231+ </TabItem>
232+ <TabItem value="json" label="JSON">
233+ ```json title="config.json"
234+ {
235+ "embeddingsProvider": {
236+ "provider": "watsonx",
237+ "model": "ibm/slate-30m-english-rtrvr-v2",
238+ "apiBase": "watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com",
239+ "projectId": "PROJECT_ID",
240+ "apiKey": "API_KEY/ZENAPI_KEY/USERNAME:PASSWORD",
241+ "apiVersion": "2024-03-14"
242+ }
243+ }
244+ ```
245+ </TabItem>
246+</Tabs>
247+
248+## Reranker
249+
250+<Tabs groupId="config-example">
251+ <TabItem value="yaml" label="YAML">
252+ ```yaml title="config.yaml"
253+ models:
254+ - name: Watsonx Reranker
255+ provider: watsonx
256+ model: cross-encoder/ms-marco-minilm-l-12-v2
257+ apiBase: https://us-south.ml.cloud.ibm.com
258+ projectId: PROJECT_ID
259+ apiKey: API_KEY/ZENAPI_KEY/USERNAME:PASSWORD
260+ apiVersion: 2024-03-14
261+ ```
262+ </TabItem>
263+ <TabItem value="json" label="JSON">
264+ ```json title="config.json"
265+ {
266+ "reranker": {
267+ "name": "watsonx",
268+ "params": {
269+ "model": "cross-encoder/ms-marco-minilm-l-12-v2",
270+ "apiBase": "watsonx endpoint e.g. https://us-south.ml.cloud.ibm.com",
271+ "projectId": "PROJECT_ID",
272+ "apiKey": "API_KEY/ZENAPI_KEY/USERNAME:PASSWORD",
273+ "apiVersion": "2024-03-14"
274+ }
275+ }
276+ }
277+ ```
278+ </TabItem>
279+</Tabs>
added docs/docs/customize/model-providers/top-level/_category_.json +4 −0
@@ -0,0 +1,4 @@
1+{
2+ "label": "Popular Providers",
3+ "position": 1
4+}
added docs/docs/customize/model-providers/top-level/anthropic.mdx +109 −0
@@ -0,0 +1,109 @@
1+---
2+title: Anthropic
3+slug: ../anthropic
4+---
5+
6+import TabItem from "@theme/TabItem";
7+import Tabs from "@theme/Tabs";
8+
9+:::info
10+You can get an API key from the [Anthropic console](https://console.anthropic.com/account/keys).
11+:::
12+
13+## Chat model
14+
15+We recommend configuring **Claude 4 Sonnet** as your chat model.
16+
17+<Tabs groupId="config-example">
18+ <TabItem value="yaml" label="YAML">
19+ ```yaml title="config.yaml"
20+ models:
21+ - name: Claude 4 Sonnet
22+ provider: anthropic
23+ model: claude-sonnet-4-20250514
24+ apiKey: <YOUR_ANTHROPIC_API_KEY>
25+ ```
26+ </TabItem>
27+ <TabItem value="json" label="JSON">
28+ ```json title="config.json"
29+ {
30+ "models": [
31+ {
32+ "title": "Claude 4 Sonnet",
33+ "provider": "anthropic",
34+ "model": "claude-sonnet-4-latest",
35+ "apiKey": "<YOUR_ANTHROPIC_API_KEY>"
36+ }
37+ ]
38+ }
39+ ```
40+ </TabItem>
41+</Tabs>
42+
43+## Autocomplete model
44+
45+Anthropic currently does not offer any autocomplete models.
46+
47+[Click here](../../model-roles/autocomplete.md) to see a list of autocomplete model providers.
48+
49+## Embeddings model
50+
51+Anthropic currently does not offer any embeddings models.
52+
53+[Click here](../../model-roles/embeddings.mdx) to see a list of embeddings model providers.
54+
55+## Reranking model
56+
57+Anthropic currently does not offer any reranking models.
58+
59+[Click here](../../model-roles/reranking.mdx) to see a list of reranking model providers.
60+
61+## Prompt caching
62+
63+Anthropic supports [prompt caching with Claude](https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching), which allows Claude models to cache system messages and conversation history between requests to improve performance and reduce costs.
64+
65+Prompt caching is generally available for:
66+
67+- Claude 4 Sonnet
68+- Claude 3.7 Sonnet
69+- Claude 3.5 Sonnet
70+- Claude 3.5 Haiku
71+
72+To enable caching of the system message and the turn-by-turn conversation, update your model configuration as follows:
73+
74+<Tabs groupId="config-example">
75+ <TabItem value="yaml" label="YAML">
76+ ```yaml title="config.yaml"
77+ models:
78+ - name: Anthropic
79+ provider: anthropic
80+ model: claude-sonnet-4-20250514
81+ apiKey: <YOUR_ANTHROPIC_API_KEY>
82+ roles:
83+ - chat
84+ defaultCompletionOptions:
85+ promptCaching: true
86+ ```
87+ </TabItem>
88+ <TabItem value="json" label="JSON">
89+ ```json title="config.json"
90+ {
91+ "models": [
92+ {
93+ "cacheBehavior": {
94+ "cacheSystemMessage": true,
95+ "cacheConversation": true
96+ },
97+ "title": "Anthropic",
98+ "provider": "anthropic",
99+ "model": "claude-sonnet-4-latest",
100+ "defaultCompletionOptions": {
101+ "promptCaching": true
102+ },
103+ "apiKey": "<YOUR_ANTHROPIC_API_KEY>"
104+ }
105+ ]
106+ }
107+ ```
108+ </TabItem>
109+</Tabs>
added docs/docs/customize/model-providers/top-level/azure.mdx +169 −0
@@ -0,0 +1,169 @@
1+---
2+title: Azure AI Foundry
3+slug: ../azure
4+---
5+
6+import TabItem from "@theme/TabItem";
7+import Tabs from "@theme/Tabs";
8+
9+Azure AI Foundry is a cloud-based service that provides access to models from OpenAI, Mistral AI, and others, integrated with the security and enterprise features of the Microsoft Azure platform. To get started, create an Azure AI Foundry resource in the [Azure portal](https://portal.azure.com).
10+
11+:::info
12+
13+For details on OpenAI model setup, see [Azure OpenAI Service configuration](#azure-openai-service-configuration).
14+
15+:::
16+
17+## Chat model
18+
19+We recommend configuring **GPT-4o** as your chat model.
20+
21+<Tabs groupId="config-example">
22+ <TabItem value="yaml" label="YAML">
23+ ```yaml title="config.yaml"
24+ models:
25+ - name: GPT-4o
26+ provider: azure
27+ model: gpt-4o
28+ apiBase: <YOUR_DEPLOYMENT_BASE>
29+ apiKey: <YOUR_AZURE_API_KEY> # If you use subscription key, try using Azure gateway to rename it apiKey
30+ env:
31+ deployment: <YOUR_DEPLOYMENT_NAME>
32+ apiType: azure-foundry # Or "azure-openai" if using OpenAI models
33+ ```
34+ </TabItem>
35+ <TabItem value="json" label="JSON">
36+ ```json title="config.json"
37+ {
38+ "models": [{
39+ "title": "GPT-4o",
40+ "provider": "azure",
41+ "model": "gpt-4o",
42+ "apiBase": "<YOUR_DEPLOYMENT_BASE>",
43+ "deployment": "<YOUR_DEPLOYMENT_NAME>",
44+ "apiKey": "<YOUR_AZURE_API_KEY>", // If you use subscription key, try using Azure gateway to rename it apiKey
45+ "apiType": "azure-foundry" // Or "azure-openai" if using OpenAI models
46+ }]
47+ }
48+ ```
49+ </TabItem>
50+</Tabs>
51+
52+## Autocomplete model
53+
54+We recommend configuring **Codestral** as your autocomplete model. If you use Azure AI Foundry to deploy Codestral:
55+
56+<Tabs groupId="config-example">
57+ <TabItem value="yaml" label="YAML">
58+ ```yaml title="config.yaml"
59+ models:
60+ - name: Codestral
61+ provider: mistral
62+ model: codestral-latest
63+ apiBase: https://<YOUR_MODEL_NAME>.<YOUR_REGION>.models.ai.azure.com/v1
64+ apiKey: <YOUR_AZURE_API_KEY>
65+ roles:
66+ - autocomplete
67+ ```
68+ </TabItem>
69+ <TabItem value="json" label="JSON">
70+ ```json title="config.json"
71+ {
72+ "tabAutocompleteModel": {
73+ "title": "Codestral",
74+ "provider": "mistral",
75+ "model": "codestral-latest",
76+ "apiBase": "https://<YOUR_MODEL_NAME>.<YOUR_REGION>.models.ai.azure.com/v1",
77+ "apiKey": "<YOUR_AZURE_API_KEY>"
78+ }
79+ }
80+ ```
81+ </TabItem>
82+</Tabs>
83+
84+## Embeddings model
85+
86+We recommend configuring **text-embedding-3-large** as your embeddings model.
87+
88+<Tabs groupId="config-example">
89+ <TabItem value="yaml" label="YAML">
90+ ```yaml title="config.yaml"
91+ models:
92+ - name: Text Embedding-3 Large
93+ provider: azure
94+ model: text-embedding-3-large
95+ apiBase: <YOUR_DEPLOYMENT_BASE>
96+ apiKey: <YOUR_AZURE_API_KEY>
97+ env:
98+ deployment: <YOUR_DEPLOYMENT_NAME>
99+ apiType: azure
100+ ```
101+ </TabItem>
102+ <TabItem value="json" label="JSON">
103+ ```json title="config.json"
104+ {
105+ "embeddingsProvider": {
106+ "provider": "azure",
107+ "model": "text-embedding-3-large",
108+ "apiBase": "<YOUR_DEPLOYMENT_BASE>",
109+ "deployment": "<YOUR_DEPLOYMENT_NAME>",
110+ "apiKey": "<YOUR_AZURE_API_KEY>",
111+ "apiType": "azure-foundry" // Or "azure-openai" if using OpenAI models
112+ }
113+ }
114+ ```
115+ </TabItem>
116+</Tabs>
117+
118+## Reranking model
119+
120+Azure OpenAI currently does not offer any reranking models.
121+
122+[Click here](../../model-roles/reranking.mdx) to see a list of reranking models.
123+
124+## Privacy
125+
126+If you'd like to use OpenAI models but are concerned about privacy, you can use the Azure OpenAI service, which is GDPR and HIPAA compliant.
127+
128+:::info[Getting access]
129+[Click here](https://azure.microsoft.com/en-us/products/ai-services/openai-service) to apply for access to the Azure OpenAI service. Response times are typically within a few days.
130+:::
131+
132+## Azure OpenAI Service configuration
133+
134+Azure OpenAI Service requires a handful of additional parameters to be configured, such as a deployment name and API base URL.
135+
136+To find this information in _Azure AI Foundry_, first select the model that you would like to connect. Then visit _Endpoint_ > _Target URI_.
137+
138+For example, a Target URI of `https://just-an-example.openai.azure.com/openai/deployments/gpt-4o-july/chat/completions?api-version=2023-03-15-preview` would map to the following:
139+
140+<Tabs groupId="config-example">
141+ <TabItem value="yaml" label="YAML">
142+ ```yaml title="config.yaml"
143+ models:
144+ - name: GPT-4o Azure
145+ model: gpt-4o
146+ provider: azure
147+ apiBase: https://just-an-example.openai.azure.com
148+ apiKey: <YOUR_AZURE_API_KEY>
149+ env:
150+ apiVersion: 2023-03-15-preview
151+ deployment: gpt-4o-july
152+ apiType: azure-openai
153+ ```
154+ </TabItem>
155+ <TabItem value="json" label="JSON">
156+ ```json title="config.json"
157+ {
158+ "title": "GPT-4o Azure",
159+ "model": "gpt-4o",
160+ "provider": "azure",
161+ "apiBase": "https://just-an-example.openai.azure.com",
162+ "deployment": "gpt-4o-july",
163+ "apiVersion": "2023-03-15-preview",
164+ "apiKey": "<YOUR_AZURE_API_KEY>",
165+ "apiType": "azure-openai"
166+ }
167+ ```
168+ </TabItem>
169+</Tabs>
added docs/docs/customize/model-providers/top-level/bedrock.mdx +235 −0
@@ -0,0 +1,235 @@
1+---
2+title: Amazon Bedrock
3+slug: ../bedrock
4+---
5+
6+import TabItem from "@theme/TabItem";
7+import Tabs from "@theme/Tabs";
8+
9+Amazon Bedrock is a fully managed service on AWS that provides access to foundation models from various AI companies through a single API.
10+
11+## Chat model
12+
13+We recommend configuring **Claude 3.7 Sonnet** as your chat model.
14+
15+<Tabs groupId="config-example">
16+ <TabItem value="yaml" label="YAML">
17+ ```yaml title="config.yaml"
18+ models:
19+ - name: Claude 3.7 Sonnet
20+ provider: bedrock
21+ model: us.anthropic.claude-3-7-sonnet-20250219-v1:0
22+ env:
23+ region: us-east-1
24+ profile: bedrock
25+ roles:
26+ - chat
27+ ```
28+ </TabItem>
29+ <TabItem value="json" label="JSON">
30+ ```json title="config.json"
31+ {
32+ "models": [
33+ {
34+ "title": "Claude 3.7 Sonnet",
35+ "provider": "bedrock",
36+ "model": "us.anthropic.claude-3-7-sonnet-20250219-v1:0",
37+ "region": "us-east-1",
38+ "profile": "bedrock"
39+ }
40+ ]
41+ }
42+ ```
43+ </TabItem>
44+</Tabs>
45+
46+> If you run into the following error when connecting to the new Claude 3.5 Sonnet 2 models from AWS - `400 Invocation of model ID anthropic.claude-3-5-sonnet-20241022-v2:0 with on-demand throughput isn't supported. Retry your request with the ID or ARN of an inference profile that contains this model.`
47+
48+> You can fix this using the following config:
49+
50+<Tabs groupId="config-example">
51+ <TabItem value="yaml" label="YAML">
52+ ```yaml title="config.yaml"
53+ models:
54+ - name: Claude 3.5 Sonnet
55+ provider: bedrock
56+ model: us.anthropic.claude-3-5-sonnet-20241022-v2:0
57+ env:
58+ region: us-east-1
59+ profile: bedrock
60+ roles:
61+ - chat
62+ ```
63+ </TabItem>
64+ <TabItem value="json" label="JSON">
65+ ```json title="config.json"
66+ {
67+ "models": [
68+ {
69+ "title": "Claude 3.5 Sonnet",
70+ "provider": "bedrock",
71+ "model": "us.anthropic.claude-3-5-sonnet-20241022-v2:0",
72+ "region": "us-east-1",
73+ "profile": "bedrock"
74+ }
75+ ]
76+ }
77+ ```
78+ </TabItem>
79+</Tabs>
80+
81+## Autocomplete model
82+
83+Bedrock currently does not offer any autocomplete models. However, [Codestral from Mistral](https://mistral.ai/news/codestral-2501/) and [Point from Poolside](https://aws.amazon.com/bedrock/poolside/) will be supported in the near future.
84+
85+In the meantime, you can view a list of autocomplete model providers [here](../../model-roles/autocomplete.md).
86+
87+## Embeddings model
88+
89+We recommend configuring [`amazon.titan-embed-text-v2:0`](https://docs.aws.amazon.com/bedrock/latest/devguide/models.html#amazon.titan-embed-text-v2-0) as your embeddings model.
90+
91+<Tabs groupId="config-example">
92+ <TabItem value="yaml" label="YAML">
93+ ```yaml title="config.yaml"
94+ models:
95+ - name: Embeddings Model
96+ provider: bedrock
97+ model: amazon.titan-embed-text-v2:0
98+ env:
99+ region: us-west-2
100+ roles:
101+ - embed
102+ ```
103+ </TabItem>
104+ <TabItem value="json" label="JSON">
105+ ```json title="config.json"
106+ {
107+ "embeddingsProvider": {
108+ "title": "Embeddings Model",
109+ "provider": "bedrock",
110+ "model": "amazon.titan-embed-text-v2:0",
111+ "region": "us-west-2"
112+ }
113+ }
114+ ```
115+ </TabItem>
116+</Tabs>
117+
118+## Reranking model
119+
120+We recommend configuring `cohere.rerank-v3-5:0` as your reranking model, you may also use `amazon.rerank-v1:0`.
121+
122+<Tabs groupId="config-example">
123+ <TabItem value="yaml" label="YAML">
124+ ```yaml title="config.yaml"
125+ models:
126+ - name: Bedrock Reranker
127+ provider: bedrock
128+ model: cohere.rerank-v3-5:0
129+ env:
130+ region: us-west-2
131+ roles:
132+ - rerank
133+ ```
134+ </TabItem>
135+ <TabItem value="json" label="JSON">
136+ ```json title="config.json"
137+ {
138+ "reranker": {
139+ "name": "bedrock",
140+ "params": {
141+ "model": "cohere.rerank-v3-5:0",
142+ "region": "us-west-2"
143+ }
144+ }
145+ }
146+ ```
147+ </TabItem>
148+</Tabs>
149+
150+## Prompt caching
151+
152+Bedrock allows Claude models to cache tool payloads, system messages, and chat
153+messages between requests. Enable this behavior by adding
154+`promptCaching: true` under `defaultCompletionOptions` in your model
155+configuration.
156+
157+Prompt caching is generally available for:
158+
159+- Claude 3.7 Sonnet
160+- Claude 3.5 Haiku
161+- Amazon Nova Micro
162+- Amazon Nova Lite
163+- Amazon Nova Pro
164+
165+Customers who were granted access to Claude 3.5 Sonnet v2 during the prompt
166+caching preview will retain that access, but it cannot be enabled for new users
167+on that model.
168+
169+```yaml title="config.yaml"
170+models:
171+ - name: Claude 3.7 Sonnet
172+ provider: bedrock
173+ model: us.anthropic.claude-3-7-sonnet-20250219-v1:0
174+ defaultCompletionOptions:
175+ promptCaching: true
176+```
177+
178+Prompt caching is not supported in JSON configuration files, so use the YAML syntax above to enable it.
179+
180+## Authentication
181+
182+Authentication will be through temporary or long-term credentials in
183+`~/.aws/credentials` under a configured profile (e.g. "bedrock").
184+
185+```title="~/.aws/credentials
186+[bedrock]
187+aws_access_key_id = abcdefg
188+aws_secret_access_key = hijklmno
189+aws_session_token = pqrstuvwxyz # Optional: means short term creds.
190+```
191+
192+## Custom Imported Models
193+
194+To setup Bedrock using custom imported models, add the following to your config file:
195+
196+<Tabs groupId="config-example">
197+ <TabItem value="yaml" label="YAML">
198+ ```yaml title="config.yaml"
199+ models:
200+ - name: AWS Bedrock deepseek-coder-6.7b-instruct
201+ provider: bedrockimport
202+ model: deepseek-coder-6.7b-instruct
203+ env:
204+ region: us-west-2
205+ profile: bedrock
206+ modelArn: arn:aws:bedrock:us-west-2:XXXXX:imported-model/XXXXXX
207+ ```
208+ </TabItem>
209+ <TabItem value="json" label="JSON">
210+ ```json title="config.json"
211+ {
212+ "models": [
213+ {
214+ "title": "AWS Bedrock deepseek-coder-6.7b-instruct",
215+ "provider": "bedrockimport",
216+ "model": "deepseek-coder-6.7b-instruct",
217+ "modelArn": "arn:aws:bedrock:us-west-2:XXXXX:imported-model/XXXXXX",
218+ "region": "us-west-2",
219+ "profile": "bedrock"
220+ }
221+ ]
222+ }
223+ ```
224+ </TabItem>
225+</Tabs>
226+
227+Authentication will be through temporary or long-term credentials in
228+~/.aws/credentials under a configured profile (e.g. "bedrock").
229+
230+```title="~/.aws/credentials
231+[bedrock]
232+aws_access_key_id = abcdefg
233+aws_secret_access_key = hijklmno
234+aws_session_token = pqrstuvwxyz # Optional: means short term creds.
235+```
added docs/docs/customize/model-providers/top-level/deepseek.mdx +83 −0
@@ -0,0 +1,83 @@
1+---
2+title: DeepSeek
3+slug: ../deepseek
4+---
5+
6+import TabItem from "@theme/TabItem";
7+import Tabs from "@theme/Tabs";
8+
9+:::info
10+You can get an API key from the [DeepSeek console](https://www.deepseek.com/).
11+:::
12+
13+## Chat model
14+
15+We recommend configuring **DeepSeek Chat** as your chat model.
16+
17+<Tabs groupId="config-example">
18+ <TabItem value="yaml" label="YAML">
19+ ```yaml title="config.yaml"
20+ models:
21+ - name: DeepSeek Chat
22+ provider: deepseek
23+ model: deepseek-chat
24+ apiKey: <YOUR_DEEPSEEK_API_KEY>
25+ ```
26+ </TabItem>
27+ <TabItem value="json" label="JSON">
28+ ```json title="config.json"
29+ {
30+ "models": [
31+ {
32+ "title": "DeepSeek Chat",
33+ "provider": "deepseek",
34+ "model": "deepseek-chat",
35+ "apiKey": "<YOUR_DEEPSEEK_API_KEY>"
36+ }
37+ ]
38+ }
39+ ```
40+ </TabItem>
41+</Tabs>
42+
43+## Autocomplete model
44+
45+We recommend configuring **DeepSeek Coder** as your autocomplete model.
46+
47+<Tabs groupId="config-example">
48+ <TabItem value="yaml" label="YAML">
49+ ```yaml title="config.yaml"
50+ models:
51+ - name: DeepSeek Coder
52+ provider: deepseek
53+ model: deepseek-coder
54+ apiKey: <YOUR_DEEPSEEK_API_KEY>
55+ roles:
56+ - autocomplete
57+ ```
58+ </TabItem>
59+ <TabItem value="json" label="JSON">
60+ ```json title="config.json"
61+ {
62+ "tabAutocompleteModel": {
63+ "title": "DeepSeek Coder",
64+ "provider": "deepseek",
65+ "model": "deepseek-coder",
66+ "apiKey": "<YOUR_DEEPSEEK_API_KEY>"
67+ }
68+ }
69+ ```
70+ </TabItem>
71+</Tabs>
72+
73+## Embeddings model
74+
75+DeepSeek currently does not offer any embeddings models.
76+
77+[Click here](../../model-roles/embeddings.mdx) to see a list of embeddings model providers.
78+
79+## Reranking model
80+
81+DeepSeek currently does not offer any reranking models.
82+
83+[Click here](../../model-roles/reranking.mdx) to see a list of reranking model providers.
added docs/docs/customize/model-providers/top-level/gemini.mdx +82 −0
@@ -0,0 +1,82 @@
1+---
2+title: Gemini
3+slug: ../gemini
4+---
5+
6+import TabItem from "@theme/TabItem";
7+import Tabs from "@theme/Tabs";
8+
9+:::info
10+You can get an API key from the [Google AI Studio](https://aistudio.google.com/).
11+:::
12+
13+## Chat model
14+
15+We recommend configuring **Gemini 2.0 Flash** as your chat model.
16+
17+<Tabs groupId="config-example">
18+ <TabItem value="yaml" label="YAML">
19+ ```yaml title="config.yaml"
20+ models:
21+ - name: Gemini 2.0 Flash
22+ provider: gemini
23+ model: gemini-2.0-flash
24+ apiKey: <YOUR_GEMINI_API_KEY>
25+ ```
26+ </TabItem>
27+ <TabItem value="json" label="JSON">
28+ ```json title="config.json"
29+ {
30+ "models": [
31+ {
32+ "title": "Gemini 2.0 Flash",
33+ "provider": "gemini",
34+ "model": "gemini-2.0-flash",
35+ "apiKey": "<YOUR_GEMINI_API_KEY>"
36+ }
37+ ]
38+ }
39+ ```
40+ </TabItem>
41+</Tabs>
42+
43+## Autocomplete model
44+
45+Gemini currently does not offer any autocomplete models.
46+
47+[Click here](../../model-roles/autocomplete.md) to see a list of autocomplete model providers.
48+
49+## Embeddings model
50+
51+We recommend configuring **text-embedding-004** as your embeddings model.
52+
53+<Tabs groupId="config-example">
54+ <TabItem value="yaml" label="YAML">
55+ ```yaml title="config.yaml"
56+ models:
57+ - name: Gemini Embeddings
58+ provider: gemini
59+ model: models/text-embedding-004
60+ apiKey: <YOUR_GEMINI_API_KEY>
61+ roles:
62+ - embed
63+ ```
64+ </TabItem>
65+ <TabItem value="json" label="JSON">
66+ ```json title="config.json"
67+ {
68+ "embeddingsProvider": {
69+ "provider": "gemini",
70+ "model": "models/text-embedding-004",
71+ "apiKey": "<YOUR_GEMINI_API_KEY>"
72+ }
73+ }
74+ ```
75+ </TabItem>
76+</Tabs>
77+
78+## Reranking model
79+
80+Gemini currently does not offer any reranking models.
81+
82+[Click here](../../model-roles/reranking.mdx) to see a list of reranking model providers.
added docs/docs/customize/model-providers/top-level/inception.mdx +81 −0
@@ -0,0 +1,81 @@
1+---
2+title: Inception
3+slug: ../inception
4+---
5+
6+import TabItem from "@theme/TabItem";
7+import Tabs from "@theme/Tabs";
8+
9+:::info
10+You can get an API key from the [Inception Dashboard](https://platform.inceptionlabs.ai/dashboard/api-keys).
11+:::
12+
13+## Chat model
14+
15+We recommend configuring **Mercury Coder Small** as your chat model.
16+
17+<Tabs groupId="config-example">
18+ <TabItem value="yaml" label="YAML">
19+ ```yaml title="config.yaml"
20+ models:
21+ - uses: inceptionlabs/mercury-coder-small
22+ with:
23+ INCEPTION_API_KEY: ${{ secrets.INCEPTION_API_KEY }}
24+ ```
25+ </TabItem>
26+ <TabItem value="json" label="JSON">
27+ ```json title="config.json"
28+ {
29+ "models": [
30+ {
31+ "title": "Mercury Coder Small",
32+ "provider": "inception",
33+ "model": "mercury-coder-small",
34+ "apiKey": "<INCEPTION_API_KEY>"
35+ }
36+ ]
37+ }
38+ ```
39+ </TabItem>
40+</Tabs>
41+
42+## Autocomplete model
43+
44+We also recommend configuring **Mercury Coder Small** as your autocomplete model.
45+
46+<Tabs groupId="config-example">
47+ <TabItem value="yaml" label="YAML">
48+ ```yaml title="config.yaml"
49+ models:
50+ - uses: inceptionlabs/mercury-coder-small
51+ with:
52+ INCEPTION_API_KEY: ${{ secrets.INCEPTION_API_KEY }}
53+ ```
54+ </TabItem>
55+ <TabItem value="json" label="JSON">
56+ ```json title="config.json"
57+ {
58+ "tabAutocompleteModel": [
59+ {
60+ "title": "Mercury Coder Small",
61+ "provider": "inception",
62+ "model": "mercury-coder-small",
63+ "apiKey": "<INCEPTION_API_KEY>"
64+ }
65+ ]
66+ }
67+ ```
68+ </TabItem>
69+</Tabs>
70+
71+## Embeddings model
72+
73+Inception currently does not offer any embeddings models.
74+
75+[Click here](../../model-roles/embeddings.mdx) to see a list of embeddings model providers.
76+
77+## Reranking model
78+
79+Inception currently does not offer any reranking models.
80+
81+[Click here](../../model-roles/reranking.mdx) to see a list of reranking model providers.
added docs/docs/customize/model-providers/top-level/mistral.mdx +110 −0
@@ -0,0 +1,110 @@
1+---
2+title: Mistral
3+slug: ../mistral
4+---
5+
6+import TabItem from "@theme/TabItem";
7+import Tabs from "@theme/Tabs";
8+
9+:::info
10+You can get an API key from the [Mistral Dashboard](https://console.mistral.ai). Note that the API key for Codestral (codestral.mistral.ai) is different from for all other models (api.mistral.ai). If you are using a Codestral API key, you should set the `apiBase` to `https://codestral.mistral.ai/v1`. Otherwise, we will default to using `https://api.mistral.ai/v1`.
11+:::
12+
13+## Chat model
14+
15+We recommend configuring **Mistral Large** as your chat model.
16+
17+<Tabs groupId="config-example">
18+ <TabItem value="yaml" label="YAML">
19+ ```yaml title="config.yaml"
20+ models:
21+ - name: Mistral Large
22+ provider: mistral
23+ model: mistral-large-latest
24+ apiKey: <YOUR_MISTRAL_API_KEY>
25+ roles:
26+ - chat
27+ ```
28+ </TabItem>
29+ <TabItem value="json" label="JSON">
30+ ```json title="config.json"
31+ {
32+ "models": [
33+ {
34+ "title": "Mistral Large",
35+ "provider": "mistral",
36+ "model": "mistral-large-latest",
37+ "apiKey": "<YOUR_MISTRAL_API_KEY>"
38+ }
39+ ]
40+ }
41+ ```
42+ </TabItem>
43+</Tabs>
44+
45+## Autocomplete model
46+
47+We recommend configuring **Codestral** as your autocomplete model.
48+
49+<Tabs groupId="config-example">
50+ <TabItem value="yaml" label="YAML">
51+ ```yaml title="config.yaml"
52+ models:
53+ - name: Codestral
54+ provider: mistral
55+ model: codestral-latest
56+ # apiBase: https://codestral.mistral.ai/v1 # Do this if you are using a Codestral API key
57+ roles:
58+ - autocomplete
59+ ```
60+ </TabItem>
61+ <TabItem value="json" label="JSON">
62+ ```json title="config.json"
63+ {
64+ "tabAutocompleteModel": {
65+ "title": "Codestral",
66+ "provider": "mistral",
67+ "model": "codestral-latest"
68+ // "apiBase": "https://codestral.mistral.ai/v1" // Do this if you are using a Codestral API key
69+ }
70+ }
71+ ```
72+ </TabItem>
73+</Tabs>
74+
75+## Embeddings model
76+
77+We recommend configuring **Mistral Embed** as your embeddings model.
78+
79+<Tabs groupId="config-example">
80+ <TabItem value="yaml" label="YAML">
81+ ```yaml title="config.yaml"
82+ models:
83+ - name: Mistral Embed
84+ provider: mistral
85+ model: mistral-embed
86+ apiKey: <YOUR_MISTRAL_API_KEY>
87+ apiBase: https://api.mistral.ai/v1
88+ roles:
89+ - embed
90+ ```
91+ </TabItem>
92+ <TabItem value="json" label="JSON">
93+ ```json title="config.json"
94+ {
95+ "embeddingsProvider": {
96+ "provider": "mistral",
97+ "model": "mistral-embed",
98+ "apiKey": "<YOUR_MISTRAL_API_KEY>",
99+ "apiBase": "https://api.mistral.ai/v1"
100+ }
101+ }
102+ ```
103+ </TabItem>
104+</Tabs>
105+
106+## Reranking model
107+
108+Mistral currently does not offer any reranking models.
109+
110+[Click here](../../model-roles/reranking.mdx) to see a list of reranking model providers.
added docs/docs/customize/model-providers/top-level/ollama.mdx +128 −0
@@ -0,0 +1,128 @@
1+---
2+title: Ollama
3+slug: ../ollama
4+---
5+
6+import TabItem from "@theme/TabItem";
7+import Tabs from "@theme/Tabs";
8+
9+Ollama is an open-source tool that allows to run large language models (LLMs) locally on their own computers. To use Ollama, you can install it [here](https://ollama.ai/download) and download the model you want to run with the `ollama run` command.
10+
11+## Chat model
12+
13+We recommend configuring **Llama3.1 8B** as your chat model.
14+
15+<Tabs groupId="config-example">
16+ <TabItem value="yaml" label="YAML">
17+ ```yaml title="config.yaml"
18+ models:
19+ - name: Llama3.1 8B
20+ provider: ollama
21+ model: llama3.1:8b
22+ ```
23+ </TabItem>
24+ <TabItem value="json" label="JSON">
25+ ```json title="config.json"
26+ {
27+ "models": [
28+ {
29+ "title": "Llama3.1 8B",
30+ "provider": "ollama",
31+ "model": "llama3.1:8b"
32+ }
33+ ]
34+ }
35+ ```
36+ </TabItem>
37+</Tabs>
38+
39+## Autocomplete model
40+
41+We recommend configuring **Qwen2.5-Coder 1.5B** as your autocomplete model.
42+
43+<Tabs groupId="config-example">
44+ <TabItem value="yaml" label="YAML">
45+ ```yaml title="config.yaml"
46+ models:
47+ - name: Qwen2.5-Coder 1.5B
48+ provider: ollama
49+ model: qwen2.5-coder:1.5b-base
50+ roles:
51+ - autocomplete
52+ ```
53+ </TabItem>
54+ <TabItem value="json" label="JSON">
55+ ```json title="config.json"
56+ {
57+ "tabAutocompleteModel": {
58+ "title": "Qwen2.5-Coder 1.5B",
59+ "provider": "ollama",
60+ "model": "qwen2.5-coder:1.5b-base"
61+ }
62+ }
63+ ```
64+ </TabItem>
65+</Tabs>
66+
67+## Embeddings model
68+
69+We recommend configuring **Nomic Embed Text** as your embeddings model.
70+
71+<Tabs groupId="config-example">
72+ <TabItem value="yaml" label="YAML">
73+ ```yaml title="config.yaml"
74+ models:
75+ - name: Nomic Embed Text
76+ provider: ollama
77+ model: nomic-embed-text
78+ roles:
79+ - embed
80+ ```
81+ </TabItem>
82+ <TabItem value="json" label="JSON">
83+ ```json title="config.json"
84+ {
85+ "embeddingsProvider": {
86+ "provider": "ollama",
87+ "model": "nomic-embed-text"
88+ }
89+ }
90+ ```
91+ </TabItem>
92+</Tabs>
93+
94+## Reranking model
95+
96+Ollama currently does not offer any reranking models.
97+
98+[Click here](../../model-roles/reranking.mdx) to see a list of reranking model providers.
99+
100+## Using a remote instance
101+
102+To configure a remote instance of Ollama, add the `"apiBase"` property to your model in config.json:
103+
104+<Tabs groupId="config-example">
105+ <TabItem value="yaml" label="YAML">
106+ ```yaml title="config.yaml"
107+ models:
108+ - name: Llama3.1 8B
109+ provider: ollama
110+ model: llama3.1:8b
111+ apiBase: http://<my endpoint>:11434
112+ ```
113+ </TabItem>
114+ <TabItem value="json" label="JSON">
115+ ```json title="config.json"
116+ {
117+ "models": [
118+ {
119+ "title": "Llama3.1 8B",
120+ "provider": "ollama",
121+ "model": "llama3.1:8b",
122+ "apiBase": "http://<my endpoint>:11434"
123+ }
124+ ]
125+ }
126+ ```
127+ </TabItem>
128+</Tabs>
added docs/docs/customize/model-providers/top-level/openai.mdx +160 −0
@@ -0,0 +1,160 @@
1+---
2+title: OpenAI
3+slug: ../openai
4+---
5+
6+import TabItem from "@theme/TabItem";
7+import Tabs from "@theme/Tabs";
8+
9+:::info
10+You can get an API key from the [OpenAI console](https://platform.openai.com/account/api-keys)
11+:::
12+
13+## Chat model
14+
15+We recommend configuring **GPT-4o** as your chat model.
16+
17+<Tabs groupId="config-example">
18+ <TabItem value="yaml" label="YAML">
19+ ```yaml title="config.yaml"
20+ models:
21+ - name: GPT-4o
22+ provider: openai
23+ model: gpt-4o
24+ apiKey: <YOUR_OPENAI_API_KEY>
25+ ```
26+ </TabItem>
27+ <TabItem value="json" label="JSON">
28+ ```json title="config.json"
29+ {
30+ "models": [
31+ {
32+ "title": "GPT-4o",
33+ "provider": "openai",
34+ "model": "gpt-4o",
35+ "apiKey": "<YOUR_OPENAI_API_KEY>"
36+ }
37+ ]
38+ }
39+ ```
40+ </TabItem>
41+</Tabs>
42+
43+## Autocomplete model
44+
45+OpenAI currently does not offer any autocomplete models.
46+
47+[Click here](../../model-roles/autocomplete.md) to see a list of autocomplete model providers.
48+
49+## Embeddings model
50+
51+We recommend configuring **text-embedding-3-large** as your embeddings model.
52+
53+<Tabs groupId="config-example">
54+ <TabItem value="yaml" label="YAML">
55+ ```yaml title="config.yaml"
56+ models:
57+ - name: OpenAI Embeddings
58+ provider: openai
59+ model: text-embedding-3-large
60+ apiKey: <YOUR_OPENAI_API_KEY>
61+ roles:
62+ - embed
63+ ```
64+ </TabItem>
65+ <TabItem value="json" label="JSON">
66+ ```json title="config.json"
67+ {
68+ "embeddingsProvider": {
69+ "provider": "openai",
70+ "model": "text-embedding-3-large",
71+ "apiKey": "<YOUR_OPENAI_API_KEY>"
72+ }
73+ }
74+ ```
75+ </TabItem>
76+</Tabs>
77+
78+## Reranking model
79+
80+OpenAI currently does not offer any reranking models.
81+
82+[Click here](../../model-roles/reranking.mdx) to see a list of reranking model providers.
83+
84+## OpenAI compatible servers / APIs
85+
86+OpenAI compatible servers
87+
88+- [KoboldCpp](https://github.com/lostruins/koboldcpp)
89+- [text-gen-webui](https://github.com/oobabooga/text-generation-webui/tree/main/extensions/openai#setup--installation)
90+- [FastChat](https://github.com/lm-sys/FastChat/blob/main/docs/openai_api.md)
91+- [LocalAI](https://localai.io/basics/getting_started/)
92+- [llama-cpp-python](https://github.com/abetlen/llama-cpp-python#web-server)
93+- [TensorRT-LLM](https://github.com/NVIDIA/trt-llm-as-openai-windows?tab=readme-ov-file#examples)
94+- [vLLM](https://docs.vllm.ai/en/latest/serving/openai_compatible_server.html)
95+- [BerriAI/litellm](https://github.com/BerriAI/litellm)
96+
97+OpenAI compatible APIs
98+
99+- [Anyscale Endpoints](https://github.com/continuedev/deploy-os-code-llm#others)
100+- [Anyscale Private Endpoints](https://github.com/continuedev/deploy-os-code-llm#anyscale-private-endpoints)
101+
102+If you are using an OpenAI compatible server / API, you can change the `apiBase` like this:
103+
104+<Tabs groupId="config-example">
105+ <TabItem value="yaml" label="YAML">
106+ ```yaml title="config.yaml"
107+ models:
108+ - name: OpenAI-compatible server / API
109+ provider: openai
110+ model: MODEL_NAME
111+ apiBase: http://localhost:8000/v1
112+ apiKey: <YOUR_CUSTOM_API_KEY>
113+ ```
114+ </TabItem>
115+ <TabItem value="json" label="JSON">
116+ ```json title="config.json"
117+ {
118+ "models": [
119+ {
120+ "title": "OpenAI-compatible server / API",
121+ "provider": "openai",
122+ "model": "MODEL_NAME",
123+ "apiKey": "<YOUR_CUSTOM_API_KEY>",
124+ "apiBase": "http://localhost:8000/v1"
125+ }
126+ ]
127+ }
128+ ```
129+ </TabItem>
130+</Tabs>
131+
132+To force usage of `chat/completions` instead of `completions` endpoint you can set:
133+
134+<Tabs groupId="config-example">
135+ <TabItem value="yaml" label="YAML">
136+ ```yaml title="config.yaml"
137+ models:
138+ - name: OpenAI-compatible server / API
139+ provider: openai
140+ model: MODEL_NAME
141+ apiBase: http://localhost:8000/v1
142+ useLegacyCompletionsEndpoint: true
143+ ```
144+ </TabItem>
145+ <TabItem value="json" label="JSON">
146+ ```json title="config.json"
147+ {
148+ "models": [
149+ {
150+ "title": "OpenAI-compatible server / API",
151+ "provider": "openai",
152+ "model": "MODEL_NAME",
153+ "apiBase": "http://localhost:8000/v1",
154+ "useLegacyCompletionsEndpoint": true
155+ }
156+ ]
157+ }
158+ ```
159+ </TabItem>
160+</Tabs>
added docs/docs/customize/model-providers/top-level/vertexai.mdx +146 −0
@@ -0,0 +1,146 @@
1+---
2+title: Vertex AI
3+slug: ../vertexai
4+---
5+
6+import TabItem from "@theme/TabItem";
7+import Tabs from "@theme/Tabs";
8+
9+:::info
10+You need to enable the [Vertex AI API](https://console.cloud.google.com/marketplace/product/google/aiplatform.googleapis.com) and set up the [Google Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc).
11+:::
12+
13+## Chat model
14+
15+We recommend configuring **Claude 3.5 Sonnet** as your chat model.
16+
17+<Tabs groupId="config-example">
18+ <TabItem value="yaml" label="YAML">
19+ ```yaml title="config.yaml"
20+ models:
21+ - name: Claude 3.5 Sonnet
22+ provider: vertexai
23+ model: claude-3-5-sonnet-20240620
24+ env:
25+ projectId: <PROJECT_ID>
26+ region: us-east5
27+ ```
28+ </TabItem>
29+ <TabItem value="json" label="JSON">
30+ ```json title="config.json"
31+ {
32+ "models": [
33+ {
34+ "title": "Claude 3.5 Sonnet",
35+ "provider": "vertexai",
36+ "model": "claude-3-5-sonnet-20240620",
37+ "projectId": "[PROJECT_ID]",
38+ "region": "us-east5"
39+ }
40+ ]
41+ }
42+ ```
43+ </TabItem>
44+</Tabs>
45+
46+## Autocomplete model
47+
48+We recommend configuring **Codestral** or **code-gecko** as your autocomplete model.
49+
50+<Tabs groupId="config-example">
51+ <TabItem value="yaml" label="YAML">
52+ ```yaml title="config.yaml"
53+ models:
54+ - name: Codestral (Vertex AI)
55+ provider: vertexai
56+ model: codestral
57+ roles:
58+ - autocomplete
59+ env:
60+ projectId: <PROJECT_ID>
61+ region: us-central1
62+
63+ ```
64+ </TabItem>
65+ <TabItem value="json" label="JSON">
66+ ```json title="config.json"
67+ {
68+ "tabAutocompleteModel": {
69+ "title": "Codestral (Vertex AI)",
70+ "provider": "vertexai",
71+ "model": "codestral",
72+ "projectId": "[PROJECT_ID]",
73+ "region": "us-central1"
74+ }
75+ }
76+ ```
77+ </TabItem>
78+</Tabs>
79+
80+## Embeddings model
81+
82+We recommend configuring **text-embedding-004** as your embeddings model.
83+
84+<Tabs groupId="config-example">
85+ <TabItem value="yaml" label="YAML">
86+ ```yaml title="config.yaml"
87+ models:
88+ - name: Text Embedding-004
89+ provider: vertexai
90+ model: text-embedding-004
91+ env:
92+ projectId: <PROJECT_ID>
93+ region: us-central1
94+ roles:
95+ - embed
96+ ```
97+ </TabItem>
98+ <TabItem value="json" label="JSON">
99+ ```json title="config.json"
100+ {
101+ "embeddingsProvider": {
102+ "provider": "vertexai",
103+ "model": "text-embedding-004",
104+ "projectId": "[PROJECT_ID]",
105+ "region": "us-central1"
106+ }
107+ }
108+ ```
109+ </TabItem>
110+</Tabs>
111+
112+## Reranking model
113+
114+Vertex AI currently does not offer any reranking models.
115+
116+[Click here](../../model-roles/reranking.mdx) to see a list of reranking model providers.
117+
118+## Express mode
119+
120+You can use VertexAI in [express mode](https://cloud.google.com/vertex-ai/generative-ai/docs/start/express-mode/overview) by only providing an API Key. Only some Gemini models are supported in express mode for now.
121+
122+<Tabs groupId="config-example">
123+ <TabItem value="yaml" label="YAML">
124+ ```yaml title="config.yaml"
125+ models:
126+ - name: Gemini 2.5 Flash - VertexAI
127+ provider: vertexai
128+ model: gemini-2.5-flash
129+ apiKey: ${{ secrets.GOOGLE_CLOUD_API_KEY }}
130+ ```
131+ </TabItem>
132+ <TabItem value="json" label="JSON">
133+ ```json title="config.json"
134+ {
135+ "models": [
136+ {
137+ "title": "Gemini 2.5 Flash - VertexAI",
138+ "provider": "vertexai",
139+ "model": "gemini-2.5-flash",
140+ "apiKey": "[YOUR_GOOGLE_CLOUD_API_KEY]",
141+ }
142+ ]
143+ }
144+ ```
145+ </TabItem>
146+</Tabs>
added docs/docs/customize/model-providers/top-level/xAI.mdx +62 −0
@@ -0,0 +1,62 @@
1+---
2+title: xAI
3+slug: ../xai
4+---
5+
6+import TabItem from "@theme/TabItem";
7+import Tabs from "@theme/Tabs";
8+
9+:::info
10+You can get an API key from the [xAI console](https://console.x.ai/)
11+:::
12+
13+## Chat model
14+
15+We recommend configuring **grok-2-latest** as your chat model. For information on other available models, visit [xAI Documentation](https://docs.x.ai/docs/models).
16+
17+<Tabs groupId="hub-config-example">
18+ <TabItem value="hub" label="Config">
19+ Add the [xAI Grok 2 model block](https://hub.continue.dev/xai/grok-2) on the hub.
20+ </TabItem>
21+ <TabItem value="yaml" label="YAML">
22+ ```yaml title="config.yaml"
23+ models:
24+ - name: Grok 2
25+ provider: xAI
26+ model: grok-2-latest
27+ apiKey: <YOUR_XAI_API_KEY>
28+ ```
29+ </TabItem>
30+ <TabItem value="json" label="JSON">
31+ ```json title="config.json"
32+ {
33+ "models": [
34+ {
35+ "title": "Grok 2",
36+ "provider": "xAI",
37+ "model": "grok-2-latest",
38+ "apiKey": "<YOUR_XAI_API_KEY>"
39+ }
40+ ]
41+ }
42+ ```
43+ </TabItem>
44+</Tabs>
45+
46+## Autocomplete model
47+
48+xAI currently does not offer any autocomplete models.
49+
50+[Click here](../../model-roles/autocomplete.md) to see a list of autocomplete model providers.
51+
52+## Embeddings model
53+
54+xAI currently does not offer any embeddings models.
55+
56+[Click here](../../model-roles/embeddings.mdx) to see a list of embeddings model providers.
57+
58+## Reranking model
59+
60+xAI currently does not offer any reranking models.
61+
62+[Click here](../../model-roles/reranking.mdx) to see a list of reranking model providers.
added docs/docs/customize/model-roles/00-intro.mdx +31 −0
@@ -0,0 +1,31 @@
1+---
2+title: Intro to Roles
3+description: Apply model role
4+keywords: [apply, model, role]
5+sidebar_position: 0
6+sidebar_label: Introduction
7+---
8+
9+import TabItem from "@theme/TabItem";
10+import Tabs from "@theme/Tabs";
11+
12+Models in Continue can be configured to be used for various roles in the extension.
13+
14+- [`chat`](./chat.mdx): Used for chat conversations in the extension sidebar
15+- [`autocomplete`](./autocomplete.md): Used for autocomplete code suggestions in the editor
16+- [`edit`](./edit.mdx): Used to generate code based on edit prompts
17+- [`apply`](./apply.mdx): Used to decide how to apply edits to a file
18+- [`embed`](./embeddings.mdx): Used to generate embeddings used for vector search (@Codebase and @Docs context providers)
19+- [`rerank`](./reranking.mdx): Used to rerank results from vector search
20+
21+These roles can be specified for a `config.yaml` model block using `roles`. See the [YAML Specification](/reference#models) for more details.
22+
23+## Selecting model roles
24+
25+You can control which of the models in your assistant for a given role will be currently used for that role. Above the main input, click the 3 dots and then the cube icon to expand the `Models` section. Then you can use the dropdowns to select an active model for each role.
26+
27+![Settings Active Models Section](/img/settings-model-roles.png)
28+
29+:::info
30+`roles` are not explicitly defined within `config.json` (deprecated) - they are infered by the top level keys like `embeddingsProvider`
31+:::
added docs/docs/customize/model-roles/_category_.json +4 −0
@@ -0,0 +1,4 @@
1+{
2+ "label": "Model Roles",
3+ "position": 5
4+}
added docs/docs/customize/model-roles/apply.mdx +42 −0
@@ -0,0 +1,42 @@
1+---
2+title: Apply Role
3+description: Apply model role
4+keywords: [apply, model, role]
5+sidebar_position: 4
6+---
7+
8+When editing code, Chat and Edit model output often doesn't clearly align with existing code. A model with the `apply` role is used to generate a more precise diff to apply changes to a file.
9+
10+## Recommended Apply models
11+
12+We recommend [Morph Fast Apply](https://morphllm.com) or [Relace's Instant Apply model](https://hub.continue.dev/relace/instant-apply) for the fastest Apply experience. You can sign up for Morph's free tier [here](https://morphllm.com/dashboard) or get a Relace API key [here](https://app.relace.ai/settings/api-keys).
13+
14+However, most Chat models can also be used for applying code changes. We recommend smaller/cheaper models for the task, such as Claude 3.5 Haiku.
15+
16+:::info
17+Explore all apply models in [the Hub](https://hub.continue.dev/explore/models?roles=apply)
18+:::
19+
20+## Prompt templating
21+
22+You can customize the prompt template used for applying code changes by setting the `promptTemplates.apply` property in your model configuration. Continue uses [Handlebars syntax](https://handlebarsjs.com/guide/) for templating.
23+
24+Available variables for the apply template:
25+
26+- `{{{original_code}}}` - The original code before changes
27+- `{{{new_code}}}` - The new code after changes
28+
29+Example:
30+
31+```yaml
32+models:
33+ - name: My Custom Apply Template
34+ provider: anthropic
35+ model: claude-3-5-sonnet-latest
36+ promptTemplates:
37+ apply: |
38+ Original: {{{original_code}}}
39+ New: {{{new_code}}}
40+
41+ Please generate the final code without any markers or explanations.
42+```
added docs/docs/customize/model-roles/autocomplete.md +41 −0
@@ -0,0 +1,41 @@
1+---
2+title: Autocomplete Role
3+description: Autocomplete model role
4+keywords: [autocomplete, model, role]
5+sidebar_position: 2
6+---
7+
8+An "autocomplete model" is an LLM that is trained on a special format called fill-in-the-middle (FIM). This format is designed to be given the prefix and suffix of a code file and predict what goes between. This task is very specific, which on one hand means that the models can be smaller (even a 3B parameter model can perform well). On the other hand, this means that Chat models, though larger, will often perform poorly even with extensive prompting.
9+
10+In Continue, autocomplete models are used to display inline [Autocomplete](../../features/autocomplete/quick-start) suggestions as you type. Autocomplete models are designated by adding the `autocomplete` to the model's `roles` in `config.yaml`.
11+
12+## Recommended Autocomplete models
13+
14+Visit the [Autocomplete Deep Dive](../deep-dives/autocomplete.mdx) for recommended models and more details.
15+
16+## Prompt templating
17+
18+You can customize the prompt template used when autocomplete happens by setting the `promptTemplates.autocomplete` property in your model configuration. Continue uses [Handlebars syntax](https://handlebarsjs.com/guide/) for templating.
19+
20+Available variables for the apply template:
21+
22+- `{{{prefix}}}` - the code before your cursor
23+- `{{{suffix}}}` - the code after your cursor
24+- `{{{filename}}}` - the name of the file your cursor currently is
25+- `{{{reponame}}}` - the name of the folder where the codebase is
26+- `{{{language}}}` - the name of the programming language in full (ex. Typescript)
27+
28+Example:
29+
30+```yaml
31+models:
32+ - name: My Custom Autocomplete Template
33+ provider: ollama
34+ model: qwen2.5-coder:1.5b
35+ promptTemplates:
36+ autocomplete: |
37+ `
38+ globalThis.importantFunc = importantFunc
39+ <|fim_prefix|>{{{prefix}}}<|fim_suffix|>{{{suffix}}}<|fim_middle|>
40+ `
41+```
added docs/docs/customize/model-roles/chat.mdx +407 −0
@@ -0,0 +1,407 @@
1+---
2+title: Chat Role
3+description: Chat model role
4+keywords: [chat, model, role]
5+sidebar_position: 1
6+---
7+
8+import TabItem from "@theme/TabItem";
9+import Tabs from "@theme/Tabs";
10+
11+A "chat model" is an LLM that is trained to respond in a conversational format. Because they should be able to answer general questions and generate complex code, the best chat models are typically large, often 405B+ parameters.
12+
13+In Continue, these models are used for normal [Chat](../../features/chat/quick-start) and [VS Code actions](../deep-dives/vscode-actions.md). The selected chat model will also be used for [Edit](../../features/edit/quick-start) and [Apply](./apply.mdx) if no `edit` or `apply` models are specified, respectively.
14+
15+## Recommended Chat models
16+
17+## Best overall experience
18+
19+For the best overall Chat experience, you will want to use a 400B+ parameter model or one of the frontier models.
20+
21+### Claude Sonnet 3.7 from Anthropic
22+
23+Our current top recommendation is Claude 3.7 Sonnet from [Anthropic](../model-providers/top-level/anthropic.mdx).
24+
25+<Tabs groupId="hub-config-example">
26+ <TabItem value="hub" label="Hub">
27+ View the [Claude 3.7 Sonnet model block](https://hub.continue.dev/anthropic/claude-3-7-sonnet) on the hub.
28+ </TabItem>
29+ <TabItem value="yaml" label="YAML">
30+ ```yaml title="config.yaml"
31+ models:
32+ - name: Claude 3.7 Sonnet
33+ provider: anthropic
34+ model: claude-3-7-sonnet-latest
35+ apiKey: <YOUR_ANTHROPIC_API_KEY>
36+ ```
37+ </TabItem>
38+ <TabItem value="json" label="JSON">
39+ ```json title="config.json"
40+ {
41+ "models": [
42+ {
43+ "title": "Claude 3.5 Sonnet",
44+ "provider": "anthropic",
45+ "model": "claude-3-5-sonnet-latest",
46+ "apiKey": "<YOUR_ANTHROPIC_API_KEY>"
47+ }
48+ ]
49+ }
50+ ```
51+ </TabItem>
52+</Tabs>
53+
54+### Gemma from Google DeepMind
55+
56+If you prefer to use an open-weight model, then the Gemma family of Models from Google DeepMind is a good choice. You will need to decide if you use it through a SaaS model provider, e.g. [Together](../model-providers/more/together.mdx), or self-host it, e.g. [Ollama](../model-providers/top-level/ollama.mdx).
57+
58+<Tabs groupId="config-example">
59+ <TabItem value="hub" label="Hub">
60+ <Tabs groupId="providers">
61+ <TabItem value="Ollama">
62+ Add the [Ollama Gemma 3 27B block](https://hub.continue.dev/ollama/gemma3-27b) from the hub
63+ </TabItem>
64+ <TabItem value="Together">
65+ Add the [Together Gemma 2 27B Instruct block](https://hub.continue.dev/togetherai/gemma-2-instruct-27b) from the hub
66+ </TabItem>
67+ </Tabs>
68+ </TabItem>
69+ <TabItem value="yaml" label="YAML">
70+ <Tabs groupId="providers">
71+ <TabItem value="Ollama">
72+ ```yaml title="config.yaml"
73+ models:
74+ - name: "Gemma 3 27B"
75+ provider: "ollama"
76+ model: "gemma3:27b"
77+ ```
78+ </TabItem>
79+ <TabItem value="Together">
80+ ```yaml title="config.yaml"
81+ models:
82+ - name: "Gemma 3 27B"
83+ provider: "together"
84+ model: "google/gemma-2-27b-it"
85+ apiKey: <YOUR_TOGETHER_API_KEY>
86+ ```
87+ </TabItem>
88+ </Tabs>
89+ </TabItem>
90+ <TabItem value="json" label="JSON">
91+ <Tabs groupId="providers">
92+ <TabItem value="Ollama">
93+ ```json title="config.json"
94+ {
95+ "models": [
96+ {
97+ "title": "Gemma 3 27B",
98+ "provider": "ollama",
99+ "model": "gemma3:27b"
100+ }
101+ ]
102+ }
103+ ```
104+ </TabItem>
105+ <TabItem value="Together">
106+ ```json title="config.json"
107+ {
108+ "models": [
109+ {
110+ "title": "Gemma 3 27B",
111+ "provider": "together",
112+ "model": "google/gemma-2-27b-it",
113+ "apiKey": "<YOUR_TOGETHER_API_KEY>"
114+ }
115+ ]
116+ }
117+ ```
118+ </TabItem>
119+ </Tabs>
120+ </TabItem>
121+</Tabs>
122+
123+### GPT-4o from OpenAI
124+
125+If you prefer to use a model from [OpenAI](../model-providers/top-level/openai.mdx), then we recommend GPT-4o.
126+
127+<Tabs groupId="hub-config-example">
128+ <TabItem value="hub" label="Hub">
129+ Add the [OpenAI GPT-4o block](https://hub.continue.dev/openai/gpt-4o) from the hub
130+ </TabItem>
131+ <TabItem value="yaml" label="YAML">
132+ ```yaml title="config.yaml"
133+ models:
134+ - name: GPT-4o
135+ provider: openai
136+ model: ''
137+ apiKey: <YOUR_OPENAI_API_KEY>
138+ ```
139+ </TabItem>
140+ <TabItem value="json" label="JSON">
141+ ```json title="config.json"
142+ {
143+ "models": [
144+ {
145+ "title": "GPT-4o",
146+ "provider": "openai",
147+ "model": "",
148+ "apiKey": "<YOUR_OPENAI_API_KEY>"
149+ }
150+ ]
151+ }
152+ ```
153+ </TabItem>
154+</Tabs>
155+
156+### Grok-2 from xAI
157+
158+If you prefer to use a model from [xAI](../model-providers/top-level/xAI.mdx), then we recommend Grok-2.
159+
160+<Tabs groupId="hub-config-example">
161+ <TabItem value="hub" label="Hub">
162+ Add the [xAI Grok-2 block](https://hub.continue.dev/xai/grok-2) from the hub
163+ </TabItem>
164+ <TabItem value="yaml" label="YAML">
165+ ```yaml title="config.yaml"
166+ models:
167+ - name: Grok-2
168+ provider: xAI
169+ model: grok-2-latest
170+ apiKey: <YOUR_XAI_API_KEY>
171+ ```
172+ </TabItem>
173+ <TabItem value="json" label="JSON">
174+ ```json title="config.json"
175+ {
176+ "models": [
177+ {
178+ "title": "Grok-2",
179+ "provider": "xAI",
180+ "model": "grok-2-latest",
181+ "apiKey": "<YOUR_XAI_API_KEY>"
182+ }
183+ ]
184+ }
185+ ```
186+ </TabItem>
187+</Tabs>
188+
189+### Gemini 2.0 Flash from Google
190+
191+If you prefer to use a model from [Google](../model-providers/top-level/gemini.mdx), then we recommend Gemini 2.0 Flash.
192+
193+<Tabs groupId="hub-config-example">
194+ <TabItem value="hub" label="Hub">
195+ Add the [Gemini 2.0 Flash block](https://hub.continue.dev/google/gemini-2.0-flash) from the hub
196+ </TabItem>
197+ <TabItem value="yaml" label="YAML">
198+ ```yaml title="config.yaml"
199+ models:
200+ - name: Gemini 2.0 Flash
201+ provider: gemini
202+ model: gemini-2.0-flash
203+ apiKey: <YOUR_GEMINI_API_KEY>
204+ ```
205+ </TabItem>
206+ <TabItem value="json" label="JSON">
207+ ```json title="config.json"
208+ {
209+ "models": [
210+ {
211+ "title": "Gemini 2.0 Flash",
212+ "provider": "gemini",
213+ "model": "gemini-2.0-flash",
214+ "apiKey": "<YOUR_GEMINI_API_KEY>"
215+ }
216+ ]
217+ }
218+ ```
219+ </TabItem>
220+</Tabs>
221+
222+## Local, offline experience
223+
224+For the best local, offline Chat experience, you will want to use a model that is large but fast enough on your machine.
225+
226+### Llama 3.1 8B
227+
228+If your local machine can run an 8B parameter model, then we recommend running Llama 3.1 8B on your machine (e.g. using [Ollama](../model-providers/top-level/ollama.mdx) or [LM Studio](../model-providers/more/lmstudio.mdx)).
229+
230+<Tabs groupId="hub-config-example">
231+ <TabItem value="hub" label="Hub">
232+ <Tabs groupId="providers">
233+ <TabItem value="ollama" label="Ollama">
234+ Add the [Ollama Llama 3.1 8b block](https://hub.continue.dev/ollama/llama3.1-8b) from the hub
235+ </TabItem>
236+ {/* HUB_TODO nonexistent block */}
237+ {/* <TabItem value="lmstudio" label="LM Studio">
238+ Add the [LM Studio Llama 3.1 8b block](https://hub.continue.dev/explore/models) from the hub
239+ </TabItem> */}
240+ </Tabs>
241+ </TabItem>
242+ <TabItem value="yaml" label="YAML">
243+ <Tabs groupId="providers">
244+ <TabItem value="Ollama">
245+ ```yaml title="config.yaml"
246+ models:
247+ - name: Llama 3.1 8B
248+ provider: ollama
249+ model: llama3.1:8b
250+ ```
251+ </TabItem>
252+ <TabItem value="LM Studio">
253+ ```yaml title="config.yaml"
254+ models:
255+ - name: Llama 3.1 8B
256+ provider: lmstudio
257+ model: llama3.1:8b
258+ ```
259+ </TabItem>
260+ <TabItem value="Msty">
261+ ```yaml title="config.yaml"
262+ models:
263+ - name: Llama 3.1 8B
264+ provider: msty
265+ model: llama3.1:8b
266+ ```
267+ </TabItem>
268+ </Tabs>
269+ </TabItem>
270+ <TabItem value="json" label="JSON">
271+ <Tabs groupId="providers">
272+ <TabItem value="Ollama">
273+ ```json title="config.json"
274+ {
275+ "models": [
276+ {
277+ "title": "Llama 3.1 8B",
278+ "provider": "ollama",
279+ "model": "llama3.1:8b"
280+ }
281+ ]
282+ }
283+ ```
284+ </TabItem>
285+ <TabItem value="LM Studio">
286+ ```json title="config.json"
287+ {
288+ "models": [
289+ {
290+ "title": "Llama 3.1 8B",
291+ "provider": "lmstudio",
292+ "model": "llama3.1-8b"
293+ }
294+ ]
295+ }
296+ ```
297+ </TabItem>
298+ <TabItem value="Msty">
299+ ```json title="config.json"
300+ {
301+ "models": [
302+ {
303+ "title": "Llama 3.1 8B",
304+ "provider": "msty",
305+ "model": "llama3.1-8b"
306+ }
307+ ]
308+ }
309+ ```
310+ </TabItem>
311+ </Tabs>
312+ </TabItem>
313+</Tabs>
314+
315+### DeepSeek Coder 2 16B
316+
317+If your local machine can run a 16B parameter model, then we recommend running DeepSeek Coder 2 16B (e.g. using [Ollama](../model-providers/top-level/ollama.mdx) or [LM Studio](../model-providers/more/lmstudio.mdx)).
318+
319+<Tabs groupId="config-example">
320+ {/* HUB_TODO nonexistent blocks */}
321+ {/* <TabItem value="hub" label="Hub">
322+ <Tabs groupId="providers">
323+ <TabItem value="ollama" label="Ollama">
324+ Add the [Ollama Deepseek Coder 2 16B block](https://hub.continue.dev/explore/models) from the hub
325+ </TabItem>
326+ <TabItem value="lmstudio" label="LM Studio">
327+ Add the [LM Studio Deepseek Coder 2 16B block](https://hub.continue.dev/explore/models) from the hub
328+ </TabItem>
329+ </Tabs>
330+ </TabItem> */}
331+ <TabItem value="yaml" label="YAML">
332+ <Tabs groupId="providers">
333+ <TabItem value="Ollama">
334+ ```yaml title="config.yaml"
335+ models:
336+ - name: DeepSeek Coder 2 16B
337+ provider: ollama
338+ model: deepseek-coder-v2:16b
339+ ```
340+ </TabItem>
341+ <TabItem value="LM Studio">
342+ ```yaml title="config.yaml"
343+ models:
344+ - name: DeepSeek Coder 2 16B
345+ provider: lmstudio
346+ model: deepseek-coder-v2:16b
347+ ```
348+ </TabItem>
349+ <TabItem value="Msty">
350+ ```yaml title="config.yaml"
351+ models:
352+ - name: DeepSeek Coder 2 16B
353+ provider: msty
354+ model: deepseek-coder-v2:16b
355+ ```
356+ </TabItem>
357+ </Tabs>
358+ </TabItem>
359+ <TabItem value="json" label="JSON">
360+ <Tabs groupId="providers">
361+ <TabItem value="Ollama">
362+ ```json title="config.json"
363+ {
364+ "models": [
365+ {
366+ "title": "DeepSeek Coder 2 16B",
367+ "provider": "ollama",
368+ "model": "deepseek-coder-v2:16b",
369+ "apiBase": "http://localhost:11434"
370+ }
371+ ]
372+ }
373+ ```
374+ </TabItem>
375+ <TabItem value="LM Studio">
376+ ```json title="config.json"
377+ {
378+ "models": [
379+ {
380+ "title": "DeepSeek Coder 2 16B",
381+ "provider": "lmstudio",
382+ "model": "deepseek-coder-v2:16b"
383+ }
384+ ]
385+ }
386+ ```
387+ </TabItem>
388+ <TabItem value="Msty">
389+ ```json title="config.json"
390+ {
391+ "models": [
392+ {
393+ "title": "DeepSeek Coder 2 16B",
394+ "provider": "msty",
395+ "model": "deepseek-coder-v2:16b"
396+ }
397+ ]
398+ }
399+ ```
400+ </TabItem>
401+ </Tabs>
402+ </TabItem>
403+</Tabs>
404+
405+## Other experiences
406+
407+There are many more models and providers you can use with Chat beyond those mentioned above. Read more [here](../model-roles/chat.mdx)
added docs/docs/customize/model-roles/edit.mdx +82 −0
@@ -0,0 +1,82 @@
1+---
2+title: Edit Role
3+description: Edit model role
4+keywords: [edit, editing, model, role]
5+sidebar_position: 3
6+---
7+
8+import TabItem from "@theme/TabItem";
9+import Tabs from "@theme/Tabs";
10+
11+It's often useful to select a different model to respond to Edit prompts than for chat prompts, as Edits are often more code-specific and may require less conversational readability.
12+
13+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.
14+
15+<Tabs groupId="config-example">
16+ <TabItem value="yaml" label="YAML">
17+ Use model roles.
18+ ```yaml title="config.yaml"
19+ models:
20+ - name: Claude 3.5 Sonnet
21+ provider: anthropic
22+ model: claude-3-5-sonnet-latest
23+ apiKey: <YOUR_ANTHROPIC_API_KEY>
24+ roles:
25+ - edit
26+ ```
27+ </TabItem>
28+ <TabItem value="json" label="JSON">
29+ Set the `experimental.modelRoles.inlineEdit` property in `config.json`.
30+ ```json title="config.json"
31+ {
32+ "models": {
33+ "name": "Claude 3.5 Sonnet",
34+ "provider": "anthropic",
35+ "model": "claude-3-5-sonnet-latest",
36+ "apiKey": "<YOUR_ANTHROPIC_API_KEY>"
37+ },
38+ "experimental": {
39+ "modelRoles": {
40+ "inlineEdit": "Claude 3.5 Sonnet",
41+ }
42+ }
43+ }
44+ ```
45+ </TabItem>
46+</Tabs>
47+
48+Explore edit models in [the hub](https://hub.continue.dev/explore/models?roles=edit). Generally, our recommendations for Edit overlap with recommendations for Chat.
49+
50+## Prompt templating
51+
52+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.
53+
54+Available variables for the edit template:
55+
56+- `{{{userInput}}}` - The user's edit request/instruction
57+- `{{{language}}}` - The programming language of the code
58+- `{{{codeToEdit}}}` - The code that's being edited
59+- `{{{prefix}}}` - Content before the edit area
60+- `{{{suffix}}}` - Content after the edit area
61+- `{{{supportsCompletions}}}` - Whether the model supports completions API
62+- `{{{supportsPrefill}}}` - Whether the model supports prefill capability
63+
64+Example:
65+
66+```yaml
67+models:
68+ - name: My Custom Edit Template
69+ provider: openai
70+ model: gpt-4o
71+ promptTemplates:
72+ edit: |
73+ `Here is the code before editing:
74+ \`\`\`{{{language}}}
75+ {{{codeToEdit}}}
76+ \`\`\`
77+
78+ Here is the edit requested:
79+ "{{{userInput}}}"
80+
81+ Here is the code after editing:`
82+```
added docs/docs/customize/model-roles/embeddings.mdx +154 −0
@@ -0,0 +1,154 @@
1+---
2+title: Embed Role
3+description: Embed model role
4+keywords: [embedding, model, role, embeddings]
5+sidebar_position: 5
6+---
7+
8+import TabItem from "@theme/TabItem";
9+import Tabs from "@theme/Tabs";
10+
11+An "embeddings model" is trained to convert a piece of text into a vector, which can later be rapidly compared to other vectors to determine similarity between the pieces of text. Embeddings models are typically much smaller than LLMs, and will be extremely fast and cheap in comparison.
12+
13+In Continue, embeddings are generated during indexing and then used by [@Codebase](../context/codebase.mdx) to perform similarity search over your codebase.
14+
15+You can add `embed` to a model's `roles` to specify that it can be used to embed.
16+
17+:::info[Built-in model (VS Code only)]
18+`transformers.js` is used as a built-in embeddings model in VS Code. In JetBrains, there currently is no built-in embedder.
19+:::
20+
21+## Recommended embedding models
22+
23+If you have the ability to use any model, we recommend `voyage-code-3`, which is listed below along with the rest of the options for embeddings models.
24+
25+If you want to generate embeddings locally, we recommend using `nomic-embed-text` with [Ollama](../model-providers/top-level/ollama.mdx#embeddings-model).
26+
27+### Voyage AI
28+
29+After obtaining an API key from [here](https://www.voyageai.com/), you can configure like this:
30+
31+<Tabs groupId="hub-config-example">
32+ <TabItem value="hub" label="Hub">
33+ [Voyage Code 3 Embedder Block](https://hub.continue.dev/voyageai/voyage-code-3)
34+ </TabItem>
35+ <TabItem value="yaml" label="YAML">
36+ ```yaml title="config.yaml"
37+ models:
38+ - name: Voyage Code 3
39+ provider: voyage
40+ model: voyage-code-3
41+ apiKey: <YOUR_VOYAGE_API_KEY>
42+ roles:
43+ - embed
44+ ```
45+ </TabItem>
46+ <TabItem value="json" label="JSON">
47+ ```json title="config.json"
48+ {
49+ "embeddingsProvider": {
50+ "provider": "voyage",
51+ "model": "voyage-code-3",
52+ "apiKey": "<YOUR_VOYAGE_API_KEY>"
53+ }
54+ }
55+ ```
56+ </TabItem>
57+</Tabs>
58+
59+### Ollama
60+
61+See [here](../model-providers/top-level/ollama.mdx#embeddings-model) for instructions on how to use Ollama for embeddings.
62+
63+### Transformers.js (currently VS Code only)
64+
65+[Transformers.js](https://huggingface.co/docs/transformers.js/index) is a JavaScript port of the popular [Transformers](https://huggingface.co/transformers/) library. It allows embeddings to be calculated entirely locally. The model used is `all-MiniLM-L6-v2`, which is shipped alongside the Continue extension.
66+
67+<Tabs groupId="config-example">
68+ <TabItem value="yaml" label="YAML">
69+ ```yaml title="config.yaml"
70+ models:
71+ - name: default-transformers
72+ provider: transformers.js
73+ roles:
74+ - embed
75+ ```
76+ </TabItem>
77+ <TabItem value="json" label="JSON">
78+ ```json title="config.json"
79+ {
80+ "embeddingsProvider": {
81+ "provider": "transformers.js"
82+ }
83+ }
84+ ```
85+ </TabItem>
86+</Tabs>
87+
88+### Text Embeddings Inference
89+
90+[Hugging Face Text Embeddings Inference](https://huggingface.co/docs/text-embeddings-inference/en/index) enables you to host your own embeddings endpoint. You can configure embeddings to use your endpoint as follows:
91+
92+<Tabs groupId="config-example">
93+ {/* HUB_TODO nonexistent block */}
94+ {/* <TabItem value="hub" label="Hub">
95+ [HuggingFace Text Embedder Block](https://hub.continue.dev/)
96+ </TabItem> */}
97+ <TabItem value="yaml" label="YAML">
98+ ```yaml title="config.yaml"
99+ models:
100+ - name: Huggingface TEI Embedder
101+ provider: huggingface-tei
102+ apiBase: http://localhost:8080
103+ apiKey: <YOUR_TEI_API_KEY>
104+ roles: [embed]
105+ ```
106+ </TabItem>
107+ <TabItem value="json" label="JSON">
108+ ```json title="config.json"
109+ {
110+ "embeddingsProvider": {
111+ "provider": "huggingface-tei",
112+ "apiBase": "http://localhost:8080",
113+ "apiKey": "<YOUR_TEI_API_KEY>"
114+ }
115+ }
116+ ```
117+ </TabItem>
118+</Tabs>
119+
120+### OpenAI
121+
122+See [here](../model-providers/top-level/openai.mdx#embeddings-model) for instructions on how to use OpenAI for embeddings.
123+
124+### Cohere
125+
126+See [here](../model-providers/more/cohere.mdx#embeddings-model) for instructions on how to use Cohere for embeddings.
127+
128+### Gemini
129+
130+See [here](../model-providers/top-level/gemini.mdx#embeddings-model) for instructions on how to use Gemini for embeddings.
131+
132+### Vertex
133+
134+See [here](../model-providers/top-level/vertexai.mdx#embeddings-model) for instructions on how to use Vertex for embeddings.
135+
136+### Mistral
137+
138+See [here](../model-providers/top-level/mistral.mdx#embeddings-model) for instructions on how to use Mistral for embeddings.
139+
140+### NVIDIA
141+
142+See [here](../model-providers/more/nvidia.mdx#embeddings-model) for instructions on how to use NVIDIA for embeddings.
143+
144+### Bedrock
145+
146+See [here](../model-providers/top-level/bedrock.mdx#embeddings-model) for instructions on how to use Bedrock for embeddings.
147+
148+### WatsonX
149+
150+See [here](../model-providers/more/watsonx.mdx#embeddings-model) for instructions on how to use WatsonX for embeddings.
151+
152+### LMStudio
153+
154+See [here](../model-providers/more/lmstudio.mdx#embeddings-model) for instructions on how to use LMStudio for embeddings.
added docs/docs/customize/model-roles/reranking.mdx +156 −0
@@ -0,0 +1,156 @@
1+---
2+title: Rerank Role
3+description: Rerank model role
4+keywords: [rerank, reranking, model, role]
5+sidebar_position: 6
6+---
7+
8+import TabItem from "@theme/TabItem";
9+import Tabs from "@theme/Tabs";
10+
11+A "reranking model" is trained to take two pieces of text (often a user question and a document) and return a relevancy score between 0 and 1, estimating how useful the document will be in answering the question. Rerankers are typically much smaller than LLMs, and will be extremely fast and cheap in comparison.
12+
13+In Continue, rerankers are designated using the `rerank` role and used by [@Codebase](../context/codebase.mdx) in order to select the most relevant code snippets after vector search.
14+
15+## Recommended reranking models
16+
17+If you have the ability to use any model, we recommend `rerank-2` by Voyage AI, which is listed below along with the rest of the options for rerankers.
18+
19+### Voyage AI
20+
21+Voyage AI offers the best reranking model for code with their `rerank-2` model. After obtaining an API key from [here](https://www.voyageai.com/), you can configure a reranker as follows:
22+
23+<Tabs groupId="hub-config-example">
24+ <TabItem value="hub" label="Hub">
25+ [Voyage Rerank 2 Block](https://hub.continue.dev/voyageai/rerank-2)
26+ </TabItem>
27+ <TabItem value="yaml" label="YAML">
28+ ```yaml title="config.yaml"
29+ models:
30+ - name: My Voyage Reranker
31+ provider: voyage
32+ apiKey: <YOUR_VOYAGE_API_KEY>
33+ model: rerank-2
34+ roles:
35+ - rerank
36+ ```
37+ </TabItem>
38+ <TabItem value="json" label="JSON">
39+ ```json title="config.json"
40+ {
41+ "reranker": {
42+ "name": "voyage",
43+ "params": {
44+ "model": "rerank-2",
45+ "apiKey": "<YOUR_VOYAGE_API_KEY>"
46+ }
47+ }
48+ }
49+ ```
50+ </TabItem>
51+</Tabs>
52+
53+### Cohere
54+
55+See Cohere's documentation for rerankers [here](https://docs.cohere.com/docs/rerank-2).
56+
57+<Tabs groupId="config-example">
58+ {/* HUB_TODO block doesn't exist */}
59+ {/* <TabItem value="hub" label="Hub">
60+ [Cohere Reranker English v3](https://hub.continue.dev/)
61+ </TabItem> */}
62+ <TabItem value="yaml" label="YAML">
63+ ```yaml title="config.yaml"
64+ models:
65+ - name: Cohere Reranker
66+ provider: cohere
67+ model: rerank-english-v3.0
68+ apiKey: <YOUR_COHERE_API_KEY>
69+ roles:
70+ - rerank
71+ ```
72+ </TabItem>
73+ <TabItem value="json" label="JSON">
74+ ```json title="config.json"
75+ {
76+ "reranker": {
77+ "name": "cohere",
78+ "params": {
79+ "model": "rerank-english-v3.0",
80+ "apiKey": "<YOUR_COHERE_API_KEY>"
81+ }
82+ }
83+ }
84+ ```
85+ </TabItem>
86+</Tabs>
87+
88+### LLM
89+
90+If you only have access to a single LLM, then you can use it as a reranker. This is discouraged unless truly necessary, because it will be much more expensive and still less accurate than any of the above models trained specifically for the task. Note that this will not work if you are using a local model, for example with Ollama, because too many parallel requests need to be made.
91+
92+<Tabs groupId="config-example">
93+ {/* HUB_TODO block doesn't exist */}
94+ {/* <TabItem value="hub" label="Hub">
95+ [GPT-4o LLM Reranker Block](https://hub.continue.dev/)
96+ </TabItem> */}
97+ <TabItem value="yaml" label="YAML">
98+ ```yaml title="config.yaml"
99+ models:
100+ - name: LLM Reranker
101+ provider: openai
102+ model: gpt-4o
103+ roles:
104+ - rerank
105+ ```
106+ </TabItem>
107+ <TabItem value="json" label="JSON">
108+ ```json title="config.json"
109+ {
110+ "reranker": {
111+ "name": "llm",
112+ "params": {
113+ "modelTitle": "My Model Title"
114+ }
115+ }
116+ }
117+ ```
118+ </TabItem>
119+</Tabs>
120+
121+The `"modelTitle"` field must match one of the models in your "models" array in config.json.
122+
123+### Text Embeddings Inference
124+
125+[Hugging Face Text Embeddings Inference](https://huggingface.co/docs/text-embeddings-inference/en/index) enables you to host your own [reranker endpoint](https://huggingface.github.io/text-embeddings-inference/#/Text%20Embeddings%20Inference/rerank). You can configure your reranker as follows:
126+
127+<Tabs groupId="config-example">
128+ {/* HUB_TODO */}
129+ {/* <TabItem value="hub" label="Hub">
130+ [HuggingFace TEI Reranker block](https://hub.continue.dev/)
131+ </TabItem> */}
132+ <TabItem value="yaml" label="YAML">
133+ ```yaml title="config.yaml"
134+ models:
135+ - name: Huggingface-tei Reranker
136+ provider: huggingface-tei
137+ apiBase: http://localhost:8080
138+ apiKey: <YOUR_TEI_API_KEY>
139+ roles:
140+ - rerank
141+ ```
142+ </TabItem>
143+ <TabItem value="json" label="JSON">
144+ ```json title="config.json"
145+ {
146+ "reranker": {
147+ "name": "huggingface-tei",
148+ "params": {
149+ "apiBase": "http://localhost:8080",
150+ "apiKey": "<YOUR_TEI_API_KEY>"
151+ }
152+ }
153+ }
154+ ```
155+ </TabItem>
156+</Tabs>
added docs/docs/customize/settings.md +42 −0
@@ -0,0 +1,42 @@
1+---
2+title: User Settings Page
3+description: Reference for Adjusting User-Specific Settings
4+keywords: [config, settings, configuration, customize, customization, sidebar]
5+---
6+
7+# The User Settings Page
8+
9+The **User Settings page** can be accessed by clicking the gear icon in the header of the Continue sidebar and then selecting the "Settings" tab.
10+
11+![settings](/img/settings-header.png)
12+
13+Which takes you to this page (select the "Settings" tab):
14+
15+![User Settings Page](/img/settings-page.png)
16+
17+Below that, the following settings which are not part of a configuration file are available:
18+
19+- `Show Session Tabs`: If on, displays tabs above the chat as an alternative way to organize and access your sessions. Off by default
20+- `Wrap Codeblocks`: If on, enables text wrapping in code blocks. Off by default.
21+- `Show Chat Scrollbar`: If on, enables a scrollbar in the chat window. Off by default.
22+- `Text-to-Speech Output`: If on, reads LLM responses aloud with TTS. Off by default.
23+- `Enable Session Titles`: If on, generates summary titles for each chat session after the first message, using the current Chat model. On by default.
24+- `Format Markdown`: If off, shows responses as raw text. On by default.
25+- `Allow Anonymous Telemetry`: If on, allows Continue to send anonymous telemetry. **On** by default.
26+- `Enable Indexing`: Enables indexing of the codebase for the @codebase and @code context providers. **On** by default.
27+- `Font Size`: Specifies base font size for UI elements
28+- `Multiline Autocompletions`: Controls multiline completions for autocomplete. Can be set to `always`, `never`, or `auto`. Defaults to `auto`
29+- `Autocomplete timeout`: Maximum time in milliseconds for autocomplete request/retreival. Defaults to 150
30+- `Autocomplete debounce`: Minimum time in milliseconds to trigger an autocomplete request after a change. Defaults to 250
31+- `Disable autocomplete in files`: List of comma-separated glob pattern to disable autocomplete in matching files. E.g., `**/*.{txt,md}`
32+
33+### Experimental settings
34+
35+At the bottom of the User Settings page there is an "Experimental Settings" section which contains new or otherwise experimental settings, including:
36+
37+- `Auto-Accept Agent Edits`: **CAUTION: Be very careful with this setting. When turned on, Agent mode's edit tool can make changes to files with no manual review or guaranteed stopping point. If on, diffs generated by the edit tool are automatically accepted and Agent proceeds with the next conversational turn.** Off by default.
38+
39+<!-- - `Use autocomplete cache`: If on, caches completions. -->
40+<!-- - `Use Chromium for Docs Crawling`: Use Chromium to crawl docs locally. Useful if the default Cheerio crawler fails on sites that require JavaScript rendering. Downloads and installs Chromium to ~/.continue/.utils. Off by default -->
41+<!-- - `Codeblock Actions Position`: Sets the position for the actions that show when hovering over codeblocks. Defaults to `top` -->
42+<!-- - `Workspace prompts path`: Where to find Prompt Files in a workspace - replaces the default .continue/prompts -->
added docs/docs/customize/telemetry.mdx +31 −0
@@ -0,0 +1,31 @@
1+---
2+title: Telemetry
3+description: Learn how Continue collects anonymous usage information and how you can opt out.
4+keywords: [telemetry, anonymous, usage info, opt out]
5+---
6+
7+## Overview
8+
9+The open-source Continue Extensions collect and report **anonymous** usage information to help us improve our product. This data enables us to understand user interactions and optimize the user experience effectively. You can opt out of telemetry collection at any time if you prefer not to share your usage information.
10+
11+We utilize [Posthog](https://posthog.com/), an open-source platform for product analytics, to gather and store this data. For transparency, you can review the implementation code [here](https://github.com/continuedev/continue/blob/main/gui/src/hooks/CustomPostHogProvider.tsx) or read our [official privacy policy](https://continue.dev/privacy).
12+
13+## Tracking Policy
14+
15+All data collected by the open-source Continue extensions is anonymized and stripped of personally identifiable information (PII) before being sent to PostHog. We are committed to maintaining the privacy and security of your data.
16+
17+## What We Track
18+
19+The following usage information is collected and reported:
20+
21+- **Suggestion Interactions:** Whether you accept or reject suggestions (excluding the actual code or prompts involved).
22+- **Model and Command Information:** The name of the model and command used.
23+- **Token Metrics:** The number of tokens generated.
24+- **System Information:** The name of your operating system (OS) and integrated development environment (IDE).
25+- **Pageviews:** General pageview statistics.
26+
27+## How to Opt Out
28+
29+You can disable anonymous telemetry by visiting the [User Settings Page](./settings.md) and toggling "Allow Anonymous Telemetry" off.
30+
31+Alternatively in VS Code, you can disable telemetry through your VS Code settings by unchecking the "Continue: Telemetry Enabled" box (this will override the Settings Page settings). VS Code settings can be accessed with `File` > `Preferences` > `Settings` (or use the keyboard shortcut <kbd>ctrl</kbd> + <kbd>,</kbd> on Windows/Linux or <kbd>cmd</kbd> + <kbd>,</kbd> on macOS).
added docs/docs/customize/yaml-migration.mdx +359 −0
@@ -0,0 +1,359 @@
1+---
2+title: Config Migration to YAML
3+description: Reference for migrating from JSON to YAML Continue configuration.
4+keywords: [config, yaml, configuration, customize, customization, migration]
5+---
6+
7+# Migrating Config to YAML
8+
9+Continue's YAML configuration format provides more readable, maintainable, consistent configuration files, as well as new configuration options and removal of some old configuration options. YAML is the preferred format and will be used to integrate with future Continue products. Below is a brief guide for migration from `config.json` to `config.yaml`.
10+
11+See also
12+
13+- [Intro to YAML](https://yaml.org/)
14+- [JSON Continue Config Reference](/reference)
15+- [YAML Continue Config Reference](/reference)
16+
17+## Create YAML file
18+
19+Create a `config.yaml` file in your Continue Global Directory (`~/.continue` on Mac, `%USERPROFILE%\.continue`) alongside your current `config.json` file. If a `config.yaml` file is present, it will be loaded instead of `config.json`.
20+
21+Give your configuration a `name` and a `version`:
22+
23+```yaml title="config.yaml"
24+name: my-configuration
25+version: 0.0.1
26+schema: v1
27+```
28+
29+### Models
30+
31+Add all model configurations in `config.json`, including models in `models`, `tabAutocompleteModel`, `embeddingsProvider`, and `reranker`, to the `models` section of your new YAML config file. A new `roles` YAML field specifies which roles a model can be used for, with possible values `chat`, `autocomplete`, `embed`, `rerank`, `edit`, `apply`, `summarize`.
32+
33+- `models` in config should have `roles: [chat]`
34+- `tabAutocompleteModel`(s) in config should have `roles: [autocomplete]`
35+- `embeddingsProvider` in config should have `roles: [embed]`
36+- `reranker` in config should have `roles: [rerank]`
37+- `experimental.modelRoles` is replaced by simply adding roles to the model
38+ - `inlineEdit` -> e.g. `roles: [chat, edit]`
39+ - `applyCodeBlock` -> e.g. `roles: [chat, apply]`
40+
41+Model-level `requestOptions` remain, with minor changes. See [YAML Continue Config Reference](/reference#models)
42+
43+Model-level `completionOptions` are replaced by `defaultCompletionOptions`, with minor changes. See [YAML Continue Config Reference](/reference#models)
44+
45+<!-- TODO - ollama autodetect supported? -->
46+
47+**Before**
48+
49+```json title="config.json""
50+{
51+ "models": [
52+ {
53+ "title": "GPT-4",
54+ "provider": "openai",
55+ "model": "gpt-4",
56+ "apiKey": "<YOUR_OPENAI_API_KEY>",
57+ "completionOptions": {
58+ "temperature": 0.5,
59+ "maxTokens": 2000
60+ }
61+ },
62+ {
63+ "title": "Ollama",
64+ "provider": "ollama",
65+ "model": "AUTODETECT"
66+ },
67+ {
68+ "title": "My Open AI Compatible Model",
69+ "provider": "openai",
70+ "apiBase": "http://3.3.3.3/v1",
71+ "model": "my-openai-compatible-model",
72+ "requestOptions": {
73+ "headers": { "X-Auth-Token": "<API_KEY>" }
74+ }
75+ }
76+ ],
77+ "tabAutocompleteModel": {
78+ "title": "My Starcoder",
79+ "provider": "ollama",
80+ "model": "starcoder2:3b"
81+ },
82+ "embeddingsProvider": {
83+ "provider": "openai",
84+ "model": "text-embedding-ada-002",
85+ "apiKey": "<YOUR_OPENAI_API_KEY>",
86+ "maxEmbeddingChunkSize": 256,
87+ "maxEmbeddingBatchSize": 5
88+ },
89+ "reranker": {
90+ "name": "voyage",
91+ "params": {
92+ "model": "rerank-2",
93+ "apiKey": "<YOUR_VOYAGE_API_KEY>"
94+ }
95+ }
96+}
97+```
98+
99+**After**
100+
101+```yaml title="config.yaml"
102+models:
103+ - name: GPT-4
104+ provider: openai
105+ model: gpt-4
106+ apiKey: <YOUR_OPENAI_KEY>
107+ defaultCompletionOptions:
108+ temperature: 0.5
109+ maxTokens: 2000
110+ roles:
111+ - chat
112+ - edit
113+
114+ - name: My Voyage Reranker
115+ provider: voyage
116+ apiKey: <YOUR_VOYAGE_KEY>
117+ roles:
118+ - rerank
119+
120+ - name: My Starcoder
121+ provider: ollama
122+ model: starcoder2:3b
123+ roles:
124+ - autocomplete
125+
126+ - name: My Ada Embedder
127+ provider: openai
128+ apiKey: <YOUR_ADA_API_KEY>
129+ roles:
130+ - embed
131+ embedOptions:
132+ - maxChunkSize: 256
133+ - maxBatchSize: 5
134+
135+ - name: Ollama Autodetect
136+ provider: ollama
137+ model: AUTODETECT
138+
139+ - name: My Open AI Compatible Model - Apply
140+ provider: openai
141+ model: my-openai-compatible-model
142+ apiBase: http://3.3.3.3/v1
143+ requestOptions:
144+ headers:
145+ X-Auth-Token: <MY_API_KEY>
146+ roles:
147+ - chat
148+ - apply
149+```
150+
151+Note that the `repoMapFileSelection` experimental model role has been deprecated and is only available in `config.json`.
152+
153+### Context Providers
154+
155+The JSON `contextProviders` field is replaced by the YAML `context` array.
156+
157+- JSON `name` maps to `provider`
158+- JSON `params` map to `params`
159+
160+**Before**
161+
162+```json title="config.json""
163+{
164+ "contextProviders": [
165+ {
166+ "name": "docs"
167+ },
168+ {
169+ "name": "codebase",
170+ "params": {
171+ "nRetrieve": 30,
172+ "nFinal": 3
173+ }
174+ },
175+ {
176+ "name": "diff",
177+ "params": {}
178+ }
179+ ]
180+}
181+```
182+
183+**After**
184+
185+```yaml title="config.yaml"
186+context:
187+ - provider: docs
188+
189+ - provider: codebase
190+ params:
191+ nRetrieve: 30
192+ nFinal: 3
193+
194+ - provider: diff
195+```
196+
197+### System Message
198+
199+The `systemMessage` property has been replaced with a `rules` property that takes an array of strings.
200+
201+**Before**
202+
203+```json title="config.json""
204+{
205+ "systemMessage": "Always give concise responses"
206+}
207+```
208+
209+**After**
210+
211+```yaml title="config.yaml"
212+rules:
213+ - Always give concise responses
214+```
215+
216+### Prompts
217+
218+Rather than with `customCommands`, you can now use the `prompts` field to define custom prompts.
219+
220+**Before**
221+
222+```json title="config.json""
223+{
224+ "customCommands": [
225+ {
226+ "name": "check",
227+ "description": "Check for mistakes in my code",
228+ "prompt": "{{{ input }}}\n\nPlease read the highlighted code and check for any mistakes. You should look for the following, and be extremely vigilant:\n- Syntax errors\n- Logic errors\n- Security vulnerabilities\n- Performance issues\n- Anything else that looks wrong\n\nOnce you find an error, please explain it as clearly as possible, but without using extra words. For example, instead of saying 'I think there is a syntax error on line 5', you should say 'Syntax error on line 5'. Give your answer as one bullet point per mistake found."
229+ }
230+ ]
231+}
232+```
233+
234+**After**
235+
236+```yaml title="config.yaml"
237+prompts:
238+ - name: check
239+ description: Check for mistakes in my code
240+ prompt: |
241+ Please read the highlighted code and check for any mistakes. You should look for the following, and be extremely vigilant:
242+ - Syntax errors
243+ - Logic errors
244+ - Security vulnerabilities
245+ - Performance issues
246+ - Anything else that looks wrong
247+
248+ Once you find an error, please explain it as clearly as possible, but without using extra words. For example, instead of saying 'I think there is a syntax error on line 5', you should say 'Syntax error on line 5'. Give your answer as one bullet point per mistake found.
249+```
250+
251+### Documentation
252+
253+Documentation is largely the same, but the `title` property has been replaced with `name`. The `startUrl`, `rootUrl`, and `faviconUrl` properties remain.
254+
255+**Before**
256+
257+```json title="config.json""
258+{
259+ "docs": [
260+ {
261+ "startUrl": "https://docs.nestjs.com/",
262+ "title": "nest.js"
263+ },
264+ {
265+ "startUrl": "https://mysite.com/docs/",
266+ "title": "My site"
267+ }
268+ ]
269+}
270+```
271+
272+**After**
273+
274+```yaml title="config.yaml"
275+docs:
276+ - name: nest.js
277+ startUrl: https://docs.nestjs.com/
278+
279+ - name: My site
280+ startUrl: https://mysite.com/docs/
281+```
282+
283+### MCP Servers
284+
285+**Properties:**
286+
287+- `name` (**required**): The name of the MCP server.
288+- `command` (**required**): The command used to start the server.
289+- `args`: An optional array of arguments for the command.
290+- `env`: An optional map of environment variables for the server process.
291+- `cwd`: An optional working directory to run the command in. Can be absolute or relative path.
292+
293+**Before**
294+
295+```json title="config.json""
296+{
297+ "experimental": {
298+ "modelContextProtocolServers": [
299+ {
300+ "transport": {
301+ "type": "stdio",
302+ "command": "uvx",
303+ "args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"],
304+ "env": {
305+ "KEY": "<VALUE>"
306+ }
307+ }
308+ }
309+ ]
310+ }
311+}
312+```
313+
314+**After**
315+
316+```yaml title="config.yaml"
317+mcpServers:
318+ - name: My MCP Server
319+ command: uvx
320+ args:
321+ - mcp-server-sqlite
322+ - --db-path
323+ - /Users/NAME/test.db
324+ env:
325+ KEY: <VALUE>
326+```
327+
328+---
329+
330+## Deprecated configuration options
331+
332+Some deprecated `config.json` settings are no longer stored in config and have been moved to be editable through the [User Settings Page](./settings.md) (Gear Icon). If found in `config.json`, they will be auto-migrated to User Settings and removed from `config.json`.
333+
334+See the [JSON Config Reference](/reference) for more information on fully deprecated options.
335+
336+The following top-level fields from `config.json` still work when using `config.json` but have been deprecated and don't have a YAML equivalent:
337+
338+- Slash commands (JSON `slashCommands`)
339+- top-level `requestOptions`
340+- top-level `completionOptions`
341+- `tabAutocompleteOptions`
342+ - `disable`
343+ - `maxPromptTokens`
344+ - `debounceDelay`
345+ - `maxSuffixPercentage`
346+ - `prefixPercentage`
347+ - `template`
348+ - `onlyMyCode`
349+- `analytics`
350+
351+The following top-level fields from `config.json` have been deprecated. Most UI-related and user-specific options will move into a settings page in the UI
352+
353+- `customCommands`
354+- `experimental`
355+- `userToken`
356+
357+## New Configuration options
358+
359+The YAML configuration format offers new configuration options not available in the JSON format. See the [YAML Config Reference](/reference) for more information.
modified docs/docs/features/agent/how-it-works.mdx +1 −1
@@ -35,6 +35,6 @@
3535 - **Run terminal command** (`run_terminal_command`): run a terminal command from the workspace root
3636 - **Search web** (`search_web`): Perform a web search to get top results
3737 - **View diff** (`view_diff`): View the current working git diff
38-- **View repo map** (`view_repo_map`): request a copy of the repository map—same as the [Repo Map Context Provider](../../advanced/custom-providers#repository-map)
38+- **View repo map** (`view_repo_map`): request a copy of the repository map—same as the [Repo Map Context Provider](../../customize/custom-providers#repository-map)
3939 - **View subdirectory** (`view_subdirectory`): request a copy of a repo map for a specific directory within the project
4040 - **Create Rule Block** (`create_rule_block`): creates a new rule block in `.continue/rules` based on the contents of the conversation
modified docs/docs/features/autocomplete/how-it-works.mdx +1 −1
@@ -27,4 +27,4 @@
2727
2828 We will also occasionally entirely filter out responses if they are bad. This is often due to extreme repetition.
2929
30-You can learn more about how it works in the [Autocomplete deep dive](../../advanced/deep-dives/autocomplete.mdx).
30+You can learn more about how it works in the [Autocomplete deep dive](../../customize/deep-dives/autocomplete.mdx).
modified docs/docs/features/chat/how-it-works.mdx +2 −2
@@ -56,8 +56,8 @@
5656
5757 Learn more about how context providers work:
5858
59-- [Codebase Context](../../advanced/context/codebase)
60-- [Documentation Context](../../advanced/context/documentation)
59+- [Codebase Context](../../customize/context/codebase)
60+- [Documentation Context](../../customize/context/documentation)
6161
6262 ---
6363
modified docs/docs/guides/build-your-own-context-provider.mdx +1 −1
@@ -60,7 +60,7 @@
6060 ```
6161
6262 :::info
63-The following methods for creating custom context providers are deprecated. We recommend using HTTP context providers, [MCP Servers](../customization/mcp-tools.mdx), and [Prompts](../advanced/deep-dives/prompts.md) where possible.
63+The following methods for creating custom context providers are deprecated. We recommend using HTTP context providers, [MCP Servers](../customization/mcp-tools.mdx), and [Prompts](../customize/deep-dives/prompts.md) where possible.
6464 :::
6565
6666 ## Using CustomContextProvider
modified docs/docs/guides/custom-code-rag.mdx +1 −1
@@ -8,7 +8,7 @@
88
99 # Custom code RAG
1010
11-While Continue comes with [@Codebase](../advanced/context/codebase.mdx) out of the box, you might wish to set up your own vector database and build a custom retrieval-augmented generation (RAG) system. This can allow you to access code that is not available locally, to index code a single time across all users, or to include custom logic. In this guide, we'll walk you through the steps it takes to build this.
11+While Continue comes with [@Codebase](../customize/context/codebase.mdx) out of the box, you might wish to set up your own vector database and build a custom retrieval-augmented generation (RAG) system. This can allow you to access code that is not available locally, to index code a single time across all users, or to include custom logic. In this guide, we'll walk you through the steps it takes to build this.
1212
1313 ## Step 1: Choose an embeddings model
1414
modified docs/docs/guides/running-continue-without-internet.mdx +2 −2
@@ -7,6 +7,6 @@
77 Continue can be run even on an air-gapped computer if you use a local model. Only a few adjustments are required for this to work.
88
99 1. Download the latest .vsix file from the [Open VSX Registry](https://open-vsx.org/extension/Continue/continue) and [install it to VS Code](https://code.visualstudio.com/docs/editor/extension-marketplace#_install-from-a-vsix).
10-2. Open the [User Settings Page](../advanced/deep-dives/settings.md) and turn off "Allow Anonymous Telemetry". This will stop Continue from attempting requests to PostHog for [anonymous telemetry](../advanced/telemetry.mdx).
11-3. Also in `config.json`, set the default model to a local model. You can available options [here](../advanced/model-providers/top-level/openai.mdx).
10+2. Open the [User Settings Page](../customize/settings.md) and turn off "Allow Anonymous Telemetry". This will stop Continue from attempting requests to PostHog for [anonymous telemetry](../customize/telemetry.mdx).
11+3. Also in `config.json`, set the default model to a local model. You can available options [here](../customize/model-providers/top-level/openai.mdx).
1212 4. Restart VS Code to ensure that the changes to `config.json` or `config.yaml` take effect.
modified docs/docs/hub/blocks/block-types.md +6 −6
@@ -11,7 +11,7 @@
1111
1212 Models are blocks that let you specify Large Language Models (LLMs) and other deep learning models to be used for various roles in the open-source IDE extension like Chat, Autocomplete, Edit, Embed, Rerank, etc. You can explore available models on [the hub](https://hub.continue.dev/explore/models).
1313
14-Continue supports [many model providers](../../advanced/model-providers/top-level/openai.mdx), including Anthropic, OpenAI, Gemini, Ollama, Amazon Bedrock, Azure, xAI, DeepSeek, and more. Models can have one or more of the following roles depending on its capabilities, including `chat`, `edit`, `apply`, `autocomplete`, `embed`, and `rerank`. Read more about roles [here](../../advanced/model-roles/00-intro.mdx). View [`models`](/reference#models) in the YAML Reference for more details.
14+Continue supports [many model providers](../../customize/model-providers/top-level/openai.mdx), including Anthropic, OpenAI, Gemini, Ollama, Amazon Bedrock, Azure, xAI, DeepSeek, and more. Models can have one or more of the following roles depending on its capabilities, including `chat`, `edit`, `apply`, `autocomplete`, `embed`, and `rerank`. Read more about roles [here](../../customize/model-roles/00-intro.mdx). View [`models`](/reference#models) in the YAML Reference for more details.
1515
1616 ## Context
1717
@@ -23,28 +23,28 @@
2323
2424 Docs are blocks that point to documentation sites, which will be indexed locally and then can be referenced as context using @Docs in Chat. [Explore docs](https://hub.continue.dev/explore/docs) on the hub.
2525
26-Learn more in the [@Docs deep dive](../../advanced/context/documentation.mdx), and view [`docs`](/reference#docs) in the YAML Reference for more details.
26+Learn more in the [@Docs deep dive](../../customize/context/documentation.mdx), and view [`docs`](/reference#docs) in the YAML Reference for more details.
2727
2828 ## MCP Servers
2929
3030 Model Context Protocol (MCP) is a standard way of building and sharing tools for language models. MCP Servers can be defined in `mcpServers` blocks. [Explore MCP Servers](https://hub.continue.dev/explore/mcp) on the hub.
3131
32-Learn more in the [MCP deep dive](../../advanced/deep-dives/mcp.mdx), and view [`mcpServers`](/reference#mcpservers) in the YAML Reference for more details.
32+Learn more in the [MCP deep dive](../../customize/deep-dives/mcp.mdx), and view [`mcpServers`](/reference#mcpservers) in the YAML Reference for more details.
3333
3434 ## Rules
3535
3636 Rules blocks are instructions that your custom AI code assistant will always keep in mind - the contents of rules are inserted into the system message for all Chat requests. [Explore rules](https://hub.continue.dev/explore/rules) on the hub.
3737
38-Learn more in the [rules deep dive](../../advanced/deep-dives/rules.mdx), and view [`rules`](/reference#rules) in the YAML Reference for more details.
38+Learn more in the [rules deep dive](../../customize/deep-dives/rules.mdx), and view [`rules`](/reference#rules) in the YAML Reference for more details.
3939
4040 ## Prompts
4141
4242 Prompts blocks are pre-written, reusable prompts that can be referenced at any time during chat. They are especially useful as context for repetitive and/or complex tasks. [Explore prompts](https://hub.continue.dev/explore/prompts) on the hub.
4343
44-Prompt blocks have the same syntax as [prompt files](../../advanced/deep-dives/prompts.md). The `config.yaml` spec for `prompts` can be found [here](/reference#prompts).
44+Prompt blocks have the same syntax as [prompt files](../../customize/deep-dives/prompts.md). The `config.yaml` spec for `prompts` can be found [here](/reference#prompts).
4545
4646 ## Data
4747
48-Data blocks allow you send your development data to custom destinations of your choice. Development data can be used for a variety of purposes, including analyzing usage, gathering insights, or fine-tuning models. You can read more about development data [here](../../advanced/deep-dives/development-data.md). Explore data block examples [here](https://hub.continue.dev/explore/data).
48+Data blocks allow you send your development data to custom destinations of your choice. Development data can be used for a variety of purposes, including analyzing usage, gathering insights, or fine-tuning models. You can read more about development data [here](../../customize/deep-dives/development-data.md). Explore data block examples [here](https://hub.continue.dev/explore/data).
4949
5050 Data destinations are configured in the [`data`](/reference#data) section of `config.yaml`.
modified docs/docs/reference.mdx +11 −7
@@ -19,7 +19,7 @@
1919 - in your workspace in a `/.continue/assistants` folder, with the same naming convention
2020
2121 :::info
22-Config YAML replaces `config.json`, which is deprecated. View the **[Migration Guide](/advanced/yaml-migration)**.
22+Config YAML replaces `config.json`, which is deprecated. View the **[Migration Guide](/customize/yaml-migration)**.
2323 :::
2424
2525 An assistant is made up of:
@@ -191,9 +191,9 @@
191191 provider and model. Supported capabilities include `tool_use` and `image_input`.
192192 - `maxStopWords`: Maximum number of stop words allowed, to avoid API errors with extensive lists.
193193 - `promptTemplates`: Can be used to override the default prompt templates for different model roles. Valid values are
194- `chat`, [`edit`](/advanced/model-roles/edit#prompt-templating), [
195- `apply`](/advanced/model-roles/apply#prompt-templating) and [
196- `autocomplete`](/advanced/model-roles/autocomplete#prompt-templating). The `chat` property must be a
194+ `chat`, [`edit`](/customize/model-roles/edit#prompt-templating), [
195+ `apply`](/customize/model-roles/apply#prompt-templating) and [
196+ `autocomplete`](/customize/model-roles/autocomplete#prompt-templating). The `chat` property must be a
197197 valid template name, such as `llama3` or `anthropic`.
198198 - `chatOptions`: If the model includes role `chat`, these settings apply for Chat and Agent mode:
199199 - `baseSystemMessage`: Can be used to override the default system prompt for **Chat** mode.
@@ -263,7 +263,7 @@
263263 The `context` section defines context providers, which supply additional information or context to the language models.
264264 Each context provider can be configured with specific parameters.
265265
266-More information about usage/params for each context provider can be found [here](/advanced/custom-providers)
266+More information about usage/params for each context provider can be found [here](/customize/custom-providers)
267267
268268 **Properties:**
269269
@@ -384,6 +384,7 @@
384384 - `command` (**required**): The command used to start the server.
385385 - `args`: An optional array of arguments for the command.
386386 - `env`: An optional map of environment variables for the server process.
387+- `cwd`: An optional working directory to run the command in. Can be absolute or relative path.
387388 - `connectionTimeout`: An optional connection timeout number to the server in milliseconds.
388389
389390 **Example:**
@@ -395,12 +396,15 @@
395396 args:
396397 - mcp-server-sqlite
397398 - --db-path
398- - /Users/NAME/test.db
399+ - ./test.db
400+ cwd: /Users/NAME/project
401+ env:
402+ NODE_ENV: production
399403 ```
400404
401405 ### `data`
402406
403-Destinations to which [development data](/advanced/deep-dives/development-data) will be sent.
407+Destinations to which [development data](/customize/deep-dives/development-data) will be sent.
404408
405409 **Properties:**
406410
modified docs/docusaurus.config.js +207 −90
@@ -254,28 +254,44 @@
254254 from: ["/install/vscode", "/install/jetbrains"],
255255 },
256256 {
257- to: "/advanced/deep-dives/settings",
258- from: "/customize/settings",
257+ to: "/customize/settings",
258+ from: [
259+ "/advanced/deep-dives/settings",
260+ "/customize/deep-dives/settings",
261+ ],
259262 },
260263 {
261- to: "/advanced/model-roles/intro",
262- from: ["/customize/model-types", "/setup/overview"],
264+ to: "/customize/model-roles/intro",
265+ from: [
266+ "/customize/model-types",
267+ "/setup/overview",
268+ "/advanced/model-roles/intro",
269+ ],
263270 },
264271 {
265- to: "/advanced/model-roles/embeddings",
266- from: "/customize/model-types/embeddings",
272+ to: "/customize/model-roles/embeddings",
273+ from: [
274+ "/customize/model-types/embeddings",
275+ "/advanced/model-roles/embeddings",
276+ ],
267277 },
268278 {
269- to: "/advanced/model-roles/autocomplete",
270- from: "/customize/model-types/autocomplete",
279+ to: "/customize/model-roles/autocomplete",
280+ from: [
281+ "/customize/model-types/autocomplete",
282+ "/advanced/model-roles/autocomplete",
283+ ],
271284 },
272285 {
273- to: "/advanced/model-roles/chat",
274- from: "/customize/model-types/chat",
286+ to: "/customize/model-roles/chat",
287+ from: ["/customize/model-types/chat", "/advanced/model-roles/chat"],
275288 },
276289 {
277- to: "/advanced/model-roles/reranking",
278- from: "/customize/model-types/reranking",
290+ to: "/customize/model-roles/reranking",
291+ from: [
292+ "/customize/model-types/reranking",
293+ "/advanced/model-roles/reranking",
294+ ],
279295 },
280296 {
281297 to: "/getting-started/overview",
@@ -288,31 +304,41 @@
288304 ],
289305 },
290306 {
291- to: "/advanced/model-providers/anthropic",
292- from: ["/setup/select-provider", "/setup/model-providers"],
307+ to: "/customize/model-providers/anthropic",
308+ from: [
309+ "/setup/select-provider",
310+ "/setup/model-providers",
311+ "/advanced/model-providers/anthropic",
312+ ],
293313 },
294314 {
295- to: "/advanced/context/codebase",
315+ to: "/customize/context/codebase",
296316 from: [
297317 "/walkthroughs/codebase-embeddings",
298318 "/features/codebase-embeddings",
299319 "/advanced/deep-dives/codebase",
320+ "/advanced/context/codebase",
300321 ],
301322 },
302323 {
303- to: "/advanced/deep-dives/autocomplete",
324+ to: "/customize/deep-dives/autocomplete",
304325 from: [
305326 "/walkthroughs/tab-autocomplete",
306327 "/features/tab-autocomplete",
328+ "/advanced/deep-dives/autocomplete",
307329 ],
308330 },
309331 {
310- to: "/advanced/deep-dives/prompts",
311- from: ["/walkthroughs/prompt-files", "/features/prompt-files"],
332+ to: "/customize/deep-dives/prompts",
333+ from: [
334+ "/walkthroughs/prompt-files",
335+ "/features/prompt-files",
336+ "/advanced/deep-dives/prompts",
337+ ],
312338 },
313339 // TODO - actions redirects
314340 {
315- to: "/advanced/deep-dives/slash-commands",
341+ to: "/customize/deep-dives/slash-commands",
316342 from: [
317343 "/actions/how-to-use-it",
318344 "/actions/how-to-customize",
@@ -322,12 +348,16 @@
322348 "/actions/how-it-works",
323349 "/customize/slash-commands",
324350 "/customization/slash-commands",
351+ "/advanced/deep-dives/slash-commands",
325352 ],
326353 },
327354
328355 {
329- to: "/advanced/deep-dives/vscode-actions",
330- from: ["/walkthroughs/quick-actions"],
356+ to: "/customize/deep-dives/vscode-actions",
357+ from: [
358+ "/walkthroughs/quick-actions",
359+ "/advanced/deep-dives/vscode-actions",
360+ ],
331361 },
332362 {
333363 to: "/reference",
@@ -342,148 +372,235 @@
342372 ],
343373 },
344374 {
345- to: "/advanced/custom-providers",
375+ to: "/customize/custom-providers",
346376 from: [
347377 "/customization/context-providers",
348378 "/advanced/context-integration/custom-providers",
349379 "/advanced/context/custom-providers",
380+ "/advanced/custom-providers",
350381 ],
351382 },
352383 {
353- to: "/advanced/deep-dives/development-data",
354- from: ["/development-data", "/customize/development-data"],
384+ to: "/customize/deep-dives/development-data",
385+ from: [
386+ "/development-data",
387+ "/customize/development-data",
388+ "/advanced/deep-dives/development-data",
389+ ],
355390 },
356391 {
357- to: "/advanced/context/documentation",
392+ to: "/customize/context/documentation",
358393 from: [
359394 "/features/talk-to-your-docs",
360395 "/advanced/context-integration/documentation",
361396 "/advanced/deep-dives/docs",
397+ "/advanced/context/documentation",
362398 ],
363399 },
364400 {
365- to: "/advanced/model-providers/anthropic",
366- from: "/reference/Model Providers/anthropicllm",
401+ to: "/customize/model-providers/anthropic",
402+ from: ["/reference/Model Providers/anthropicllm"],
367403 },
368404 {
369- to: "/advanced/model-providers/azure",
370- from: "/reference/Model Providers/azure",
405+ to: "/customize/model-providers/azure",
406+ from: [
407+ "/reference/Model Providers/azure",
408+ "/advanced/model-providers/azure",
409+ ],
371410 },
372411 {
373- to: "/advanced/model-providers/bedrock",
374- from: "/reference/Model Providers/bedrock",
412+ to: "/customize/model-providers/bedrock",
413+ from: [
414+ "/reference/Model Providers/bedrock",
415+ "/advanced/model-providers/bedrock",
416+ ],
375417 },
376418 {
377- to: "/advanced/model-providers/deepseek",
378- from: "/reference/Model Providers/deepseek",
419+ to: "/customize/model-providers/deepseek",
420+ from: [
421+ "/reference/Model Providers/deepseek",
422+ "/advanced/model-providers/deepseek",
423+ ],
379424 },
380425 {
381- to: "/advanced/model-providers/anthropic",
426+ to: "/customize/model-providers/anthropic",
382427 from: "/reference/Model Providers/freetrial",
383428 },
384429 {
385- to: "/advanced/model-providers/gemini",
386- from: "/reference/Model Providers/geminiapi",
430+ to: "/customize/model-providers/gemini",
431+ from: [
432+ "/reference/Model Providers/geminiapi",
433+ "/advanced/model-providers/gemini",
434+ ],
387435 },
388436 {
389- to: "/advanced/model-providers/mistral",
390- from: "/reference/Model Providers/mistral",
437+ to: "/customize/model-providers/mistral",
438+ from: [
439+ "/reference/Model Providers/mistral",
440+ "/advanced/model-providers/mistral",
441+ ],
391442 },
392443 {
393- to: "/advanced/model-providers/ollama",
394- from: "/reference/Model Providers/ollama",
444+ to: "/customize/model-providers/ollama",
445+ from: [
446+ "/reference/Model Providers/ollama",
447+ "/advanced/model-providers/ollama",
448+ ],
395449 },
396450 {
397- to: "/advanced/model-providers/openai",
398- from: "/reference/Model Providers/openai",
451+ to: "/customize/model-providers/openai",
452+ from: [
453+ "/reference/Model Providers/openai",
454+ "/advanced/model-providers/openai",
455+ ],
399456 },
400457 {
401458 to: "/",
402459 from: "/intro",
403460 },
404461 {
405- to: "/advanced/model-providers/more/cloudflare",
406- from: "/reference/Model Providers/cloudflare",
462+ to: "/customize/model-providers/more/cloudflare",
463+ from: [
464+ "/reference/Model Providers/cloudflare",
465+ "/advanced/model-providers/more/cloudflare",
466+ ],
407467 },
408468 {
409- to: "/advanced/model-providers/more/cohere",
410- from: "/reference/Model Providers/cohere",
469+ to: "/customize/model-providers/more/cohere",
470+ from: [
471+ "/reference/Model Providers/cohere",
472+ "/advanced/model-providers/more/cohere",
473+ ],
411474 },
412475 {
413- to: "/advanced/model-providers/more/deepinfra",
414- from: "/reference/Model Providers/deepinfra",
476+ to: "/customize/model-providers/more/deepinfra",
477+ from: [
478+ "/reference/Model Providers/deepinfra",
479+ "/advanced/model-providers/more/deepinfra",
480+ ],
415481 },
416482 {
417- to: "/advanced/model-providers/more/flowise",
418- from: "/reference/Model Providers/flowise",
483+ to: "/customize/model-providers/more/flowise",
484+ from: [
485+ "/reference/Model Providers/flowise",
486+ "/advanced/model-providers/more/flowise",
487+ ],
419488 },
420489 {
421- to: "/advanced/model-providers/llamastack",
490+ to: "/customize/model-providers/llamastack",
422491 from: "/advanced/model-providers/more/llamastack",
423492 },
424493 {
425- to: "/advanced/model-providers/more/huggingfaceinferenceapi",
426- from: "/reference/Model Providers/huggingfaceinferenceapi",
494+ to: "/customize/model-providers/more/huggingfaceinferenceapi",
495+ from: [
496+ "/reference/Model Providers/huggingfaceinferenceapi",
497+ "/advanced/model-providers/more/huggingfaceinferenceapi",
498+ ],
427499 },
428500 {
429- to: "/advanced/model-providers/more/ipex_llm",
430- from: "/reference/Model Providers/ipex_llm",
501+ to: "/customize/model-providers/more/ipex_llm",
502+ from: [
503+ "/reference/Model Providers/ipex_llm",
504+ "/advanced/model-providers/more/ipex_llm",
505+ ],
431506 },
432507 {
433- to: "/advanced/model-providers/more/kindo",
434- from: "/reference/Model Providers/kindo",
508+ to: "/customize/model-providers/more/kindo",
509+ from: [
510+ "/reference/Model Providers/kindo",
511+ "/advanced/model-providers/more/kindo",
512+ ],
435513 },
436514 {
437- to: "/advanced/model-providers/more/llamacpp",
438- from: "/reference/Model Providers/llamacpp",
515+ to: "/customize/model-providers/more/llamacpp",
516+ from: [
517+ "/reference/Model Providers/llamacpp",
518+ "/advanced/model-providers/more/llamacpp",
519+ ],
439520 },
440521 {
441- to: "/advanced/model-providers/more/llamafile",
442- from: "/reference/Model Providers/llamafile",
522+ to: "/customize/model-providers/more/llamafile",
523+ from: [
524+ "/reference/Model Providers/llamafile",
525+ "/advanced/model-providers/more/llamafile",
526+ ],
443527 },
444528 {
445- to: "/advanced/model-providers/more/lmstudio",
446- from: "/reference/Model Providers/lmstudio",
529+ to: "/customize/model-providers/more/lmstudio",
530+ from: [
531+ "/reference/Model Providers/lmstudio",
532+ "/advanced/model-providers/more/lmstudio",
533+ ],
447534 },
448535 {
449- to: "/advanced/model-providers/more/msty",
450- from: "/reference/Model Providers/msty",
536+ to: "/customize/model-providers/more/msty",
537+ from: [
538+ "/reference/Model Providers/msty",
539+ "/advanced/model-providers/more/msty",
540+ ],
451541 },
452542 {
453- to: "/advanced/model-providers/more/openrouter",
454- from: "/reference/Model Providers/openrouter",
543+ to: "/customize/model-providers/more/openrouter",
544+ from: [
545+ "/reference/Model Providers/openrouter",
546+ "/advanced/model-providers/more/openrouter",
547+ ],
455548 },
456549 {
457- to: "/advanced/model-providers/more/replicatellm",
458- from: "/reference/Model Providers/replicatellm",
550+ to: "/customize/model-providers/more/replicatellm",
551+ from: [
552+ "/reference/Model Providers/replicatellm",
553+ "/advanced/model-providers/more/replicatellm",
554+ ],
459555 },
460556 {
461- to: "/advanced/model-providers/more/sagemaker",
462- from: "/reference/Model Providers/sagemaker",
557+ to: "/customize/model-providers/more/sagemaker",
558+ from: [
559+ "/reference/Model Providers/sagemaker",
560+ "/advanced/model-providers/more/sagemaker",
561+ ],
463562 },
464563 {
465- to: "/advanced/model-providers/more/textgenwebui",
466- from: "/reference/Model Providers/textgenwebui",
564+ to: "/customize/model-providers/more/textgenwebui",
565+ from: [
566+ "/reference/Model Providers/textgenwebui",
567+ "/advanced/model-providers/more/textgenwebui",
568+ ],
467569 },
468570 {
469- to: "/advanced/model-providers/more/together",
470- from: "/reference/Model Providers/together",
571+ to: "/customize/model-providers/more/together",
572+ from: [
573+ "/reference/Model Providers/together",
574+ "/advanced/model-providers/more/together",
575+ ],
471576 },
472577 {
473- to: "/advanced/model-providers/more/novita",
474- from: "/reference/Model Providers/novita",
578+ to: "/customize/model-providers/more/novita",
579+ from: [
580+ "/reference/Model Providers/novita",
581+ "/advanced/model-providers/more/novita",
582+ ],
475583 },
476584 {
477- to: "/advanced/model-providers/more/vllm",
478- from: "/reference/Model Providers/vllm",
585+ to: "/customize/model-providers/more/vllm",
586+ from: [
587+ "/reference/Model Providers/vllm",
588+ "/advanced/model-providers/more/vllm",
589+ ],
479590 },
480591 {
481- to: "/advanced/model-providers/more/watsonx",
482- from: "/reference/Model Providers/watsonx",
592+ to: "/customize/model-providers/more/watsonx",
593+ from: [
594+ "/reference/Model Providers/watsonx",
595+ "/advanced/model-providers/more/watsonx",
596+ ],
483597 },
484598 {
485- to: "/advanced/model-providers/more/nebius",
486- from: "/reference/Model Providers/nebius",
599+ to: "/customize/model-providers/more/nebius",
600+ from: [
601+ "/reference/Model Providers/nebius",
602+ "/advanced/model-providers/more/nebius",
603+ ],
487604 },
488605 // Sidebar items that should route directly to a subpage
489606 {
@@ -507,7 +624,7 @@
507624 from: "/getting-started",
508625 },
509626 {
510- to: "/advanced/deep-dives/prompts",
627+ to: "/customize/deep-dives/prompts",
511628 from: "/customize/deep-dives/prompt-files",
512629 },
513630 // Migrated from netlify.toml
@@ -528,16 +645,16 @@
528645 from: "/agent/how-it-works",
529646 },
530647 {
531- to: "/advanced/telemetry",
532- from: "/telemetry",
648+ to: "/customize/telemetry",
649+ from: ["/telemetry", "/advanced/telemetry"],
533650 },
534651 {
535- to: "/advanced/yaml-migration",
536- from: "/yaml-migration",
652+ to: "/customize/yaml-migration",
653+ from: ["/yaml-migration", "/advanced/yaml-migration"],
537654 },
538655 {
539- to: "/advanced/json-reference",
540- from: "/json-reference",
656+ to: "/customize/json-reference",
657+ from: ["/json-reference", "/advanced/json-reference"],
541658 },
542659 ],
543660 },
modified docs/plugins/custom-llms-txt.js +3 −3
@@ -28,7 +28,7 @@
2828 Features: [],
2929 Guides: [],
3030 Customization: [],
31- Advanced: [],
31+ Customize: [],
3232 Hub: [],
3333 };
3434
@@ -73,8 +73,8 @@
7373 sections["Guides"].push(docInfo);
7474 } else if (cleanPath.includes("customization")) {
7575 sections["Customization"].push(docInfo);
76- } else if (cleanPath.includes("advanced")) {
77- sections["Advanced"].push(docInfo);
76+ } else if (cleanPath.includes("customize")) {
77+ sections["Customize"].push(docInfo);
7878 } else if (cleanPath.includes("hub")) {
7979 sections["Hub"].push(docInfo);
8080 } else if (cleanPath === "" || cleanPath === "/") {
modified docs/sidebars.js +2 −2
@@ -47,11 +47,11 @@
4747 },
4848 {
4949 type: "category",
50- label: "Advanced",
50+ label: "Customize",
5151 items: [
5252 {
5353 type: "autogenerated",
54- dirName: "advanced",
54+ dirName: "customize",
5555 },
5656 ],
5757 },
modified extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/actions/ContinuePluginActions.kt +6 −0
@@ -7,6 +7,12 @@
77 import com.intellij.openapi.components.service
88 import com.intellij.openapi.fileEditor.FileEditorManager
99
10+class RestartContinueProcess : AnAction() {
11+ override fun actionPerformed(e: AnActionEvent) {
12+ val pluginService = getContinuePluginService(e.project) ?: return
13+ pluginService.coreMessengerManager?.restart()
14+ }
15+}
1016
1117 class AcceptDiffAction : AnAction() {
1218 override fun actionPerformed(e: AnActionEvent) {
modified extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/constants/MessageTypes.kt +1 −1
@@ -2,7 +2,7 @@
22
33 class MessageTypes {
44 companion object {
5- val ideMessageTypes = listOf(
5+ val IDE_MESSAGE_TYPES = listOf(
66 "readRangeInFile",
77 "isTelemetryEnabled",
88 "getUniqueId",
modified extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/CoreMessenger.kt +21 −176
@@ -1,51 +1,40 @@
11 package com.github.continuedev.continueintellijextension.`continue`
22
33 import com.github.continuedev.continueintellijextension.constants.MessageTypes
4-import com.github.continuedev.continueintellijextension.services.ContinueExtensionSettings
4+import com.github.continuedev.continueintellijextension.`continue`.process.ContinueBinaryProcess
5+import com.github.continuedev.continueintellijextension.`continue`.process.ContinueProcessHandler
6+import com.github.continuedev.continueintellijextension.`continue`.process.ContinueSocketProcess
57 import com.github.continuedev.continueintellijextension.services.ContinuePluginService
6-import com.github.continuedev.continueintellijextension.services.TelemetryService
78 import com.github.continuedev.continueintellijextension.utils.uuid
89 import com.google.gson.Gson
910 import com.intellij.openapi.components.service
1011 import com.intellij.openapi.project.Project
11-import java.io.*
12-import java.net.Socket
13-import java.nio.charset.StandardCharsets
14-import java.nio.file.Files
15-import java.nio.file.Paths
16-import java.nio.file.attribute.PosixFilePermission
1712 import kotlinx.coroutines.*
1813
1914 class CoreMessenger(
2015 private val project: Project,
21- continueCorePath: String,
2216 private val ideProtocolClient: IdeProtocolClient,
23- val coroutineScope: CoroutineScope
17+ val coroutineScope: CoroutineScope,
18+ private val onExit: () -> Unit
2419 ) {
25- private var writer: Writer? = null
26- private var reader: BufferedReader? = null
27- private var process: Process? = null
2820 private val gson = Gson()
2921 private val responseListeners = mutableMapOf<String, (Any?) -> Unit>()
30- private val useTcp: Boolean = System.getenv("USE_TCP")?.toBoolean() ?: false
31-
32- private fun write(message: String) {
33- try {
34- writer?.write(message + "\r\n")
35- writer?.flush()
36- } catch (e: Exception) {
37- println("Error writing to Continue core: $e")
38- }
39- }
22+ private val process = startContinueProcess()
4023
4124 fun request(messageType: String, data: Any?, messageId: String?, onResponse: (Any?) -> Unit) {
4225 val id = messageId ?: uuid()
43- val message =
44- gson.toJson(mapOf("messageId" to id, "messageType" to messageType, "data" to data))
26+ val message = gson.toJson(mapOf("messageId" to id, "messageType" to messageType, "data" to data))
4527 responseListeners[id] = onResponse
46- coroutineScope.launch(Dispatchers.IO) {
47- write(message)
48- }
28+ process.write(message)
29+ }
30+
31+ private fun startContinueProcess(): ContinueProcessHandler {
32+ val isTcp = System.getenv("USE_TCP")?.toBoolean() ?: false
33+ val process = if (isTcp)
34+ ContinueSocketProcess()
35+ else
36+ ContinueBinaryProcess(onExit)
37+ return ContinueProcessHandler(coroutineScope, process, ::handleMessage)
4938 }
5039
5140 private fun handleMessage(json: String) {
@@ -55,13 +44,10 @@
5544 val data = responseMap["data"]
5645
5746 // IDE listeners
58- if (MessageTypes.ideMessageTypes.contains(messageType)) {
47+ if (MessageTypes.IDE_MESSAGE_TYPES.contains(messageType)) {
5948 ideProtocolClient.handleMessage(json) { data ->
60- val message =
61- gson.toJson(
62- mapOf("messageId" to messageId, "messageType" to messageType, "data" to data)
63- )
64- write(message)
49+ val message = gson.toJson(mapOf("messageId" to messageId, "messageType" to messageType, "data" to data))
50+ process.write(message)
6551 }
6652 }
6753
@@ -82,148 +68,7 @@
8268 }
8369 }
8470
85- private fun setPermissions(destination: String) {
86- val osName = System.getProperty("os.name").toLowerCase()
87- if (osName.contains("mac") || osName.contains("darwin")) {
88- ProcessBuilder("xattr", "-dr", "com.apple.quarantine", destination).start().waitFor()
89- setFilePermissions(destination, "rwxr-xr-x")
90- } else if (osName.contains("nix") || osName.contains("nux")) {
91- setFilePermissions(destination, "rwxr-xr-x")
92- }
93- }
94-
95- private fun setFilePermissions(path: String, posixPermissions: String) {
96- val perms = HashSet<PosixFilePermission>()
97- if (posixPermissions.contains("r")) perms.add(PosixFilePermission.OWNER_READ)
98- if (posixPermissions.contains("w")) perms.add(PosixFilePermission.OWNER_WRITE)
99- if (posixPermissions.contains("x")) perms.add(PosixFilePermission.OWNER_EXECUTE)
100- Files.setPosixFilePermissions(Paths.get(path), perms)
101- }
102-
103- private val exitCallbacks: MutableList<() -> Unit> = mutableListOf()
104-
105- fun onDidExit(callback: () -> Unit) {
106- exitCallbacks.add(callback)
107- }
108-
109- init {
110- if (useTcp) {
111- try {
112- val socket = Socket("127.0.0.1", 3000)
113- val writer = PrintWriter(socket.getOutputStream(), true)
114- this.writer = writer
115- val reader = BufferedReader(InputStreamReader(socket.getInputStream()))
116- this.reader = reader
117-
118- Thread {
119- try {
120- while (true) {
121- val line = reader.readLine()
122- if (line != null && line.isNotEmpty()) {
123- try {
124- handleMessage(line)
125- } catch (e: Exception) {
126- println("Error handling message: $line")
127- println(e)
128- }
129- } else {
130- Thread.sleep(100)
131- }
132- }
133- } catch (e: IOException) {
134- e.printStackTrace()
135- } finally {
136- try {
137- reader.close()
138- writer.close()
139- } catch (e: IOException) {
140- e.printStackTrace()
141- }
142- }
143- }
144- .start()
145- } catch (e: Exception) {
146- println("TCP Connection Error: Unable to connect to 127.0.0.1:3000")
147- println("Reason: ${e.message}")
148- e.printStackTrace()
149- }
150- } else {
151- // Set proper permissions synchronously
152- runBlocking(Dispatchers.IO) {
153- setPermissions(continueCorePath)
154- }
155-
156- // Start the subprocess
157- val processBuilder =
158- ProcessBuilder(continueCorePath).directory(File(continueCorePath).parentFile)
159- process = processBuilder.start()
160-
161- val outputStream = process!!.outputStream
162- val inputStream = process!!.inputStream
163-
164- writer = OutputStreamWriter(outputStream, StandardCharsets.UTF_8)
165- reader = BufferedReader(InputStreamReader(inputStream, StandardCharsets.UTF_8))
166-
167- process!!.onExit().thenRun {
168- exitCallbacks.forEach { it() }
169- var err = process?.errorStream?.bufferedReader()?.readText()?.trim()
170- if (err != null) {
171- // There are often "⚡️Done in Xms" messages, and we want everything after the last one
172- val delimiter = "⚡ Done in"
173- val doneIndex = err.lastIndexOf(delimiter)
174- if (doneIndex != -1) {
175- err = err.substring(doneIndex + delimiter.length)
176- }
177- }
178-
179- println("Core process exited with output: $err")
180-
181- // Log the cause of the failure
182- val telemetryService = service<TelemetryService>()
183- telemetryService.capture("jetbrains_core_exit", mapOf("error" to err))
184-
185- // Clean up all resources
186- writer?.close()
187- reader?.close()
188- process?.destroy()
189- }
190-
191- coroutineScope.launch(Dispatchers.IO) {
192- try {
193- while (true) {
194- val line = reader?.readLine()
195- if (line != null && line.isNotEmpty()) {
196- try {
197- handleMessage(line)
198- } catch (e: Exception) {
199- println("Error handling message: $line")
200- println(e)
201- }
202- } else {
203- delay(100)
204- }
205- }
206- } catch (e: IOException) {
207- e.printStackTrace()
208- } finally {
209- try {
210- reader?.close()
211- writer?.close()
212- outputStream.close()
213- inputStream.close()
214- process?.destroy()
215- } catch (e: IOException) {
216- e.printStackTrace()
217- }
218- }
219- }
220- }
221- }
222-
22371 fun killSubProcess() {
224- process?.isAlive?.let {
225- exitCallbacks.clear()
226- process?.destroy()
227- }
72+ process.close()
22873 }
22974 }
No newline at the end of the file
modified extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/CoreMessengerManager.kt +27 −30
@@ -2,53 +2,50 @@
22
33 import com.github.continuedev.continueintellijextension.services.TelemetryService
44 import com.github.continuedev.continueintellijextension.utils.castNestedOrNull
5-import com.github.continuedev.continueintellijextension.utils.getContinueBinaryPath
65 import com.github.continuedev.continueintellijextension.utils.getMachineUniqueID
76 import com.intellij.openapi.components.service
7+import com.intellij.openapi.diagnostic.Logger
88 import com.intellij.openapi.project.Project
9-import kotlinx.coroutines.*
9+import kotlinx.coroutines.CoroutineScope
10+import kotlinx.coroutines.delay
11+import kotlinx.coroutines.launch
1012
1113 class CoreMessengerManager(
1214 private val project: Project,
1315 private val ideProtocolClient: IdeProtocolClient,
1416 private val coroutineScope: CoroutineScope
1517 ) {
16-
17- var coreMessenger: CoreMessenger? = null
18+ var coreMessenger: CoreMessenger = createCoreMessenger()
1819 private var lastBackoffInterval = 0.5
20+ private val log = Logger.getInstance(CoreMessengerManager::class.java)
1921
2022 init {
21- coroutineScope.launch {
22- val continueBinaryPath = getContinueBinaryPath()
23- setupCoreMessenger(continueBinaryPath)
24- }
23+ setupAnonymousTelemetry()
2524 }
2625
27- private fun setupCoreMessenger(continueCorePath: String) {
28- try {
29- coreMessenger = CoreMessenger(project, continueCorePath, ideProtocolClient, coroutineScope)
30-
31- coreMessenger?.request("config/getSerializedProfileInfo", null, null) { response ->
32- val allowAnonymousTelemetry = response.castNestedOrNull<Boolean>("content", "result", "config", "allowAnonymousTelemetry")
33-
34- val telemetryService = service<TelemetryService>()
35- if (allowAnonymousTelemetry == true || allowAnonymousTelemetry == null) {
36- telemetryService.setup(getMachineUniqueID())
37- }
38- }
39-
40- // On exit, use exponential backoff to create another CoreMessenger
41- coreMessenger?.onDidExit {
26+ fun restart() {
27+ coroutineScope.launch {
28+ try {
29+ coreMessenger.killSubProcess()
4230 lastBackoffInterval *= 2
43- println("CoreMessenger exited, retrying in $lastBackoffInterval seconds")
44- Thread.sleep((lastBackoffInterval * 1000).toLong())
45- setupCoreMessenger(continueCorePath)
31+ log.warn("Continue process exited, retrying in $lastBackoffInterval seconds")
32+ delay((lastBackoffInterval * 1000).toLong())
33+ coreMessenger = createCoreMessenger()
34+ } catch (e: Exception) {
35+ service<TelemetryService>().capture("jetbrains_core_start_error", mapOf("error" to e))
4636 }
47- } catch (err: Throwable) {
48- val telemetryService = service<TelemetryService>()
49- telemetryService.capture("jetbrains_core_start_error", mapOf("error" to err))
37+ }
38+ }
5039
51- err.printStackTrace()
40+ private fun createCoreMessenger() =
41+ CoreMessenger(project, ideProtocolClient, coroutineScope, ::restart)
42+
43+ private fun setupAnonymousTelemetry() {
44+ coreMessenger.request("config/getSerializedProfileInfo", null, null) { response ->
45+ val allowAnonymousTelemetry =
46+ response.castNestedOrNull<Boolean>("content", "result", "config", "allowAnonymousTelemetry")
47+ if (allowAnonymousTelemetry == true || allowAnonymousTelemetry == null)
48+ service<TelemetryService>().setup(getMachineUniqueID())
5249 }
5350 }
5451 }
added extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/process/ContinueBinaryProcess.kt +81 −0
@@ -0,0 +1,81 @@
1+package com.github.continuedev.continueintellijextension.`continue`.process
2+
3+import com.github.continuedev.continueintellijextension.services.TelemetryService
4+import com.github.continuedev.continueintellijextension.utils.OS
5+import com.github.continuedev.continueintellijextension.utils.getContinueBinaryPath
6+import com.github.continuedev.continueintellijextension.utils.getOS
7+import com.intellij.openapi.components.service
8+import kotlinx.coroutines.Dispatchers
9+import kotlinx.coroutines.runBlocking
10+import java.io.File
11+import java.io.InputStream
12+import java.io.OutputStream
13+import java.nio.file.Files
14+import java.nio.file.Paths
15+import java.nio.file.attribute.PosixFilePermission
16+
17+class ContinueBinaryProcess(private val onExit: () -> Unit) : ContinueProcess {
18+
19+ private val process = startBinaryProcess()
20+ override val input: InputStream = process.inputStream
21+ override val output: OutputStream = process.outputStream
22+
23+ override fun close() =
24+ process.destroy()
25+
26+ private fun startBinaryProcess(): Process {
27+ val path = getContinueBinaryPath()
28+ runBlocking(Dispatchers.IO) {
29+ setPermissions()
30+ }
31+ return ProcessBuilder(path).directory(File(path).parentFile)
32+ .start()
33+ .apply { onExit().thenRun(onExit).thenRun { reportErrorTelemetry() } }
34+ }
35+
36+
37+ private fun reportErrorTelemetry() {
38+ var err = process.errorStream?.bufferedReader()?.readText()?.trim()
39+ if (err != null) {
40+ // There are often "⚡️Done in Xms" messages, and we want everything after the last one
41+ val delimiter = "⚡ Done in"
42+ val doneIndex = err.lastIndexOf(delimiter)
43+ if (doneIndex != -1) {
44+ err = err.substring(doneIndex + delimiter.length)
45+ }
46+ }
47+
48+ println("Core process exited with output: $err")
49+
50+ val telemetryService = service<TelemetryService>()
51+ telemetryService.capture("jetbrains_core_exit", mapOf("error" to err))
52+ }
53+
54+ private companion object {
55+
56+ private fun setPermissions() {
57+ val os = getOS()
58+ when (os) {
59+ OS.MAC -> setMacOsPermissions()
60+ OS.WINDOWS -> {}
61+ OS.LINUX -> elevatePermissions()
62+ }
63+ }
64+
65+ private fun setMacOsPermissions() {
66+ ProcessBuilder("xattr", "-dr", "com.apple.quarantine", getContinueBinaryPath()).start().waitFor()
67+ elevatePermissions()
68+ }
69+
70+ private fun elevatePermissions() {
71+ val path = getContinueBinaryPath()
72+ val permissions = setOf(
73+ PosixFilePermission.OWNER_READ,
74+ PosixFilePermission.OWNER_WRITE,
75+ PosixFilePermission.OWNER_EXECUTE
76+ )
77+ Files.setPosixFilePermissions(Paths.get(path), permissions)
78+ }
79+ }
80+
81+}
added extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/process/ContinueProcess.kt +13 −0
@@ -0,0 +1,13 @@
1+package com.github.continuedev.continueintellijextension.`continue`.process
2+
3+import java.io.InputStream
4+import java.io.OutputStream
5+
6+interface ContinueProcess {
7+
8+ val input: InputStream
9+ val output: OutputStream
10+
11+ fun close()
12+
13+}
added extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/process/ContinueProcessHandler.kt +61 −0
@@ -0,0 +1,61 @@
1+package com.github.continuedev.continueintellijextension.`continue`.process
2+
3+import com.github.continuedev.continueintellijextension.error.ContinueErrorService
4+import com.intellij.openapi.components.service
5+import kotlinx.coroutines.*
6+import kotlinx.coroutines.channels.Channel
7+import java.io.BufferedReader
8+import java.io.IOException
9+import java.io.InputStreamReader
10+import java.io.OutputStreamWriter
11+
12+class ContinueProcessHandler(
13+ parentScope: CoroutineScope,
14+ private val process: ContinueProcess,
15+ handleMessage: (String) -> (Unit)
16+) {
17+ private val innerJob = Job()
18+ private val scope = CoroutineScope(parentScope.coroutineContext + innerJob)
19+ private val pendingWrites = Channel<String>(Channel.UNLIMITED)
20+ private val writer = OutputStreamWriter(process.output)
21+ private val reader = BufferedReader(InputStreamReader(process.input))
22+
23+ init {
24+ scope.launch(Dispatchers.IO) {
25+ try {
26+ while (isActive) {
27+ val line = reader.readLine()
28+ if (line != null && line.isNotEmpty()) {
29+ try {
30+ handleMessage(line)
31+ } catch (e: Exception) {
32+ service<ContinueErrorService>().report(e, "Error handling message: $line")
33+ }
34+ } else
35+ delay(100)
36+ }
37+ } catch (e: IOException) {
38+ service<ContinueErrorService>().report(e)
39+ }
40+ }
41+ scope.launch(Dispatchers.IO) {
42+ for (message in pendingWrites) {
43+ writer.write(message)
44+ writer.write("\r\n")
45+ writer.flush()
46+ }
47+ }
48+ }
49+
50+ fun write(message: String) =
51+ pendingWrites.trySend(message)
52+
53+ fun close() {
54+ innerJob.cancel()
55+ scope.launch(Dispatchers.IO) {
56+ reader.close()
57+ writer.close()
58+ process.close()
59+ }
60+ }
61+}
added extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/process/ContinueSocketProcess.kt +16 −0
@@ -0,0 +1,16 @@
1+package com.github.continuedev.continueintellijextension.`continue`.process
2+
3+import java.io.InputStream
4+import java.io.OutputStream
5+import java.net.Socket
6+
7+class ContinueSocketProcess : ContinueProcess {
8+
9+ private val socket = Socket("127.0.0.1", 3000)
10+ override val input: InputStream = socket.inputStream
11+ override val output: OutputStream = socket.outputStream
12+
13+ override fun close() =
14+ socket.close()
15+
16+}
modified extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/error/ContinueErrorService.kt +8 −1
@@ -21,6 +21,7 @@
2121 init {
2222 Sentry.init { config ->
2323 config.dsn = SENTRY_DSN
24+ config.environment = recognizeEnvironment()
2425 config.isSendDefaultPii = false
2526 config.setTag("ide_version", ApplicationInfo.getInstance().build.asString())
2627 config.setTag("jcef_supported", JBCefApp.isSupported().toString())
@@ -45,6 +46,12 @@
4546 private const val PLUGIN_ID = "com.github.continuedev.continueintellijextension"
4647 private const val SENTRY_DSN =
4748 "https://fe99934dcdc537d84209893a3f96a196@o4505462064283648.ingest.us.sentry.io/4508184596054016"
48- }
4949
50+ private fun recognizeEnvironment() =
51+ when {
52+ System.getProperty("robot-server.port") != null -> "e2e"
53+ System.getProperty("idea.is.internal").toBoolean() -> "dev"
54+ else -> "production"
55+ }
56+ }
5057 }
No newline at the end of the file
modified extensions/intellij/src/main/resources/META-INF/plugin.xml +7 −0
@@ -70,6 +70,13 @@
7070 <override-text place="GoToAction" text="Continue: Accept Diff"/>
7171 </action>
7272
73+ <action id="continue.restartProcess"
74+ class="com.github.continuedev.continueintellijextension.actions.RestartContinueProcess"
75+ text="Restart Process"
76+ description="Restart Process">
77+ <override-text place="GoToAction" text="Continue: Restart Process"/>
78+ </action>
79+
7380 <action id="continue.rejectDiff"
7481 class="com.github.continuedev.continueintellijextension.actions.RejectDiffAction"
7582 text="Reject Diff" description="Reject Diff">
added extensions/intellij/src/test/kotlin/com/github/continuedev/continueintellijextension/unit/ContinueProcessHandlerTest.kt +51 −0
@@ -0,0 +1,51 @@
1+package com.github.continuedev.continueintellijextension.unit
2+
3+import com.github.continuedev.continueintellijextension.`continue`.process.ContinueProcess
4+import com.github.continuedev.continueintellijextension.`continue`.process.ContinueProcessHandler
5+import kotlinx.coroutines.Dispatchers
6+import kotlinx.coroutines.joinAll
7+import kotlinx.coroutines.launch
8+import kotlinx.coroutines.test.runTest
9+import org.junit.jupiter.api.Assertions
10+import org.junit.jupiter.api.RepeatedTest
11+import java.io.InputStream
12+import java.io.OutputStream
13+
14+class ContinueProcessHandlerTest {
15+
16+ @RepeatedTest(5)
17+ fun `test concurrent writes with queue`() = runTest {
18+ val process = StringContinueProcess()
19+ val handler = ContinueProcessHandler(this, process) {}
20+
21+ (0..100).map { i -> launch(Dispatchers.Default) { handler.write("message number $i") } }
22+ .joinAll()
23+
24+ handler.close()
25+
26+ // assert all message lines are present (order is not important)
27+ val lines = process.string.split("\r\n").filter { it.isNotBlank() }
28+ for (i in 0..100)
29+ Assertions.assertTrue(lines.contains("message number $i"))
30+
31+ // note: this test will fail if the handler writes messages directly to the output stream
32+ // this problem can be easily reproduced by removing the channel<string> from the handler code
33+ }
34+
35+ class StringContinueProcess : ContinueProcess {
36+ val string = StringBuilder()
37+ override val input: InputStream = InputStream.nullInputStream()
38+ override val output: OutputStream = object : OutputStream() {
39+ override fun write(b: Int) {
40+ string.append(b.toChar())
41+ }
42+
43+ override fun write(b: ByteArray, off: Int, len: Int) {
44+ string.append(String(b, off, len))
45+ }
46+ }
47+
48+ override fun close() {
49+ }
50+ }
51+}
modified extensions/vscode/config_schema.json +21 −1
@@ -359,8 +359,18 @@
359359 "description": "The AWS security profile to use",
360360 "type": "string"
361361 },
362+ "accessKeyId": {
363+ "title": "Access Key ID",
364+ "description": "AWS access key id (can be used together with secretAccessKey in place of profile)",
365+ "type": "string"
366+ },
367+ "secretAccessKey": {
368+ "title": "Secret Access Key",
369+ "description": "AWS secret access key (can be used together with secretAccessKey in place of profile)",
370+ "type": "string"
371+ },
362372 "modelArn": {
363- "title": "Profile",
373+ "title": "Model ARN",
364374 "description": "The AWS arn for the imported model",
365375 "type": "string"
366376 },
@@ -2903,6 +2913,16 @@
29032913 "title": "Profile",
29042914 "description": "The AWS security profile to use",
29052915 "type": "string"
2916+ },
2917+ "accessKeyId": {
2918+ "title": "Access Key ID",
2919+ "description": "AWS access key id (can be used together with secretAccessKey in place of profile)",
2920+ "type": "string"
2921+ },
2922+ "secretAccessKey": {
2923+ "title": "Secret Access Key",
2924+ "description": "AWS secret access key (can be used together with secretAccessKey in place of profile)",
2925+ "type": "string"
29062926 }
29072927 },
29082928 "required": ["provider"],
modified extensions/vscode/e2e/tests/GUI.test.ts +0 −14
@@ -357,20 +357,6 @@
357357 await messageInput.sendKeys(Key.ENTER);
358358 await messageInput.sendKeys(Key.ENTER);
359359
360- // Open the context items peek
361- const contextItemsPeek = await GUISelectors.getContextItemsPeek(view);
362- await contextItemsPeek.click();
363-
364- await TestUtils.waitForSuccess(async () => {
365- const firstContextItemInPeek =
366- await GUISelectors.getFirstContextItemsPeekItem(view);
367- await firstContextItemInPeek.click();
368-
369- // Check that item is there with correct name
370- const description = await firstContextItemInPeek.getText();
371- expect(description).to.include("Terminal");
372- });
373-
374360 // Check that the contents match what we expect (repeated back by the mock LLM)
375361 await TestUtils.waitForSuccess(() => {
376362 return GUISelectors.getThreadMessageByText(
modified extensions/vscode/package-lock.json +0 −0

Not shown: the file is larger than the hub shows, or this page holds as much as it shows. View the file.

modified extensions/vscode/package.json +1 −1
@@ -2,7 +2,7 @@
22 "name": "continue",
33 "icon": "media/icon.png",
44 "author": "Continue Dev, Inc",
5- "version": "1.1.57",
5+ "version": "1.1.59",
66 "repository": {
77 "type": "git",
88 "url": "https://github.com/continuedev/continue"
modified extensions/vscode/src/activation/NextEditWindowManager.ts +67 −36
@@ -23,14 +23,30 @@
2323 }
2424
2525 const SVG_CONFIG = {
26- stroke: "#999998",
26+ // stroke: "#999998",
27+ stroke: "#666667",
2728 strokeWidth: 1,
2829 textColor: "#999998",
29- filter: "drop-shadow(0 2px 2px rgba(0,0,0,0.2))",
30+ purple: "rgba(112, 114, 209)",
31+ blue: "rgba(107, 166, 205)",
32+ green: "rgba(136 194 163)",
33+ // filter: "drop-shadow(0 2px 2px rgba(0,0,0,0.2))",
34+ // filter: "drop-shadow(0 2px 2px rgba(255,255,255,0.2))",
35+ // filter:
36+ // "drop-shadow(0 2px 4px rgb(112, 114, 209)) drop-shadow(0 4px 8px rgb(136, 194, 163)) drop-shadow(0 6px 12px rgb(107, 166, 205));",
37+ // filter:
38+ // "drop-shadow(0 3px 6px rgba(112, 114, 209, 0.4)) drop-shadow(0 3px 6px rgba(136, 194, 163, 0.4)) drop-shadow(0 3px 6px rgba(107, 166, 205, 0.4));",
39+ // filter: `drop-shadow(4px 4px 0px rgba(112, 114, 209, 0.4))
40+ // drop-shadow(8px 8px 0px rgba(107, 166, 205, 0.3))
41+ // drop-shadow(12px 12px 0px rgba(136, 194, 163, 0.2));`,
42+ filter: `drop-shadow(4px 4px 0px rgba(112, 114, 209, 0.4))
43+ drop-shadow(-2px 4px 0px rgba(107, 166, 205, 0.3))
44+ drop-shadow(4px -2px 0px rgba(136, 194, 163, 0.2))
45+ drop-shadow(-2px -2px 0px rgba(112, 114, 209, 0.2));`,
3046 radius: 3,
3147 leftMargin: 40,
3248 defaultText: "",
33- lineSpacing: 1.2, // Line spacing multiplier
49+ lineSpacing: 1.3, // Line spacing multiplier
3450 cursorOffset: 4, // Spaces to offset from cursor
3551
3652 get fontSize() {
@@ -244,6 +260,7 @@
244260 editor: vscode.TextEditor,
245261 currCursorPos: vscode.Position,
246262 editableRegionStartLine: number,
263+ oldEditRangeSlice: string,
247264 newEditRangeSlice: string,
248265 diffLines: DiffLine[],
249266 ) {
@@ -278,7 +295,13 @@
278295 );
279296
280297 // Create and apply decoration with the text.
281- await this.renderTooltip(editor, currCursorPos, newEditRangeSlice);
298+ await this.renderTooltip(
299+ editor,
300+ currCursorPos,
301+ oldEditRangeSlice,
302+ newEditRangeSlice,
303+ editableRegionStartLine,
304+ );
282305
283306 // Reserve tab and esc to either accept or reject the displayed next edit contents.
284307 await NextEditWindowManager.reserveTabAndEsc();
@@ -507,6 +530,7 @@
507530 */
508531 private async createCodeRender(
509532 text: string,
533+ currLineOffsetFromTop: number,
510534 ): Promise<
511535 | { uri: vscode.Uri; dimensions: { width: number; height: number } }
512536 | undefined
@@ -529,6 +553,7 @@
529553 {
530554 imageType: "svg",
531555 },
556+ currLineOffsetFromTop,
532557 );
533558
534559 return {
@@ -547,9 +572,16 @@
547572 * @returns The decoration.
548573 */
549574 private async createCodeRenderDecoration(
550- code: string,
575+ originalCode: string,
576+ predictedCode: string,
577+ position: vscode.Position,
578+ editableRegionStartLine: number,
551579 ): Promise<vscode.TextEditorDecorationType | undefined> {
552- const uriAndDimensions = await this.createCodeRender(code);
580+ const currLineOffsetFromTop = position.line - editableRegionStartLine;
581+ const uriAndDimensions = await this.createCodeRender(
582+ predictedCode,
583+ currLineOffsetFromTop,
584+ );
553585 if (!uriAndDimensions) {
554586 return undefined;
555587 }
@@ -558,38 +590,30 @@
558590 const tipWidth = dimensions.width;
559591 const tipHeight = dimensions.height;
560592
593+ const offsetFromTop =
594+ (position.line - editableRegionStartLine) * SVG_CONFIG.lineHeight;
595+
596+ // Set the margin-left so that it's never covering code inside the editable region.
597+ const marginLeft =
598+ SVG_CONFIG.getTipWidth(originalCode) -
599+ SVG_CONFIG.getTipWidth(originalCode.split("\n")[currLineOffsetFromTop]);
600+
601+ console.log(marginLeft);
602+ console.log(SVG_CONFIG.getTipWidth(originalCode));
603+ console.log(
604+ SVG_CONFIG.getTipWidth(originalCode.split("\n")[currLineOffsetFromTop]),
605+ );
606+ console.log(originalCode.split("\n")[currLineOffsetFromTop]);
561607 return vscode.window.createTextEditorDecorationType({
562- after: {
608+ before: {
563609 contentIconPath: uri,
564- // border: `;box-shadow: inset 0 0 0 ${SVG_CONFIG.strokeWidth}px ${SVG_CONFIG.stroke}, inset 0 0 0 ${tipHeight}px ${backgroundColour};
565- // border-radius: ${SVG_CONFIG.radius}px;
566- // filter: ${SVG_CONFIG.filter}`,
567- // width: `${tipWidth}px`,
568- // height: `${tipHeight}px`,
569- // border: `transparent; position: absolute; z-index: 1000;
570- // box-shadow: inset 0 0 0 ${SVG_CONFIG.strokeWidth}px ${SVG_CONFIG.stroke},
571- // inset 0 0 0 ${tipHeight}px ${backgroundColour};
572- // border-radius: ${SVG_CONFIG.radius}px;
573- // filter: ${SVG_CONFIG.filter};
574- // margin-left: ${SVG_CONFIG.cursorOffset * 8}px;`,
575- border: `transparent; position: absolute; z-index: 1000;
576- box-shadow: inset 0 0 0 ${SVG_CONFIG.strokeWidth}px ${SVG_CONFIG.stroke}, inset 0 0 0 ${tipHeight}px;
577- filter: ${SVG_CONFIG.filter};
578- border-radius: ${SVG_CONFIG.radius}px;
579- margin-left: ${SVG_CONFIG.cursorOffset * 8}px;`,
580- // border: `solid 1px white; position: absolute; z-index: 1000;
581- // margin-left: ${SVG_CONFIG.cursorOffset * 8}px;
582- // margin-top: 0em;`,
583- // border: `solid 1px white; position: absolute; z-index: 1000;
584- // margin: 0em; padding: 0em;
585- // margin-left: ${SVG_CONFIG.cursorOffset * 8}px;
586- // margin-top: 0em;`,
610+ border: `transparent; position: absolute; z-index: 2147483647;
611+ filter: ${SVG_CONFIG.filter};
612+ margin-top: ${-1 * offsetFromTop}px;
613+ margin-left: ${marginLeft}px;`,
587614 width: `${tipWidth}px`,
588615 height: `${tipHeight}px`,
589- // textDecoration: `none; transform: translateY(-100%);`,
590616 },
591- // Set a negative margin to make the decoration float if it starts to displace text.
592- // Also use absolute positioning.
593617 rangeBehavior: vscode.DecorationRangeBehavior.ClosedClosed,
594618 });
595619 }
@@ -684,16 +708,23 @@
684708 private async renderTooltip(
685709 editor: vscode.TextEditor,
686710 position: vscode.Position,
687- text: string,
711+ originalCode: string,
712+ predictedCode: string,
713+ editableRegionStartLine: number,
688714 ) {
689715 console.log("renderTooltip");
690716 // Capture document version to detect changes.
691717 const docVersion = editor.document.version;
692718
693719 // Create a new decoration with the text.
694- const decoration = await this.createCodeRenderDecoration(text);
720+ const decoration = await this.createCodeRenderDecoration(
721+ originalCode,
722+ predictedCode,
723+ position,
724+ editableRegionStartLine,
725+ );
695726 if (!decoration) {
696- console.error("Failed to create decoration for text:", text);
727+ console.error("Failed to create decoration for text:", predictedCode);
697728 return;
698729 }
699730
modified extensions/vscode/src/autocomplete/completionProvider.ts +1 −0
@@ -420,6 +420,7 @@
420420 editor,
421421 currCursorPos,
422422 editableRegionStartLine,
423+ oldEditRangeSlice,
423424 newEditRangeSlice,
424425 diffLines,
425426 );
modified extensions/vscode/src/diff/vertical/handler.ts +21 −3
@@ -174,9 +174,12 @@
174174 // Clear deletion buffer
175175 await this.insertDeletionBuffer();
176176
177- await this.reapplyWithMyersDiff(diffLines);
178-
179- const range = new vscode.Range(this.startLine, 0, this.startLine, 0);
177+ const myersDiffs = await this.reapplyWithMyersDiff(diffLines);
178+
179+ // Scroll to the first diff
180+ const scrollToLine =
181+ this.getFirstChangedLine(myersDiffs) ?? this.startLine;
182+ const range = new vscode.Range(scrollToLine, 0, scrollToLine, 0);
180183 this.editor.revealRange(range, vscode.TextEditorRevealType.Default);
181184
182185 this.options.onStatusUpdate(
@@ -370,6 +373,8 @@
370373
371374 this.editorToVerticalDiffCodeLens.set(this.fileUri, codeLensBlocks);
372375 this.refreshCodeLens();
376+
377+ return myersDiffs;
373378 }
374379
375380 private async insertDeletionBuffer() {
@@ -550,4 +555,17 @@
550555
551556 this.refreshCodeLens();
552557 }
558+
559+ /**
560+ * Gets the first line number that was changed in a diff
561+ */
562+ private getFirstChangedLine(diff: DiffLine[]): number | null {
563+ for (let i = 0; i < diff.length; i++) {
564+ const item = diff[i];
565+ if (item.type === "old" || item.type === "new") {
566+ return this.startLine + i;
567+ }
568+ }
569+ return null;
570+ }
553571 }
modified extensions/vscode/src/stubs/WorkOsAuthProvider.ts +22 −22
@@ -77,6 +77,7 @@
7777 { promise: Promise<string>; cancel: EventEmitter<void> }
7878 >();
7979 private _refreshInterval: NodeJS.Timeout | null = null;
80+ private _isRefreshing = false;
8081
8182 private static EXPIRATION_TIME_MS = 1000 * 60 * 15; // 15 minutes
8283 private static REFRESH_INTERVAL_MS = 1000 * 60 * 10; // 10 minutes
@@ -100,11 +101,11 @@
100101 this.secretStorage = new SecretStorage(context);
101102
102103 // Immediately refresh any existing sessions
103- this.refreshSessions();
104+ void this.refreshSessions();
104105
105106 // Set up a regular interval to refresh tokens
106107 this._refreshInterval = setInterval(() => {
107- this.refreshSessions();
108+ void this.refreshSessions();
108109 }, WorkOsAuthProvider.REFRESH_INTERVAL_MS);
109110 }
110111
@@ -182,10 +183,18 @@
182183 }
183184
184185 async refreshSessions() {
186+ // Prevent concurrent refresh operations
187+ if (this._isRefreshing) {
188+ return;
189+ }
190+
185191 try {
192+ this._isRefreshing = true;
186193 await this._refreshSessions();
187194 } catch (e) {
188195 console.error(`Error refreshing sessions: ${e}`);
196+ } finally {
197+ this._isRefreshing = false;
189198 }
190199 }
191200
@@ -198,12 +207,9 @@
198207 const finalSessions = [];
199208 for (const session of sessions) {
200209 try {
201- // For expired tokens, don't use retries - if refresh fails, we drop the session
202- const refreshMethod = this.jwtIsExpiredOrInvalid(session.accessToken)
203- ? this._refreshSession.bind(this) // Direct refresh for expired tokens
204- : this._refreshSessionWithRetry.bind(this); // Retry for valid tokens
205-
206- const newSession = await refreshMethod(session.refreshToken);
210+ const newSession = await this._refreshSessionWithRetry(
211+ session.refreshToken,
212+ );
207213 finalSessions.push({
208214 ...session,
209215 accessToken: newSession.accessToken,
@@ -232,7 +238,6 @@
232238 private async _refreshSessionWithRetry(
233239 refreshToken: string,
234240 attempt = 1,
235- maxAttempts = 3,
236241 baseDelay = 1000,
237242 ): Promise<{
238243 accessToken: string;
@@ -242,30 +247,25 @@
242247 try {
243248 return await this._refreshSession(refreshToken);
244249 } catch (error: any) {
245- // Don't retry for auth errors (401 Unauthorized) or if we've reached max attempts
250+ // Don't retry for auth errors
246251 if (
247252 error.message?.includes("401") ||
248253 error.message?.includes("Invalid refresh token") ||
249- error.message?.includes("Unauthorized") ||
250- attempt >= maxAttempts
254+ error.message?.includes("Unauthorized")
251255 ) {
252256 throw error;
253257 }
254258
255259 // For network errors or transient server issues, retry with backoff
256260 // Calculate exponential backoff delay with jitter
257- const delay =
258- baseDelay * Math.pow(2, attempt - 1) * (0.5 + Math.random() * 0.5);
261+ const delay = Math.min(
262+ baseDelay * Math.pow(2, attempt - 1) * (0.5 + Math.random() * 0.5),
263+ 2 * 60 * 1000, // 2 minutes
264+ );
259265
260- // Schedule retry after delay
261266 return new Promise((resolve, reject) => {
262267 setTimeout(() => {
263- this._refreshSessionWithRetry(
264- refreshToken,
265- attempt + 1,
266- maxAttempts,
267- baseDelay,
268- )
268+ this._refreshSessionWithRetry(refreshToken, attempt + 1, baseDelay)
269269 .then(resolve)
270270 .catch(reject);
271271 }, delay);
@@ -360,7 +360,7 @@
360360
361361 return session;
362362 } catch (e) {
363- window.showErrorMessage(`Sign in failed: ${e}`);
363+ void window.showErrorMessage(`Sign in failed: ${e}`);
364364 throw e;
365365 }
366366 }
modified extensions/vscode/src/stubs/WorkOsAuthProvider.vitest.ts +2 −2
@@ -641,7 +641,7 @@
641641 }
642642 });
643643
644-it("should remove expired tokens when refresh fails", async () => {
644+it("should remove expired tokens when refresh fails with a 401 error", async () => {
645645 // Mock Date.now to return a time that makes tokens appear expired
646646 const originalDateNow = Date.now;
647647 const futureTime = Date.now() + 7200000; // 2 hours in the future
@@ -675,7 +675,7 @@
675675 global.setInterval = vi.fn().mockReturnValue(123 as any);
676676
677677 // Refresh will fail with network error
678- fetchMock.mockRejectedValueOnce(new Error("Network error"));
678+ fetchMock.mockRejectedValueOnce(new Error("401"));
679679
680680 // Setup storage
681681 mockSecretStorageGet.mockResolvedValue(JSON.stringify([expiredSession]));
modified gui/package-lock.json +0 −0

Not shown: the file is larger than the hub shows, or this page holds as much as it shows. View the file.

modified gui/package.json +2 −0
@@ -19,6 +19,7 @@
1919 "@continuedev/config-yaml": "file:../packages/config-yaml",
2020 "@headlessui/react": "^2.2.0",
2121 "@heroicons/react": "^2.0.18",
22+ "@panzoom/panzoom": "^4.6.0",
2223 "@reduxjs/toolkit": "^2.3.0",
2324 "@tiptap/core": "^2.3.2",
2425 "@tiptap/extension-document": "^2.3.2",
@@ -43,6 +44,7 @@
4344 "handlebars": "^4.7.8",
4445 "lodash": "^4.17.21",
4546 "lowlight": "^3.3.0",
47+ "mermaid": "^11.6.0",
4648 "minisearch": "^7.0.2",
4749 "mustache": "^4.2.0",
4850 "posthog-js": "^1.130.1",
modified gui/public/logos/sambanova.png +0 −0

Binary content is not shown. View the file.

modified gui/src/components/ModeSelect/ModeIcon.tsx +7 −1
@@ -1,4 +1,8 @@
1-import { ChatBubbleLeftIcon, SparklesIcon } from "@heroicons/react/24/outline";
1+import {
2+ ChatBubbleLeftIcon,
3+ SparklesIcon,
4+ SwatchIcon,
5+} from "@heroicons/react/24/outline";
26 import { MessageModes } from "core";
37
48 interface ModeIconProps {
@@ -13,6 +17,8 @@
1317 switch (mode) {
1418 case "agent":
1519 return <SparklesIcon className={className} />;
20+ case "plan":
21+ return <SwatchIcon className={className} />;
1622 case "chat":
1723 return <ChatBubbleLeftIcon className={className} />;
1824 }
modified gui/src/components/ModeSelect/ModeSelect.tsx +59 −6
@@ -1,4 +1,8 @@
1-import { CheckIcon, ChevronDownIcon } from "@heroicons/react/24/outline";
1+import {
2+ CheckIcon,
3+ ChevronDownIcon,
4+ InformationCircleIcon,
5+} from "@heroicons/react/24/outline";
26 import { MessageModes } from "core";
37 import { modelSupportsTools } from "core/llm/autodetect";
48 import { useCallback, useEffect, useMemo } from "react";
@@ -6,6 +10,7 @@
610 import { selectSelectedChatModel } from "../../redux/slices/configSlice";
711 import { setMode } from "../../redux/slices/sessionSlice";
812 import { getFontSize, getMetaKeyLabel } from "../../util";
13+import { ToolTip } from "../gui/Tooltip";
914 import { useMainEditor } from "../mainInput/TipTapEditor";
1015 import { Listbox, ListboxButton, ListboxOption, ListboxOptions } from "../ui";
1116 import { ModeIcon } from "./ModeIcon";
@@ -27,13 +32,19 @@
2732 if (!selectedModel) {
2833 return;
2934 }
30- if (mode === "agent" && !agentModeSupported) {
35+ if (mode !== "chat" && !agentModeSupported) {
3136 dispatch(setMode("chat"));
3237 }
3338 }, [mode, agentModeSupported, dispatch, selectedModel]);
3439
3540 const cycleMode = useCallback(() => {
36- dispatch(setMode(mode === "chat" ? "agent" : "chat"));
41+ if (mode === "chat") {
42+ dispatch(setMode("plan"));
43+ } else if (mode === "plan") {
44+ dispatch(setMode("agent"));
45+ } else {
46+ dispatch(setMode("chat"));
47+ }
3748 // Only focus main editor if another one doesn't already have focus
3849 if (!document.activeElement?.classList?.contains("ProseMirror")) {
3950 mainEditor?.commands.focus();
@@ -74,7 +85,7 @@
7485 >
7586 <ModeIcon mode={mode} />
7687 <span className="hidden sm:block">
77- {mode.charAt(0).toUpperCase() + mode.slice(1)}
88+ {mode === "chat" ? "Chat" : mode === "agent" ? "Agent" : "Plan"}
7889 </span>
7990 <ChevronDownIcon
8091 className="h-2 w-2 flex-shrink-0"
@@ -94,7 +105,35 @@
94105 </div>
95106 {mode === "chat" && <CheckIcon className="ml-auto h-3 w-3" />}
96107 </ListboxOption>
97-
108+ <ListboxOption
109+ value="plan"
110+ disabled={!agentModeSupported}
111+ className={"gap-1"}
112+ >
113+ <div className="flex flex-row items-center gap-1.5">
114+ <ModeIcon mode="plan" />
115+ <span className="">Plan</span>
116+ <InformationCircleIcon
117+ data-tooltip-id="plan-tip"
118+ className="h-2.5 w-2.5 flex-shrink-0"
119+ />
120+ <ToolTip
121+ id="plan-tip"
122+ style={{
123+ zIndex: 200001,
124+ }}
125+ >
126+ In Plan mode, only read-only and MCP tools are enabled
127+ </ToolTip>
128+ </div>
129+ {agentModeSupported ? (
130+ <CheckIcon
131+ className={`ml-auto h-3 w-3 ${mode === "plan" ? "" : "opacity-0"}`}
132+ />
133+ ) : (
134+ <span>(Not supported)</span>
135+ )}
136+ </ListboxOption>
98137 <ListboxOption
99138 value="agent"
100139 disabled={!agentModeSupported}
@@ -103,9 +142,23 @@
103142 <div className="flex flex-row items-center gap-1.5">
104143 <ModeIcon mode="agent" />
105144 <span className="">Agent</span>
145+ <InformationCircleIcon
146+ data-tooltip-id="agent-tip"
147+ className="h-2.5 w-2.5 flex-shrink-0"
148+ />
149+ <ToolTip
150+ id="agent-tip"
151+ style={{
152+ zIndex: 200001,
153+ }}
154+ >
155+ All tools are enabled based on policies
156+ </ToolTip>
106157 </div>
107158 {agentModeSupported ? (
108- mode === "agent" && <CheckIcon className="ml-auto h-3 w-3" />
159+ <CheckIcon
160+ className={`ml-auto h-3 w-3 ${mode === "agent" ? "" : "opacity-0"}`}
161+ />
109162 ) : (
110163 <span>(Not supported)</span>
111164 )}
added gui/src/components/StyledMarkdownPreview/MermaidBlock.tsx +175 −0
@@ -0,0 +1,175 @@
1+import {
2+ ArrowPathRoundedSquareIcon,
3+ MagnifyingGlassMinusIcon,
4+ MagnifyingGlassPlusIcon,
5+} from "@heroicons/react/24/outline";
6+import Panzoom from "@panzoom/panzoom";
7+import mermaid from "mermaid";
8+import { useEffect, useId, useRef, useState } from "react";
9+import { useDebouncedEffect } from "../find/useDebounce";
10+import { ToolTip } from "../gui/Tooltip";
11+
12+const MINIMUM_ZOOM_STEP = 0.05;
13+
14+const MERMAID_THEME_COLORS = {
15+ background: "#1e1e1e",
16+ primaryColor: "#4d8bf0",
17+ primaryTextColor: "#ffffff",
18+ primaryBorderColor: "#4d8bf0",
19+ secondaryColor: "#3a6db3",
20+ secondaryTextColor: "#ffffff",
21+ secondaryBorderColor: "#3a6db3",
22+ tertiaryColor: "#59bc89",
23+ tertiaryTextColor: "#ffffff",
24+ tertiaryBorderColor: "#59bc89",
25+ noteBkgColor: "#2d2d2d",
26+ noteTextColor: "#e6e6e6",
27+ noteBorderColor: "#555555",
28+ lineColor: "#8c8c8c",
29+ textColor: "#e6e6e6",
30+ mainBkg: "#252525",
31+ errorBkgColor: "#f44336",
32+ errorTextColor: "#ffffff",
33+ nodeBorder: "#555555",
34+ clusterBkg: "#2a2a2a",
35+ clusterBorder: "#555555",
36+ defaultLinkColor: "#8c8c8c",
37+ titleColor: "#e6e6e6",
38+ edgeLabelBackground: "#252525",
39+ activeTaskBkgColor: "#4caf50",
40+ activeTaskBorderColor: "#388e3c",
41+ doneTaskBkgColor: "#388e3c",
42+ doneTaskBorderColor: "#2e7d32",
43+ critBkgColor: "#f44336",
44+ critBorderColor: "#d32f2f",
45+ taskTextColor: "#e6e6e6",
46+ taskTextOutsideColor: "#e6e6e6",
47+ taskTextLightColor: "#b3b3b3",
48+ sectionBkgColor: "#2a2a2a",
49+ altSectionBkgColor: "#303030",
50+ sectionBkgColor2: "#252525",
51+ excludeBkgColor: "#2d2d2d",
52+ fillType0: "#264f78",
53+ fillType1: "#3a6db3",
54+ fillType2: "#59bc89",
55+ fillType3: "#4d8bf0",
56+ fillType4: "#3a6db3",
57+ fillType5: "#264f78",
58+ fillType6: "#59bc89",
59+ fillType7: "#4d8bf0",
60+};
61+
62+mermaid.initialize({
63+ startOnLoad: false,
64+ securityLevel: "loose",
65+ theme: "dark",
66+ themeVariables: {
67+ ...MERMAID_THEME_COLORS,
68+ fontSize: "14px",
69+ fontFamily: "var(--vscode-font-family)",
70+ },
71+});
72+
73+export default function MermaidDiagram({ code }: { code: string }) {
74+ const mermaidRenderContainerRef = useRef<HTMLDivElement>(null);
75+ const zoomInButtonRef = useRef<SVGSVGElement>(null);
76+ const zoomOutButtonRef = useRef<SVGSVGElement>(null);
77+ const resetZoomButtonRef = useRef<SVGSVGElement>(null);
78+
79+ const zoomInButtonId = useId();
80+ const zoomOutButtonId = useId();
81+ const resetZoomButtonId = useId();
82+
83+ const [isLoading, setIsLoading] = useState(false);
84+ const [error, setError] = useState("");
85+
86+ useEffect(() => {
87+ setIsLoading(true);
88+ }, [code]);
89+
90+ useDebouncedEffect(
91+ () => {
92+ if (mermaidRenderContainerRef.current) {
93+ mermaidRenderContainerRef.current.innerHTML = "";
94+ }
95+ const diagramId = `mermaid-id-${Math.random().toString(36).substring(2)}`;
96+ void (async () => {
97+ if (!mermaidRenderContainerRef.current) return;
98+ try {
99+ await mermaid.parse(code);
100+ const renderedSVG = await mermaid.render(diagramId, code);
101+ mermaidRenderContainerRef.current.innerHTML = renderedSVG.svg;
102+ setError("");
103+ const panzoom = Panzoom(mermaidRenderContainerRef.current, {
104+ step: MINIMUM_ZOOM_STEP,
105+ });
106+ zoomInButtonRef.current?.addEventListener("click", () =>
107+ panzoom.zoomIn({ step: MINIMUM_ZOOM_STEP * 4 }),
108+ );
109+ zoomOutButtonRef.current?.addEventListener("click", () =>
110+ panzoom.zoomOut({ step: MINIMUM_ZOOM_STEP * 4 }),
111+ );
112+ resetZoomButtonRef.current?.addEventListener("click", () =>
113+ panzoom.reset(),
114+ );
115+ mermaidRenderContainerRef.current.parentElement?.addEventListener(
116+ "wheel",
117+ (event) => {
118+ if (!event.shiftKey) return;
119+ panzoom.zoomWithWheel(event);
120+ },
121+ );
122+ } catch (err: any) {
123+ if (err.message) {
124+ setError(err.message);
125+ } else {
126+ setError(
127+ "Unknown error when parsing or rendering the Mermaid diagram.",
128+ );
129+ }
130+ }
131+ setIsLoading(false);
132+ })();
133+ },
134+ 500,
135+ [code],
136+ );
137+
138+ return (
139+ <>
140+ {isLoading && (
141+ <div className="text-vsc-foreground text-xs">Generating diagram...</div>
142+ )}
143+ {!!error ? (
144+ <div className="text-error whitespace-pre text-sm">{error}</div>
145+ ) : (
146+ <div className="relative">
147+ <div className="absolute right-0 z-10 m-2 flex items-center gap-x-1">
148+ <MagnifyingGlassPlusIcon
149+ data-tooltip-id={zoomInButtonId}
150+ ref={zoomInButtonRef}
151+ className="h-4 w-4 cursor-pointer"
152+ />
153+ <ToolTip id={zoomInButtonId}>Zoom In</ToolTip>
154+ <MagnifyingGlassMinusIcon
155+ data-tooltip-id={zoomOutButtonId}
156+ ref={zoomOutButtonRef}
157+ className="h-4 w-4 cursor-pointer"
158+ />
159+ <ToolTip id={zoomOutButtonId}>Zoom Out</ToolTip>
160+ <ArrowPathRoundedSquareIcon
161+ data-tooltip-id={resetZoomButtonId}
162+ ref={resetZoomButtonRef}
163+ className="h-4 w-4 cursor-pointer"
164+ />
165+ <ToolTip id={resetZoomButtonId}>Reset Zoom</ToolTip>
166+ </div>
167+ <div
168+ className="flex min-h-5 justify-center"
169+ ref={mermaidRenderContainerRef}
170+ />
171+ </div>
172+ )}
173+ </>
174+ );
175+}
added gui/src/components/StyledMarkdownPreview/StepContainerPreToolbar/CollapsibleContainer.tsx +55 −0
@@ -0,0 +1,55 @@
1+import { ChevronDownIcon } from "@heroicons/react/24/outline";
2+import { useState } from "react";
3+
4+interface CollapsibleContainerProps {
5+ children: React.ReactNode;
6+ maxHeight?: string;
7+ className?: string;
8+ collapsible?: boolean;
9+}
10+
11+export function CollapsibleContainer({
12+ children,
13+ maxHeight = "max-h-40",
14+ className = "",
15+ collapsible = false,
16+}: CollapsibleContainerProps) {
17+ const [isExpanded, setIsExpanded] = useState(false);
18+
19+ // If not collapsible, just render children without any collapsible behavior
20+ if (!collapsible) {
21+ return <div className={className}>{children}</div>;
22+ }
23+
24+ return (
25+ <div className={`relative ${className}`}>
26+ <div className={`overflow-hidden ${isExpanded ? "" : maxHeight}`}>
27+ {children}
28+ </div>
29+
30+ {!isExpanded && (
31+ <div className="from-editor absolute bottom-0 left-0 right-0 h-12 bg-gradient-to-t to-transparent">
32+ <div
33+ onClick={() => setIsExpanded(true)}
34+ className="group flex h-full cursor-pointer items-end justify-center pb-2"
35+ >
36+ <span title="Expand to show full content">
37+ <ChevronDownIcon className="text-lightgray group-hover:text-foreground h-4 w-4" />
38+ </span>
39+ </div>
40+ </div>
41+ )}
42+
43+ {isExpanded && (
44+ <div
45+ onClick={() => setIsExpanded(false)}
46+ className="group mt-2 flex cursor-pointer justify-center"
47+ >
48+ <span title="Collapse to compact view">
49+ <ChevronDownIcon className="text-lightgray group-hover:text-foreground h-4 w-4 rotate-180" />
50+ </span>
51+ </div>
52+ )}
53+ </div>
54+ );
55+}
modified gui/src/components/StyledMarkdownPreview/StepContainerPreToolbar/ToolbarButtonWithTooltip.tsx +9 −10
@@ -1,6 +1,5 @@
11 import { ReactNode, useMemo } from "react";
2-import { Tooltip } from "react-tooltip";
3-import { getFontSize } from "../../../util";
2+import { ToolTip } from "../../gui/Tooltip";
43
54 interface ToolbarButtonWithTooltipProps {
65 onClick: () => void;
@@ -22,20 +21,20 @@
2221
2322 return (
2423 <>
25- <button
26- onClick={onClick}
27- style={{
28- fontSize: `${getFontSize() - 2}px`,
24+ <div
25+ onClick={(e) => {
26+ e.stopPropagation();
27+ onClick();
2928 }}
3029 data-tooltip-id={tooltipId}
3130 data-testid={testId}
32- className="text-foreground flex items-center border-none bg-transparent px-0.5 outline-none hover:cursor-pointer hover:brightness-125"
31+ className="hover:description-muted/30 cursor-pointer select-none rounded bg-transparent px-1 py-0.5 hover:opacity-80"
3332 >
3433 {children}
35- </button>
36- <Tooltip id={tooltipId} place="top">
34+ </div>
35+ <ToolTip id={tooltipId} place="top">
3736 {tooltipContent}
38- </Tooltip>
37+ </ToolTip>
3938 </>
4039 );
4140 }
modified gui/src/components/StyledMarkdownPreview/StepContainerPreToolbar/index.tsx +6 −3
@@ -13,6 +13,7 @@
1313 import Spinner from "../../gui/Spinner";
1414 import { isTerminalCodeBlock } from "../utils";
1515 import { ApplyActions } from "./ApplyActions";
16+import { CollapsibleContainer } from "./CollapsibleContainer";
1617 import { CopyButton } from "./CopyButton";
1718 import { CreateFileButton } from "./CreateFileButton";
1819 import { FileInfo } from "./FileInfo";
@@ -32,6 +33,7 @@
3233 children: any;
3334 expanded?: boolean;
3435 disableManualApply?: boolean;
36+ collapsible?: boolean;
3537 }
3638
3739 export function StepContainerPreToolbar({
@@ -47,6 +49,7 @@
4749 children,
4850 expanded,
4951 disableManualApply,
52+ collapsible,
5053 }: StepContainerPreToolbarProps) {
5154 const ideMessenger = useContext(IdeMessengerContext);
5255 const history = useAppSelector((state) => state.session.history);
@@ -216,7 +219,6 @@
216219 if (isGeneratingCodeBlock) {
217220 return (
218221 <span className="text-lightgray inline-flex items-center gap-2 text-right">
219- {!isExpanded ? `${numLines} line${plural}` : "Generating"}{" "}
220222 <div>
221223 <Spinner />
222224 </div>
@@ -298,9 +300,10 @@
298300 {renderActionButtons()}
299301 </div>
300302 </div>
301-
302303 {isExpanded && (
303- <div className="overflow-hidden overflow-y-auto">{children}</div>
304+ <CollapsibleContainer collapsible={collapsible}>
305+ {children}
306+ </CollapsibleContainer>
304307 )}
305308 </div>
306309 );
modified gui/src/components/StyledMarkdownPreview/index.tsx +7 −0
@@ -21,6 +21,7 @@
2121 import FilenameLink from "./FilenameLink";
2222 import "./katex.css";
2323 import "./markdown.css";
24+import MermaidBlock from "./MermaidBlock";
2425 import { rehypeHighlightPlugin } from "./rehypeHighlightPlugin";
2526 import { StepContainerPreToolbar } from "./StepContainerPreToolbar";
2627 import SymbolLink from "./SymbolLink";
@@ -127,6 +128,7 @@
127128 disableManualApply?: boolean;
128129 toolCallId?: string;
129130 expandCodeblocks?: boolean;
131+ collapsible?: boolean;
130132 }
131133
132134 const HLJS_LANGUAGE_CLASSNAME_PREFIX = "language-";
@@ -305,6 +307,7 @@
305307 forceToolCallId={props.toolCallId}
306308 expanded={props.expandCodeblocks}
307309 disableManualApply={props.disableManualApply}
310+ collapsible={props.collapsible}
308311 >
309312 <SyntaxHighlightedPre {...preProps} />
310313 </StepContainerPreToolbar>
@@ -331,6 +334,10 @@
331334 }
332335 }
333336 }
337+ if (codeProps.className?.includes("language-mermaid")) {
338+ const codeText = String(codeProps.children || "");
339+ return <MermaidBlock code={codeText} />;
340+ }
334341 return <code {...codeProps}>{codeProps.children}</code>;
335342 },
336343 },
modified gui/src/components/find/FindWidget.tsx +1 −1
@@ -18,7 +18,7 @@
1818 SearchMatch,
1919 searchWithinContainer,
2020 } from "./findWidgetSearch";
21-import useDebounceValue from "./useDebounce";
21+import { useDebounceValue } from "./useDebounce";
2222 import { useElementSize } from "./useElementSize";
2323
2424 interface HighlightOverlayProps {
modified gui/src/components/find/useDebounce.ts +31 −3
@@ -1,6 +1,6 @@
1-import { useEffect, useState } from "react";
1+import { useEffect, useRef, useState } from "react";
22
3-function useDebounceValue<T>(value: T, delay: number = 500): T {
3+export function useDebounceValue<T>(value: T, delay: number = 500): T {
44 const [debouncedValue, setDebouncedValue] = useState<T>(value);
55
66 useEffect(() => {
@@ -16,4 +16,32 @@
1616 return debouncedValue;
1717 }
1818
19-export default useDebounceValue;
19+export function useDebouncedEffect(
20+ effect: () => void,
21+ delay: number,
22+ deps: unknown[],
23+) {
24+ const timeoutRef = useRef<NodeJS.Timeout | null>(null);
25+ const callBackRef = useRef(() => {});
26+
27+ useEffect(() => {
28+ // do not want the timeout to reset on effect dep change
29+ callBackRef.current = effect;
30+ }, [effect]);
31+
32+ useEffect(() => {
33+ if (timeoutRef.current) {
34+ clearTimeout(timeoutRef.current);
35+ }
36+
37+ timeoutRef.current = setTimeout(() => {
38+ callBackRef.current();
39+ }, delay);
40+
41+ return () => {
42+ if (timeoutRef.current) {
43+ clearTimeout(timeoutRef.current);
44+ }
45+ };
46+ }, [delay, ...deps]);
47+}
modified gui/src/components/gui/Switch.tsx +6 −2
@@ -7,6 +7,7 @@
77 text: string;
88 size?: number;
99 showIfToggled?: ReactNode;
10+ disabled?: boolean;
1011 };
1112
1213 const ToggleSwitch: React.FC<ToggleSwitchProps> = ({
@@ -15,15 +16,18 @@
1516 text,
1617 size = 16,
1718 showIfToggled,
19+ disabled = false,
1820 }) => {
1921 return (
20- <div className="flex cursor-pointer select-none items-center justify-between gap-3">
22+ <div
23+ className={`flex select-none items-center justify-between gap-3 ${disabled ? "cursor-not-allowed" : "cursor-pointer"}`}
24+ >
2125 <span className="truncate-right">{text}</span>
2226 <div className="flex flex-row items-center gap-1">
2327 {isToggled && !!showIfToggled && showIfToggled}
2428 <div
2529 className={`border-vsc-input-border bg-vsc-input-background flex items-center rounded-full border border-solid`}
26- onClick={onToggle}
30+ onClick={disabled ? undefined : onToggle}
2731 style={{
2832 height: size,
2933 width: size * 2,
modified gui/src/components/mainInput/Lump/LumpToolbar/EditToolbar.tsx +1 −1
@@ -28,7 +28,7 @@
2828 Back to {mode.charAt(0).toUpperCase() + mode.slice(1)}
2929 </span>
3030 <span className="truncate">
31- Editing{" "}
31+ Editing:{" "}
3232 <span className="italic">
3333 {getEditFilenameAndRangeText(codeToEdit)}
3434 </span>
modified gui/src/components/mainInput/Lump/sections/RulesSection.tsx +32 −15
@@ -7,9 +7,8 @@
77 import { RuleWithSource } from "core";
88 import {
99 DEFAULT_AGENT_SYSTEM_MESSAGE,
10- DEFAULT_AGENT_SYSTEM_MESSAGE_URL,
1110 DEFAULT_CHAT_SYSTEM_MESSAGE,
12- DEFAULT_CHAT_SYSTEM_MESSAGE_URL,
11+ DEFAULT_SYSTEM_MESSAGES_URL,
1312 } from "core/llm/defaultSystemMessages";
1413 import { useContext, useMemo } from "react";
1514 import { useAuth } from "../../../../context/Auth";
@@ -52,10 +51,12 @@
5251 ideMessenger.post("openFile", {
5352 path: rule.ruleFile,
5453 });
55- } else if (rule.source === "default-chat" && mode === "chat") {
56- ideMessenger.post("openUrl", DEFAULT_CHAT_SYSTEM_MESSAGE_URL);
57- } else if (rule.source === "default-agent" && mode === "agent") {
58- ideMessenger.post("openUrl", DEFAULT_AGENT_SYSTEM_MESSAGE_URL);
54+ } else if (
55+ rule.source === "default-chat" ||
56+ rule.source === "default-plan" ||
57+ rule.source === "default-agent"
58+ ) {
59+ ideMessenger.post("openUrl", DEFAULT_SYSTEM_MESSAGES_URL);
5960 } else {
6061 ideMessenger.post("config/openProfile", {
6162 profileId: undefined,
@@ -81,9 +82,11 @@
8182 return "Default agent system message";
8283 } else if (rule.source === "json-systemMessage") {
8384 return "JSON systemMessage)";
84- } else if (rule.source === "model-agent-options") {
85+ } else if (rule.source === "model-options-agent") {
8586 return "Base System Agent Message";
86- } else if (rule.source === "model-chat-options") {
87+ } else if (rule.source === "model-options-plan") {
88+ return "Base System Plan Message";
89+ } else if (rule.source === "model-options-chat") {
8790 return "Base System Chat Message";
8891 } else {
8992 return "Assistant rule";
@@ -215,11 +218,24 @@
215218 }
216219 }
217220
218- if (mode === "agent") {
221+ if (mode === "chat") {
222+ if (config.selectedModelByRole.chat?.baseChatSystemMessage) {
223+ rules.unshift({
224+ rule: config.selectedModelByRole.chat?.baseChatSystemMessage,
225+ source: "model-options-chat",
226+ });
227+ } else {
228+ rules.unshift({
229+ rule: DEFAULT_CHAT_SYSTEM_MESSAGE,
230+ source: "default-chat",
231+ });
232+ }
233+ } else if (mode === "agent") {
234+ // agent
219235 if (config.selectedModelByRole.chat?.baseAgentSystemMessage) {
220236 rules.unshift({
221237 rule: config.selectedModelByRole.chat?.baseAgentSystemMessage,
222- source: "model-agent-options",
238+ source: "model-options-agent",
223239 });
224240 } else {
225241 rules.unshift({
@@ -228,15 +244,16 @@
228244 });
229245 }
230246 } else {
231- if (config.selectedModelByRole.chat?.baseChatSystemMessage) {
247+ // plan
248+ if (config.selectedModelByRole.chat?.basePlanSystemMessage) {
232249 rules.unshift({
233- rule: config.selectedModelByRole.chat?.baseChatSystemMessage,
234- source: "model-chat-options",
250+ rule: config.selectedModelByRole.chat?.basePlanSystemMessage,
251+ source: "model-options-plan",
235252 });
236253 } else {
237254 rules.unshift({
238- rule: DEFAULT_CHAT_SYSTEM_MESSAGE,
239- source: "default-chat",
255+ rule: DEFAULT_AGENT_SYSTEM_MESSAGE,
256+ source: "default-agent",
240257 });
241258 }
242259 }
modified gui/src/components/mainInput/Lump/sections/tool-policies/ToolPoliciesSection.tsx +66 −28
@@ -1,3 +1,4 @@
1+import { InformationCircleIcon } from "@heroicons/react/24/outline";
12 import { Tool } from "core";
23 import { useMemo } from "react";
34 import { useAppDispatch, useAppSelector } from "../../../../../redux/hooks";
@@ -6,7 +7,26 @@
67 import ToggleSwitch from "../../../../gui/Switch";
78 import ToolPolicyItem from "./ToolPolicyItem";
89
10+interface ModeBadgeProps {
11+ text: string;
12+ icon: React.ReactNode;
13+ onClick: () => void;
14+ isSelected: boolean;
15+}
16+const ModeBadge = ({ text, onClick, isSelected, icon }: ModeBadgeProps) => {
17+ return (
18+ <div
19+ className="flex flex-1 items-center justify-center gap-1.5 text-sm"
20+ onClick={isSelected ? undefined : onClick}
21+ >
22+ {icon}
23+ {text}
24+ </div>
25+ );
26+};
27+
928 export const ToolPoliciesSection = () => {
29+ const mode = useAppSelector((state) => state.session.mode);
1030 const availableTools = useAppSelector((state) => state.config.config.tools);
1131 const toolGroupSettings = useAppSelector(
1232 (store) => store.ui.toolGroupSettings,
@@ -39,38 +59,56 @@
3959 );
4060 }, [availableTools]);
4161
62+ const allToolsOff = mode === "chat";
63+
64+ const message =
65+ mode === "chat"
66+ ? "All tools are disabled in Chat mode"
67+ : mode === "plan"
68+ ? "Plan mode: only read-only and MCP tools"
69+ : "Agent mode: all tool policies apply";
70+
4271 return (
4372 <>
44- {toolsByGroup.map(([groupName, tools]) => (
45- <div key={groupName} className="mt-2 flex flex-col pr-1">
46- <div className="flex flex-row items-center justify-between px-1">
47- <h3
48- className="m-0 p-0 font-bold"
49- style={{
50- fontSize: fontSize(-2),
51- }}
52- >
53- {groupName}
54- </h3>
55- <ToggleSwitch
56- isToggled={toolGroupSettings[groupName] !== "exclude"}
57- onToggle={() => dispatch(toggleToolGroupSetting(groupName))}
58- text=""
59- size={10}
60- />
61- </div>
62- <div className={`relative flex flex-col p-1`}>
63- {tools.map((tool) => (
64- <ToolPolicyItem
65- key={tool.uri + tool.function.name}
66- tool={tool}
67- duplicatesDetected={duplicateDetection[tool.function.name]}
68- excluded={toolGroupSettings[groupName] === "exclude"}
73+ <div className="mb-3 px-1">
74+ <InformationCircleIcon className="text-description-muted mr-1.5 inline-block h-2.5 w-2.5 flex-shrink-0" />
75+ <span className="text-description text-xs italic">{message}</span>
76+ </div>
77+ {toolsByGroup.map(([groupName, tools]) => {
78+ const isGroupEnabled =
79+ !allToolsOff && toolGroupSettings[groupName] !== "exclude";
80+ return (
81+ <div key={groupName} className="mt-2 flex flex-col pr-1">
82+ <div className="flex flex-row items-center justify-between px-1">
83+ <h3
84+ className="m-0 p-0 font-bold"
85+ style={{
86+ fontSize: fontSize(-2),
87+ }}
88+ >
89+ {groupName}
90+ </h3>
91+ <ToggleSwitch
92+ isToggled={isGroupEnabled}
93+ onToggle={() => dispatch(toggleToolGroupSetting(groupName))}
94+ text=""
95+ size={10}
96+ disabled={allToolsOff}
6997 />
70- ))}
98+ </div>
99+ <div className={`relative flex flex-col p-1`}>
100+ {tools.map((tool) => (
101+ <ToolPolicyItem
102+ key={tool.uri + tool.function.name}
103+ tool={tool}
104+ duplicatesDetected={duplicateDetection[tool.function.name]}
105+ isGroupEnabled={isGroupEnabled}
106+ />
107+ ))}
108+ </div>
71109 </div>
72- </div>
73- ))}
110+ );
111+ })}
74112 </>
75113 );
76114 };
modified gui/src/components/mainInput/Lump/sections/tool-policies/ToolPolicyItem.tsx +21 −8
@@ -3,6 +3,7 @@
33 InformationCircleIcon,
44 } from "@heroicons/react/24/outline";
55 import { Tool } from "core";
6+import { BUILT_IN_GROUP_NAME } from "core/tools/builtIn";
67 import { useEffect, useMemo, useState } from "react";
78 import { useDispatch } from "react-redux";
89 import { useAppSelector } from "../../../../../redux/hooks";
@@ -16,7 +17,7 @@
1617 interface ToolDropdownItemProps {
1718 tool: Tool;
1819 duplicatesDetected: boolean;
19- excluded: boolean;
20+ isGroupEnabled: boolean;
2021 }
2122
2223 function ToolPolicyItem(props: ToolDropdownItemProps) {
@@ -25,6 +26,7 @@
2526 (state) => state.ui.toolSettings[props.tool.function.name],
2627 );
2728 const [isExpanded, setIsExpanded] = useState(false);
29+ const mode = useAppSelector((state) => state.session.mode);
2830
2931 useEffect(() => {
3032 if (!policy) {
@@ -44,6 +46,12 @@
4446
4547 const fontSize = useFontSize(-2);
4648
49+ const disabled =
50+ !props.isGroupEnabled ||
51+ (mode === "plan" &&
52+ props.tool.group === BUILT_IN_GROUP_NAME &&
53+ !props.tool.readonly);
54+
4755 if (!policy) {
4856 return null;
4957 }
@@ -106,16 +114,21 @@
106114 </span>
107115 </div>
108116 </div>
117+
109118 <div
110- className={`flex w-8 flex-row items-center justify-end gap-2 px-2 py-0.5 sm:w-16 ${props.excluded ? "cursor-not-allowed" : "hover:bg-list-active hover:text-list-active-foreground cursor-pointer"}`}
119+ className={`flex w-8 flex-row items-center justify-end gap-2 px-2 py-0.5 sm:w-16 ${disabled ? "cursor-not-allowed" : "hover:bg-list-active hover:text-list-active-foreground cursor-pointer"}`}
111120 data-testid={`tool-policy-item-${props.tool.function.name}`}
112- onClick={(e) => {
113- dispatch(toggleToolSetting(props.tool.function.name));
114- e.stopPropagation();
115- e.preventDefault();
116- }}
121+ onClick={
122+ disabled
123+ ? undefined
124+ : (e) => {
125+ dispatch(toggleToolSetting(props.tool.function.name));
126+ e.stopPropagation();
127+ e.preventDefault();
128+ }
129+ }
117130 >
118- {props.excluded || policy === "disabled" ? (
131+ {disabled || policy === "disabled" ? (
119132 <>
120133 <span className="text-lightgray sm:hidden">Off</span>
121134 <span className="text-lightgray hidden sm:inline-block">
modified gui/src/components/mainInput/belowMainInput/RulesPeek.tsx +4 −2
@@ -19,9 +19,11 @@
1919 return "Default Chat";
2020 case "default-agent":
2121 return "Default Agent";
22- case "model-chat-options":
22+ case "model-options-chat":
2323 return "Model Chat Options";
24- case "model-agent-options":
24+ case "model-options-plan":
25+ return "Model Plan Options";
26+ case "model-options-agent":
2527 return "Model Agent Options";
2628 case "rules-block":
2729 return "Rules Block";
modified gui/src/context/SubmenuContextProviders.tsx +241 −3
@@ -29,6 +29,14 @@
2929
3030 const MAX_LENGTH = 70;
3131
32+// Enhanced search result interface for intelligent sorting
33+interface EnhancedSearchResult
34+ extends SearchResult,
35+ Omit<ContextSubmenuItemWithProvider, "id"> {
36+ sortPriority: number;
37+ matchQuality: number;
38+}
39+
3240 interface SubtextContextProvidersContextType {
3341 getSubmenuContextItems: (
3442 providerTitle: string | undefined,
@@ -43,6 +51,91 @@
4351 const SubmenuContextProvidersContext =
4452 createContext<SubtextContextProvidersContextType>(initialContextProviders);
4553
54+// Helper functions for intelligent file sorting
55+function hasExactWordMatch(text: string, query: string): boolean {
56+ const words = text.split(/[^a-zA-Z0-9]+/);
57+ return words.some((word) => word === query);
58+}
59+
60+function isCommonDevFile(fileName: string): boolean {
61+ const commonExtensions = [
62+ ".ts",
63+ ".tsx",
64+ ".js",
65+ ".jsx",
66+ ".py",
67+ ".java",
68+ ".cpp",
69+ ".c",
70+ ".h",
71+ ".vue",
72+ ".svelte",
73+ ];
74+ const commonNames = [
75+ "index",
76+ "main",
77+ "app",
78+ "component",
79+ "service",
80+ "util",
81+ "helper",
82+ "config",
83+ "types",
84+ ];
85+
86+ const extension = fileName.substring(fileName.lastIndexOf("."));
87+ const baseName = fileName
88+ .substring(0, fileName.lastIndexOf("."))
89+ .toLowerCase();
90+
91+ return commonExtensions.includes(extension) || commonNames.includes(baseName);
92+}
93+
94+function isInCommonDirectory(filePath: string): boolean {
95+ const commonDirs = [
96+ "src/",
97+ "lib/",
98+ "components/",
99+ "utils/",
100+ "helpers/",
101+ "services/",
102+ "pages/",
103+ "views/",
104+ "hooks/",
105+ "store/",
106+ "types/",
107+ "interfaces/",
108+ "models/",
109+ "api/",
110+ ];
111+ return commonDirs.some((dir) => filePath.includes(dir));
112+}
113+
114+function matchesCamelCaseOrAbbreviation(
115+ fileName: string,
116+ query: string,
117+): boolean {
118+ // Extract capital letters for camel case matching
119+ const capitals = fileName.match(/[A-Z]/g)?.join("").toLowerCase() || "";
120+
121+ // Check if query matches the capital letters pattern
122+ if (capitals.length > 0 && capitals.includes(query)) {
123+ return true;
124+ }
125+
126+ // Check for abbreviation matches (first letters of words)
127+ const words = fileName.split(/[^a-zA-Z0-9]+/).filter((w) => w.length > 0);
128+ if (words.length > 1) {
129+ const abbreviation = words
130+ .map((word) => word[0])
131+ .join("")
132+ .toLowerCase();
133+ return abbreviation.includes(query);
134+ }
135+
136+ return false;
137+}
138+
46139 export const SubmenuContextProvidersProvider = ({
47140 children,
48141 }: {
@@ -128,6 +221,98 @@
128221 new Map<ContextProviderName, AbortController>(),
129222 ).current;
130223
224+ const calculateFileSortPriority = useCallback(
225+ (
226+ result: SearchResult & ContextSubmenuItemWithProvider,
227+ query: string,
228+ openFiles: ContextSubmenuItemWithProvider[],
229+ ): number => {
230+ const fileName = result.title.toLowerCase();
231+ const filePath = result.description.toLowerCase();
232+ const queryLower = query.toLowerCase();
233+
234+ // Priority 1: Exact filename match
235+ if (fileName === queryLower) {
236+ return 1;
237+ }
238+
239+ // Priority 2: Recently opened files
240+ if (openFiles.some((f) => f.id === result.id)) {
241+ return 2;
242+ }
243+
244+ // Priority 3: Filename starts with query
245+ if (fileName.startsWith(queryLower)) {
246+ return 3;
247+ }
248+
249+ // Priority 4: Exact word match in filename
250+ if (hasExactWordMatch(fileName, queryLower)) {
251+ return 4;
252+ }
253+
254+ // Priority 5: Common development files
255+ if (isCommonDevFile(fileName)) {
256+ return 5;
257+ }
258+
259+ // Priority 6: Files in common directories
260+ if (isInCommonDirectory(filePath)) {
261+ return 6;
262+ }
263+
264+ // Priority 7: CamelCase/abbreviation matches
265+ if (matchesCamelCaseOrAbbreviation(fileName, queryLower)) {
266+ return 7;
267+ }
268+
269+ // Priority 8: Path starts with query
270+ if (filePath.startsWith(queryLower)) {
271+ return 8;
272+ }
273+
274+ // Priority 9: Default
275+ return 9;
276+ },
277+ [],
278+ );
279+
280+ const calculateMatchQuality = useCallback(
281+ (
282+ result: SearchResult & ContextSubmenuItemWithProvider,
283+ query: string,
284+ ): number => {
285+ const fileName = result.title.toLowerCase();
286+ const queryLower = query.toLowerCase();
287+ let quality = 0;
288+
289+ // Exact match bonus
290+ if (fileName === queryLower) quality += 100;
291+
292+ // Prefix match bonus
293+ if (fileName.startsWith(queryLower)) quality += 50;
294+
295+ // Contains match bonus
296+ if (fileName.includes(queryLower)) quality += 25;
297+
298+ // Shorter filename bonus (prefer concise names)
299+ quality += Math.max(0, 50 - fileName.length);
300+
301+ // Extension preference (common dev files)
302+ if (
303+ fileName.endsWith(".ts") ||
304+ fileName.endsWith(".tsx") ||
305+ fileName.endsWith(".js") ||
306+ fileName.endsWith(".jsx")
307+ ) {
308+ quality += 10;
309+ }
310+
311+ return quality;
312+ },
313+ [],
314+ );
315+
131316 const getSubmenuContextItems = useCallback(
132317 (
133318 providerTitle: string | undefined,
@@ -168,9 +353,57 @@
168353 });
169354 }
170355 }
171- searchResults.sort((a, b) => b.score - a.score);
172356
173- // 2. Add fallback results if no search results
357+ // 2. Enhanced sorting for file provider
358+ if (
359+ providerTitle === "file" ||
360+ (!providerTitle &&
361+ searchResults.some((r) => r.providerTitle === "file"))
362+ ) {
363+ const enhancedResults: EnhancedSearchResult[] = searchResults.map(
364+ (result): EnhancedSearchResult => ({
365+ ...result,
366+ id: result.id,
367+ title: result.title,
368+ description: result.description,
369+ providerTitle: result.providerTitle,
370+ sortPriority: calculateFileSortPriority(
371+ result,
372+ query,
373+ lastOpenFilesRef.current,
374+ ),
375+ matchQuality: calculateMatchQuality(result, query),
376+ }),
377+ );
378+
379+ // Sort by multiple criteria
380+ enhancedResults.sort((a, b) => {
381+ // Primary: Sort priority (lower = better)
382+ if (a.sortPriority !== b.sortPriority) {
383+ return a.sortPriority - b.sortPriority;
384+ }
385+
386+ // Secondary: Match quality (higher = better)
387+ if (a.matchQuality !== b.matchQuality) {
388+ return b.matchQuality - a.matchQuality;
389+ }
390+
391+ // Tertiary: MiniSearch relevance score (higher = better)
392+ if (a.score !== b.score) {
393+ return b.score - a.score;
394+ }
395+
396+ // Quaternary: Path length (shorter = better)
397+ return a.description.length - b.description.length;
398+ });
399+
400+ searchResults = enhancedResults;
401+ } else {
402+ // Default sorting for non-file providers
403+ searchResults.sort((a, b) => b.score - a.score);
404+ }
405+
406+ // 3. Add fallback results if no search results
174407 if (searchResults.length === 0) {
175408 const fallbackItems = (
176409 providerTitle ? (fallbackResults[providerTitle] ?? []) : []
@@ -223,7 +456,12 @@
223456 return [];
224457 }
225458 },
226- [fallbackResults, minisearches],
459+ [
460+ fallbackResults,
461+ minisearches,
462+ calculateFileSortPriority,
463+ calculateMatchQuality,
464+ ],
227465 );
228466
229467 const loadSubmenuItems = useCallback(
modified gui/src/pages/config/ModelRoleSelector.tsx +19 −6
@@ -119,19 +119,32 @@
119119 {[...models]
120120 .sort((a, b) => a.title.localeCompare(b.title))
121121 .map((option, idx) => {
122- const showMissingApiKeyMsg =
122+ const isConfigInvalid =
123+ option.configurationStatus !==
124+ LLMConfigurationStatuses.VALID;
125+ let invalidMessage = "(Invalid config)";
126+ if (
123127 option.configurationStatus ===
124- LLMConfigurationStatuses.MISSING_API_KEY;
128+ LLMConfigurationStatuses.MISSING_ENV_SECRET
129+ ) {
130+ invalidMessage = "(Missing env secret)";
131+ }
132+ if (
133+ option.configurationStatus ===
134+ LLMConfigurationStatuses.MISSING_API_KEY
135+ ) {
136+ invalidMessage = "(Missing API Key)";
137+ }
125138
126139 return (
127140 <ListboxOption
128141 key={idx}
129142 value={option.title}
130- disabled={showMissingApiKeyMsg}
143+ disabled={isConfigInvalid}
131144 onMouseEnter={() => setHoveredIdx(idx)}
132145 onMouseLeave={() => setHoveredIdx(null)}
133146 onClick={(e: any) =>
134- handleOptionClick(showMissingApiKeyMsg, e)
147+ handleOptionClick(isConfigInvalid, e)
135148 }
136149 className=""
137150 >
@@ -144,9 +157,9 @@
144157 style={{ fontSize: fontSize(-3) }}
145158 >
146159 {option.title}
147- {showMissingApiKeyMsg && (
160+ {isConfigInvalid && (
148161 <span className="ml-2 text-[10px] italic">
149- (Missing API key)
162+ {invalidMessage}
150163 </span>
151164 )}
152165 </span>
modified gui/src/pages/gui/Chat.tsx +9 −9
@@ -33,6 +33,7 @@
3333 selectCurrentToolCallApplyState,
3434 } from "../../redux/selectors/selectCurrentToolCall";
3535 import {
36+ cancelToolCall,
3637 newSession,
3738 updateToolCallOutput,
3839 } from "../../redux/slices/sessionSlice";
@@ -108,7 +109,6 @@
108109 (state) => state.config.config.ui?.showChatScrollbar,
109110 );
110111 const codeToEdit = useAppSelector((state) => state.editModeState.codeToEdit);
111- const toolCallState = useAppSelector(selectCurrentToolCall);
112112 const mode = useAppSelector((store) => store.session.mode);
113113 const isInEdit = useAppSelector((store) => store.session.isInEdit);
114114
@@ -147,6 +147,7 @@
147147 isStreaming,
148148 );
149149
150+ const currentToolCallState = useAppSelector(selectCurrentToolCall);
150151 const currentToolCallApplyState = useAppSelector(
151152 selectCurrentToolCallApplyState,
152153 );
@@ -158,20 +159,19 @@
158159 index?: number,
159160 editorToClearOnSend?: Editor,
160161 ) => {
161- if (toolCallState?.status === "generated") {
162- return console.error(
163- "Cannot submit message while awaiting tool confirmation",
162+ if (currentToolCallState) {
163+ dispatch(
164+ cancelToolCall({
165+ toolCallId: currentToolCallState.toolCallId,
166+ }),
164167 );
165168 }
166169 if (
167170 currentToolCallApplyState &&
168171 currentToolCallApplyState.status !== "closed"
169172 ) {
170- return console.error(
171- "Cannot submit message while awaiting tool call apply",
172- );
173+ ideMessenger.post("rejectDiff", currentToolCallApplyState);
173174 }
174-
175175 const model = isInEdit
176176 ? (selectedModels?.edit ?? selectedModels?.chat)
177177 : selectedModels?.chat;
@@ -241,7 +241,7 @@
241241 mode,
242242 isInEdit,
243243 codeToEdit,
244- toolCallState,
244+ currentToolCallState,
245245 currentToolCallApplyState,
246246 ],
247247 );
modified gui/src/pages/gui/ToolCallDiv/EditFile.tsx +4 −4
@@ -6,24 +6,24 @@
66 changes: string;
77 historyIndex: number;
88 toolCallId?: string;
9- expandCodeblocks?: boolean;
109 };
1110
1211 export function EditFile(props: EditToolCallProps) {
13- if (!props.relativeFilePath || !props.changes) {
12+ if (!props.relativeFilePath) {
1413 return null;
1514 }
1615
17- const src = `\`\`\`${getMarkdownLanguageTagForFile(props.relativeFilePath ?? "test.txt")} ${props.relativeFilePath}\n${props.changes}\n\`\`\``;
16+ const src = `\`\`\`${getMarkdownLanguageTagForFile(props.relativeFilePath)} ${props.relativeFilePath}\n${props.changes}\n\`\`\``;
1817
1918 return (
2019 <StyledMarkdownPreview
21- expandCodeblocks={props.expandCodeblocks ?? false}
20+ expandCodeblocks={false}
2221 isRenderingInStepContainer
2322 disableManualApply
2423 source={src}
2524 toolCallId={props.toolCallId}
2625 itemIndex={props.historyIndex}
26+ collapsible={true}
2727 />
2828 );
2929 }
modified gui/src/pages/gui/ToolCallDiv/FunctionSpecificToolCallDiv.tsx +0 −1
@@ -36,7 +36,6 @@
3636 case BuiltInToolNames.SearchAndReplaceInFile:
3737 return (
3838 <EditFile
39- expandCodeblocks
4039 relativeFilePath={args.filepath ?? ""}
4140 changes={args.diff ?? ""}
4241 toolCallId={toolCall.id}
modified gui/src/pages/gui/ToolCallDiv/ToolCall.tsx +1 −1
@@ -27,7 +27,7 @@
2727
2828 return (
2929 <>
30- <div className="flex flex-col justify-center p-4 pb-0">
30+ <div className="flex flex-col justify-center p-4 pb-1">
3131 <div className="mb-4 flex flex-col">
3232 <div className="flex flex-row items-center justify-between gap-1.5">
3333 <div className="flex min-w-0 flex-row items-center gap-2">
modified gui/src/pages/gui/ToolCallDiv/ToolCallArgs.tsx +9 −21
@@ -1,6 +1,5 @@
11 import { CodeBracketIcon } from "@heroicons/react/24/outline";
2-import { useMemo } from "react";
3-import { ToolTip } from "../../../components/gui/Tooltip";
2+import { ToolbarButtonWithTooltip } from "../../../components/StyledMarkdownPreview/StepContainerPreToolbar/ToolbarButtonWithTooltip";
43
54 interface ArgsToggleIconProps {
65 isShowing: boolean;
@@ -13,26 +12,15 @@
1312 setIsShowing,
1413 toolCallId,
1514 }: ArgsToggleIconProps) => {
16- const argsTooltipId = useMemo(() => {
17- return "args-hover-" + toolCallId;
18- }, [toolCallId]);
19-
2015 return (
21- <>
22- <div
23- data-tooltip-id={argsTooltipId}
24- onClick={(e) => {
25- e.stopPropagation();
26- setIsShowing(!isShowing);
27- }}
28- className={`hover:description-muted/30 cursor-pointer select-none rounded px-1 py-0.5 hover:opacity-80 ${isShowing ? "bg-description-muted/30" : "bg-transparent"}`}
29- >
30- <CodeBracketIcon className="h-3 w-3 flex-shrink-0 opacity-60" />
31- </div>
32- <ToolTip id={argsTooltipId}>
33- {isShowing ? "Hide args" : "Show args"}
34- </ToolTip>
35- </>
16+ <ToolbarButtonWithTooltip
17+ tooltipContent={isShowing ? "Hide args" : "Show args"}
18+ onClick={() => {
19+ setIsShowing(!isShowing);
20+ }}
21+ >
22+ <CodeBracketIcon className="h-3 w-3 flex-shrink-0 opacity-60" />
23+ </ToolbarButtonWithTooltip>
3624 );
3725 };
3826
modified gui/src/pages/gui/ToolCallDiv/ToolTruncateHistoryIcon.tsx +3 −1
@@ -19,9 +19,11 @@
1919 }, [history]);
2020 const dispatch = useAppDispatch();
2121 const { mainEditor } = useMainEditor();
22+
2223 if (historyIndex === lastMessageIndex) {
2324 return null;
2425 }
26+
2527 return (
2628 <ToolbarButtonWithTooltip
2729 tooltipContent={isStreaming ? "" : "Trim chat to this message"}
@@ -38,7 +40,7 @@
3840 }}
3941 >
4042 <BarsArrowUpIcon
41- className={`h-3 w-3 flex-shrink-0 ${isStreaming ? "cursor-not-allowed" : "cursor-pointer"}`}
43+ className={`h-3 w-3 flex-shrink-0 opacity-60 ${isStreaming ? "cursor-not-allowed" : ""}`}
4244 />
4345 </ToolbarButtonWithTooltip>
4446 );
modified gui/src/pages/gui/ToolCallDiv/index.tsx +16 −0
@@ -85,6 +85,22 @@
8585 );
8686 }
8787
88+ // Trying this out while it's an experimental feature
89+ // Obviously missing the truncate and args buttons
90+ // All the info from args is displayed here
91+ // But we'd need a nicer place to put the truncate button and the X icon when tool call fails
92+ if (
93+ props.toolCall.function?.name === BuiltInToolNames.SearchAndReplaceInFile
94+ ) {
95+ return (
96+ <FunctionSpecificToolCallDiv
97+ toolCall={props.toolCall}
98+ toolCallState={props.toolCallState}
99+ historyIndex={props.historyIndex}
100+ />
101+ );
102+ }
103+
88104 return (
89105 <ToolCallDisplay
90106 icon={getStatusIcon(props.toolCallState.status)}
modified gui/src/pages/gui/chat-tests/Chat.test.tsx +16 −4
@@ -15,7 +15,7 @@
1515
1616 test("should be able to toggle modes", async () => {
1717 await renderWithProviders(<Chat />);
18- await getElementByText("Chat");
18+ await getElementByText("Agent");
1919
2020 // Simulate cmd+. keyboard shortcut to toggle modes
2121 act(() => {
@@ -27,8 +27,8 @@
2727 );
2828 });
2929
30- // Check that it switched to Agent mode
31- await getElementByText("Agent");
30+ // Check that it switched to Chat mode
31+ await getElementByText("Chat");
3232
3333 act(() => {
3434 document.dispatchEvent(
@@ -39,7 +39,19 @@
3939 );
4040 });
4141
42- await getElementByText("Chat");
42+ // Check that it switched to Plan mode
43+ await getElementByText("Plan");
44+
45+ act(() => {
46+ document.dispatchEvent(
47+ new KeyboardEvent("keydown", {
48+ key: ".",
49+ metaKey: true, // cmd key on Mac
50+ }),
51+ );
52+ });
53+
54+ await getElementByText("Agent");
4355 });
4456
4557 test("should send a message and receive a response", async () => {
modified gui/src/redux/selectors/selectActiveTools.ts +9 −4
@@ -1,5 +1,6 @@
11 import { createSelector } from "@reduxjs/toolkit";
22 import { Tool } from "core";
3+import { BUILT_IN_GROUP_NAME } from "core/tools/builtIn";
34 import { RootState } from "../store";
45
56 export const selectActiveTools = createSelector(
@@ -12,14 +13,18 @@
1213 (mode, tools, policies, groupPolicies): Tool[] => {
1314 if (mode === "chat") {
1415 return [];
15- } else if (mode === "agent") {
16- return tools.filter(
16+ } else {
17+ const enabledTools = tools.filter(
1718 (tool) =>
1819 policies[tool.function.name] !== "disabled" &&
1920 groupPolicies[tool.group] !== "exclude",
2021 );
21- } else {
22- return [];
22+ if (mode === "plan") {
23+ return enabledTools.filter(
24+ (t) => t.group !== BUILT_IN_GROUP_NAME || t.readonly,
25+ );
26+ }
27+ return enabledTools;
2328 }
2429 },
2530 );
added gui/src/redux/slices/sessionSlice.test.ts +418 −0
@@ -0,0 +1,418 @@
1+import { ChatMessage } from "core";
2+import { renderChatMessage } from "core/util/messageContent";
3+import { v4 as uuidv4 } from "uuid";
4+import { beforeEach, describe, expect, it, vi } from "vitest";
5+import { addToolCallDeltaToState } from "../../util/toolCallState";
6+import { ChatHistoryItemWithMessageId, sessionSlice } from "./sessionSlice";
7+
8+// Mock dependencies
9+vi.mock("uuid");
10+vi.mock("core/util/messageContent");
11+vi.mock("../../util/toolCallState");
12+
13+const mockUuidv4 = vi.mocked(uuidv4);
14+const mockRenderChatMessage = vi.mocked(renderChatMessage);
15+const mockAddToolCallDeltaToState = vi.mocked(addToolCallDeltaToState);
16+
17+describe("sessionSlice streamUpdate", () => {
18+ beforeEach(() => {
19+ // Reset mocks before each test
20+ vi.clearAllMocks();
21+
22+ // Mock uuidv4 to return predictable values
23+ let callCount = 0;
24+ mockUuidv4.mockImplementation(() => `mock-uuid-${++callCount}`);
25+
26+ // Mock renderChatMessage to return content as is
27+ mockRenderChatMessage.mockImplementation((message: ChatMessage) => {
28+ if (typeof message.content === "string") {
29+ return message.content;
30+ }
31+ return "";
32+ });
33+
34+ // Mock addToolCallDeltaToState
35+ mockAddToolCallDeltaToState.mockImplementation((delta, state) => {
36+ return {
37+ status: "generating" as const,
38+ toolCall: {
39+ id: delta.id || "mock-tool-id",
40+ type: "function" as const,
41+ function: {
42+ name: delta.function?.name || "mock-function",
43+ arguments: delta.function?.arguments || "{}",
44+ },
45+ },
46+ toolCallId: delta.id || "mock-tool-id",
47+ parsedArgs: {},
48+ };
49+ });
50+ });
51+
52+ const createInitialState = () => ({
53+ lastSessionId: undefined,
54+ allSessionMetadata: [],
55+ history: [
56+ {
57+ message: {
58+ role: "user" as const,
59+ content: "This is a test.",
60+ id: "initial-user-message",
61+ },
62+ contextItems: [],
63+ },
64+ ] as ChatHistoryItemWithMessageId[],
65+ isStreaming: false,
66+ title: "Test Session",
67+ id: "test-session-id",
68+ streamAborter: new AbortController(),
69+ symbols: {},
70+ mode: "chat" as const,
71+ isInEdit: false,
72+ codeBlockApplyStates: {
73+ states: [],
74+ curIndex: 0,
75+ },
76+ newestToolbarPreviewForInput: {},
77+ isSessionMetadataLoading: false,
78+ });
79+
80+ describe("Basic Chat Message", () => {
81+ it("should append assistant message to history", () => {
82+ const initialState = createInitialState();
83+ const action = {
84+ type: "session/streamUpdate",
85+ payload: [
86+ {
87+ role: "assistant" as const,
88+ content: "Here is a response to your message without thinking.",
89+ },
90+ ],
91+ };
92+
93+ const newState = sessionSlice.reducer(initialState, action);
94+
95+ expect(newState.history).toHaveLength(2);
96+ expect(newState.history[1].message.role).toBe("assistant");
97+ expect(newState.history[1].message.content).toBe(
98+ "Here is a response to your message without thinking.",
99+ );
100+ expect(newState.history[1].message.id).toBe("mock-uuid-1");
101+ expect(newState.history[1].contextItems).toEqual([]);
102+ });
103+ });
104+
105+ describe("Chat Message With Thinking", () => {
106+ it("should split thinking and assistant content correctly", () => {
107+ const initialState = createInitialState();
108+ const action = {
109+ type: "session/streamUpdate",
110+ payload: [
111+ {
112+ role: "assistant" as const,
113+ content:
114+ "<think>I should send the user a response.</think> Here is a response to your message with thinking.",
115+ },
116+ ],
117+ };
118+
119+ const newState = sessionSlice.reducer(initialState, action);
120+
121+ expect(newState.history).toHaveLength(2);
122+
123+ // Check reasoning
124+ expect(newState.history[0].reasoning?.text).toBe(
125+ "I should send the user a response.",
126+ );
127+
128+ // Check assistant message
129+ expect(newState.history[1].message.role).toBe("assistant");
130+ expect(newState.history[1].message.content).toBe(
131+ "Here is a response to your message with thinking.",
132+ );
133+ expect(newState.history[1].message.id).toBe("mock-uuid-1");
134+ });
135+ });
136+
137+ describe("Tool Call With Response", () => {
138+ it("should handle tool call followed by tool response and assistant message", () => {
139+ const initialState = createInitialState();
140+ const toolCallAction = {
141+ type: "session/streamUpdate",
142+ payload: [
143+ {
144+ role: "assistant" as const,
145+ content: "<think>I should use a tool call.</think>",
146+ toolCalls: [
147+ {
148+ id: "1234",
149+ type: "function" as const,
150+ function: {
151+ name: "builtin_ls",
152+ arguments: '{"dirPath":".","recursive":false}',
153+ },
154+ },
155+ ],
156+ },
157+ ],
158+ };
159+
160+ let newState = sessionSlice.reducer(initialState, toolCallAction);
161+ expect(newState.history).toHaveLength(2);
162+
163+ // Check reasoning
164+ expect(newState.history[0].reasoning?.text).toBe(
165+ "I should use a tool call.",
166+ );
167+
168+ // Check generating message
169+ expect(newState.history[1].message.role).toBe("assistant");
170+ expect(newState.history[1].message.content).toBe("");
171+ expect(newState.history[1].toolCallState?.status).toBe("generating");
172+ expect(newState.history[1].toolCallState?.toolCallId).toBe("1234");
173+
174+ const toolResponseAction = {
175+ type: "session/streamUpdate",
176+ payload: [
177+ {
178+ role: "tool" as const,
179+ toolCallId: "1234",
180+ content: "foo.txt\nbar.txt\nexample.php",
181+ },
182+ {
183+ role: "assistant" as const,
184+ content: "I see, the tool found 3 files.",
185+ },
186+ ],
187+ };
188+ newState = sessionSlice.reducer(newState, toolResponseAction);
189+ expect(newState.history).toHaveLength(4);
190+
191+ // Check tool message
192+ expect(newState.history[2].message.role).toBe("tool");
193+ expect(newState.history[2].message.content).toBe(
194+ "foo.txt\nbar.txt\nexample.php",
195+ );
196+ expect((newState.history[2].message as any).toolCallId).toBe("1234");
197+
198+ // Check final assistant message
199+ expect(newState.history[3].message.role).toBe("assistant");
200+ expect(newState.history[3].message.content).toBe(
201+ "I see, the tool found 3 files.",
202+ );
203+ });
204+ });
205+
206+ describe("Tool Call With Streaming Response", () => {
207+ it("should handle streaming assistant response after tool call", () => {
208+ const initialState = createInitialState();
209+ const toolCallAction = {
210+ type: "session/streamUpdate",
211+ payload: [
212+ {
213+ role: "assistant" as const,
214+ content: "<think>I should use a tool call.</think>",
215+ toolCalls: [
216+ {
217+ id: "1234",
218+ type: "function" as const,
219+ function: {
220+ name: "builtin_ls",
221+ arguments: '{"dirPath":".","recursive":false}',
222+ },
223+ },
224+ ],
225+ },
226+ ],
227+ };
228+
229+ let newState = sessionSlice.reducer(initialState, toolCallAction);
230+ expect(newState.history).toHaveLength(2);
231+
232+ // Check reasoning
233+ expect(newState.history[0].reasoning?.text).toBe(
234+ "I should use a tool call.",
235+ );
236+
237+ // Check generating message
238+ expect(newState.history[1].message.role).toBe("assistant");
239+ expect(newState.history[1].message.content).toBe("");
240+ expect(newState.history[1].toolCallState?.status).toBe("generating");
241+ expect(newState.history[1].toolCallState?.toolCallId).toBe("1234");
242+
243+ const toolResponseAction = {
244+ type: "session/streamUpdate",
245+ payload: [
246+ {
247+ role: "tool" as const,
248+ toolCallId: "1234",
249+ content: "foo.txt\nbar.txt\nexample.php",
250+ },
251+ {
252+ role: "assistant" as const,
253+ content: "<think>",
254+ },
255+ {
256+ role: "assistant" as const,
257+ content: "Good, ",
258+ },
259+ {
260+ role: "assistant" as const,
261+ content: "I received a list",
262+ },
263+ {
264+ role: "assistant" as const,
265+ content: " of files.",
266+ },
267+ {
268+ role: "assistant" as const,
269+ content: "</think>",
270+ },
271+ {
272+ role: "assistant" as const,
273+ content: "\n",
274+ },
275+ {
276+ role: "assistant" as const,
277+ content: "I see, ",
278+ },
279+ {
280+ role: "assistant" as const,
281+ content: "the tool ",
282+ },
283+ {
284+ role: "assistant" as const,
285+ content: "found 3 ",
286+ },
287+ {
288+ role: "assistant" as const,
289+ content: "files.",
290+ },
291+ ],
292+ };
293+
294+ newState = sessionSlice.reducer(newState, toolResponseAction);
295+
296+ expect(newState.history).toHaveLength(4);
297+
298+ // Check tool message
299+ expect(newState.history[2].message.role).toBe("tool");
300+ expect(newState.history[2].message.content).toBe(
301+ "foo.txt\nbar.txt\nexample.php",
302+ );
303+
304+ // Check response message
305+ expect(newState.history[3].message.role).toBe("assistant");
306+ expect(newState.history[3].message.content).toBe(
307+ "I see, the tool found 3 files.",
308+ );
309+ expect(newState.history[3].reasoning?.text).toBe(
310+ "Good, I received a list of files.",
311+ );
312+ expect(newState.history[3].reasoning?.active).toBe(false);
313+ });
314+ });
315+
316+ describe("Edge Cases", () => {
317+ it("should handle empty history gracefully", () => {
318+ const initialState = createInitialState();
319+ initialState.history = [];
320+
321+ const action = {
322+ type: "session/streamUpdate",
323+ payload: [
324+ {
325+ role: "assistant" as const,
326+ content: "Hello",
327+ },
328+ ],
329+ };
330+
331+ const newState = sessionSlice.reducer(initialState, action);
332+
333+ // Should not crash and history should remain empty
334+ expect(newState.history).toHaveLength(0);
335+ });
336+
337+ it("should handle redacted thinking messages", () => {
338+ const initialState = createInitialState();
339+ const action = {
340+ type: "session/streamUpdate",
341+ payload: [
342+ {
343+ role: "thinking" as const,
344+ content: "This should be hidden",
345+ redactedThinking: true,
346+ },
347+ ],
348+ };
349+
350+ const newState = sessionSlice.reducer(initialState, action);
351+
352+ expect(newState.history).toHaveLength(2);
353+ expect(newState.history[1].message.role).toBe("thinking");
354+ expect(newState.history[1].message.content).toBe(
355+ "internal reasoning is hidden due to safety reasons",
356+ );
357+ expect((newState.history[1].message as any).redactedThinking).toBe(true);
358+ });
359+
360+ it("should handle signature updates for thinking messages", () => {
361+ const initialState = createInitialState();
362+ // First add a thinking message
363+ initialState.history.push({
364+ message: {
365+ role: "thinking",
366+ content: "Some thinking",
367+ id: "thinking-message",
368+ },
369+ contextItems: [],
370+ });
371+
372+ const action = {
373+ type: "session/streamUpdate",
374+ payload: [
375+ {
376+ role: "thinking" as const,
377+ signature: "test-signature",
378+ },
379+ ],
380+ };
381+
382+ const newState = sessionSlice.reducer(initialState, action);
383+
384+ expect(newState.history).toHaveLength(2);
385+ expect((newState.history[1].message as any).signature).toBe(
386+ "test-signature",
387+ );
388+ });
389+
390+ it("should accumulate content for same role messages", () => {
391+ const initialState = createInitialState();
392+ // Add an assistant message first
393+ initialState.history.push({
394+ message: {
395+ role: "assistant",
396+ content: "Hello ",
397+ id: "assistant-message",
398+ },
399+ contextItems: [],
400+ });
401+
402+ const action = {
403+ type: "session/streamUpdate",
404+ payload: [
405+ {
406+ role: "assistant" as const,
407+ content: "world!",
408+ },
409+ ],
410+ };
411+
412+ const newState = sessionSlice.reducer(initialState, action);
413+
414+ expect(newState.history).toHaveLength(2);
415+ expect(newState.history[1].message.content).toBe("Hello world!");
416+ });
417+ });
418+});
modified gui/src/redux/slices/sessionSlice.ts +125 −47
@@ -8,6 +8,7 @@
88 import { JSONContent } from "@tiptap/react";
99 import {
1010 ApplyState,
11+ AssistantChatMessage,
1112 ChatHistoryItem,
1213 ChatMessage,
1314 ContextItem,
@@ -18,6 +19,7 @@
1819 RuleWithSource,
1920 Session,
2021 SessionMetadata,
22+ ThinkingChatMessage,
2123 Tool,
2224 } from "core";
2325 import { NEW_SESSION_TITLE } from "core/util/constants";
@@ -72,7 +74,7 @@
7274 id: uuidv4(),
7375 streamAborter: new AbortController(),
7476 symbols: {},
75- mode: "chat",
77+ mode: "agent",
7678 isInEdit: false,
7779 codeBlockApplyStates: {
7880 states: [],
@@ -330,12 +332,10 @@
330332 streamUpdate: (state, action: PayloadAction<ChatMessage[]>) => {
331333 if (state.history.length) {
332334 for (const message of action.payload) {
333- const lastItem = state.history[state.history.length - 1];
334- const lastMessage = lastItem.message;
335+ let lastItem = state.history[state.history.length - 1];
336+ let lastMessage = lastItem.message;
335337
336338 if (message.role === "thinking" && message.redactedThinking) {
337- console.log("add redacted_thinking blocks");
338-
339339 state.history.push({
340340 message: {
341341 role: "thinking",
@@ -348,6 +348,74 @@
348348 continue;
349349 }
350350
351+ const messageContent = message.content
352+ ? renderChatMessage(message)
353+ : "";
354+
355+ // OpenAI-compatible models in agent mode sometimes send
356+ // all of their data in one message, so we handle that case early.
357+ if (messageContent) {
358+ const thinkMatches = messageContent.match(
359+ /<think>([\s\S]*)<\/think>([\s\S]*)/,
360+ );
361+ if (thinkMatches) {
362+ // The order that they seem to consistently use is:
363+ //
364+ // <think>Thinking text</think>
365+ // Text to show to the user
366+
367+ lastItem.reasoning = {
368+ text: thinkMatches[1].trim(),
369+ startAt: Date.now(),
370+ endAt: Date.now(),
371+ active: false,
372+ };
373+
374+ // This is the chat message that we should show to the user.
375+ // We always need to push this even if it is empty,
376+ // because we cannot attach tool calls to a Thinking message.
377+ // That would break `messageHasToolCallId`.
378+ state.history.push({
379+ message: {
380+ role: "assistant",
381+ content: thinkMatches[2].trim(),
382+ id: uuidv4(),
383+ },
384+ contextItems: [],
385+ });
386+ lastItem = state.history[state.history.length - 1];
387+ lastMessage = lastItem.message;
388+
389+ if (
390+ (message.role === "assistant" || message.role === "thinking") &&
391+ message.toolCalls?.[0]
392+ ) {
393+ // Only support one tool call for now.
394+ // There are further changes required throughout the system
395+ // to support multiple tool calls in a single message from
396+ // OpenAI-compatible providers.
397+ const toolCallDelta = message.toolCalls[0];
398+ const newToolCallState = addToolCallDeltaToState(
399+ toolCallDelta,
400+ lastItem.toolCallState,
401+ );
402+ lastItem.toolCallState = newToolCallState;
403+ // We know this is one of these two types because we just added it
404+ const curMessage = lastMessage as
405+ | AssistantChatMessage
406+ | ThinkingChatMessage;
407+ if (curMessage.toolCalls) {
408+ curMessage.toolCalls.push(newToolCallState.toolCall);
409+ } else {
410+ curMessage.toolCalls = [newToolCallState.toolCall];
411+ }
412+ }
413+
414+ return;
415+ }
416+ }
417+
418+ // The remainder of this function handles streaming messages
351419 if (
352420 lastMessage.role !== message.role ||
353421 // This is for when a tool call comes immediately before/after tool call
@@ -363,7 +431,7 @@
363431 const historyItem: ChatHistoryItemWithMessageId = {
364432 message: {
365433 ...message,
366- content: renderChatMessage(message),
434+ content: "",
367435 id: uuidv4(),
368436 },
369437 contextItems: [],
@@ -376,52 +444,62 @@
376444 );
377445 }
378446 state.history.push(historyItem);
379- } else {
380- // Add to the existing message
381- if (message.content) {
382- const messageContent = renderChatMessage(message);
383- if (messageContent.includes("<think>")) {
384- lastItem.reasoning = {
385- startAt: Date.now(),
386- active: true,
387- text: messageContent.replace("<think>", "").trim(),
388- };
389- } else if (
390- lastItem.reasoning?.active &&
391- messageContent.includes("</think>")
447+ lastItem = state.history[state.history.length - 1];
448+ lastMessage = lastItem.message;
449+ }
450+
451+ // Add to the existing message
452+ if (messageContent) {
453+ if (messageContent.includes("<think>")) {
454+ lastItem.reasoning = {
455+ startAt: Date.now(),
456+ active: true,
457+ text: messageContent.replace("<think>", "").trim(),
458+ };
459+ } else if (
460+ lastItem.reasoning?.active &&
461+ messageContent.includes("</think>")
462+ ) {
463+ const [reasoningEnd, answerStart] =
464+ messageContent.split("</think>");
465+ lastItem.reasoning.text += reasoningEnd.trimEnd();
466+ lastItem.reasoning.active = false;
467+ lastItem.reasoning.endAt = Date.now();
468+ lastMessage.content += answerStart.trimStart();
469+ } else if (lastItem.reasoning?.active) {
470+ if (
471+ lastItem.reasoning.text.length > 0 ||
472+ messageContent.trim().length > 0
392473 ) {
393- const [reasoningEnd, answerStart] =
394- messageContent.split("</think>");
395- lastItem.reasoning.text += reasoningEnd.trimEnd();
396- lastItem.reasoning.active = false;
397- lastItem.reasoning.endAt = Date.now();
398- lastMessage.content += answerStart.trimStart();
399- } else if (lastItem.reasoning?.active) {
400474 lastItem.reasoning.text += messageContent;
401- } else {
402- // Note this only works because new message above
403- // was already rendered from parts to string
404- lastMessage.content += messageContent;
405475 }
406- } else if (message.role === "thinking" && message.signature) {
407- if (lastMessage.role === "thinking") {
408- console.log("add signature", message.signature);
409- lastMessage.signature = message.signature;
476+ } else {
477+ // Note this only works because new message above
478+ // was already rendered from parts to string
479+ if (
480+ lastMessage.content.length > 0 ||
481+ messageContent.trim().length > 0
482+ ) {
483+ lastMessage.content += messageContent;
410484 }
411- } else if (
412- message.role === "assistant" &&
413- message.toolCalls?.[0] &&
414- lastMessage.role === "assistant"
415- ) {
416- // Intentionally only supporting one tool call for now.
417- const toolCallDelta = message.toolCalls[0];
418- const newToolCallState = addToolCallDeltaToState(
419- toolCallDelta,
420- lastItem.toolCallState,
421- );
422- lastItem.toolCallState = newToolCallState;
423- lastMessage.toolCalls = [newToolCallState.toolCall];
424485 }
486+ } else if (message.role === "thinking" && message.signature) {
487+ if (lastMessage.role === "thinking") {
488+ lastMessage.signature = message.signature;
489+ }
490+ } else if (
491+ message.role === "assistant" &&
492+ message.toolCalls?.[0] &&
493+ lastMessage.role === "assistant"
494+ ) {
495+ // Intentionally only supporting one tool call for now.
496+ const toolCallDelta = message.toolCalls[0];
497+ const newToolCallState = addToolCallDeltaToState(
498+ toolCallDelta,
499+ lastItem.toolCallState,
500+ );
501+ lastItem.toolCallState = newToolCallState;
502+ lastMessage.toolCalls = [newToolCallState.toolCall];
425503 }
426504 }
427505 }
modified gui/src/redux/thunks/edit.ts +49 −48
@@ -75,52 +75,49 @@
7575
7676 export const exitEdit = createAsyncThunk<
7777 void,
78- { goToMode?: MessageModes; openNewSession?: boolean },
78+ { openNewSession?: boolean },
7979 ThunkApiType
80->(
81- "edit/exit",
82- async ({ goToMode, openNewSession }, { dispatch, extra, getState }) => {
83- const state = getState();
84- const codeToEdit = state.editModeState.codeToEdit;
85- const isInEdit = state.session.isInEdit;
86- const previousModeEditorContent =
87- state.editModeState.previousModeEditorContent;
88-
89- if (!isInEdit) {
90- return;
91- }
92-
93- if (codeToEdit[0] && state.editModeState.applyState.numDiffs) {
94- extra.ideMessenger.post("rejectDiff", {
95- filepath: codeToEdit[0].filepath,
96- });
97- }
98-
99- extra.ideMessenger.post("edit/clearDecorations", undefined);
100-
101- dispatch(clearCodeToEdit());
102- dispatch(updateEditStateApplyState(INITIAL_EDIT_APPLY_STATE));
103- dispatch(setIsInEdit(false));
104-
105- // Restore the previous editor content if available
106- if (previousModeEditorContent) {
107- dispatch(setMainEditorContentTrigger(previousModeEditorContent));
108- dispatch(setPreviousModeEditorContent(undefined));
109- }
110-
111- if (openNewSession || state.editModeState.lastNonEditSessionWasEmpty) {
112- dispatch(newSession());
113- } else {
114- await dispatch(
115- loadLastSession({
116- saveCurrentSession: false,
117- }),
118- );
119- }
80+>("edit/exit", async ({ openNewSession }, { dispatch, extra, getState }) => {
81+ const state = getState();
82+ const codeToEdit = state.editModeState.codeToEdit;
83+ const isInEdit = state.session.isInEdit;
84+ const previousModeEditorContent =
85+ state.editModeState.previousModeEditorContent;
86+
87+ if (!isInEdit) {
88+ return;
89+ }
90+
91+ if (codeToEdit[0] && state.editModeState.applyState.numDiffs) {
92+ extra.ideMessenger.post("rejectDiff", {
93+ filepath: codeToEdit[0].filepath,
94+ });
95+ }
96+
97+ extra.ideMessenger.post("edit/clearDecorations", undefined);
98+
99+ dispatch(clearCodeToEdit());
100+ dispatch(updateEditStateApplyState(INITIAL_EDIT_APPLY_STATE));
101+ dispatch(setIsInEdit(false));
102+
103+ // Restore the previous editor content if available
104+ if (previousModeEditorContent) {
105+ dispatch(setMainEditorContentTrigger(previousModeEditorContent));
106+ dispatch(setPreviousModeEditorContent(undefined));
107+ }
108+
109+ if (openNewSession || state.editModeState.lastNonEditSessionWasEmpty) {
110+ dispatch(newSession());
111+ } else {
112+ await dispatch(
113+ loadLastSession({
114+ saveCurrentSession: false,
115+ }),
116+ );
117+ }
120118
121- dispatch(setMode(goToMode ?? state.editModeState.returnToMode));
122- },
123-);
119+ dispatch(setMode(state.editModeState.returnToMode));
120+});
124121
125122 export const enterEdit = createAsyncThunk<
126123 void,
@@ -136,6 +133,14 @@
136133 return;
137134 }
138135
136+ if (!state.editModeState.codeToEdit[0]) {
137+ extra.ideMessenger.post("showToast", [
138+ "info",
139+ "Please open a file to use Edit mode",
140+ ]);
141+ return;
142+ }
143+
139144 dispatch(setMainEditorContentTrigger({}));
140145 dispatch(setPreviousModeEditorContent(editorContent));
141146
@@ -151,9 +156,5 @@
151156 );
152157
153158 dispatch(setIsInEdit(true));
154-
155- if (!state.editModeState.codeToEdit[0]) {
156- extra.ideMessenger.post("edit/addCurrentSelection", undefined);
157- }
158159 },
159160 );
modified gui/src/redux/thunks/moveTerminalProcessToBackground.ts +10 −3
@@ -10,9 +10,10 @@
1010
1111 /**
1212 * This thunk is used to move a terminal command to the background
13- * when the user clicks the "Continue" button in the UI
13+ * when the user clicks the "Move to background" link in the UI
1414 *
15- * It marks the command as visually complete without stopping
15+ * It preserves all existing terminal output, marks the command as
16+ * visually complete, and stops listening to further output from
1617 * the already running process
1718 */
1819 export const moveTerminalProcessToBackground = createAsyncThunk<
@@ -39,6 +40,12 @@
3940 return;
4041 }
4142
43+ // Find existing terminal output to preserve it
44+ const existingOutput = toolCall.output?.find(
45+ (item) => item.name === "Terminal",
46+ );
47+ const existingContent = existingOutput?.content || "";
48+
4249 const status =
4350 "Command moved to background. Further output will be ignored.";
4451
@@ -46,7 +53,7 @@
4653 {
4754 name: "Terminal",
4855 description: "Terminal command output",
49- content: "\n" + status,
56+ content: existingContent + (existingContent ? "\n\n" : "") + status,
5057 status: status,
5158 },
5259 ];
modified gui/src/redux/thunks/streamNormalInput.ts +66 −18
@@ -1,7 +1,9 @@
11 import { createAsyncThunk, unwrapResult } from "@reduxjs/toolkit";
2-import { LLMFullCompletionOptions } from "core";
2+import { LLMFullCompletionOptions, ModelDescription, Tool } from "core";
33 import { modelSupportsTools } from "core/llm/autodetect";
4+import { getRuleId } from "core/llm/rules/getSystemMessageWithRules";
45 import { ToCoreProtocol } from "core/protocol";
6+import { BuiltInToolNames } from "core/tools/builtIn";
57 import { selectActiveTools } from "../selectors/selectActiveTools";
68 import { selectCurrentToolCall } from "../selectors/selectCurrentToolCall";
79 import { selectSelectedChatModel } from "../slices/configSlice";
@@ -21,6 +23,49 @@
2123 } from "../util/constructMessages";
2224 import { callCurrentTool } from "./callCurrentTool";
2325
26+/**
27+ * Filters tools based on the selected model's capabilities.
28+ * Returns either the edit file tool or search and replace tool, but not both.
29+ */
30+function filterToolsForModel(
31+ tools: Tool[],
32+ selectedModel: ModelDescription,
33+): Tool[] {
34+ const editFileTool = tools.find(
35+ (tool) => tool.function.name === BuiltInToolNames.EditExistingFile,
36+ );
37+ const searchAndReplaceTool = tools.find(
38+ (tool) => tool.function.name === BuiltInToolNames.SearchAndReplaceInFile,
39+ );
40+
41+ // If we don't have both tools, return tools as-is
42+ if (!editFileTool || !searchAndReplaceTool) {
43+ return tools;
44+ }
45+
46+ // Determine which tool to use based on the model
47+ const shouldUseFindReplace = shouldUseFindReplaceEdits(selectedModel);
48+
49+ // Filter out the unwanted tool
50+ return tools.filter((tool) => {
51+ if (tool.function.name === BuiltInToolNames.EditExistingFile) {
52+ return !shouldUseFindReplace;
53+ }
54+ if (tool.function.name === BuiltInToolNames.SearchAndReplaceInFile) {
55+ return shouldUseFindReplace;
56+ }
57+ return true;
58+ });
59+}
60+
61+/**
62+ * Determines whether to use search and replace tool instead of edit file
63+ * Right now we only know that this is reliable with Claude models
64+ */
65+function shouldUseFindReplaceEdits(model: ModelDescription): boolean {
66+ return model.model.includes("claude");
67+}
68+
2469 export const streamNormalInput = createAsyncThunk<
2570 void,
2671 {
@@ -37,8 +82,9 @@
3782 throw new Error("No chat model selected");
3883 }
3984
40- // Get tools
41- const activeTools = selectActiveTools(state);
85+ // Get tools and filter them based on the selected model
86+ const allActiveTools = selectActiveTools(state);
87+ const activeTools = filterToolsForModel(allActiveTools, selectedChatModel);
4288 const toolsSupported = modelSupportsTools(selectedChatModel);
4389
4490 // Construct completion options
@@ -115,21 +161,23 @@
115161 dispatch(addPromptCompletionPair([next.value]));
116162
117163 try {
118- if (state.session.mode === "chat" || state.session.mode === "agent") {
119- extra.ideMessenger.post("devdata/log", {
120- name: "chatInteraction",
121- data: {
122- prompt: next.value.prompt,
123- completion: next.value.completion,
124- modelProvider: selectedChatModel.underlyingProviderName,
125- modelTitle: selectedChatModel.title,
126- sessionId: state.session.id,
127- ...(state.session.mode === "agent" && {
128- tools: activeTools.map((tool) => tool.function.name),
129- }),
130- },
131- });
132- }
164+ extra.ideMessenger.post("devdata/log", {
165+ name: "chatInteraction",
166+ data: {
167+ prompt: next.value.prompt,
168+ completion: next.value.completion,
169+ modelProvider: selectedChatModel.underlyingProviderName,
170+ modelTitle: selectedChatModel.title,
171+ sessionId: state.session.id,
172+ ...(!!activeTools.length && {
173+ tools: activeTools.map((tool) => tool.function.name),
174+ }),
175+ rules: appliedRules.map((rule) => ({
176+ id: getRuleId(rule),
177+ rule: rule.rule,
178+ })),
179+ },
180+ });
133181 // else if (state.session.mode === "edit") {
134182 // extra.ideMessenger.post("devdata/log", {
135183 // name: "editInteraction",
modified gui/src/redux/thunks/streamThunkWrapper.tsx +1 −1
@@ -17,7 +17,7 @@
1717 try {
1818 await runStream();
1919 const state = getState();
20- if (state.session.mode === "chat" || state.session.mode === "agent") {
20+ if (!state.session.isInEdit) {
2121 await dispatch(
2222 saveCurrentSession({
2323 openNewSession: false,
modified gui/src/redux/util/constructMessages.test.ts +13 −1
@@ -12,6 +12,7 @@
1212 import {
1313 DEFAULT_AGENT_SYSTEM_MESSAGE,
1414 DEFAULT_CHAT_SYSTEM_MESSAGE,
15+ DEFAULT_PLAN_SYSTEM_MESSAGE,
1516 } from "core/llm/defaultSystemMessages";
1617 import { renderChatMessage } from "core/util/messageContent";
1718 import { beforeEach, describe, expect, test, vi } from "vitest";
@@ -90,8 +91,9 @@
9091
9192 test("getBaseSystemMessage should return the correct system message based on mode", () => {
9293 const mockModel = {
93- baseAgentSystemMessage: "Custom Agent System Message",
9494 baseChatSystemMessage: "Custom Chat System Message",
95+ basePlanSystemMessage: "Custom Plan System Message",
96+ baseAgentSystemMessage: "Custom Agent System Message",
9597 } as ModelDescription;
9698
9799 // Test agent mode with custom message
@@ -99,6 +101,11 @@
99101 "Custom Agent System Message",
100102 );
101103
104+ // Test plan mode with custom message
105+ expect(getBaseSystemMessage("plan", mockModel)).toBe(
106+ "Custom Plan System Message",
107+ );
108+
102109 // Test chat mode with custom message
103110 expect(getBaseSystemMessage("chat", mockModel)).toBe(
104111 "Custom Chat System Message",
@@ -109,6 +116,11 @@
109116 DEFAULT_AGENT_SYSTEM_MESSAGE,
110117 );
111118
119+ // Test agent mode with default message
120+ expect(getBaseSystemMessage("plan", {} as ModelDescription)).toBe(
121+ DEFAULT_PLAN_SYSTEM_MESSAGE,
122+ );
123+
112124 // Test chat mode with default message
113125 expect(getBaseSystemMessage("chat", {} as ModelDescription)).toBe(
114126 DEFAULT_CHAT_SYSTEM_MESSAGE,
modified gui/src/redux/util/constructMessages.ts +3 −0
@@ -11,6 +11,7 @@
1111 import {
1212 DEFAULT_AGENT_SYSTEM_MESSAGE,
1313 DEFAULT_CHAT_SYSTEM_MESSAGE,
14+ DEFAULT_PLAN_SYSTEM_MESSAGE,
1415 } from "core/llm/defaultSystemMessages";
1516 import { chatMessageIsEmpty } from "core/llm/messages";
1617 import { getSystemMessageWithRules } from "core/llm/rules/getSystemMessageWithRules";
@@ -167,6 +168,8 @@
167168 ): string {
168169 if (messageMode === "agent") {
169170 return model.baseAgentSystemMessage ?? DEFAULT_AGENT_SYSTEM_MESSAGE;
171+ } else if (messageMode === "plan") {
172+ return model.basePlanSystemMessage ?? DEFAULT_PLAN_SYSTEM_MESSAGE;
170173 } else {
171174 return model.baseChatSystemMessage ?? DEFAULT_CHAT_SYSTEM_MESSAGE;
172175 }
modified gui/src/util/clientTools/searchReplaceImpl.test.ts +17 −1
@@ -36,7 +36,13 @@
3636 // Create mock extras
3737 mockExtras = {
3838 ideMessenger: mockIdeMessenger,
39- getState: vi.fn(),
39+ getState: vi.fn<any>(() => ({
40+ config: {
41+ config: {
42+ allowAnonymousTelemetry: false,
43+ },
44+ },
45+ })),
4046 dispatch: vi.fn(),
4147 };
4248 });
@@ -99,6 +105,7 @@
99105 mockFindSearchMatch.mockReturnValue({
100106 startIndex,
101107 endIndex,
108+ strategyName: "exactMatch",
102109 });
103110 mockIdeMessenger.request.mockResolvedValue({ status: "success" });
104111
@@ -173,10 +180,12 @@
173180 .mockReturnValueOnce({
174181 startIndex: firstStartIndex,
175182 endIndex: firstEndIndex,
183+ strategyName: "exactMatch",
176184 })
177185 .mockReturnValueOnce({
178186 startIndex: secondStartIndex,
179187 endIndex: secondEndIndex,
188+ strategyName: "exactMatch",
180189 });
181190
182191 mockIdeMessenger.request.mockResolvedValue({ status: "success" });
@@ -239,6 +248,7 @@
239248 mockFindSearchMatch.mockReturnValue({
240249 startIndex: 10, // Position of "remove this line"
241250 endIndex: 26, // End of "remove this line"
251+ strategyName: "exactMatch",
242252 });
243253 mockIdeMessenger.request.mockResolvedValue({ status: "success" });
244254
@@ -278,6 +288,7 @@
278288 mockFindSearchMatch.mockReturnValue({
279289 startIndex: 6,
280290 endIndex: 11,
291+ strategyName: "exactMatch",
281292 });
282293 mockIdeMessenger.request.mockResolvedValue({ status: "success" });
283294
@@ -344,6 +355,7 @@
344355 .mockReturnValueOnce({
345356 startIndex: 0,
346357 endIndex: 13,
358+ strategyName: "exactMatch",
347359 })
348360 .mockReturnValueOnce(null); // Second search fails
349361
@@ -393,6 +405,7 @@
393405 mockFindSearchMatch.mockReturnValue({
394406 startIndex: 0,
395407 endIndex: 7,
408+ strategyName: "exactMatch",
396409 });
397410 mockIdeMessenger.request.mockRejectedValue(new Error("Apply failed"));
398411
@@ -423,6 +436,7 @@
423436 mockFindSearchMatch.mockReturnValue({
424437 startIndex: 0, // Empty search matches at beginning
425438 endIndex: 0,
439+ strategyName: "exactMatch",
426440 });
427441 mockIdeMessenger.request.mockResolvedValue({ status: "success" });
428442
@@ -457,6 +471,7 @@
457471 mockFindSearchMatch.mockReturnValue({
458472 startIndex: 0,
459473 endIndex: originalContent.length,
474+ strategyName: "exactMatch",
460475 });
461476 mockIdeMessenger.request.mockResolvedValue({ status: "success" });
462477
@@ -492,6 +507,7 @@
492507 mockFindSearchMatch.mockReturnValue({
493508 startIndex: 0,
494509 endIndex: 4,
510+ strategyName: "exactMatch",
495511 });
496512 mockIdeMessenger.request.mockResolvedValue({ status: "success" });
497513
modified gui/src/util/clientTools/searchReplaceImpl.ts +14 −0
@@ -1,6 +1,7 @@
11 import { findSearchMatch } from "core/edit/searchAndReplace/findSearchMatch";
22 import { parseAllSearchReplaceBlocks } from "core/edit/searchAndReplace/parseSearchReplaceBlock";
33 import { resolveRelativePathInDir } from "core/util/ideUtils";
4+import posthog from "posthog-js";
45 import { v4 as uuid } from "uuid";
56 import { ClientToolImpl } from "./callClientTool";
67
@@ -11,6 +12,9 @@
1112 ) => {
1213 const { filepath, diff } = args;
1314
15+ const state = extras.getState();
16+ const allowAnonymousTelemetry = state.config.config.allowAnonymousTelemetry;
17+
1418 const streamId = uuid();
1519
1620 // Resolve the file path
@@ -42,6 +46,16 @@
4246
4347 // Find the search content in the current state of the file
4448 const match = findSearchMatch(currentContent, searchContent || "");
49+
50+ // Because we don't have access to use hooks, we check `allowAnonymousTelemetry`
51+ // directly rather than using `CustomPostHogProvider`
52+ if (allowAnonymousTelemetry) {
53+ // Capture telemetry for tool calls
54+ posthog.capture("find_replace_match_result", {
55+ matchStrategy: match?.strategyName ?? "noMatch",
56+ });
57+ }
58+
4559 if (!match) {
4660 throw new Error(
4761 `Search content not found in block ${i + 1}:\n${searchContent}`,
modified gui/src/util/toolCallState.test.ts +100 −0
@@ -479,4 +479,104 @@
479479 );
480480 expect(currentState.parsedArgs).toEqual({ location: "Paris, France" });
481481 });
482+
483+ it("should handle arguments streamed in full progressive chunks", () => {
484+ // Test case where model streams args progressively but includes full prefix each time
485+ // e.g. '{"query":"te' -> '{"query":"tes' -> '{"query":"test"}'
486+ const currentState: ToolCallState = {
487+ status: "generating",
488+ toolCall: {
489+ id: "call123",
490+ type: "function",
491+ function: {
492+ name: "searchFiles",
493+ arguments: '{"query":"te',
494+ },
495+ },
496+ toolCallId: "call123",
497+ parsedArgs: { query: "te" },
498+ };
499+
500+ const delta: ToolCallDelta = {
501+ function: {
502+ arguments: '{"query":"tes',
503+ },
504+ };
505+
506+ const result = addToolCallDeltaToState(delta, currentState);
507+ expect(result.toolCall.function.arguments).toBe('{"query":"tes');
508+ expect(result.parsedArgs).toEqual({ query: "tes" });
509+
510+ // Continue the streaming
511+ const nextDelta: ToolCallDelta = {
512+ function: {
513+ arguments: '{"query":"test"}',
514+ },
515+ };
516+
517+ const finalResult = addToolCallDeltaToState(nextDelta, result);
518+ expect(finalResult.toolCall.function.arguments).toBe('{"query":"test"}');
519+ expect(finalResult.parsedArgs).toEqual({ query: "test" });
520+ });
521+
522+ it("should handle when args delta is a superset of current args", () => {
523+ // Test case where model sends a subset of the current arguments
524+ // This can happen in certain LLM implementations
525+ const currentState: ToolCallState = {
526+ status: "generating",
527+ toolCall: {
528+ id: "call123",
529+ type: "function",
530+ function: {
531+ name: "searchFiles",
532+ arguments: '{"query":"test"',
533+ },
534+ },
535+ toolCallId: "call123",
536+ parsedArgs: { query: "test" },
537+ };
538+
539+ const delta: ToolCallDelta = {
540+ function: {
541+ arguments: '{"query":"test","limit":10}',
542+ },
543+ };
544+
545+ // The subset should be ignored, keeping the current state
546+ const result = addToolCallDeltaToState(delta, currentState);
547+ expect(result.toolCall.function.arguments).toBe(
548+ '{"query":"test","limit":10}',
549+ );
550+ expect(result.parsedArgs).toEqual({ query: "test", limit: 10 });
551+ });
552+
553+ it("should handle when args are complete JSON and new deltas arrive", () => {
554+ // When args are already a valid JSON object, new deltas should not modify it
555+ const currentState: ToolCallState = {
556+ status: "generating",
557+ toolCall: {
558+ id: "call123",
559+ type: "function",
560+ function: {
561+ name: "searchFiles",
562+ arguments: '{"query":"test","limit":10}',
563+ },
564+ },
565+ toolCallId: "call123",
566+ parsedArgs: { query: "test", limit: 10 },
567+ };
568+
569+ const delta: ToolCallDelta = {
570+ function: {
571+ arguments: ',"sort":"asc"}',
572+ },
573+ };
574+
575+ // The complete JSON should not be modified
576+ const result = addToolCallDeltaToState(delta, currentState);
577+ expect(result.toolCall.function.arguments).toBe(
578+ '{"query":"test","limit":10}',
579+ );
580+ expect(result.parsedArgs).toEqual({ query: "test", limit: 10 });
581+ });
482582 });
modified gui/src/util/toolCallState.ts +15 −6
@@ -34,15 +34,24 @@
3434 if (nameDelta.startsWith(currentName)) {
3535 // Case where model progresssively streams name but full name each time e.g. "readFi" -> "readFil" -> "readFile"
3636 mergedName = nameDelta;
37- } else if (currentName.startsWith(nameDelta)) {
38- // Case where model streams in full name each time e.g. readFile -> readFile -> readFile
39- // do nothing
40- } else {
41- // Case where model streams in name in parts e.g. "read" -> "File"
37+ } else if (!currentName.startsWith(nameDelta)) {
4238 mergedName = currentName + nameDelta;
4339 }
4440
45- const mergedArgs = currentArgs + argsDelta;
41+ // Similar logic for args, with an extra JSON check
42+ let mergedArgs = currentArgs;
43+ try {
44+ // If args is JSON parseable, it is complete, don't add to it
45+ JSON.parse(currentArgs);
46+ } catch (e) {
47+ if (argsDelta.startsWith(currentArgs)) {
48+ // Case where model progresssively streams args but full args each time e.g. "{"file": "file1"}" -> "{"file": "file1", "line": 1}"
49+ mergedArgs = argsDelta;
50+ } else if (!currentArgs.startsWith(argsDelta)) {
51+ // Case where model streams in args in parts e.g. "{"file": "file1"" -> ", "line": 1}"
52+ mergedArgs = currentArgs + argsDelta;
53+ }
54+ }
4655
4756 const [_, parsedArgs] = incrementalParseJson(mergedArgs || "{}");
4857
modified packages/config-yaml/package.json +1 −1
@@ -1,6 +1,6 @@
11 {
22 "name": "@continuedev/config-yaml",
3- "version": "1.0.95",
3+ "version": "1.0.96",
44 "description": "",
55 "main": "dist/index.js",
66 "types": "dist/index.d.ts",
modified packages/config-yaml/src/load/clientRender.ts +24 −2
@@ -133,7 +133,27 @@
133133 const apiKeyLocation = getUnrenderedSecretLocation(
134134 config.models[i]?.apiKey,
135135 );
136- if (apiKeyLocation) {
136+ const encodedApiKeyLocation = apiKeyLocation
137+ ? encodeSecretLocation(apiKeyLocation)
138+ : undefined;
139+
140+ let encodedEnvSecretLocations: Record<string, string> | undefined =
141+ undefined;
142+ if (config.models[i]?.env) {
143+ Object.entries(config.models[i]?.env!).forEach(([key, value]) => {
144+ if (typeof value === "string") {
145+ const secretLocation = getUnrenderedSecretLocation(value);
146+ if (secretLocation) {
147+ encodedEnvSecretLocations = {
148+ ...encodedEnvSecretLocations,
149+ [key]: encodeSecretLocation(secretLocation),
150+ };
151+ }
152+ }
153+ });
154+ }
155+
156+ if (encodedApiKeyLocation || encodedEnvSecretLocations) {
137157 config.models[i] = {
138158 ...config.models[i],
139159 name: config.models[i]?.name ?? "",
@@ -143,7 +163,8 @@
143163 config.models[i]?.provider ?? "",
144164 config.models[i]?.model ?? "",
145165 ),
146- apiKeyLocation: encodeSecretLocation(apiKeyLocation),
166+ apiKeyLocation: encodedApiKeyLocation,
167+ envSecretLocations: encodedEnvSecretLocations,
147168 orgScopeId,
148169 onPremProxyUrl,
149170 apiKey: undefined,
@@ -158,6 +179,7 @@
158179 /** The additional properties that are added to the otherwise OpenAI-compatible body when requesting a Continue proxy */
159180 export const continuePropertiesSchema = z.object({
160181 apiKeyLocation: z.string().optional(),
182+ envSecretLocations: z.record(z.string(), z.string()).optional(),
161183 apiBase: z.string().optional(),
162184 orgScopeId: z.string().nullable(),
163185 env: z.record(z.string(), z.any()).optional(),
modified packages/config-yaml/src/load/unroll.ts +181 −84
@@ -24,7 +24,7 @@
2424 packageIdentifierToShorthandSlug,
2525 useProxyForUnrenderedSecrets,
2626 } from "./clientRender.js";
27-import { getBlockType } from "./getBlockType.js";
27+import { BlockType, getBlockType } from "./getBlockType.js";
2828
2929 export function parseConfigYaml(configYaml: string): ConfigYaml {
3030 try {
@@ -322,12 +322,15 @@
322322 "name" | "version" | "rules" | "schema" | "metadata"
323323 >)[] = ["models", "context", "data", "mcpServers", "prompts", "docs"];
324324
325- // For each section, replace "uses/with" blocks with the real thing
326- for (const section of sections) {
327- if (assistant[section]) {
328- const sectionBlocks: any[] = [];
325+ // Process all sections in parallel
326+ const sectionPromises = sections.map(async (section) => {
327+ if (!assistant[section]) {
328+ return { section, blocks: null };
329+ }
329330
330- for (const unrolledBlock of assistant[section]) {
331+ // Process all blocks in this section in parallel
332+ const blockPromises = assistant[section].map(
333+ async (unrolledBlock, index) => {
331334 // "uses/with" block
332335 if ("uses" in unrolledBlock) {
333336 try {
@@ -338,10 +341,13 @@
338341 );
339342 const block = blockConfigYaml[section]?.[0];
340343 if (block) {
341- sectionBlocks.push(
342- mergeOverrides(block, unrolledBlock.override ?? {}),
343- );
344+ return {
345+ index,
346+ block: mergeOverrides(block, unrolledBlock.override ?? {}),
347+ error: null,
348+ };
344349 }
350+ return { index, block: null, error: null };
345351 } catch (err) {
346352 let msg = "";
347353 if (
@@ -353,99 +359,190 @@
353359 msg = `${(err as Error).message}.\n> ${JSON.stringify(unrolledBlock.uses)}`;
354360 }
355361
356- errors.push({
357- fatal: false,
358- message: msg,
359- });
360-
361362 console.error(
362363 `Failed to unroll block ${JSON.stringify(unrolledBlock.uses)}: ${(err as Error).message}`,
363364 );
364- sectionBlocks.push(null);
365+
366+ return {
367+ index,
368+ block: null,
369+ error: {
370+ fatal: false,
371+ message: msg,
372+ },
373+ };
365374 }
366375 } else {
367376 // Normal block
368- sectionBlocks.push(unrolledBlock);
377+ return { index, block: unrolledBlock, error: null };
369378 }
370- }
379+ },
380+ );
381+
382+ const blockResults = await Promise.all(blockPromises);
383+
384+ // Collect errors and maintain order
385+ const sectionBlocks: any[] = [];
386+ const sectionErrors: ConfigValidationError[] = [];
371387
372- unrolledAssistant[section] = sectionBlocks;
388+ for (const result of blockResults) {
389+ if (result.error) {
390+ sectionErrors.push(result.error);
391+ }
392+ sectionBlocks[result.index] = result.block;
373393 }
374- }
375394
376- // Rules are a bit different because they can be strings, so handle separately
377- if (assistant.rules) {
378- const rules: (Rule | null)[] = [];
379- for (const rule of assistant.rules) {
380- if (typeof rule === "string" || !("uses" in rule)) {
381- rules.push(rule);
382- } else if ("uses" in rule) {
383- try {
384- const blockConfigYaml = await resolveBlock(
385- decodePackageIdentifier(rule.uses),
386- rule.with,
387- registry,
388- );
389- const block = blockConfigYaml.rules?.[0];
390- if (block) {
391- rules.push(block);
395+ return { section, blocks: sectionBlocks, errors: sectionErrors };
396+ });
397+
398+ // Process rules in parallel
399+ const rulesPromise = assistant.rules
400+ ? (async () => {
401+ const rulePromises = assistant.rules!.map(async (rule, index) => {
402+ if (typeof rule === "string" || !("uses" in rule)) {
403+ return { index, rule, error: null };
404+ } else if ("uses" in rule) {
405+ try {
406+ const blockConfigYaml = await resolveBlock(
407+ decodePackageIdentifier(rule.uses),
408+ rule.with,
409+ registry,
410+ );
411+ const block = blockConfigYaml.rules?.[0];
412+ return { index, rule: block || null, error: null };
413+ } catch (err) {
414+ console.error(
415+ `Failed to unroll block ${rule.uses}: ${(err as Error).message}`,
416+ );
417+
418+ return {
419+ index,
420+ rule: null,
421+ error: {
422+ fatal: false,
423+ message: `${(err as Error).message}:\n${rule.uses}`,
424+ },
425+ };
426+ }
427+ }
428+ return { index, rule: null, error: null };
429+ });
430+
431+ const ruleResults = await Promise.all(rulePromises);
432+
433+ const rules: (Rule | null)[] = [];
434+ const ruleErrors: ConfigValidationError[] = [];
435+
436+ for (const result of ruleResults) {
437+ if (result.error) {
438+ ruleErrors.push(result.error);
392439 }
393- } catch (err) {
394- errors.push({
395- fatal: false,
396- message: `${(err as Error).message}:\n${rule.uses}`,
397- });
398-
399- console.error(
400- `Failed to unroll block ${rule.uses}: ${(err as Error).message}`,
401- );
402- rules.push(null);
440+ rules[result.index] = result.rule;
403441 }
404- }
442+
443+ return { rules, errors: ruleErrors };
444+ })()
445+ : Promise.resolve({ rules: undefined, errors: [] });
446+
447+ // Process injected blocks in parallel
448+ const injectedBlocksPromise = injectBlocks
449+ ? (async () => {
450+ const injectedBlockPromises = injectBlocks.map(async (injectBlock) => {
451+ try {
452+ const blockConfigYaml = await registry.getContent(injectBlock);
453+ const parsedBlock = parseMarkdownRuleOrConfigYaml(
454+ blockConfigYaml,
455+ injectBlock,
456+ );
457+ const blockType = getBlockType(parsedBlock);
458+ const resolvedBlock = await resolveBlock(
459+ injectBlock,
460+ undefined,
461+ registry,
462+ );
463+
464+ return {
465+ blockType,
466+ resolvedBlock,
467+ error: null,
468+ };
469+ } catch (err) {
470+ let msg = "";
471+ if (injectBlock.uriType === "file") {
472+ msg = `${(err as Error).message}.\n> ${injectBlock.filePath}`;
473+ } else {
474+ msg = `${(err as Error).message}.\n> ${injectBlock.fullSlug}`;
475+ }
476+
477+ console.error(
478+ `Failed to unroll block ${JSON.stringify(injectBlock)}: ${(err as Error).message}`,
479+ );
480+
481+ return {
482+ blockType: null,
483+ resolvedBlock: null,
484+ error: {
485+ fatal: false,
486+ message: msg,
487+ },
488+ };
489+ }
490+ });
491+
492+ const injectedResults = await Promise.all(injectedBlockPromises);
493+ const injectedErrors: ConfigValidationError[] = [];
494+ const injectedBlocks: { blockType: string; resolvedBlock: any }[] = [];
495+
496+ for (const result of injectedResults) {
497+ if (result.error) {
498+ injectedErrors.push(result.error);
499+ } else if (result.blockType && result.resolvedBlock) {
500+ injectedBlocks.push({
501+ blockType: result.blockType,
502+ resolvedBlock: result.resolvedBlock,
503+ });
504+ }
505+ }
506+
507+ return { injectedBlocks, errors: injectedErrors };
508+ })()
509+ : Promise.resolve({ injectedBlocks: [], errors: [] });
510+
511+ // Wait for all parallel operations to complete
512+ const [sectionResults, rulesResult, injectedResult] = await Promise.all([
513+ Promise.all(sectionPromises),
514+ rulesPromise,
515+ injectedBlocksPromise,
516+ ]);
517+
518+ // Collect all errors
519+ for (const sectionResult of sectionResults) {
520+ if (sectionResult.errors) {
521+ errors.push(...sectionResult.errors);
405522 }
523+ }
524+ errors.push(...rulesResult.errors);
525+ errors.push(...injectedResult.errors);
526+
527+ // Assign section results
528+ for (const sectionResult of sectionResults) {
529+ if (sectionResult.blocks) {
530+ unrolledAssistant[sectionResult.section] = sectionResult.blocks;
531+ }
532+ }
406533
407- unrolledAssistant.rules = rules;
534+ // Assign rules result
535+ if (rulesResult.rules) {
536+ unrolledAssistant.rules = rulesResult.rules;
408537 }
409538
410539 // Add injected blocks
411- for (const injectBlock of injectBlocks ?? []) {
412- try {
413- const blockConfigYaml = await registry.getContent(injectBlock);
414- const parsedBlock = parseMarkdownRuleOrConfigYaml(
415- blockConfigYaml,
416- injectBlock,
417- );
418- const blockType = getBlockType(parsedBlock);
419- const resolvedBlock = await resolveBlock(
420- injectBlock,
421- undefined,
422- registry,
423- );
424-
425- if (blockType) {
426- if (!unrolledAssistant[blockType]) {
427- unrolledAssistant[blockType] = [];
428- }
429- unrolledAssistant[blockType]?.push(
430- ...(resolvedBlock[blockType] as any),
431- );
432- }
433- } catch (err) {
434- let msg = "";
435- if (injectBlock.uriType === "file") {
436- msg = `${(err as Error).message}.\n> ${injectBlock.filePath}`;
437- } else {
438- msg = `${(err as Error).message}.\n> ${injectBlock.fullSlug}`;
439- }
440- errors.push({
441- fatal: false,
442- message: msg,
443- });
444-
445- console.error(
446- `Failed to unroll block ${JSON.stringify(injectBlock)}: ${(err as Error).message}`,
447- );
540+ for (const { blockType, resolvedBlock } of injectedResult.injectedBlocks) {
541+ const key = blockType as BlockType;
542+ if (!unrolledAssistant[key]) {
543+ unrolledAssistant[key] = [];
448544 }
545+ unrolledAssistant[key]?.push(...((resolvedBlock[blockType] ?? []) as any));
449546 }
450547
451548 const configResult: ConfigResult<AssistantUnrolled> = {
modified packages/config-yaml/src/schemas/data/autocomplete/index.ts +1 −1
@@ -34,7 +34,7 @@
3434 gitRepo: z.string().optional(),
3535 completionId: z.string(),
3636 uniqueId: z.string(),
37- timestamp: z.number(),
37+ timestamp: z.string(),
3838
3939 // For static contextualization.
4040 enabledStaticContextualization: z.boolean().optional(),
modified packages/config-yaml/src/schemas/data/chatInteraction/index.ts +8 −0
@@ -8,4 +8,12 @@
88 completion: z.string(),
99 sessionId: z.string(),
1010 tools: z.array(z.string()).optional(),
11+ rules: z
12+ .array(
13+ z.object({
14+ id: z.string(),
15+ rule: z.string(),
16+ }),
17+ )
18+ .optional(),
1119 });
modified packages/config-yaml/src/schemas/data/chatInteraction/v0.2.0.ts +1 −0
@@ -17,6 +17,7 @@
1717 modelProvider: true,
1818 sessionId: true,
1919 tools: true,
20+ rules: true,
2021 });
2122
2223 export const chatInteractionEventSchema_0_2_0_noCode =
modified packages/config-yaml/src/schemas/data/editOutcome/v0.2.0.ts +7 −0
@@ -15,10 +15,17 @@
1515 modelTitle: true,
1616 modelProvider: true,
1717 accepted: true,
18+ previousCode: true,
19+ newCode: true,
20+ previousCodeLines: true,
21+ newCodeLines: true,
22+ lineChange: true,
1823 });
1924
2025 export const editOutcomeEventSchema_0_2_0_noCode =
2126 editOutcomeEventSchema_0_2_0.omit({
2227 prompt: true,
2328 completion: true,
29+ previousCode: true,
30+ newCode: true,
2431 });
modified packages/config-yaml/src/schemas/index.ts +1 −0
@@ -22,6 +22,7 @@
2222 faviconUrl: z.string().optional(),
2323 args: z.array(z.string()).optional(),
2424 env: z.record(z.string()).optional(),
25+ cwd: z.string().optional(),
2526 connectionTimeout: z.number().gt(0).optional(),
2627 requestOptions: requestOptionsSchema.optional(),
2728 });
modified packages/config-yaml/src/schemas/models.ts +5 −2
@@ -85,6 +85,7 @@
8585 export const chatOptionsSchema = z.object({
8686 baseSystemMessage: z.string().optional(),
8787 baseAgentSystemMessage: z.string().optional(),
88+ basePlanSystemMessage: z.string().optional(),
8889 });
8990 export type ChatOptions = z.infer<typeof chatOptionsSchema>;
9091
@@ -154,7 +155,8 @@
154155 z.object({
155156 ...baseModelFields,
156157 provider: z.literal("continue-proxy"),
157- apiKeyLocation: z.string(),
158+ apiKeyLocation: z.string().optional(),
159+ envSecretLocations: z.record(z.string(), z.string()).optional(),
158160 orgScopeId: z.string().nullable(),
159161 onPremProxyUrl: z.string().nullable(),
160162 }),
@@ -169,7 +171,8 @@
169171 .object({
170172 ...baseModelFields,
171173 provider: z.literal("continue-proxy"),
172- apiKeyLocation: z.string(),
174+ apiKeyLocation: z.string().optional(),
175+ envSecretLocations: z.record(z.string(), z.string()).optional(),
173176 })
174177 .partial(),
175178 z
modified packages/continue-sdk/typescript/src/createOpenAIClient.ts +3 −2
@@ -71,14 +71,15 @@
7171 );
7272 }
7373
74- if (!("apiKeyLocation" in modelConfig)) {
74+ if (!("apiKeyLocation" in modelConfig) && !("envSecretLocations" in modelConfig)) {
7575 throw new Error(
76- `Model ${modelName} does not have an apiKeyLocation defined`,
76+ `Model ${modelName} does not have an apiKeyLocation or envSecretLocations defined`,
7777 );
7878 }
7979
8080 const continueProperties: ContinueProperties = {
8181 apiKeyLocation: modelConfig.apiKeyLocation,
82+ envSecretLocations: modelConfig.envSecretLocations,
8283 orgScopeId: organizationId ?? null,
8384 };
8485
modified packages/openai-adapters/package-lock.json +1718 −193
@@ -9,6 +9,8 @@
99 "version": "1.0.44",
1010 "license": "Apache-2.0",
1111 "dependencies": {
12+ "@aws-sdk/client-bedrock-runtime": "^3.842.0",
13+ "@aws-sdk/credential-providers": "^3.840.0",
1214 "@continuedev/config-types": "^1.0.5",
1315 "@continuedev/config-yaml": "^1.0.51",
1416 "@continuedev/fetch": "^1.0.15",
@@ -42,6 +44,827 @@
4244 "node": ">=6.0.0"
4345 }
4446 },
47+ "node_modules/@aws-crypto/crc32": {
48+ "version": "5.2.0",
49+ "resolved": "https://registry.npmjs.org/@aws-crypto/crc32/-/crc32-5.2.0.tgz",
50+ "integrity": "sha512-nLbCWqQNgUiwwtFsen1AdzAtvuLRsQS8rYgMuxCrdKf9kOssamGLuPwyTY9wyYblNr9+1XM8v6zoDTPPSIeANg==",
51+ "license": "Apache-2.0",
52+ "dependencies": {
53+ "@aws-crypto/util": "^5.2.0",
54+ "@aws-sdk/types": "^3.222.0",
55+ "tslib": "^2.6.2"
56+ },
57+ "engines": {
58+ "node": ">=16.0.0"
59+ }
60+ },
61+ "node_modules/@aws-crypto/sha256-browser": {
62+ "version": "5.2.0",
63+ "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-browser/-/sha256-browser-5.2.0.tgz",
64+ "integrity": "sha512-AXfN/lGotSQwu6HNcEsIASo7kWXZ5HYWvfOmSNKDsEqC4OashTp8alTmaz+F7TC2L083SFv5RdB+qU3Vs1kZqw==",
65+ "license": "Apache-2.0",
66+ "dependencies": {
67+ "@aws-crypto/sha256-js": "^5.2.0",
68+ "@aws-crypto/supports-web-crypto": "^5.2.0",
69+ "@aws-crypto/util": "^5.2.0",
70+ "@aws-sdk/types": "^3.222.0",
71+ "@aws-sdk/util-locate-window": "^3.0.0",
72+ "@smithy/util-utf8": "^2.0.0",
73+ "tslib": "^2.6.2"
74+ }
75+ },
76+ "node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/is-array-buffer": {
77+ "version": "2.2.0",
78+ "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz",
79+ "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==",
80+ "license": "Apache-2.0",
81+ "dependencies": {
82+ "tslib": "^2.6.2"
83+ },
84+ "engines": {
85+ "node": ">=14.0.0"
86+ }
87+ },
88+ "node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/util-buffer-from": {
89+ "version": "2.2.0",
90+ "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz",
91+ "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==",
92+ "license": "Apache-2.0",
93+ "dependencies": {
94+ "@smithy/is-array-buffer": "^2.2.0",
95+ "tslib": "^2.6.2"
96+ },
97+ "engines": {
98+ "node": ">=14.0.0"
99+ }
100+ },
101+ "node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/util-utf8": {
102+ "version": "2.3.0",
103+ "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz",
104+ "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==",
105+ "license": "Apache-2.0",
106+ "dependencies": {
107+ "@smithy/util-buffer-from": "^2.2.0",
108+ "tslib": "^2.6.2"
109+ },
110+ "engines": {
111+ "node": ">=14.0.0"
112+ }
113+ },
114+ "node_modules/@aws-crypto/sha256-js": {
115+ "version": "5.2.0",
116+ "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-5.2.0.tgz",
117+ "integrity": "sha512-FFQQyu7edu4ufvIZ+OadFpHHOt+eSTBaYaki44c+akjg7qZg9oOQeLlk77F6tSYqjDAFClrHJk9tMf0HdVyOvA==",
118+ "license": "Apache-2.0",
119+ "dependencies": {
120+ "@aws-crypto/util": "^5.2.0",
121+ "@aws-sdk/types": "^3.222.0",
122+ "tslib": "^2.6.2"
123+ },
124+ "engines": {
125+ "node": ">=16.0.0"
126+ }
127+ },
128+ "node_modules/@aws-crypto/supports-web-crypto": {
129+ "version": "5.2.0",
130+ "resolved": "https://registry.npmjs.org/@aws-crypto/supports-web-crypto/-/supports-web-crypto-5.2.0.tgz",
131+ "integrity": "sha512-iAvUotm021kM33eCdNfwIN//F77/IADDSs58i+MDaOqFrVjZo9bAal0NK7HurRuWLLpF1iLX7gbWrjHjeo+YFg==",
132+ "license": "Apache-2.0",
133+ "dependencies": {
134+ "tslib": "^2.6.2"
135+ }
136+ },
137+ "node_modules/@aws-crypto/util": {
138+ "version": "5.2.0",
139+ "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-5.2.0.tgz",
140+ "integrity": "sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ==",
141+ "license": "Apache-2.0",
142+ "dependencies": {
143+ "@aws-sdk/types": "^3.222.0",
144+ "@smithy/util-utf8": "^2.0.0",
145+ "tslib": "^2.6.2"
146+ }
147+ },
148+ "node_modules/@aws-crypto/util/node_modules/@smithy/is-array-buffer": {
149+ "version": "2.2.0",
150+ "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz",
151+ "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==",
152+ "license": "Apache-2.0",
153+ "dependencies": {
154+ "tslib": "^2.6.2"
155+ },
156+ "engines": {
157+ "node": ">=14.0.0"
158+ }
159+ },
160+ "node_modules/@aws-crypto/util/node_modules/@smithy/util-buffer-from": {
161+ "version": "2.2.0",
162+ "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz",
163+ "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==",
164+ "license": "Apache-2.0",
165+ "dependencies": {
166+ "@smithy/is-array-buffer": "^2.2.0",
167+ "tslib": "^2.6.2"
168+ },
169+ "engines": {
170+ "node": ">=14.0.0"
171+ }
172+ },
173+ "node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8": {
174+ "version": "2.3.0",
175+ "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz",
176+ "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==",
177+ "license": "Apache-2.0",
178+ "dependencies": {
179+ "@smithy/util-buffer-from": "^2.2.0",
180+ "tslib": "^2.6.2"
181+ },
182+ "engines": {
183+ "node": ">=14.0.0"
184+ }
185+ },
186+ "node_modules/@aws-sdk/client-bedrock-runtime": {
187+ "version": "3.842.0",
188+ "resolved": "https://registry.npmjs.org/@aws-sdk/client-bedrock-runtime/-/client-bedrock-runtime-3.842.0.tgz",
189+ "integrity": "sha512-CrGuU9YGqYZPm2hjjqJYC5+HMjky/HuvlUmboFDdpH96mwm/RrUQAO6sXYojeUPy9ceidUiHd3HskqvpiMTl2Q==",
190+ "license": "Apache-2.0",
191+ "dependencies": {
192+ "@aws-crypto/sha256-browser": "5.2.0",
193+ "@aws-crypto/sha256-js": "5.2.0",
194+ "@aws-sdk/core": "3.840.0",
195+ "@aws-sdk/credential-provider-node": "3.840.0",
196+ "@aws-sdk/eventstream-handler-node": "3.840.0",
197+ "@aws-sdk/middleware-eventstream": "3.840.0",
198+ "@aws-sdk/middleware-host-header": "3.840.0",
199+ "@aws-sdk/middleware-logger": "3.840.0",
200+ "@aws-sdk/middleware-recursion-detection": "3.840.0",
201+ "@aws-sdk/middleware-user-agent": "3.840.0",
202+ "@aws-sdk/middleware-websocket": "3.840.0",
203+ "@aws-sdk/region-config-resolver": "3.840.0",
204+ "@aws-sdk/token-providers": "3.840.0",
205+ "@aws-sdk/types": "3.840.0",
206+ "@aws-sdk/util-endpoints": "3.840.0",
207+ "@aws-sdk/util-user-agent-browser": "3.840.0",
208+ "@aws-sdk/util-user-agent-node": "3.840.0",
209+ "@smithy/config-resolver": "^4.1.4",
210+ "@smithy/core": "^3.6.0",
211+ "@smithy/eventstream-serde-browser": "^4.0.4",
212+ "@smithy/eventstream-serde-config-resolver": "^4.1.2",
213+ "@smithy/eventstream-serde-node": "^4.0.4",
214+ "@smithy/fetch-http-handler": "^5.0.4",
215+ "@smithy/hash-node": "^4.0.4",
216+ "@smithy/invalid-dependency": "^4.0.4",
217+ "@smithy/middleware-content-length": "^4.0.4",
218+ "@smithy/middleware-endpoint": "^4.1.13",
219+ "@smithy/middleware-retry": "^4.1.14",
220+ "@smithy/middleware-serde": "^4.0.8",
221+ "@smithy/middleware-stack": "^4.0.4",
222+ "@smithy/node-config-provider": "^4.1.3",
223+ "@smithy/node-http-handler": "^4.0.6",
224+ "@smithy/protocol-http": "^5.1.2",
225+ "@smithy/smithy-client": "^4.4.5",
226+ "@smithy/types": "^4.3.1",
227+ "@smithy/url-parser": "^4.0.4",
228+ "@smithy/util-base64": "^4.0.0",
229+ "@smithy/util-body-length-browser": "^4.0.0",
230+ "@smithy/util-body-length-node": "^4.0.0",
231+ "@smithy/util-defaults-mode-browser": "^4.0.21",
232+ "@smithy/util-defaults-mode-node": "^4.0.21",
233+ "@smithy/util-endpoints": "^3.0.6",
234+ "@smithy/util-middleware": "^4.0.4",
235+ "@smithy/util-retry": "^4.0.6",
236+ "@smithy/util-stream": "^4.2.2",
237+ "@smithy/util-utf8": "^4.0.0",
238+ "@types/uuid": "^9.0.1",
239+ "tslib": "^2.6.2",
240+ "uuid": "^9.0.1"
241+ },
242+ "engines": {
243+ "node": ">=18.0.0"
244+ }
245+ },
246+ "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/uuid": {
247+ "version": "9.0.1",
248+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz",
249+ "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==",
250+ "funding": [
251+ "https://github.com/sponsors/broofa",
252+ "https://github.com/sponsors/ctavan"
253+ ],
254+ "license": "MIT",
255+ "bin": {
256+ "uuid": "dist/bin/uuid"
257+ }
258+ },
259+ "node_modules/@aws-sdk/client-cognito-identity": {
260+ "version": "3.840.0",
261+ "resolved": "https://registry.npmjs.org/@aws-sdk/client-cognito-identity/-/client-cognito-identity-3.840.0.tgz",
262+ "integrity": "sha512-0sn/X63Xqqh5D1FYmdSHiS9SkDzTitoGO++/8IFik4xf/jpn4ZQkIoDPvpxFZcLvebMuUa6jAQs4ap4RusKGkg==",
263+ "license": "Apache-2.0",
264+ "dependencies": {
265+ "@aws-crypto/sha256-browser": "5.2.0",
266+ "@aws-crypto/sha256-js": "5.2.0",
267+ "@aws-sdk/core": "3.840.0",
268+ "@aws-sdk/credential-provider-node": "3.840.0",
269+ "@aws-sdk/middleware-host-header": "3.840.0",
270+ "@aws-sdk/middleware-logger": "3.840.0",
271+ "@aws-sdk/middleware-recursion-detection": "3.840.0",
272+ "@aws-sdk/middleware-user-agent": "3.840.0",
273+ "@aws-sdk/region-config-resolver": "3.840.0",
274+ "@aws-sdk/types": "3.840.0",
275+ "@aws-sdk/util-endpoints": "3.840.0",
276+ "@aws-sdk/util-user-agent-browser": "3.840.0",
277+ "@aws-sdk/util-user-agent-node": "3.840.0",
278+ "@smithy/config-resolver": "^4.1.4",
279+ "@smithy/core": "^3.6.0",
280+ "@smithy/fetch-http-handler": "^5.0.4",
281+ "@smithy/hash-node": "^4.0.4",
282+ "@smithy/invalid-dependency": "^4.0.4",
283+ "@smithy/middleware-content-length": "^4.0.4",
284+ "@smithy/middleware-endpoint": "^4.1.13",
285+ "@smithy/middleware-retry": "^4.1.14",
286+ "@smithy/middleware-serde": "^4.0.8",
287+ "@smithy/middleware-stack": "^4.0.4",
288+ "@smithy/node-config-provider": "^4.1.3",
289+ "@smithy/node-http-handler": "^4.0.6",
290+ "@smithy/protocol-http": "^5.1.2",
291+ "@smithy/smithy-client": "^4.4.5",
292+ "@smithy/types": "^4.3.1",
293+ "@smithy/url-parser": "^4.0.4",
294+ "@smithy/util-base64": "^4.0.0",
295+ "@smithy/util-body-length-browser": "^4.0.0",
296+ "@smithy/util-body-length-node": "^4.0.0",
297+ "@smithy/util-defaults-mode-browser": "^4.0.21",
298+ "@smithy/util-defaults-mode-node": "^4.0.21",
299+ "@smithy/util-endpoints": "^3.0.6",
300+ "@smithy/util-middleware": "^4.0.4",
301+ "@smithy/util-retry": "^4.0.6",
302+ "@smithy/util-utf8": "^4.0.0",
303+ "tslib": "^2.6.2"
304+ },
305+ "engines": {
306+ "node": ">=18.0.0"
307+ }
308+ },
309+ "node_modules/@aws-sdk/client-sso": {
310+ "version": "3.840.0",
311+ "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.840.0.tgz",
312+ "integrity": "sha512-3Zp+FWN2hhmKdpS0Ragi5V2ZPsZNScE3jlbgoJjzjI/roHZqO+e3/+XFN4TlM0DsPKYJNp+1TAjmhxN6rOnfYA==",
313+ "license": "Apache-2.0",
314+ "dependencies": {
315+ "@aws-crypto/sha256-browser": "5.2.0",
316+ "@aws-crypto/sha256-js": "5.2.0",
317+ "@aws-sdk/core": "3.840.0",
318+ "@aws-sdk/middleware-host-header": "3.840.0",
319+ "@aws-sdk/middleware-logger": "3.840.0",
320+ "@aws-sdk/middleware-recursion-detection": "3.840.0",
321+ "@aws-sdk/middleware-user-agent": "3.840.0",
322+ "@aws-sdk/region-config-resolver": "3.840.0",
323+ "@aws-sdk/types": "3.840.0",
324+ "@aws-sdk/util-endpoints": "3.840.0",
325+ "@aws-sdk/util-user-agent-browser": "3.840.0",
326+ "@aws-sdk/util-user-agent-node": "3.840.0",
327+ "@smithy/config-resolver": "^4.1.4",
328+ "@smithy/core": "^3.6.0",
329+ "@smithy/fetch-http-handler": "^5.0.4",
330+ "@smithy/hash-node": "^4.0.4",
331+ "@smithy/invalid-dependency": "^4.0.4",
332+ "@smithy/middleware-content-length": "^4.0.4",
333+ "@smithy/middleware-endpoint": "^4.1.13",
334+ "@smithy/middleware-retry": "^4.1.14",
335+ "@smithy/middleware-serde": "^4.0.8",
336+ "@smithy/middleware-stack": "^4.0.4",
337+ "@smithy/node-config-provider": "^4.1.3",
338+ "@smithy/node-http-handler": "^4.0.6",
339+ "@smithy/protocol-http": "^5.1.2",
340+ "@smithy/smithy-client": "^4.4.5",
341+ "@smithy/types": "^4.3.1",
342+ "@smithy/url-parser": "^4.0.4",
343+ "@smithy/util-base64": "^4.0.0",
344+ "@smithy/util-body-length-browser": "^4.0.0",
345+ "@smithy/util-body-length-node": "^4.0.0",
346+ "@smithy/util-defaults-mode-browser": "^4.0.21",
347+ "@smithy/util-defaults-mode-node": "^4.0.21",
348+ "@smithy/util-endpoints": "^3.0.6",
349+ "@smithy/util-middleware": "^4.0.4",
350+ "@smithy/util-retry": "^4.0.6",
351+ "@smithy/util-utf8": "^4.0.0",
352+ "tslib": "^2.6.2"
353+ },
354+ "engines": {
355+ "node": ">=18.0.0"
356+ }
357+ },
358+ "node_modules/@aws-sdk/core": {
359+ "version": "3.840.0",
360+ "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.840.0.tgz",
361+ "integrity": "sha512-x3Zgb39tF1h2XpU+yA4OAAQlW6LVEfXNlSedSYJ7HGKXqA/E9h3rWQVpYfhXXVVsLdYXdNw5KBUkoAoruoZSZA==",
362+ "license": "Apache-2.0",
363+ "dependencies": {
364+ "@aws-sdk/types": "3.840.0",
365+ "@aws-sdk/xml-builder": "3.821.0",
366+ "@smithy/core": "^3.6.0",
367+ "@smithy/node-config-provider": "^4.1.3",
368+ "@smithy/property-provider": "^4.0.4",
369+ "@smithy/protocol-http": "^5.1.2",
370+ "@smithy/signature-v4": "^5.1.2",
371+ "@smithy/smithy-client": "^4.4.5",
372+ "@smithy/types": "^4.3.1",
373+ "@smithy/util-base64": "^4.0.0",
374+ "@smithy/util-body-length-browser": "^4.0.0",
375+ "@smithy/util-middleware": "^4.0.4",
376+ "@smithy/util-utf8": "^4.0.0",
377+ "fast-xml-parser": "4.4.1",
378+ "tslib": "^2.6.2"
379+ },
380+ "engines": {
381+ "node": ">=18.0.0"
382+ }
383+ },
384+ "node_modules/@aws-sdk/credential-provider-cognito-identity": {
385+ "version": "3.840.0",
386+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-cognito-identity/-/credential-provider-cognito-identity-3.840.0.tgz",
387+ "integrity": "sha512-p1RaMVd6+6ruYjKsWRCZT/jWhrYfDKbXY+/ScIYTvcaOOf9ArMtVnhFk3egewrC7kPXFGRYhg2GPmxRotNYMng==",
388+ "license": "Apache-2.0",
389+ "dependencies": {
390+ "@aws-sdk/client-cognito-identity": "3.840.0",
391+ "@aws-sdk/types": "3.840.0",
392+ "@smithy/property-provider": "^4.0.4",
393+ "@smithy/types": "^4.3.1",
394+ "tslib": "^2.6.2"
395+ },
396+ "engines": {
397+ "node": ">=18.0.0"
398+ }
399+ },
400+ "node_modules/@aws-sdk/credential-provider-env": {
401+ "version": "3.840.0",
402+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.840.0.tgz",
403+ "integrity": "sha512-EzF6VcJK7XvQ/G15AVEfJzN2mNXU8fcVpXo4bRyr1S6t2q5zx6UPH/XjDbn18xyUmOq01t+r8gG+TmHEVo18fA==",
404+ "license": "Apache-2.0",
405+ "dependencies": {
406+ "@aws-sdk/core": "3.840.0",
407+ "@aws-sdk/types": "3.840.0",
408+ "@smithy/property-provider": "^4.0.4",
409+ "@smithy/types": "^4.3.1",
410+ "tslib": "^2.6.2"
411+ },
412+ "engines": {
413+ "node": ">=18.0.0"
414+ }
415+ },
416+ "node_modules/@aws-sdk/credential-provider-http": {
417+ "version": "3.840.0",
418+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.840.0.tgz",
419+ "integrity": "sha512-wbnUiPGLVea6mXbUh04fu+VJmGkQvmToPeTYdHE8eRZq3NRDi3t3WltT+jArLBKD/4NppRpMjf2ju4coMCz91g==",
420+ "license": "Apache-2.0",
421+ "dependencies": {
422+ "@aws-sdk/core": "3.840.0",
423+ "@aws-sdk/types": "3.840.0",
424+ "@smithy/fetch-http-handler": "^5.0.4",
425+ "@smithy/node-http-handler": "^4.0.6",
426+ "@smithy/property-provider": "^4.0.4",
427+ "@smithy/protocol-http": "^5.1.2",
428+ "@smithy/smithy-client": "^4.4.5",
429+ "@smithy/types": "^4.3.1",
430+ "@smithy/util-stream": "^4.2.2",
431+ "tslib": "^2.6.2"
432+ },
433+ "engines": {
434+ "node": ">=18.0.0"
435+ }
436+ },
437+ "node_modules/@aws-sdk/credential-provider-ini": {
438+ "version": "3.840.0",
439+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.840.0.tgz",
440+ "integrity": "sha512-7F290BsWydShHb+7InXd+IjJc3mlEIm9I0R57F/Pjl1xZB69MdkhVGCnuETWoBt4g53ktJd6NEjzm/iAhFXFmw==",
441+ "license": "Apache-2.0",
442+ "dependencies": {
443+ "@aws-sdk/core": "3.840.0",
444+ "@aws-sdk/credential-provider-env": "3.840.0",
445+ "@aws-sdk/credential-provider-http": "3.840.0",
446+ "@aws-sdk/credential-provider-process": "3.840.0",
447+ "@aws-sdk/credential-provider-sso": "3.840.0",
448+ "@aws-sdk/credential-provider-web-identity": "3.840.0",
449+ "@aws-sdk/nested-clients": "3.840.0",
450+ "@aws-sdk/types": "3.840.0",
451+ "@smithy/credential-provider-imds": "^4.0.6",
452+ "@smithy/property-provider": "^4.0.4",
453+ "@smithy/shared-ini-file-loader": "^4.0.4",
454+ "@smithy/types": "^4.3.1",
455+ "tslib": "^2.6.2"
456+ },
457+ "engines": {
458+ "node": ">=18.0.0"
459+ }
460+ },
461+ "node_modules/@aws-sdk/credential-provider-node": {
462+ "version": "3.840.0",
463+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.840.0.tgz",
464+ "integrity": "sha512-KufP8JnxA31wxklLm63evUPSFApGcH8X86z3mv9SRbpCm5ycgWIGVCTXpTOdgq6rPZrwT9pftzv2/b4mV/9clg==",
465+ "license": "Apache-2.0",
466+ "dependencies": {
467+ "@aws-sdk/credential-provider-env": "3.840.0",
468+ "@aws-sdk/credential-provider-http": "3.840.0",
469+ "@aws-sdk/credential-provider-ini": "3.840.0",
470+ "@aws-sdk/credential-provider-process": "3.840.0",
471+ "@aws-sdk/credential-provider-sso": "3.840.0",
472+ "@aws-sdk/credential-provider-web-identity": "3.840.0",
473+ "@aws-sdk/types": "3.840.0",
474+ "@smithy/credential-provider-imds": "^4.0.6",
475+ "@smithy/property-provider": "^4.0.4",
476+ "@smithy/shared-ini-file-loader": "^4.0.4",
477+ "@smithy/types": "^4.3.1",
478+ "tslib": "^2.6.2"
479+ },
480+ "engines": {
481+ "node": ">=18.0.0"
482+ }
483+ },
484+ "node_modules/@aws-sdk/credential-provider-process": {
485+ "version": "3.840.0",
486+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.840.0.tgz",
487+ "integrity": "sha512-HkDQWHy8tCI4A0Ps2NVtuVYMv9cB4y/IuD/TdOsqeRIAT12h8jDb98BwQPNLAImAOwOWzZJ8Cu0xtSpX7CQhMw==",
488+ "license": "Apache-2.0",
489+ "dependencies": {
490+ "@aws-sdk/core": "3.840.0",
491+ "@aws-sdk/types": "3.840.0",
492+ "@smithy/property-provider": "^4.0.4",
493+ "@smithy/shared-ini-file-loader": "^4.0.4",
494+ "@smithy/types": "^4.3.1",
495+ "tslib": "^2.6.2"
496+ },
497+ "engines": {
498+ "node": ">=18.0.0"
499+ }
500+ },
501+ "node_modules/@aws-sdk/credential-provider-sso": {
502+ "version": "3.840.0",
503+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.840.0.tgz",
504+ "integrity": "sha512-2qgdtdd6R0Z1y0KL8gzzwFUGmhBHSUx4zy85L2XV1CXhpRNwV71SVWJqLDVV5RVWVf9mg50Pm3AWrUC0xb0pcA==",
505+ "license": "Apache-2.0",
506+ "dependencies": {
507+ "@aws-sdk/client-sso": "3.840.0",
508+ "@aws-sdk/core": "3.840.0",
509+ "@aws-sdk/token-providers": "3.840.0",
510+ "@aws-sdk/types": "3.840.0",
511+ "@smithy/property-provider": "^4.0.4",
512+ "@smithy/shared-ini-file-loader": "^4.0.4",
513+ "@smithy/types": "^4.3.1",
514+ "tslib": "^2.6.2"
515+ },
516+ "engines": {
517+ "node": ">=18.0.0"
518+ }
519+ },
520+ "node_modules/@aws-sdk/credential-provider-web-identity": {
521+ "version": "3.840.0",
522+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.840.0.tgz",
523+ "integrity": "sha512-dpEeVXG8uNZSmVXReE4WP0lwoioX2gstk4RnUgrdUE3YaPq8A+hJiVAyc3h+cjDeIqfbsQbZm9qFetKC2LF9dQ==",
524+ "license": "Apache-2.0",
525+ "dependencies": {
526+ "@aws-sdk/core": "3.840.0",
527+ "@aws-sdk/nested-clients": "3.840.0",
528+ "@aws-sdk/types": "3.840.0",
529+ "@smithy/property-provider": "^4.0.4",
530+ "@smithy/types": "^4.3.1",
531+ "tslib": "^2.6.2"
532+ },
533+ "engines": {
534+ "node": ">=18.0.0"
535+ }
536+ },
537+ "node_modules/@aws-sdk/credential-providers": {
538+ "version": "3.840.0",
539+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-providers/-/credential-providers-3.840.0.tgz",
540+ "integrity": "sha512-+CxYdGd+uM4NZ9VUvFTU1c/H61qhDB4q362k8xKU+bz24g//LDQ5Mpwksv8OUD1en44v4fUwgZ4SthPZMs+eFQ==",
541+ "license": "Apache-2.0",
542+ "dependencies": {
543+ "@aws-sdk/client-cognito-identity": "3.840.0",
544+ "@aws-sdk/core": "3.840.0",
545+ "@aws-sdk/credential-provider-cognito-identity": "3.840.0",
546+ "@aws-sdk/credential-provider-env": "3.840.0",
547+ "@aws-sdk/credential-provider-http": "3.840.0",
548+ "@aws-sdk/credential-provider-ini": "3.840.0",
549+ "@aws-sdk/credential-provider-node": "3.840.0",
550+ "@aws-sdk/credential-provider-process": "3.840.0",
551+ "@aws-sdk/credential-provider-sso": "3.840.0",
552+ "@aws-sdk/credential-provider-web-identity": "3.840.0",
553+ "@aws-sdk/nested-clients": "3.840.0",
554+ "@aws-sdk/types": "3.840.0",
555+ "@smithy/config-resolver": "^4.1.4",
556+ "@smithy/core": "^3.6.0",
557+ "@smithy/credential-provider-imds": "^4.0.6",
558+ "@smithy/node-config-provider": "^4.1.3",
559+ "@smithy/property-provider": "^4.0.4",
560+ "@smithy/types": "^4.3.1",
561+ "tslib": "^2.6.2"
562+ },
563+ "engines": {
564+ "node": ">=18.0.0"
565+ }
566+ },
567+ "node_modules/@aws-sdk/eventstream-handler-node": {
568+ "version": "3.840.0",
569+ "resolved": "https://registry.npmjs.org/@aws-sdk/eventstream-handler-node/-/eventstream-handler-node-3.840.0.tgz",
570+ "integrity": "sha512-m/zVrSSAEHq+6h4sy0JUEBScB1pGgs/1+iRVhfzfbnf+/gTr4ut2jRq4tDiNEX9pQ1oFVvw+ntPua5qfquQeRQ==",
571+ "license": "Apache-2.0",
572+ "dependencies": {
573+ "@aws-sdk/types": "3.840.0",
574+ "@smithy/eventstream-codec": "^4.0.4",
575+ "@smithy/types": "^4.3.1",
576+ "tslib": "^2.6.2"
577+ },
578+ "engines": {
579+ "node": ">=18.0.0"
580+ }
581+ },
582+ "node_modules/@aws-sdk/middleware-eventstream": {
583+ "version": "3.840.0",
584+ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-eventstream/-/middleware-eventstream-3.840.0.tgz",
585+ "integrity": "sha512-4khgf7AjJ4llh3aiNmZ+x4PGl4vkKNxRHn0xTgi6Iw1J3SChsF2mnNaLXK8hoXeydx756rw+JhqOuZH91i5l4w==",
586+ "license": "Apache-2.0",
587+ "dependencies": {
588+ "@aws-sdk/types": "3.840.0",
589+ "@smithy/protocol-http": "^5.1.2",
590+ "@smithy/types": "^4.3.1",
591+ "tslib": "^2.6.2"
592+ },
593+ "engines": {
594+ "node": ">=18.0.0"
595+ }
596+ },
597+ "node_modules/@aws-sdk/middleware-host-header": {
598+ "version": "3.840.0",
599+ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.840.0.tgz",
600+ "integrity": "sha512-ub+hXJAbAje94+Ya6c6eL7sYujoE8D4Bumu1NUI8TXjUhVVn0HzVWQjpRLshdLsUp1AW7XyeJaxyajRaJQ8+Xg==",
601+ "license": "Apache-2.0",
602+ "dependencies": {
603+ "@aws-sdk/types": "3.840.0",
604+ "@smithy/protocol-http": "^5.1.2",
605+ "@smithy/types": "^4.3.1",
606+ "tslib": "^2.6.2"
607+ },
608+ "engines": {
609+ "node": ">=18.0.0"
610+ }
611+ },
612+ "node_modules/@aws-sdk/middleware-logger": {
613+ "version": "3.840.0",
614+ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.840.0.tgz",
615+ "integrity": "sha512-lSV8FvjpdllpGaRspywss4CtXV8M7NNNH+2/j86vMH+YCOZ6fu2T/TyFd/tHwZ92vDfHctWkRbQxg0bagqwovA==",
616+ "license": "Apache-2.0",
617+ "dependencies": {
618+ "@aws-sdk/types": "3.840.0",
619+ "@smithy/types": "^4.3.1",
620+ "tslib": "^2.6.2"
621+ },
622+ "engines": {
623+ "node": ">=18.0.0"
624+ }
625+ },
626+ "node_modules/@aws-sdk/middleware-recursion-detection": {
627+ "version": "3.840.0",
628+ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.840.0.tgz",
629+ "integrity": "sha512-Gu7lGDyfddyhIkj1Z1JtrY5NHb5+x/CRiB87GjaSrKxkDaydtX2CU977JIABtt69l9wLbcGDIQ+W0uJ5xPof7g==",
630+ "license": "Apache-2.0",
631+ "dependencies": {
632+ "@aws-sdk/types": "3.840.0",
633+ "@smithy/protocol-http": "^5.1.2",
634+ "@smithy/types": "^4.3.1",
635+ "tslib": "^2.6.2"
636+ },
637+ "engines": {
638+ "node": ">=18.0.0"
639+ }
640+ },
641+ "node_modules/@aws-sdk/middleware-user-agent": {
642+ "version": "3.840.0",
643+ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.840.0.tgz",
644+ "integrity": "sha512-hiiMf7BP5ZkAFAvWRcK67Mw/g55ar7OCrvrynC92hunx/xhMkrgSLM0EXIZ1oTn3uql9kH/qqGF0nqsK6K555A==",
645+ "license": "Apache-2.0",
646+ "dependencies": {
647+ "@aws-sdk/core": "3.840.0",
648+ "@aws-sdk/types": "3.840.0",
649+ "@aws-sdk/util-endpoints": "3.840.0",
650+ "@smithy/core": "^3.6.0",
651+ "@smithy/protocol-http": "^5.1.2",
652+ "@smithy/types": "^4.3.1",
653+ "tslib": "^2.6.2"
654+ },
655+ "engines": {
656+ "node": ">=18.0.0"
657+ }
658+ },
659+ "node_modules/@aws-sdk/middleware-websocket": {
660+ "version": "3.840.0",
661+ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-websocket/-/middleware-websocket-3.840.0.tgz",
662+ "integrity": "sha512-v9jJD1zjKMUg8iEZlFP5TLY7+DdwKodLgkNtls34+LMRbW+7Bue+H3gPi1VML5sks2o/+PJ6fz58Wo3bXZ8XHA==",
663+ "license": "Apache-2.0",
664+ "dependencies": {
665+ "@aws-sdk/types": "3.840.0",
666+ "@aws-sdk/util-format-url": "3.840.0",
667+ "@smithy/eventstream-codec": "^4.0.4",
668+ "@smithy/eventstream-serde-browser": "^4.0.4",
669+ "@smithy/fetch-http-handler": "^5.0.4",
670+ "@smithy/protocol-http": "^5.1.2",
671+ "@smithy/signature-v4": "^5.1.2",
672+ "@smithy/types": "^4.3.1",
673+ "@smithy/util-hex-encoding": "^4.0.0",
674+ "tslib": "^2.6.2"
675+ },
676+ "engines": {
677+ "node": ">= 14.0.0"
678+ }
679+ },
680+ "node_modules/@aws-sdk/nested-clients": {
681+ "version": "3.840.0",
682+ "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.840.0.tgz",
683+ "integrity": "sha512-LXYYo9+n4hRqnRSIMXLBb+BLz+cEmjMtTudwK1BF6Bn2RfdDv29KuyeDRrPCS3TwKl7ZKmXUmE9n5UuHAPfBpA==",
684+ "license": "Apache-2.0",
685+ "dependencies": {
686+ "@aws-crypto/sha256-browser": "5.2.0",
687+ "@aws-crypto/sha256-js": "5.2.0",
688+ "@aws-sdk/core": "3.840.0",
689+ "@aws-sdk/middleware-host-header": "3.840.0",
690+ "@aws-sdk/middleware-logger": "3.840.0",
691+ "@aws-sdk/middleware-recursion-detection": "3.840.0",
692+ "@aws-sdk/middleware-user-agent": "3.840.0",
693+ "@aws-sdk/region-config-resolver": "3.840.0",
694+ "@aws-sdk/types": "3.840.0",
695+ "@aws-sdk/util-endpoints": "3.840.0",
696+ "@aws-sdk/util-user-agent-browser": "3.840.0",
697+ "@aws-sdk/util-user-agent-node": "3.840.0",
698+ "@smithy/config-resolver": "^4.1.4",
699+ "@smithy/core": "^3.6.0",
700+ "@smithy/fetch-http-handler": "^5.0.4",
701+ "@smithy/hash-node": "^4.0.4",
702+ "@smithy/invalid-dependency": "^4.0.4",
703+ "@smithy/middleware-content-length": "^4.0.4",
704+ "@smithy/middleware-endpoint": "^4.1.13",
705+ "@smithy/middleware-retry": "^4.1.14",
706+ "@smithy/middleware-serde": "^4.0.8",
707+ "@smithy/middleware-stack": "^4.0.4",
708+ "@smithy/node-config-provider": "^4.1.3",
709+ "@smithy/node-http-handler": "^4.0.6",
710+ "@smithy/protocol-http": "^5.1.2",
711+ "@smithy/smithy-client": "^4.4.5",
712+ "@smithy/types": "^4.3.1",
713+ "@smithy/url-parser": "^4.0.4",
714+ "@smithy/util-base64": "^4.0.0",
715+ "@smithy/util-body-length-browser": "^4.0.0",
716+ "@smithy/util-body-length-node": "^4.0.0",
717+ "@smithy/util-defaults-mode-browser": "^4.0.21",
718+ "@smithy/util-defaults-mode-node": "^4.0.21",
719+ "@smithy/util-endpoints": "^3.0.6",
720+ "@smithy/util-middleware": "^4.0.4",
721+ "@smithy/util-retry": "^4.0.6",
722+ "@smithy/util-utf8": "^4.0.0",
723+ "tslib": "^2.6.2"
724+ },
725+ "engines": {
726+ "node": ">=18.0.0"
727+ }
728+ },
729+ "node_modules/@aws-sdk/region-config-resolver": {
730+ "version": "3.840.0",
731+ "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.840.0.tgz",
732+ "integrity": "sha512-Qjnxd/yDv9KpIMWr90ZDPtRj0v75AqGC92Lm9+oHXZ8p1MjG5JE2CW0HL8JRgK9iKzgKBL7pPQRXI8FkvEVfrA==",
733+ "license": "Apache-2.0",
734+ "dependencies": {
735+ "@aws-sdk/types": "3.840.0",
736+ "@smithy/node-config-provider": "^4.1.3",
737+ "@smithy/types": "^4.3.1",
738+ "@smithy/util-config-provider": "^4.0.0",
739+ "@smithy/util-middleware": "^4.0.4",
740+ "tslib": "^2.6.2"
741+ },
742+ "engines": {
743+ "node": ">=18.0.0"
744+ }
745+ },
746+ "node_modules/@aws-sdk/token-providers": {
747+ "version": "3.840.0",
748+ "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.840.0.tgz",
749+ "integrity": "sha512-6BuTOLTXvmgwjK7ve7aTg9JaWFdM5UoMolLVPMyh3wTv9Ufalh8oklxYHUBIxsKkBGO2WiHXytveuxH6tAgTYg==",
750+ "license": "Apache-2.0",
751+ "dependencies": {
752+ "@aws-sdk/core": "3.840.0",
753+ "@aws-sdk/nested-clients": "3.840.0",
754+ "@aws-sdk/types": "3.840.0",
755+ "@smithy/property-provider": "^4.0.4",
756+ "@smithy/shared-ini-file-loader": "^4.0.4",
757+ "@smithy/types": "^4.3.1",
758+ "tslib": "^2.6.2"
759+ },
760+ "engines": {
761+ "node": ">=18.0.0"
762+ }
763+ },
764+ "node_modules/@aws-sdk/types": {
765+ "version": "3.840.0",
766+ "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.840.0.tgz",
767+ "integrity": "sha512-xliuHaUFZxEx1NSXeLLZ9Dyu6+EJVQKEoD+yM+zqUo3YDZ7medKJWY6fIOKiPX/N7XbLdBYwajb15Q7IL8KkeA==",
768+ "license": "Apache-2.0",
769+ "dependencies": {
770+ "@smithy/types": "^4.3.1",
771+ "tslib": "^2.6.2"
772+ },
773+ "engines": {
774+ "node": ">=18.0.0"
775+ }
776+ },
777+ "node_modules/@aws-sdk/util-endpoints": {
778+ "version": "3.840.0",
779+ "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.840.0.tgz",
780+ "integrity": "sha512-eqE9ROdg/Kk0rj3poutyRCFauPDXIf/WSvCqFiRDDVi6QOnCv/M0g2XW8/jSvkJlOyaXkNCptapIp6BeeFFGYw==",
781+ "license": "Apache-2.0",
782+ "dependencies": {
783+ "@aws-sdk/types": "3.840.0",
784+ "@smithy/types": "^4.3.1",
785+ "@smithy/util-endpoints": "^3.0.6",
786+ "tslib": "^2.6.2"
787+ },
788+ "engines": {
789+ "node": ">=18.0.0"
790+ }
791+ },
792+ "node_modules/@aws-sdk/util-format-url": {
793+ "version": "3.840.0",
794+ "resolved": "https://registry.npmjs.org/@aws-sdk/util-format-url/-/util-format-url-3.840.0.tgz",
795+ "integrity": "sha512-VB1PWyI1TQPiPvg4w7tgUGGQER1xxXPNUqfh3baxUSFi1Oh8wHrDnFywkxLm3NMmgDmnLnSZ5Q326qAoyqKLSg==",
796+ "license": "Apache-2.0",
797+ "dependencies": {
798+ "@aws-sdk/types": "3.840.0",
799+ "@smithy/querystring-builder": "^4.0.4",
800+ "@smithy/types": "^4.3.1",
801+ "tslib": "^2.6.2"
802+ },
803+ "engines": {
804+ "node": ">=18.0.0"
805+ }
806+ },
807+ "node_modules/@aws-sdk/util-locate-window": {
808+ "version": "3.804.0",
809+ "resolved": "https://registry.npmjs.org/@aws-sdk/util-locate-window/-/util-locate-window-3.804.0.tgz",
810+ "integrity": "sha512-zVoRfpmBVPodYlnMjgVjfGoEZagyRF5IPn3Uo6ZvOZp24chnW/FRstH7ESDHDDRga4z3V+ElUQHKpFDXWyBW5A==",
811+ "license": "Apache-2.0",
812+ "dependencies": {
813+ "tslib": "^2.6.2"
814+ },
815+ "engines": {
816+ "node": ">=18.0.0"
817+ }
818+ },
819+ "node_modules/@aws-sdk/util-user-agent-browser": {
820+ "version": "3.840.0",
821+ "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.840.0.tgz",
822+ "integrity": "sha512-JdyZM3EhhL4PqwFpttZu1afDpPJCCc3eyZOLi+srpX11LsGj6sThf47TYQN75HT1CarZ7cCdQHGzP2uy3/xHfQ==",
823+ "license": "Apache-2.0",
824+ "dependencies": {
825+ "@aws-sdk/types": "3.840.0",
826+ "@smithy/types": "^4.3.1",
827+ "bowser": "^2.11.0",
828+ "tslib": "^2.6.2"
829+ }
830+ },
831+ "node_modules/@aws-sdk/util-user-agent-node": {
832+ "version": "3.840.0",
833+ "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.840.0.tgz",
834+ "integrity": "sha512-Fy5JUEDQU1tPm2Yw/YqRYYc27W5+QD/J4mYvQvdWjUGZLB5q3eLFMGD35Uc28ZFoGMufPr4OCxK/bRfWROBRHQ==",
835+ "license": "Apache-2.0",
836+ "dependencies": {
837+ "@aws-sdk/middleware-user-agent": "3.840.0",
838+ "@aws-sdk/types": "3.840.0",
839+ "@smithy/node-config-provider": "^4.1.3",
840+ "@smithy/types": "^4.3.1",
841+ "tslib": "^2.6.2"
842+ },
843+ "engines": {
844+ "node": ">=18.0.0"
845+ },
846+ "peerDependencies": {
847+ "aws-crt": ">=1.0.0"
848+ },
849+ "peerDependenciesMeta": {
850+ "aws-crt": {
851+ "optional": true
852+ }
853+ }
854+ },
855+ "node_modules/@aws-sdk/xml-builder": {
856+ "version": "3.821.0",
857+ "resolved": "https://registry.npmjs.org/@aws-sdk/xml-builder/-/xml-builder-3.821.0.tgz",
858+ "integrity": "sha512-DIIotRnefVL6DiaHtO6/21DhJ4JZnnIwdNbpwiAhdt/AVbttcE4yw925gsjur0OGv5BTYXQXU3YnANBYnZjuQA==",
859+ "license": "Apache-2.0",
860+ "dependencies": {
861+ "@smithy/types": "^4.3.1",
862+ "tslib": "^2.6.2"
863+ },
864+ "engines": {
865+ "node": ">=18.0.0"
866+ }
867+ },
45868 "node_modules/@babel/code-frame": {
46869 "version": "7.24.7",
47870 "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz",
@@ -761,265 +1584,915 @@
7611584 "jest-get-type": "^29.6.3"
7621585 },
7631586 "engines": {
764- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
1587+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
1588+ }
1589+ },
1590+ "node_modules/@jest/fake-timers": {
1591+ "version": "29.7.0",
1592+ "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz",
1593+ "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==",
1594+ "dev": true,
1595+ "peer": true,
1596+ "dependencies": {
1597+ "@jest/types": "^29.6.3",
1598+ "@sinonjs/fake-timers": "^10.0.2",
1599+ "@types/node": "*",
1600+ "jest-message-util": "^29.7.0",
1601+ "jest-mock": "^29.7.0",
1602+ "jest-util": "^29.7.0"
1603+ },
1604+ "engines": {
1605+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
1606+ }
1607+ },
1608+ "node_modules/@jest/globals": {
1609+ "version": "29.7.0",
1610+ "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz",
1611+ "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==",
1612+ "dev": true,
1613+ "peer": true,
1614+ "dependencies": {
1615+ "@jest/environment": "^29.7.0",
1616+ "@jest/expect": "^29.7.0",
1617+ "@jest/types": "^29.6.3",
1618+ "jest-mock": "^29.7.0"
1619+ },
1620+ "engines": {
1621+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
1622+ }
1623+ },
1624+ "node_modules/@jest/reporters": {
1625+ "version": "29.7.0",
1626+ "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz",
1627+ "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==",
1628+ "dev": true,
1629+ "peer": true,
1630+ "dependencies": {
1631+ "@bcoe/v8-coverage": "^0.2.3",
1632+ "@jest/console": "^29.7.0",
1633+ "@jest/test-result": "^29.7.0",
1634+ "@jest/transform": "^29.7.0",
1635+ "@jest/types": "^29.6.3",
1636+ "@jridgewell/trace-mapping": "^0.3.18",
1637+ "@types/node": "*",
1638+ "chalk": "^4.0.0",
1639+ "collect-v8-coverage": "^1.0.0",
1640+ "exit": "^0.1.2",
1641+ "glob": "^7.1.3",
1642+ "graceful-fs": "^4.2.9",
1643+ "istanbul-lib-coverage": "^3.0.0",
1644+ "istanbul-lib-instrument": "^6.0.0",
1645+ "istanbul-lib-report": "^3.0.0",
1646+ "istanbul-lib-source-maps": "^4.0.0",
1647+ "istanbul-reports": "^3.1.3",
1648+ "jest-message-util": "^29.7.0",
1649+ "jest-util": "^29.7.0",
1650+ "jest-worker": "^29.7.0",
1651+ "slash": "^3.0.0",
1652+ "string-length": "^4.0.1",
1653+ "strip-ansi": "^6.0.0",
1654+ "v8-to-istanbul": "^9.0.1"
1655+ },
1656+ "engines": {
1657+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
1658+ },
1659+ "peerDependencies": {
1660+ "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0"
1661+ },
1662+ "peerDependenciesMeta": {
1663+ "node-notifier": {
1664+ "optional": true
1665+ }
1666+ }
1667+ },
1668+ "node_modules/@jest/schemas": {
1669+ "version": "29.6.3",
1670+ "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz",
1671+ "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==",
1672+ "dev": true,
1673+ "dependencies": {
1674+ "@sinclair/typebox": "^0.27.8"
1675+ },
1676+ "engines": {
1677+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
1678+ }
1679+ },
1680+ "node_modules/@jest/source-map": {
1681+ "version": "29.6.3",
1682+ "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz",
1683+ "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==",
1684+ "dev": true,
1685+ "peer": true,
1686+ "dependencies": {
1687+ "@jridgewell/trace-mapping": "^0.3.18",
1688+ "callsites": "^3.0.0",
1689+ "graceful-fs": "^4.2.9"
1690+ },
1691+ "engines": {
1692+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
1693+ }
1694+ },
1695+ "node_modules/@jest/test-result": {
1696+ "version": "29.7.0",
1697+ "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz",
1698+ "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==",
1699+ "dev": true,
1700+ "peer": true,
1701+ "dependencies": {
1702+ "@jest/console": "^29.7.0",
1703+ "@jest/types": "^29.6.3",
1704+ "@types/istanbul-lib-coverage": "^2.0.0",
1705+ "collect-v8-coverage": "^1.0.0"
1706+ },
1707+ "engines": {
1708+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
1709+ }
1710+ },
1711+ "node_modules/@jest/test-sequencer": {
1712+ "version": "29.7.0",
1713+ "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz",
1714+ "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==",
1715+ "dev": true,
1716+ "peer": true,
1717+ "dependencies": {
1718+ "@jest/test-result": "^29.7.0",
1719+ "graceful-fs": "^4.2.9",
1720+ "jest-haste-map": "^29.7.0",
1721+ "slash": "^3.0.0"
1722+ },
1723+ "engines": {
1724+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
1725+ }
1726+ },
1727+ "node_modules/@jest/transform": {
1728+ "version": "29.7.0",
1729+ "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz",
1730+ "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==",
1731+ "dev": true,
1732+ "peer": true,
1733+ "dependencies": {
1734+ "@babel/core": "^7.11.6",
1735+ "@jest/types": "^29.6.3",
1736+ "@jridgewell/trace-mapping": "^0.3.18",
1737+ "babel-plugin-istanbul": "^6.1.1",
1738+ "chalk": "^4.0.0",
1739+ "convert-source-map": "^2.0.0",
1740+ "fast-json-stable-stringify": "^2.1.0",
1741+ "graceful-fs": "^4.2.9",
1742+ "jest-haste-map": "^29.7.0",
1743+ "jest-regex-util": "^29.6.3",
1744+ "jest-util": "^29.7.0",
1745+ "micromatch": "^4.0.4",
1746+ "pirates": "^4.0.4",
1747+ "slash": "^3.0.0",
1748+ "write-file-atomic": "^4.0.2"
1749+ },
1750+ "engines": {
1751+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
1752+ }
1753+ },
1754+ "node_modules/@jest/types": {
1755+ "version": "29.6.3",
1756+ "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz",
1757+ "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==",
1758+ "dev": true,
1759+ "dependencies": {
1760+ "@jest/schemas": "^29.6.3",
1761+ "@types/istanbul-lib-coverage": "^2.0.0",
1762+ "@types/istanbul-reports": "^3.0.0",
1763+ "@types/node": "*",
1764+ "@types/yargs": "^17.0.8",
1765+ "chalk": "^4.0.0"
1766+ },
1767+ "engines": {
1768+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
1769+ }
1770+ },
1771+ "node_modules/@jridgewell/gen-mapping": {
1772+ "version": "0.3.5",
1773+ "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz",
1774+ "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==",
1775+ "dev": true,
1776+ "peer": true,
1777+ "dependencies": {
1778+ "@jridgewell/set-array": "^1.2.1",
1779+ "@jridgewell/sourcemap-codec": "^1.4.10",
1780+ "@jridgewell/trace-mapping": "^0.3.24"
1781+ },
1782+ "engines": {
1783+ "node": ">=6.0.0"
1784+ }
1785+ },
1786+ "node_modules/@jridgewell/resolve-uri": {
1787+ "version": "3.1.2",
1788+ "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",
1789+ "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==",
1790+ "dev": true,
1791+ "engines": {
1792+ "node": ">=6.0.0"
1793+ }
1794+ },
1795+ "node_modules/@jridgewell/set-array": {
1796+ "version": "1.2.1",
1797+ "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz",
1798+ "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==",
1799+ "dev": true,
1800+ "peer": true,
1801+ "engines": {
1802+ "node": ">=6.0.0"
1803+ }
1804+ },
1805+ "node_modules/@jridgewell/sourcemap-codec": {
1806+ "version": "1.5.0",
1807+ "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz",
1808+ "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==",
1809+ "dev": true
1810+ },
1811+ "node_modules/@jridgewell/trace-mapping": {
1812+ "version": "0.3.25",
1813+ "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz",
1814+ "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==",
1815+ "dev": true,
1816+ "peer": true,
1817+ "dependencies": {
1818+ "@jridgewell/resolve-uri": "^3.1.0",
1819+ "@jridgewell/sourcemap-codec": "^1.4.14"
1820+ }
1821+ },
1822+ "node_modules/@sinclair/typebox": {
1823+ "version": "0.27.8",
1824+ "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz",
1825+ "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==",
1826+ "dev": true
1827+ },
1828+ "node_modules/@sinonjs/commons": {
1829+ "version": "3.0.1",
1830+ "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz",
1831+ "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==",
1832+ "dev": true,
1833+ "peer": true,
1834+ "dependencies": {
1835+ "type-detect": "4.0.8"
1836+ }
1837+ },
1838+ "node_modules/@sinonjs/fake-timers": {
1839+ "version": "10.3.0",
1840+ "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz",
1841+ "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==",
1842+ "dev": true,
1843+ "peer": true,
1844+ "dependencies": {
1845+ "@sinonjs/commons": "^3.0.0"
1846+ }
1847+ },
1848+ "node_modules/@smithy/abort-controller": {
1849+ "version": "4.0.4",
1850+ "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-4.0.4.tgz",
1851+ "integrity": "sha512-gJnEjZMvigPDQWHrW3oPrFhQtkrgqBkyjj3pCIdF3A5M6vsZODG93KNlfJprv6bp4245bdT32fsHK4kkH3KYDA==",
1852+ "license": "Apache-2.0",
1853+ "dependencies": {
1854+ "@smithy/types": "^4.3.1",
1855+ "tslib": "^2.6.2"
1856+ },
1857+ "engines": {
1858+ "node": ">=18.0.0"
1859+ }
1860+ },
1861+ "node_modules/@smithy/config-resolver": {
1862+ "version": "4.1.4",
1863+ "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-4.1.4.tgz",
1864+ "integrity": "sha512-prmU+rDddxHOH0oNcwemL+SwnzcG65sBF2yXRO7aeXIn/xTlq2pX7JLVbkBnVLowHLg4/OL4+jBmv9hVrVGS+w==",
1865+ "license": "Apache-2.0",
1866+ "dependencies": {
1867+ "@smithy/node-config-provider": "^4.1.3",
1868+ "@smithy/types": "^4.3.1",
1869+ "@smithy/util-config-provider": "^4.0.0",
1870+ "@smithy/util-middleware": "^4.0.4",
1871+ "tslib": "^2.6.2"
1872+ },
1873+ "engines": {
1874+ "node": ">=18.0.0"
1875+ }
1876+ },
1877+ "node_modules/@smithy/core": {
1878+ "version": "3.6.0",
1879+ "resolved": "https://registry.npmjs.org/@smithy/core/-/core-3.6.0.tgz",
1880+ "integrity": "sha512-Pgvfb+TQ4wUNLyHzvgCP4aYZMh16y7GcfF59oirRHcgGgkH1e/s9C0nv/v3WP+Quymyr5je71HeFQCwh+44XLg==",
1881+ "license": "Apache-2.0",
1882+ "dependencies": {
1883+ "@smithy/middleware-serde": "^4.0.8",
1884+ "@smithy/protocol-http": "^5.1.2",
1885+ "@smithy/types": "^4.3.1",
1886+ "@smithy/util-base64": "^4.0.0",
1887+ "@smithy/util-body-length-browser": "^4.0.0",
1888+ "@smithy/util-middleware": "^4.0.4",
1889+ "@smithy/util-stream": "^4.2.2",
1890+ "@smithy/util-utf8": "^4.0.0",
1891+ "tslib": "^2.6.2"
1892+ },
1893+ "engines": {
1894+ "node": ">=18.0.0"
1895+ }
1896+ },
1897+ "node_modules/@smithy/credential-provider-imds": {
1898+ "version": "4.0.6",
1899+ "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-4.0.6.tgz",
1900+ "integrity": "sha512-hKMWcANhUiNbCJouYkZ9V3+/Qf9pteR1dnwgdyzR09R4ODEYx8BbUysHwRSyex4rZ9zapddZhLFTnT4ZijR4pw==",
1901+ "license": "Apache-2.0",
1902+ "dependencies": {
1903+ "@smithy/node-config-provider": "^4.1.3",
1904+ "@smithy/property-provider": "^4.0.4",
1905+ "@smithy/types": "^4.3.1",
1906+ "@smithy/url-parser": "^4.0.4",
1907+ "tslib": "^2.6.2"
1908+ },
1909+ "engines": {
1910+ "node": ">=18.0.0"
1911+ }
1912+ },
1913+ "node_modules/@smithy/eventstream-codec": {
1914+ "version": "4.0.4",
1915+ "resolved": "https://registry.npmjs.org/@smithy/eventstream-codec/-/eventstream-codec-4.0.4.tgz",
1916+ "integrity": "sha512-7XoWfZqWb/QoR/rAU4VSi0mWnO2vu9/ltS6JZ5ZSZv0eovLVfDfu0/AX4ub33RsJTOth3TiFWSHS5YdztvFnig==",
1917+ "license": "Apache-2.0",
1918+ "dependencies": {
1919+ "@aws-crypto/crc32": "5.2.0",
1920+ "@smithy/types": "^4.3.1",
1921+ "@smithy/util-hex-encoding": "^4.0.0",
1922+ "tslib": "^2.6.2"
1923+ },
1924+ "engines": {
1925+ "node": ">=18.0.0"
1926+ }
1927+ },
1928+ "node_modules/@smithy/eventstream-serde-browser": {
1929+ "version": "4.0.4",
1930+ "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-browser/-/eventstream-serde-browser-4.0.4.tgz",
1931+ "integrity": "sha512-3fb/9SYaYqbpy/z/H3yIi0bYKyAa89y6xPmIqwr2vQiUT2St+avRt8UKwsWt9fEdEasc5d/V+QjrviRaX1JRFA==",
1932+ "license": "Apache-2.0",
1933+ "dependencies": {
1934+ "@smithy/eventstream-serde-universal": "^4.0.4",
1935+ "@smithy/types": "^4.3.1",
1936+ "tslib": "^2.6.2"
1937+ },
1938+ "engines": {
1939+ "node": ">=18.0.0"
1940+ }
1941+ },
1942+ "node_modules/@smithy/eventstream-serde-config-resolver": {
1943+ "version": "4.1.2",
1944+ "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-config-resolver/-/eventstream-serde-config-resolver-4.1.2.tgz",
1945+ "integrity": "sha512-JGtambizrWP50xHgbzZI04IWU7LdI0nh/wGbqH3sJesYToMi2j/DcoElqyOcqEIG/D4tNyxgRuaqBXWE3zOFhQ==",
1946+ "license": "Apache-2.0",
1947+ "dependencies": {
1948+ "@smithy/types": "^4.3.1",
1949+ "tslib": "^2.6.2"
1950+ },
1951+ "engines": {
1952+ "node": ">=18.0.0"
1953+ }
1954+ },
1955+ "node_modules/@smithy/eventstream-serde-node": {
1956+ "version": "4.0.4",
1957+ "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-node/-/eventstream-serde-node-4.0.4.tgz",
1958+ "integrity": "sha512-RD6UwNZ5zISpOWPuhVgRz60GkSIp0dy1fuZmj4RYmqLVRtejFqQ16WmfYDdoSoAjlp1LX+FnZo+/hkdmyyGZ1w==",
1959+ "license": "Apache-2.0",
1960+ "dependencies": {
1961+ "@smithy/eventstream-serde-universal": "^4.0.4",
1962+ "@smithy/types": "^4.3.1",
1963+ "tslib": "^2.6.2"
1964+ },
1965+ "engines": {
1966+ "node": ">=18.0.0"
1967+ }
1968+ },
1969+ "node_modules/@smithy/eventstream-serde-universal": {
1970+ "version": "4.0.4",
1971+ "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-universal/-/eventstream-serde-universal-4.0.4.tgz",
1972+ "integrity": "sha512-UeJpOmLGhq1SLox79QWw/0n2PFX+oPRE1ZyRMxPIaFEfCqWaqpB7BU9C8kpPOGEhLF7AwEqfFbtwNxGy4ReENA==",
1973+ "license": "Apache-2.0",
1974+ "dependencies": {
1975+ "@smithy/eventstream-codec": "^4.0.4",
1976+ "@smithy/types": "^4.3.1",
1977+ "tslib": "^2.6.2"
1978+ },
1979+ "engines": {
1980+ "node": ">=18.0.0"
1981+ }
1982+ },
1983+ "node_modules/@smithy/fetch-http-handler": {
1984+ "version": "5.0.4",
1985+ "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-5.0.4.tgz",
1986+ "integrity": "sha512-AMtBR5pHppYMVD7z7G+OlHHAcgAN7v0kVKEpHuTO4Gb199Gowh0taYi9oDStFeUhetkeP55JLSVlTW1n9rFtUw==",
1987+ "license": "Apache-2.0",
1988+ "dependencies": {
1989+ "@smithy/protocol-http": "^5.1.2",
1990+ "@smithy/querystring-builder": "^4.0.4",
1991+ "@smithy/types": "^4.3.1",
1992+ "@smithy/util-base64": "^4.0.0",
1993+ "tslib": "^2.6.2"
1994+ },
1995+ "engines": {
1996+ "node": ">=18.0.0"
1997+ }
1998+ },
1999+ "node_modules/@smithy/hash-node": {
2000+ "version": "4.0.4",
2001+ "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-4.0.4.tgz",
2002+ "integrity": "sha512-qnbTPUhCVnCgBp4z4BUJUhOEkVwxiEi1cyFM+Zj6o+aY8OFGxUQleKWq8ltgp3dujuhXojIvJWdoqpm6dVO3lQ==",
2003+ "license": "Apache-2.0",
2004+ "dependencies": {
2005+ "@smithy/types": "^4.3.1",
2006+ "@smithy/util-buffer-from": "^4.0.0",
2007+ "@smithy/util-utf8": "^4.0.0",
2008+ "tslib": "^2.6.2"
2009+ },
2010+ "engines": {
2011+ "node": ">=18.0.0"
2012+ }
2013+ },
2014+ "node_modules/@smithy/invalid-dependency": {
2015+ "version": "4.0.4",
2016+ "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-4.0.4.tgz",
2017+ "integrity": "sha512-bNYMi7WKTJHu0gn26wg8OscncTt1t2b8KcsZxvOv56XA6cyXtOAAAaNP7+m45xfppXfOatXF3Sb1MNsLUgVLTw==",
2018+ "license": "Apache-2.0",
2019+ "dependencies": {
2020+ "@smithy/types": "^4.3.1",
2021+ "tslib": "^2.6.2"
2022+ },
2023+ "engines": {
2024+ "node": ">=18.0.0"
2025+ }
2026+ },
2027+ "node_modules/@smithy/is-array-buffer": {
2028+ "version": "4.0.0",
2029+ "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-4.0.0.tgz",
2030+ "integrity": "sha512-saYhF8ZZNoJDTvJBEWgeBccCg+yvp1CX+ed12yORU3NilJScfc6gfch2oVb4QgxZrGUx3/ZJlb+c/dJbyupxlw==",
2031+ "license": "Apache-2.0",
2032+ "dependencies": {
2033+ "tslib": "^2.6.2"
2034+ },
2035+ "engines": {
2036+ "node": ">=18.0.0"
2037+ }
2038+ },
2039+ "node_modules/@smithy/middleware-content-length": {
2040+ "version": "4.0.4",
2041+ "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-4.0.4.tgz",
2042+ "integrity": "sha512-F7gDyfI2BB1Kc+4M6rpuOLne5LOcEknH1n6UQB69qv+HucXBR1rkzXBnQTB2q46sFy1PM/zuSJOB532yc8bg3w==",
2043+ "license": "Apache-2.0",
2044+ "dependencies": {
2045+ "@smithy/protocol-http": "^5.1.2",
2046+ "@smithy/types": "^4.3.1",
2047+ "tslib": "^2.6.2"
2048+ },
2049+ "engines": {
2050+ "node": ">=18.0.0"
2051+ }
2052+ },
2053+ "node_modules/@smithy/middleware-endpoint": {
2054+ "version": "4.1.13",
2055+ "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-4.1.13.tgz",
2056+ "integrity": "sha512-xg3EHV/Q5ZdAO5b0UiIMj3RIOCobuS40pBBODguUDVdko6YK6QIzCVRrHTogVuEKglBWqWenRnZ71iZnLL3ZAQ==",
2057+ "license": "Apache-2.0",
2058+ "dependencies": {
2059+ "@smithy/core": "^3.6.0",
2060+ "@smithy/middleware-serde": "^4.0.8",
2061+ "@smithy/node-config-provider": "^4.1.3",
2062+ "@smithy/shared-ini-file-loader": "^4.0.4",
2063+ "@smithy/types": "^4.3.1",
2064+ "@smithy/url-parser": "^4.0.4",
2065+ "@smithy/util-middleware": "^4.0.4",
2066+ "tslib": "^2.6.2"
2067+ },
2068+ "engines": {
2069+ "node": ">=18.0.0"
2070+ }
2071+ },
2072+ "node_modules/@smithy/middleware-retry": {
2073+ "version": "4.1.14",
2074+ "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-4.1.14.tgz",
2075+ "integrity": "sha512-eoXaLlDGpKvdmvt+YBfRXE7HmIEtFF+DJCbTPwuLunP0YUnrydl+C4tS+vEM0+nyxXrX3PSUFqC+lP1+EHB1Tw==",
2076+ "license": "Apache-2.0",
2077+ "dependencies": {
2078+ "@smithy/node-config-provider": "^4.1.3",
2079+ "@smithy/protocol-http": "^5.1.2",
2080+ "@smithy/service-error-classification": "^4.0.6",
2081+ "@smithy/smithy-client": "^4.4.5",
2082+ "@smithy/types": "^4.3.1",
2083+ "@smithy/util-middleware": "^4.0.4",
2084+ "@smithy/util-retry": "^4.0.6",
2085+ "tslib": "^2.6.2",
2086+ "uuid": "^9.0.1"
2087+ },
2088+ "engines": {
2089+ "node": ">=18.0.0"
2090+ }
2091+ },
2092+ "node_modules/@smithy/middleware-retry/node_modules/uuid": {
2093+ "version": "9.0.1",
2094+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz",
2095+ "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==",
2096+ "funding": [
2097+ "https://github.com/sponsors/broofa",
2098+ "https://github.com/sponsors/ctavan"
2099+ ],
2100+ "license": "MIT",
2101+ "bin": {
2102+ "uuid": "dist/bin/uuid"
2103+ }
2104+ },
2105+ "node_modules/@smithy/middleware-serde": {
2106+ "version": "4.0.8",
2107+ "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-4.0.8.tgz",
2108+ "integrity": "sha512-iSSl7HJoJaGyMIoNn2B7czghOVwJ9nD7TMvLhMWeSB5vt0TnEYyRRqPJu/TqW76WScaNvYYB8nRoiBHR9S1Ddw==",
2109+ "license": "Apache-2.0",
2110+ "dependencies": {
2111+ "@smithy/protocol-http": "^5.1.2",
2112+ "@smithy/types": "^4.3.1",
2113+ "tslib": "^2.6.2"
2114+ },
2115+ "engines": {
2116+ "node": ">=18.0.0"
2117+ }
2118+ },
2119+ "node_modules/@smithy/middleware-stack": {
2120+ "version": "4.0.4",
2121+ "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-4.0.4.tgz",
2122+ "integrity": "sha512-kagK5ggDrBUCCzI93ft6DjteNSfY8Ulr83UtySog/h09lTIOAJ/xUSObutanlPT0nhoHAkpmW9V5K8oPyLh+QA==",
2123+ "license": "Apache-2.0",
2124+ "dependencies": {
2125+ "@smithy/types": "^4.3.1",
2126+ "tslib": "^2.6.2"
2127+ },
2128+ "engines": {
2129+ "node": ">=18.0.0"
2130+ }
2131+ },
2132+ "node_modules/@smithy/node-config-provider": {
2133+ "version": "4.1.3",
2134+ "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-4.1.3.tgz",
2135+ "integrity": "sha512-HGHQr2s59qaU1lrVH6MbLlmOBxadtzTsoO4c+bF5asdgVik3I8o7JIOzoeqWc5MjVa+vD36/LWE0iXKpNqooRw==",
2136+ "license": "Apache-2.0",
2137+ "dependencies": {
2138+ "@smithy/property-provider": "^4.0.4",
2139+ "@smithy/shared-ini-file-loader": "^4.0.4",
2140+ "@smithy/types": "^4.3.1",
2141+ "tslib": "^2.6.2"
2142+ },
2143+ "engines": {
2144+ "node": ">=18.0.0"
2145+ }
2146+ },
2147+ "node_modules/@smithy/node-http-handler": {
2148+ "version": "4.0.6",
2149+ "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.0.6.tgz",
2150+ "integrity": "sha512-NqbmSz7AW2rvw4kXhKGrYTiJVDHnMsFnX4i+/FzcZAfbOBauPYs2ekuECkSbtqaxETLLTu9Rl/ex6+I2BKErPA==",
2151+ "license": "Apache-2.0",
2152+ "dependencies": {
2153+ "@smithy/abort-controller": "^4.0.4",
2154+ "@smithy/protocol-http": "^5.1.2",
2155+ "@smithy/querystring-builder": "^4.0.4",
2156+ "@smithy/types": "^4.3.1",
2157+ "tslib": "^2.6.2"
2158+ },
2159+ "engines": {
2160+ "node": ">=18.0.0"
2161+ }
2162+ },
2163+ "node_modules/@smithy/property-provider": {
2164+ "version": "4.0.4",
2165+ "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-4.0.4.tgz",
2166+ "integrity": "sha512-qHJ2sSgu4FqF4U/5UUp4DhXNmdTrgmoAai6oQiM+c5RZ/sbDwJ12qxB1M6FnP+Tn/ggkPZf9ccn4jqKSINaquw==",
2167+ "license": "Apache-2.0",
2168+ "dependencies": {
2169+ "@smithy/types": "^4.3.1",
2170+ "tslib": "^2.6.2"
2171+ },
2172+ "engines": {
2173+ "node": ">=18.0.0"
2174+ }
2175+ },
2176+ "node_modules/@smithy/protocol-http": {
2177+ "version": "5.1.2",
2178+ "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.1.2.tgz",
2179+ "integrity": "sha512-rOG5cNLBXovxIrICSBm95dLqzfvxjEmuZx4KK3hWwPFHGdW3lxY0fZNXfv2zebfRO7sJZ5pKJYHScsqopeIWtQ==",
2180+ "license": "Apache-2.0",
2181+ "dependencies": {
2182+ "@smithy/types": "^4.3.1",
2183+ "tslib": "^2.6.2"
2184+ },
2185+ "engines": {
2186+ "node": ">=18.0.0"
2187+ }
2188+ },
2189+ "node_modules/@smithy/querystring-builder": {
2190+ "version": "4.0.4",
2191+ "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-4.0.4.tgz",
2192+ "integrity": "sha512-SwREZcDnEYoh9tLNgMbpop+UTGq44Hl9tdj3rf+yeLcfH7+J8OXEBaMc2kDxtyRHu8BhSg9ADEx0gFHvpJgU8w==",
2193+ "license": "Apache-2.0",
2194+ "dependencies": {
2195+ "@smithy/types": "^4.3.1",
2196+ "@smithy/util-uri-escape": "^4.0.0",
2197+ "tslib": "^2.6.2"
2198+ },
2199+ "engines": {
2200+ "node": ">=18.0.0"
2201+ }
2202+ },
2203+ "node_modules/@smithy/querystring-parser": {
2204+ "version": "4.0.4",
2205+ "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-4.0.4.tgz",
2206+ "integrity": "sha512-6yZf53i/qB8gRHH/l2ZwUG5xgkPgQF15/KxH0DdXMDHjesA9MeZje/853ifkSY0x4m5S+dfDZ+c4x439PF0M2w==",
2207+ "license": "Apache-2.0",
2208+ "dependencies": {
2209+ "@smithy/types": "^4.3.1",
2210+ "tslib": "^2.6.2"
2211+ },
2212+ "engines": {
2213+ "node": ">=18.0.0"
2214+ }
2215+ },
2216+ "node_modules/@smithy/service-error-classification": {
2217+ "version": "4.0.6",
2218+ "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-4.0.6.tgz",
2219+ "integrity": "sha512-RRoTDL//7xi4tn5FrN2NzH17jbgmnKidUqd4KvquT0954/i6CXXkh1884jBiunq24g9cGtPBEXlU40W6EpNOOg==",
2220+ "license": "Apache-2.0",
2221+ "dependencies": {
2222+ "@smithy/types": "^4.3.1"
2223+ },
2224+ "engines": {
2225+ "node": ">=18.0.0"
2226+ }
2227+ },
2228+ "node_modules/@smithy/shared-ini-file-loader": {
2229+ "version": "4.0.4",
2230+ "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-4.0.4.tgz",
2231+ "integrity": "sha512-63X0260LoFBjrHifPDs+nM9tV0VMkOTl4JRMYNuKh/f5PauSjowTfvF3LogfkWdcPoxsA9UjqEOgjeYIbhb7Nw==",
2232+ "license": "Apache-2.0",
2233+ "dependencies": {
2234+ "@smithy/types": "^4.3.1",
2235+ "tslib": "^2.6.2"
2236+ },
2237+ "engines": {
2238+ "node": ">=18.0.0"
2239+ }
2240+ },
2241+ "node_modules/@smithy/signature-v4": {
2242+ "version": "5.1.2",
2243+ "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-5.1.2.tgz",
2244+ "integrity": "sha512-d3+U/VpX7a60seHziWnVZOHuEgJlclufjkS6zhXvxcJgkJq4UWdH5eOBLzHRMx6gXjsdT9h6lfpmLzbrdupHgQ==",
2245+ "license": "Apache-2.0",
2246+ "dependencies": {
2247+ "@smithy/is-array-buffer": "^4.0.0",
2248+ "@smithy/protocol-http": "^5.1.2",
2249+ "@smithy/types": "^4.3.1",
2250+ "@smithy/util-hex-encoding": "^4.0.0",
2251+ "@smithy/util-middleware": "^4.0.4",
2252+ "@smithy/util-uri-escape": "^4.0.0",
2253+ "@smithy/util-utf8": "^4.0.0",
2254+ "tslib": "^2.6.2"
2255+ },
2256+ "engines": {
2257+ "node": ">=18.0.0"
2258+ }
2259+ },
2260+ "node_modules/@smithy/smithy-client": {
2261+ "version": "4.4.5",
2262+ "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-4.4.5.tgz",
2263+ "integrity": "sha512-+lynZjGuUFJaMdDYSTMnP/uPBBXXukVfrJlP+1U/Dp5SFTEI++w6NMga8DjOENxecOF71V9Z2DllaVDYRnGlkg==",
2264+ "license": "Apache-2.0",
2265+ "dependencies": {
2266+ "@smithy/core": "^3.6.0",
2267+ "@smithy/middleware-endpoint": "^4.1.13",
2268+ "@smithy/middleware-stack": "^4.0.4",
2269+ "@smithy/protocol-http": "^5.1.2",
2270+ "@smithy/types": "^4.3.1",
2271+ "@smithy/util-stream": "^4.2.2",
2272+ "tslib": "^2.6.2"
2273+ },
2274+ "engines": {
2275+ "node": ">=18.0.0"
7652276 }
7662277 },
767- "node_modules/@jest/fake-timers": {
768- "version": "29.7.0",
769- "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz",
770- "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==",
771- "dev": true,
772- "peer": true,
2278+ "node_modules/@smithy/types": {
2279+ "version": "4.3.1",
2280+ "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz",
2281+ "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==",
2282+ "license": "Apache-2.0",
7732283 "dependencies": {
774- "@jest/types": "^29.6.3",
775- "@sinonjs/fake-timers": "^10.0.2",
776- "@types/node": "*",
777- "jest-message-util": "^29.7.0",
778- "jest-mock": "^29.7.0",
779- "jest-util": "^29.7.0"
2284+ "tslib": "^2.6.2"
7802285 },
7812286 "engines": {
782- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
2287+ "node": ">=18.0.0"
7832288 }
7842289 },
785- "node_modules/@jest/globals": {
786- "version": "29.7.0",
787- "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz",
788- "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==",
789- "dev": true,
790- "peer": true,
2290+ "node_modules/@smithy/url-parser": {
2291+ "version": "4.0.4",
2292+ "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-4.0.4.tgz",
2293+ "integrity": "sha512-eMkc144MuN7B0TDA4U2fKs+BqczVbk3W+qIvcoCY6D1JY3hnAdCuhCZODC+GAeaxj0p6Jroz4+XMUn3PCxQQeQ==",
2294+ "license": "Apache-2.0",
7912295 "dependencies": {
792- "@jest/environment": "^29.7.0",
793- "@jest/expect": "^29.7.0",
794- "@jest/types": "^29.6.3",
795- "jest-mock": "^29.7.0"
2296+ "@smithy/querystring-parser": "^4.0.4",
2297+ "@smithy/types": "^4.3.1",
2298+ "tslib": "^2.6.2"
7962299 },
7972300 "engines": {
798- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
2301+ "node": ">=18.0.0"
7992302 }
8002303 },
801- "node_modules/@jest/reporters": {
802- "version": "29.7.0",
803- "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz",
804- "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==",
805- "dev": true,
806- "peer": true,
2304+ "node_modules/@smithy/util-base64": {
2305+ "version": "4.0.0",
2306+ "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-4.0.0.tgz",
2307+ "integrity": "sha512-CvHfCmO2mchox9kjrtzoHkWHxjHZzaFojLc8quxXY7WAAMAg43nuxwv95tATVgQFNDwd4M9S1qFzj40Ul41Kmg==",
2308+ "license": "Apache-2.0",
8072309 "dependencies": {
808- "@bcoe/v8-coverage": "^0.2.3",
809- "@jest/console": "^29.7.0",
810- "@jest/test-result": "^29.7.0",
811- "@jest/transform": "^29.7.0",
812- "@jest/types": "^29.6.3",
813- "@jridgewell/trace-mapping": "^0.3.18",
814- "@types/node": "*",
815- "chalk": "^4.0.0",
816- "collect-v8-coverage": "^1.0.0",
817- "exit": "^0.1.2",
818- "glob": "^7.1.3",
819- "graceful-fs": "^4.2.9",
820- "istanbul-lib-coverage": "^3.0.0",
821- "istanbul-lib-instrument": "^6.0.0",
822- "istanbul-lib-report": "^3.0.0",
823- "istanbul-lib-source-maps": "^4.0.0",
824- "istanbul-reports": "^3.1.3",
825- "jest-message-util": "^29.7.0",
826- "jest-util": "^29.7.0",
827- "jest-worker": "^29.7.0",
828- "slash": "^3.0.0",
829- "string-length": "^4.0.1",
830- "strip-ansi": "^6.0.0",
831- "v8-to-istanbul": "^9.0.1"
2310+ "@smithy/util-buffer-from": "^4.0.0",
2311+ "@smithy/util-utf8": "^4.0.0",
2312+ "tslib": "^2.6.2"
8322313 },
8332314 "engines": {
834- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
835- },
836- "peerDependencies": {
837- "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0"
838- },
839- "peerDependenciesMeta": {
840- "node-notifier": {
841- "optional": true
842- }
2315+ "node": ">=18.0.0"
8432316 }
8442317 },
845- "node_modules/@jest/schemas": {
846- "version": "29.6.3",
847- "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz",
848- "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==",
849- "dev": true,
2318+ "node_modules/@smithy/util-body-length-browser": {
2319+ "version": "4.0.0",
2320+ "resolved": "https://registry.npmjs.org/@smithy/util-body-length-browser/-/util-body-length-browser-4.0.0.tgz",
2321+ "integrity": "sha512-sNi3DL0/k64/LO3A256M+m3CDdG6V7WKWHdAiBBMUN8S3hK3aMPhwnPik2A/a2ONN+9doY9UxaLfgqsIRg69QA==",
2322+ "license": "Apache-2.0",
8502323 "dependencies": {
851- "@sinclair/typebox": "^0.27.8"
2324+ "tslib": "^2.6.2"
8522325 },
8532326 "engines": {
854- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
2327+ "node": ">=18.0.0"
8552328 }
8562329 },
857- "node_modules/@jest/source-map": {
858- "version": "29.6.3",
859- "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz",
860- "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==",
861- "dev": true,
862- "peer": true,
2330+ "node_modules/@smithy/util-body-length-node": {
2331+ "version": "4.0.0",
2332+ "resolved": "https://registry.npmjs.org/@smithy/util-body-length-node/-/util-body-length-node-4.0.0.tgz",
2333+ "integrity": "sha512-q0iDP3VsZzqJyje8xJWEJCNIu3lktUGVoSy1KB0UWym2CL1siV3artm+u1DFYTLejpsrdGyCSWBdGNjJzfDPjg==",
2334+ "license": "Apache-2.0",
8632335 "dependencies": {
864- "@jridgewell/trace-mapping": "^0.3.18",
865- "callsites": "^3.0.0",
866- "graceful-fs": "^4.2.9"
2336+ "tslib": "^2.6.2"
8672337 },
8682338 "engines": {
869- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
2339+ "node": ">=18.0.0"
8702340 }
8712341 },
872- "node_modules/@jest/test-result": {
873- "version": "29.7.0",
874- "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz",
875- "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==",
876- "dev": true,
877- "peer": true,
2342+ "node_modules/@smithy/util-buffer-from": {
2343+ "version": "4.0.0",
2344+ "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-4.0.0.tgz",
2345+ "integrity": "sha512-9TOQ7781sZvddgO8nxueKi3+yGvkY35kotA0Y6BWRajAv8jjmigQ1sBwz0UX47pQMYXJPahSKEKYFgt+rXdcug==",
2346+ "license": "Apache-2.0",
8782347 "dependencies": {
879- "@jest/console": "^29.7.0",
880- "@jest/types": "^29.6.3",
881- "@types/istanbul-lib-coverage": "^2.0.0",
882- "collect-v8-coverage": "^1.0.0"
2348+ "@smithy/is-array-buffer": "^4.0.0",
2349+ "tslib": "^2.6.2"
8832350 },
8842351 "engines": {
885- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
2352+ "node": ">=18.0.0"
8862353 }
8872354 },
888- "node_modules/@jest/test-sequencer": {
889- "version": "29.7.0",
890- "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz",
891- "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==",
892- "dev": true,
893- "peer": true,
2355+ "node_modules/@smithy/util-config-provider": {
2356+ "version": "4.0.0",
2357+ "resolved": "https://registry.npmjs.org/@smithy/util-config-provider/-/util-config-provider-4.0.0.tgz",
2358+ "integrity": "sha512-L1RBVzLyfE8OXH+1hsJ8p+acNUSirQnWQ6/EgpchV88G6zGBTDPdXiiExei6Z1wR2RxYvxY/XLw6AMNCCt8H3w==",
2359+ "license": "Apache-2.0",
8942360 "dependencies": {
895- "@jest/test-result": "^29.7.0",
896- "graceful-fs": "^4.2.9",
897- "jest-haste-map": "^29.7.0",
898- "slash": "^3.0.0"
2361+ "tslib": "^2.6.2"
8992362 },
9002363 "engines": {
901- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
2364+ "node": ">=18.0.0"
9022365 }
9032366 },
904- "node_modules/@jest/transform": {
905- "version": "29.7.0",
906- "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz",
907- "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==",
908- "dev": true,
909- "peer": true,
2367+ "node_modules/@smithy/util-defaults-mode-browser": {
2368+ "version": "4.0.21",
2369+ "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-4.0.21.tgz",
2370+ "integrity": "sha512-wM0jhTytgXu3wzJoIqpbBAG5U6BwiubZ6QKzSbP7/VbmF1v96xlAbX2Am/mz0Zep0NLvLh84JT0tuZnk3wmYQA==",
2371+ "license": "Apache-2.0",
9102372 "dependencies": {
911- "@babel/core": "^7.11.6",
912- "@jest/types": "^29.6.3",
913- "@jridgewell/trace-mapping": "^0.3.18",
914- "babel-plugin-istanbul": "^6.1.1",
915- "chalk": "^4.0.0",
916- "convert-source-map": "^2.0.0",
917- "fast-json-stable-stringify": "^2.1.0",
918- "graceful-fs": "^4.2.9",
919- "jest-haste-map": "^29.7.0",
920- "jest-regex-util": "^29.6.3",
921- "jest-util": "^29.7.0",
922- "micromatch": "^4.0.4",
923- "pirates": "^4.0.4",
924- "slash": "^3.0.0",
925- "write-file-atomic": "^4.0.2"
2373+ "@smithy/property-provider": "^4.0.4",
2374+ "@smithy/smithy-client": "^4.4.5",
2375+ "@smithy/types": "^4.3.1",
2376+ "bowser": "^2.11.0",
2377+ "tslib": "^2.6.2"
9262378 },
9272379 "engines": {
928- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
2380+ "node": ">=18.0.0"
9292381 }
9302382 },
931- "node_modules/@jest/types": {
932- "version": "29.6.3",
933- "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz",
934- "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==",
935- "dev": true,
2383+ "node_modules/@smithy/util-defaults-mode-node": {
2384+ "version": "4.0.21",
2385+ "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-4.0.21.tgz",
2386+ "integrity": "sha512-/F34zkoU0GzpUgLJydHY8Rxu9lBn8xQC/s/0M0U9lLBkYbA1htaAFjWYJzpzsbXPuri5D1H8gjp2jBum05qBrA==",
2387+ "license": "Apache-2.0",
9362388 "dependencies": {
937- "@jest/schemas": "^29.6.3",
938- "@types/istanbul-lib-coverage": "^2.0.0",
939- "@types/istanbul-reports": "^3.0.0",
940- "@types/node": "*",
941- "@types/yargs": "^17.0.8",
942- "chalk": "^4.0.0"
2389+ "@smithy/config-resolver": "^4.1.4",
2390+ "@smithy/credential-provider-imds": "^4.0.6",
2391+ "@smithy/node-config-provider": "^4.1.3",
2392+ "@smithy/property-provider": "^4.0.4",
2393+ "@smithy/smithy-client": "^4.4.5",
2394+ "@smithy/types": "^4.3.1",
2395+ "tslib": "^2.6.2"
9432396 },
9442397 "engines": {
945- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
2398+ "node": ">=18.0.0"
9462399 }
9472400 },
948- "node_modules/@jridgewell/gen-mapping": {
949- "version": "0.3.5",
950- "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz",
951- "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==",
952- "dev": true,
953- "peer": true,
2401+ "node_modules/@smithy/util-endpoints": {
2402+ "version": "3.0.6",
2403+ "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-3.0.6.tgz",
2404+ "integrity": "sha512-YARl3tFL3WgPuLzljRUnrS2ngLiUtkwhQtj8PAL13XZSyUiNLQxwG3fBBq3QXFqGFUXepIN73pINp3y8c2nBmA==",
2405+ "license": "Apache-2.0",
9542406 "dependencies": {
955- "@jridgewell/set-array": "^1.2.1",
956- "@jridgewell/sourcemap-codec": "^1.4.10",
957- "@jridgewell/trace-mapping": "^0.3.24"
2407+ "@smithy/node-config-provider": "^4.1.3",
2408+ "@smithy/types": "^4.3.1",
2409+ "tslib": "^2.6.2"
9582410 },
9592411 "engines": {
960- "node": ">=6.0.0"
2412+ "node": ">=18.0.0"
9612413 }
9622414 },
963- "node_modules/@jridgewell/resolve-uri": {
964- "version": "3.1.2",
965- "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",
966- "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==",
967- "dev": true,
2415+ "node_modules/@smithy/util-hex-encoding": {
2416+ "version": "4.0.0",
2417+ "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-4.0.0.tgz",
2418+ "integrity": "sha512-Yk5mLhHtfIgW2W2WQZWSg5kuMZCVbvhFmC7rV4IO2QqnZdbEFPmQnCcGMAX2z/8Qj3B9hYYNjZOhWym+RwhePw==",
2419+ "license": "Apache-2.0",
2420+ "dependencies": {
2421+ "tslib": "^2.6.2"
2422+ },
9682423 "engines": {
969- "node": ">=6.0.0"
2424+ "node": ">=18.0.0"
9702425 }
9712426 },
972- "node_modules/@jridgewell/set-array": {
973- "version": "1.2.1",
974- "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz",
975- "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==",
976- "dev": true,
977- "peer": true,
2427+ "node_modules/@smithy/util-middleware": {
2428+ "version": "4.0.4",
2429+ "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-4.0.4.tgz",
2430+ "integrity": "sha512-9MLKmkBmf4PRb0ONJikCbCwORACcil6gUWojwARCClT7RmLzF04hUR4WdRprIXal7XVyrddadYNfp2eF3nrvtQ==",
2431+ "license": "Apache-2.0",
2432+ "dependencies": {
2433+ "@smithy/types": "^4.3.1",
2434+ "tslib": "^2.6.2"
2435+ },
9782436 "engines": {
979- "node": ">=6.0.0"
2437+ "node": ">=18.0.0"
9802438 }
9812439 },
982- "node_modules/@jridgewell/sourcemap-codec": {
983- "version": "1.5.0",
984- "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz",
985- "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==",
986- "dev": true
987- },
988- "node_modules/@jridgewell/trace-mapping": {
989- "version": "0.3.25",
990- "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz",
991- "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==",
992- "dev": true,
993- "peer": true,
2440+ "node_modules/@smithy/util-retry": {
2441+ "version": "4.0.6",
2442+ "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-4.0.6.tgz",
2443+ "integrity": "sha512-+YekoF2CaSMv6zKrA6iI/N9yva3Gzn4L6n35Luydweu5MMPYpiGZlWqehPHDHyNbnyaYlz/WJyYAZnC+loBDZg==",
2444+ "license": "Apache-2.0",
9942445 "dependencies": {
995- "@jridgewell/resolve-uri": "^3.1.0",
996- "@jridgewell/sourcemap-codec": "^1.4.14"
2446+ "@smithy/service-error-classification": "^4.0.6",
2447+ "@smithy/types": "^4.3.1",
2448+ "tslib": "^2.6.2"
2449+ },
2450+ "engines": {
2451+ "node": ">=18.0.0"
9972452 }
9982453 },
999- "node_modules/@sinclair/typebox": {
1000- "version": "0.27.8",
1001- "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz",
1002- "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==",
1003- "dev": true
2454+ "node_modules/@smithy/util-stream": {
2455+ "version": "4.2.2",
2456+ "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-4.2.2.tgz",
2457+ "integrity": "sha512-aI+GLi7MJoVxg24/3J1ipwLoYzgkB4kUfogZfnslcYlynj3xsQ0e7vk4TnTro9hhsS5PvX1mwmkRqqHQjwcU7w==",
2458+ "license": "Apache-2.0",
2459+ "dependencies": {
2460+ "@smithy/fetch-http-handler": "^5.0.4",
2461+ "@smithy/node-http-handler": "^4.0.6",
2462+ "@smithy/types": "^4.3.1",
2463+ "@smithy/util-base64": "^4.0.0",
2464+ "@smithy/util-buffer-from": "^4.0.0",
2465+ "@smithy/util-hex-encoding": "^4.0.0",
2466+ "@smithy/util-utf8": "^4.0.0",
2467+ "tslib": "^2.6.2"
2468+ },
2469+ "engines": {
2470+ "node": ">=18.0.0"
2471+ }
10042472 },
1005- "node_modules/@sinonjs/commons": {
1006- "version": "3.0.1",
1007- "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz",
1008- "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==",
1009- "dev": true,
1010- "peer": true,
2473+ "node_modules/@smithy/util-uri-escape": {
2474+ "version": "4.0.0",
2475+ "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-4.0.0.tgz",
2476+ "integrity": "sha512-77yfbCbQMtgtTylO9itEAdpPXSog3ZxMe09AEhm0dU0NLTalV70ghDZFR+Nfi1C60jnJoh/Re4090/DuZh2Omg==",
2477+ "license": "Apache-2.0",
10112478 "dependencies": {
1012- "type-detect": "4.0.8"
2479+ "tslib": "^2.6.2"
2480+ },
2481+ "engines": {
2482+ "node": ">=18.0.0"
10132483 }
10142484 },
1015- "node_modules/@sinonjs/fake-timers": {
1016- "version": "10.3.0",
1017- "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz",
1018- "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==",
1019- "dev": true,
1020- "peer": true,
2485+ "node_modules/@smithy/util-utf8": {
2486+ "version": "4.0.0",
2487+ "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-4.0.0.tgz",
2488+ "integrity": "sha512-b+zebfKCfRdgNJDknHCob3O7FpeYQN6ZG6YLExMcasDHsCXlsXCEuiPZeLnJLpwa5dvPetGlnGCiMHuLwGvFow==",
2489+ "license": "Apache-2.0",
10212490 "dependencies": {
1022- "@sinonjs/commons": "^3.0.0"
2491+ "@smithy/util-buffer-from": "^4.0.0",
2492+ "tslib": "^2.6.2"
2493+ },
2494+ "engines": {
2495+ "node": ">=18.0.0"
10232496 }
10242497 },
10252498 "node_modules/@tsconfig/node10": {
@@ -1173,6 +2646,12 @@
11732646 "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==",
11742647 "dev": true
11752648 },
2649+ "node_modules/@types/uuid": {
2650+ "version": "9.0.8",
2651+ "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.8.tgz",
2652+ "integrity": "sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==",
2653+ "license": "MIT"
2654+ },
11762655 "node_modules/@types/yargs": {
11772656 "version": "17.0.32",
11782657 "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz",
@@ -1446,6 +2925,12 @@
14462925 "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
14472926 "dev": true
14482927 },
2928+ "node_modules/bowser": {
2929+ "version": "2.11.0",
2930+ "resolved": "https://registry.npmjs.org/bowser/-/bowser-2.11.0.tgz",
2931+ "integrity": "sha512-AlcaJBi/pqqJBIQ8U9Mcpc9i8Aqxn88Skv5d+xBX006BY5u8N3mGLHa5Lgppa7L/HfwgwLgZ6NYs+Ag6uUmJRA==",
2932+ "license": "MIT"
2933+ },
14492934 "node_modules/brace-expansion": {
14502935 "version": "1.1.11",
14512936 "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
@@ -2004,6 +3489,28 @@
20043489 "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",
20053490 "dev": true
20063491 },
3492+ "node_modules/fast-xml-parser": {
3493+ "version": "4.4.1",
3494+ "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.4.1.tgz",
3495+ "integrity": "sha512-xkjOecfnKGkSsOwtZ5Pz7Us/T6mrbPQrq0nh+aCO5V9nk5NLWmasAHumTKjiPJPWANe+kAZ84Jc8ooJkzZ88Sw==",
3496+ "funding": [
3497+ {
3498+ "type": "github",
3499+ "url": "https://github.com/sponsors/NaturalIntelligence"
3500+ },
3501+ {
3502+ "type": "paypal",
3503+ "url": "https://paypal.me/naturalintelligence"
3504+ }
3505+ ],
3506+ "license": "MIT",
3507+ "dependencies": {
3508+ "strnum": "^1.0.5"
3509+ },
3510+ "bin": {
3511+ "fxparser": "src/cli/cli.js"
3512+ }
3513+ },
20073514 "node_modules/fb-watchman": {
20083515 "version": "2.0.2",
20093516 "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz",
@@ -3974,6 +5481,18 @@
39745481 "url": "https://github.com/sponsors/sindresorhus"
39755482 }
39765483 },
5484+ "node_modules/strnum": {
5485+ "version": "1.1.2",
5486+ "resolved": "https://registry.npmjs.org/strnum/-/strnum-1.1.2.tgz",
5487+ "integrity": "sha512-vrN+B7DBIoTTZjnPNewwhx6cBA/H+IS7rfW68n7XxC1y7uoiGQBxaKzqucGUgavX15dJgiGztLJ8vxuEzwqBdA==",
5488+ "funding": [
5489+ {
5490+ "type": "github",
5491+ "url": "https://github.com/sponsors/NaturalIntelligence"
5492+ }
5493+ ],
5494+ "license": "MIT"
5495+ },
39775496 "node_modules/supports-color": {
39785497 "version": "7.2.0",
39795498 "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
@@ -4151,6 +5670,12 @@
41515670 }
41525671 }
41535672 },
5673+ "node_modules/tslib": {
5674+ "version": "2.8.1",
5675+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
5676+ "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
5677+ "license": "0BSD"
5678+ },
41545679 "node_modules/type-detect": {
41555680 "version": "4.0.8",
41565681 "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz",
modified packages/openai-adapters/package.json +3 −1
@@ -1,6 +1,6 @@
11 {
22 "name": "@continuedev/openai-adapters",
3- "version": "1.0.44",
3+ "version": "1.0.45",
44 "description": "",
55 "main": "dist/index.js",
66 "types": "dist/index.d.ts",
@@ -12,6 +12,8 @@
1212 "author": "Nate Sesti and Ty Dunn",
1313 "license": "Apache-2.0",
1414 "dependencies": {
15+ "@aws-sdk/client-bedrock-runtime": "^3.842.0",
16+ "@aws-sdk/credential-providers": "^3.840.0",
1517 "@continuedev/config-types": "^1.0.5",
1618 "@continuedev/config-yaml": "^1.0.51",
1719 "@continuedev/fetch": "^1.0.15",
added packages/openai-adapters/src/apis/Bedrock.ts +691 −0
@@ -0,0 +1,691 @@
1+import {
2+ BedrockRuntimeClient,
3+ ContentBlock,
4+ ConversationRole,
5+ ConverseStreamCommand,
6+ ConverseStreamCommandInput,
7+ ImageFormat,
8+ InvokeModelCommand,
9+ Message,
10+ ToolConfiguration,
11+} from "@aws-sdk/client-bedrock-runtime";
12+import { OpenAI } from "openai/index";
13+import { v4 as uuidv4 } from "uuid";
14+
15+import {
16+ ChatCompletion,
17+ ChatCompletionChunk,
18+ ChatCompletionCreateParams,
19+ ChatCompletionCreateParamsNonStreaming,
20+ ChatCompletionCreateParamsStreaming,
21+ ChatCompletionMessageToolCall,
22+ Completion,
23+ CompletionCreateParamsNonStreaming,
24+ CompletionCreateParamsStreaming,
25+ CreateEmbeddingResponse,
26+ EmbeddingCreateParams,
27+ Model,
28+} from "openai/resources/index";
29+
30+import { fromNodeProviderChain } from "@aws-sdk/credential-providers";
31+import { BedrockConfig } from "../types.js";
32+import { chatChunk, chatChunkFromDelta, embedding, rerank } from "../util.js";
33+import { safeParseArgs } from "../util/parseArgs.js";
34+import {
35+ BaseLlmApi,
36+ CreateRerankResponse,
37+ FimCreateParamsStreaming,
38+ RerankCreateParams,
39+} from "./base.js";
40+
41+// Utility function to get or generate UUID for prompt caching
42+function getSecureID(): string {
43+ // Adding a type declaration for the static property
44+ if (!(getSecureID as any).uuid) {
45+ (getSecureID as any).uuid = crypto.randomUUID();
46+ }
47+ return `<!-- SID: ${(getSecureID as any).uuid} -->`;
48+}
49+
50+/**
51+ * Interface for tool use state tracking
52+ */
53+interface ToolUseState {
54+ toolUseId: string;
55+ name: string;
56+ input: string;
57+}
58+
59+export class BedrockApi implements BaseLlmApi {
60+ private _currentToolResponse: Partial<ToolUseState> | null = null;
61+
62+ constructor(protected config: BedrockConfig) {
63+ if (config.env?.accessKeyId || config?.env?.secretAccessKey) {
64+ if (!config.env?.accessKeyId) {
65+ throw new Error(
66+ "accessKeyId is required for Bedrock API. Only found secretAccessKey",
67+ );
68+ }
69+ if (!config.env?.secretAccessKey) {
70+ throw new Error(
71+ "secretAccessKey is required for Bedrock API. Only found accessKeyId",
72+ );
73+ }
74+ }
75+ }
76+
77+ async getCreds() {
78+ if (this.config?.env?.accessKeyId && this.config?.env?.secretAccessKey) {
79+ return {
80+ accessKeyId: this.config.env.accessKeyId,
81+ secretAccessKey: this.config.env.secretAccessKey,
82+ };
83+ }
84+ const profile = this.config.env.profile ?? "bedrock";
85+ try {
86+ return await fromNodeProviderChain({
87+ profile: profile,
88+ ignoreCache: true,
89+ })();
90+ } catch (e) {
91+ console.warn(
92+ `AWS profile with name ${profile} not found in ~/.aws/credentials, using default profile`,
93+ );
94+ }
95+ return await fromNodeProviderChain()();
96+ }
97+ async getClient(): Promise<BedrockRuntimeClient> {
98+ const creds = await this.getCreds();
99+ return new BedrockRuntimeClient({
100+ region: this.config.env.region,
101+ credentials: creds,
102+ });
103+ }
104+
105+ private _oaiPartToBedrockPart(
106+ part:
107+ | OpenAI.Chat.Completions.ChatCompletionContentPart
108+ | OpenAI.Chat.Completions.ChatCompletionContentPartRefusal,
109+ ): ContentBlock {
110+ switch (part.type) {
111+ case "refusal":
112+ return {
113+ text: part.refusal,
114+ };
115+ case "text":
116+ return {
117+ text: part.text,
118+ };
119+ case "input_audio":
120+ throw new Error("Unsupported part type: input_audio");
121+ case "image_url":
122+ default:
123+ try {
124+ const [mimeType, base64Data] = part.image_url.url.split(",");
125+ const format = mimeType.split("/")[1]?.split(";")[0] || "jpeg";
126+ if (
127+ format === ImageFormat.JPEG ||
128+ format === ImageFormat.PNG ||
129+ format === ImageFormat.WEBP ||
130+ format === ImageFormat.GIF
131+ ) {
132+ return {
133+ image: {
134+ format,
135+ source: {
136+ bytes: Uint8Array.from(Buffer.from(base64Data, "base64")),
137+ },
138+ },
139+ };
140+ } else {
141+ console.warn(
142+ `Bedrock: skipping unsupported image part format: ${format}`,
143+ );
144+ return { text: "[Unsupported image format]" };
145+ }
146+ } catch (error) {
147+ console.warn("Bedrock: failed to process image part", error);
148+ return { text: "[Failed to process image]" };
149+ }
150+ }
151+ }
152+
153+ private _convertMessages(
154+ oaiMessages: OpenAI.Chat.Completions.ChatCompletionMessageParam[],
155+ availableTools: Set<string>,
156+ ): Message[] {
157+ let currentRole: "user" | "assistant" = "user";
158+ let currentBlocks: ContentBlock[] = [];
159+ const converted: Message[] = [];
160+ const hasAddedToolCallIds = new Set<string>();
161+
162+ const pushCurrentMessage = () => {
163+ if (currentBlocks.length > 0) {
164+ converted.push({
165+ role: currentRole,
166+ content: currentBlocks,
167+ });
168+ currentBlocks = [];
169+ }
170+ };
171+
172+ const nonSystemMessages = oaiMessages.filter((m) => m.role !== "system");
173+
174+ for (let idx = 0; idx < nonSystemMessages.length; idx++) {
175+ const message = nonSystemMessages[idx];
176+
177+ if (message.role === "user" || message.role === "tool") {
178+ // Detect conversational turn change
179+ if (currentRole !== ConversationRole.USER) {
180+ pushCurrentMessage();
181+ currentRole = ConversationRole.USER;
182+ }
183+
184+ // USER messages
185+ if (message.role === "user") {
186+ const content = message.content;
187+ if (content) {
188+ if (typeof content === "string") {
189+ currentBlocks.push({ text: content });
190+ } else {
191+ content.forEach((part) => {
192+ currentBlocks.push(this._oaiPartToBedrockPart(part));
193+ });
194+ }
195+ }
196+ }
197+ // TOOL messages
198+ else if (message.role === "tool") {
199+ const trimmedContent =
200+ typeof message.content === "string"
201+ ? message.content.trim()
202+ : message.content
203+ .map((c) => c.text)
204+ .join("\n")
205+ .trim();
206+
207+ if (hasAddedToolCallIds.has(message.tool_call_id)) {
208+ currentBlocks.push({
209+ toolResult: {
210+ toolUseId: message.tool_call_id,
211+ content: [
212+ {
213+ text: trimmedContent || "No tool output",
214+ },
215+ ],
216+ },
217+ });
218+ } else {
219+ currentBlocks.push({
220+ text: `Tool call output for Tool Call ID ${message.tool_call_id}:\n\n${trimmedContent || "No tool output"}`,
221+ });
222+ }
223+ }
224+ } else if (message.role === "assistant") {
225+ // Detect conversational turn change
226+ if (currentRole !== ConversationRole.ASSISTANT) {
227+ pushCurrentMessage();
228+ currentRole = ConversationRole.ASSISTANT;
229+ }
230+
231+ // ASSISTANT messages
232+ if (typeof message.content === "string") {
233+ const trimmedText = message.content.trim();
234+ if (trimmedText) {
235+ currentBlocks.push({ text: trimmedText });
236+ }
237+ } else {
238+ message.content?.forEach((part) => {
239+ const text = part.type === "text" ? part.text : part.refusal;
240+ const trimmedText = text.trim();
241+ if (trimmedText) {
242+ currentBlocks.push({ text: trimmedText });
243+ }
244+ });
245+ }
246+
247+ // TOOL CALLS
248+ if (message.tool_calls) {
249+ for (const toolCall of message.tool_calls) {
250+ if (toolCall.id && toolCall.function?.name) {
251+ if (availableTools.has(toolCall.function.name)) {
252+ currentBlocks.push({
253+ toolUse: {
254+ toolUseId: toolCall.id,
255+ name: toolCall.function.name,
256+ input: safeParseArgs(
257+ toolCall.function.arguments,
258+ `Call: ${toolCall.function.name} ${toolCall.id}`,
259+ ),
260+ },
261+ });
262+ hasAddedToolCallIds.add(toolCall.id);
263+ } else {
264+ const toolCallText = `Assistant tool call:\nTool name: ${toolCall.function.name}\nTool Call ID: ${toolCall.id}\nArguments: ${toolCall.function?.arguments ?? "{}"}`;
265+ currentBlocks.push({
266+ text: toolCallText,
267+ });
268+ }
269+ }
270+ }
271+ }
272+ }
273+ }
274+
275+ if (currentBlocks.length > 0) {
276+ pushCurrentMessage();
277+ }
278+
279+ // If caching is enabled, add cache points
280+ // if (this.config.cacheBehavior?.cacheConversation) {
281+ // this._addCachingToLastTwoUserMessages(converted);
282+ // }
283+
284+ return converted;
285+ }
286+
287+ private _addCachingToLastTwoUserMessages(converted: Message[]) {
288+ let numCached = 0;
289+ for (let i = converted.length - 1; i >= 0; i--) {
290+ const message = converted[i];
291+ if (message.role === "user") {
292+ message.content?.forEach((block) => {
293+ if (block.text) {
294+ block.text += getSecureID();
295+ }
296+ });
297+ message.content?.push({ cachePoint: { type: "default" } });
298+ numCached++;
299+ }
300+ if (numCached === 2) {
301+ break;
302+ }
303+ }
304+ }
305+
306+ private _convertBody(
307+ oaiBody: ChatCompletionCreateParams,
308+ ): ConverseStreamCommandInput {
309+ // Extract system message
310+ const systemMessage =
311+ oaiBody.messages.find((msg) => msg.role === "system")?.content || "";
312+
313+ const systemMessageText =
314+ typeof systemMessage === "string"
315+ ? systemMessage
316+ : systemMessage
317+ .map((part) =>
318+ part.type === "text" ? part.text : "[Non-text content]",
319+ )
320+ .join(" ");
321+
322+ // Check for tools
323+ const availableTools = new Set<string>();
324+ let toolConfig: ToolConfiguration | undefined = undefined;
325+
326+ if (oaiBody.tools && oaiBody.tools.length > 0) {
327+ toolConfig = {
328+ tools: oaiBody.tools.map((tool) => ({
329+ toolSpec: {
330+ name: tool.function.name,
331+ description: tool.function.description,
332+ inputSchema: {
333+ json: tool.function.parameters,
334+ },
335+ },
336+ })),
337+ } as ToolConfiguration;
338+
339+ // Add cache point if needed
340+ // if (this.config.cacheBehavior?.cacheSystemMessage) {
341+ // toolConfig!.tools!.push({ cachePoint: { type: "default" } });
342+ // }
343+
344+ oaiBody.tools.forEach((tool) => {
345+ availableTools.add(tool.function.name);
346+ });
347+ }
348+
349+ // Convert messages
350+ const convertedMessages = this._convertMessages(
351+ oaiBody.messages,
352+ availableTools,
353+ );
354+
355+ // Build final request body
356+ const body: any = {
357+ modelId: oaiBody.model,
358+ messages: convertedMessages,
359+ inferenceConfig: {
360+ temperature: oaiBody.temperature,
361+ topP: oaiBody.top_p,
362+ maxTokens: oaiBody.max_tokens,
363+ stopSequences: Array.isArray(oaiBody.stop)
364+ ? oaiBody.stop.filter((s) => s.trim() !== "").slice(0, 4)
365+ : oaiBody.stop
366+ ? [oaiBody.stop].filter((s) => s.trim() !== "")
367+ : undefined,
368+ },
369+ };
370+
371+ // Add system message if present
372+ if (systemMessageText) {
373+ body.system = false // this.config.cacheBehavior?.cacheSystemMessage // TODO
374+ ? [{ text: systemMessageText }, { cachePoint: { type: "default" } }]
375+ : [{ text: systemMessageText }];
376+ }
377+
378+ // Add tool config if present
379+ if (toolConfig) {
380+ body.toolConfig = toolConfig;
381+ }
382+
383+ // Add reasoning if needed
384+ // TODO REASONING
385+ // if (this.c) {
386+ // body.additionalModelRequestFields = {
387+ // thinking: {
388+ // type: "enabled",
389+ // budget_tokens:
390+ // oaiBody.additionalModelRequestFields.reasoningBudgetTokens,
391+ // },
392+ // };
393+ // }
394+
395+ return body;
396+ }
397+
398+ async chatCompletionNonStream(
399+ body: ChatCompletionCreateParamsNonStreaming,
400+ signal: AbortSignal,
401+ ): Promise<ChatCompletion> {
402+ let completion = "";
403+ const toolCalls: ChatCompletionMessageToolCall[] = [];
404+
405+ for await (const chunk of this.chatCompletionStream(
406+ {
407+ ...body,
408+ stream: true,
409+ },
410+ signal,
411+ )) {
412+ if (chunk.choices[0].delta.content) {
413+ completion += chunk.choices[0].delta.content;
414+ }
415+ // TODO tool calls not supported
416+ }
417+
418+ return {
419+ id: uuidv4(),
420+ object: "chat.completion",
421+ model: body.model,
422+ created: Date.now(),
423+ choices: [
424+ {
425+ index: 0,
426+ logprobs: null,
427+ finish_reason: "stop",
428+ message: {
429+ role: "assistant",
430+ content: completion,
431+ tool_calls: toolCalls.length > 0 ? toolCalls : undefined,
432+ refusal: null,
433+ },
434+ },
435+ ],
436+ usage: undefined,
437+ };
438+ }
439+
440+ async *chatCompletionStream(
441+ body: ChatCompletionCreateParamsStreaming,
442+ signal: AbortSignal,
443+ ): AsyncGenerator<ChatCompletionChunk> {
444+ const requestBody = this._convertBody(body);
445+
446+ try {
447+ const command = new ConverseStreamCommand({
448+ ...requestBody,
449+ });
450+
451+ const client = await this.getClient();
452+ const response = await client.send(command, { abortSignal: signal });
453+
454+ if (!response?.stream) {
455+ throw new Error("No stream received from Bedrock API");
456+ }
457+
458+ this._currentToolResponse = null;
459+
460+ for await (const chunk of response.stream) {
461+ if (chunk.contentBlockDelta?.delta) {
462+ const delta: any = chunk.contentBlockDelta.delta;
463+
464+ // Handle text content
465+ if (delta.text) {
466+ yield chatChunk({
467+ content: delta.text,
468+ model: body.model,
469+ });
470+ continue;
471+ }
472+
473+ // Handle thinking content (if reasoning enabled)
474+ if (delta.reasoningContent?.text) {
475+ // TODO reasoning
476+ // Reasoning is not directly supported in OpenAI format,
477+ // but we could add it as a special message
478+ continue;
479+ }
480+
481+ // Handle tool use
482+ if (delta.toolUse?.input && this._currentToolResponse) {
483+ if (this._currentToolResponse.input === undefined) {
484+ this._currentToolResponse.input = "";
485+ }
486+ this._currentToolResponse.input += delta.toolUse.input;
487+ continue;
488+ }
489+ }
490+
491+ if (chunk.contentBlockStart?.start) {
492+ const start: any = chunk.contentBlockStart.start;
493+
494+ // Handle tool start
495+ const toolUse = start.toolUse;
496+ if (toolUse?.toolUseId && toolUse?.name) {
497+ this._currentToolResponse = {
498+ toolUseId: toolUse.toolUseId,
499+ name: toolUse.name,
500+ input: "",
501+ };
502+ }
503+ continue;
504+ }
505+
506+ if (chunk.contentBlockStop) {
507+ // End of a content block
508+ if (this._currentToolResponse) {
509+ yield chatChunkFromDelta({
510+ model: body.model,
511+ delta: {
512+ tool_calls: [
513+ {
514+ index: 0,
515+ id: this._currentToolResponse.toolUseId,
516+ type: "function",
517+ function: {
518+ name: this._currentToolResponse.name,
519+ arguments: this._currentToolResponse.input,
520+ },
521+ },
522+ ],
523+ },
524+ });
525+ this._currentToolResponse = null;
526+ }
527+ continue;
528+ }
529+ }
530+ } catch (error) {
531+ this._currentToolResponse = null;
532+ if (error instanceof Error) {
533+ if ("code" in error) {
534+ throw new Error(
535+ `AWS Bedrock stream error (${(error as any).code}): ${error.message}`,
536+ );
537+ }
538+ throw new Error(`Error processing Bedrock stream: ${error.message}`);
539+ }
540+ throw new Error(
541+ "Error processing Bedrock stream: Unknown error occurred",
542+ );
543+ }
544+ }
545+
546+ completionNonStream(
547+ body: CompletionCreateParamsNonStreaming,
548+ ): Promise<Completion> {
549+ throw new Error("Bedrock does not support completions API");
550+ }
551+
552+ completionStream(
553+ body: CompletionCreateParamsStreaming,
554+ ): AsyncGenerator<Completion> {
555+ throw new Error("Bedrock does not support completions API");
556+ }
557+
558+ fimStream(
559+ body: FimCreateParamsStreaming,
560+ ): AsyncGenerator<ChatCompletionChunk> {
561+ throw new Error("Bedrock does not support FIM directly");
562+ }
563+
564+ private async getInvokeModelResponseBody(model: string, jsonBody: object) {
565+ const payload = {
566+ body: JSON.stringify(jsonBody),
567+ modelId: model,
568+ accept: "*/*",
569+ contentType: "application/json",
570+ };
571+ const command = new InvokeModelCommand(payload);
572+ const client = await this.getClient();
573+ const response = await client.send(command);
574+ if (!response.body) {
575+ throw new Error("No response body");
576+ }
577+ const decoder = new TextDecoder();
578+ const decoded = decoder.decode(response.body);
579+ return JSON.parse(decoded);
580+ }
581+
582+ private getEmbedTexts(body: EmbeddingCreateParams): string[] {
583+ const texts: string[] = [];
584+ if (typeof body.input === "string") {
585+ texts.push(body.input);
586+ } else if (body.input.length > 0) {
587+ const firstVal = body.input[0];
588+ if (Array.isArray(firstVal)) {
589+ throw new Error("Unsupported embeddings type received: number[][]");
590+ }
591+ if (typeof firstVal === "string") {
592+ texts.push(...(body.input as string[]));
593+ } else {
594+ throw new Error("Unsupported embeddings type received: number[]");
595+ }
596+ }
597+ return texts;
598+ }
599+
600+ async embed(body: EmbeddingCreateParams): Promise<CreateEmbeddingResponse> {
601+ const texts = this.getEmbedTexts(body);
602+
603+ let embeddings: number[][];
604+ if (body.model.startsWith("cohere")) {
605+ const payload = {
606+ texts,
607+ input_type: "search_document",
608+ truncate: "END",
609+ };
610+ const output = await this.getInvokeModelResponseBody(body.model, payload);
611+ embeddings = [output.embedding];
612+ } else if (body.model.startsWith("amazon.titan-embed")) {
613+ embeddings = await Promise.all(
614+ texts.map(async (text) => {
615+ const payload = {
616+ inputText: text,
617+ };
618+ const output = await this.getInvokeModelResponseBody(
619+ body.model,
620+ payload,
621+ );
622+ return output.embeddings || [];
623+ }),
624+ );
625+ } else {
626+ throw new Error(`Unsupported model: ${body.model}`);
627+ }
628+
629+ return embedding({
630+ data: embeddings,
631+ model: body.model,
632+ usage: {
633+ prompt_tokens: 0,
634+ total_tokens: 0,
635+ },
636+ });
637+ }
638+
639+ async rerank(body: RerankCreateParams): Promise<CreateRerankResponse> {
640+ if (!body.query || !body.documents.length) {
641+ throw new Error("Query and chunks must not be empty");
642+ }
643+
644+ // Base payload for both models
645+ const payload: any = {
646+ query: body.query,
647+ documents: body.documents,
648+ top_n: body.top_k ?? body.documents.length,
649+ };
650+
651+ // Add api_version for Cohere model
652+ if (body.model.startsWith("cohere.rerank")) {
653+ payload.api_version = 2;
654+ }
655+
656+ try {
657+ const responseBody = await this.getInvokeModelResponseBody(
658+ body.model,
659+ payload,
660+ );
661+ const scores = responseBody.results
662+ .sort((a: any, b: any) => a.index - b.index)
663+ .map((result: any) => result.relevance_score);
664+
665+ return rerank({
666+ model: body.model,
667+ usage: {
668+ total_tokens: 0,
669+ },
670+ data: scores,
671+ });
672+ } catch (error) {
673+ if (error instanceof Error) {
674+ if ("code" in error) {
675+ // AWS SDK specific errors
676+ throw new Error(
677+ `AWS Bedrock rerank error (${(error as any).code}): ${error.message}`,
678+ );
679+ }
680+ throw new Error(`Error in BedrockReranker.rerank: ${error.message}`);
681+ }
682+ throw new Error(
683+ "Error in BedrockReranker.rerank: Unknown error occurred",
684+ );
685+ }
686+ }
687+
688+ list(): Promise<Model[]> {
689+ throw new Error("Method not implemented.");
690+ }
691+}
modified packages/openai-adapters/src/index.ts +3 −0
@@ -2,6 +2,7 @@
22 import { z } from "zod";
33 import { AnthropicApi } from "./apis/Anthropic.js";
44 import { AzureApi } from "./apis/Azure.js";
5+import { BedrockApi } from "./apis/Bedrock.js";
56 import { CohereApi } from "./apis/Cohere.js";
67 import { DeepSeekApi } from "./apis/DeepSeek.js";
78 import { GeminiApi } from "./apis/Gemini.js";
@@ -34,6 +35,8 @@
3435 return new OpenAIApi(config);
3536 case "azure":
3637 return new AzureApi(config);
38+ case "bedrock":
39+ return new BedrockApi(config);
3740 case "cohere":
3841 return new CohereApi(config);
3942 case "anthropic":
modified packages/openai-adapters/src/types.ts +16 −0
@@ -71,6 +71,21 @@
7171 });
7272 export type DeepseekConfig = z.infer<typeof DeepseekConfigSchema>;
7373
74+export const BedrockConfigSchema = OpenAIConfigSchema.extend({
75+ provider: z.literal("bedrock"),
76+ // cacheBehavior: z.object({
77+ // cacheSystemMessage: z.boolean().optional(),
78+ // cacheConversation: z.boolean().optional(),
79+ // }).optional(),
80+ env: z.object({
81+ region: z.string().optional(),
82+ accessKeyId: z.string().optional(),
83+ secretAccessKey: z.string().optional(),
84+ profile: z.string().optional(),
85+ }),
86+});
87+export type BedrockConfig = z.infer<typeof BedrockConfigSchema>;
88+
7489 export const LlamastackConfigSchema = OpenAIConfigSchema.extend({
7590 provider: z.literal("llamastack"),
7691 });
@@ -142,6 +157,7 @@
142157 // Discriminated union
143158 export const LLMConfigSchema = z.discriminatedUnion("provider", [
144159 OpenAIConfigSchema,
160+ BedrockConfigSchema,
145161 MoonshotConfigSchema,
146162 DeepseekConfigSchema,
147163 CohereConfigSchema,