* add session export slash command
* import session
* Fix slashCommands test: mock path.isAbsolute and history manager
The import of historyManager in slashCommands.ts triggers
core/util/paths.ts which calls path.isAbsolute — not provided by
the existing path mock. Add the missing path exports and mock
core/util/history.js to avoid filesystem operations in tests.
---------
Co-authored-by: Dallin Romney <dallinromney@gmail.com>
- Add qwenMultifileFimTemplate supporting repository-level context
- Uses <|repo_name|>, <|file_sep|> tokens for multi-file context
- Falls back to basic FIM when no snippets provided
- Resolves issue #3589
* fix: Ollama MCP tool calling for Mistral and Gemma3 models (#9249)
Fix two issues with Ollama tool calling:
1. Mistral/Ministral: reorder messages so system messages never follow
tool messages (causes "Unexpected role 'system' after role 'tool'")
2. Gemma3: strip unsupported fields (index, id, type) from tool_calls
when converting assistant messages to Ollama format (causes "unknown
variant 'index'")
Also forward assistant toolCalls to Ollama's tool_calls format for
proper multi-turn tool calling conversations.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: resolve CI failures in prettier and jest module resolution
Remove .js extensions from jest.mock paths so the moduleNameMapper
resolves ollamaHelper and url modules correctly. Apply prettier
formatting to both changed files.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: remove relative-path jest.mock calls that break ESM resolution
The jest ESM config resolves relative mock paths from the setup file
context, not the test file, causing 'Cannot find module' errors.
These mocks are unnecessary since the test bypasses the constructor
via Object.create() and only tests pure transformation methods.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: guard unprotected JSON.parse calls in Ollama.ts
Wrap JSON.parse of tool-call arguments in _convertToOllamaMessage and
pull-progress lines in installModel with try/catch to prevent unhandled
exceptions from aborting the request flow.
Addresses Cubic review feedback on PR #11523.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Joaquin Hui Gomez <joaquinhui1995@gmail.com>
* fix: add missing type cast through unknown for ToolCall arguments
TypeScript rejects a direct cast from string to JSONSchema7Object.
Cast through unknown first to satisfy the type checker.
Signed-off-by: Joaquin <joaquin@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: guard undefined arguments before JSONSchema7Object cast
---------
Signed-off-by: Joaquin Hui Gomez <joaquinhui1995@gmail.com>
Co-authored-by: Joaquin Hui Gomez <joaquinhui1995@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* list all skills using /skills slash command
* make skills slash command invokable
* load the skill using skills tool
* make skills tool allowed by default
* add /import-skills slash command
* Update extensions/cli/src/tools/skills.ts
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
* fix stale in use effect
---------
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: Dallin Romney <dallinromney@gmail.com>
* fix(core): pass config name through ConfigResult instead of re-reading file
Rework per reviewer feedback: instead of reading config.yaml separately
in LocalProfileLoader's constructor, propagate the name field through
ConfigResult from the existing config loading pipeline.
Changes:
- Add optional configName to ConfigResult interface
- Populate configName in unroll.ts where AssistantUnrolled is built
- Propagate through loadContinueConfigFromYaml → doLoadConfig
- LocalProfileLoader now reads configName from doLoadConfig result
- Remove duplicate fs.readFileSync + parseConfigYaml from constructor
- Works in WSL and other environments where file paths may differ
Addresses: https://github.com/continuedev/continue/issues/11061
* style: fix prettier formatting in doLoadConfig.ts
---------
Co-authored-by: Dallin Romney <dallinromney@gmail.com>
- Delete auth.test.ts (login/logout removed)
- Update headless-anthropic-api-key test for new error message
- Update headless-org-flag test for removed --org validation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: preserve indentation when applying code edits via fuzzy matching
When fallback matching strategies (trimmedMatch, whitespaceIgnoredMatch)
find a match with different indentation than the LLM-provided old_string,
the replacement new_string now has its indentation adjusted to match the
actual indentation level in the file. This fixes incorrect indentation in
Python code edits where the LLM provides unindented search/replace strings
that match indented code blocks.
Fixes#11282
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(core): adjust indentation when fallback match strategies splice replacements
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add MiniMax as a new LLM provider
Add MiniMax (https://platform.minimax.io) as a new LLM provider with
OpenAI-compatible API support.
Changes:
- Add MiniMax LLM provider class extending OpenAI with temperature
clamping (must be in (0, 1]) and response_format removal
- Register provider in LLMClasses, openai-adapters, and config-types
- Add model info for MiniMax-M2.5 and MiniMax-M2.5-highspeed
(204K context, 192K max output)
- Add GUI model selection entries and provider configuration
- Add provider documentation page
* fix: use dedicated MiniMaxApi adapter instead of generic OpenAIApi
The minimax provider was wired to the generic OpenAIApi via
openAICompatible(), which skips MiniMax-specific request fixes.
This creates a dedicated MiniMaxApi adapter class that overrides
modifyChatBody to apply temperature clamping (MiniMax requires
temperature in (0.0, 1.0]) and response_format removal, matching
the adaptations already present in core/llm/llms/MiniMax.ts.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: upgrade MiniMax default model to M2.7
- Add MiniMax-M2.7 and MiniMax-M2.7-highspeed to model list
- Set MiniMax-M2.7 as default model
- Keep all previous models (M2.5, M2.5-highspeed) as alternatives
- Update docs and GUI model selection
* fix: add minimax to PROVIDER_HANDLES_TEMPLATING and PARALLEL_PROVIDERS
MiniMax uses an OpenAI-compatible chat completions API, so it handles
templating natively. MiniMax also supports parallel tool calls.
Not added to PROVIDER_SUPPORTS_IMAGES since MiniMax M2.7 is text-only.
* style: fix prettier formatting in MiniMax provider files
---------
Co-authored-by: PR Bot <pr-bot@minimaxi.com>
Co-authored-by: octo-patch <octo-patch@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Dallin Romney <dallinromney@gmail.com>
* fix: resolve "No chat model selected" error and GUI/core model mismatch
Three fixes for the model selection bugs reported in #11656 and 12+ related issues:
1. Fix loadConfig() init ordering: await isInitialized before checking
currentProfile, consistent with getSerializedConfig(). Prevents
returning config: undefined during initialization race.
2. Avoid full config reload on model selection: The config/updateSelectedModel
handler now updates the model in the cached config in-place instead of
doing a full reloadConfig(). This eliminates the window where
selectedModelByRole.chat is null during reload, and prevents the
configUpdate from core overwriting the GUI's optimistic selection.
3. Guard against undefined config in GUI: handleConfigUpdate now also
checks !configResult.config alongside configLoadInterrupted, preventing
EMPTY_CONFIG (with chat: null) from being applied.
* fix: resolve "No chat model selected" error on startup
Two fixes for the "No chat model selected" error reported in #11656 and
12+ related issues across all providers:
1. Fix loadConfig() init ordering (ConfigHandler.ts): Move
`await this.isInitialized` before the `!this.currentProfile` check,
matching the pattern already used in getSerializedConfig(). Without
this, loadConfig() called during initialization returns
config: undefined because currentProfile hasn't been set yet.
2. Guard against undefined config in GUI (ParallelListeners.tsx):
handleConfigUpdate now also checks `!configResult.config` alongside
configLoadInterrupted, preventing EMPTY_CONFIG (with
selectedModelByRole.chat: null) from being applied.
* fix: provide valid mock config to fix GUI test failures
The added `!configResult.config` guard in ParallelListeners caused tests
to bail early since MockIdeMessenger returned `config: undefined`.
fix(ollama): check model template for tool support before sending tools
Ollama models only support tool calling if their template includes
.Tools. The heuristic in toolSupport.ts was too broad, causing 400
errors for models whose templates lack tool support.
Two changes:
- Query /api/show template for .Tools (same pattern as existing .Suffix
FIM check) and skip sending tools when the template says no
- Exclude Ollama cloud models (:cloud tag) in the heuristic, since
cloud tool calling is unreliable
Fixes#9639#9646#9875#10304#10461#10539#10561#10593#10640Fixes#10672#10833#10876#11308#11382#11402
* Improve error handling UX and move stream retry to BaseLLM
- Remove issue reporting buttons (GitHub/Discussions) from stream error dialog
- Add error detection for invalid API keys, OpenAI org verification,
insufficient balance (402), and failed secret templating
- Update out-of-credits copy to match current messaging
- Add sk- prefix validation for OpenAI/Anthropic keys in add model form
- Update OpenRouter API key URL to workspaces/default/keys
- Move overloaded/malformed JSON retry from GUI streamThunkWrapper to
BaseLLM _retryableStream to avoid glitchy UI from GUI-level retries
- Add overloaded/malformed JSON detection to core retry infrastructure
* fix: simplify retry architecture and make sk- validation a warning
- Remove _retryableStream from BaseLLM; overloaded/malformed JSON retry
belongs in withExponentialBackoff at the HTTP fetch level
- Revert defaultShouldRetry/calculateDelay exports (no longer needed externally)
- Keep OpenRouter API key URL unchanged
- Make sk- prefix validation a warning instead of blocking error
* Fix stale comment referencing removed retry decorator
* Improve 402 Insufficient Balance error message clarity
* fix: improve copy - rename "View key" to "Check API key", use warning styles, simplify secret error message
* fix: use ternary for className to avoid space stripping by prettier
* style: fix prettier formatting in OutOfCreditsDialog
---------
Co-authored-by: continue[bot] <230936708+continue[bot]@users.noreply.github.com>
* fix(openai-adapters): map reasoning-delta to reasoning_content
* Fix system-message tool parser for non-terminal tool calls
* Fix duplicate predefined tools in dynamic system-message section
* fix(openai-adapters): fix TS syntax error in vercelStreamConverter test
The `as typeof X & Y` type assertion was ambiguous to the TypeScript
parser without parentheses, causing TS1005 errors across all CI checks.
Simplify to `as any` since this is a test assertion.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore: remove unrelated vercelStreamConverter changes
Per reviewer feedback — keeping this PR focused on the
system-message tools parser fix.
* fix: correct test expectations for post-tool-call content preservation
The 'preserves content after a tool call' test incorrectly consumed the
trailing newline and preserved text within the tool-call loop. Adjusted
the loop count from 6 to 4 (actual tool-call deltas) and added explicit
assertions for the trailing newline and preserved content chunks.
The 'mid-message' test was missing an assertion for the newline chunk
emitted between the closing codeblock fence and trailing text.
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: MumuTW <mumu@novel98.com>
Node.js v20 entered Maintenance LTS six months ago. Update the version
from v20.19.0 (released over a year ago) to v20.20.1, the latest LTS
release this month.
This ensures the project leverages recent Node.js improvements,
including security updates, and stays on a supported LTS track.
fix(registryClient): handle relative file paths more robustly
First attempt to resolve relative paths against current working directory before falling back to rootPath. This provides better flexibility when files are not located relative to rootPath.
* feat(cli): discover .continue/checks/ in cn review
The README and quickstart docs tell users to create check files in
.continue/checks/, but cn review only discovered files from
.continue/agents/. This caused a broken onboarding path where users
following the docs would get zero reviews when testing locally.
resolveFromLocal() now reads from both .continue/agents/ and
.continue/checks/, deduplicating by filename. Files in agents/ take
precedence if the same filename exists in both directories.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(cli): correct readdirSync mock types in resolveReviews tests
Cast mock implementations with `as typeof fs.readdirSync` instead of
returning `as unknown as fs.Dirent[]`. The CI lint step runs
`tsc --noEmit` which caught the type mismatch.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* fix: add default timeout for terminal command tool execution
Terminal commands with waitForCompletion=true had no timeout, risking
indefinite hangs. Adds a 2-minute default timeout with graceful
SIGTERM -> 5s grace period -> SIGKILL escalation. Both streaming
and non-streaming code paths are covered. The SIGKILL timer is
properly cleared if the process exits during the grace period.
* fix: correct process running check and clear SIGKILL timer
Replace `childProc.killed` with `exitCode === null && signalCode === null`
for accurate process-state detection, and clear sigkillTimeoutId in error
handlers to prevent delayed kills after rejection.
Applied to both streaming and non-streaming paths.
---------
Co-authored-by: amabito <192487536+amabito@users.noreply.github.com>
Co-authored-by: amabito <amabito@local>
Remove all ControlPlaneClient infrastructure, WorkOS auth, managed proxy,
platform profile loading, org policy enforcement, and credits UI.
Config is now fully local — only file-based config.yaml and .env secrets.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: include reasoning_content field for DeepSeek Reasoner models
DeepSeek Reasoner API requires the reasoning_content field on every
assistant message, even when no thinking message precedes it (e.g. in
resumed sessions). Previously, appendReasoningFieldsIfSupported returned
early when prevMessage was missing or not a thinking role, causing 400
"Missing reasoning_content field" errors. Now reasoning_content defaults
to an empty string when no thinking content is available.
Fixes#11285
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: use stripImages instead of typecast for MessageContent
Replace `as string` typecasts with stripImages() which safely handles
both string and MessagePart[] content types.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
When the extension runs in the Local Extension Host on Windows while
connected to a remote workspace (SSH, Dev Container, etc.),
getWorkspaceDirs() returns vscode-remote:// URIs. These cannot be used
as a cwd for child_process.spawn(), causing "spawn cmd.exe ENOENT"
when starting MCP stdio servers.
Fall back to the user's home directory for non-file:// URIs so the
spawn has a valid local working directory.
Fixes#10842
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Local models respond to the existing single-sentence Apply prompt with
prose summaries instead of code. Return ChatMessage[] with explicit
code-only instructions and assistant prefill to force code output.
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Delete freeTrialTransition.ts, FreeTrialStatus.tsx, FreeTrialTransitionUI.tsx,
StarterCreditsButton.tsx, StarterCreditsPopover.tsx, and related tests/mocks.
Strengthen free-trial provider filtering to hard-drop (no more warnings).
Remove checkForOutOfStarterCredits from streamChat. Simplify useCredits
hook to a one-time fetch (no polling). Remove freeTrialExceeded listener
from Layout. Clean up navigation context and toolbar references.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Migrates the docs site from remote-config-server to this repo as a
standalone static Next.js app. Key changes:
- Copy app-docs from remote-config-server to docs-site/
- Configure `output: 'export'` for static HTML generation
- Replace API routes with build-time scripts (search index, image copy)
- Add generateStaticParams() to enumerate all doc slugs at build time
- Convert server-side redirects to client-side redirects
- Point DOCS_DIR to sibling ../docs directory
- Add GitHub Actions workflow for deploying to GitHub Pages
- Add missing Radix UI dependencies (accordion, tabs) to package.json
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Documents all GitHub Actions secrets, publishing tokens, AI provider
keys, and CI/CD dependencies organized by category.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
fix: harden system message tools instructions and wire toolOverrides to system message path
The system message tools path (used when models don't support native tool
calling) had two issues:
1. Weak format instructions - the prefix/suffix used vague prose that local
models often ignored, reverting to XML or JSON tool call formats from
their training priors. Replaced with explicit numbered rules that
prohibit alternative formats.
2. toolOverrides silently ignored - applyToolOverrides() existed and ran on
the native tools path (in BaseLLM.streamChat), but was never called on
the system message path. Config YAML toolOverrides for disabled and
description had no effect when tools were injected via system message.
Fixed by:
- Strengthening systemMessagePrefix/Suffix in toolCodeblocks framework
- Adding toolOverrides to ModelDescription interface and serialization
- Calling applyToolOverrides() in streamNormalInput before both paths
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* refactor: unify AbortError detection with isAbortError utility
AbortError detection was scattered across 3+ patterns (string
comparison, .name check, .code check). Consolidates into a single
isAbortError() utility that handles all known patterns: "cancel"
string, DOMException, Error.name variants, ABORT_ERR code, and
plain objects. Updates call sites in core/llm/index.ts and
core/llm/utils/retry.ts.
* fix: use exact match for AbortError name, add null guard, improve tests
- Changed .includes("AbortError") to === "AbortError" to preserve
original exact-match semantics at L505 and retry.ts call sites
- Added null/undefined early return to prevent TypeError on
"name" in null
- Unified DOMException branch to use exact match consistently
- Tests: removed 4 redundant same-branch duplicates, added 12 new
cases (case sensitivity, empty string, non-string name, partial
name boundary, DOMException negative, plain object code asymmetry,
boolean, frozen object, Error subclass, TypeError)
- Fixed DOMException test skip from expect(true).toBe(true) to
it.skipIf
* fix: replace == null with === null || === undefined (eqeqeq)
---------
Co-authored-by: amabito <192487536+amabito@users.noreply.github.com>
Co-authored-by: amabito <amabito@local>
* feat: add Tensorix as an LLM provider
Adds Tensorix (https://tensorix.ai) as a new OpenAI-compatible
provider, giving users access to DeepSeek, Llama 4, Qwen, GLM,
and other models through a single API key.
Changes:
- New LLM class (core/llm/llms/Tensorix.ts)
- Registered in LLM index and config schema
- Added to VS Code extension config schema
- Added to GUI provider selection with AUTODETECT
* Fix missing commas in config_schema.json for tensorix entries
Co-authored-by: openhands <openhands@all-hands.dev>
* feat: address reviewer feedback for Tensorix provider
- Add tensorix to openai-adapters (types.ts + index.ts)
- Add tensorix to PROVIDER_HANDLES_TEMPLATING, PROVIDER_SUPPORTS_IMAGES,
and PARALLEL_PROVIDERS in autodetect.ts
- Add docs page for Tensorix under more providers
- Add tensorix to docs.json navigation
Co-authored-by: openhands <openhands@all-hands.dev>
---------
Co-authored-by: openhands <openhands@all-hands.dev>