Skip to content

Commit dce1ea7

Browse files
yibudakclaude
andcommitted
fix(providers): declare qwen3.8-max video input and keep both deepseek flash ids
Review follow-up on two points. The qwen3.8-max family reached the modality default table as image-only, so every config that carries no explicit modalities — the VS Code companion template, which ships none for any model, plus manually typed model ids and installs predating the preset entry — silently dropped video input the model accepts. Declaring video on the family pattern fixes all of those paths at once instead of widening the companion's duplicate spec, and lines the default up with the preset, which already declared video for the preview. Swapping deepseek-v4-flash for the dated snapshot removed a still-live id. The bare alias answers Singapore's Token Plan endpoint with 403 Unpurchased, not 404, so it is missing from that plan's entitlement rather than retired, and it remains a built-in of the DeepSeek, Alibaba standard and IdeaLab presets. Shipping both ids strands neither region's users and drops the need to migrate installed model selections. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 9a42fdc commit dce1ea7

6 files changed

Lines changed: 26 additions & 5 deletions

File tree

packages/core/src/core/modalityDefaults.test.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,15 +155,18 @@ describe('defaultModalities', () => {
155155
expect(defaultModalities('qwen3.7-max')).toEqual({});
156156
});
157157

158-
it('returns image for qwen3.8-max', () => {
158+
it('returns image + video for qwen3.8-max', () => {
159159
const m = defaultModalities('qwen3.8-max');
160160
expect(m.image).toBe(true);
161-
expect(m.video).toBeUndefined();
161+
expect(m.video).toBe(true);
162+
expect(m.pdf).toBeUndefined();
163+
expect(m.audio).toBeUndefined();
162164
});
163165

164-
it('returns image for qwen3.8-max-preview (provider-prefixed)', () => {
166+
it('returns image + video for qwen3.8-max-preview (provider-prefixed)', () => {
165167
const m = defaultModalities('bailian-token-plan/qwen3.8-max-preview');
166168
expect(m.image).toBe(true);
169+
expect(m.video).toBe(true);
167170
});
168171

169172
it('returns image + video for qwen3.6-35b variants', () => {

packages/core/src/core/modalityDefaults.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ const MODALITY_PATTERNS: Array<[RegExp, InputModalities]> = [
4444
[/^qwen3\.5-plus/, { image: true, video: true }],
4545
[/^qwen3\.6-plus/, { image: true, video: true }],
4646
[/^qwen3\.7-plus/, { image: true, video: true }],
47-
// Qwen Max models (3.8+): image support
48-
[/^qwen3\.8-max/, { image: true }],
47+
// Qwen Max models (3.8+): image + video support
48+
[/^qwen3\.8-max/, { image: true, video: true }],
4949
[/^coder-model$/, { image: true, video: true }],
5050

5151
// Qwen VL (vision-language) models: image + video

packages/core/src/providers/__tests__/presets/alibaba-token-plan.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ describe('token plan provider', () => {
4242
'qwen3.8-max-preview',
4343
'qwen3.6-flash',
4444
'deepseek-v4-pro',
45+
'deepseek-v4-flash',
4546
'deepseek-v4-flash-0731',
4647
'deepseek-v3.2',
4748
'kimi-k2.7-code',

packages/core/src/providers/presets/alibaba-token-plan.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ const TOKEN_PLAN_MODELS: ModelSpec[] = [
5454
enableThinking: true,
5555
},
5656
{ id: 'deepseek-v4-pro', contextWindowSize: 1000000 },
57+
// Singapore's catalog lists only the dated snapshot; the bare alias answers
58+
// there with 403 Unpurchased rather than 404, so it is a per-plan entitlement
59+
// gap, not a retired id — it stays a built-in of the DeepSeek, Alibaba
60+
// standard and IdeaLab presets. Both ship rather than one replacing the
61+
// other, so neither region's users are stranded.
62+
{ id: 'deepseek-v4-flash', contextWindowSize: 1000000 },
5763
{ id: 'deepseek-v4-flash-0731', contextWindowSize: 1000000 },
5864
{ id: 'deepseek-v3.2', contextWindowSize: 131072 },
5965
{

packages/vscode-ide-companion/src/services/subscriptionPlanDefinitions.test.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ describe('subscription plan definitions', () => {
2424
'qwen3.8-max-preview',
2525
'qwen3.6-flash',
2626
'deepseek-v4-pro',
27+
'deepseek-v4-flash',
2728
'deepseek-v4-flash-0731',
2829
'deepseek-v3.2',
2930
'kimi-k2.7-code',
@@ -41,6 +42,15 @@ describe('subscription plan definitions', () => {
4142
tokenPlan.template.find((model) => model.id === 'deepseek-v4-pro')
4243
?.generationConfig,
4344
).toEqual({ contextWindowSize: 1000000 });
45+
// The companion spec carries no modality metadata for any model, so
46+
// qwen3.8-max relies on the core defaultModalities() fallback for video.
47+
expect(
48+
tokenPlan.template.find((model) => model.id === 'qwen3.8-max')
49+
?.generationConfig,
50+
).toEqual({
51+
extra_body: { enable_thinking: true },
52+
contextWindowSize: 1000000,
53+
});
4454
});
4555

4656
it('defaults Token Plan to China and supports the Singapore region', () => {

packages/vscode-ide-companion/src/services/subscriptionPlanDefinitions.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ const BAILIAN_TOKEN_PLAN_MODELS = [
127127
},
128128
{ id: 'qwen3.6-flash', contextWindowSize: 1000000, enableThinking: true },
129129
{ id: 'deepseek-v4-pro', contextWindowSize: 1000000 },
130+
{ id: 'deepseek-v4-flash', contextWindowSize: 1000000 },
130131
{ id: 'deepseek-v4-flash-0731', contextWindowSize: 1000000 },
131132
{ id: 'deepseek-v3.2', contextWindowSize: 131072 },
132133
{ id: 'kimi-k2.7-code', contextWindowSize: 262144, enableThinking: true },

0 commit comments

Comments
 (0)