Skip to content

Commit 5f57c1f

Browse files
committed
Add new openrouter model IDs
1 parent f14542d commit 5f57c1f

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

src/api/providers/openrouter.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ export class OpenRouterHandler implements ApiHandler {
3838
// prompt caching: https://openrouter.ai/docs/prompt-caching
3939
// this is specifically for claude models (some models may 'support prompt caching' automatically without this)
4040
switch (model.id) {
41+
case "anthropic/claude-3.7-sonnet":
42+
case "anthropic/claude-3.7-sonnet:beta":
4143
case "anthropic/claude-3-7-sonnet":
4244
case "anthropic/claude-3-7-sonnet:beta":
4345
case "anthropic/claude-3.5-sonnet":
@@ -91,6 +93,8 @@ export class OpenRouterHandler implements ApiHandler {
9193
// (models usually default to max tokens allowed)
9294
let maxTokens: number | undefined
9395
switch (model.id) {
96+
case "anthropic/claude-3.7-sonnet":
97+
case "anthropic/claude-3.7-sonnet:beta":
9498
case "anthropic/claude-3-7-sonnet":
9599
case "anthropic/claude-3-7-sonnet:beta":
96100
case "anthropic/claude-3.5-sonnet":

src/core/webview/ClineProvider.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1415,6 +1415,8 @@ Here is the project's README to help you get started:\n\n${mcpDetails.readmeCont
14151415
switch (rawModel.id) {
14161416
case "anthropic/claude-3-7-sonnet":
14171417
case "anthropic/claude-3-7-sonnet:beta":
1418+
case "anthropic/claude-3.7-sonnet":
1419+
case "anthropic/claude-3.7-sonnet:beta":
14181420
case "anthropic/claude-3.5-sonnet":
14191421
case "anthropic/claude-3.5-sonnet:beta":
14201422
// NOTE: this needs to be synced with api.ts/openrouter default model info

webview-ui/src/components/settings/OpenRouterModelPicker.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,8 @@ const OpenRouterModelPicker: React.FC<OpenRouterModelPickerProps> = ({ isPopup }
228228
If you're unsure which model to choose, Cline works best with{" "}
229229
<VSCodeLink
230230
style={{ display: "inline", fontSize: "inherit" }}
231-
onClick={() => handleModelChange("anthropic/claude-3-7-sonnet")}>
232-
anthropic/claude-3-7-sonnet.
231+
onClick={() => handleModelChange("anthropic/claude-3.7-sonnet")}>
232+
anthropic/claude-3.7-sonnet.
233233
</VSCodeLink>
234234
You can also try searching "free" for no-cost options currently available.
235235
</>

0 commit comments

Comments
 (0)