refactor(presets): render presets in array order and prioritize partners

Remove the category-based grouping logic from ProviderPresetSelector,
letting the array position in each preset config file be the single
source of truth for display order. Move partner presets (PatewayAI,
火山Agentplan, BytePlus, DouBaoSeed) right after Shengsuanyun across
all 6 config files so they appear earlier in the UI.
This commit is contained in:
Jason
2026-05-15 23:28:59 +08:00
parent 9050442b65
commit ec8afd63ea
11 changed files with 653 additions and 547 deletions
+99 -99
View File
@@ -326,6 +326,105 @@ export const opencodeProviderPresets: OpenCodeProviderPreset[] = [
},
},
},
{
name: "火山Agentplan",
websiteUrl:
"https://www.volcengine.com/activity/agentplan?utm_campaign=hw&utm_content=ccswitch&utm_medium=devrel_tool_web&utm_source=OWO&utm_term=ccswitch",
apiKeyUrl:
"https://www.volcengine.com/activity/agentplan?utm_campaign=hw&utm_content=ccswitch&utm_medium=devrel_tool_web&utm_source=OWO&utm_term=ccswitch",
settingsConfig: {
npm: "@ai-sdk/openai-compatible",
name: "火山Agentplan",
options: {
baseURL: "https://ark.cn-beijing.volces.com/api/coding/v3",
apiKey: "",
setCacheKey: true,
},
models: {
"ark-code-latest": {
name: "Ark Code Latest",
},
},
},
category: "cn_official",
isPartner: true,
partnerPromotionKey: "volcengine_agentplan",
icon: "huoshan",
iconColor: "#3370FF",
templateValues: {
apiKey: {
label: "API Key",
placeholder: "",
editorValue: "",
},
},
},
{
name: "BytePlus",
websiteUrl:
"https://www.byteplus.com/en/product/modelark?utm_campaign=hw&utm_content=ccswitch&utm_medium=devrel_tool_web&utm_source=OWO&utm_term=ccswitch",
apiKeyUrl:
"https://www.byteplus.com/en/product/modelark?utm_campaign=hw&utm_content=ccswitch&utm_medium=devrel_tool_web&utm_source=OWO&utm_term=ccswitch",
settingsConfig: {
npm: "@ai-sdk/openai-compatible",
name: "BytePlus",
options: {
baseURL: "https://ark.ap-southeast.bytepluses.com/api/coding/v3",
apiKey: "",
setCacheKey: true,
},
models: {
"ark-code-latest": {
name: "Ark Code Latest",
},
},
},
category: "cn_official",
isPartner: true,
partnerPromotionKey: "byteplus",
icon: "byteplus",
iconColor: "#3370FF",
templateValues: {
apiKey: {
label: "API Key",
placeholder: "",
editorValue: "",
},
},
},
{
name: "DouBaoSeed",
websiteUrl:
"https://console.volcengine.com/ark/region:ark+cn-beijing/apiKey?apikey=%7B%7D&utm_campaign=hw&utm_content=ccswitch&utm_medium=devrel_tool_web&utm_source=OWO&utm_term=ccswitch",
apiKeyUrl:
"https://console.volcengine.com/ark/region:ark+cn-beijing/apiKey?apikey=%7B%7D&utm_campaign=hw&utm_content=ccswitch&utm_medium=devrel_tool_web&utm_source=OWO&utm_term=ccswitch",
settingsConfig: {
npm: "@ai-sdk/openai-compatible",
name: "DouBaoSeed",
options: {
baseURL: "https://ark.cn-beijing.volces.com/api/v3",
apiKey: "",
setCacheKey: true,
},
models: {
"doubao-seed-2-0-code-preview-latest": {
name: "Doubao Seed Code Preview",
},
},
},
category: "cn_official",
isPartner: true,
partnerPromotionKey: "doubaoseed",
icon: "doubao",
iconColor: "#3370FF",
templateValues: {
apiKey: {
label: "API Key",
placeholder: "",
editorValue: "",
},
},
},
{
name: "DeepSeek",
websiteUrl: "https://platform.deepseek.com",
@@ -783,105 +882,6 @@ export const opencodeProviderPresets: OpenCodeProviderPreset[] = [
},
},
},
{
name: "DouBaoSeed",
websiteUrl:
"https://console.volcengine.com/ark/region:ark+cn-beijing/apiKey?apikey=%7B%7D&utm_campaign=hw&utm_content=ccswitch&utm_medium=devrel_tool_web&utm_source=OWO&utm_term=ccswitch",
apiKeyUrl:
"https://console.volcengine.com/ark/region:ark+cn-beijing/apiKey?apikey=%7B%7D&utm_campaign=hw&utm_content=ccswitch&utm_medium=devrel_tool_web&utm_source=OWO&utm_term=ccswitch",
settingsConfig: {
npm: "@ai-sdk/openai-compatible",
name: "DouBaoSeed",
options: {
baseURL: "https://ark.cn-beijing.volces.com/api/v3",
apiKey: "",
setCacheKey: true,
},
models: {
"doubao-seed-2-0-code-preview-latest": {
name: "Doubao Seed Code Preview",
},
},
},
category: "cn_official",
isPartner: true,
partnerPromotionKey: "doubaoseed",
icon: "doubao",
iconColor: "#3370FF",
templateValues: {
apiKey: {
label: "API Key",
placeholder: "",
editorValue: "",
},
},
},
{
name: "火山Agentplan",
websiteUrl:
"https://www.volcengine.com/activity/agentplan?utm_campaign=hw&utm_content=ccswitch&utm_medium=devrel_tool_web&utm_source=OWO&utm_term=ccswitch",
apiKeyUrl:
"https://www.volcengine.com/activity/agentplan?utm_campaign=hw&utm_content=ccswitch&utm_medium=devrel_tool_web&utm_source=OWO&utm_term=ccswitch",
settingsConfig: {
npm: "@ai-sdk/openai-compatible",
name: "火山Agentplan",
options: {
baseURL: "https://ark.cn-beijing.volces.com/api/coding/v3",
apiKey: "",
setCacheKey: true,
},
models: {
"ark-code-latest": {
name: "Ark Code Latest",
},
},
},
category: "cn_official",
isPartner: true,
partnerPromotionKey: "volcengine_agentplan",
icon: "huoshan",
iconColor: "#3370FF",
templateValues: {
apiKey: {
label: "API Key",
placeholder: "",
editorValue: "",
},
},
},
{
name: "BytePlus",
websiteUrl:
"https://www.byteplus.com/en/product/modelark?utm_campaign=hw&utm_content=ccswitch&utm_medium=devrel_tool_web&utm_source=OWO&utm_term=ccswitch",
apiKeyUrl:
"https://www.byteplus.com/en/product/modelark?utm_campaign=hw&utm_content=ccswitch&utm_medium=devrel_tool_web&utm_source=OWO&utm_term=ccswitch",
settingsConfig: {
npm: "@ai-sdk/openai-compatible",
name: "BytePlus",
options: {
baseURL: "https://ark.ap-southeast.bytepluses.com/api/coding/v3",
apiKey: "",
setCacheKey: true,
},
models: {
"ark-code-latest": {
name: "Ark Code Latest",
},
},
},
category: "cn_official",
isPartner: true,
partnerPromotionKey: "byteplus",
icon: "byteplus",
iconColor: "#3370FF",
templateValues: {
apiKey: {
label: "API Key",
placeholder: "",
editorValue: "",
},
},
},
{
name: "BaiLing",
websiteUrl: "https://alipaytbox.yuque.com/sxs0ba/ling/get_started",