Commit graph

21489 commits

Author SHA1 Message Date
Dallin Romney
e1d37af825 feat: add Inception Labs mercury-2 model support
Register mercury-2 (128k context, tool-calling) and mercury-edit-2 in
llm-info, add Inception Labs provider to the GUI Add Chat Model form,
and flag mercury-2 as tool-capable in PROVIDER_TOOL_SUPPORT.
2026-04-16 18:12:01 -07:00
Dallin Romney
d971363a7e
chore: vs code 1.3.39, jetbrains 1.0.68 (#11939) 2026-03-27 15:01:20 -07:00
Nate Sesti
91dde4e39a
Merge pull request #11938 from continuedev/pr-thingy 2026-03-27 15:00:59 -07:00
Dallin Romney
c9123dbecd fix: remove unnecessary version bump/PR step from prerelease workflow
The version is bumped manually prior to release, so the automated
version bump and PR creation in the publish job is unnecessary and
was causing the workflow to report as failed despite successful publishing.
2026-03-27 14:55:10 -07:00
Dallin Romney
294ba934db
fix: redirect Winston logger to stderr to prevent IPC stream corruption + fix binary tests (#11914) 2026-03-27 14:03:06 -07:00
Nate Sesti
a3dbeb346b
Merge pull request #11935 from continuedev/configs-support 2026-03-27 14:02:49 -07:00
Dallin Romney
8747c5f528 fix: use Promise.all instead of Promise.allSettled to propagate errors 2026-03-27 13:49:10 -07:00
dependabot[bot]
866452f3e4
chore(deps): bump path-to-regexp from 0.1.12 to 0.1.13 in /packages/continue-sdk (#11937)
chore(deps): bump path-to-regexp in /packages/continue-sdk

Bumps [path-to-regexp](https://github.com/pillarjs/path-to-regexp) from 0.1.12 to 0.1.13.
- [Release notes](https://github.com/pillarjs/path-to-regexp/releases)
- [Changelog](https://github.com/pillarjs/path-to-regexp/blob/v.0.1.13/History.md)
- [Commits](https://github.com/pillarjs/path-to-regexp/compare/v0.1.12...v.0.1.13)

---
updated-dependencies:
- dependency-name: path-to-regexp
  dependency-version: 0.1.13
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-27 13:47:46 -07:00
dependabot[bot]
66aebe12b8
chore(deps-dev): bump handlebars from 4.7.8 to 4.7.9 in /packages/fetch (#11936)
Bumps [handlebars](https://github.com/handlebars-lang/handlebars.js) from 4.7.8 to 4.7.9.
- [Release notes](https://github.com/handlebars-lang/handlebars.js/releases)
- [Changelog](https://github.com/handlebars-lang/handlebars.js/blob/v4.7.9/release-notes.md)
- [Commits](https://github.com/handlebars-lang/handlebars.js/compare/v4.7.8...v4.7.9)

---
updated-dependencies:
- dependency-name: handlebars
  dependency-version: 4.7.9
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-27 13:47:44 -07:00
Matt Van Horn
ae32a1b865
feat: filter session history by workspace directory (#11813)
* feat: filter session history by workspace directory

Add optional workspaceDirectory field to ListHistoryOptions so callers
can scope session lists to a specific workspace. Filtering is
case-insensitive and applied before pagination. Omitting the field
preserves the existing behavior of returning all sessions.

Fixes #9936

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: address bot review - typeof guard and test coverage

- Use typeof check instead of truthiness for workspaceDirectory to
  handle malformed session metadata safely
- Rename test to match actual coverage (limit only)
- Add separate test for combined limit+offset with workspace filter

---------

Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-27 13:41:29 -07:00
dependabot[bot]
79b8910f5d
chore(deps-dev): bump brace-expansion from 1.1.12 to 1.1.13 in /binary (#11930)
Bumps [brace-expansion](https://github.com/juliangruber/brace-expansion) from 1.1.12 to 1.1.13.
- [Release notes](https://github.com/juliangruber/brace-expansion/releases)
- [Commits](https://github.com/juliangruber/brace-expansion/compare/v1.1.12...v1.1.13)

---
updated-dependencies:
- dependency-name: brace-expansion
  dependency-version: 1.1.13
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-27 13:38:38 -07:00
dependabot[bot]
8c3f321c51
chore(deps-dev): bump brace-expansion from 1.1.12 to 1.1.13 in /core (#11931)
Bumps [brace-expansion](https://github.com/juliangruber/brace-expansion) from 1.1.12 to 1.1.13.
- [Release notes](https://github.com/juliangruber/brace-expansion/releases)
- [Commits](https://github.com/juliangruber/brace-expansion/compare/v1.1.12...v1.1.13)

---
updated-dependencies:
- dependency-name: brace-expansion
  dependency-version: 1.1.13
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-27 13:38:06 -07:00
dependabot[bot]
444303d52f
chore(deps-dev): bump handlebars from 4.7.8 to 4.7.9 in /packages/config-yaml (#11913)
chore(deps-dev): bump handlebars in /packages/config-yaml

Bumps [handlebars](https://github.com/handlebars-lang/handlebars.js) from 4.7.8 to 4.7.9.
- [Release notes](https://github.com/handlebars-lang/handlebars.js/releases)
- [Changelog](https://github.com/handlebars-lang/handlebars.js/blob/v4.7.9/release-notes.md)
- [Commits](https://github.com/handlebars-lang/handlebars.js/compare/v4.7.8...v4.7.9)

---
updated-dependencies:
- dependency-name: handlebars
  dependency-version: 4.7.9
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-27 13:35:32 -07:00
dependabot[bot]
40e2674aae
chore(deps-dev): bump handlebars from 4.7.8 to 4.7.9 in /packages/llm-info (#11912)
chore(deps-dev): bump handlebars in /packages/llm-info

Bumps [handlebars](https://github.com/handlebars-lang/handlebars.js) from 4.7.8 to 4.7.9.
- [Release notes](https://github.com/handlebars-lang/handlebars.js/releases)
- [Changelog](https://github.com/handlebars-lang/handlebars.js/blob/v4.7.9/release-notes.md)
- [Commits](https://github.com/handlebars-lang/handlebars.js/compare/v4.7.8...v4.7.9)

---
updated-dependencies:
- dependency-name: handlebars
  dependency-version: 4.7.9
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-27 13:35:25 -07:00
dependabot[bot]
0044c9c682
chore(deps): bump handlebars from 4.7.8 to 4.7.9 in /core (#11911)
Bumps [handlebars](https://github.com/handlebars-lang/handlebars.js) from 4.7.8 to 4.7.9.
- [Release notes](https://github.com/handlebars-lang/handlebars.js/releases)
- [Changelog](https://github.com/handlebars-lang/handlebars.js/blob/v4.7.9/release-notes.md)
- [Commits](https://github.com/handlebars-lang/handlebars.js/compare/v4.7.8...v4.7.9)

---
updated-dependencies:
- dependency-name: handlebars
  dependency-version: 4.7.9
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-27 13:35:16 -07:00
dependabot[bot]
8f1ebd2c82
chore(deps-dev): bump happy-dom from 20.0.2 to 20.8.9 in /extensions/cli (#11910)
Bumps [happy-dom](https://github.com/capricorn86/happy-dom) from 20.0.2 to 20.8.9.
- [Release notes](https://github.com/capricorn86/happy-dom/releases)
- [Commits](https://github.com/capricorn86/happy-dom/compare/v20.0.2...v20.8.9)

---
updated-dependencies:
- dependency-name: happy-dom
  dependency-version: 20.8.9
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-27 13:35:09 -07:00
Dallin Romney
9080d5b5b4 refactor: use Promise.allSettled for parallel config directory loading 2026-03-27 13:02:58 -07:00
Dallin Romney
890fe91d6d feat: add .continue/configs as a third config directory
Add support for loading local profiles from .continue/configs/ alongside
the existing .continue/agents/ and .continue/assistants/ directories.
2026-03-27 12:59:32 -07:00
Dallin Romney
d220a2e370
chore: jb-67-vs-38 (#11916) 2026-03-26 18:20:04 -07:00
Dallin Romney
fd7ade8f3f
fix: ensure config.yaml exists and is populated when accessed (#11915)
* fix: ensure config.yaml exists and is populated when accessed

- Opening a config profile (gear icon) now creates config.yaml with
  defaults if the file is missing, matching startup behavior
- Empty config.yaml files are detected and populated with default config
  instead of causing parse errors

* refactor: improve readability of config existence check
2026-03-26 18:19:54 -07:00
Dallin Romney
16a540c337
fix: remove Ollama template-based tool support gate (#11905)
* fix: let explicit capabilities.tools override Ollama template tool detection

The Ollama provider checks the model template from /api/show for a
`.Tools` placeholder to decide whether to pass tools to the API. For
newer models (e.g. qwen3.5) whose templates may not yet include
`.Tools`, this silently strips tools from the request — even when the
user explicitly sets `capabilities: tools: true` in config.yaml.

Use nullish coalescing so an explicit capabilities.tools setting always
wins, with the template heuristic as a fallback.

* remove verbose comments

* remove templateSupportsTools check; trust upstream tool support detection

* fix: remove extra blank line to pass prettier check
2026-03-26 16:52:20 -07:00
Dallin Romney
a067fedfdc
chore: jb-66-vs-37 (#11909) 2026-03-26 16:48:22 -07:00
Taras Malinovskii
c5490d97ea
fix(intellij): handle square brackets in file paths for autocomplete (#11474)
* fix(intellij): handle square brackets in file paths for autocomplete

Use File.toURI() instead of URI constructor for Windows two-slash
file:// URIs to properly percent-encode special characters like [ ].
Fixes #10978.

* test(intellij): strengthen Windows URI assertions for bracket encoding

Verify that square brackets are percent-encoded and drive letter
and directory structure are preserved in parsed URI path.

* fix(intellij): make Windows bracket test cross-platform

The CI runs on Linux where C: is not a drive letter.
Assert that brackets are encoded and structure is preserved
without platform-specific path assumptions.

* fix: use cross-platform URI constructor instead of File.toURI()

File.toURI() is platform-dependent — on non-Windows hosts it treats
Windows drive paths (e.g. C:/Users/...) as relative paths, producing
corrupted URIs. The multi-arg URI(scheme, host, path, fragment)
constructor is pure RFC 2396 string manipulation and works identically
on all platforms.

Also strengthens the Windows bracket test with exact equality assertions
instead of loose contains/assertFalse checks.

* chore: remove verbose comments for minimal diff

---------

Co-authored-by: Dallin Romney <dallinromney@gmail.com>
2026-03-26 15:12:38 -07:00
Dallin Romney
afd5e5e18f
fix: chunk large JCEF messages to prevent JetBrains sidebar freezes (#11899)
* fix: chunk large JCEF messages to prevent JetBrains sidebar freezes

When session data exceeds ~1MB (e.g. long conversations with many context
items), sendToWebview embeds the entire JSON payload in a single
executeJavaScript call. JCEF's JS parser/compiler cannot handle source
strings that large and freezes the IDE.

This adds a chunked sending path: payloads over 1MB are base64-encoded,
split into 512KB chunks sent as individual executeJavaScript calls that
each append to a buffer variable, then a final call decodes and dispatches
the reassembled message via window.postMessage. Each individual call is
trivial for JCEF to parse, and V8 handles the string concatenation and
final JSON.parse without issue.

Messages under 1MB (the vast majority) take the existing fast path unchanged.

* chore: trim verbose comments

* fix: clean up partial chunk buffer on failure

* fix: use array join instead of string concat for JCEF chunk reassembly

Replaces O(n²) string concatenation (+=) with O(n) array push + join
for JS-side chunk buffering. Extracts script generation into testable
buildChunkScripts() and adds unit tests for chunking logic.

* perf: increase chunk size from 512KB to 2MB

Reduces IPC round-trips by 4x (e.g. 7 calls instead of 26 for 10MB).
Safe because chunks are trivial JS with pure Base64 string literals.

* fix: decode chunked messages as UTF-8 to prevent mojibake

atob() returns Latin-1, so multi-byte UTF-8 characters (em dashes,
accented letters, CJK, emoji) were mangled. Use TextDecoder to
properly decode UTF-8 bytes after base64 decoding.
2026-03-26 14:59:21 -07:00
Dallin Romney
afb6b2111c
fix: prevent responseListeners memory leak in CoreMessenger (#11901)
Response listeners were only removed when data contained `"done": true`,
but most message types (file events, autocomplete, nextEdit, etc.)
return responses without a `done` field. This caused every fire-and-forget
request to leak its callback lambda permanently in the map.

Over a long session with heavy autocomplete and file navigation, this
could accumulate hundreds of thousands of entries (40-100+ MB).

Fix: invert the removal logic — remove the listener by default, and
only keep it when `done == false` (i.e., a streaming response is still
in progress). This preserves existing streaming behavior while ensuring
all non-streaming responses are cleaned up immediately.
2026-03-26 14:59:09 -07:00
Dallin Romney
581980e31e
fix: resolve SideEffectNotAllowedException in intention previews (#11894)
* fix: use Dispatchers.Default to avoid SideEffectNotAllowedException in JetBrains intention previews

DocumentChangeTracker and ActiveHandlerManager used Dispatchers.Main which
schedules work via INVOKE_LATER. JetBrains forbids this during intention
preview computation (autocomplete, inspections), throwing
SideEffectNotAllowedException. Neither class requires EDT for its coroutine
work, so switching to Dispatchers.Default resolves the issue.

Fixes #9463, #8035

* fix: use limitedParallelism(1) to prevent race conditions

Dispatchers.Default allows concurrent execution on a thread pool,
which breaks thread-safety for shared mutable state that was previously
serialized on the Main/EDT dispatcher. Using limitedParallelism(1)
preserves single-threaded execution while still avoiding the
SideEffectNotAllowedException from Dispatchers.Main.
2026-03-26 14:37:07 -07:00
Dallin Romney
b48183c023
fix: sync message type pass-through lists between core and JetBrains (#11902)
fix: add missing pass-through message types for JetBrains

Three message types sent by the GUI were missing from JetBrains'
PASS_THROUGH_TO_CORE list, causing them to be misrouted to the IDE
protocol handler instead of core:

- history/loadRemote (loading remote sessions)
- controlPlane/getEnvironment
- controlPlane/getCreditStatus
2026-03-26 14:36:39 -07:00
dependabot[bot]
b14dd1eb83
chore(deps): bump brace-expansion from 5.0.4 to 5.0.5 in /packages/continue-sdk (#11903)
chore(deps): bump brace-expansion in /packages/continue-sdk

Bumps [brace-expansion](https://github.com/juliangruber/brace-expansion) from 5.0.4 to 5.0.5.
- [Release notes](https://github.com/juliangruber/brace-expansion/releases)
- [Commits](https://github.com/juliangruber/brace-expansion/compare/v5.0.4...v5.0.5)

---
updated-dependencies:
- dependency-name: brace-expansion
  dependency-version: 5.0.5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-26 14:36:26 -07:00
Dallin Romney
204c9b60fe
fix: add guard for disposed JCEF browser in sendToWebview (#11897)
* fix: add guard for disposed JCEF browser in sendToWebview

Before calling executeJavaScript, check if the browser is already closed
to prevent NPE propagation from deeper in JCEF. Also broadens the catch
from IllegalStateException to Exception to handle NPE and other errors
that can occur when the browser is in a disposed state.

Fixes #8085, #9159

* fix: add log warning when sending to disposed browser

Log the message type before early-returning on a closed JCEF browser
to aid debugging silent message drops during project disposal.
2026-03-26 14:29:32 -07:00
Dallin Romney
5a8d10fff4
fix: resolve crashes in DiffStreamHandler — unsafe cast and negative line numbers (#11893)
* fix: resolve crashes in DiffStreamHandler — unsafe cast and negative line numbers

- Use safe cast (as?) for TextEditor in undoChanges() to prevent ClassCastException
- Add early return for empty documents and clamp line numbers to prevent IndexOutOfBoundsException in initUnfinishedRangeHighlights()
- Remove redundant .toList() call in rejectAll()

Fixes #4267

* refactor: inline lineNum variable in initUnfinishedRangeHighlights
2026-03-26 14:28:11 -07:00
Dallin Romney
e8d2c4e139
fix: update JetBrains binary test expected files (#11890)
fix: update binary test to expect rg instead of esbuild

The build produces a ripgrep (rg) binary, not esbuild. Also guard
against subprocess being undefined in afterAll when beforeAll fails.
2026-03-26 12:07:47 -07:00
Dallin Romney
d1d4ecb7b9
vscode 1.3.36 (#11898)
* chore: jetbrains 65, vs code 36

* vscode 36
2026-03-26 12:03:24 -07:00
Dallin Romney
ea44368968
fix: harden JetBrains remote config sync to prevent IDE freezes (#11891)
Remove Sentry error reporting from the sync catch block — the
service<ContinueSentryService>() call could itself throw from the
background thread, letting the original exception escape and silently
killing all future scheduled runs of the sync task.

Replace with IDEA Logger warnings so failures are visible in the IDE
log. Add explicit connect/read timeouts (5s) to prevent a hung server
from blocking the shared executor indefinitely. Early-return when the
remote config URL is not configured so no work is done at all.

Remove redundant addRemoteSyncJob() call from settings reset(), which
only restores UI fields and should not restart the sync.

Ref: https://github.com/continuedev/continue/discussions/8606#discussioncomment-15003299
2026-03-26 11:53:23 -07:00
Dallin Romney
403f9f811f
fix(openai-adapter): map max_tokens to max_completion_tokens for DeepSeek reasoner (#11889)
DeepSeek Reasoner models require max_completion_tokens instead of max_tokens,
similar to OpenAI's o-series models. This maps the parameter automatically
when the API base is api.deepseek.com or the model name includes
"deepseek-reasoner".

Co-authored-by: Burak Bebek <BurakBebek1@users.noreply.github.com>
2026-03-26 11:51:36 -07:00
Dallin Romney
f048649b17
chore: jetbrains 65, vs code 36 (#11892) 2026-03-26 11:51:25 -07:00
Dallin Romney
c71acb8e4b
fix: resolve critical and high security vulnerabilities (#11848)
* fix: resolve critical and high security vulnerabilities across packages

Bump vulnerable dependencies and remove unused `request` package to
address ~351 of ~394 npm audit vulnerabilities reported by GitHub.

* fix: handle nullable textContent from @mozilla/readability v0.6.0

readability.textContent can be undefined in v0.6.0, add nullish
coalescing to satisfy ArticleComponent.body type constraint.
2026-03-26 10:46:44 -07:00
Ivan L
44ca86002b
Fix StringIndexOutOfBoundsException in readRangeInFile (#11881)
* Fix StringIndexOutOfBoundsException in readRangeInFile

* fix: clamp endLine relative to startLine to ensure invariant

Ensures endLine >= startLine after clamping, preventing a potential
IllegalArgumentException from subList if both values were clamped
independently to conflicting bounds.

---------

Co-authored-by: Dallin Romney <dallinromney@gmail.com>
2026-03-26 10:46:33 -07:00
Dallin Romney
7f32540137
fix: add ModelDescription type to binary test callbacks (#11888)
Fixes TS7006 implicit any errors that broke JetBrains release CI.
2026-03-26 10:46:25 -07:00
1bcMax
becda53a17
feat: add ClawRouter as a provider for cost-optimized model routing (#11751)
* feat: add ClawRouter as a provider for cost-optimized model routing

ClawRouter is an open-source LLM router that automatically selects the
cheapest capable model for each request based on prompt complexity,
providing 78-96% cost savings on blended inference costs.

Changes:
- Add ClawRouterApi class extending OpenAI adapter
- Add 'clawrouter' provider to the type system
- Add ClawRouter models (auto, free, eco)
- Add ClawRouter provider config with UI setup
- Add ClawRouter logo
- Add documentation (clawrouter.mdx)

Closes #10843

* docs: enhance ClawRouter documentation

- Add ClawRouter to providers overview
- Expand documentation with:
  - Model capabilities configuration
  - Multiple roles setup
  - Troubleshooting section
  - Cost monitoring
  - Comparison with OpenRouter
  - Complexity dimensions explanation

* feat: add ClawRouter to core/llm/llms

- Add ClawRouter.ts extending OpenAI base class
- Register ClawRouter in llms/index.ts

* feat: add User-Agent headers for ClawRouter integration tracking

- Add 'User-Agent: Continue/IDE' header to identify Continue requests
- Add 'X-Continue-Provider: clawrouter' header for routing analytics
- Enhanced documentation with features list

This helps ClawRouter optimize routing decisions based on integration
source and enables better analytics for the Continue community.

* feat: complete ClawRouter integration with full provider support

- Add clawrouter to PROVIDER_HANDLES_TEMPLATING (autodetect.ts)
- Add clawrouter to PROVIDER_SUPPORTS_IMAGES (autodetect.ts)
- Add clawrouter tool support function (toolSupport.ts)
- Add supportsReasoningField and supportsReasoningDetailsField
- Add promptTemplates with osModelsEditPrompt
- Match OpenRouter implementation patterns

* feat: add ClawRouter to VS Code schema, docs nav, and AI SDK

- Add clawrouter to VS Code config_schema.json provider enum
- Add ClawRouter description in config_schema.json
- Add clawrouter to docs.json navigation (top-level providers)
- Add clawrouter to AI SDK PROVIDER_MAP

* docs: add wallet setup and x402 payment documentation

- Add Wallet & Payment Setup section to clawrouter.mdx
- Document payment tiers (free/eco/auto)
- Add wallet funding instructions (Solana/Base USDC)
- Add spend control configuration
- Update VS Code schema description with wallet info
- Update provider longDescription with payment options

* feat: add premium tier and enhanced ClawRouter features

- Add blockrun/premium routing profile (mission-critical tasks)
- Add dual-chain wallet support docs (Base EVM + Solana)
- Add model exclusion documentation
- Update routing profiles table with savings percentages
- Update comparison table with auth/payment differences
- Total 44+ models, 4 routing tiers

* test: add ClawRouter unit tests

- Add ClawRouter.vitest.ts (core/llm/llms)
  - Provider name verification
  - Default options validation
  - Reasoning field support
  - User-Agent header verification
  - Routing profiles acceptance

- Add ClawRouter.test.ts (openai-adapters)
  - Default apiBase
  - Custom apiBase override
  - Continue headers
  - OpenAI standard headers

- Add clawrouter tests to toolSupport.test.ts
  - blockrun/* routing profiles
  - Tool-supporting model patterns

* docs: add routing profile switching and enhanced error handling docs

- Add 'Switching Between Routing Profiles' section with full examples
- Add /model command tip for quick switching
- Add 'Error Handling' section comparing Continue vs ClawRouter
- Document automatic error recovery (429, 402, 500+, timeout)
- Add response header documentation for diagnostics
- Add AI-powered doctor command for troubleshooting

* fix: address PR review feedback - move docs to /more, resize logo, add provider constants, fix docs example

* fix: replace clawrouter logo with higher-res brand kit version (128x128)
2026-03-26 10:26:12 -07:00
Dallin Romney
f7907fff08
fix: vLLM provider should respect user-configured contextLength and model (#11868)
* fix: respect user-configured maxTokens and contextLength for autocomplete

Two fixes for autocomplete's maxTokens not being respected (#6003):

1. vLLM provider: _setupCompletionOptions() unconditionally overwrote
   the user's contextLength and model with server-reported values. Now
   user-explicit settings take priority over auto-detected values.

2. Autocomplete pipeline: renderPromptWithTokenLimit() returned
   completionOptions without maxTokens, relying on an implicit merge
   deeper in the call stack. Now maxTokens is explicitly included in
   the returned completionOptions so the value flows through to the
   API request reliably.

* remove verbose comments from Vllm provider

* style: fix prettier formatting

* fix: only set maxTokens when llm provides a value

* remove defensive-only maxTokens pass-through from autocomplete pipeline
2026-03-25 22:21:11 -07:00
Dallin Romney
393c92509f
fix: show actionable error when Ollama fails to parse tool calls (#11870)
* fix: show actionable error when Ollama fails to parse tool calls

When Ollama models (e.g. gpt-oss:20b) produce malformed tool call
output, Ollama returns "error parsing tool call" which previously
surfaced as an opaque "Unknown error".

Add pattern matching in analyzeError() to detect this specific error
and show a helpful message explaining the issue is transient, that the
user can resubmit, and that enabling "Only use system message tools"
in Settings > Experimental avoids Ollama's native tool call parser.

Fixes #11783, #11063, #10954, #10897, #10711, #10221, #9433

* fix: refine Ollama tool call error copy and matching

Tighten string match to "error parsing ollama response: error: error
parsing tool call" to avoid false positives. Soften settings suggestion
to "Enabling ... may reduce these errors".

* fix: match on Ollama's error string directly
2026-03-25 22:09:11 -07:00
Dallin Romney
9396142fb0
fix: allow correcting API key after entering an invalid one for xAI/Gemini (#11854)
* fix: update existing model API key instead of creating duplicate when re-adding

When a user enters an invalid API key for a provider (e.g. xAI or Gemini)
and later tries to add the same model again with a correct key, the
addModel function previously either skipped (exact match) or created a
duplicate with a numbered suffix. Now it detects models with the same
provider and model name and updates the existing entry in-place, allowing
users to correct their API key by re-adding the model.

Closes #9995

* fix: update existing provider models in setupProviderConfig instead of appending duplicates

When re-entering an API key through the onboarding flow, setupProviderConfig
previously appended new model entries without removing the old ones with
the invalid key. Now it filters out existing models with the same hub slug
before adding the new ones, ensuring the user ends up with a single set
of correctly-configured models.

* fix: narrow addModel update to only change apiKey on existing models

Avoid overwriting user-customized fields (apiBase, completionOptions,
title, etc.) when updating an existing model. Only the apiKey is changed.

* fix: merge API key into existing models instead of replacing or duplicating

Address review feedback: update only the API key on existing model entries
to preserve user-customized fields (roles, options, etc.).

- setupProviderConfig: merge `with` into existing hub-slug models, only
  append entries for slugs not yet in config
- addModel: narrow update to only set apiKey on matching provider+model

* fix: resolve TS2339 error for apiKey on YAML config model union type

The YAML config model type is a union that includes uses-based models
without an apiKey property. Use 'provider' in m guard and cast to any
for the assignment.

* style: fix prettier formatting

* fix: show toast and open config when model already exists, merge API keys in onboarding

When a user tries to add a model that already exists (e.g. after entering
an invalid API key), show a warning toast and open the config file so they
can update the key directly. Also fix setupProviderConfig to merge API
keys into existing models instead of creating duplicates.

Closes #9995

* refactor: remove all :any type annotations from changed code

Use 'uses' in m type guards to narrow the union type instead of
casting to any.

* fix: use modelsByRole instead of non-existent models property on ContinueConfig
2026-03-25 21:32:35 -07:00
Dallin Romney
3a997fe10c
fix: preserve tool calls when thinking models return no text content (#11866)
* fix: preserve tool calls when Qwen3-Coder returns thinking content without text

Two bugs caused Qwen3-Coder (and similar thinking models) to silently
drop tool calls:

1. Ollama: When the model produces thinking content and tool calls but
   no text content, the early return in convertChatMessage only yielded
   the thinking message, discarding tool calls entirely.

2. OpenAI/vLLM: fromChatCompletionChunk used an if/else chain where
   content was checked before tool_calls, so any chunk with both fields
   would lose its tool calls.

Fixes #8744

* revert: remove speculative openaiTypeConverters change

The vLLM "list index out of range" error is server-side (Python), not
fixable by reordering client-side chunk parsing. Keep only the Ollama
fix which addresses the confirmed bug.
2026-03-25 21:11:14 -07:00
Dallin Romney
03c8f952e8
docs: clarify where secrets can be templated from (#11865)
* docs: clarify where secrets are resolved from and IDE vs CLI differences

Reorganizes the secrets FAQ to lead with how to use secrets, then clearly
lists the resolution order. Adds a warning that IDE extensions cannot read
shell environment variables — the most common source of confusion.

Fixes #9081

* Use Mintlify <Warning> component instead of :::warning syntax

---------

Co-authored-by: continue[bot] <230936708+continue[bot]@users.noreply.github.com>
2026-03-25 21:04:45 -07:00
Dallin Romney
5f3a861a59
docs: add troubleshooting for Ollama memory errors (#11864)
* docs: add troubleshooting for "model requires more system memory" in Ollama

Add guidance for users encountering memory errors when using Ollama models
with Continue. Continue's higher default context length can trigger this
error even when models work in other tools. Documents the fix of reducing
contextLength in config, with examples for both YAML and JSON formats.

Ref: https://github.com/continuedev/continue/issues/11715

* docs: make ollama memory troubleshooting more concise

* docs: remove discussion link from ollama troubleshooting

* docs: fix broken link to ollama troubleshooting section
2026-03-25 21:04:27 -07:00
Dallin Romney
41b3b65a5c
fix: fix listener leaks and redundant file read in autocomplete (#11863)
- statusBar.ts: onDidChangeConfiguration was registered on every
  setupStatusBar() call, accumulating unbounded listeners on each
  config change or autocomplete toggle
- NextEditWindowManager: 4 event listeners in setupListeners() were
  not added to this.disposables, surviving dispose() and accumulating
  across Next Edit toggle cycles
- constructPrefixSuffix: accept pre-loaded file contents instead of
  calling ide.readFile(), eliminating a redundant file read per
  completion (the caller already has the contents loaded)
2026-03-25 21:04:20 -07:00
Dallin Romney
a33cd37041
fix(openrouter): Gemini 3 tool support, suffix stripping, thought_signature, autocomplete endpoint (#11856)
* fix: multiple OpenRouter provider improvements

- Add google/gemini-3 to tool support prefixes so Gemini 3 models are
  detected as supporting tools via OpenRouter (#8980)
- Strip :free/:extended/:beta suffixes before matching in OpenRouter
  tool support, fixing models like meta-llama/llama-3.2-3b-instruct:free
  not being recognized (#11095)
- Add thought_signature fallback for Gemini models via OpenRouter to
  prevent 400 errors when tool calling (#8980)
- Fix autocomplete/next-edit forcing legacy /completions endpoint on
  OpenRouter, which only supports /chat/completions (#3648)
- Enrich OpenRouter error messages with provider metadata details
  instead of showing generic "Provider returned error" (#11262, #11577)

* fix: remove error enrichment, add TODO for OpenRouter error extraction

* chore: clean up verbose comments and add OpenRouter tool support tests

* style: fix prettier formatting in toolSupport.ts
2026-03-25 20:31:53 -07:00
Dallin Romney
af4563b7b1
fix: hide thinking indicator for empty thinking content (#11874)
fix: hide thinking indicator when thinking content is empty

Check that resolved thinking content has non-whitespace characters
before rendering the ThinkingBlockPeek component, preventing empty
or whitespace-only thinking blocks from showing in the chat UI.
2026-03-25 20:31:44 -07:00
Dallin Romney
e8c88f416f
fix: handle multiple zip files in JetBrains release artifact step (#11873)
The Prepare Plugin Artifact step globs for continue-intellij-extension-*.zip
which matches multiple files (EAP signed/unsigned, stable signed/unsigned),
causing unzip to fail with exit code 9. Use head -1 to select only the first match.
2026-03-25 20:31:17 -07:00
Dallin Romney
7463037f4a
fix: remove inline backtick fences from tool instruction prose (#11869)
fix: remove inline backtick fences from tool instruction prose (#11674)

The system prompt prefix and suffix contained raw triple-backtick
sequences in prose text, producing an odd number of fence markers.
This made it ambiguous for models to distinguish actual tool-call
code fences from inline mentions of the syntax. Remove inline fence
syntax from prose, relying on the adjacent examples to convey the
format.
2026-03-25 18:56:15 -07:00