Commit graph

999 commits

Author SHA1 Message Date
Dallin Romney
7db7af6005
Merge pull request #8512 from continuedev/fix/terminal-security-newline-bypass
fix(terminal-security): prevent newline bypass in command validation
2025-11-21 16:23:42 -08:00
Dallin Romney
9448bd8ffd
Merge pull request #8383 from dcs-soni/fix/improve-url-parsing
fix: improve image URL parsing robustness across providers
2025-11-21 14:44:22 -08:00
dependabot[bot]
c55f3f2004
chore(deps): bump glob, semantic-release and @semantic-release/npm
Bumps [glob](https://github.com/isaacs/node-glob) to 10.5.0 and updates ancestor dependencies [glob](https://github.com/isaacs/node-glob), [semantic-release](https://github.com/semantic-release/semantic-release) and [@semantic-release/npm](https://github.com/semantic-release/npm). These dependencies need to be updated together.


Updates `glob` from 10.4.5 to 10.5.0
- [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/node-glob/compare/v10.4.5...v10.5.0)

Updates `semantic-release` from 24.2.8 to 25.0.2
- [Release notes](https://github.com/semantic-release/semantic-release/releases)
- [Commits](https://github.com/semantic-release/semantic-release/compare/v24.2.8...v25.0.2)

Updates `@semantic-release/npm` from 12.0.2 to 13.1.2
- [Release notes](https://github.com/semantic-release/npm/releases)
- [Commits](https://github.com/semantic-release/npm/compare/v12.0.2...v13.1.2)

---
updated-dependencies:
- dependency-name: glob
  dependency-version: 10.5.0
  dependency-type: indirect
- dependency-name: semantic-release
  dependency-version: 25.0.2
  dependency-type: direct:development
- dependency-name: "@semantic-release/npm"
  dependency-version: 13.1.2
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-21 20:54:45 +00:00
dcs-soni
1c7668c3fd run prettier 2025-11-21 13:14:31 +05:30
dcs-soni
70dfab942f fix run prettier 2025-11-21 13:09:05 +05:30
Divyanshu Soni
b4526bf4fb fix: move url utils from core to openai adapters 2025-11-21 06:29:14 +00:00
Aaron Lippold
63abf6b43d
fix(openai-adapters): extend auth header override to support x-api-key (#8779)
* fix(openai-adapters): extend auth header override to support x-api-key

Extends the fix from PR #8684 to handle x-api-key header in addition to
Authorization header.

Background:
- Continue sends duplicate auth headers where the first is malformed
- PR #8684 fixed this for Authorization header
- Same issue affects x-api-key header used by some OpenAI-compatible APIs

Changes:
- Rename function to letRequestOptionsOverrideAuthHeaders (more generic)
- Check for both Authorization AND x-api-key in requestOptions.headers
- Remove default headers if custom ones are provided
- Handles Headers object, array, and plain object formats

Impact:
- Fixes authentication with APIs that use x-api-key header
- Enables use of MITRE AIP and similar enterprise endpoints
- Maintains backward compatibility with existing configs

Related: #7047 (duplicate headers bug)
Extends: #8684 (Authorization header fix)

Tested-with: MITRE AIP endpoints using x-api-key authentication

Authored by: Aaron Lippold <lippold@gmail.com>

* test(openai-adapters): add tests for auth header override fix

Add comprehensive tests for the customFetch auth header override functionality:
- Test Authorization header override
- Test x-api-key header override
- Test Headers object handling
- Test array of tuples handling
- Test case-insensitive matching
- Test no override when requestOptions empty

All tests pass.

Related: #7047, #8684

Authored by: Aaron Lippold <lippold@gmail.com>

* test: update to structural tests per reviewer feedback

Changed from integration tests to structural/smoke tests that verify
the customFetch function behavior without complex fetch stack mocking.

Tests now verify:
- Function exports and structure
- Returns callable functions
- Handles all requestOptions variations
- Doesn't throw on edge cases
- Case-insensitive header handling

Per reviewer feedback, this avoids false confidence from incomplete
integration tests while still validating the function works correctly.

Related: Reviewer feedback on PR #8779

* ci: add GitHub Actions to publish MITRE CLI package

Automates building and publishing the patched Continue CLI:
- Builds on push to mitre branch
- Publishes to GitHub Package Registry as @mitre/continue-cli
- Creates release artifacts
- Uploads distribution tarball

Team can install via:
  npm install -g @mitre/continue-cli --registry=https://npm.pkg.github.com

Or download tarball from releases.

Authored by: Aaron Lippold <lippold@gmail.com>

* chore: remove MITRE-specific workflow from upstream PR

This workflow is for MITRE fork only, not needed in upstream.

Authored by: Aaron Lippold <lippold@gmail.com>

* fix(openai-adapters): correct Responses API model detection regex

The RESPONSES_MODEL_REGEX was too broad, matching any model starting
with "o" (e.g., "openai/gpt-oss-120b"). This caused Continue to
incorrectly use the Responses API for non-reasoning models.

Changed regex from /^(?:gpt-5|gpt-5-codex|o)/i
to /^(?:gpt-5|gpt-5-codex|o[0-9])/i to only match:
- gpt-5, gpt-5-codex (GPT-5 series)
- o1, o3, o4, etc. (OpenAI O-series reasoning models)

This prevents false positives for model names like:
- openai/gpt-oss-120b (Cloudflare Workers AI model)
- ollama/... (Ollama models)
- Any other model with provider prefix starting with "o"

Tested with openai/gpt-oss-120b - now correctly uses
/v1/chat/completions instead of /v1/responses.

Authored by: Aaron Lippold <lippold@gmail.com>
2025-11-19 14:33:55 -08:00
Dallin Romney
28cdb4e586 Merge branch 'main' of https://github.com/continuedev/continue into fix/terminal-security-newline-bypass 2025-11-18 20:23:34 -08:00
Dallin Romney
d62f6d2070
Merge pull request #8597 from maxbrunet/feat/cohere-2025-2
feat(cohere): add support from Reasoning/Vision/Translate models
2025-11-18 20:20:23 -08:00
Dallin Romney
b11c958c3f
Merge pull request #8776 from continuedev/dallin/super-snyk
chore: dependency bumps
2025-11-18 17:09:55 -08:00
Dallin Romney
26bb2153f0 Merge branch 'main' of https://github.com/continuedev/continue into dallin/mcp-oauth-cli 2025-11-18 16:47:18 -08:00
Dallin Romney
440b2288ac merge: main 2025-11-18 16:32:54 -08:00
snyk-bot
1157c7a793
fix: packages/continue-sdk/package.json & packages/continue-sdk/package-lock.json to reduce vulnerabilities
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-GLOB-14040952
2025-11-18 23:43:26 +00:00
Dallin Romney
87ad3cdb3e Merge branch 'main' of https://github.com/continuedev/continue into dallin/mcp-oauth-cli 2025-11-18 15:43:21 -08:00
Dallin Romney
a7fe934326
Merge pull request #8774 from continuedev/dallin/binary-package-sync
fix: binary package lock issue
2025-11-18 15:43:02 -08:00
Dallin Romney
03b5635215
Merge pull request #8684 from visadb/main
openai-adapters: allow overriding authorization header
2025-11-18 10:45:16 -08:00
Dallin Romney
8ee37e78e5 fix: openai-adapters bumps 2025-11-18 10:28:48 -08:00
Dallin Romney
73c2304e12 fix: bump openai-adapters 2025-11-18 10:28:16 -08:00
Dallin Romney
f59f4c37be chore: dependency bumps from snyk prs 2025-11-18 10:23:40 -08:00
Dallin Romney
812b4e74e6 fix: config yaml bump 2025-11-18 10:03:04 -08:00
Dallin Romney
0c5fbfcf24 fix: cubic feedback 2025-11-17 19:22:07 -08:00
Dallin Romney
6f6c952430 fix: MCP oauth http error code 405 2025-11-17 18:59:14 -08:00
Dallin Romney
6f992b7430
Merge pull request #8679 from continuedev/snyk-upgrade-be636b00f90d5539ef85f464dc50f262
[Snyk] Upgrade openai from 4.96.2 to 4.104.0
2025-11-11 11:59:56 -08:00
Visa de Bruijn
6ad933052d openai-adapters: allow overriding authorization header
Enable overriding OpenAI client's Authorization header by removing it if
the user provides a custom authorization header with `requestOptions: {
headers: { Authorization: Basic ... } }`

OpenAI client will always send an `Authorization: Bearer` header since
`apiKey` is a mandatory parameter. Previously, both the OpenAI header
and the custom header were sent, breaking at least vLLM set up with
basic auth. And it seems like multiple Authorization headers is a breach
of the HTTP RFC specs, so there should be no justifiable use case to
send more than one.
2025-11-11 11:34:42 +02:00
snyk-bot
8cbf658c69
fix: upgrade @continuedev/config-yaml from 1.26.0 to 1.29.0
Snyk has created this PR to upgrade @continuedev/config-yaml from 1.26.0 to 1.29.0.

See this package in npm:
@continuedev/config-yaml

See this project in Snyk:
https://app.snyk.io/org/continue-dev-inc.-default/project/7c2b7ca8-3a08-4ca5-83da-e0b4f19cdc53?utm_source=github&utm_medium=referral&page=upgrade-pr
2025-11-11 08:28:39 +00:00
snyk-bot
6910360b14
fix: upgrade openai from 4.96.2 to 4.104.0
Snyk has created this PR to upgrade openai from 4.96.2 to 4.104.0.

See this package in npm:
openai

See this project in Snyk:
https://app.snyk.io/org/continue-dev-inc.-default/project/e187e2ff-bef1-48d3-91db-63a4a4ee53f5?utm_source=github&utm_medium=referral&page=upgrade-pr
2025-11-11 08:19:18 +00:00
Dallin Romney
16f02a20e2
Merge pull request #8655 from continuedev/dallin/mcp-fixes-stderr
Fix: MCP error output and bugfixes
2025-11-10 15:39:21 -08:00
Dallin Romney
3be66497e1
Merge pull request #8639 from continuedev/snyk-upgrade-dd64db0153fb4e794c835e8d26bf9934
[Snyk] Upgrade @aws-sdk/credential-providers from 3.890.0 to 3.913.0
2025-11-10 12:07:28 -08:00
Dallin Romney
352232f54a
Merge pull request #8638 from continuedev/snyk-upgrade-b5c9e2c14473ab5f8e0a20c4a0aaa2fb
[Snyk] Upgrade @continuedev/config-yaml from 1.15.1 to 1.29.0
2025-11-10 12:00:28 -08:00
Dallin Romney
a79e28f189 fix: various mcp fixes and error/warnings 2025-11-09 18:38:01 -08:00
snyk-bot
bea95b982d
fix: upgrade @anthropic-ai/sdk from 0.62.0 to 0.67.0
Snyk has created this PR to upgrade @anthropic-ai/sdk from 0.62.0 to 0.67.0.

See this package in npm:
@anthropic-ai/sdk

See this project in Snyk:
https://app.snyk.io/org/continue-dev-inc.-default/project/543e8bdd-68af-42af-88a3-ce1fb9706fc9?utm_source=github&utm_medium=referral&page=upgrade-pr
2025-11-08 08:44:10 +00:00
snyk-bot
709862de57
fix: upgrade @aws-sdk/credential-providers from 3.890.0 to 3.913.0
Snyk has created this PR to upgrade @aws-sdk/credential-providers from 3.890.0 to 3.913.0.

See this package in npm:
@aws-sdk/credential-providers

See this project in Snyk:
https://app.snyk.io/org/continue-dev-inc.-default/project/543e8bdd-68af-42af-88a3-ce1fb9706fc9?utm_source=github&utm_medium=referral&page=upgrade-pr
2025-11-08 08:44:02 +00:00
snyk-bot
d7ca14b988
fix: upgrade @continuedev/config-yaml from 1.15.1 to 1.29.0
Snyk has created this PR to upgrade @continuedev/config-yaml from 1.15.1 to 1.29.0.

See this package in npm:
@continuedev/config-yaml

See this project in Snyk:
https://app.snyk.io/org/continue-dev-inc.-default/project/543e8bdd-68af-42af-88a3-ce1fb9706fc9?utm_source=github&utm_medium=referral&page=upgrade-pr
2025-11-08 08:43:57 +00:00
Dallin Romney
577e74817c
Merge pull request #8594 from continuedev/dallin/remove-applied-rules-from-history
feat: remove applied rules from chat history
2025-11-07 12:53:38 -08:00
Maxime Brunet
9525ea8794
feat(cohere): add support from Reasoning/Vision/Translate models 2025-11-04 20:25:44 -03:00
Dallin Romney
c858aee559 feat: remove applied rules from chat history and dev data
Co-authored-by: Andrius Grabauskas <agrabauskas@palantir.com>
2025-11-04 12:42:01 -08:00
snyk-bot
a86976fee9
fix: upgrade zod from 3.24.2 to 3.25.76
Snyk has created this PR to upgrade zod from 3.24.2 to 3.25.76.

See this package in npm:
zod

See this project in Snyk:
https://app.snyk.io/org/continue-dev-inc.-default/project/b4438be7-302a-4f5b-9715-3132cc0e53b3?utm_source=github&utm_medium=referral&page=upgrade-pr
2025-11-04 07:18:35 +00:00
Nate Sesti
787350f5ed
[Snyk] Upgrade @continuedev/config-yaml from 1.14.0 to 1.26.0 (#8505)
fix: upgrade @continuedev/config-yaml from 1.14.0 to 1.26.0

Snyk has created this PR to upgrade @continuedev/config-yaml from 1.14.0 to 1.26.0.

See this package in npm:
@continuedev/config-yaml

See this project in Snyk:
https://app.snyk.io/org/continue-dev-inc.-default/project/7c2b7ca8-3a08-4ca5-83da-e0b4f19cdc53?utm_source=github&utm_medium=referral&page=upgrade-pr

Co-authored-by: snyk-bot <snyk-bot@snyk.io>
2025-11-03 15:05:25 -08:00
continue[bot]
96cbab156f style: run prettier on terminal security code
Fix code formatting to pass prettier checks in CI.

Generated with [Continue](https://continue.dev)

Co-Authored-By: Continue <nate@continue.dev>
Co-authored-by: Username <nate@continue.dev>
2025-10-30 00:56:55 +00:00
continue[bot]
3e66f6ebb1 fix(terminal-security): add explicit type annotation for TypeScript
Add explicit ToolPolicy type annotation to mostRestrictivePolicy variable
to fix TypeScript compilation error in CI. TypeScript was inferring a
narrower type that didn't include 'disabled', causing type mismatch errors.

Generated with [Continue](https://continue.dev)

Co-Authored-By: Continue <nate@continue.dev>
Co-authored-by: Username <nate@continue.dev>
2025-10-30 00:51:52 +00:00
continue[bot]
bbb72d13b8 fix(terminal-security): prevent newline bypass in command validation
Fixes a security vulnerability where an attacker could bypass the terminal
command allow-list by using newline characters (\n, \r\n, \r) as command
separators.

The issue occurred because shell-quote treats literal newlines as whitespace,
causing multiple newline-separated commands to be evaluated as a single
command. This allowed dangerous commands to be hidden after safe commands.

Changes:
- Split input on line breaks before parsing with shell-quote
- Evaluate each line independently and return the most restrictive policy
- Added comprehensive tests for newline bypass scenarios
- Tests cover Unix (\n), Windows (\r\n), and old Mac (\r) line endings

Security Impact:
- Prevents bypass of allow-list using 'ls\nopen -a Calculator'
- Prevents bypass of allow-list using 'echo hello\nnpm install malicious'
- Critical commands (sudo, rm -rf /) are still properly blocked
- High-risk commands now correctly require permission

Generated with [Continue](https://continue.dev)

Co-Authored-By: Continue <nate@continue.dev>
Co-authored-by: Username <nate@continue.dev>
2025-10-30 00:49:31 +00:00
Nate Sesti
091b87602e
Add cache_write_tokens and cache_read_tokens to Anthropic prompt token details (#8511) 2025-10-29 16:01:04 -07:00
Patrick Erichsen
67033627b3
feat: impl Responses API in oai-adapters (#8417)
* feat: add GPT-5 Codex model support

- Add GPT-5 Codex to llm-info package with 500k context and 150k max tokens
- Add model definition to models.ts for UI configuration
- Include GPT-5 Codex in OpenAI provider packages list
- Model supports chat and edit roles with tool_use capability

* feat: impl Responses API in oai-adapters

* fix chat describer

* Update openai.ts

* fix llm-info

* address dallin's feedback
2025-10-29 13:17:32 -07:00
Dallin Romney
5fa2415e9b
fix: mcp agent policies and deduplicate blocks when merging unrolled assistants (#8376)
* fix: deduplicate blocks when merging config yaml

* fix: tool policies for mcp servers in agent mode

* fix: syntax error

* fix: cli tests

* fix: don't log

* fix: lint/format

* fix: better comments for tool policies

* fix: one test left

* fix: failing services test

* fix: lint and format
2025-10-22 14:41:41 -07:00
Patrick Erichsen
8fe0288937
chore: bump fetch for oai adapters (#8379) 2025-10-21 18:03:42 -07:00
Patrick Erichsen
b72b261376
fix: remove keepAliveMsecs from fetch agent (#8378)
* fix: remove `keepAliveMsecs` from fetch agent

* fix tests
2025-10-21 15:49:20 -07:00
Dallin Romney
6b2edc662d
Revert "fix: bracket stripping in gemini responses" (#8332) 2025-10-18 08:51:33 -07:00
Continue Agent
2b63687cd1 Remove deprecated gemini-2.5-pro-exp-03-25 model
- Removed gemini-2.5-pro-exp-03-25 from Gemini provider model list
- Removed gemini25ProExp configuration from GUI models list
- Updated VSCode config schema to exclude deprecated model
- Updated VertexAI provider to remove deprecated model
- Users should use gemini-2.5-pro or gemini-2.5-pro-latest instead

Co-authored-by: Username <brian@continue.dev>
2025-10-17 18:21:09 +00:00
Dallin Romney
6d08fdc176
Merge pull request #8280 from uinstinct/gemini-streamsse
fix: bracket stripping in gemini responses
2025-10-17 09:53:13 -07:00
Nate Sesti
c297e443a7
feat: report cache write tokens from anthropic oai adapter (#8210) 2025-10-17 09:37:54 -07:00