Skip to content

Commit 7ec98f4

Browse files
authored
Merge branch 'main' into fix/1656-repeated-output
2 parents 83ad7da + 500152b commit 7ec98f4

47 files changed

Lines changed: 1617 additions & 183 deletions

Some content is hidden

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

‎.coderabbit.yaml‎

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,19 @@ reviews:
4848
instructions: >-
4949
Act as an adversarial second-opinion reviewer. Verify PR claims against implementation and
5050
contracts. Trace changed inputs through normal, boundary, error, cancellation, retry, and
51-
default paths and their consumers. Seek plausible counterexamples and regressions from removed
52-
safeguards. Identify assumptions in changed code that depend on facts outside the diff. First
53-
verify repository conventions, tests, and related implementations. When a potential finding
54-
depends on external behavior, use web search and prefer official documentation, specifications,
55-
or upstream repositories. Report only concrete, actionable conflicts or failure modes, citing
56-
the relevant repository location or external source. Prioritize correctness, security, data loss,
57-
lifecycle, and test gaps. Do not report generic best practices, unsupported concerns, speculative
58-
style comments, or unrelated refactors. When changed code introduces a local implementation of a
59-
cross-cutting concern, check whether it bypasses or duplicates an established repository abstraction
60-
or nearby convention. Report only a concrete inconsistency with behavioral or maintenance impact,
61-
and allow intentional deviations.
51+
default paths and their direct test counterparts. Do not flag defects in files not changed by
52+
this PR unless the defect is directly triggered by changed code and cannot be detected in the
53+
changed file alone. Seek plausible counterexamples and regressions from removed safeguards.
54+
Identify assumptions in changed code that depend on facts outside the diff. First verify
55+
repository conventions, tests, and related implementations. When a potential finding depends on
56+
external behavior, use web search and prefer official documentation, specifications, or upstream
57+
repositories. Report only concrete, actionable conflicts or failure modes, citing the relevant
58+
repository location or external source. Prioritize correctness, security, data loss, lifecycle,
59+
and test gaps. Do not report generic best practices, unsupported concerns, speculative style
60+
comments, or unrelated refactors. When changed code introduces a local implementation of a
61+
cross-cutting concern, check whether it bypasses or duplicates an established repository
62+
abstraction or nearby convention. Report only a concrete inconsistency with behavioral or
63+
maintenance impact, and allow intentional deviations.
6264
6365
- path: "**/*.{ts,tsx,js,jsx,mts,mjs,cts,cjs}"
6466
instructions: >-

‎.github/workflows/code-qa.yml‎

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,10 @@ jobs:
125125
unit-test:
126126
name: platform-unit-test (${{ matrix.name }})
127127
runs-on: ${{ matrix.os }}
128+
concurrency:
129+
# Duplicate runs for one commit must not race the OS-specific Turbo cache save.
130+
group: unit-test-${{ github.repository }}-${{ github.sha }}-${{ matrix.name }}
131+
cancel-in-progress: false
128132
strategy:
129133
matrix:
130134
include:
@@ -152,8 +156,8 @@ jobs:
152156
${{ runner.os }}-turbo-
153157
- name: Run non-extension package coverage
154158
run: pnpm turbo run test:coverage --filter="!@roo-code/core" --filter="!zoo-code" --log-order grouped --output-logs new-only
155-
- name: Run extension unit coverage
156-
run: pnpm turbo run test:coverage:unit --filter="zoo-code" --log-order grouped --output-logs new-only
159+
- name: Run extension coverage lanes
160+
run: pnpm turbo run test:coverage:api test:coverage:core test:coverage:services test:coverage:misc test:coverage:tree-sitter --filter="zoo-code" --concurrency=2 --log-order grouped --output-logs new-only
157161
- name: Verify extension coverage contract
158162
run: pnpm --dir src run verify:coverage-contract
159163
- name: Run extension dist smoke test
@@ -162,8 +166,21 @@ jobs:
162166
run: pnpm turbo run test:coverage:unit --filter="@roo-code/core" --log-order grouped --output-logs new-only
163167
- name: Run core integration coverage
164168
run: pnpm turbo run test:coverage:integration --filter="@roo-code/core" --log-order grouped --output-logs new-only
165-
- name: Verify extension unit coverage report
166-
run: node src/scripts/verify-lcov.mjs src/coverage/unit/lcov.info
169+
- name: Verify extension coverage reports
170+
run: |
171+
node src/scripts/verify-lcov.mjs src/coverage/api/lcov.info
172+
node src/scripts/verify-lcov.mjs src/coverage/core/lcov.info
173+
node src/scripts/verify-lcov.mjs src/coverage/services/lcov.info
174+
node src/scripts/verify-lcov.mjs src/coverage/misc/lcov.info
175+
node src/scripts/verify-lcov.mjs src/coverage/tree-sitter/lcov.info
176+
- name: Merge extension coverage reports
177+
run: |
178+
mkdir -p src/coverage/merged
179+
pnpm --dir src run merge:coverage
180+
node src/scripts/verify-lcov.mjs src/coverage/merged/lcov.info
181+
# Validate cache boundaries before publishing any new Turbo entries.
182+
- name: Verify coverage cache inputs
183+
run: pnpm --dir src run verify:coverage-cache-inputs
167184
- name: Save Turbo cache
168185
if: steps.turbo-cache.outputs.cache-hit != 'true'
169186
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
@@ -175,17 +192,16 @@ jobs:
175192
# there mostly adds Codecov overhead without changing pass/fail
176193
# behavior.
177194
# Coverage is uploaded in separate steps so each LCOV gets the
178-
# correct flag set. Codecov double-counts overlapping lines when a
179-
# single upload carries multiple flags whose paths overlap, so the
180-
# core lanes and webview lane must be uploaded individually with
181-
# their own flag.
195+
# correct flag set. Extension lanes instrument the same sources, so
196+
# union them before upload; a line is covered when any lane executes
197+
# it. Core and webview reports retain their independent flags.
182198
# See https://docs.codecov.com/docs/flags
183199
- name: Upload non-core coverage to Codecov
184200
if: matrix.upload-coverage
185201
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
186202
with:
187203
files: >-
188-
src/coverage/unit/lcov.info,
204+
src/coverage/merged/lcov.info,
189205
packages/cloud/coverage/lcov.info,
190206
packages/telemetry/coverage/lcov.info,
191207
apps/cli/coverage/lcov.info
@@ -222,7 +238,12 @@ jobs:
222238
with:
223239
name: coverage-reports-${{ matrix.name }}
224240
path: |
225-
src/coverage/unit/lcov.info
241+
src/coverage/api/lcov.info
242+
src/coverage/core/lcov.info
243+
src/coverage/services/lcov.info
244+
src/coverage/misc/lcov.info
245+
src/coverage/tree-sitter/lcov.info
246+
src/coverage/merged/lcov.info
226247
webview-ui/coverage/lcov.info
227248
packages/cloud/coverage/lcov.info
228249
packages/telemetry/coverage/lcov.info

‎.github/workflows/mutation-testing.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ concurrency:
1616
jobs:
1717
mutation-diff:
1818
name: mutation-diff
19+
if: github.event_name == 'merge_group' || github.event.pull_request.draft == false
1920
runs-on: ubuntu-latest
2021
timeout-minutes: 30
2122
steps:

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"check-types": "turbo check-types --log-order grouped --output-logs new-only",
1414
"test": "turbo test --log-order grouped --output-logs new-only",
1515
"test:mutation-ci": "node --test scripts/stryker-diff.test.mjs",
16-
"lifecycle:model-check": "tsx scripts/check-task-lifecycle.ts && tsx scripts/check-task-store-concurrency.ts && tsx scripts/check-provider-handoff-scheduler.ts && pnpm cleanup-protocol:model-check && pnpm parser-scope:model-check && tsx scripts/check-completion-persistence.ts",
16+
"lifecycle:model-check": "tsx scripts/check-task-lifecycle.ts && tsx scripts/check-task-store-concurrency.ts && tsx scripts/check-provider-handoff-scheduler.ts && pnpm cleanup-protocol:model-check && pnpm parser-scope:model-check && tsx scripts/check-completion-persistence.ts && tsx scripts/check-delegated-mode-readers.ts",
1717
"cleanup-protocol:model-check": "tsx scripts/check-task-cleanup-protocol.ts",
1818
"parser-scope:model-check": "node scripts/run-native-tool-call-parser-scoping.mjs",
1919
"mcp:integration-check": "tsx scripts/check-mcp-oauth-integration.ts",

‎packages/types/src/__tests__/deepseek-v4-pro.test.ts‎

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,18 @@ describe("DeepSeek V4 Pro 0813 provider catalogs", () => {
1010
expect(model?.contextWindow).toBeGreaterThanOrEqual(1_000_000)
1111
})
1212

13-
it("uses peak first-party pricing and unchanged OpenCode Go pricing", () => {
13+
it("uses current peak first-party pricing and unchanged OpenCode Go pricing", () => {
14+
expect(deepSeekModels["deepseek-flash"]).toMatchObject({
15+
supportsImages: true,
16+
outputPrice: 1.2,
17+
cacheWritesPrice: 0.3,
18+
cacheReadsPrice: 0.006,
19+
})
1420
expect(deepSeekModels["deepseek-v4-flash"]).toMatchObject({
15-
supportsImages: false,
16-
outputPrice: 1.32,
17-
cacheWritesPrice: 0.44,
18-
cacheReadsPrice: 0.014,
21+
supportsImages: true,
22+
outputPrice: 1.2,
23+
cacheWritesPrice: 0.3,
24+
cacheReadsPrice: 0.006,
1925
})
2026
expect(deepSeekModels["deepseek-v4-pro"].supportsImages).toBe(false)
2127
expect(deepSeekModels["deepseek-v4-pro"]).toMatchObject({
@@ -42,6 +48,10 @@ describe("DeepSeek V4 Pro 0813 provider catalogs", () => {
4248
expect(model.supportsPromptCache).toBe(true)
4349
expect(model.contextWindow).toBeGreaterThanOrEqual(1_000_000)
4450
expect(model.supportsReasoningEffort).toEqual(["disable", "low", "high", "max"])
51+
expect(model).toMatchObject({ outputPrice: 1.2, cacheWritesPrice: 0.3, cacheReadsPrice: 0.006 })
52+
expect(model.description).toContain("Legacy model name")
53+
expect(model).not.toHaveProperty("supportsTemperature")
54+
expect(model).not.toHaveProperty("defaultTemperature")
4555
})
4656

4757
// Self-hosted providers retain separate IDs for the preview weights and 0813 checkpoint.

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

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,38 @@ import type { ModelInfo } from "../model.js"
66
// continuation within the same turn. See: https://api-docs.deepseek.com/guides/thinking_mode
77
export type DeepSeekModelId = keyof typeof deepSeekModels
88

9-
export const deepSeekDefaultModelId: DeepSeekModelId = "deepseek-v4-flash"
9+
export const deepSeekDefaultModelId: DeepSeekModelId = "deepseek-flash"
1010

1111
export const deepSeekModels = {
12+
"deepseek-flash": {
13+
maxTokens: 384_000,
14+
contextWindow: 1_000_000,
15+
supportsImages: true,
16+
supportsPromptCache: true,
17+
supportsReasoningEffort: ["disable", "low", "high", "max"], // Updated 2026-09-10
18+
preserveReasoning: true,
19+
reasoningEffort: "high",
20+
inputPrice: 0, // the inputs are priced as cache read/write, so `inputPrice` should be 0
21+
// Static estimates use peak rates; off-peak rates are 50% lower. Effective 2026-09-10.
22+
outputPrice: 1.2,
23+
cacheWritesPrice: 0.3,
24+
cacheReadsPrice: 0.006,
25+
description: `DeepSeek-V4.1-Flash is DeepSeek's fast multimodal model with image understanding. It supports thinking and non-thinking modes, JSON output, tool calls, chat prefix completion (beta), and FIM completion (beta) in non-thinking mode.`,
26+
},
1227
"deepseek-v4-flash": {
1328
maxTokens: 384_000,
1429
contextWindow: 1_000_000,
15-
supportsImages: false,
30+
supportsImages: true,
1631
supportsPromptCache: true,
1732
supportsReasoningEffort: ["disable", "low", "high", "max"], // Updated 2026-08-13
1833
preserveReasoning: true,
1934
reasoningEffort: "high",
2035
inputPrice: 0, // the inputs are priced as cache read/write, so `inputPrice` should be 0
21-
// Static estimates use peak rates; off-peak rates are 50% lower. Effective 2026-08-16.
22-
outputPrice: 1.32,
23-
cacheWritesPrice: 0.44,
24-
cacheReadsPrice: 0.014,
25-
description: `DeepSeek-V4-Flash is DeepSeek's fast, cost-efficient V4 model. It supports thinking and non-thinking modes, JSON output, tool calls, chat prefix completion (beta), and FIM completion (beta) in non-thinking mode.`,
36+
// This retired ID is billed as the current Flash model.
37+
outputPrice: 1.2,
38+
cacheWritesPrice: 0.3,
39+
cacheReadsPrice: 0.006,
40+
description: `Legacy model name routed to the latest DeepSeek Flash model, which supports image input. Use deepseek-flash for new configurations.`,
2641
},
2742
"deepseek-v4-pro": {
2843
displayName: "DeepSeek V4 Pro 0813",
@@ -49,14 +64,12 @@ export const deepSeekModels = {
4964
supportsReasoningEffort: ["disable", "low", "high", "max"], // Updated 2026-08-13
5065
preserveReasoning: true,
5166
reasoningEffort: "high",
52-
supportsTemperature: true,
53-
defaultTemperature: 1.0,
5467
inputPrice: 0, // the inputs are priced as cache read/write, so `inputPrice` should be 0
55-
// Static estimates use peak rates; off-peak rates are 50% lower.
56-
outputPrice: 1.32,
57-
cacheWritesPrice: 0.44,
58-
cacheReadsPrice: 0.014,
59-
description: `DeepSeek-V4-Flash-Vision-Exp is DeepSeek's experimental multimodal V4 Flash model with image understanding. It supports thinking and non-thinking modes, JSON output, tool calls, chat prefix completion (beta), and image input through Chat Completions, Responses, and Anthropic-compatible APIs.`,
68+
// This retired ID is billed as the current Flash model.
69+
outputPrice: 1.2,
70+
cacheWritesPrice: 0.3,
71+
cacheReadsPrice: 0.006,
72+
description: `Legacy model name routed to the latest DeepSeek Flash model, which supports image input. Use deepseek-flash for new configurations.`,
6073
},
6174
} as const satisfies Record<string, ModelInfo>
6275

0 commit comments

Comments
 (0)