Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions packages/core/script/generate-venice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ const Pricing = z
input: z.object({ usd: z.number(), diem: z.number().optional() }).passthrough(),
output: z.object({ usd: z.number(), diem: z.number().optional() }).passthrough(),
cache_input: z.object({ usd: z.number(), diem: z.number().optional() }).passthrough().optional(),
cache_write: z.object({ usd: z.number(), diem: z.number().optional() }).passthrough().optional(),
})
.passthrough();

Expand Down Expand Up @@ -205,6 +206,7 @@ interface MergedModel {
input: number;
output: number;
cache_read?: number;
cache_write?: number;
};
limit: {
context: number;
Expand Down Expand Up @@ -276,6 +278,7 @@ function mergeModel(
input: spec.pricing.input.usd,
output: spec.pricing.output.usd,
...(spec.pricing.cache_input && { cache_read: spec.pricing.cache_input.usd }),
...(spec.pricing.cache_write && { cache_write: spec.pricing.cache_write.usd }),
};
}

Expand Down Expand Up @@ -348,6 +351,9 @@ function formatToml(model: MergedModel): string {
if (model.cost.cache_read !== undefined) {
lines.push(`cache_read = ${model.cost.cache_read}`);
}
if (model.cost.cache_write !== undefined) {
lines.push(`cache_write = ${model.cost.cache_write}`);
}
}

// Limit section
Expand Down Expand Up @@ -409,6 +415,7 @@ function detectChanges(
compare("cost.input", existing.cost?.input, merged.cost?.input);
compare("cost.output", existing.cost?.output, merged.cost?.output);
compare("cost.cache_read", existing.cost?.cache_read, merged.cost?.cache_read);
compare("cost.cache_write", existing.cost?.cache_write, merged.cost?.cache_write);
compare("limit.context", existing.limit?.context, merged.limit.context);
compare("limit.output", existing.limit?.output, merged.limit.output);
compare("modalities.input", existing.modalities?.input, merged.modalities.input);
Expand Down
3 changes: 2 additions & 1 deletion providers/venice/models/claude-opus-45.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ structured_output = true
temperature = true
knowledge = "2025-03"
release_date = "2025-12-06"
last_updated = "2025-12-29"
last_updated = "2026-01-08"
open_weights = false

[cost]
input = 6
output = 30
cache_read = 0.6
cache_write = 7.5

[limit]
context = 202_752
Expand Down
23 changes: 0 additions & 23 deletions providers/venice/models/zai-org-glm-4.6.toml

This file was deleted.