fix(stage-ui): update Volcengine Coding Plan models (#2321)

This commit is contained in:
葱姜蒜
2026-08-19 14:18:33 +08:00
committed by GitHub
parent 2bc1c51c29
commit 7de1f9d3a9
3 changed files with 65 additions and 15 deletions
@@ -35,19 +35,46 @@ describe('ark chat provider definitions', () => {
expect(parsedConfig.baseUrl).toBe('https://ark.cn-beijing.volces.com/api/coding/v3')
const providerInstance = provider!.createProvider(parsedConfig) as any
const chatConfig = providerInstance.chat('volcengine-coding-plan/doubao-seed-2.0-code')
expect(chatConfig.model).toBe('doubao-seed-2.0-code')
const chatConfig = providerInstance.chat('volcengine-coding-plan/doubao-seed-2.1-turbo')
expect(chatConfig.model).toBe('doubao-seed-2.1-turbo')
const listedModels = await provider!.extraMethods!.listModels!(parsedConfig, providerInstance)
expect(listedModels.map(model => model.id)).toEqual([
'volcengine-coding-plan/ark-code-latest',
'volcengine-coding-plan/doubao-seed-2.1-turbo',
'volcengine-coding-plan/doubao-seed-2.0-lite',
'volcengine-coding-plan/minimax-m3',
'volcengine-coding-plan/kimi-k2.7-code',
'volcengine-coding-plan/glm-5.3',
'volcengine-coding-plan/deepseek-v4-flash',
'volcengine-coding-plan/deepseek-v4-pro',
'volcengine-coding-plan/doubao-seed-2.0-code',
'volcengine-coding-plan/doubao-seed-2.0-pro',
'volcengine-coding-plan/doubao-seed-2.0-lite',
'volcengine-coding-plan/doubao-seed-code',
'volcengine-coding-plan/minimax-m2.5',
'volcengine-coding-plan/glm-4.7',
'volcengine-coding-plan/deepseek-v3.2',
'volcengine-coding-plan/kimi-k2.5',
])
expect(listedModels[0]).toEqual({
description: 'Uses the model selected in the Coding Plan console, including Auto; changes apply in 35 minutes.',
id: 'volcengine-coding-plan/ark-code-latest',
name: 'ark-code-latest',
provider: 'volcengine-coding-plan',
})
expect(listedModels.slice(-2)).toEqual([
{
contextLength: 256000,
deprecated: true,
description: 'Legacy Coding Plan model scheduled for retirement. Switch to a currently supported model.',
id: 'volcengine-coding-plan/doubao-seed-2.0-code',
name: 'doubao-seed-2.0-code',
provider: 'volcengine-coding-plan',
},
{
contextLength: 256000,
deprecated: true,
description: 'Legacy Coding Plan model scheduled for retirement. Switch to a currently supported model.',
id: 'volcengine-coding-plan/doubao-seed-2.0-pro',
name: 'doubao-seed-2.0-pro',
provider: 'volcengine-coding-plan',
},
])
})
@@ -17,6 +17,8 @@ const arkProviderConfigSchema = z.object({
interface ArkModelSpec {
id: string
contextLength?: number
deprecated?: boolean
description?: string
}
interface ArkProviderDefinitionOptions {
@@ -100,6 +102,12 @@ export function createArkChatProviderDefinition(options: ArkProviderDefinitionOp
if (model.contextLength !== undefined) {
modelInfo.contextLength = model.contextLength
}
if (model.deprecated !== undefined) {
modelInfo.deprecated = model.deprecated
}
if (model.description !== undefined) {
modelInfo.description = model.description
}
return modelInfo
}),
},
@@ -12,13 +12,28 @@ export const providerVolcengineCodingPlan = createArkChatProviderDefinition({
icon: 'i-lobe-icons:volcengine',
iconColor: 'i-lobe-icons:volcengine',
models: [
{ id: 'doubao-seed-2.0-code', contextLength: 256000 },
{ id: 'doubao-seed-2.0-pro', contextLength: 256000 },
{
id: 'ark-code-latest',
description: 'Uses the model selected in the Coding Plan console, including Auto; changes apply in 35 minutes.',
},
{ id: 'doubao-seed-2.1-turbo', contextLength: 256000 },
{ id: 'doubao-seed-2.0-lite', contextLength: 256000 },
{ id: 'doubao-seed-code', contextLength: 256000 },
{ id: 'minimax-m2.5', contextLength: 200000 },
{ id: 'glm-4.7', contextLength: 200000 },
{ id: 'deepseek-v3.2', contextLength: 128000 },
{ id: 'kimi-k2.5', contextLength: 256000 },
{ id: 'minimax-m3', contextLength: 1024000 },
{ id: 'kimi-k2.7-code', contextLength: 256000 },
{ id: 'glm-5.3', contextLength: 1024000 },
{ id: 'deepseek-v4-flash', contextLength: 1024000 },
{ id: 'deepseek-v4-pro', contextLength: 1024000 },
{
id: 'doubao-seed-2.0-code',
contextLength: 256000,
deprecated: true,
description: 'Legacy Coding Plan model scheduled for retirement. Switch to a currently supported model.',
},
{
id: 'doubao-seed-2.0-pro',
contextLength: 256000,
deprecated: true,
description: 'Legacy Coding Plan model scheduled for retirement. Switch to a currently supported model.',
},
],
})