* feat(openrouter): send HTTP-Referer and X-Title headers to identify app
Adds `HTTP-Referer: https://www.continue.dev/` and `X-Title: Continue`
headers to all OpenRouter API requests, as recommended by the OpenRouter
docs. This lets OpenRouter attribute requests to Continue in their
dashboard and App Showcase.
Headers are injected via both `requestOptions.headers` (for SDK-based
requests) and `getHeaders()` (for direct fetch calls). User-configured
headers take precedence.
Closes#4049
* refactor: remove redundant getHeaders() override
The OPENROUTER_HEADERS are already injected via requestOptions.headers
in the constructor. Since fetchwithRequestOptions merges
requestOptions.headers into all requests (including direct fetch calls
like fimStream and rerank), the getHeaders() override was redundant.
The BlockDuplicationDetector used only the `provider` field as the
deduplication key for context entries, so multiple HTTP context providers
with different URLs/titles were collapsed to just the first one.
Use `name ?? params.title ?? provider` as the key instead, matching
how HTTP context providers identify themselves via params.title.
Fixes#9416
The Vercel stream converter was incorrectly mapping reasoning-delta
events to delta.content, causing reasoning/thinking content to be
treated as regular assistant content. This fix maps it to
delta.reasoning_content so downstream consumers can properly
distinguish reasoning from regular output.
Fixes#11069
Co-authored-by: MumuTW <clothl47364@gmail.com>
* fix: coerce MCP tool args to match schema string types
When tool call arguments are parsed via JSON.parse(), string-typed
parameters containing valid JSON (e.g. file content for .json files)
get deeply parsed into objects. Built-in tools handle this via
getStringArg(), but MCP tools with dynamic schemas had no equivalent
fix, causing write_file and similar tools to receive objects instead
of strings.
Add coerceArgsToSchema() that checks the tool's inputSchema and
re-stringifies any values that should be strings before passing
args to the MCP client.
Fixes#8510
* fix: narrow coercion to only objects/arrays, not numbers/booleans
Only re-stringify values that are objects or arrays (the actual
deep-parsing issue). Numbers and booleans passed to a string-typed
parameter are left as-is so they surface as type errors rather than
being silently converted.
New deep-dive page listing ready-to-use MCP server configs for Sentry,
Slack, Linear, PostHog, Supabase, Netlify, Atlassian, GitHub, Sanity,
Snyk, dlt, and Chrome DevTools. Cross-linked from MCP deep dive and
MCP tools pages.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: add `useResponsesApi` option to allow opting out of OpenAI Responses API
Add a `useResponsesApi` config option that, when set to false, forces
o-series and gpt-5 models to use /chat/completions instead of /responses.
This helps users whose organizations are not verified avoid "organization
must be verified" errors related to reasoning summaries and streaming.
The option gates both code paths where the Responses API is selected:
- `canUseOpenAIResponses()` in BaseLLM (native path)
- `shouldUseResponsesEndpoint()` in the OpenAI adapter
Closes#11772
Related: #8209, #7129
* feat: suggest `useResponsesApi: false` in org verification error messages
Update error detection to also catch "organization must be verified to
stream" errors (in addition to reasoning summaries), and update the
error message to suggest adding `useResponsesApi: false` to model config
as a workaround.
* fix: improve org verification error message copy
* fix: add useResponsesApi to LLMOptions in index.d.ts
The actual type definitions used by tsc are in core/index.d.ts, not in
the string template in config/types.ts.
* fix: also check provider name when detecting org verification errors
The error message from OpenAI's API doesn't always contain the word
"openai" — check the provider name from the model config as well.
* feat: detect missing authentication header error and suggest adding apiKey
* fix: handle missing auth error directly in 401 dialog block
The 401 status code handler in StreamError.tsx renders before the
customErrorMessage check, so detect the missing authentication error
inline within the 401 block.
* Revert "fix: handle missing auth error directly in 401 dialog block"
This reverts commit 0053957d2df7c64ddea2279982f5e07e2cee1020.
* style: fix prettier formatting in index.d.ts
* style: revert unrelated prettier reformatting in index.d.ts
* fix: handle undefined providerName in error analysis
* fix: use YAML-style formatting in useResponsesApi suggestion
* fix: don't skip installs by default and sync lock file version
- Comment out SKIP_INSTALLS=true in .vscode/tasks.json so installs run
by default (avoids issues with missing binaries like ripgrep, sqlite)
- Sync package-lock.json version to match package.json (1.3.34)
* fix: override undici-types to 7.18.1 to fix corrupted tarball
undici-types@7.18.2 has a corrupted tarball on the npm registry,
causing npm install to error in the install-all-dependencies script.
Override to 7.18.1 which is not affected.
* fix: lazy-load Ollama /api/show to reduce unnecessary requests
Move the /api/show call from the Ollama constructor to a lazy
ensureModelInfo() method that is only invoked on first actual model
usage (_streamComplete, _streamChat, _streamFim). The promise is
cached so subsequent calls reuse the same result.
This fixes the issue where AUTODETECT with many models caused hundreds
of /api/show requests on every config reload, since each model
instantiation fired a request in the constructor.
Additional fixes:
- Null-check regex match result to prevent runtime errors
- Use const instead of let for immutable bindings
- Don't override explicitly configured contextLength with /api/show value
- Silently ignore unparseable stop parameters
- Return empty array from listModels() on failure instead of throwing
Closes#8765
* revert silent error handling, remove verbose comments
Adds a dismissable warning banner across the GUI (VS Code + JetBrains)
announcing that Continue is entering maintenance mode. Links to the
GitHub README and the Hub config export page. The banner auto-expires
after 2026-05-09 and can be dismissed on the home/chat page but always
shows on settings/config pages.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Resolve conflicts: main already removed most free-trial references
that this branch was also cleaning up. Keep staging indicator from
this branch. Accept useCredits.ts deletion from main.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(gemini): merge consecutive same-role messages to fix ordering errors
Gemini API requires strict role alternation between "user" and "model".
When multiple tool responses (mapped to "user" role) appear consecutively,
or when consecutive assistant messages exist, the alternation breaks causing:
- "function call turn comes immediately after a user turn or after a function response turn"
- "number of function response parts is equal to the number of function call parts"
Fix: merge consecutive messages with the same role by combining their parts
arrays, applied as a post-processing step after message conversion in both
the core Gemini LLM and the openai-adapters Gemini API.
Fixes#11047, fixes#9562
* chore: remove verbose comments
* refactor: deduplicate mergeConsecutiveGeminiMessages into openai-adapters
Export from openai-adapters gemini-types and import in core, removing
the duplicate private method from both Gemini classes.
* fix: resolve TS2345 by removing explicit nullable type annotation on contents
* fix: keep mergeConsecutiveGeminiMessages in each package's own gemini-types
The core test suite mocks @continuedev/openai-adapters entirely, which
replaces the imported function with a no-op returning undefined. Define
the function in both packages' gemini-types to avoid this coupling.
* fix: respect contextLength from YAML model config
Three fixes for contextLength not being respected:
1. Add contextLength to YAML model schema at the model level (not just
inside defaultCompletionOptions), matching JSON config behavior
2. Read contextLength from both model-level and defaultCompletionOptions,
with model-level taking precedence
3. Fix GUI selector fallback using DEFAULT_MAX_TOKENS (4096) instead of
DEFAULT_CONTEXT_LENGTH (32768)
Closes#4638Closes#4304
* fix: reduce complexity in modelConfigToBaseLLM
Replace find callbacks with includes() to offset complexity from
contextLength nullish coalescing.
* docs: document contextLength at model level in config.yaml reference
* docs: consistently show contextLength in defaultCompletionOptions for YAML
YAML examples use defaultCompletionOptions.contextLength, JSON examples
use model-level contextLength. Also fixes ollama guide using the wrong
key name (completionOptions -> defaultCompletionOptions).
* refactor: extract env options into helper to reduce complexity
Extract the repetitive env-to-options mapping from modelConfigToBaseLLM
into a separate applyEnvOptions function, bringing complexity well under
the limit of 36.
Kimi-K2.5 returns 400 errors when thinking is enabled because
reasoning_content is missing from assistant tool call messages.
This adds the supportsReasoningContentField flag (as a getter gated
on kimi-* models) matching the existing DeepSeek fix, so legacy
moonshot-v1-* models are unaffected.
Fixes#11600Fixes#11711
The llama.cpp provider was not sending the `model` field in the
request body, causing 400 errors ("model name is missing from the
request") when using llama-server's model router feature.
Fixes#11244Fixes#10846
* fix: add keepAlive to YAML completion options schema
The keepAlive property was present in the JSON config schema but missing
from the YAML config schema, causing it to be silently stripped during
zod validation when users configured it under defaultCompletionOptions.
Closes#4671
* Document keepAlive option in YAML config reference
---------
Co-authored-by: continue[bot] <230936708+continue[bot]@users.noreply.github.com>
* fix: remove Llama 3.1 405B from Groq provider
The model `llama3.1-405b` is no longer available on Groq, causing 404
errors. Remove it from the Groq provider packages and provider options.
Closes#10832
* Remove llama3.1-405b from Groq model list in config_schema.json
---------
Co-authored-by: continue[bot] <230936708+continue[bot]@users.noreply.github.com>
fix: restrict childProcess.spawn to local-only environments
childProcess.spawn executes on the extension host machine. With
extensionKind: ["ui", "workspace"], the extension host almost always
runs locally. For any remote workspace (SSH, WSL, Dev Container,
Codespaces, tunnel), spawning locally either runs commands on the wrong
machine or fails with ENOENT when the local shell doesn't exist in the
extension host context.
Replace ENABLED_FOR_REMOTES (which listed all remote types) with
LOCAL_ONLY (just "" and "local"). All remote types now fall through to
ide.runCommand() which delegates to VS Code's integrated terminal and
executes in the correct remote environment.
The isWindowsHostWithRemote guard is removed as it is now redundant —
the platform-agnostic check handles all cases.
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Add bearer token authentication for Bedrock API keys as an alternative
to IAM credentials, enabling users to authenticate without exposing
AWS access keys.
Closes#6645
fix: guard against non-string NO_PROXY env value in getEnvNoProxyPatterns
Add typeof check before calling .split() on the NO_PROXY environment
variable to prevent "envValue.split is not a function" errors when the
value is not a string.
* fix: handle thinking/assistant messages at end of chat history
extractToolSequence threw "no user/tool message found" when the last
message was thinking or assistant (common with reasoning models when
assistant content is empty after thinking and gets filtered out).
* fix: guard against non-string NO_PROXY env value in getEnvNoProxyPatterns
Add typeof check before calling .split() on the NO_PROXY environment
variable to prevent "envValue.split is not a function" errors when the
value is not a string.
fix: expand tool support to prevent "Invalid tool name" errors
Models not recognized in PROVIDER_TOOL_SUPPORT fall back to a text-based
tool calling format injected into the system message. When models don't
follow this format exactly, the parser throws "Invalid tool name". This
was affecting many models that actually support native tool calling but
weren't listed.
Changes:
- Azure: add gpt-5, gpt-4.1, o1, o4 (was only gpt-4, o3)
- Ollama: add glm-4/5, deepseek, dolphin families
- DeepSeek provider: add deepseek-coder (was only chat/reasoner)
- OpenRouter: add deepseek/deepseek-v3, deepseek/deepseek-coder
Fixes#10678, #11594, #11431, #11218, #10900, #10272, #10156, #10143,
#10050, #9891, #9839
* fix(gemini): update model catalog for retired/new Gemini models
Gemini 1.x models are fully retired (returning 404), gemini-3-pro-preview
was shut down March 9 2026, and new 3.1 series models were missing.
- Add gemini-3.1-pro-preview, gemini-3.1-flash-lite-preview, gemini-3.1-flash-image-preview
- Replace gemini-3-pro-preview with gemini-3.1-pro-preview everywhere
- Remove retired Gemini 1.x models (gemini-1.0-pro, gemini-1.5-pro, gemini-1.5-flash, gemini-1.5-flash-8b)
- Remove retired experimental 2.0 image gen models
- Fix default model from retired gemini-pro to gemini-2.5-flash
- Update docs, onboarding config, VSCode schema, GUI model picker, VertexAI provider
- Update isRecommendedAgentModel regex and tests
Fixes#10996, #10998
* fix: address review comments
- Add missing gemini-3.1-flash-image-preview to VS Code schema enum
- Tighten isRecommendedAgentModel regex to match 3-flash-preview (not bare 3-flash)
- Update case-insensitivity tests for new model names
* fix: fix misleading test description and inconsistent doc heading
- Rename test to "Gemini 3.1 Pro and 3 Flash Preview models" to match assertions
- Update chat.mdx heading from "Gemini 3 Pro" to "Gemini 3.1 Pro"
* fix(openai): fix Responses API 400 errors for reasoning, tool calls, and ID handling
Three categories of OpenAI Responses API 400 errors are addressed:
1. "No tool call found for function call output with call_id" — function_call
items are now always emitted when tool calls exist (even without fc_ IDs),
and orphaned function_call_output items are removed in post-processing.
2. "Item provided without its required 'reasoning' item" — reasoning items
without encrypted_content (e.g. from saved sessions) are removed, and the
id is stripped from subsequent function_call items so the API doesn't
reject them for referencing a missing reasoning item. Trailing reasoning
items not followed by a valid successor are also removed.
3. "Expected an ID that begins with 'fc'" — responsesOutputItemIds (which
accumulates both msg_ and fc_ IDs during streaming) is now filtered to
only fc_-prefixed IDs for function_call items, preventing msg_ IDs from
being used where fc_ IDs are required.
Co-authored-by: Luna <20552038+xxsLuna@users.noreply.github.com>
Co-authored-by: Robert Benko <10097827+Quazistax@users.noreply.github.com>
Co-authored-by: pallaprolus <162944051+pallaprolus@users.noreply.github.com>
* fix(openai-adapters): don't duplicate tool call args in Vercel stream converter
The tool-call event was re-emitting the full arguments that were already
streamed via tool-input-start/delta, causing JSON.parse failures in
consumers. Now tool-call only emits extra_content when a Gemini
thoughtSignature is present, and returns null otherwise.
---------
Co-authored-by: Luna <20552038+xxsLuna@users.noreply.github.com>
Co-authored-by: Robert Benko <10097827+Quazistax@users.noreply.github.com>
Co-authored-by: pallaprolus <162944051+pallaprolus@users.noreply.github.com>
* Fix for sending x-api-key instead of api-key as header for newer azure hosted anthropic service
* Update packages/openai-adapters/src/apis/AnthropicUtils.ts
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
* fix: update test to expect x-api-key for Azure AI Foundry endpoints
Azure AI Foundry (services.ai.azure.com) uses x-api-key, while only
cognitiveservices.azure.com uses api-key. Update the test to match.
---------
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: Dallin Romney <dallinromney@gmail.com>
* add support for gemini in ai sdk
* support thought signature conversion
* capture extra_content in assistasnt tool calls
* fix: update vercelStreamConverter tests for tool-call chunk emission
The tool-call case now returns a chunk (for Gemini thoughtSignature
support) instead of null, so tests need to expect the new behavior.
---------
Co-authored-by: Nate Sesti <33237525+sestinj@users.noreply.github.com>
Co-authored-by: Dallin Romney <dallinromney@gmail.com>
chore: remove Gemini 2.0 Flash from defaults/UI/docs and update Claude defaults to 4.6
Gemini 2.0 Flash is no longer supported for new Gemini users. Remove it
from the add model form, onboarding defaults, config schema, docs, and
CometAPI supported models list. Replace with Gemini 2.5 Flash where
appropriate. Gemini 2.0 Flash remains in llm-info for existing users.
Update Claude model defaults to 4.6 series (Sonnet 4.6 and Opus 4.6) in
onboarding config, workspace block templates, and documentation examples.
- Remove Checks tab and all checks/ pages from docs
- Remove telemetry and CONTRIBUTING pages
- Make IDE Extensions the first/default tab
- Remove About Us/Blog/Changelog sidebar anchors
- Remove "Get Started" navbar link
- Update logo to link to docs instead of continue.dev
- Remove Sign In steps from install page
- Remove remaining Hub tabs from model roles docs
- Remove GitHub Discussions/community references
- Remove Authentication in CI section from headless mode
- Clean up CLI configuration to remove hub/org references
- Remove getting-started/extensions.mdx (dead redirect)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>