Commit graph

1123 commits

Author SHA1 Message Date
Nate
697260712b fix: update anthropic adapter tests to expect cache_control on user messages
The systemAndTools caching strategy now adds cache_control to the last
two user messages via addCacheControlToLastTwoUserMessages(). Update
existing test expectations to include the cache_control field.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 18:08:13 -08:00
Nate
a7dcf8bd84 fix: add 'as any' casts for cache_read_tokens on PromptTokensDetails
The OpenAI PromptTokensDetails type doesn't include cache_read_tokens
(it's an Anthropic extension). Add 'as any' casts to fix TypeScript
build errors in the battle test file.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 17:55:05 -08:00
Nate
2a1b945f2c test: add battle test suite for Anthropic prompt caching scenarios
7 distinct scenarios covering tool use round-trips, parallel tool calls,
long 8-turn conversations, large tool results (~200 lines), cache
invalidation on system message changes, identical request replays, and
multi-step agentic workflows with chained tool calls.

All scenarios validate cache hit rates >90% where expected and proper
cache misses when the system message changes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 17:37:59 -08:00
Nate
30406a0cda feat: add turn-level caching to systemAndTools strategy + PostHog cache metrics + live API test
- Add addCacheControlToLastTwoUserMessages call in systemAndToolsStrategy
  so the CLI path caches conversation turns (matching VS Code extension behavior)
- Report prompt_cache_metrics to PostHog with cache_read/write tokens and hit rate
- Add live API integration test validating cache writes on turn 1 and 99%+ hit
  rates on subsequent turns (guarded by ANTHROPIC_API_KEY env var)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 17:28:06 -08:00
Nate Sesti
98c99d3a63
Merge pull request #10622 from uinstinct/ai-sdk-standalone
chore: remove feature flagged ai sdk usage
2026-02-23 20:10:38 -08:00
Dallin Romney
a2c1fe6897
feat: model updates and + z.ai (#10638)
* Add latest model definitions across providers

Add new models for OpenAI (gpt-4.1, gpt-5.2, codex-mini, o1/o3/o4-mini),
Gemini (2.5 stable, 2.5-flash-lite, 3-flash-preview), Mistral (devstral,
magistral, ministral, mistral-nemo), xAI (grok-4-fast, grok-4-1-fast,
grok-3-fast), and Bedrock (Claude 4.5/4.6, Nova, Llama 4, DeepSeek).

Update tool support and reasoning detection for the new model families.

* Add Z.ai (GLM) provider, Kimi K2/K2.5 models, and fix OpenRouter tool support bug

- Add Z.ai as a new provider with GLM-5, GLM-4.7, GLM-4-plus, GLM-4.5 models
- Add Kimi K2 and K2.5 model packages to Moonshot provider
- Fix variable shadowing bug in OpenRouter tool support where loop
  variables shadowed the outer model parameter, causing specificModels
  and supportedContains checks to always return true
- Add moonshotai/kimi and zai-org/glm to OpenRouter supported prefixes
- Add Z.ai and Moonshot to docs navigation

* Clean up unnecessary import aliases for zAI

* Add Z.ai Coding Plan endpoint note to docs

* Replace placeholder zai.png icon with proper zAI.svg

* Add zAI provider to openai-adapters

* Fix Z.ai API key URL
2026-02-20 00:35:44 -08:00
uinstinct
85f21402be recheck expectUsage 2026-02-18 18:59:12 +05:30
uinstinct
2fc6f36a16 update tests to test on ai sdk 2026-02-18 18:48:47 +05:30
uinstinct
71830c26e2 remove vercel_ai_sdk.md 2026-02-18 18:44:08 +05:30
uinstinct
811bb12d09 remove feature flagged USE_VERCEL_AI_SDK 2026-02-18 18:36:08 +05:30
Nate Sesti
8eee3e0300
Merge pull request #10467 from uinstinct/cli-ai-sdk
feat: integrate ai-sdk provider
2026-02-17 21:23:25 -08:00
Dallin Romney
c006d4b231 feat: add Claude Sonnet 4.6 and Claude Opus 4.6 models
Add claude-sonnet-4-6 and claude-opus-4-6 as the new default Sonnet and
Opus models across providers, GUI configs, schemas, cost calculation,
and CLI defaults. Update display names for all >= 4.5 models to use
name-first format (e.g. "Claude Sonnet 4.5" not "Claude 4.5 Sonnet").
2026-02-17 11:49:21 -08:00
uinstinct
ec8263d029 add support for openrouter 2026-02-17 19:21:38 +05:30
uinstinct
da52388895 use openai compatible over anthropic adapter 2026-02-17 18:07:57 +05:30
uinstinct
2642558ff0 make schema openai compatible 2026-02-17 17:57:48 +05:30
uinstinct
1689ac28df remove from config yaml 2026-02-12 16:09:00 +05:30
uinstinct
73b5db9410 pass in the format of "provider/model" 2026-02-12 16:04:25 +05:30
uinstinct
73ee3e047a remove usage of aisdkprovider id 2026-02-12 15:52:35 +05:30
uinstinct
783fd2a2ce add ai sdk implementing basellmapi 2026-02-12 15:46:39 +05:30
uinstinct
bf1772a68c convert assistant tool call messages to ai sdk format 2026-02-12 15:36:08 +05:30
Dallin Romney
019a65e4c6
Merge pull request #10421 from continuedev/snyk-fix-c59e28ba618801848d5df7558a39887b
[Snyk] Security upgrade @openapitools/openapi-generator-cli from 2.27.0 to 2.28.3
2026-02-11 03:19:41 -08:00
snyk-bot
ac4816af90
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-AXIOS-15252993
2026-02-11 10:54:29 +00:00
Aditya Mitra
8160711097
Update packages/config-yaml/src/validation.ts
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2026-02-11 10:11:34 +05:30
uinstinct
ccd9d15fda fix: validate unicode in model apikey or headers 2026-02-10 12:18:33 +05:30
Dallin Romney
38a2ca23fe
Merge pull request #10147 from continuedev/snyk-fix-be7bc5c5ea454c48cbcfb04e4d08b90d
[Snyk] Security upgrade @aws-sdk/credential-providers from 3.943.0 to 3.974.0
2026-02-03 13:31:31 -08:00
dependabot[bot]
eb2d7671e1
chore(deps): bump @isaacs/brace-expansion in /packages/continue-sdk
Bumps @isaacs/brace-expansion from 5.0.0 to 5.0.1.

---
updated-dependencies:
- dependency-name: "@isaacs/brace-expansion"
  dependency-version: 5.0.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-03 20:09:20 +00:00
snyk-bot
a877781cc0
fix: packages/openai-adapters/package.json & packages/openai-adapters/package-lock.json to reduce vulnerabilities
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-FASTXMLPARSER-15155603
2026-02-03 10:17:10 +00:00
Dallin Romney
998425438b
Merge pull request #10127 from uinstinct/hub-local
fix: show error for blank inputs when using hub blocks in local config
2026-02-03 00:15:04 -08:00
Dallin Romney
a275968b1c
Merge pull request #10036 from micalgenus/main
Fix OpenAI timeout settings not being applied
2026-02-02 22:14:35 -08:00
shanevcantwell
d80845c403
feat: add tool prompt override support in .continuerc.json (#9314)
* feat: add tool prompt overrides support in YAML model config

Adds per-model tool prompt overrides under chatOptions in YAML config:

```yaml
models:
  - name: my-model
    chatOptions:
      toolPromptOverrides:
        run_terminal_command:
          description: "Custom description"
        view_diff:
          disabled: true
```

This replaces the JSON-only implementation with YAML-only support as
requested by maintainers. The JSON implementation is preserved on the
`feature/tool-prompt-overrides-json` branch for reference.

Changes:
- Add toolOverrideSchema to chatOptionsSchema (packages/config-yaml)
- Add ToolOverride interface and toolPromptOverrides to LLMOptions (core)
- Store and apply overrides in BaseLLM.streamChat()
- Add applyToolOverrides utility with comprehensive tests

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

* feat(cli): add tool prompt overrides support for CLI parity

Apply toolPromptOverrides from YAML model config in CLI,
ensuring feature parity with VS Code extension.

- Add applyChatCompletionToolOverrides helper for CLI tool format
- Apply overrides in streamChatResponse before LLM calls
- Support description changes and disabling tools
- Add unit tests for override logic

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

* chore: package lock update

* ci: retrigger after hub 502

* refactor: rename toolPromptOverrides to toolOverrides

- Rename property across core, config-yaml, and CLI
- Consolidate ToolOverride type to extend ToolOverrideConfig from
  config-yaml instead of duplicating 7 fields
- Inline record-to-array conversion to match file patterns

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

* chore: retrigger CI (clean run)

* chore: revert gui package-lock to main

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

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Dallin Romney <dallinromney@gmail.com>
2026-02-02 21:55:21 -08:00
uinstinct
20a069e87e fix: show error for blank inputs when using hub blocks in local config 2026-02-02 21:51:50 +05:30
snyk-bot
1420644768
fix: upgrade @openapitools/openapi-generator-cli from 2.25.1 to 2.27.0
Snyk has created this PR to upgrade @openapitools/openapi-generator-cli from 2.25.1 to 2.27.0.

See this package in npm:
@openapitools/openapi-generator-cli

See this project in Snyk:
https://app.snyk.io/org/continue-dev-inc.-default/project/d83fc996-9794-48a9-a63f-50755ff2400d?utm_source=github&utm_medium=referral&page=upgrade-pr
2026-02-01 09:12:16 +00:00
shanevcantwell
38aae62e56
fix: pass pre-read content to RegistryClient for WSL compatibility (#9739)
Fixes #6242, #7810

When Windows VS Code connects to WSL, workspace files are accessed via
vscode-remote:// URIs. Previously, getAllDotContinueDefinitionFiles()
correctly read content via ide.readFile(), but loadYaml.ts discarded
the content and passed only the URI path to RegistryClient, which then
tried to re-read using fs.readFileSync() - failing for remote URIs.

Changes:
- Add optional content field to FileIdentifier (non-breaking)
- RegistryClient.getContent() returns pre-read content when present
- loadYaml.ts passes content along with file identifiers

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 15:19:25 -08:00
GyeongSu Han
bc206b0b43
Prettier 2026-01-30 22:38:27 +09:00
GyeongSu Han
1d81056014
revert lint 2026-01-28 22:51:21 +09:00
GyeongSu Han
b970565f8c
Add request timeout to OpenAI 2026-01-28 22:49:26 +09:00
Dallin Romney
f59d13329e
Merge pull request #9893 from continuedev/dependabot/npm_and_yarn/packages/fetch/lodash-4.17.23
chore(deps-dev): bump lodash from 4.17.21 to 4.17.23 in /packages/fetch
2026-01-25 22:04:50 -08:00
Dallin Romney
1c7aacae34
Merge pull request #9828 from alex-mcgraw-askSage/asksage-cli-integration
Refactor imports.
2026-01-25 21:54:22 -08:00
dependabot[bot]
52cf11f6f6
chore(deps-dev): bump lodash from 4.17.21 to 4.17.23 in /packages/fetch
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.21 to 4.17.23.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.21...4.17.23)

---
updated-dependencies:
- dependency-name: lodash
  dependency-version: 4.17.23
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-26 00:14:33 +00:00
Alex McGraw
63a8f8cc05 fixed the finish_reason bug; was being determined by rawToolCalls, when it should have been determined by validToolCalls in case all of the raw tool calls were filtered out because of malformed responses 2026-01-23 15:25:17 -06:00
Alex McGraw
b8a40e3a12 refactor some interface imports, and fixed a bug in the CLI tooling. File reads weren't working, but now are. 2026-01-23 12:22:49 -06:00
Dallin Romney
45218e923b
Merge pull request #9772 from continuedev/dependabot/npm_and_yarn/packages/fetch/lodash-es-4.17.23
chore(deps-dev): bump lodash-es from 4.17.21 to 4.17.23 in /packages/fetch
2026-01-22 14:56:38 -08:00
Dallin Romney
f5b1d57b1e
Merge pull request #9719 from alex-mcgraw-askSage/asksage-cli-integration
Continue CLI support provider Ask Sage
2026-01-22 14:55:54 -08:00
Dallin Romney
71c04d9b74
Merge pull request #9653 from continuedev/snyk-upgrade-40804e07f4562cc2783df9263cd9925a
[Snyk] Upgrade yaml from 2.8.1 to 2.8.2
2026-01-22 14:48:15 -08:00
dependabot[bot]
cbc00248e0
chore(deps-dev): bump lodash-es in /packages/fetch
Bumps [lodash-es](https://github.com/lodash/lodash) from 4.17.21 to 4.17.23.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.21...4.17.23)

---
updated-dependencies:
- dependency-name: lodash-es
  dependency-version: 4.17.23
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-22 22:33:29 +00:00
Dallin Romney
0d5a615191
Merge pull request #9775 from continuedev/dependabot/npm_and_yarn/packages/openai-adapters/lodash-es-4.17.23
chore(deps-dev): bump lodash-es from 4.17.21 to 4.17.23 in /packages/openai-adapters
2026-01-22 14:30:54 -08:00
dependabot[bot]
4d358b1a68
chore(deps-dev): bump lodash-es in /packages/openai-adapters
Bumps [lodash-es](https://github.com/lodash/lodash) from 4.17.21 to 4.17.23.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.21...4.17.23)

---
updated-dependencies:
- dependency-name: lodash-es
  dependency-version: 4.17.23
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-22 00:04:28 +00:00
dependabot[bot]
dac5022d34
chore(deps-dev): bump lodash-es in /packages/config-yaml
Bumps [lodash-es](https://github.com/lodash/lodash) from 4.17.21 to 4.17.23.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.21...4.17.23)

---
updated-dependencies:
- dependency-name: lodash-es
  dependency-version: 4.17.23
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-21 23:49:38 +00:00
Alex McGraw
b4d3844577 few fixes regarding some things the cubic ai found. streamed tools were being squashed into one index, but now each tool call will have its own index, and fixed a token caching issue where if the token creation failed, the promise isn't saved in cache 2026-01-21 10:05:05 -06:00
Alex McGraw
b0fb345681 Continue CLI support provider Ask Sage
With a custom config.yaml file, a user can now specify models to use the Ask Sage provider (specifically, provider name is specified as 'askSage' in the provider parameter). Users can now use the CLI tool along with the VSCode extension, and can specify what tools/capabilities they would like the models to have within the CLI, as long as that model has the ability to use tools.
2026-01-20 16:25:32 -06:00