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
9 changes: 9 additions & 0 deletions tools/cost_calculator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,15 @@ The GPT Live meter is hourly and is divided by 60 for USD-per-minute pricing.
GPT Realtime 2.1 mini, GPT OSS 120B, and GPT-6 Sol are prefilled from the
published South India meters. Global describes processing scope, not a
promise of India-only inference.
- **GPT-5.6 Luna BYOM** uses South India Global short-context Standard
inference prices: **$0.20 input / $0.02 cached input / $1.20 output per
1M tokens**, verified on 2026-10-26. These three meters record their own
retrieval date; the remaining snapshot retains its original date.
Luna is available for the text-LLM cascade and GPT Live backend scenarios,
with Central India BYO speech rates for the cascade. Managed-mode rows
use the existing explicitly labeled Global-model/BYO-speech reference,
not a verified managed Luna tariff. Long-context, Flex, Priority, and
cache-write rates are not substituted.
- **GPT-6 reasoning is explicitly GPT-6 Sol**, using South India Global
short-context Standard prices: **$2 input / $0.20 cached input / $10 output
per 1M tokens**. The generic, unspecified GPT-6 placeholder is replaced
Expand Down
10 changes: 6 additions & 4 deletions tools/cost_calculator/calculator.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export const MODELS = [
{ id: "gpt-4.1", name: "GPT-4.1", tier: "Pro" },
{ id: "gpt-4.1-mini", name: "GPT-4.1 mini", tier: "Std" },
{ id: "gpt-4.1-nano", name: "GPT-4.1 nano", tier: "Lite" },
{ id: "gpt-5.6-luna", name: "GPT-5.6 Luna" },
{ id: "gpt-5.4", name: "GPT-5.4", tier: "Pro", byomPrefix: "5.4" },
{ id: "gpt-5.4-mini", name: "GPT-5.4 mini", byomPrefix: "5.4 mini" },
{ id: "gpt-5.4-nano", name: "GPT-5.4 nano", byomPrefix: "5.4 nano" },
Expand Down Expand Up @@ -113,10 +114,11 @@ export function getRates(snapshot, model, hosting, pipeline = "cascade") {
// pricing for reused tokens rather than inventing a cache discount.
rates.textCached = rates.textInput;
sources.textCached = sources.textInput;
} else if (model.id === "gpt-6-sol") {
read("textInput", "6-sol ShortCo Inp Std Gl 1M Tokens");
read("textCached", "6-sol ShortCo Cd Inp Std Gl 1M Tokens");
read("textOutput", "6-sol ShortCo Opt Std Gl 1M Tokens");
} else if (model.id === "gpt-6-sol" || model.id === "gpt-5.6-luna") {
const p = model.id === "gpt-6-sol" ? "6-sol" : "5.6 luna";
read("textInput", `${p} ShortCo Inp Std Gl 1M Tokens`);
read("textCached", `${p} ShortCo Cd Inp Std Gl 1M Tokens`);
read("textOutput", `${p} ShortCo Opt Std Gl 1M Tokens`);
} else if (model.byomPrefix) {
const p = model.byomPrefix;
read("textInput", `${p} ${p.startsWith("5.4 ") ? "Inp" : "inp"} Gl 1M Tokens`);
Expand Down
23 changes: 22 additions & 1 deletion tools/cost_calculator/calculator.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ test("South India GPT-4.1 and realtime prices do not reuse managed tier rates",
});

test("unverified managed tiers use explicit Global model references, not invented tier rates", () => {
for (const id of ["gpt-5.4-mini", "gpt-5.4-nano", "gpt-oss-120b", "gpt-6-sol"]) {
for (const id of ["gpt-5.6-luna", "gpt-5.4-mini", "gpt-5.4-nano", "gpt-oss-120b", "gpt-6-sol"]) {
const reference = getRates(snapshot, model(id), "managed");
assert.equal(reference.usesGlobalReference, true);
assert.deepEqual(reference.rates, book(id, "byom"));
Expand All @@ -68,6 +68,27 @@ test("unverified managed tiers use explicit Global model references, not invente
close(tier.rates.textInput, 4);
});

test("GPT-5.6 Luna BYOM uses exact Standard Global inference meters and BYO speech", () => {
const { rates, sources } = getRates(snapshot, model("gpt-5.6-luna"), "byom");
close(rates.textInput, 0.2);
close(rates.textCached, 0.02);
close(rates.textOutput, 1.2);
close(rates.speechInput, 12.5);
close(rates.speechOutput, 23);
for (const key of ["textInput", "textCached", "textOutput"]) {
assert.match(sources[key].meterName, /^5\.6 luna ShortCo .* Std Gl 1M Tokens$/);
assert.equal(sources[key].retrievedAt, "2026-10-26");
assert.equal(sources[key].armRegionName, "southindia");
assert.equal(sources[key].processingScope, "Global");
}
const textCost = (5000 * 0.2 + 15000 * 0.02 + 150 * 0.2 + 450 * 0.02 + 150 * 1.2) / 1e6;
const cascade = calculate(DEFAULTS, "cascade", rates);
close(cascade.list, textCost + (360 * 12.5 + 720 * 23) / 1e6);
close(cascade.listPerMinute, cascade.list / 1.5);
const live = calculate(DEFAULTS, "live", book("gpt-5.6-luna", "byom", "live"));
close(live.list, textCost + 1.5 * 0.05);
});

test("all selectable models have priced scenarios across both hosting modes", () => {
for (const hosting of ["managed", "byom"]) for (const m of MODELS) {
const pipeline = m.realtime ? "native" : "cascade";
Expand Down
36 changes: 36 additions & 0 deletions tools/cost_calculator/prices.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,42 @@
"armRegionName eq 'southindia' and serviceName eq 'Foundry Models' and priceType eq 'Consumption'"
],
"meters": [
{
"productName": "Azure OpenAI GPT5",
"skuName": "5.6 luna ShortCo Inp Std Gl",
"meterName": "5.6 luna ShortCo Inp Std Gl 1M Tokens",
"armRegionName": "southindia",
"processingScope": "Global",
"retailPrice": 0.2,
"unitOfMeasure": "1M",
"meterId": "a05ffb45-17d1-5a56-a43e-f8af27b7e7e5",
"effectiveStartDate": "2026-08-01T00:00:00Z",
"retrievedAt": "2026-10-26"
},
{
"productName": "Azure OpenAI GPT5",
"skuName": "5.6 luna ShortCo Cd Inp Std Gl",
"meterName": "5.6 luna ShortCo Cd Inp Std Gl 1M Tokens",
"armRegionName": "southindia",
"processingScope": "Global",
"retailPrice": 0.02,
"unitOfMeasure": "1M",
"meterId": "5489ae4f-17c9-5271-931c-da4e2289dffc",
"effectiveStartDate": "2026-08-01T00:00:00Z",
"retrievedAt": "2026-10-26"
},
{
"productName": "Azure OpenAI GPT5",
"skuName": "5.6 luna ShortCo Opt Std Gl",
"meterName": "5.6 luna ShortCo Opt Std Gl 1M Tokens",
"armRegionName": "southindia",
"processingScope": "Global",
"retailPrice": 1.2,
"unitOfMeasure": "1M",
"meterId": "d01c83fd-4a6c-5c28-b962-9e3de99eb4cd",
"effectiveStartDate": "2026-08-01T00:00:00Z",
"retrievedAt": "2026-10-26"
},
{
"productName": "Azure Speech",
"skuName": null,
Expand Down
Loading