Skip to content

Commit b839bcd

Browse files
committed
Merge remote-tracking branch 'origin/main' into bb/credits
* origin/main: fix(editor): prevent file editing issues when git diff views are open (#8676) Changeset version bump (#8675) Release v3.28.17 (#8674) Add Claude Haiku 4.5 (#8673)
2 parents 980e711 + 270dce5 commit b839bcd

File tree

12 files changed

+80
-10
lines changed

12 files changed

+80
-10
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Roo Code Changelog
22

3+
## [3.28.17] - 2025-10-15
4+
5+
- Add support for Claude Haiku 4.5 model (thanks @daniel-lxs!)
6+
- Fix: Update zh-TW run command title translation (thanks @PeterDaveHello!)
7+
38
## [3.28.16] - 2025-10-09
49

510
![3.28.16 Release - Expanded Context Window](/releases/3.28.16-release.png)

packages/types/src/providers/anthropic.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,19 @@ export const anthropicModels = {
139139
cacheWritesPrice: 0.3,
140140
cacheReadsPrice: 0.03,
141141
},
142+
"claude-haiku-4-5-20251001": {
143+
maxTokens: 64_000,
144+
contextWindow: 200_000,
145+
supportsImages: true,
146+
supportsPromptCache: true,
147+
inputPrice: 1.0,
148+
outputPrice: 5.0,
149+
cacheWritesPrice: 1.25,
150+
cacheReadsPrice: 0.1,
151+
supportsReasoningBudget: true,
152+
description:
153+
"Claude Haiku 4.5 delivers near-frontier intelligence at lightning speeds with extended thinking, vision, and multilingual support.",
154+
},
142155
} as const satisfies Record<string, ModelInfo>
143156

144157
export const ANTHROPIC_DEFAULT_MAX_TOKENS = 8192

packages/types/src/providers/bedrock.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,20 @@ export const bedrockModels = {
169169
maxCachePoints: 4,
170170
cachableFields: ["system", "messages", "tools"],
171171
},
172+
"anthropic.claude-haiku-4-5-20251001-v1:0": {
173+
maxTokens: 8192,
174+
contextWindow: 200_000,
175+
supportsImages: true,
176+
supportsPromptCache: true,
177+
supportsReasoningBudget: true,
178+
inputPrice: 1.0,
179+
outputPrice: 5.0,
180+
cacheWritesPrice: 1.25, // 5m cache writes
181+
cacheReadsPrice: 0.1, // cache hits / refreshes
182+
minTokensPerCachePoint: 2048,
183+
maxCachePoints: 4,
184+
cachableFields: ["system", "messages", "tools"],
185+
},
172186
"anthropic.claude-3-5-sonnet-20240620-v1:0": {
173187
maxTokens: 8192,
174188
contextWindow: 200_000,

packages/types/src/providers/claude-code.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,4 +105,12 @@ export const claudeCodeModels = {
105105
supportsReasoningBudget: false,
106106
requiredReasoningBudget: false,
107107
},
108+
"claude-haiku-4-5-20251001": {
109+
...anthropicModels["claude-haiku-4-5-20251001"],
110+
supportsImages: false,
111+
supportsPromptCache: true, // Claude Code does report cache tokens
112+
supportsReasoningEffort: false,
113+
supportsReasoningBudget: false,
114+
requiredReasoningBudget: false,
115+
},
108116
} as const satisfies Record<string, ModelInfo>

packages/types/src/providers/openrouter.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ export const OPEN_ROUTER_REASONING_BUDGET_MODELS = new Set([
8484
"anthropic/claude-opus-4.1",
8585
"anthropic/claude-sonnet-4",
8686
"anthropic/claude-sonnet-4.5",
87+
"anthropic/claude-haiku-4.5",
8788
"google/gemini-2.5-pro-preview",
8889
"google/gemini-2.5-pro",
8990
"google/gemini-2.5-flash-preview-05-20",

packages/types/src/providers/vertex.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,17 @@ export const vertexModels = {
187187
cacheReadsPrice: 0.3,
188188
supportsReasoningBudget: true,
189189
},
190+
"claude-haiku-4-5@20251001": {
191+
maxTokens: 8192,
192+
contextWindow: 200_000,
193+
supportsImages: true,
194+
supportsPromptCache: true,
195+
inputPrice: 1.0,
196+
outputPrice: 5.0,
197+
cacheWritesPrice: 1.25,
198+
cacheReadsPrice: 0.1,
199+
supportsReasoningBudget: true,
200+
},
190201
"claude-opus-4-1@20250805": {
191202
maxTokens: 8192,
192203
contextWindow: 200_000,

src/api/providers/anthropic.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ export class AnthropicHandler extends BaseProvider implements SingleCompletionHa
6262
case "claude-3-5-sonnet-20241022":
6363
case "claude-3-5-haiku-20241022":
6464
case "claude-3-opus-20240229":
65+
case "claude-haiku-4-5-20251001":
6566
case "claude-3-haiku-20240307": {
6667
/**
6768
* The latest message will be the new user message, one before
@@ -122,6 +123,7 @@ export class AnthropicHandler extends BaseProvider implements SingleCompletionHa
122123
case "claude-3-5-sonnet-20241022":
123124
case "claude-3-5-haiku-20241022":
124125
case "claude-3-opus-20240229":
126+
case "claude-haiku-4-5-20251001":
125127
case "claude-3-haiku-20240307":
126128
betas.push("prompt-caching-2024-07-31")
127129
return { headers: { "anthropic-beta": betas.join(",") } }

src/api/providers/fetchers/__tests__/openrouter.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ describe("OpenRouter API", () => {
137137
"google/gemini-2.5-pro",
138138
"anthropic/claude-opus-4.1", // Not yet available in OpenRouter API
139139
"anthropic/claude-sonnet-4.5", // Not yet available in OpenRouter API
140+
"anthropic/claude-haiku-4.5", // Not yet available in OpenRouter API
140141
])
141142

142143
const expectedReasoningBudgetModels = Array.from(OPEN_ROUTER_REASONING_BUDGET_MODELS)

src/api/providers/fetchers/openrouter.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,13 @@ export const parseOpenRouterModel = ({
253253
modelInfo.maxTokens = anthropicModels["claude-opus-4-1-20250805"].maxTokens
254254
}
255255

256+
// Ensure correct reasoning handling for Claude Haiku 4.5 on OpenRouter
257+
// Use budget control and disable effort-based reasoning fallback
258+
if (id === "anthropic/claude-haiku-4.5") {
259+
modelInfo.supportsReasoningBudget = true
260+
modelInfo.supportsReasoningEffort = false
261+
}
262+
256263
// Set horizon-alpha model to 32k max tokens
257264
if (id === "openrouter/horizon-alpha") {
258265
modelInfo.maxTokens = 32768

src/integrations/editor/DiffViewProvider.ts

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ export class DiffViewProvider {
5454
// If the file is already open, ensure it's not dirty before getting its
5555
// contents.
5656
if (fileExists) {
57-
const existingDocument = vscode.workspace.textDocuments.find((doc) =>
58-
arePathsEqual(doc.uri.fsPath, absolutePath),
57+
const existingDocument = vscode.workspace.textDocuments.find(
58+
(doc) => doc.uri.scheme === "file" && arePathsEqual(doc.uri.fsPath, absolutePath),
5959
)
6060

6161
if (existingDocument && existingDocument.isDirty) {
@@ -91,7 +91,10 @@ export class DiffViewProvider {
9191
.map((tg) => tg.tabs)
9292
.flat()
9393
.filter(
94-
(tab) => tab.input instanceof vscode.TabInputText && arePathsEqual(tab.input.uri.fsPath, absolutePath),
94+
(tab) =>
95+
tab.input instanceof vscode.TabInputText &&
96+
tab.input.uri.scheme === "file" &&
97+
arePathsEqual(tab.input.uri.fsPath, absolutePath),
9598
)
9699

97100
for (const tab of tabs) {
@@ -509,13 +512,14 @@ export class DiffViewProvider {
509512
// Listen for document open events - more efficient than scanning all tabs
510513
disposables.push(
511514
vscode.workspace.onDidOpenTextDocument(async (document) => {
512-
if (arePathsEqual(document.uri.fsPath, uri.fsPath)) {
515+
// Only match file:// scheme documents to avoid git diffs
516+
if (document.uri.scheme === "file" && arePathsEqual(document.uri.fsPath, uri.fsPath)) {
513517
// Wait a tick for the editor to be available
514518
await new Promise((r) => setTimeout(r, 0))
515519

516520
// Find the editor for this document
517-
const editor = vscode.window.visibleTextEditors.find((e) =>
518-
arePathsEqual(e.document.uri.fsPath, uri.fsPath),
521+
const editor = vscode.window.visibleTextEditors.find(
522+
(e) => e.document.uri.scheme === "file" && arePathsEqual(e.document.uri.fsPath, uri.fsPath),
519523
)
520524

521525
if (editor) {
@@ -529,7 +533,11 @@ export class DiffViewProvider {
529533
// Also listen for visible editor changes as a fallback
530534
disposables.push(
531535
vscode.window.onDidChangeVisibleTextEditors((editors) => {
532-
const editor = editors.find((e) => arePathsEqual(e.document.uri.fsPath, uri.fsPath))
536+
const editor = editors.find((e) => {
537+
const isFileScheme = e.document.uri.scheme === "file"
538+
const pathMatches = arePathsEqual(e.document.uri.fsPath, uri.fsPath)
539+
return isFileScheme && pathMatches
540+
})
533541
if (editor) {
534542
cleanup()
535543
resolve(editor)

0 commit comments

Comments
 (0)