mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-08-01 04:02:02 +08:00
fix(presets): use dated Doubao model id and price 6-digit dated models
Volcengine Ark rejects the bare model name doubao-seed-2-1-pro with a 404
("model does not exist or you do not have access to it") even after the
model is activated; the API requires the full dated id
doubao-seed-2-1-pro-260628. Update the Doubao preset model id across all
apps (config default, generated catalog, and OpenClaw namespaced refs).
Pricing lookup only stripped 8-digit (YYYYMMDD) and ISO date suffixes, not
the 6-digit YYMMDD format Volcengine uses (-260628, -250615), so real
Doubao usage never matched the bare-name pricing seed and showed $0 cost.
Extend strip_model_date_suffix to also strip 6-digit YYMMDD (with
month/day validation to avoid eating non-date version suffixes), keeping
the bare-name pricing seed as the canonical identity. This also fixes
pricing for every other Volcengine Doubao model. Add unit and end-to-end
regression tests.
This commit is contained in:
@@ -228,7 +228,7 @@ export const openclawProviderPresets: OpenClawProviderPreset[] = [
|
||||
api: "openai-completions",
|
||||
models: [
|
||||
{
|
||||
id: "doubao-seed-2-1-pro",
|
||||
id: "doubao-seed-2-1-pro-260628",
|
||||
name: "DouBao Seed 2.1 Pro",
|
||||
contextWindow: 128000,
|
||||
cost: { input: 0.84, output: 4.2 },
|
||||
@@ -248,9 +248,9 @@ export const openclawProviderPresets: OpenClawProviderPreset[] = [
|
||||
},
|
||||
},
|
||||
suggestedDefaults: {
|
||||
model: { primary: "doubaoseed/doubao-seed-2-1-pro" },
|
||||
model: { primary: "doubaoseed/doubao-seed-2-1-pro-260628" },
|
||||
modelCatalog: {
|
||||
"doubaoseed/doubao-seed-2-1-pro": { alias: "DouBao" },
|
||||
"doubaoseed/doubao-seed-2-1-pro-260628": { alias: "DouBao" },
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user