Skip to content

Commit cf4eb86

Browse files
Merge branch 'main' into feat/abort-r2-lmstudio-qwen
2 parents eac598e + 0e208c4 commit cf4eb86

57 files changed

Lines changed: 2026 additions & 154 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/label-pr-review-state.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,7 @@ jobs:
319319
const communityApprovedLabel = 'community-approved';
320320
const reviewGateName = 'Zoo Code / PR review gate';
321321
const reconciliationCheckName = 'Zoo Code / reconcile PR review state';
322+
const workflowRunUrl = `${context.serverUrl}/${owner}/${repo}/actions/runs/${context.runId}`;
322323
323324
if (context.eventName === 'issue_comment' &&
324325
(!context.payload.issue?.pull_request ||
@@ -656,8 +657,7 @@ jobs:
656657
}
657658
if (!lookupSucceeded && passed) return;
658659
if (latestGateStatus?.state === state &&
659-
latestGateStatus.description === description &&
660-
latestGateStatus.target_url === pr.html_url) {
660+
latestGateStatus.description === description) {
661661
return;
662662
}
663663
const mustInvalidateSuccess = !passed &&
@@ -671,7 +671,7 @@ jobs:
671671
state,
672672
context: reviewGateName,
673673
description,
674-
target_url: pr.html_url,
674+
target_url: workflowRunUrl,
675675
});
676676
} catch (error) {
677677
if (required || mustInvalidateSuccess) throw error;

‎.github/workflows/visual-regression.yml‎

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,12 @@ name: Visual Regression
22

33
on:
44
workflow_dispatch:
5+
# No `paths` filter: this workflow backs the required `webview-visual`
6+
# check. GitHub keeps path-filtered workflows "pending" on pull requests
7+
# that do not match the filter, which blocks merging for a required check.
8+
# The merge_group event ignores path filters, so the queue is unaffected.
59
pull_request:
610
types: [opened, reopened, ready_for_review, synchronize]
7-
paths:
8-
- "apps/vscode-e2e/package.json"
9-
- "apps/vscode-e2e/src/theme-fixtures/**"
10-
- "apps/vscode-e2e/src/visual/**"
11-
- "apps/vscode-e2e/playwright-electron.config.ts"
12-
- "packages/types/src/api.ts"
13-
- "packages/types/src/vscode-extension-host.ts"
14-
- "src/core/webview/ClineProvider.ts"
15-
- "src/core/webview/webviewMessageHandler.ts"
16-
- "src/extension/api.ts"
17-
- "webview-ui/**"
18-
- "src/shared/**"
19-
- "package.json"
20-
- "pnpm-lock.yaml"
21-
- ".github/workflows/visual-regression.yml"
2211
merge_group:
2312
types: [checks_requested]
2413

‎packages/types/src/providers/anthropic.ts‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,30 @@ export const anthropicModels = {
179179
description:
180180
"Claude Opus 5.5 is Anthropic's most capable model for complex agentic coding and enterprise work.",
181181
},
182+
"claude-haiku-5-5": {
183+
maxTokens: 128_000,
184+
contextWindow: 1_000_000, // 1M context window native (no beta header required)
185+
supportsImages: true,
186+
supportsPromptCache: true,
187+
// Standard pricing (prompts of 100,000 tokens or fewer) from Anthropic's
188+
// pricing page. Prompts over 100,000 tokens bill at tiered rates
189+
// ($0.50 in / $2.50 out / $0.625 5m cache write / $0.05 cache read per
190+
// million tokens) that this entry does not model.
191+
// https://platform.claude.com/docs/en/about-claude/pricing
192+
inputPrice: 0.1, // $0.10 per million input tokens
193+
outputPrice: 0.5, // $0.50 per million output tokens
194+
cacheWritesPrice: 0.125, // $0.125 per million tokens (5m cache writes)
195+
cacheReadsPrice: 0.01, // $0.01 per million tokens (cache hits / refreshes)
196+
// Haiku 5.5 uses the same adaptive-thinking / binary-toggle convention as
197+
// Sonnet 5 and Opus 5 on the direct Anthropic provider path. Manual
198+
// extended thinking (budget_tokens) is not accepted, and sampling
199+
// parameters (temperature/top_p/top_k) must be omitted.
200+
supportsReasoningBudget: true,
201+
supportsReasoningBinary: true,
202+
supportsTemperature: false,
203+
description:
204+
"Claude Haiku 5.5 is the fastest, most efficient Claude 5.5 model, built for high-volume, latency-sensitive coding and agent work.",
205+
},
182206
"claude-fable-5-1": {
183207
maxTokens: 128_000, // Overridden to 8k if `enableReasoningEffort` is false.
184208
contextWindow: 1_000_000,

‎packages/types/src/providers/openrouter.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ export const OPEN_ROUTER_PROMPT_CACHING_MODELS = new Set([
4949
"anthropic/claude-fable-5.1",
5050
"anthropic/claude-fable-5",
5151
"anthropic/claude-haiku-4.5",
52+
"anthropic/claude-haiku-5.5",
5253
"google/gemini-2.5-flash-preview",
5354
"google/gemini-2.5-flash-preview:thinking",
5455
"google/gemini-2.5-flash-preview-05-20",
@@ -88,6 +89,7 @@ export const OPEN_ROUTER_REASONING_BUDGET_MODELS = new Set([
8889
"anthropic/claude-sonnet-4.6",
8990
"anthropic/claude-sonnet-5",
9091
"anthropic/claude-haiku-4.5",
92+
"anthropic/claude-haiku-5.5",
9193
"google/gemini-2.5-pro-preview",
9294
"google/gemini-2.5-pro",
9395
"google/gemini-2.5-flash-preview-05-20",

‎packages/types/src/providers/vercel-ai-gateway.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export const VERCEL_AI_GATEWAY_PROMPT_CACHING_MODELS = new Set([
99
"anthropic/claude-3.5-haiku",
1010
"anthropic/claude-3.5-sonnet",
1111
"anthropic/claude-3.7-sonnet",
12+
"anthropic/claude-haiku-5.5",
1213
"anthropic/claude-opus-4",
1314
"anthropic/claude-opus-4.1",
1415
"anthropic/claude-opus-4.5",
@@ -57,6 +58,7 @@ export const VERCEL_AI_GATEWAY_VISION_AND_TOOLS_MODELS = new Set([
5758
"anthropic/claude-3.5-sonnet",
5859
"anthropic/claude-3.7-sonnet",
5960
"anthropic/claude-haiku-4.5",
61+
"anthropic/claude-haiku-5.5",
6062
"anthropic/claude-opus-4",
6163
"anthropic/claude-opus-4.1",
6264
"anthropic/claude-opus-4.5",

‎packages/types/src/providers/vertex.ts‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,23 @@ export const vertexModels = {
526526
description:
527527
"Claude Opus 5.5 is Anthropic's most capable model for complex agentic coding and enterprise work.",
528528
},
529+
"claude-haiku-5-5": {
530+
maxTokens: 128_000,
531+
contextWindow: 1_000_000, // 1M context window native (no beta header required)
532+
supportsImages: true,
533+
supportsPromptCache: true,
534+
// Standard pricing (prompts of 100,000 tokens or fewer). Prompts over
535+
// 100,000 tokens bill at higher tiered rates per Anthropic's pricing page.
536+
inputPrice: 0.1, // $0.10 per million input tokens
537+
outputPrice: 0.5, // $0.50 per million output tokens
538+
cacheWritesPrice: 0.125, // $0.125 per million tokens (5m cache writes)
539+
cacheReadsPrice: 0.01, // $0.01 per million tokens (cache hits / refreshes)
540+
supportsReasoningBudget: true,
541+
supportsReasoningBinary: true,
542+
supportsTemperature: false,
543+
description:
544+
"Claude Haiku 5.5 is the fastest, most efficient Claude 5.5 model, built for high-volume, latency-sensitive coding and agent work.",
545+
},
529546
"claude-fable-5-1": {
530547
maxTokens: 128_000,
531548
contextWindow: 1_000_000,

‎packages/vscode-shim/src/__tests__/Additional.test.ts‎

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
CodeActionKind,
88
CodeLens,
99
LanguageModelTextPart,
10+
LanguageModelDataPart,
1011
LanguageModelToolCallPart,
1112
LanguageModelToolResultPart,
1213
FileSystemError,
@@ -261,6 +262,63 @@ describe("LanguageModelTextPart", () => {
261262
})
262263
})
263264

265+
describe("LanguageModelDataPart", () => {
266+
const decode = (data: Uint8Array) => new TextDecoder().decode(data)
267+
268+
it("should create data part via constructor", () => {
269+
const data = new Uint8Array([1, 2, 3])
270+
const part = new LanguageModelDataPart(data, "image/png")
271+
272+
expect(part.data).toBe(data)
273+
expect(part.mimeType).toBe("image/png")
274+
})
275+
276+
describe("image()", () => {
277+
it("should create image part preserving bytes and mime type", () => {
278+
const data = new Uint8Array([137, 80, 78, 71])
279+
const part = LanguageModelDataPart.image(data, "image/png")
280+
281+
expect(part).toBeInstanceOf(LanguageModelDataPart)
282+
expect(part.data).toEqual(data)
283+
expect(part.mimeType).toBe("image/png")
284+
})
285+
286+
it("should round-trip base64-decoded image data", () => {
287+
const base64 = Buffer.from("fake-image-bytes").toString("base64")
288+
const part = LanguageModelDataPart.image(new Uint8Array(Buffer.from(base64, "base64")), "image/jpeg")
289+
290+
expect(decode(part.data)).toBe("fake-image-bytes")
291+
expect(part.mimeType).toBe("image/jpeg")
292+
})
293+
})
294+
})
295+
296+
describe("LanguageModelDataPart text and JSON", () => {
297+
it.each([undefined, "text/html"])("encodes text with MIME type %s", (mimeType) => {
298+
const part = LanguageModelDataPart.text("Hello 🌍", mimeType)
299+
expect(part).toBeInstanceOf(LanguageModelDataPart)
300+
expect(new TextDecoder().decode(part.data)).toBe("Hello 🌍")
301+
expect(part.mimeType).toBe(mimeType ?? "text/plain")
302+
})
303+
304+
it.each([undefined, "application/example+json"])("encodes JSON with MIME type %s", (mimeType) => {
305+
const value = { message: "Hello 🌍", count: 2 }
306+
const part = LanguageModelDataPart.json(value, mimeType)
307+
expect(part).toBeInstanceOf(LanguageModelDataPart)
308+
expect(JSON.parse(new TextDecoder().decode(part.data))).toEqual(value)
309+
expect(part.mimeType).toBe(mimeType ?? "application/json")
310+
})
311+
312+
it.each([undefined, () => 1, Symbol("x")])("rejects non-serializable JSON value %s", (value) => {
313+
expect(() => LanguageModelDataPart.json(value)).toThrow(TypeError)
314+
})
315+
316+
it.each([null, 0, false, ""])("accepts serializable falsy JSON value %s", (value) => {
317+
const part = LanguageModelDataPart.json(value)
318+
expect(JSON.parse(new TextDecoder().decode(part.data))).toBe(value)
319+
})
320+
})
321+
264322
describe("LanguageModelToolCallPart", () => {
265323
it("should create tool call part", () => {
266324
const part = new LanguageModelToolCallPart("call-123", "searchFiles", { query: "test" })

‎packages/vscode-shim/src/api/create-vscode-api-mock.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import {
2121
CodeActionKind,
2222
CodeLens,
2323
LanguageModelTextPart,
24+
LanguageModelDataPart,
2425
LanguageModelToolCallPart,
2526
LanguageModelToolResultPart,
2627
FileSystemError,
@@ -161,6 +162,7 @@ export function createVSCodeAPIMock(
161162
CancellationTokenSource,
162163
CodeLens,
163164
LanguageModelTextPart,
165+
LanguageModelDataPart,
164166
LanguageModelToolCallPart,
165167
LanguageModelToolResultPart,
166168
ExtensionContext: ExtensionContextImpl,

‎packages/vscode-shim/src/classes/Additional.ts‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,29 @@ export class LanguageModelTextPart {
112112
constructor(public value: string) {}
113113
}
114114

115+
export class LanguageModelDataPart {
116+
constructor(
117+
public data: Uint8Array,
118+
public mimeType: string,
119+
) {}
120+
121+
static image(data: Uint8Array, mimeType: string): LanguageModelDataPart {
122+
return new LanguageModelDataPart(data, mimeType)
123+
}
124+
125+
static text(value: string, mimeType: string = "text/plain"): LanguageModelDataPart {
126+
return new LanguageModelDataPart(new TextEncoder().encode(value), mimeType)
127+
}
128+
129+
static json(value: unknown, mimeType: string = "application/json"): LanguageModelDataPart {
130+
const serialized = JSON.stringify(value)
131+
if (serialized === undefined) {
132+
throw new TypeError("LanguageModelDataPart.json: value is not JSON-serializable")
133+
}
134+
return new LanguageModelDataPart(new TextEncoder().encode(serialized), mimeType)
135+
}
136+
}
137+
115138
export class LanguageModelToolCallPart {
116139
constructor(
117140
public callId: string,

‎packages/vscode-shim/src/index.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export {
3030
CancellationTokenSource,
3131
CodeLens,
3232
LanguageModelTextPart,
33+
LanguageModelDataPart,
3334
LanguageModelToolCallPart,
3435
LanguageModelToolResultPart,
3536
FileSystemError,

0 commit comments

Comments
 (0)