Commit graph

142 commits

Author SHA1 Message Date
Pao
3ca529dc62
feat: Vertex Gemini Flash 2.0 support (#1853)
* feat: Vertex Gemini Flash 2.0 support

* fix: Add changeset for PR

* Moved gemini model

* Resolve conflicts

* Prettier fix

---------

Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-03-01 17:55:43 -08:00
Saoud Rizwan
7728c0304c Add o3-mini support to openai compatible 2025-03-01 17:35:04 -08:00
watany
fcf6734949
feat(bedrock): Add APAC Support for Cross-Region Inference Profiles (#1913)
* adding apac

* Remove unreachable 'break' after return in case 'ap-'.

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* changeset

* adding testing

* revert

* revart default model

* revert package-lock

* Remove unnecessary test

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-03-01 16:39:10 -08:00
Steven White
d103f8ee62
feat: add asksage support (#2011)
* feat: add asksage support

* chore: create changeset for asksage support

* Fix Typo

Fix Typo

* chore: fix lint

* Fixes

* Validate asksage API key

---------

Co-authored-by: Dennis Bartlett <bartlett.dc.1@gmail.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-03-01 15:20:58 -08:00
Dave Lasley
aea06ce659
Add retries to bedrock createMessage (#2039)
* Add retries to bedrock createMessage

Add retries to Bedrock's createMessage as indicated by [this](https://github.com/cline/cline/pull/1605#issuecomment-2665904349)

Similar to [this comment](https://github.com/cline/cline/pull/1605#issuecomment-2666290702) I am also experiencing a 429 every once in a while. Measuring a before/after, it's about a 90% improvement when there's no prompt caching. I'm going to add some logging and see if I can track it down further but honestly this is probably worth it as is.

* Add changeset
2025-03-01 14:20:50 -08:00
Leonid Bugaev
65f582bb0d
Feat: Add support for AWS Bedrock Anthropic prompt caching (#2034)
* Add Bedrock prompt caching support (optional)

This feature protected under checkbox because it is not yet rolled out
to everyone, and if you will try to send cache headers, and its not
enabled for you, you will get error

* Add changeset

* Update supported models

* Fix copy

---------

Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-03-01 14:09:10 -08:00
Saoud Rizwan
57b36e16b8 Fix pricing calculation 2025-03-01 03:11:45 -08:00
Saoud Rizwan
dda8a6c829 Add thinking budget option to Bedrock and Vertex 2025-03-01 01:39:14 -08:00
Saoud Rizwan
0959438db8 Add thinking budget slider to OpenRouter 2025-03-01 01:31:16 -08:00
Saoud Rizwan
f555b83c7c Revert "Sonnet: Make Separate Thinking Model (#2031)"
This reverts commit 29c01eb7d3.
2025-02-28 23:04:20 -08:00
Evan
29c01eb7d3
Sonnet: Make Separate Thinking Model (#2031)
* make thinking model separate and remove UI slider

* use constant for min budget tokens

* changeset
2025-02-28 22:36:02 -08:00
Saoud Rizwan
eaa76512fc Remove requesty polling; fix deepseek cost calculation changes; fix preferred language parsing 2025-02-28 22:23:24 -08:00
Evan
df7b458229
Sonnet, Give Me a Reason (#1961)
* wip

* added slider for setting reasoning budget tokens

* refactor out generic slider component; improve styling; add debounce

* added setting validation

* styling and adding reasoning level

* changeset

* make change to trigger test rerun

* revert useless comment
2025-02-28 18:16:56 -08:00
pashpashpash
b4149b5a18
vertex prompt caching (#2026)
* vertex prompt caching

* duplicate declare

* changeset
2025-02-28 17:30:25 -08:00
Dennis Bartlett
dfeb57d3af Fix Lint 2025-02-28 14:06:00 -08:00
Daniel Trugman
d1a097cbd4
Requesty dynamic model selection (#1836)
* Extract reuseable ModelDescriptionMarkdown from OpenRouter model picker

* Requesty: Add model picker component

* Refactor readOpenRouterModels to allow any dynamic list filename

* Extract parsePrice to allow reuse by other providers

* Simplify model display name switch case

* Requesty: Add dynamic model list fetching from API

* Requesty: Add default model selection

* Requesty: Specify max_tokens when sending request

* Add changeset

---------

Co-authored-by: Dennis Bartlett <bartlett.dc.1@gmail.com>
2025-02-28 13:29:34 -08:00
nighttrek
c87fb06f33 Merge branch 'dev' into pr/cline/2014 2025-02-28 13:17:35 -08:00
Evan
eedae086a3
Fix Merge Conflict resolutions
Fixes Merge conflict resolutions from Main to Dev that were incorrectly chosen.
2025-02-28 13:12:40 -08:00
Andrew Monostate
d7e9ead730 feat: add X AI provider integration 2025-02-28 12:01:00 -08:00
Daniel Trugman
d6184e9dac
OpenAI & DeepSeek cost calculation (#1864)
* Add OpenAI compatible cost calculation

* Requesty: Prepare for correct price calculation

* Native OpenAI: Update model caching info

According to [OpenAI's
website](https://platform.openai.com/docs/guides/prompt-caching),
gpt-4o, gpt-4o-mini, o1-preview and o1-mini support caching.

For gpt-4o, even though gpt-4o-2024-05-13 and
chatgpt-4o-latest do no support caching, users will see there are no
cached tokens, which will help avoid confusion.

* Native OpenAI: Call getModel once

* Native OpenAI: Extract yield usage into method

* Native OpenAI: Add caching and cost info to task header

* DeepSeek: Add cost info to task header

* Add changeset
2025-02-28 11:25:17 -08:00
Eric Li
ea2f4080f8
opt: Enhance OpenAiHandler to diagnose request issues and handle empty streams (#1702) 2025-02-27 17:21:00 -08:00
Dennis Bartlett
ff0eb8fa77 Fix rebase conflict resolution discrepency 2025-02-27 16:18:49 -08:00
pashpashpash
39980e9be7 Revert "Better Streaming Support (#1980)" (#1993)
This reverts commit 93856ab3b06fef1b5b2f47b8ee6c2af5ab89dbe7.
2025-02-27 15:50:02 -08:00
brownrw8
9b5cefd69d Better Streaming Support (#1980)
* feat: enterprise support

* Update src/api/providers/enterprise.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* refactor + anthropic

* fix

* update chunking

* fix enterprise providers

* minor refactor for chunking

* comments

* defaults

* tests

* remove imports

* suggested fixes

* decouple message type

* upgrade libs, prompt caching no longer in beta for claude models

* updates for tests

* enterprise -> streaming provider

* update tests

* remove section from anthropic.ts

* handle specific GCP Vertex invalid_grant error

* finish comment

* add caching stats to chunking

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-02-27 15:46:01 -08:00
Doug Daniels
a229b8ce9d
feat(vertex): Add prompt caching support for Claude on Vertex AI (#1885)
* feat(vertex): Add prompt caching support for Claude on Vertex AI

* Remove countTokens update claude 3.7

* claude-3-7-sonnet@20250219 support in Vertex AI as default model
2025-02-26 22:28:02 -08:00
Saoud Rizwan
5f57c1f2f3 Add new openrouter model IDs 2025-02-24 18:14:58 -08:00
Saoud Rizwan
131b245023 Revert "Anthropic: Bump it up! (#1938)"
This reverts commit c2809491b4.
2025-02-24 18:09:51 -08:00
Evan
c2809491b4
Anthropic: Bump it up! (#1938)
* Updated Anthropic SDK and fixed types

* adjust export markdown handling

* adjust export markdown handling

* added changeset
2025-02-24 17:02:21 -08:00
Saoud Rizwan
1127e2a33c Add Claude 3.7 Sonnet 2025-02-24 11:07:23 -08:00
Quentin Machu
82f1f79b3e fix: make AWS Bedrock authentication predictable
Anthropic's Bedrock SDK creates an AWS credential provider chain [1]
for each request it needs to sign. By doing so right before actually
having to sign the request, it can utilize any session created after
VSCode launched (i.e. outside of the process), and it can renew the
sessions every time necessary transparently for the user.

Cline, on the other hand, by transforming the provided AWS_PROFILE into
a key / secret / session, as part of client initialization, completely
short-circuits this, making it very difficult for users in companies where
sessions are short-lived. Furthermore, Cline would silently ignore the
provided AWS_PROFILE if there isn't a current/non-expired session at the time
of initialization, pass null keys to the Bedrock SDK, which would then
make use the default profile, which may not be configured or authorized
to use AWS Bedrock (as most AWS SSO hub accounts would). From the
perspective of the user, this would manifest itself as an "supported
country" error or unhelpful errors that are basically impossible to
debug without attaching a debugger to Cline.. and such developers may
end up reaching out to their DevOps/IT teams for help, which also could
turn into a waste of time.

This PR addresses the aforementioned issues by resolving the credentials on
every invocation.

1: 61b55599d5/packages/bedrock-sdk/src/auth.ts (L19)
2025-02-20 22:41:29 +08:00
Saoud Rizwan
e40e6ddbcd Refactor 2025-02-18 10:49:37 -08:00
Daniel Trugman
cc166f4144
Requesty provider improvements (#1829)
* Requesty: Add cline headers to requests

* Requesty: Add support for cache read/write tokens

* Requesty: Remove deepseek reasoner conversions that are handled in-flight by Requesty

* Requesty: Read o3-mini reasoning effort from Cline settings

* Requesty: Add total cost per interaction

* Add changeset
2025-02-17 10:37:23 -08:00
Saoud Rizwan
5dea79c65f Fix Mistral provider server URL 2025-02-17 10:35:21 -08:00
Shawn Smith
a99648884a
Fix: Bedrock Profiles (#1751)
* fix-bedrock-profiles

* fix-bedrock-profiles

* resolve linting issue

* fixes

* resolve using var

* add changeset

* update changeset
2025-02-12 17:56:20 -08:00
brownrw8
0434b5c772
Advanced configuration for OpenAI Compatible Providers (#1737)
* feat: advanced configuration for OpenAI Compatible Providers

* Update .changeset/thirty-eyes-appear.md

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Update webview-ui/src/components/settings/ApiOptions.tsx

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* dropdown menu

* Show pricing if user entered model info

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-02-12 14:09:55 -08:00
Sanjaykumar S
e534c3dbc7
Add api key for litellm api provider #1766 (#1767)
* Add api key for litellm api provider

* Added Changeset

* Update litellm.ts

* Update ApiOptions.tsx

---------

Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-02-12 10:56:13 -08:00
Waylon
e8a2e88fa0
feat: qwen platform adds deepseek-r1/v3 support (#1729)
Co-authored-by: fine <fine_951111@163.com>
2025-02-10 20:04:16 -08:00
Saoud Rizwan
fbd249d387 Adjust generation retry params 2025-02-09 02:14:34 -08:00
Saoud Rizwan
43200007cf Retry openrouter generation endpoint to fix context limit errors 2025-02-08 20:15:38 -08:00
Saoud Rizwan
fa05f94dfa Fixes 2025-02-07 21:34:47 -08:00
Evan
4449b51e2c
Let's reason together (#1597)
* let's reason together

* typo

* changeset

* Fix type error

---------

Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-02-07 14:32:14 -08:00
brownrw8
84f017c98e
feat:Add Together API Provider (#1698) 2025-02-07 13:55:48 -08:00
Daniel Steigman
076b1e39e6
Nighttrek/bedrock credential manager (#1667)
* added initial AWS bedrock support

* fixed formatting

* updated to fix persistence

* added changeset
2025-02-06 23:36:38 -08:00
brownrw8
3cacd57949
Add dedicated Requesty provider (#1677)
* feat: Add dedicated Requesty provider

* Update ExtensionStateContext.tsx

---------

Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-02-06 20:45:52 -08:00
aicc
548338d39e
Add alibaba qwen models plus/max/coder-plus/turbo both stable and latest to use. (#1648)
* add alibaba qwen-max qwen-plus qwen-turbo qwen-coder-plus  stable/latest models

* add alibaba qwen-max qwen-plus qwen-turbo qwen-coder-plus  stable/latest models

* Provide the api line choice for international user

* Remove redundant code

* Copy fixes

* Create dry-socks-talk.md

---------

Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-02-05 23:23:33 -08:00
Michael
bd5eb8fcae
feat: add retry decorator with rate limit handling (#1605)
* fix: improve retry decorator with smart rate limit handling

- Add handling of rate limit (429) errors
- Implement retry timing based on response headers
- Add exponential backoff when no headers present
- Add a few unit tests

Fixes #713

* Create modern-knives-tan.md

* Improve readability in retry.ts

---------

Co-authored-by: Michael Overhorst <m.overhorst@spotonmedics.nl>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
2025-02-05 23:11:01 -08:00
Daniel Steigman
905327db4e
Merge pull request #1610 from ViezeVingertjes/feat/1609-add-mistral-models
feat: Add support for all available Mistral API models
2025-02-04 23:52:10 -08:00
Michael Overhorst
fd676ef047 Removed /v1 from the url and tested several models. 2025-02-05 06:51:02 +01:00
Michael Overhorst
2cc0fa906c Updated the mistral url. 2025-02-05 06:41:00 +01:00
Hiroki Nakashima
180fbd5995
feat: add LiteLLM API provider support (#1618) 2025-02-04 14:46:13 -08:00