Compare commits
98
Commits
issue-6052
...
issue-6151
No files matched your search
@@ -0,0 +1,22 @@
|
||||
# Sources:
|
||||
# - https://ai.google.dev/gemini-api/docs/models/gemini-3.8-flash
|
||||
# - https://ai.google.dev/gemini-api/docs/latest-model
|
||||
name = "Gemini 3.8 Flash"
|
||||
description = "Google's most intelligent Flash model, engineered for long-horizon software engineering, autonomous agents, and complex enterprise workflows"
|
||||
family = "gemini-flash"
|
||||
release_date = "2026-09-02"
|
||||
last_updated = "2026-09-02"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
temperature = true
|
||||
tool_call = true
|
||||
structured_output = true
|
||||
open_weights = false
|
||||
|
||||
[limit]
|
||||
context = 1_048_576
|
||||
output = 65_536
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "video", "audio", "pdf"]
|
||||
output = ["text"]
|
||||
@@ -1,3 +1,4 @@
|
||||
# https://cloud.tencent.com/document/product/1823/130051
|
||||
name = "Hy3"
|
||||
description = "Tencent Hy reasoning model for coding, instruction following, and agent tasks"
|
||||
family = "Hy"
|
||||
@@ -11,7 +12,8 @@ open_weights = true
|
||||
|
||||
[limit]
|
||||
context = 256_000
|
||||
output = 64_000
|
||||
input = 192_000
|
||||
output = 128_000
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
|
||||
@@ -25,6 +25,7 @@ import { inceptron } from "./providers/inceptron.js";
|
||||
import { kilo } from "./providers/kilo.js";
|
||||
import { llmgateway, llmgatewayProviders } from "./providers/llmgateway.js";
|
||||
import { mergeGateway } from "./providers/merge-gateway.js";
|
||||
import { meta } from "./providers/meta.js";
|
||||
import { nanoGpt } from "./providers/nano-gpt.js";
|
||||
import { openai } from "./providers/openai.js";
|
||||
import { ofox } from "./providers/ofox.js";
|
||||
@@ -149,6 +150,7 @@ export const providers: {
|
||||
llmgateway: SyncProvider<any>;
|
||||
"llmgateway-providers": SyncProvider<any>;
|
||||
"merge-gateway": SyncProvider<any>;
|
||||
meta: SyncProvider<any>;
|
||||
"nano-gpt": SyncProvider<any>;
|
||||
ofox: SyncProvider<any>;
|
||||
openai: SyncProvider<any>;
|
||||
@@ -183,6 +185,7 @@ export const providers: {
|
||||
llmgateway,
|
||||
"llmgateway-providers": llmgatewayProviders,
|
||||
"merge-gateway": mergeGateway,
|
||||
meta,
|
||||
"nano-gpt": nanoGpt,
|
||||
ofox,
|
||||
openai,
|
||||
@@ -215,7 +218,7 @@ export const groups = {
|
||||
"vercel",
|
||||
],
|
||||
cloudflare: ["cloudflare-ai-gateway", "cloudflare-workers-ai"],
|
||||
direct: ["ambient", "anthropic", "baseten", "chutes", "cortecs", "deepinfra", "digitalocean", "github-copilot", "google", "hyper", "openai", "ovhcloud", "pioneer", "tinfoil", "venice", "wandb", "xai"],
|
||||
direct: ["ambient", "anthropic", "baseten", "chutes", "cortecs", "deepinfra", "digitalocean", "github-copilot", "google", "hyper", "meta", "openai", "ovhcloud", "pioneer", "tinfoil", "venice", "wandb", "xai"],
|
||||
} as const;
|
||||
|
||||
type ProviderID = keyof typeof providers;
|
||||
|
||||
@@ -36,6 +36,7 @@ export const CortecsModel = z.object({
|
||||
cache_write_cost: z.number().nonnegative().optional(),
|
||||
}).passthrough(),
|
||||
context_size: z.number().int().positive(),
|
||||
max_output_tokens: z.number().int().positive().optional(),
|
||||
input_modalities: z.array(z.string()).transform(modalities).default(["text"]),
|
||||
output_modalities: z.array(z.string()).transform(modalities).default(["text"]),
|
||||
supported_features: z.array(z.string()).default([]),
|
||||
@@ -97,7 +98,7 @@ export function buildCortecsModel(
|
||||
const limit = {
|
||||
context: model.context_size,
|
||||
input: existing?.limit?.input,
|
||||
output: authored?.limit?.output ?? model.context_size,
|
||||
output: model.max_output_tokens ?? authored?.limit?.output ?? model.context_size,
|
||||
};
|
||||
const cost = {
|
||||
input: usd(model.pricing.input_token),
|
||||
|
||||
@@ -0,0 +1,125 @@
|
||||
import { z } from "zod";
|
||||
|
||||
import type { SyncProvider, SyncedModel } from "../index.js";
|
||||
|
||||
const MODELS_ENDPOINT = "https://dev.meta.ai/docs/models.md";
|
||||
const PRICING_ENDPOINT = "https://dev.meta.ai/docs/pricing-rate-limits.md";
|
||||
|
||||
const MetaResponse = z.object({ models: z.string(), pricing: z.string() });
|
||||
const MetaModel = z.object({
|
||||
id: z.string().regex(/^[a-z0-9][a-z0-9.-]*$/),
|
||||
context: z.number().int().positive().safe(),
|
||||
cost: z.object({
|
||||
input: z.number().finite().nonnegative(),
|
||||
output: z.number().finite().nonnegative(),
|
||||
cache_read: z.number().finite().nonnegative(),
|
||||
}),
|
||||
});
|
||||
|
||||
export type MetaModel = z.infer<typeof MetaModel>;
|
||||
|
||||
function cells(line: string) {
|
||||
return line.trim().split("|").slice(1, -1).map((cell) => cell.trim());
|
||||
}
|
||||
|
||||
function table(markdown: string, header: string[]) {
|
||||
const lines = markdown.split("\n");
|
||||
const start = lines.findIndex((line) => JSON.stringify(cells(line)) === JSON.stringify(header));
|
||||
if (start < 0) throw new Error(`Meta docs are missing the ${header.join(" / ")} table`);
|
||||
const separator = cells(lines[start + 1] ?? "");
|
||||
if (separator.length !== header.length || separator.some((cell) => !/^:?-+:?$/.test(cell))) {
|
||||
throw new Error("Meta docs have an invalid table separator");
|
||||
}
|
||||
const rows: string[][] = [];
|
||||
for (const line of lines.slice(start + 2)) {
|
||||
if (!line.trim().startsWith("|")) break;
|
||||
const row = cells(line);
|
||||
if (row.length !== header.length) throw new Error("Meta docs have an invalid table row");
|
||||
rows.push(row);
|
||||
}
|
||||
if (rows.length === 0) throw new Error("Meta docs table is empty");
|
||||
return rows;
|
||||
}
|
||||
|
||||
function tierCost(markdown: string, tier: string) {
|
||||
const sections = markdown.split(/^### /m).filter((section) => section.split("\n")[0]?.includes(`{#${tier}}`));
|
||||
if (sections.length !== 1) throw new Error(`Meta docs need exactly one pricing section for ${tier}`);
|
||||
const prices = new Map<string, number>();
|
||||
for (const [usage, price] of table(sections[0]!, ["Usage", "Price per 1M tokens"])) {
|
||||
if (!/^\$\d+(?:\.\d+)?$/.test(price!) || prices.has(usage!)) {
|
||||
throw new Error(`Meta docs have invalid or duplicate ${tier} pricing`);
|
||||
}
|
||||
prices.set(usage!, Number(price!.slice(1)));
|
||||
}
|
||||
return {
|
||||
input: prices.get("Input"),
|
||||
output: prices.get("Output"),
|
||||
cache_read: prices.get("Cached input"),
|
||||
};
|
||||
}
|
||||
|
||||
export function parseMetaModels(raw: unknown): MetaModel[] {
|
||||
const response = MetaResponse.parse(raw);
|
||||
const rows = table(response.models, ["Model ID", "Tier", "Input modalities", "Output modalities", "Context window"]);
|
||||
const ids = new Set<string>();
|
||||
return rows.map(([model, tierLink, _input, output, window]) => {
|
||||
const id = model?.match(/^`([^`]+)`$/)?.[1];
|
||||
const tier = tierLink?.match(/^\[[^\]]+\]\([^)]*#([a-z-]+)\)$/)?.[1];
|
||||
const tokens = window?.match(/^(\d+|\d{1,3}(?:,\d{3})+) tokens$/)?.[1];
|
||||
if (id === undefined || tier === undefined || tokens === undefined || output !== "Text") {
|
||||
throw new Error("Meta docs have an unsupported token-priced model row");
|
||||
}
|
||||
if (ids.has(id)) throw new Error(`Meta docs have a duplicate model: ${id}`);
|
||||
ids.add(id);
|
||||
const parsed = MetaModel.safeParse({
|
||||
id,
|
||||
context: Number(tokens.replaceAll(",", "")),
|
||||
cost: tierCost(response.pricing, tier),
|
||||
});
|
||||
if (!parsed.success) {
|
||||
parsed.error.cause = { provider: "meta", model: id };
|
||||
throw parsed.error;
|
||||
}
|
||||
return parsed.data;
|
||||
});
|
||||
}
|
||||
|
||||
export async function fetchMetaModels(fetcher: typeof fetch = fetch) {
|
||||
const [models, pricing] = await Promise.all([MODELS_ENDPOINT, PRICING_ENDPOINT].map(async (url) => {
|
||||
const response = await fetcher(url);
|
||||
if (!response.ok) throw new Error(`Meta docs request failed: ${response.status} ${response.statusText}`);
|
||||
return response.text();
|
||||
}));
|
||||
return { models, pricing };
|
||||
}
|
||||
|
||||
export const meta = {
|
||||
id: "meta",
|
||||
name: "Meta",
|
||||
modelsDir: "providers/meta/models",
|
||||
skipCreates: true,
|
||||
deleteMissing: false,
|
||||
sourceID(model) {
|
||||
return model.id;
|
||||
},
|
||||
skippedNotice(ids) {
|
||||
return ids.length === 0 ? [] : [
|
||||
`Meta's public docs list models requiring hand-authored metadata: ${ids.map((id) => `\`${id}\``).join(", ")}`,
|
||||
];
|
||||
},
|
||||
fetchModels: fetchMetaModels,
|
||||
parseModels: parseMetaModels,
|
||||
translateModel(model, context) {
|
||||
const authored = context.authored(model.id);
|
||||
if (authored === undefined) return undefined;
|
||||
// Only the documented token rates and context window are authoritative.
|
||||
// Keep output limits, modalities, reasoning controls, dates, and base_model.
|
||||
const limit = context.existing(model.id)?.limit?.context === model.context
|
||||
? authored.limit
|
||||
: { ...authored.limit, context: model.context };
|
||||
return {
|
||||
id: model.id,
|
||||
model: { ...authored, limit, cost: { ...authored.cost, ...model.cost } } as SyncedModel,
|
||||
};
|
||||
},
|
||||
} satisfies SyncProvider<MetaModel>;
|
||||
@@ -103,15 +103,12 @@ export function buildOvhcloudModel(
|
||||
const outputCost = price(model.pricing?.completion);
|
||||
const cacheRead = price(model.pricing?.input_cache_reads);
|
||||
const cacheWrite = price(model.pricing?.input_cache_writes);
|
||||
const cost =
|
||||
(inputCost ?? 0) > 0 || (outputCost ?? 0) > 0
|
||||
? {
|
||||
input: inputCost ?? 0,
|
||||
output: outputCost ?? 0,
|
||||
cache_read: cacheRead !== undefined && cacheRead > 0 ? cacheRead : undefined,
|
||||
cache_write: cacheWrite !== undefined && cacheWrite > 0 ? cacheWrite : undefined,
|
||||
}
|
||||
: undefined;
|
||||
const cost = {
|
||||
input: inputCost ?? 0,
|
||||
output: outputCost ?? 0,
|
||||
cache_read: cacheRead !== undefined && cacheRead > 0 ? cacheRead : undefined,
|
||||
cache_write: cacheWrite !== undefined && cacheWrite > 0 ? cacheWrite : undefined,
|
||||
};
|
||||
|
||||
return {
|
||||
base_model: existing?.base_model,
|
||||
|
||||
@@ -133,6 +133,9 @@ export function resolveRequestyBaseModel(id: string) {
|
||||
const bare = id.replace(REGION_SUFFIX, "");
|
||||
return (
|
||||
resolveModelMetadataBaseModel(bare) ??
|
||||
(bare.startsWith("claude-")
|
||||
? resolveModelMetadataBaseModel(`anthropic/${bare}`)
|
||||
: undefined) ??
|
||||
(ANTHROPIC_DOT_ZERO.test(bare)
|
||||
? resolveModelMetadataBaseModel(`${bare}-0`)
|
||||
: undefined)
|
||||
|
||||
@@ -0,0 +1,191 @@
|
||||
import { expect, test } from "bun:test";
|
||||
import { mkdtemp, rm } from "node:fs/promises";
|
||||
import { tmpdir } from "node:os";
|
||||
import path from "node:path";
|
||||
|
||||
import { groups, providers, syncProvider, type ExistingModel } from "../src/sync/index.js";
|
||||
import { fetchMetaModels, meta, parseMetaModels } from "../src/sync/providers/meta.js";
|
||||
|
||||
// Public docs format; intentionally exclude account-scoped API responses.
|
||||
const models = `
|
||||
## Muse Spark {#muse-spark}
|
||||
|
||||
| Model ID | Tier | Input modalities | Output modalities | Context window |
|
||||
| :---- | :---- | :---- | :---- | :---- |
|
||||
| \`muse-spark-1.2\` | [Standard](/docs/pricing-rate-limits#standard-tier) | Text, image, video, audio, PDF | Text | 1,048,576 tokens |
|
||||
| \`muse-spark-1.2-contributor\` | [Contributor](/docs/pricing-rate-limits#contributor-tier) | Text, image, video, audio, PDF | Text | 1,048,576 tokens |
|
||||
|
||||
## Muse Image
|
||||
|
||||
| Model ID | Family | Input | Output |
|
||||
| :---- | :---- | :---- | :---- |
|
||||
| \`muse-image-1.0\` | Muse Image | Text, image | Image |
|
||||
`;
|
||||
|
||||
const pricing = `
|
||||
### Standard tier {#standard-tier}
|
||||
|
||||
| Usage | Price per 1M tokens |
|
||||
| :---- | :---- |
|
||||
| Cached input | $0.15 |
|
||||
| Input | $1.25 |
|
||||
| Output | $4.25 |
|
||||
|
||||
### Contributor tier {#contributor-tier}
|
||||
|
||||
| Usage | Price per 1M tokens |
|
||||
| :---- | :---- |
|
||||
| Cached input | $0.002 |
|
||||
| Input | $0.10 |
|
||||
| Output | $0.20 |
|
||||
|
||||
### Image generation
|
||||
|
||||
Muse Image costs $0.01 per image, not per token.
|
||||
`;
|
||||
|
||||
const source = { models, pricing };
|
||||
|
||||
test("Meta sync is registered for direct and hourly runs", () => {
|
||||
expect(providers.meta).toBe(meta);
|
||||
expect(groups.direct).toContain("meta");
|
||||
expect(meta.skipCreates).toBe(true);
|
||||
expect(meta.deleteMissing).toBe(false);
|
||||
});
|
||||
|
||||
test("parses public text models, tier prices in USD/MTok, and context windows", () => {
|
||||
expect(parseMetaModels(source)).toEqual([
|
||||
{ id: "muse-spark-1.2", context: 1_048_576, cost: { input: 1.25, output: 4.25, cache_read: 0.15 } },
|
||||
{ id: "muse-spark-1.2-contributor", context: 1_048_576, cost: { input: 0.1, output: 0.2, cache_read: 0.002 } },
|
||||
]);
|
||||
expect(parseMetaModels({ ...source, pricing: pricing.replace("$0.002", "$0") })[1]?.cost.cache_read).toBe(0);
|
||||
expect(parseMetaModels({ ...source, models: models.replaceAll("1,048,576", "1048576") })[0]?.context).toBe(1_048_576);
|
||||
});
|
||||
|
||||
test("rejects incomplete or changed docs rather than guessing prices or limits", () => {
|
||||
for (const bad of [
|
||||
{ ...source, models: "<html>Unavailable</html>" },
|
||||
{ ...source, pricing: "" },
|
||||
{ ...source, models: models.replace("1,048,576 tokens", "Unknown") },
|
||||
{ ...source, models: models.replace("1,048,576 tokens", "0 tokens") },
|
||||
{ ...source, models: models.replace("1,048,576 tokens", "1,04,8576 tokens") },
|
||||
{ ...source, models: models.replace("#standard-tier)", "#unknown-tier)") },
|
||||
{ ...source, models: models.replace("`muse-spark-1.2`", "`../private`") },
|
||||
{ ...source, pricing: pricing.replace("$1.25", "€1.25") },
|
||||
{ ...source, pricing: pricing.replace("$1.25", "$-1") },
|
||||
{ ...source, pricing: pricing.replace("Price per 1M tokens", "Price per 1K tokens") },
|
||||
{ ...source, pricing: pricing.replace("| Output | $4.25 |", "") },
|
||||
{ ...source, pricing: pricing.replace("| Output | $4.25 |", "| Output | $4.25 |\n| Input | $2 |") },
|
||||
{ ...source, models: models.replace("muse-spark-1.2-contributor", "muse-spark-1.2") },
|
||||
{ ...source, models: models.replace("| :---- | :---- | :---- | :---- | :---- |", "| broken |") },
|
||||
]) {
|
||||
expect(() => parseMetaModels(bad)).toThrow();
|
||||
}
|
||||
});
|
||||
|
||||
test("updates only authoritative fields without expanding inherited metadata", () => {
|
||||
const authored: ExistingModel = {
|
||||
base_model: "meta/muse-spark-1.2",
|
||||
base_model_omit: ["limit.input"],
|
||||
reasoning_options: [{ type: "effort", values: ["minimal", "low", "medium", "high", "xhigh"] }],
|
||||
cost: { input: 9, output: 9, cache_read: 9, input_audio: 2, reasoning: 3 },
|
||||
status: "beta",
|
||||
};
|
||||
const existing: ExistingModel = {
|
||||
...authored,
|
||||
name: "Muse Spark 1.2",
|
||||
reasoning: true,
|
||||
limit: { context: 1_048_576, output: 131_072 },
|
||||
modalities: { input: ["text", "image", "pdf", "video"], output: ["text"] },
|
||||
};
|
||||
const model = parseMetaModels(source)[0]!;
|
||||
const context = { authored: () => authored, existing: () => existing };
|
||||
const translated = meta.translateModel(model, context)!;
|
||||
expect(translated.model).toEqual({
|
||||
...authored,
|
||||
limit: undefined,
|
||||
cost: { input: 1.25, output: 4.25, cache_read: 0.15, input_audio: 2, reasoning: 3 },
|
||||
});
|
||||
expect(meta.translateModel({ ...model, context: 2_000_000 }, context)?.model.limit).toEqual({ context: 2_000_000 });
|
||||
expect(authored.cost?.input).toBe(9);
|
||||
});
|
||||
|
||||
test("unknown documented models are reported, never synthesized", () => {
|
||||
const model = parseMetaModels(source)[0]!;
|
||||
expect(meta.translateModel(model, { authored: () => undefined, existing: () => undefined })).toBeUndefined();
|
||||
expect(meta.sourceID(model)).toBe(model.id);
|
||||
expect(meta.skippedNotice([model.id]).join(" ")).toContain(model.id);
|
||||
});
|
||||
|
||||
test("fetches only public docs without credentials and rejects HTTP failures", async () => {
|
||||
const urls: string[] = [];
|
||||
const fetcher = (async (url: string, init?: RequestInit) => {
|
||||
urls.push(url);
|
||||
expect(init).toBeUndefined();
|
||||
return new Response(url.endsWith("/models.md") ? models : pricing);
|
||||
}) as typeof fetch;
|
||||
expect(await fetchMetaModels(fetcher)).toEqual(source);
|
||||
expect(urls).toEqual(["https://dev.meta.ai/docs/models.md", "https://dev.meta.ai/docs/pricing-rate-limits.md"]);
|
||||
const failing = (async () => new Response("Unavailable", { status: 503 })) as typeof fetch;
|
||||
await expect(fetchMetaModels(failing)).rejects.toThrow("Meta docs request failed: 503");
|
||||
});
|
||||
|
||||
test("runner preserves inherited controls, retains absent models, and is idempotent", async () => {
|
||||
const root = await mkdtemp(path.join(tmpdir(), "models-dev-meta-"));
|
||||
const modelsDir = path.join(root, "providers", "meta", "models");
|
||||
const filename = path.join(modelsDir, "muse-spark-1.2.toml");
|
||||
const original = `# Keep this authored source comment.
|
||||
base_model = "meta/muse-spark-1.2"
|
||||
base_model_omit = ["limit.input"]
|
||||
reasoning_options = [{ type = "effort", values = ["minimal", "low", "medium", "high", "xhigh"] }]
|
||||
[cost]
|
||||
input = 9
|
||||
output = 9
|
||||
cache_read = 9
|
||||
`;
|
||||
const absent = path.join(modelsDir, "muse-spark-1.1.toml");
|
||||
try {
|
||||
await Bun.write(path.join(root, "models", "meta", "muse-spark-1.2.toml"), `
|
||||
name = "Muse Spark 1.2"
|
||||
description = "Test fixture"
|
||||
release_date = "2026-01-01"
|
||||
last_updated = "2026-01-01"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
tool_call = true
|
||||
open_weights = false
|
||||
[limit]
|
||||
context = 1048576
|
||||
input = 1048576
|
||||
output = 131072
|
||||
[modalities]
|
||||
input = ["text", "image", "pdf", "video"]
|
||||
output = ["text"]
|
||||
`);
|
||||
await Bun.write(filename, original);
|
||||
await Bun.write(absent, original);
|
||||
const provider = { ...meta, modelsDir, fetchModels: async () => source };
|
||||
const dry = await syncProvider(provider, { dryRun: true, openIssues: false });
|
||||
expect(dry.updated).toBe(1);
|
||||
expect(await Bun.file(filename).text()).toBe(original);
|
||||
const first = await syncProvider(provider, { openIssues: false });
|
||||
expect(first).toMatchObject({ created: 0, updated: 1, deleted: 0, unchanged: 1 });
|
||||
expect(first.notices.join(" ")).toContain("muse-spark-1.2-contributor");
|
||||
expect(await Bun.file(absent).text()).toBe(original);
|
||||
const text = await Bun.file(filename).text();
|
||||
expect(text).toStartWith("# Keep this authored source comment.");
|
||||
const result = Bun.TOML.parse(text);
|
||||
expect(result.base_model).toBe("meta/muse-spark-1.2");
|
||||
expect(result.base_model_omit).toEqual(["limit.input"]);
|
||||
expect(result.reasoning_options).toEqual(Bun.TOML.parse(original).reasoning_options);
|
||||
expect(result.limit).toBeUndefined();
|
||||
expect(result.cost).toEqual({ input: 1.25, output: 4.25, cache_read: 0.15 });
|
||||
const second = await syncProvider(provider, { openIssues: false });
|
||||
expect(second).toMatchObject({ created: 0, updated: 0, deleted: 0, unchanged: 2 });
|
||||
expect(await Bun.file(filename).text()).toBe(text);
|
||||
await expect(syncProvider({ ...provider, fetchModels: async () => ({ ...source, pricing: "" }) })).rejects.toThrow();
|
||||
expect(await Bun.file(filename).text()).toBe(text);
|
||||
} finally {
|
||||
await rm(root, { recursive: true, force: true });
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,55 @@
|
||||
import { expect, test } from "bun:test";
|
||||
|
||||
import { formatToml } from "../src/sync/index.js";
|
||||
import { buildOvhcloudModel, type OvhcloudModel } from "../src/sync/providers/ovhcloud.js";
|
||||
|
||||
function model(pricing?: OvhcloudModel["pricing"]): OvhcloudModel {
|
||||
return {
|
||||
id: "example-model",
|
||||
name: "Example Model",
|
||||
created: Date.parse("2026-09-02T00:00:00Z") / 1_000,
|
||||
context_length: 262_144,
|
||||
pricing,
|
||||
};
|
||||
}
|
||||
|
||||
test.each([
|
||||
{ label: "absent pricing", pricing: undefined },
|
||||
{ label: "empty pricing", pricing: {} },
|
||||
{ label: "blank rates", pricing: { prompt: "", completion: "" } },
|
||||
{ label: "whitespace rates", pricing: { prompt: " ", completion: "\t" } },
|
||||
{ label: "explicit zero rates", pricing: { prompt: "0", completion: "0" } },
|
||||
])("OVHcloud serializes zero costs for $label", ({ pricing }) => {
|
||||
const result = buildOvhcloudModel(model(pricing), undefined);
|
||||
const content = formatToml({ id: "example-model", ...result });
|
||||
|
||||
expect(Bun.TOML.parse(content).cost).toEqual({ input: 0, output: 0 });
|
||||
});
|
||||
|
||||
test("OVHcloud converts paid and cache rates to per-million costs", () => {
|
||||
const result = buildOvhcloudModel(model({
|
||||
prompt: "0.00000047",
|
||||
completion: "0.00000319",
|
||||
input_cache_reads: "0.00000009",
|
||||
input_cache_writes: "0.00000012",
|
||||
}), undefined);
|
||||
|
||||
expect(result.cost).toEqual({ input: 0.47, output: 3.19, cache_read: 0.09, cache_write: 0.12 });
|
||||
});
|
||||
|
||||
test.each([
|
||||
{ pricing: { prompt: "0.00000047" }, expected: { input: 0.47, output: 0 } },
|
||||
{ pricing: { completion: "0.00000319" }, expected: { input: 0, output: 3.19 } },
|
||||
])("OVHcloud preserves a supplied rate when the other is missing: %j", ({ pricing, expected }) => {
|
||||
const result = buildOvhcloudModel(model(pricing), undefined);
|
||||
const content = formatToml({ id: "example-model", ...result });
|
||||
|
||||
expect(Bun.TOML.parse(content).cost).toEqual(expected);
|
||||
});
|
||||
|
||||
test("OVHcloud replaces prior costs with zeros when pricing is absent", () => {
|
||||
const result = buildOvhcloudModel(model(), { cost: { input: 0.47, output: 3.19 } });
|
||||
const content = formatToml({ id: "example-model", ...result });
|
||||
|
||||
expect(Bun.TOML.parse(content).cost).toEqual({ input: 0, output: 0 });
|
||||
});
|
||||
@@ -0,0 +1,51 @@
|
||||
import { expect, test } from "bun:test";
|
||||
|
||||
import { buildRequestyModel, RequestyModel, resolveRequestyBaseModel } from "../src/sync/providers/requesty.js";
|
||||
|
||||
test.each([
|
||||
["claude-fable-5.1", "anthropic/claude-fable-5-1"],
|
||||
["claude-fable-5.1@eu", "anthropic/claude-fable-5-1"],
|
||||
["claude-sonnet-4.6", "anthropic/claude-sonnet-4-6"],
|
||||
["claude-sonnet-4", "anthropic/claude-sonnet-4-0"],
|
||||
["claude-opus-4-7", "anthropic/claude-opus-4-7"],
|
||||
["gemini-3.8-flash@eu", "google/gemini-3.8-flash"],
|
||||
["qwen3.8-2.4T-A95B@eu", "alibaba/qwen3.8-2.4t-a95b"],
|
||||
])("resolves Requesty %s to %s", (id, expected) => {
|
||||
expect(resolveRequestyBaseModel(id)).toBe(expected);
|
||||
});
|
||||
|
||||
test("does not invent a base model for unknown Claude releases", () => {
|
||||
expect(resolveRequestyBaseModel("claude-fable-999.1@eu")).toBeUndefined();
|
||||
});
|
||||
|
||||
test.each(["claude-fable-5.1", "claude-fable-5.1@eu"])(
|
||||
"keeps %s override-only",
|
||||
(id) => {
|
||||
const model = buildRequestyModel(RequestyModel.parse({
|
||||
id,
|
||||
created: Date.parse("2026-09-01") / 1_000,
|
||||
description: "Requesty description",
|
||||
context_window: 1_000_000,
|
||||
max_output_tokens: 128_000,
|
||||
supports_vision: true,
|
||||
supports_reasoning: true,
|
||||
supports_tool_calling: true,
|
||||
supports_output_json_schema: true,
|
||||
input_price: 0.00001,
|
||||
output_price: 0.00005,
|
||||
cached_price: 0.00000025,
|
||||
caching_price: 0.0000125,
|
||||
}));
|
||||
|
||||
expect(JSON.parse(JSON.stringify(model))).toEqual({
|
||||
base_model: "anthropic/claude-fable-5-1",
|
||||
...(id.endsWith("@eu") ? { name: "Claude Fable 5.1 (EU)" } : {}),
|
||||
structured_output: true,
|
||||
reasoning_options: [
|
||||
{ type: "effort", values: ["none", "low", "medium", "high", "max"] },
|
||||
{ type: "budget_tokens" },
|
||||
],
|
||||
cost: { input: 10, output: 50, cache_read: 0.25, cache_write: 12.5 },
|
||||
});
|
||||
},
|
||||
);
|
||||
@@ -1,11 +1,14 @@
|
||||
# Pricing: https://developers.openai.com/api/docs/pricing
|
||||
# Pricing: https://azure.microsoft.com/en-us/blog/gpt-5-6-now-available-in-microsoft-foundry/
|
||||
# Rates: https://azure.microsoft.com/en-us/pricing/details/cognitive-services/openai-service/
|
||||
# $4 input / $20 output promotion: 2026-09-01 through at least 2026-11-30.
|
||||
# Keep published cache and long-context rates; the announcement does not specify discounts for them.
|
||||
base_model = "openai/gpt-5.6-sol"
|
||||
status = "beta"
|
||||
reasoning_options = [{ type = "effort", values = ["none", "low", "medium", "high", "xhigh", "max"] }]
|
||||
|
||||
[cost]
|
||||
input = 5.00
|
||||
output = 30.00
|
||||
input = 4.00
|
||||
output = 20.00
|
||||
cache_read = 0.50
|
||||
cache_write = 6.25
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
# Source: https://learn.microsoft.com/en-us/azure/foundry/foundry-models/how-to/use-foundry-models-grok
|
||||
# Pricing: https://azure.microsoft.com/en-us/pricing/details/ai-foundry-models/grok/
|
||||
# Azure's public pricing page does not list Grok 4.6 rates as of 2026-09-02.
|
||||
# Omit cost rather than assume xAI's token/cache rates or >200k context tier.
|
||||
base_model = "xai/grok-4.6"
|
||||
status = "beta"
|
||||
|
||||
[[reasoning_options]]
|
||||
type = "effort"
|
||||
values = ["low", "medium", "high", "xhigh"]
|
||||
|
||||
[limit]
|
||||
context = 200_000
|
||||
output = 128_000
|
||||
@@ -0,0 +1,28 @@
|
||||
# Qwen3.8 27B FP8 served on Berget AI's Swedish infrastructure.
|
||||
# Multimodal (text + image), reasoning on by default with effort levels
|
||||
# none|low|medium|xhigh (matched against the live API 2026-09-01).
|
||||
# https://api.berget.ai/openapi.json
|
||||
#
|
||||
# Berget bills in EUR: 0.4 EUR/M input, 3 EUR/M output.
|
||||
# Converted to USD at 1.1596 (ECB rate, 2026-08-31):
|
||||
# 0.4 EUR/M -> 0.46 USD/M input
|
||||
# 3 EUR/M -> 3.48 USD/M output
|
||||
base_model = "alibaba/qwen3.8-27b"
|
||||
last_updated = "2026-09-01"
|
||||
|
||||
[[reasoning_options]]
|
||||
type = "effort"
|
||||
values = ["none", "low", "medium", "xhigh"]
|
||||
|
||||
[interleaved]
|
||||
field = "reasoning_content"
|
||||
|
||||
[cost]
|
||||
input = 0.46
|
||||
output = 3.48
|
||||
|
||||
[limit]
|
||||
output = 65_536
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image"]
|
||||
@@ -1,27 +0,0 @@
|
||||
name = "Llama 3.3 70B Instruct"
|
||||
description = "Open Llama instruction model for multilingual chat, reasoning, and coding"
|
||||
family = "llama"
|
||||
release_date = "2025-04-27"
|
||||
last_updated = "2025-04-27"
|
||||
attachment = false
|
||||
reasoning = true
|
||||
# Berget documents no meaningful toggle, effort subset, or budget for this model.
|
||||
# https://api.berget.ai/openapi.json
|
||||
reasoning_options = []
|
||||
temperature = true
|
||||
knowledge = "2023-12"
|
||||
tool_call = true
|
||||
structured_output = true
|
||||
open_weights = true
|
||||
|
||||
[cost]
|
||||
input = 0.99
|
||||
output = 0.99
|
||||
|
||||
[limit]
|
||||
context = 128_000
|
||||
output = 8_192
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
output = ["text"]
|
||||
@@ -1,28 +0,0 @@
|
||||
name = "Mistral Medium 3.5 128B"
|
||||
description = "Mistral model for multilingual chat, reasoning, and tool-assisted workflows"
|
||||
family = "mistral-medium"
|
||||
release_date = "2026-04-29"
|
||||
last_updated = "2026-04-29"
|
||||
attachment = true
|
||||
reasoning = true
|
||||
# Berget's schema accepts none/low/medium/high, but documents no Mistral-specific
|
||||
# mapping; schema acceptance alone does not establish meaningful support.
|
||||
# https://api.berget.ai/openapi.json
|
||||
reasoning_options = [{ type = "effort", values = ["none", "high"] }]
|
||||
temperature = true
|
||||
knowledge = "2026-04"
|
||||
tool_call = true
|
||||
structured_output = true
|
||||
open_weights = true
|
||||
|
||||
[cost]
|
||||
input = 1.65
|
||||
output = 5.5
|
||||
|
||||
[limit]
|
||||
context = 262_144
|
||||
output = 131_072
|
||||
|
||||
[modalities]
|
||||
input = ["image", "text"]
|
||||
output = ["text"]
|
||||
@@ -1,15 +0,0 @@
|
||||
base_model = "moonshotai/kimi-k2.6"
|
||||
# Kimi K2.6 can disable reasoning with reasoning_effort="none" or
|
||||
# thinking.type="disabled"; enabled/adaptive are also schema-accepted.
|
||||
# https://api.berget.ai/openapi.json
|
||||
reasoning_options = [{ type = "toggle" }]
|
||||
release_date = "2026-05-07"
|
||||
last_updated = "2026-05-07"
|
||||
|
||||
[interleaved]
|
||||
field = "reasoning_content"
|
||||
|
||||
[cost]
|
||||
input = 0.83
|
||||
output = 3.85
|
||||
cache_read = 0.16
|
||||
@@ -1,15 +0,0 @@
|
||||
base_model = "openai/gpt-oss-120b"
|
||||
name = "GPT-OSS-120B"
|
||||
knowledge = "2025-08"
|
||||
# The request schema accepts reasoning_effort low/medium/high, but publishes no
|
||||
# GPT OSS-specific behavioral mapping or reasoning-token budget.
|
||||
# https://api.berget.ai/openapi.json
|
||||
reasoning_options = [{ type = "effort", values = ["low", "medium", "high"] }]
|
||||
|
||||
[cost]
|
||||
input = 0.22
|
||||
output = 0.83
|
||||
|
||||
[limit]
|
||||
context = 128_000
|
||||
output = 8_192
|
||||
@@ -1,27 +0,0 @@
|
||||
name = "GLM 4.7"
|
||||
description = "Flagship GLM model for hybrid reasoning, coding, and agentic engineering"
|
||||
family = "glm"
|
||||
release_date = "2026-01-19"
|
||||
last_updated = "2026-01-19"
|
||||
attachment = false
|
||||
reasoning = true
|
||||
# Berget documents no meaningful toggle, effort subset, or budget for this model.
|
||||
# https://api.berget.ai/openapi.json
|
||||
reasoning_options = []
|
||||
temperature = true
|
||||
knowledge = "2025-12"
|
||||
tool_call = true
|
||||
structured_output = true
|
||||
open_weights = true
|
||||
|
||||
[cost]
|
||||
input = 0.77
|
||||
output = 2.75
|
||||
|
||||
[limit]
|
||||
context = 128_000
|
||||
output = 8_192
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
output = ["text"]
|
||||
@@ -1,6 +1,6 @@
|
||||
# GLM-5.3-Flash served on Berget AI's Swedish infrastructure (NVIDIA B300,
|
||||
# SGLang TP4). Multimodal (text + image), reasoning on by default with effort
|
||||
# levels low/high/max. Needle-validated to 327K context.
|
||||
# levels low/high/max. Needle-validated to 512K context.
|
||||
# https://api.berget.ai/openapi.json
|
||||
#
|
||||
# Berget bills in EUR: 0.25 EUR/M input, 0.5 EUR/M output.
|
||||
@@ -8,7 +8,7 @@
|
||||
# 0.25 EUR/M -> 0.29 USD/M input
|
||||
# 0.5 EUR/M -> 0.58 USD/M output
|
||||
base_model = "zhipuai/glm-5.3-flash"
|
||||
last_updated = "2026-08-29"
|
||||
last_updated = "2026-09-01"
|
||||
|
||||
[[reasoning_options]]
|
||||
type = "effort"
|
||||
@@ -22,7 +22,7 @@ input = 0.29
|
||||
output = 0.58
|
||||
|
||||
[limit]
|
||||
context = 327_680
|
||||
context = 524_288
|
||||
output = 16_384
|
||||
|
||||
# The lab model accepts text/image/video/pdf; the Berget SGLang deployment
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
# GLM-5.3 served on Berget AI's Swedish infrastructure (NVIDIA B300, SGLang
|
||||
# TP4). Reasoning always on, effort levels low/high/max (default max), returned
|
||||
# in message.reasoning_content. Needle-validated to 327K context.
|
||||
# https://api.berget.ai/openapi.json
|
||||
#
|
||||
# Berget bills in EUR: 1.5 EUR/M input, 5.0 EUR/M output.
|
||||
# Converted to USD at 1.1643 (ECB rate, 2026-08-28):
|
||||
# 1.5 EUR/M -> 1.75 USD/M input
|
||||
# 5.0 EUR/M -> 5.82 USD/M output
|
||||
base_model = "zhipuai/glm-5.3"
|
||||
last_updated = "2026-08-29"
|
||||
|
||||
[[reasoning_options]]
|
||||
type = "effort"
|
||||
values = ["low", "high", "max"]
|
||||
|
||||
[interleaved]
|
||||
field = "reasoning_content"
|
||||
|
||||
[cost]
|
||||
input = 1.75
|
||||
output = 5.82
|
||||
|
||||
[limit]
|
||||
context = 327_680
|
||||
output = 32_768
|
||||
@@ -10,4 +10,4 @@ input = 1.393
|
||||
output = 2.228
|
||||
|
||||
[limit]
|
||||
output = 65_536
|
||||
output = 16_384
|
||||
@@ -15,6 +15,3 @@ input = 2.989
|
||||
output = 14.945
|
||||
cache_read = 0.326
|
||||
cache_write = 4.078
|
||||
|
||||
[limit]
|
||||
output = 200_000
|
||||
@@ -17,4 +17,4 @@ cache_read = 0.32
|
||||
cache_write = 3.999
|
||||
|
||||
[limit]
|
||||
output = 1_000_000
|
||||
output = 128_000
|
||||
@@ -15,6 +15,3 @@ input = 0.996
|
||||
output = 4.982
|
||||
cache_read = 0.099
|
||||
cache_write = 1.186
|
||||
|
||||
[limit]
|
||||
output = 200_000
|
||||
@@ -14,6 +14,3 @@ input = 5.5
|
||||
output = 27.498
|
||||
cache_read = 0.55
|
||||
cache_write = 6.874
|
||||
|
||||
[limit]
|
||||
output = 1_000_000
|
||||
@@ -15,6 +15,3 @@ input = 5.313
|
||||
output = 26.568
|
||||
cache_read = 0.531
|
||||
cache_write = 6.645
|
||||
|
||||
[limit]
|
||||
output = 200_000
|
||||
@@ -15,6 +15,3 @@ input = 5.313
|
||||
output = 26.561
|
||||
cache_read = 0.531
|
||||
cache_write = 6.645
|
||||
|
||||
[limit]
|
||||
output = 1_000_000
|
||||
@@ -15,6 +15,3 @@ input = 5.437
|
||||
output = 27.186
|
||||
cache_read = 0.544
|
||||
cache_write = 6.797
|
||||
|
||||
[limit]
|
||||
output = 1_000_000
|
||||
@@ -14,6 +14,3 @@ input = 5.437
|
||||
output = 27.186
|
||||
cache_read = 0.544
|
||||
cache_write = 6.797
|
||||
|
||||
[limit]
|
||||
output = 1_000_000
|
||||
@@ -17,4 +17,4 @@ cache_read = 0.29
|
||||
cache_write = 3.624
|
||||
|
||||
[limit]
|
||||
output = 200_000
|
||||
output = 65_000
|
||||
@@ -14,6 +14,3 @@ input = 2.2
|
||||
output = 11
|
||||
cache_read = 0.219
|
||||
cache_write = 2.749
|
||||
|
||||
[limit]
|
||||
output = 1_000_000
|
||||
@@ -1,5 +1,8 @@
|
||||
base_model = "deepseek/deepseek-v4-pro-0813"
|
||||
reasoning_options = [{ type = "effort", values = ["low", "medium", "high"] }]
|
||||
|
||||
[[reasoning_options]]
|
||||
type = "effort"
|
||||
values = ["low", "medium", "high"]
|
||||
|
||||
[cost]
|
||||
input = 2
|
||||
@@ -8,4 +11,4 @@ cache_read = 0.5
|
||||
|
||||
[limit]
|
||||
context = 1_048_576
|
||||
output = 1_048_576
|
||||
output = 64_000
|
||||
@@ -9,4 +9,4 @@ cache_read = 0.045
|
||||
|
||||
[limit]
|
||||
context = 256_000
|
||||
output = 262_000
|
||||
output = 256_000
|
||||
@@ -8,7 +8,7 @@ cache_read = 0.029
|
||||
cache_write = 0.097
|
||||
|
||||
[limit]
|
||||
output = 1_048_576
|
||||
output = 65_535
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "audio", "pdf"]
|
||||
@@ -8,7 +8,7 @@ cache_read = 0.025
|
||||
cache_write = 0.082
|
||||
|
||||
[limit]
|
||||
output = 1_048_576
|
||||
output = 65_535
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "audio", "pdf"]
|
||||
@@ -10,7 +10,7 @@ output = 2.749
|
||||
cache_read = 0.033
|
||||
|
||||
[limit]
|
||||
output = 1_048_576
|
||||
output = 65_535
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "audio", "pdf"]
|
||||
@@ -1,5 +1,8 @@
|
||||
base_model = "google/gemini-3.5-flash"
|
||||
reasoning_options = [{ type = "effort", values = ["low", "medium", "high"] }]
|
||||
|
||||
[[reasoning_options]]
|
||||
type = "effort"
|
||||
values = ["low", "medium", "high"]
|
||||
|
||||
[cost]
|
||||
input = 1.649
|
||||
@@ -8,7 +11,7 @@ cache_read = 0.165
|
||||
cache_write = 1
|
||||
|
||||
[limit]
|
||||
output = 1_048_576
|
||||
output = 65_535
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "audio"]
|
||||
@@ -1,5 +1,8 @@
|
||||
base_model = "google/gemini-3.6-flash"
|
||||
reasoning_options = [{ type = "effort", values = ["low", "medium", "high"] }]
|
||||
|
||||
[[reasoning_options]]
|
||||
type = "effort"
|
||||
values = ["low", "medium", "high"]
|
||||
|
||||
[cost]
|
||||
input = 0.75
|
||||
@@ -8,7 +11,7 @@ cache_read = 0.075
|
||||
cache_write = 0.038
|
||||
|
||||
[limit]
|
||||
output = 1_048_576
|
||||
output = 65_535
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "audio"]
|
||||
@@ -11,7 +11,7 @@ cache_read = 0.075
|
||||
cache_write = 0.038
|
||||
|
||||
[limit]
|
||||
output = 1_048_576
|
||||
output = 65_535
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "audio", "pdf"]
|
||||
@@ -16,7 +16,7 @@ output = 0.299
|
||||
|
||||
[limit]
|
||||
context = 131_000
|
||||
output = 131_000
|
||||
output = 110_000
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image"]
|
||||
|
||||
@@ -7,4 +7,4 @@ output = 0.557
|
||||
|
||||
[limit]
|
||||
context = 262_000
|
||||
output = 262_000
|
||||
output = 81_920
|
||||
@@ -12,4 +12,4 @@ output = 2.785
|
||||
|
||||
[limit]
|
||||
context = 202_752
|
||||
output = 198_000
|
||||
output = 202_752
|
||||
@@ -14,4 +14,4 @@ cache_read = 0.26
|
||||
|
||||
[limit]
|
||||
context = 1_048_576
|
||||
output = 1_048_576
|
||||
output = 1_000_000
|
||||
@@ -17,7 +17,7 @@ cache_read = 0.05
|
||||
|
||||
[limit]
|
||||
context = 1_048_576
|
||||
output = 64_000
|
||||
output = 1_048_576
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image"]
|
||||
@@ -3,12 +3,15 @@
|
||||
# https://docs.z.ai/guides/llm/glm-5.3
|
||||
# https://docs.cortecs.ai/examples/reasoning
|
||||
base_model = "zhipuai/glm-5.3"
|
||||
reasoning_options = [{ type = "effort", values = ["low", "high", "max"] }]
|
||||
|
||||
[[reasoning_options]]
|
||||
type = "effort"
|
||||
values = ["low", "high", "max"]
|
||||
|
||||
[cost]
|
||||
input = 1.75
|
||||
output = 4.499
|
||||
cache_read = 0.438
|
||||
input = 1.4
|
||||
output = 4.399
|
||||
cache_read = 0.26
|
||||
|
||||
[limit]
|
||||
context = 1_048_576
|
||||
|
||||
@@ -5,6 +5,3 @@ structured_output = false
|
||||
input = 0.434
|
||||
output = 1.704
|
||||
cache_read = 0.134
|
||||
|
||||
[limit]
|
||||
output = 1_047_576
|
||||
@@ -6,8 +6,5 @@ input = 0.111
|
||||
output = 0.434
|
||||
cache_read = 0.056
|
||||
|
||||
[limit]
|
||||
output = 1_047_576
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "pdf"]
|
||||
@@ -6,6 +6,3 @@ structured_output = false
|
||||
input = 2.192
|
||||
output = 8.769
|
||||
cache_read = 0.546
|
||||
|
||||
[limit]
|
||||
output = 1_047_576
|
||||
@@ -7,4 +7,4 @@ output = 0.638
|
||||
cache_read = 0.081
|
||||
|
||||
[limit]
|
||||
output = 128_000
|
||||
output = 16_000
|
||||
@@ -7,4 +7,4 @@ output = 10.635
|
||||
cache_read = 1.33
|
||||
|
||||
[limit]
|
||||
output = 128_000
|
||||
output = 16_000
|
||||
@@ -9,6 +9,3 @@ values = ["low", "medium", "high"]
|
||||
input = 0.279
|
||||
output = 2.192
|
||||
cache_read = 0.056
|
||||
|
||||
[limit]
|
||||
output = 400_000
|
||||
@@ -9,6 +9,3 @@ values = ["low", "medium", "high"]
|
||||
input = 0.06
|
||||
output = 0.439
|
||||
cache_read = 0.019
|
||||
|
||||
[limit]
|
||||
output = 400_000
|
||||
@@ -10,8 +10,5 @@ input = 1.375
|
||||
output = 10.96
|
||||
cache_read = 0.156
|
||||
|
||||
[limit]
|
||||
output = 400_000
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "pdf"]
|
||||
@@ -9,6 +9,3 @@ values = ["low", "medium", "high"]
|
||||
input = 2.898
|
||||
output = 15.453
|
||||
cache_read = 0.242
|
||||
|
||||
[limit]
|
||||
output = 1_050_000
|
||||
@@ -9,6 +9,3 @@ input = 0.219
|
||||
output = 1.32
|
||||
cache_read = 0.022
|
||||
cache_write = 0.275
|
||||
|
||||
[limit]
|
||||
output = 1_050_000
|
||||
@@ -9,6 +9,3 @@ input = 5.5
|
||||
output = 32.998
|
||||
cache_read = 0.55
|
||||
cache_write = 6.879
|
||||
|
||||
[limit]
|
||||
output = 1_050_000
|
||||
@@ -9,6 +9,3 @@ input = 2.2
|
||||
output = 13.199
|
||||
cache_read = 0.219
|
||||
cache_write = 2.749
|
||||
|
||||
[limit]
|
||||
output = 1_050_000
|
||||
@@ -9,6 +9,3 @@ values = ["low", "medium", "high"]
|
||||
input = 1.375
|
||||
output = 10.96
|
||||
cache_read = 0.156
|
||||
|
||||
[limit]
|
||||
output = 400_000
|
||||
@@ -12,4 +12,4 @@ cache_read = 0.01
|
||||
|
||||
[limit]
|
||||
context = 131_000
|
||||
output = 128_000
|
||||
output = 131_000
|
||||
@@ -13,8 +13,5 @@ input = 0.495
|
||||
output = 2.768
|
||||
cache_read = 0.124
|
||||
|
||||
[limit]
|
||||
output = 256_000
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image"]
|
||||
@@ -12,8 +12,5 @@ input = 0.773
|
||||
output = 3.38
|
||||
cache_read = 0.193
|
||||
|
||||
[limit]
|
||||
output = 256_000
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "pdf"]
|
||||
@@ -1,8 +1,8 @@
|
||||
# Cortecs lists EUR 2.693 input and EUR 13.464 output per million tokens.
|
||||
# Converted at 1 EUR = 1.114 USD and rounded to the provider's displayed USD rates.
|
||||
# https://api.cortecs.ai/v1/models (accessed 2026-07-29)
|
||||
base_model = "moonshotai/kimi-k3"
|
||||
reasoning_options = []
|
||||
|
||||
[[reasoning_options]]
|
||||
type = "effort"
|
||||
values = ["low", "high", "max"]
|
||||
|
||||
[interleaved]
|
||||
field = "reasoning_content"
|
||||
|
||||
@@ -13,4 +13,4 @@ cache_read = 0.075
|
||||
|
||||
[limit]
|
||||
context = 196_000
|
||||
output = 196_608
|
||||
output = 196_000
|
||||
@@ -9,4 +9,4 @@ output = 2.674
|
||||
|
||||
[limit]
|
||||
context = 196_608
|
||||
output = 196_072
|
||||
output = 196_608
|
||||
@@ -12,4 +12,4 @@ output = 1.405
|
||||
|
||||
[limit]
|
||||
context = 400_000
|
||||
output = 400_000
|
||||
output = 196_000
|
||||
@@ -15,7 +15,7 @@ output = 0.219
|
||||
|
||||
[limit]
|
||||
context = 32_000
|
||||
output = 32_000
|
||||
output = 8_192
|
||||
|
||||
[modalities]
|
||||
input = ["text", "pdf"]
|
||||
|
||||
@@ -16,7 +16,7 @@ output = 12.952
|
||||
|
||||
[limit]
|
||||
context = 32_000
|
||||
output = 32_000
|
||||
output = 8_192
|
||||
|
||||
[modalities]
|
||||
input = ["text", "pdf"]
|
||||
|
||||
@@ -16,7 +16,7 @@ cache_read = 0.014
|
||||
|
||||
[limit]
|
||||
context = 128_000
|
||||
output = 131_072
|
||||
output = 128_000
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
|
||||
@@ -9,4 +9,3 @@ cache_read = 0.014
|
||||
|
||||
[limit]
|
||||
context = 262_144
|
||||
output = 262_144
|
||||
@@ -17,7 +17,7 @@ output = 0.758
|
||||
|
||||
[limit]
|
||||
context = 32_000
|
||||
output = 32_000
|
||||
output = 4_096
|
||||
|
||||
[modalities]
|
||||
input = ["text", "pdf"]
|
||||
|
||||
@@ -16,7 +16,7 @@ output = 3.144
|
||||
|
||||
[limit]
|
||||
context = 1_000_000
|
||||
output = 1_000_000
|
||||
output = 65_535
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "pdf"]
|
||||
|
||||
@@ -16,7 +16,7 @@ output = 0.275
|
||||
|
||||
[limit]
|
||||
context = 300_000
|
||||
output = 300_000
|
||||
output = 10_000
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "pdf"]
|
||||
|
||||
@@ -16,7 +16,7 @@ output = 0.159
|
||||
|
||||
[limit]
|
||||
context = 128_000
|
||||
output = 128_000
|
||||
output = 10_000
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image"]
|
||||
|
||||
@@ -18,7 +18,7 @@ output = 3.671
|
||||
|
||||
[limit]
|
||||
context = 300_000
|
||||
output = 5_000
|
||||
output = 10_000
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "pdf"]
|
||||
|
||||
@@ -16,7 +16,7 @@ output = 0.237
|
||||
|
||||
[limit]
|
||||
context = 300_000
|
||||
output = 300_000
|
||||
output = 65_536
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
|
||||
@@ -16,7 +16,7 @@ output = 0.223
|
||||
|
||||
[limit]
|
||||
context = 128_000
|
||||
output = 128_000
|
||||
output = 4_096
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image"]
|
||||
|
||||
@@ -9,4 +9,4 @@ cache_read = 0.018
|
||||
|
||||
[limit]
|
||||
context = 262_000
|
||||
output = 131_000
|
||||
output = 262_000
|
||||
@@ -7,4 +7,4 @@ output = 0.245
|
||||
cache_read = 0.014
|
||||
|
||||
[limit]
|
||||
output = 262_000
|
||||
output = 262_144
|
||||
@@ -9,7 +9,7 @@ output = 4.01
|
||||
|
||||
[limit]
|
||||
context = 262_000
|
||||
output = 250_000
|
||||
output = 262_000
|
||||
|
||||
[modalities]
|
||||
input = ["text"]
|
||||
@@ -7,7 +7,7 @@ output = 0.557
|
||||
|
||||
[limit]
|
||||
context = 262_000
|
||||
output = 262_000
|
||||
output = 32_768
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image"]
|
||||
@@ -0,0 +1,14 @@
|
||||
base_model = "anthropic/claude-fable-5-1"
|
||||
|
||||
[[reasoning_options]]
|
||||
type = "effort"
|
||||
values = ["low", "medium", "high", "xhigh", "max"]
|
||||
|
||||
[cost]
|
||||
input = 10
|
||||
output = 50
|
||||
cache_read = 0.25
|
||||
cache_write = 12.5
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image"]
|
||||
@@ -0,0 +1,12 @@
|
||||
base_model = "anthropic/claude-fable-5-1"
|
||||
structured_output = true
|
||||
|
||||
[[reasoning_options]]
|
||||
type = "effort"
|
||||
values = ["low", "medium", "high", "xhigh", "max"]
|
||||
|
||||
[cost]
|
||||
input = 10
|
||||
output = 50
|
||||
cache_read = 0.25
|
||||
cache_write = 12.5
|
||||
@@ -1,4 +1,4 @@
|
||||
base_model = "anthropic/claude-fable-5"
|
||||
base_model = "anthropic/claude-fable-5-1"
|
||||
structured_output = true
|
||||
|
||||
[[reasoning_options]]
|
||||
@@ -8,5 +8,5 @@ values = ["low", "medium", "high", "xhigh", "max"]
|
||||
[cost]
|
||||
input = 10
|
||||
output = 50
|
||||
cache_read = 1
|
||||
cache_read = 0.25
|
||||
cache_write = 12.5
|
||||
@@ -0,0 +1,12 @@
|
||||
base_model = "deepseek/deepseek-v4-flash-0731"
|
||||
structured_output = false
|
||||
|
||||
[[reasoning_options]]
|
||||
type = "effort"
|
||||
values = ["none", "low", "high", "max"]
|
||||
|
||||
[cost]
|
||||
input = 0.14
|
||||
output = 0.28
|
||||
cache_read = 0.028
|
||||
cache_write = 0.14
|
||||
@@ -0,0 +1,12 @@
|
||||
base_model = "deepseek/deepseek-v4-pro-0813"
|
||||
structured_output = false
|
||||
|
||||
[[reasoning_options]]
|
||||
type = "effort"
|
||||
values = ["none", "low", "high", "max"]
|
||||
|
||||
[cost]
|
||||
input = 1.31999
|
||||
output = 3.95997
|
||||
cache_read = 0.13202
|
||||
cache_write = 1.31999
|
||||
@@ -8,5 +8,5 @@ values = ["low", "medium", "high"]
|
||||
[cost]
|
||||
input = 0.15001
|
||||
output = 0.59997
|
||||
cache_read = 0.15001
|
||||
cache_read = 0.015001
|
||||
cache_write = 0.15001
|
||||
@@ -9,5 +9,5 @@ values = ["low", "medium", "high"]
|
||||
[cost]
|
||||
input = 0.15001
|
||||
output = 0.59997
|
||||
cache_read = 0.15001
|
||||
cache_read = 0.015001
|
||||
cache_write = 0.15001
|
||||
@@ -8,5 +8,5 @@ values = ["low", "medium", "high"]
|
||||
[cost]
|
||||
input = 0.07
|
||||
output = 0.30002
|
||||
cache_read = 0.07
|
||||
cache_read = 0.007
|
||||
cache_write = 0.07
|
||||
@@ -9,5 +9,5 @@ values = ["low", "medium", "high"]
|
||||
[cost]
|
||||
input = 0.07
|
||||
output = 0.30002
|
||||
cache_read = 0.07
|
||||
cache_read = 0.007
|
||||
cache_write = 0.07
|
||||
@@ -1,4 +1,5 @@
|
||||
base_model = "tencent/hy3"
|
||||
base_model_omit = ["limit.input"]
|
||||
structured_output = true
|
||||
|
||||
[[reasoning_options]]
|
||||
|
||||
@@ -4,5 +4,5 @@ tool_call = false
|
||||
structured_output = false
|
||||
|
||||
[cost]
|
||||
input = 0.75335
|
||||
output = 0.75335
|
||||
input = 0.75257
|
||||
output = 0.75257
|
||||
@@ -7,5 +7,5 @@ type = "effort"
|
||||
values = ["low", "medium", "high"]
|
||||
|
||||
[cost]
|
||||
input = 0.17385
|
||||
output = 0.75335
|
||||
input = 0.17367
|
||||
output = 0.75257
|
||||
@@ -6,8 +6,8 @@ type = "effort"
|
||||
values = ["none", "low", "high", "max"]
|
||||
|
||||
[cost]
|
||||
input = 0.4636
|
||||
output = 0.9272
|
||||
input = 0.46312
|
||||
output = 0.92624
|
||||
|
||||
[limit]
|
||||
context = 256_000
|
||||
@@ -6,8 +6,8 @@ type = "effort"
|
||||
values = ["low", "medium", "high"]
|
||||
|
||||
[cost]
|
||||
input = 0.17385
|
||||
output = 0.6954
|
||||
input = 0.17367
|
||||
output = 0.69468
|
||||
|
||||
[limit]
|
||||
context = 128_000
|
||||
@@ -3,5 +3,5 @@ attachment = false
|
||||
structured_output = false
|
||||
|
||||
[cost]
|
||||
input = 1.0431
|
||||
output = 1.0431
|
||||
input = 1.04202
|
||||
output = 1.04202
|
||||
@@ -0,0 +1,20 @@
|
||||
base_model = "alibaba/qwen3.8-max"
|
||||
name = "Qwen3.8 Max 0902"
|
||||
structured_output = true
|
||||
|
||||
[[reasoning_options]]
|
||||
type = "effort"
|
||||
values = ["none", "low", "medium", "high", "max"]
|
||||
|
||||
[[reasoning_options]]
|
||||
type = "budget_tokens"
|
||||
min = 1
|
||||
max = 262_144
|
||||
|
||||
[cost]
|
||||
input = 2
|
||||
output = 6
|
||||
cache_read = 2
|
||||
|
||||
[modalities]
|
||||
input = ["text", "image", "video"]
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
# Toggle: thinking.type = enabled|disabled (reasoning_effort = none|false also disables)
|
||||
# Effort: reasoning_effort = low|high|max (same surface as deepseek-v4-flash-0731 on Fireworks)
|
||||
# Pricing/model: https://fireworks.ai/models/deepseek-ai/deepseek-v4-flash-vision-exp (accessed 2026-09-02)
|
||||
# Peer: providers/fireworks-ai/models/accounts/fireworks/models/deepseek-v4-flash-0731.toml
|
||||
base_model = "deepseek/deepseek-v4-flash-vision-exp"
|
||||
|
||||
[[reasoning_options]]
|
||||
type = "toggle"
|
||||
|
||||
[[reasoning_options]]
|
||||
type = "effort"
|
||||
values = ["low", "high", "max"]
|
||||
|
||||
[interleaved]
|
||||
field = "reasoning_content"
|
||||
|
||||
[cost]
|
||||
input = 0.22
|
||||
output = 0.66
|
||||
cache_read = 0.007
|
||||
@@ -1,4 +1,4 @@
|
||||
# Pricing: https://fireworks.ai/models/fireworks/glm-5p3-flash (accessed 2026-08-29)
|
||||
# Pricing: https://fireworks.ai/models/fireworks/glm-5p3-flash (accessed 2026-09-02)
|
||||
# Released on Fireworks Serverless API 2026-08-26.
|
||||
# Thinking-only model: reasoning cannot be disabled. Use the same two effective
|
||||
# tiers as Fireworks GLM 5.3: low/medium collapse to high; max/xhigh select max.
|
||||
@@ -16,4 +16,4 @@ field = "reasoning_content"
|
||||
[cost]
|
||||
input = 0.15
|
||||
output = 0.50
|
||||
cache_read = 0.029
|
||||
cache_read = 0.03
|
||||
@@ -0,0 +1,9 @@
|
||||
base_model = "anthropic/claude-fable-5-1"
|
||||
name = "Agentic Chat (Claude Fable 5.1)"
|
||||
reasoning_options = [{ type = "effort", values = ["low", "medium", "high", "xhigh", "max"] }]
|
||||
|
||||
[cost]
|
||||
input = 0
|
||||
output = 0
|
||||
cache_read = 0
|
||||
cache_write = 0
|
||||
@@ -0,0 +1,11 @@
|
||||
# Sources:
|
||||
# - https://cloud.google.com/gemini-enterprise-agent-platform/generative-ai/pricing
|
||||
# - https://ai.google.dev/gemini-api/docs/models/gemini-3.8-flash
|
||||
base_model = "google/gemini-3.8-flash"
|
||||
reasoning_options = [{ type = "effort", values = ["low", "medium", "high"] }]
|
||||
|
||||
[cost]
|
||||
input = 0.75
|
||||
output = 3.75
|
||||
cache_read = 0.075
|
||||
input_audio = 0.75
|
||||
Loaded 100 of 265 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user