mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
fix(ai): keep models.dev pricing tiers for Amazon Bedrock models
Bedrock OpenAI models were costed at the short-context rate above 272k input tokens because the generator dropped the models.dev tiers. closes #10326
This commit is contained in:
parent
319fecb89b
commit
4665fafb4d
2 changed files with 3 additions and 6 deletions
|
|
@ -1790,12 +1790,8 @@ async function loadModelsDevData(): Promise<Model<any>[]> {
|
|||
baseUrl: getBedrockBaseUrl(id),
|
||||
reasoning: m.reasoning === true,
|
||||
input: (m.modalities?.input?.includes("image") ? ["text", "image"] : ["text"]) as ("text" | "image")[],
|
||||
cost: {
|
||||
input: m.cost?.input || 0,
|
||||
output: m.cost?.output || 0,
|
||||
cacheRead: m.cost?.cache_read || 0,
|
||||
cacheWrite: m.cost?.cache_write || 0,
|
||||
},
|
||||
// Includes models.dev pricing tiers, e.g. the long-context tier for OpenAI models (#10326).
|
||||
cost: getModelsDevCost(m.cost),
|
||||
contextWindow: m.limit?.context || 4096,
|
||||
maxTokens: m.limit?.output || 4096,
|
||||
...(m.structured_output === true && { compat: { supportsStrictMode: true } }),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue