ai_api / src /shared /constants /pricing /oauth-subscriptions.ts
Yogesh
initial deploy
cd8bd0a
Raw
History Blame Contribute Delete
14.3 kB
/**
* Pricing data — oauth-subscriptions family (OAuth / IDE subscription aliases (cc, codex, gemini-cli, antigravity, copilot, kiro…)).
* Pure data; merged by default-pricing.ts via spread (god-file decomposition; semantic split).
*/
import {
GPT_5_3_CODEX_PRICING,
GPT_5_5_PRICING,
} from "./shared-tiers";
export const DEFAULT_PRICING_OAUTH = {
cc: {
"claude-fable-5": {
input: 10.0,
output: 50.0,
cached: 1.0,
reasoning: 50.0,
cache_creation: 12.5,
},
"claude-opus-4-8": {
input: 5.0,
output: 25.0,
cached: 0.5,
reasoning: 25.0,
cache_creation: 6.25,
},
"claude-opus-4-7": {
input: 5.0,
output: 25.0,
cached: 0.5,
reasoning: 25.0,
cache_creation: 6.25,
},
"claude-opus-4-6": {
input: 5.0,
output: 25.0,
cached: 0.5,
reasoning: 25.0,
cache_creation: 6.25,
},
"claude-sonnet-4-6": {
input: 3.0,
output: 15.0,
cached: 0.3,
reasoning: 15.0,
cache_creation: 3.75,
},
"claude-opus-4-5-20251101": {
input: 5.0,
output: 25.0,
cached: 0.5,
reasoning: 25.0,
cache_creation: 6.25,
},
"claude-sonnet-4-5-20250929": {
input: 3.0,
output: 15.0,
cached: 0.3,
reasoning: 15.0,
cache_creation: 3.75,
},
"claude-haiku-4-5-20251001": {
input: 1.0,
output: 5.0,
cached: 0.1,
reasoning: 5.0,
cache_creation: 1.25,
},
},
cx: {
"codex-auto-review": GPT_5_5_PRICING,
// GPT 5.5
"gpt-5.5": GPT_5_5_PRICING,
"gpt5.5": GPT_5_5_PRICING,
"gpt-5.5-xhigh": GPT_5_5_PRICING,
"gpt-5.5-high": GPT_5_5_PRICING,
"gpt-5.5-medium": GPT_5_5_PRICING,
"gpt-5.5-low": GPT_5_5_PRICING,
"gpt-5.5-none": GPT_5_5_PRICING,
// GPT 5.4
"gpt-5.4": {
input: 5.0,
output: 20.0,
cached: 2.5,
reasoning: 30.0,
cache_creation: 5.0,
},
"gpt5.4": {
input: 5.0,
output: 20.0,
cached: 2.5,
reasoning: 30.0,
cache_creation: 5.0,
},
// T12: fallback pricing for gpt-5.4 mini variants
"gpt-5.4-mini": {
input: 1.5,
output: 6.0,
cached: 0.75,
reasoning: 9.0,
cache_creation: 1.5,
},
"gpt5.4-mini": {
input: 1.5,
output: 6.0,
cached: 0.75,
reasoning: 9.0,
cache_creation: 1.5,
},
// gpt-5.4 reasoning-effort variants share the gpt-5.4 tier (registry exposes
// -xhigh/-high/-medium/-low; without these rows they resolved to $0).
"gpt-5.4-xhigh": GPT_5_3_CODEX_PRICING,
"gpt-5.4-high": GPT_5_3_CODEX_PRICING,
"gpt-5.4-medium": GPT_5_3_CODEX_PRICING,
"gpt-5.4-low": GPT_5_3_CODEX_PRICING,
// GPT 5.3 Codex family (all same pricing tier)
"gpt-5.3-codex-spark": GPT_5_3_CODEX_PRICING,
"gpt-5.3-codex": GPT_5_3_CODEX_PRICING,
"gpt-5.3-codex-xhigh": GPT_5_3_CODEX_PRICING,
"gpt-5.3-codex-high": GPT_5_3_CODEX_PRICING,
"gpt-5.3-codex-low": GPT_5_3_CODEX_PRICING,
"gpt-5.3-codex-none": GPT_5_3_CODEX_PRICING,
"gpt-5.1-codex-mini-high": {
input: 1.5,
output: 6.0,
cached: 0.75,
reasoning: 9.0,
cache_creation: 1.5,
},
"gpt-5.2-codex": {
input: 5.0,
output: 20.0,
cached: 2.5,
reasoning: 30.0,
cache_creation: 5.0,
},
"gpt-5.2": {
input: 5.0,
output: 20.0,
cached: 2.5,
reasoning: 30.0,
cache_creation: 5.0,
},
"gpt-5.1-codex-max": {
input: 8.0,
output: 32.0,
cached: 4.0,
reasoning: 48.0,
cache_creation: 8.0,
},
"gpt-5.1-codex": {
input: 4.0,
output: 16.0,
cached: 2.0,
reasoning: 24.0,
cache_creation: 4.0,
},
"gpt-5.1-codex-mini": {
input: 1.5,
output: 6.0,
cached: 0.75,
reasoning: 9.0,
cache_creation: 1.5,
},
"gpt-5.1": {
input: 4.0,
output: 16.0,
cached: 2.0,
reasoning: 24.0,
cache_creation: 4.0,
},
"gpt-5-codex": {
input: 3.0,
output: 12.0,
cached: 1.5,
reasoning: 18.0,
cache_creation: 3.0,
},
"gpt-5-codex-mini": {
input: 1.0,
output: 4.0,
cached: 0.5,
reasoning: 6.0,
cache_creation: 1.0,
},
},
"gemini-cli": {
"gemini-3-flash-preview": {
input: 0.5,
output: 3.0,
cached: 0.03,
reasoning: 4.5,
cache_creation: 0.5,
},
"gemini-3.1-flash-lite-preview": {
input: 0.5,
output: 3.0,
cached: 0.03,
reasoning: 4.5,
cache_creation: 0.5,
},
"gemini-3-pro-preview": {
input: 2.0,
output: 12.0,
cached: 0.25,
reasoning: 18.0,
cache_creation: 2.0,
},
"gemini-3.1-pro-preview": {
input: 2.0,
output: 12.0,
cached: 0.25,
reasoning: 18.0,
cache_creation: 2.0,
},
"gemini-2.5-pro": {
input: 2.0,
output: 12.0,
cached: 0.25,
reasoning: 18.0,
cache_creation: 2.0,
},
"gemini-2.5-flash": {
input: 0.3,
output: 2.5,
cached: 0.03,
reasoning: 3.75,
cache_creation: 0.3,
},
// Gemini 2.5 Flash Lite — preco corrigido via ClawRouter: $0.10/$0.40 (era $0.15/$1.25)
"gemini-2.5-flash-lite": {
input: 0.1,
output: 0.4,
cached: 0.025,
reasoning: 0.6,
cache_creation: 0.1,
},
},
qw: {
"qwen3-coder-plus": {
input: 1.0,
output: 4.0,
cached: 0.5,
reasoning: 6.0,
cache_creation: 1.0,
},
// Next-generation Qwen Coder tier (added Mar 2026)
"qwen3-coder-next": {
input: 2.0,
output: 8.0,
cached: 1.0,
reasoning: 12.0,
cache_creation: 2.0,
},
"qwen3-coder-flash": {
input: 0.5,
output: 2.0,
cached: 0.25,
reasoning: 3.0,
cache_creation: 0.5,
},
"vision-model": {
input: 1.5,
output: 6.0,
cached: 0.75,
reasoning: 9.0,
cache_creation: 1.5,
},
// Qwen3.5/3.6 Coder Model — ported from upstream 9router PR #156 (zx07).
// Priced identically to the vision tier per upstream defaults.
"coder-model": {
input: 1.5,
output: 6.0,
cached: 0.75,
reasoning: 9.0,
cache_creation: 1.5,
},
},
if: {
"qwen3-coder-plus": {
input: 1.0,
output: 4.0,
cached: 0.5,
reasoning: 6.0,
cache_creation: 1.0,
},
"kimi-k2": {
input: 1.0,
output: 4.0,
cached: 0.5,
reasoning: 6.0,
cache_creation: 1.0,
},
"kimi-k2-thinking": {
input: 1.5,
output: 6.0,
cached: 0.75,
reasoning: 9.0,
cache_creation: 1.5,
},
"deepseek-r1": {
input: 0.75,
output: 3.0,
cached: 0.375,
reasoning: 4.5,
cache_creation: 0.75,
},
"deepseek-v3.2-chat": {
input: 0.28,
output: 0.42,
cached: 0.014,
reasoning: 0.63,
cache_creation: 0.28,
},
"deepseek-v3.2": {
input: 0.28,
output: 0.42,
cached: 0.014,
reasoning: 0.63,
cache_creation: 0.28,
},
"deepseek-v3.2-reasoner": {
input: 0.55,
output: 2.19,
cached: 0.14,
reasoning: 2.19,
cache_creation: 0.55,
},
// Short-form aliases (Mar 2026)
"deepseek-3.1": {
input: 0.27,
output: 1.1,
cached: 0.07,
reasoning: 2.2,
cache_creation: 0.27,
},
"deepseek-3.2": {
input: 0.27,
output: 1.1,
cached: 0.07,
reasoning: 2.2,
cache_creation: 0.27,
},
"minimax-m2": {
input: 0.5,
output: 2.0,
cached: 0.25,
reasoning: 3.0,
cache_creation: 0.5,
},
"glm-4.6": {
input: 0.5,
output: 2.0,
cached: 0.25,
reasoning: 3.0,
cache_creation: 0.5,
},
"glm-4.7": {
input: 0.75,
output: 3.0,
cached: 0.375,
reasoning: 4.5,
cache_creation: 0.75,
},
},
ag: {
"gemini-3.1-pro-low": {
input: 2.0,
output: 12.0,
cached: 0.25,
reasoning: 18.0,
cache_creation: 2.0,
},
"gemini-3.1-pro-high": {
input: 4.0,
output: 18.0,
cached: 0.5,
reasoning: 27.0,
cache_creation: 4.0,
},
"gemini-3-flash": {
input: 0.5,
output: 3.0,
cached: 0.03,
reasoning: 4.5,
cache_creation: 0.5,
},
// Antigravity 2.0.4+ exposes Gemini 3.5 Flash as three public client ids
// (see ANTIGRAVITY_PUBLIC_MODELS in open-sse/config/antigravityModelAliases.ts):
// gemini-3-flash-agent → "Gemini 3.5 Flash (High)"
// gemini-3.5-flash-low → "Gemini 3.5 Flash (Medium)"
// Both bill at the same per-MTok rates as legacy `gemini-3-flash` above —
// without these rows, getPricingForModel("ag", id) returned null and downstream
// cost / quota calculations silently fell back to $0.
"gemini-3-flash-agent": {
input: 0.5,
output: 3.0,
cached: 0.03,
reasoning: 4.5,
cache_creation: 0.5,
},
"gemini-3.5-flash-low": {
input: 0.5,
output: 3.0,
cached: 0.03,
reasoning: 4.5,
cache_creation: 0.5,
},
// `gemini-pro-agent` is the Antigravity v1.23+ Agent-mode alias for the
// Gemini 3.1 Pro (High) tier — bills at the same rates as `gemini-3.1-pro-high`.
"gemini-pro-agent": {
input: 4.0,
output: 18.0,
cached: 0.5,
reasoning: 27.0,
cache_creation: 4.0,
},
"claude-sonnet-4-6": {
input: 3.0,
output: 15.0,
cached: 0.3,
reasoning: 22.5,
cache_creation: 3.0,
},
"claude-opus-4-6-thinking": {
input: 5.0,
output: 25.0,
cached: 0.5,
reasoning: 37.5,
cache_creation: 5.0,
},
"gpt-oss-120b-medium": {
input: 0.5,
output: 2.0,
cached: 0.25,
reasoning: 3.0,
cache_creation: 0.5,
},
},
gh: {
"gpt-5": {
input: 3.0,
output: 12.0,
cached: 1.5,
reasoning: 18.0,
cache_creation: 3.0,
},
"gpt-5-mini": {
input: 0.75,
output: 3.0,
cached: 0.375,
reasoning: 4.5,
cache_creation: 0.75,
},
"gpt-5.1-codex": {
input: 4.0,
output: 16.0,
cached: 2.0,
reasoning: 24.0,
cache_creation: 4.0,
},
"gpt-5.1-codex-max": {
input: 8.0,
output: 32.0,
cached: 4.0,
reasoning: 48.0,
cache_creation: 8.0,
},
"gpt-4.1": {
input: 2.5,
output: 10.0,
cached: 1.25,
reasoning: 15.0,
cache_creation: 2.5,
},
"claude-4.5-sonnet": {
input: 3.0,
output: 15.0,
cached: 0.3,
reasoning: 22.5,
cache_creation: 3.0,
},
"claude-4.5-opus": {
input: 5.0,
output: 25.0,
cached: 0.5,
reasoning: 37.5,
cache_creation: 5.0,
},
"claude-4.5-haiku": {
input: 0.5,
output: 2.5,
cached: 0.05,
reasoning: 3.75,
cache_creation: 0.5,
},
"gemini-3-pro": {
input: 2.0,
output: 12.0,
cached: 0.25,
reasoning: 18.0,
cache_creation: 2.0,
},
"gemini-3-flash": {
input: 0.5,
output: 3.0,
cached: 0.03,
reasoning: 4.5,
cache_creation: 0.5,
},
"gemini-2.5-pro": {
input: 2.0,
output: 12.0,
cached: 0.25,
reasoning: 18.0,
cache_creation: 2.0,
},
"grok-code-fast-1": {
input: 0.5,
output: 2.0,
cached: 0.25,
reasoning: 3.0,
cache_creation: 0.5,
},
},
kiro: {
"claude-fable-5": {
input: 15.0,
output: 75.0,
cached: 7.5,
reasoning: 112.5,
cache_creation: 15.0,
},
"claude-sonnet-4.5": {
input: 3.0,
output: 15.0,
cached: 1.5,
reasoning: 15.0,
cache_creation: 3.0,
},
"claude-haiku-4.5": {
input: 0.5,
output: 2.5,
cached: 0.25,
reasoning: 2.5,
cache_creation: 0.5,
},
// Models from issue #334
"claude-sonnet-4": {
input: 3.0,
output: 15.0,
cached: 1.5,
reasoning: 15.0,
cache_creation: 3.0,
},
"claude-opus-4.8": {
input: 15.0,
output: 75.0,
cached: 7.5,
reasoning: 75.0,
cache_creation: 15.0,
},
"claude-opus-4.7": {
input: 15.0,
output: 75.0,
cached: 7.5,
reasoning: 75.0,
cache_creation: 15.0,
},
"claude-opus-4.6": {
input: 15.0,
output: 75.0,
cached: 7.5,
reasoning: 75.0,
cache_creation: 15.0,
},
"claude-sonnet-4.6": {
input: 3.0,
output: 15.0,
cached: 1.5,
reasoning: 15.0,
cache_creation: 3.0,
},
"deepseek-v3.2": {
input: 0.27,
output: 1.1,
cached: 0.07,
reasoning: 1.1,
cache_creation: 0.27,
},
// Registry exposes this model as "deepseek-3.2" (no "v") — keep both keys priced.
"deepseek-3.2": {
input: 0.27,
output: 1.1,
cached: 0.07,
reasoning: 1.1,
cache_creation: 0.27,
},
"minimax-m2.1": {
input: 0.4,
output: 1.6,
cached: 0.1,
reasoning: 1.6,
cache_creation: 0.4,
},
// MiniMax M2.5 — cheaper than M2.1, reasoning + tools
"minimax-m2.5": {
input: 0.27,
output: 0.95,
cached: 0.135,
reasoning: 1.425,
cache_creation: 0.27,
},
"glm-5": {
input: 1.0,
output: 3.2,
cached: 0.2,
reasoning: 4.8,
cache_creation: 1.0,
},
"qwen3-coder-next": {
input: 2.0,
output: 8.0,
cached: 0.5,
reasoning: 8.0,
cache_creation: 2.0,
},
// Kiro "Auto" model — routes to best available
auto: {
input: 3.0,
output: 15.0,
cached: 1.5,
reasoning: 15.0,
cache_creation: 3.0,
},
// Registry exposes the Auto model as id "auto-kiro" — keep both keys priced.
"auto-kiro": {
input: 3.0,
output: 15.0,
cached: 1.5,
reasoning: 15.0,
cache_creation: 3.0,
},
},
};