floe-guard 0.16.0 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -1
- package/dist/adapters/livekit.cjs +372 -20
- package/dist/adapters/livekit.cjs.map +1 -1
- package/dist/adapters/livekit.d.cts +1 -1
- package/dist/adapters/livekit.d.ts +1 -1
- package/dist/adapters/livekit.js +1 -1
- package/dist/adapters/retell.cjs +372 -20
- package/dist/adapters/retell.cjs.map +1 -1
- package/dist/adapters/retell.d.cts +1 -1
- package/dist/adapters/retell.d.ts +1 -1
- package/dist/adapters/retell.js +1 -1
- package/dist/adapters/vapi.cjs +372 -20
- package/dist/adapters/vapi.cjs.map +1 -1
- package/dist/adapters/vapi.d.cts +2 -2
- package/dist/adapters/vapi.d.ts +2 -2
- package/dist/adapters/vapi.js +1 -1
- package/dist/{chunk-5V3ZR6GE.js → chunk-IJZ256WH.js} +388 -24
- package/dist/chunk-IJZ256WH.js.map +1 -0
- package/dist/{guard-Bbs5OxAF.d.cts → guard-DR5n03kr.d.cts} +104 -15
- package/dist/{guard-Bbs5OxAF.d.ts → guard-DR5n03kr.d.ts} +104 -15
- package/dist/index.cjs +444 -28
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +151 -62
- package/dist/index.d.ts +151 -62
- package/dist/index.js +65 -11
- package/dist/index.js.map +1 -1
- package/package.json +4 -3
- package/src/cost_map.json +210 -2
- package/src/kinds.json +18 -0
- package/dist/chunk-5V3ZR6GE.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/adapters/livekit.ts","../../src/errors.ts","../../src/gates.ts","../../src/cost_map.json","../../src/voice-pricing.ts"],"sourcesContent":["/**\n * LiveKit Agents adapter (optional peer: `npm i @livekit/agents`).\n *\n * Like the Python `LiveKitBudgetGuard`, a LiveKit `AgentSession` (STT -> LLM ->\n * TTS) has no single call site to wrap: turns fire for the life of a call. The\n * two enforcement points are the agent's LLM turn hook (before the LLM call, so a\n * turn is admitted or blocked before its TTS/audio spend piles on) and the\n * session's usage/metrics event (real usage, after). {@link LiveKitBudgetGuard}\n * holds the reservation state across both.\n *\n * import { BudgetGuard } from \"floe-guard\";\n * import { LiveKitBudgetGuard } from \"floe-guard/adapters/livekit\";\n *\n * const guard = new BudgetGuard(1.0, {\n * priceOverrides: {\n * \"gemini-2.0-flash\": { inputCostPerToken: 0.30e-6, outputCostPerToken: 2.5e-6 },\n * },\n * });\n * const budget = new LiveKitBudgetGuard(guard, { model: \"gemini-2.0-flash\" });\n *\n * const session = new AgentSession({ ... });\n * budget.attach(session, agent); // wire reserve / settle / release\n * await session.start({ agent, room });\n *\n * ## Why agents-js, not a blind port of the Python adapter\n *\n * The Node SDK (`@livekit/agents`) differs from Python and was verified against\n * the installed types (v1.6.x):\n *\n * - **LLM turn hook.** Python wraps `agent.llm_node`, an async generator. The JS\n * analog is `Agent.llmNode(chatCtx, toolCtx, modelSettings):\n * Promise<ReadableStream<ChatChunk | string | FlushSentinel> | null>` — it\n * returns a web `ReadableStream`, not a generator. We reserve BEFORE calling the\n * original, then wrap the returned stream so a consumer cancel (interrupt)\n * releases the hold — the JS twin of Python's generator `except BaseException`.\n *\n * - **Settlement event.** Session-level `metrics_collected` is *deprecated in\n * Python* (→ `session_usage_updated` + `ChatMessage.metrics`). In **agents-js**\n * it is **not** deprecated: `AgentSession` (a `TypedEmitter<AgentSessionCallbacks>`)\n * still emits `metrics_collected` with a `MetricsCollectedEvent { metrics:\n * AgentMetrics }`, and `AgentMetrics` is a discriminated union keyed by `type`\n * (`'llm_metrics' | 'stt_metrics' | 'tts_metrics' | ...`) — not the `isinstance`\n * classes Python uses. We settle on that live event.\n *\n * LiveKit's `LLMMetrics` does not name the served model in a way we rely on, so\n * cost is settled against the `model` passed here (as in Python). STT/TTS spend —\n * often a voice agent's larger bill — is metered whenever you name the vendor:\n * pass `sttModel` / `ttsModel` and the rate comes from the bundled voice cost map,\n * or pass a per-unit override (`sttUsdPerSecond` / `ttsUsdPer1kChars`) which wins\n * over the map. Telephony (per-minute) is metered via {@link meterTelephony},\n * since LiveKit emits no telephony metric. A leg with neither a vendor nor an\n * override is left un-metered (the token-only contract); a vendor the voice map\n * cannot price fails closed ({@link UnpriceableVoiceError}).\n *\n * Scope is strictly **pre-turn / pre-call admission plus per-turn settlement**.\n * There is no mid-call intervention: an admitted turn runs to completion; nothing\n * here cuts a turn off partway.\n */\n\nimport { BudgetExceeded } from \"../errors.js\";\nimport { preCall } from \"../gates.js\";\nimport type { BudgetGuard, ReservationHandle } from \"../guard.js\";\nimport { priceVoiceLeg } from \"../voice-pricing.js\";\n\n/**\n * The `LLMMetrics` fields we settle against (agents-js discriminated-union member\n * `type: 'llm_metrics'`). Typed structurally so the adapter carries no hard\n * dependency on `@livekit/agents` — the same idiom the Vercel-AI middleware uses\n * for `ai`. The test file pins these shapes against the real exported types.\n */\ninterface LlmMetricsLike {\n readonly type: \"llm_metrics\";\n readonly promptTokens: number;\n readonly completionTokens: number;\n}\n\n/** `STTMetrics` fields we meter against (`type: 'stt_metrics'`). Duration is ms. */\ninterface SttMetricsLike {\n readonly type: \"stt_metrics\";\n /** Duration of the pushed audio in **milliseconds** (LiveKit's `audioDurationMs`). */\n readonly audioDurationMs: number;\n}\n\n/** `TTSMetrics` fields we meter against (`type: 'tts_metrics'`). */\ninterface TtsMetricsLike {\n readonly type: \"tts_metrics\";\n readonly charactersCount: number;\n}\n\n/** Any member of LiveKit's `AgentMetrics` union — we branch on `type`. */\ntype AgentMetricsLike =\n | LlmMetricsLike\n | SttMetricsLike\n | TtsMetricsLike\n | { readonly type: string };\n\n/** The `MetricsCollectedEvent` payload (`{ metrics: AgentMetrics }`). */\ninterface MetricsCollectedEventLike {\n readonly metrics: AgentMetricsLike;\n}\n\n/**\n * The slice of `AgentSession` we wire onto — its typed event emitter. Structural,\n * so a stubbed session in a test (or the real `AgentSession`) both satisfy it.\n */\nexport interface LiveKitSessionLike {\n on(event: \"metrics_collected\", listener: (ev: MetricsCollectedEventLike) => void): unknown;\n on(event: \"close\", listener: (ev: unknown) => void): unknown;\n}\n\n/** A web `ReadableStream` (Node 18+ global), as returned by `Agent.llmNode`. */\ntype LlmNodeStream = ReadableStream<unknown>;\n\n/**\n * The slice of `Agent` we wrap — its `llmNode` turn hook. The real signature is\n * `llmNode(chatCtx, toolCtx, modelSettings): Promise<ReadableStream<...> | null>`;\n * we forward the arguments unchanged, so an upstream signature change can't break\n * the wrapper.\n */\nexport interface LiveKitAgentLike {\n llmNode: (...args: unknown[]) => Promise<LlmNodeStream | null>;\n}\n\n/** Callback invoked when a turn is blocked, so the bot can speak a wrap-up line. */\nexport type OnBudgetExceeded = (error: BudgetExceeded) => Promise<void> | void;\n\nexport interface LiveKitBudgetGuardOptions {\n /**\n * Model id to settle LLM cost against (LiveKit's `LLMMetrics` carries no model\n * name we rely on). Must be priceable via the bundled cost map or the guard's\n * `priceOverrides`.\n */\n model: string;\n /**\n * Invoked with the {@link BudgetExceeded} when a turn is blocked, so a bot can\n * speak a graceful \"wrapping up\" line before the turn ends silently (the LLM\n * hook returns no stream). If omitted, the {@link BudgetExceeded} propagates out\n * of `llmNode`.\n */\n onBudgetExceeded?: OnBudgetExceeded;\n /** Voice-map vendor key for the STT leg (e.g. `\"deepgram-nova-3\"`). */\n sttModel?: string;\n /** Voice-map vendor key for the TTS leg (e.g. `\"elevenlabs-flash-v2.5\"`). */\n ttsModel?: string;\n /** Voice-map vendor key for the telephony leg (e.g. `\"twilio-us-inbound-local\"`). */\n telephony?: string;\n /** Per-second STT override — wins over `sttModel`. Omit both to leave STT un-metered. */\n sttUsdPerSecond?: number;\n /** Per-1k-chars TTS override — wins over `ttsModel`. Omit both to leave TTS un-metered. */\n ttsUsdPer1kChars?: number;\n /** Per-minute telephony override — wins over `telephony`. */\n telephonyUsdPerMinute?: number;\n}\n\n/**\n * One `llmNode` invocation awaiting (or already past) its `LLMMetrics` event.\n *\n * `open` means the USD amount is still held on the {@link BudgetGuard}. Early\n * release (next turn, interrupt, close) clears the guard hold but leaves the slot\n * in the FIFO queue so a delayed metrics event settles against this turn's slot\n * (with `amount` 0) instead of stealing a later turn's hold.\n */\ninterface TurnSlot {\n amount: ReservationHandle;\n open: boolean;\n}\n\n/**\n * Enforce a {@link BudgetGuard} ceiling on a LiveKit `AgentSession`, one turn at\n * a time: reserve before the LLM turn, settle on real usage, release on interrupt.\n */\nexport class LiveKitBudgetGuard {\n private readonly guard: BudgetGuard;\n private readonly model: string;\n private readonly onBudgetExceeded?: OnBudgetExceeded;\n private readonly sttModel?: string;\n private readonly ttsModel?: string;\n private readonly telephony?: string;\n private readonly sttUsdPerSecond?: number;\n private readonly ttsUsdPer1kChars?: number;\n private readonly telephonyUsdPerMinute?: number;\n\n private pending = false;\n private attached = false;\n private active: TurnSlot | null = null;\n /** FIFO of turns that may still emit `LLMMetrics` (including early-released). */\n private readonly slots: TurnSlot[] = [];\n /**\n * Cap on the FIFO. A realtime / text-only turn returns no stream and emits\n * `realtime_metrics` (not `llm_metrics`), so its slot never settles and would\n * linger; on a long call the queue would grow without bound. Past this many\n * slots we drop the oldest (releasing an open hold), bounding memory and the\n * settlement drift a stale slot introduces.\n */\n private static readonly MAX_SLOTS = 64;\n\n constructor(guard: BudgetGuard, options: LiveKitBudgetGuardOptions) {\n this.guard = guard;\n this.model = options.model;\n this.onBudgetExceeded = options.onBudgetExceeded;\n this.sttModel = options.sttModel;\n this.ttsModel = options.ttsModel;\n this.telephony = options.telephony;\n this.sttUsdPerSecond = options.sttUsdPerSecond;\n this.ttsUsdPer1kChars = options.ttsUsdPer1kChars;\n this.telephonyUsdPerMinute = options.telephonyUsdPerMinute;\n // Bound once so the emitter calls them with the right `this`.\n this.onMetrics = this.onMetrics.bind(this);\n this.onClose = this.onClose.bind(this);\n // Fail fast: a misconfigured voice vendor throws UnpriceableVoiceError at\n // construction, not mid-call. quantity 0 resolves the rate (priced at $0)\n // without metering; an unconfigured leg is a no-op (null).\n priceVoiceLeg(\"stt\", 0, { model: this.sttModel, override: this.sttUsdPerSecond });\n priceVoiceLeg(\"tts\", 0, { model: this.ttsModel, override: this.ttsUsdPer1kChars });\n priceVoiceLeg(\"telephony\", 0, { model: this.telephony, override: this.telephonyUsdPerMinute });\n }\n\n /**\n * Wire reserve (`agent.llmNode`), settle/meter (`metrics_collected`) and release\n * (`close`) onto a session + agent pair. Reserving before the LLM turn is what\n * blocks a turn before its TTS/audio spend piles on.\n */\n attach(session: LiveKitSessionLike, agent: LiveKitAgentLike): void {\n // One guard binds one session/agent pair. A second attach() would wrap the\n // wrapper and register duplicate listeners — each turn would then reserve and\n // settle twice, double-counting spend. Reject the repeat (a reconnect / retried\n // setup should create a fresh LiveKitBudgetGuard).\n if (this.attached) {\n throw new Error(\n \"LiveKitBudgetGuard.attach() called twice — a guard instance binds one \" +\n \"session/agent pair. Create a new LiveKitBudgetGuard to re-attach.\",\n );\n }\n this.attached = true;\n // Bind so the original keeps its `this` when we call it from the wrapper.\n const origLlmNode = agent.llmNode.bind(agent);\n\n const guardedLlmNode = async (...args: unknown[]): Promise<LlmNodeStream | null> => {\n // A previous turn that never settled still holds its reservation — release\n // the guard hold before opening this one, but keep a queue slot so delayed\n // metrics cannot steal this turn's hold.\n if (this.pending) this.earlyReleaseActive();\n\n let handle: ReservationHandle;\n try {\n handle = this.guard.reserve(); // throws BudgetExceeded before the turn runs\n } catch (err) {\n this.clearActive();\n if (err instanceof BudgetExceeded && this.onBudgetExceeded !== undefined) {\n // Let the bot speak a wrap-up line; the turn ends with no stream.\n await this.onBudgetExceeded(err);\n return null;\n }\n throw err;\n }\n\n const slot: TurnSlot = { amount: handle, open: true };\n this.slots.push(slot);\n this.active = slot;\n this.pending = true;\n this.trimSlots(slot);\n\n let stream: LlmNodeStream | null;\n try {\n stream = await origLlmNode(...args);\n } catch (err) {\n // Release only if this invocation still owns the open hold — a later turn\n // may already have early-released ours and reserved its own.\n if (this.active === slot) this.earlyReleaseActive();\n throw err;\n }\n\n // No stream to wrap (realtime / text-only turn): leave the slot open for the\n // metrics event to settle against.\n if (stream === null) return null;\n return this.guardStream(stream, slot);\n };\n\n agent.llmNode = guardedLlmNode;\n session.on(\"metrics_collected\", this.onMetrics);\n session.on(\"close\", this.onClose);\n }\n\n /**\n * Pre-call admission decision (`true` = admit, `false` = reject), delegating to\n * {@link preCall} on the wrapped guard's remaining budget. A coarse,\n * non-binding preflight — the binding hard-stop is the per-turn reserve wired by\n * {@link attach}. Pass `estimatedCallUsd` (e.g. `$/min × expected minutes`) to\n * reject earlier, when the remaining budget can't cover the call.\n */\n admitCall(options: { estimatedCallUsd?: number } = {}): boolean {\n return preCall(this.guard, options);\n }\n\n /**\n * Accrue telephony spend for `minutes` of call time (per-minute).\n *\n * LiveKit emits no telephony metric, so the transport/caller drives this — call\n * it as the call accrues minutes, or once with the final duration. This is\n * per-minute accrual, not live line-cutting: the guard meters the leg, it does\n * not cut the phone line mid-call. Priced from the voice map when `telephony` is\n * set, or the `telephonyUsdPerMinute` override; returns `null` (no-op) when the\n * leg is unconfigured, and fails closed on a vendor the voice map cannot price.\n * Returns the USD accrued, if any.\n */\n meterTelephony(minutes: number): number | null {\n const cost = priceVoiceLeg(\"telephony\", minutes, {\n model: this.telephony,\n override: this.telephonyUsdPerMinute,\n });\n if (cost !== null) this.guard.recordTool(\"livekit-telephony\", cost);\n return cost;\n }\n\n /**\n * Wrap the `llmNode` stream so a consumer cancel (interrupt) releases this turn's\n * hold — the JS twin of Python's generator `except BaseException`. Chunks pass\n * through untouched; a clean end leaves the hold for the metrics event to settle.\n */\n private guardStream(stream: LlmNodeStream, slot: TurnSlot): LlmNodeStream {\n const release = (): void => {\n // Release only if this turn still owns the open hold — a metrics event may\n // already have settled it, or a later turn early-released it.\n if (this.active === slot) this.earlyReleaseActive();\n };\n return stream.pipeThrough(\n new TransformStream<unknown, unknown>({\n transform(chunk, controller) {\n controller.enqueue(chunk); // passthrough; we only need the lifecycle hooks\n },\n // Clean completion: do NOT release — leave the hold for the metrics event\n // to settle against (mirrors Python's generator finishing normally).\n flush() {},\n // Interrupt / downstream cancel: free the held budget. `Transformer.cancel`\n // is honored on Node >=20.14; Node 18 does NOT invoke it — there the hold is\n // released at the next turn's early-release or on session close instead\n // (delayed, never leaked). TS's Transformer lib type lags and omits cancel —\n // cast to keep the type check (as the Vercel-AI middleware does).\n cancel() {\n release();\n },\n } as Transformer<unknown, unknown>),\n );\n }\n\n private onMetrics(ev: MetricsCollectedEventLike): void {\n const m = ev.metrics;\n if (m.type === \"llm_metrics\") {\n const metrics = m as LlmMetricsLike;\n // Pop the oldest turn slot. Early-released turns contribute 0 so a delayed\n // metrics event meters usage without consuming a later hold. An empty queue\n // (reserve hook bypassed) settles as a plain record().\n let reserved: ReservationHandle = 0;\n const slot = this.slots.shift();\n if (slot !== undefined) {\n if (slot.open) {\n reserved = slot.amount;\n slot.open = false;\n }\n if (this.active === slot) this.clearActive();\n }\n this.guard.settle(this.model, metrics.promptTokens, metrics.completionTokens, { reserved });\n } else if (m.type === \"stt_metrics\") {\n // audioDurationMs is milliseconds; the STT leg is priced per second.\n const seconds = (m as SttMetricsLike).audioDurationMs / 1000;\n const cost = priceVoiceLeg(\"stt\", seconds, {\n model: this.sttModel,\n override: this.sttUsdPerSecond,\n });\n if (cost !== null) this.guard.recordTool(\"livekit-stt\", cost);\n } else if (m.type === \"tts_metrics\") {\n const cost = priceVoiceLeg(\"tts\", (m as TtsMetricsLike).charactersCount, {\n model: this.ttsModel,\n override: this.ttsUsdPer1kChars,\n });\n if (cost !== null) this.guard.recordTool(\"livekit-tts\", cost);\n }\n // Other metric kinds (VAD, EOU, realtime, ...) carry no billable leg here.\n }\n\n private onClose(): void {\n // Session torn down with a turn still reserved — release it. Drop any leftover\n // slots so a post-close metrics event cannot touch a stale hold.\n if (this.pending) this.earlyReleaseActive();\n this.slots.length = 0;\n }\n\n private clearActive(): void {\n this.active = null;\n this.pending = false;\n }\n\n /** Drop the open guard hold; leave a zeroed queue slot for delayed metrics. */\n private earlyReleaseActive(): void {\n const slot = this.active;\n if (slot === null || !slot.open) {\n this.clearActive();\n return;\n }\n this.guard.release(slot.amount);\n slot.open = false;\n slot.amount = 0;\n this.clearActive();\n }\n\n /**\n * Bound the FIFO: drop oldest slots past {@link MAX_SLOTS}, releasing an open\n * hold as it goes. Never drops the just-reserved active slot. Prevents a long\n * call from accumulating slots for turns that never emit `llm_metrics`.\n */\n private trimSlots(active: TurnSlot): void {\n while (this.slots.length > LiveKitBudgetGuard.MAX_SLOTS && this.slots[0] !== active) {\n const stale = this.slots.shift();\n if (stale !== undefined && stale.open) this.guard.release(stale.amount);\n }\n }\n}\n","/**\n * Exceptions for floe-guard.\n *\n * Everything derives from {@link FloeGuardError} (the package-root base) so callers\n * can catch the whole family with a single `catch (e) { if (e instanceof FloeGuardError) ... }`.\n *\n * Mirrors `src/floe_guard/errors.py` in the Python package — message formats are\n * kept byte-for-byte identical so both adapters read the same.\n */\n\n/** Base class for every error raised by floe-guard. */\nexport class FloeGuardError extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"FloeGuardError\";\n Object.setPrototypeOf(this, new.target.prototype);\n }\n}\n\n/**\n * Thrown before an LLM call that would cross the configured spend ceiling.\n *\n * The guard throws this *instead of* letting the next call run, so a runaway loop\n * stops here rather than burning more money.\n */\nexport class BudgetExceeded extends FloeGuardError {\n readonly spentUsd: number;\n readonly limitUsd: number;\n\n constructor(spentUsd: number, limitUsd: number, message?: string) {\n // Subclasses (the token twin) pass their own message through so they don't\n // have to reassign `this.message` after super().\n super(\n message ??\n `BUDGET EXCEEDED — call blocked (spent $${spentUsd.toFixed(6)} of $${limitUsd.toFixed(6)} ceiling)`,\n );\n this.name = \"BudgetExceeded\";\n this.spentUsd = spentUsd;\n this.limitUsd = limitUsd;\n }\n}\n\n/**\n * Thrown before a call that would cross a token ceiling (aggregate or step).\n *\n * The token twin of {@link BudgetExceeded} — it extends it so the same retry\n * logic that treats a USD block as terminal (`!(error instanceof\n * BudgetExceeded)`) treats a token block as terminal too, with no extra wiring.\n * `spentUsd` / `limitUsd` are inherited but not meaningful here; the token\n * fields are the payload.\n *\n * `scope` is `\"aggregate\"` (the guard-wide `tokenLimit`) or `\"step\"` (the\n * innermost active {@link BudgetGuard.step} cap).\n */\nexport class TokenBudgetExceeded extends BudgetExceeded {\n readonly spentTokens: number;\n readonly limitTokens: number;\n readonly scope: \"aggregate\" | \"step\";\n\n constructor(spentTokens: number, limitTokens: number, scope: \"aggregate\" | \"step\") {\n // Pass the token-shaped message through super (BudgetExceeded's default is\n // dollar-shaped); 0/0 for the inherited spentUsd/limitUsd — a token block\n // spent no tracked USD.\n super(\n 0,\n 0,\n `TOKEN BUDGET EXCEEDED — call blocked (${scope}: ${spentTokens} of ` +\n `${limitTokens} token ceiling)`,\n );\n this.name = \"TokenBudgetExceeded\";\n this.spentTokens = spentTokens;\n this.limitTokens = limitTokens;\n this.scope = scope;\n }\n}\n\n/**\n * Thrown when a model cannot be priced and the guard is fail-closed.\n *\n * We refuse rather than silently accrue $0 — \"we cannot cap what we cannot price\".\n * Pass a manual price (`priceOverrides` or `record(..., { price })`) to make the\n * model enforceable.\n */\nexport class UnpriceableModelError extends FloeGuardError {\n readonly model: string;\n\n constructor(model: string) {\n super(\n `Cannot price model '${model}': not in the bundled cost map and no ` +\n `manual price was given. The guard cannot enforce a budget on spend ` +\n `it cannot measure. Pass a price override to enable enforcement.`,\n );\n this.name = \"UnpriceableModelError\";\n this.model = model;\n }\n}\n\n/**\n * Thrown when a voice leg (STT/TTS/telephony) cannot be priced and the guard is\n * fail-closed.\n *\n * The voice twin of {@link UnpriceableModelError}: we refuse rather than silently\n * accrue $0 — \"we cannot cap what we cannot price\". It fires when an adapter is\n * asked to meter a leg for a vendor that is absent from the bundled voice cost map\n * (or whose entry has the wrong unit/mode for the leg) and no per-unit override was\n * given. Pass a per-unit rate (`stt_usd_per_second` / `tts_usd_per_1k_chars` /\n * `telephony_usd_per_minute`) to make the leg enforceable.\n *\n * Mirrors `UnpriceableVoiceError` in `src/floe_guard/errors.py`.\n */\nexport class UnpriceableVoiceError extends FloeGuardError {\n readonly vendor: string | null;\n readonly mode: string;\n\n constructor(vendor: string | null, mode: string) {\n // Match Python's `{vendor!r}`: a string is quoted, None renders as `None`.\n const shown = vendor === null ? \"None\" : `'${vendor}'`;\n super(\n `Cannot price ${mode} vendor ${shown}: not in the bundled voice cost ` +\n `map (or its entry has the wrong unit for a ${mode} leg) and no per-unit ` +\n `override was given. The guard cannot enforce a budget on spend it ` +\n `cannot measure. Pass a per-unit rate to enable enforcement.`,\n );\n this.name = \"UnpriceableVoiceError\";\n this.vendor = vendor;\n this.mode = mode;\n }\n}\n\n/**\n * Thrown when an **opt-in** ledger sync to Reconcile Mode fails.\n *\n * Covers a missing API key, a non-https/malformed base URL, a non-2xx response\n * (401 bad/missing key, 403 agent closed/suspended), a network/timeout failure, or\n * a malformed response. Sync is off by default and only runs when the caller\n * explicitly opts in ({@link BudgetGuard.enableSync} + {@link BudgetGuard.sync}) —\n * this error never fires for a guard that hasn't opted in, because such a guard\n * never sends.\n *\n * Mirrors `LedgerSyncError` in `src/floe_guard/errors.py`.\n */\nexport class LedgerSyncError extends FloeGuardError {\n constructor(message: string) {\n super(message);\n this.name = \"LedgerSyncError\";\n }\n}\n\n/**\n * Thrown before a call whose projected duration would blow the SLA.\n *\n * The latency twin of {@link BudgetExceeded}: `LatencyBudget.check()` throws this\n * *instead of* letting the next tool/model call start, so the chain sheds work or\n * falls back to a faster path rather than violating the end-user SLA. Cooperative —\n * killing an already-running stalled call is the framework's job (AbortSignal),\n * not the guard's.\n *\n * Mirrors `DeadlineExceeded` in `src/floe_guard/errors.py` — message format is\n * kept byte-for-byte identical so both adapters read the same.\n */\n/** Shared millisecond rounding for cross-language message parity: `toFixed(0)`\n * rounds half-up while Python's `:.0f` rounds half-to-even, so tie values\n * would break the byte-for-byte contract. Both packages use floor(x + 0.5)\n * (see `_round_half_up` in `src/floe_guard/errors.py`). */\nfunction roundHalfUp(ms: number): number {\n return Math.floor(ms + 0.5);\n}\n\nexport class DeadlineExceeded extends FloeGuardError {\n readonly elapsedMs: number;\n readonly slaMs: number;\n\n constructor(elapsedMs: number, slaMs: number) {\n super(\n `DEADLINE EXCEEDED — call blocked (elapsed ${roundHalfUp(elapsedMs)}ms of ${roundHalfUp(slaMs)}ms SLA)`,\n );\n this.name = \"DeadlineExceeded\";\n this.elapsedMs = elapsedMs;\n this.slaMs = slaMs;\n }\n}\n","/**\n * Pre-call admission gates for voice orchestrators.\n *\n * These decide **at the call boundary** whether to *admit* or *reject* an incoming\n * call, from the guard's remaining budget. They return the exact JSON shape each\n * provider's inbound webhook expects, so a free/local user can reject a call on\n * budget exhaustion with the **same contract** the hosted gateway serves — the paid\n * upgrade is a URL swap, not a rewrite.\n *\n * Scope — strictly pre-call. A gate answers one question: *given the budget left,\n * do we let this call start?* It does **not** intervene mid-call. Once a call is\n * admitted it runs to completion; nothing here cuts a call off partway.\n *\n * Budget, not balance: admission reads the guard's local *remaining budget*, a\n * ceiling signal — not an account balance. US-only telephony, v1.\n *\n * A faithful port of `src/floe_guard/gates.py`.\n */\n\nimport type { BudgetGuard } from \"./guard.js\";\n\n/**\n * True when there isn't budget left to admit one more call.\n *\n * A **non-binding preflight read**: it checks the guard's `remainingUsd` but does\n * *not* reserve anything, so under concurrent inbound calls it can admit more than\n * the budget strictly covers (two calls may see the same headroom and both pass).\n * It is coarse admission control — the binding, atomic hard-stop is the in-call\n * guard (`check` / `reserve` while the call runs). This mirrors the hosted pre-dial\n * gate, which is likewise check-only.\n *\n * With the default `estimatedCallUsd = 0` a call is rejected only once the budget\n * is fully spent (`remainingUsd` at or below zero). Pass an estimate (e.g.\n * `$/min × expected minutes`) to reject earlier, when the remaining budget can't\n * cover it; an estimate that *exactly* equals the remaining budget still admits\n * (inclusive ceiling, matching `BudgetGuard.reserve`). Budget signal, not a balance.\n *\n * @throws RangeError when `estimatedCallUsd` is negative or non-finite — a bad\n * estimate must not silently admit an exhausted guard (NaN/negative comparisons\n * are always false, the same trap `BudgetGuard` rejects for `limitUsd`).\n */\nexport function budgetExhausted(\n guard: BudgetGuard,\n options: { estimatedCallUsd?: number } = {},\n): boolean {\n // Default ONLY undefined — a `null` estimate is malformed input and must reach\n // validation (below) rather than being silently coerced to 0 (which would admit\n // the call with no intended headroom). Mirrors Python raising on a None estimate.\n const estimatedCallUsd = options.estimatedCallUsd === undefined ? 0 : options.estimatedCallUsd;\n if (!Number.isFinite(estimatedCallUsd) || estimatedCallUsd < 0) {\n throw new RangeError(\n `estimatedCallUsd must be a finite, non-negative number, got ${estimatedCallUsd}`,\n );\n }\n const remainingUsd = guard.remainingUsd;\n return remainingUsd <= 0 || remainingUsd < estimatedCallUsd;\n}\n\n/**\n * Generic pre-call admission decision: `true` = admit, `false` = reject.\n *\n * The provider-agnostic gate for Pipecat, custom telephony, or any inbound hook\n * without a first-class helper below. Wire the `false` case into your provider's\n * reject path.\n *\n * TODO(bland): Bland's *Send Call* metadata field name is an OPEN VERIFICATION\n * ITEM (pending confirmation) — this package does not invent it. Use `preCall` to\n * get the admit/reject decision and map `false` onto Bland's Pathway Webhook node\n * once the field name is confirmed.\n */\nexport function preCall(guard: BudgetGuard, options: { estimatedCallUsd?: number } = {}): boolean {\n return !budgetExhausted(guard, options);\n}\n\n/**\n * Response for Retell's inbound-call webhook — reject or admit the call.\n *\n * On budget exhaustion returns `{ call_inbound: { reject: true } }`; otherwise\n * `{ call_inbound: {...} }` carrying any `admit` overrides you pass\n * (`dynamic_variables`, `metadata`, `override_agent_id`, …).\n *\n * Retell contract (verified against docs.retellai.com/features/inbound-call-webhook):\n * **only the boolean `true` rejects** — any other value is ignored. The webhook\n * fires for inbound **phone and SMS** calls (not dial-to-sip); its behaviour for\n * web calls is not documented, so treat this as phone/SMS-only. 10s timeout, up to\n * 3 retries.\n */\nexport function retell(\n guard: BudgetGuard,\n options: { estimatedCallUsd?: number; admit?: Record<string, unknown> } = {},\n): { call_inbound: Record<string, unknown> } {\n if (budgetExhausted(guard, { estimatedCallUsd: options.estimatedCallUsd })) {\n return { call_inbound: { reject: true } };\n }\n // The gate's budget decision — not the caller's overrides — controls admission.\n // Strip `reject` from admit overrides so an errant `admit: { reject: true }` on\n // an available-budget call can't flip the response into Retell's reject shape.\n const safeAdmit = { ...(options.admit ?? {}) };\n delete safeAdmit.reject;\n return { call_inbound: safeAdmit };\n}\n\n/**\n * Response for Vapi's `assistant-request` webhook — reject or admit the call.\n *\n * On budget exhaustion returns `{ error: errorMessage }` (Vapi speaks it, then ends\n * the call). Otherwise admits with `{ assistantId }` if given (`assistantId` takes\n * precedence), else `{ assistant }`.\n *\n * Vapi has **no** `reject: true` boolean — rejection *is* returning an error, and\n * admission *is* returning an assistant. Respond within **~7.5 s** or the call may\n * fail (verified against docs.vapi.ai/server-url/spam-call-rejection).\n *\n * @throws RangeError when admitted (budget available) but neither `assistant` nor\n * `assistantId` was provided — there'd be nothing to hand Vapi.\n */\nexport function vapi(\n guard: BudgetGuard,\n options: {\n assistant?: Record<string, unknown>;\n assistantId?: string;\n errorMessage?: string;\n estimatedCallUsd?: number;\n } = {},\n): Record<string, unknown> {\n const {\n assistant,\n assistantId,\n errorMessage = \"Sorry, this agent is out of budget right now.\",\n estimatedCallUsd,\n } = options;\n if (budgetExhausted(guard, { estimatedCallUsd })) {\n return { error: errorMessage };\n }\n if (assistantId !== undefined && assistantId !== null) {\n return { assistantId };\n }\n if (assistant !== undefined && assistant !== null) {\n return { assistant };\n }\n throw new RangeError(\n \"vapi() admitted the call but has nothing to return: pass assistant or \" +\n \"assistantId for the admit path.\",\n );\n}\n","{\n \"__meta__\": {\n \"generated_at\": \"2026-09-14\",\n \"source\": \"LiteLLM public model prices (bundled snapshot); voice rates verified from vendor list pages\"\n },\n \"chat-latest\": {\n \"input_cost_per_token\": 0.000005,\n \"output_cost_per_token\": 0.00003,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 5e-7\n },\n \"chatgpt-4o-latest\": {\n \"input_cost_per_token\": 0.000005,\n \"output_cost_per_token\": 0.000015,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"claude-3-5-haiku-20241022\": {\n \"input_cost_per_token\": 8e-7,\n \"output_cost_per_token\": 0.000004,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\"\n },\n \"claude-3-5-sonnet-20240620\": {\n \"input_cost_per_token\": 0.000003,\n \"output_cost_per_token\": 0.000015,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\"\n },\n \"claude-3-5-sonnet-20241022\": {\n \"input_cost_per_token\": 0.000003,\n \"output_cost_per_token\": 0.000015,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\"\n },\n \"claude-3-7-sonnet-20250219\": {\n \"input_cost_per_token\": 0.000003,\n \"output_cost_per_token\": 0.000015,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 3e-7,\n \"cache_creation_input_token_cost\": 0.00000375\n },\n \"claude-3-haiku-20240307\": {\n \"input_cost_per_token\": 2.5e-7,\n \"output_cost_per_token\": 0.00000125,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 3e-8,\n \"cache_creation_input_token_cost\": 3e-7\n },\n \"claude-3-opus-20240229\": {\n \"input_cost_per_token\": 0.000015,\n \"output_cost_per_token\": 0.000075,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 0.0000015,\n \"cache_creation_input_token_cost\": 0.00001875\n },\n \"claude-4-opus-20250514\": {\n \"input_cost_per_token\": 0.000015,\n \"output_cost_per_token\": 0.000075,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 0.0000015,\n \"cache_creation_input_token_cost\": 0.00001875\n },\n \"claude-4-sonnet-20250514\": {\n \"input_cost_per_token\": 0.000003,\n \"output_cost_per_token\": 0.000015,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 3e-7,\n \"cache_creation_input_token_cost\": 0.00000375\n },\n \"claude-fable-5\": {\n \"input_cost_per_token\": 0.00001,\n \"output_cost_per_token\": 0.00005,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 0.000001,\n \"cache_creation_input_token_cost\": 0.0000125\n },\n \"claude-fable-5-1\": {\n \"input_cost_per_token\": 0.00001,\n \"output_cost_per_token\": 0.00005,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 2.5e-7,\n \"cache_creation_input_token_cost\": 0.0000125\n },\n \"claude-haiku-4-5\": {\n \"input_cost_per_token\": 0.000001,\n \"output_cost_per_token\": 0.000005,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1e-7,\n \"cache_creation_input_token_cost\": 0.00000125\n },\n \"claude-haiku-4-5-20251001\": {\n \"input_cost_per_token\": 0.000001,\n \"output_cost_per_token\": 0.000005,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1e-7,\n \"cache_creation_input_token_cost\": 0.00000125\n },\n \"claude-mythos-5\": {\n \"input_cost_per_token\": 0.00001,\n \"output_cost_per_token\": 0.00005,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 0.000001,\n \"cache_creation_input_token_cost\": 0.0000125\n },\n \"claude-mythos-5-1\": {\n \"input_cost_per_token\": 0.00001,\n \"output_cost_per_token\": 0.00005,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 2.5e-7,\n \"cache_creation_input_token_cost\": 0.0000125\n },\n \"claude-mythos-preview\": {\n \"input_cost_per_token\": 0.00001,\n \"output_cost_per_token\": 0.00005,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 0.000001,\n \"cache_creation_input_token_cost\": 0.0000125\n },\n \"claude-opus-4-1\": {\n \"input_cost_per_token\": 0.000015,\n \"output_cost_per_token\": 0.000075,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 0.0000015,\n \"cache_creation_input_token_cost\": 0.00001875\n },\n \"claude-opus-4-1-20250805\": {\n \"input_cost_per_token\": 0.000015,\n \"output_cost_per_token\": 0.000075,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 0.0000015,\n \"cache_creation_input_token_cost\": 0.00001875\n },\n \"claude-opus-4-20250514\": {\n \"input_cost_per_token\": 0.000015,\n \"output_cost_per_token\": 0.000075,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 0.0000015,\n \"cache_creation_input_token_cost\": 0.00001875\n },\n \"claude-opus-4-5\": {\n \"input_cost_per_token\": 0.000005,\n \"output_cost_per_token\": 0.000025,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 5e-7,\n \"cache_creation_input_token_cost\": 0.00000625\n },\n \"claude-opus-4-5-20251101\": {\n \"input_cost_per_token\": 0.000005,\n \"output_cost_per_token\": 0.000025,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 5e-7,\n \"cache_creation_input_token_cost\": 0.00000625\n },\n \"claude-opus-4-6\": {\n \"input_cost_per_token\": 0.000005,\n \"output_cost_per_token\": 0.000025,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 5e-7,\n \"cache_creation_input_token_cost\": 0.00000625\n },\n \"claude-opus-4-6-20260205\": {\n \"input_cost_per_token\": 0.000005,\n \"output_cost_per_token\": 0.000025,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 5e-7,\n \"cache_creation_input_token_cost\": 0.00000625\n },\n \"claude-opus-4-7\": {\n \"input_cost_per_token\": 0.000005,\n \"output_cost_per_token\": 0.000025,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 5e-7,\n \"cache_creation_input_token_cost\": 0.00000625\n },\n \"claude-opus-4-7-20260416\": {\n \"input_cost_per_token\": 0.000005,\n \"output_cost_per_token\": 0.000025,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 5e-7,\n \"cache_creation_input_token_cost\": 0.00000625\n },\n \"claude-opus-4-8\": {\n \"input_cost_per_token\": 0.000005,\n \"output_cost_per_token\": 0.000025,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 5e-7,\n \"cache_creation_input_token_cost\": 0.00000625\n },\n \"claude-opus-5\": {\n \"input_cost_per_token\": 0.000005,\n \"output_cost_per_token\": 0.000025,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 5e-7,\n \"cache_creation_input_token_cost\": 0.00000625\n },\n \"claude-sonnet-4-20250514\": {\n \"input_cost_per_token\": 0.000003,\n \"output_cost_per_token\": 0.000015,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 3e-7,\n \"cache_creation_input_token_cost\": 0.00000375\n },\n \"claude-sonnet-4-5\": {\n \"input_cost_per_token\": 0.000003,\n \"output_cost_per_token\": 0.000015,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 3e-7,\n \"cache_creation_input_token_cost\": 0.00000375\n },\n \"claude-sonnet-4-5-20250929\": {\n \"input_cost_per_token\": 0.000003,\n \"output_cost_per_token\": 0.000015,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 3e-7,\n \"cache_creation_input_token_cost\": 0.00000375\n },\n \"claude-sonnet-4-6\": {\n \"input_cost_per_token\": 0.000003,\n \"output_cost_per_token\": 0.000015,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 3e-7,\n \"cache_creation_input_token_cost\": 0.00000375\n },\n \"claude-sonnet-5\": {\n \"input_cost_per_token\": 0.000002,\n \"output_cost_per_token\": 0.00001,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 2e-7,\n \"cache_creation_input_token_cost\": 0.0000025\n },\n \"computer-use-preview\": {\n \"input_cost_per_token\": 0.000003,\n \"output_cost_per_token\": 0.000012,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"daybreak-blue-latest\": {\n \"input_cost_per_token\": 0.000004,\n \"output_cost_per_token\": 0.00002,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 4e-7,\n \"cache_creation_input_token_cost\": 0.000005\n },\n \"daybreak-red-latest\": {\n \"input_cost_per_token\": 0.0000125,\n \"output_cost_per_token\": 0.000075,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 0.00000125,\n \"cache_creation_input_token_cost\": 0.000015625\n },\n \"ft:gpt-3.5-turbo\": {\n \"input_cost_per_token\": 0.000003,\n \"output_cost_per_token\": 0.000006,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"ft:gpt-3.5-turbo-0125\": {\n \"input_cost_per_token\": 0.000003,\n \"output_cost_per_token\": 0.000006,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"ft:gpt-3.5-turbo-0613\": {\n \"input_cost_per_token\": 0.000003,\n \"output_cost_per_token\": 0.000006,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"ft:gpt-3.5-turbo-1106\": {\n \"input_cost_per_token\": 0.000003,\n \"output_cost_per_token\": 0.000006,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"ft:gpt-4-0613\": {\n \"input_cost_per_token\": 0.00003,\n \"output_cost_per_token\": 0.00006,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"ft:gpt-4.1-2025-04-14\": {\n \"input_cost_per_token\": 0.000003,\n \"output_cost_per_token\": 0.000012,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 7.5e-7\n },\n \"ft:gpt-4.1-mini-2025-04-14\": {\n \"input_cost_per_token\": 8e-7,\n \"output_cost_per_token\": 0.0000032,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 2e-7\n },\n \"ft:gpt-4.1-nano-2025-04-14\": {\n \"input_cost_per_token\": 2e-7,\n \"output_cost_per_token\": 8e-7,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 5e-8\n },\n \"ft:gpt-4o-2024-08-06\": {\n \"input_cost_per_token\": 0.00000375,\n \"output_cost_per_token\": 0.000015,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 0.000001875\n },\n \"ft:gpt-4o-2024-11-20\": {\n \"input_cost_per_token\": 0.00000375,\n \"output_cost_per_token\": 0.000015,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_creation_input_token_cost\": 0.000001875\n },\n \"ft:gpt-4o-mini-2024-07-18\": {\n \"input_cost_per_token\": 3e-7,\n \"output_cost_per_token\": 0.0000012,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1.5e-7\n },\n \"ft:o4-mini-2025-04-16\": {\n \"input_cost_per_token\": 0.000004,\n \"output_cost_per_token\": 0.000016,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 0.000001\n },\n \"gemini-2.0-flash\": {\n \"input_cost_per_token\": 1e-7,\n \"output_cost_per_token\": 4e-7,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 2.5e-8\n },\n \"gemini-2.0-flash-001\": {\n \"input_cost_per_token\": 1e-7,\n \"output_cost_per_token\": 4e-7,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 2.5e-8\n },\n \"gemini-2.0-flash-lite\": {\n \"input_cost_per_token\": 7.5e-8,\n \"output_cost_per_token\": 3e-7,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1.875e-8\n },\n \"gemini-2.0-flash-lite-001\": {\n \"input_cost_per_token\": 7.5e-8,\n \"output_cost_per_token\": 3e-7,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1.875e-8\n },\n \"gemini-2.5-computer-use-preview-10-2025\": {\n \"input_cost_per_token\": 0.00000125,\n \"output_cost_per_token\": 0.00001,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\"\n },\n \"gemini-2.5-flash\": {\n \"input_cost_per_token\": 3e-7,\n \"output_cost_per_token\": 0.0000025,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 3e-8\n },\n \"gemini-2.5-flash-lite\": {\n \"input_cost_per_token\": 1e-7,\n \"output_cost_per_token\": 4e-7,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1e-8\n },\n \"gemini-2.5-flash-lite-preview-06-17\": {\n \"input_cost_per_token\": 1e-7,\n \"output_cost_per_token\": 4e-7,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1e-8\n },\n \"gemini-2.5-flash-lite-preview-09-2025\": {\n \"input_cost_per_token\": 1e-7,\n \"output_cost_per_token\": 4e-7,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1e-8\n },\n \"gemini-2.5-flash-preview-09-2025\": {\n \"input_cost_per_token\": 3e-7,\n \"output_cost_per_token\": 0.0000025,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 3e-8\n },\n \"gemini-2.5-pro\": {\n \"input_cost_per_token\": 0.00000125,\n \"output_cost_per_token\": 0.00001,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1.25e-7\n },\n \"gemini-2.5-pro-preview-tts\": {\n \"input_cost_per_token\": 0.000001,\n \"output_cost_per_token\": 0.00002,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1.25e-7\n },\n \"gemini-3-flash-preview\": {\n \"input_cost_per_token\": 5e-7,\n \"output_cost_per_token\": 0.000003,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 5e-8\n },\n \"gemini-3-pro-preview\": {\n \"input_cost_per_token\": 0.000002,\n \"output_cost_per_token\": 0.000012,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 2e-7\n },\n \"gemini-3.1-flash-lite\": {\n \"input_cost_per_token\": 2.5e-7,\n \"output_cost_per_token\": 0.0000015,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 2.5e-8\n },\n \"gemini-3.1-flash-lite-preview\": {\n \"input_cost_per_token\": 2.5e-7,\n \"output_cost_per_token\": 0.0000015,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 2.5e-8\n },\n \"gemini-3.1-pro-preview\": {\n \"input_cost_per_token\": 0.000002,\n \"output_cost_per_token\": 0.000012,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 2e-7\n },\n \"gemini-3.1-pro-preview-customtools\": {\n \"input_cost_per_token\": 0.000002,\n \"output_cost_per_token\": 0.000012,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 2e-7\n },\n \"gemini-3.5-flash\": {\n \"input_cost_per_token\": 0.0000015,\n \"output_cost_per_token\": 0.000009,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1.5e-7\n },\n \"gemini-3.5-flash-lite\": {\n \"input_cost_per_token\": 3e-7,\n \"output_cost_per_token\": 0.0000025,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 3e-8\n },\n \"gemini-3.6-flash\": {\n \"input_cost_per_token\": 7.5e-7,\n \"output_cost_per_token\": 0.00000375,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 7.5e-8\n },\n \"gemini-3.7-flash\": {\n \"input_cost_per_token\": 7.5e-7,\n \"output_cost_per_token\": 0.00000375,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 7.5e-8\n },\n \"gemini-3.8-flash\": {\n \"input_cost_per_token\": 7.5e-7,\n \"output_cost_per_token\": 0.00000375,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 7.5e-8\n },\n \"gemini-embedding-001\": {\n \"input_cost_per_token\": 1.5e-7,\n \"output_cost_per_token\": 0,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"embedding\"\n },\n \"gemini-embedding-2\": {\n \"input_cost_per_token\": 2e-7,\n \"output_cost_per_token\": 0,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"embedding\"\n },\n \"gemini-embedding-2-preview\": {\n \"input_cost_per_token\": 2e-7,\n \"output_cost_per_token\": 0,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"embedding\"\n },\n \"gemini-exp-1206\": {\n \"input_cost_per_token\": 3e-7,\n \"output_cost_per_token\": 0.0000025,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 3e-8\n },\n \"gemini-flash-latest\": {\n \"input_cost_per_token\": 3e-7,\n \"output_cost_per_token\": 0.0000025,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 3e-8\n },\n \"gemini-flash-lite-latest\": {\n \"input_cost_per_token\": 1e-7,\n \"output_cost_per_token\": 4e-7,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1e-8\n },\n \"gemini-gemma-2-27b-it\": {\n \"input_cost_per_token\": 3.5e-7,\n \"output_cost_per_token\": 0.00000105,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\"\n },\n \"gemini-gemma-2-9b-it\": {\n \"input_cost_per_token\": 3.5e-7,\n \"output_cost_per_token\": 0.00000105,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\"\n },\n \"gemini-omni-1.1-flash\": {\n \"input_cost_per_token\": 0.0000015,\n \"output_cost_per_token\": 0.000009,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\"\n },\n \"gemini-omni-flash-preview\": {\n \"input_cost_per_token\": 0.0000015,\n \"output_cost_per_token\": 0.000009,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\"\n },\n \"gemini-pro-latest\": {\n \"input_cost_per_token\": 0.00000125,\n \"output_cost_per_token\": 0.00001,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1.25e-7\n },\n \"gemini-robotics-er-1.5-preview\": {\n \"input_cost_per_token\": 3e-7,\n \"output_cost_per_token\": 0.0000025,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\"\n },\n \"gemini-robotics-er-1.6-preview\": {\n \"input_cost_per_token\": 0.000001,\n \"output_cost_per_token\": 0.000005,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\"\n },\n \"gemini-robotics-er-2-preview\": {\n \"input_cost_per_token\": 0.000002,\n \"output_cost_per_token\": 0.00001,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 2e-7\n },\n \"gemini-robotics-er-2-streaming-preview\": {\n \"input_cost_per_token\": 0.000002,\n \"output_cost_per_token\": 0.00001,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\"\n },\n \"gpt-3.5-turbo\": {\n \"input_cost_per_token\": 5e-7,\n \"output_cost_per_token\": 0.0000015,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"gpt-3.5-turbo-0125\": {\n \"input_cost_per_token\": 5e-7,\n \"output_cost_per_token\": 0.0000015,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"gpt-3.5-turbo-1106\": {\n \"input_cost_per_token\": 0.000001,\n \"output_cost_per_token\": 0.000002,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"gpt-3.5-turbo-16k\": {\n \"input_cost_per_token\": 0.000003,\n \"output_cost_per_token\": 0.000004,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"gpt-4\": {\n \"input_cost_per_token\": 0.00003,\n \"output_cost_per_token\": 0.00006,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"gpt-4-0125-preview\": {\n \"input_cost_per_token\": 0.00001,\n \"output_cost_per_token\": 0.00003,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"gpt-4-0314\": {\n \"input_cost_per_token\": 0.00003,\n \"output_cost_per_token\": 0.00006,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"gpt-4-0613\": {\n \"input_cost_per_token\": 0.00003,\n \"output_cost_per_token\": 0.00006,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"gpt-4-1106-preview\": {\n \"input_cost_per_token\": 0.00001,\n \"output_cost_per_token\": 0.00003,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"gpt-4-turbo\": {\n \"input_cost_per_token\": 0.00001,\n \"output_cost_per_token\": 0.00003,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"gpt-4-turbo-2024-04-09\": {\n \"input_cost_per_token\": 0.00001,\n \"output_cost_per_token\": 0.00003,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"gpt-4-turbo-preview\": {\n \"input_cost_per_token\": 0.00001,\n \"output_cost_per_token\": 0.00003,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"gpt-4.1\": {\n \"input_cost_per_token\": 0.000002,\n \"output_cost_per_token\": 0.000008,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 5e-7\n },\n \"gpt-4.1-2025-04-14\": {\n \"input_cost_per_token\": 0.000002,\n \"output_cost_per_token\": 0.000008,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 5e-7\n },\n \"gpt-4.1-mini\": {\n \"input_cost_per_token\": 4e-7,\n \"output_cost_per_token\": 0.0000016,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1e-7\n },\n \"gpt-4.1-mini-2025-04-14\": {\n \"input_cost_per_token\": 4e-7,\n \"output_cost_per_token\": 0.0000016,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1e-7\n },\n \"gpt-4.1-nano\": {\n \"input_cost_per_token\": 1e-7,\n \"output_cost_per_token\": 4e-7,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 2.5e-8\n },\n \"gpt-4.1-nano-2025-04-14\": {\n \"input_cost_per_token\": 1e-7,\n \"output_cost_per_token\": 4e-7,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 2.5e-8\n },\n \"gpt-4o\": {\n \"input_cost_per_token\": 0.0000025,\n \"output_cost_per_token\": 0.00001,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 0.00000125\n },\n \"gpt-4o-2024-05-13\": {\n \"input_cost_per_token\": 0.000005,\n \"output_cost_per_token\": 0.000015,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"gpt-4o-2024-08-06\": {\n \"input_cost_per_token\": 0.0000025,\n \"output_cost_per_token\": 0.00001,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 0.00000125\n },\n \"gpt-4o-2024-11-20\": {\n \"input_cost_per_token\": 0.0000025,\n \"output_cost_per_token\": 0.00001,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 0.00000125\n },\n \"gpt-4o-audio-preview\": {\n \"input_cost_per_token\": 0.0000025,\n \"output_cost_per_token\": 0.00001,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"gpt-4o-audio-preview-2024-12-17\": {\n \"input_cost_per_token\": 0.0000025,\n \"output_cost_per_token\": 0.00001,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"gpt-4o-audio-preview-2025-06-03\": {\n \"input_cost_per_token\": 0.0000025,\n \"output_cost_per_token\": 0.00001,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"gpt-4o-mini\": {\n \"input_cost_per_token\": 1.5e-7,\n \"output_cost_per_token\": 6e-7,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 7.5e-8\n },\n \"gpt-4o-mini-2024-07-18\": {\n \"input_cost_per_token\": 1.5e-7,\n \"output_cost_per_token\": 6e-7,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 7.5e-8\n },\n \"gpt-4o-mini-audio-preview\": {\n \"input_cost_per_token\": 1.5e-7,\n \"output_cost_per_token\": 6e-7,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"gpt-4o-mini-audio-preview-2024-12-17\": {\n \"input_cost_per_token\": 1.5e-7,\n \"output_cost_per_token\": 6e-7,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"gpt-4o-mini-search-preview\": {\n \"input_cost_per_token\": 1.5e-7,\n \"output_cost_per_token\": 6e-7,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 7.5e-8\n },\n \"gpt-4o-mini-search-preview-2025-03-11\": {\n \"input_cost_per_token\": 1.5e-7,\n \"output_cost_per_token\": 6e-7,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 7.5e-8\n },\n \"gpt-4o-search-preview\": {\n \"input_cost_per_token\": 0.0000025,\n \"output_cost_per_token\": 0.00001,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 0.00000125\n },\n \"gpt-4o-search-preview-2025-03-11\": {\n \"input_cost_per_token\": 0.0000025,\n \"output_cost_per_token\": 0.00001,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 0.00000125\n },\n \"gpt-5\": {\n \"input_cost_per_token\": 0.00000125,\n \"output_cost_per_token\": 0.00001,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1.25e-7\n },\n \"gpt-5-2025-08-07\": {\n \"input_cost_per_token\": 0.00000125,\n \"output_cost_per_token\": 0.00001,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1.25e-7\n },\n \"gpt-5-chat\": {\n \"input_cost_per_token\": 0.00000125,\n \"output_cost_per_token\": 0.00001,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1.25e-7\n },\n \"gpt-5-chat-latest\": {\n \"input_cost_per_token\": 0.00000125,\n \"output_cost_per_token\": 0.00001,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1.25e-7\n },\n \"gpt-5-mini\": {\n \"input_cost_per_token\": 2.5e-7,\n \"output_cost_per_token\": 0.000002,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 2.5e-8\n },\n \"gpt-5-mini-2025-08-07\": {\n \"input_cost_per_token\": 2.5e-7,\n \"output_cost_per_token\": 0.000002,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 2.5e-8\n },\n \"gpt-5-nano\": {\n \"input_cost_per_token\": 5e-8,\n \"output_cost_per_token\": 4e-7,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 5e-9\n },\n \"gpt-5-nano-2025-08-07\": {\n \"input_cost_per_token\": 5e-8,\n \"output_cost_per_token\": 4e-7,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 5e-9\n },\n \"gpt-5-search-api\": {\n \"input_cost_per_token\": 0.00000125,\n \"output_cost_per_token\": 0.00001,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1.25e-7\n },\n \"gpt-5-search-api-2025-10-14\": {\n \"input_cost_per_token\": 0.00000125,\n \"output_cost_per_token\": 0.00001,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1.25e-7\n },\n \"gpt-5.1\": {\n \"input_cost_per_token\": 0.00000125,\n \"output_cost_per_token\": 0.00001,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1.25e-7\n },\n \"gpt-5.1-2025-11-13\": {\n \"input_cost_per_token\": 0.00000125,\n \"output_cost_per_token\": 0.00001,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1.25e-7\n },\n \"gpt-5.1-chat-latest\": {\n \"input_cost_per_token\": 0.00000125,\n \"output_cost_per_token\": 0.00001,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1.25e-7\n },\n \"gpt-5.2\": {\n \"input_cost_per_token\": 0.00000175,\n \"output_cost_per_token\": 0.000014,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1.75e-7\n },\n \"gpt-5.2-2025-12-11\": {\n \"input_cost_per_token\": 0.00000175,\n \"output_cost_per_token\": 0.000014,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1.75e-7\n },\n \"gpt-5.2-chat-latest\": {\n \"input_cost_per_token\": 0.00000175,\n \"output_cost_per_token\": 0.000014,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1.75e-7\n },\n \"gpt-5.3-chat-latest\": {\n \"input_cost_per_token\": 0.00000175,\n \"output_cost_per_token\": 0.000014,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1.75e-7\n },\n \"gpt-5.4\": {\n \"input_cost_per_token\": 0.0000025,\n \"output_cost_per_token\": 0.000015,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 2.5e-7\n },\n \"gpt-5.4-2026-03-05\": {\n \"input_cost_per_token\": 0.0000025,\n \"output_cost_per_token\": 0.000015,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 2.5e-7\n },\n \"gpt-5.4-mini\": {\n \"input_cost_per_token\": 7.5e-7,\n \"output_cost_per_token\": 0.0000045,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 7.5e-8\n },\n \"gpt-5.4-mini-2026-03-17\": {\n \"input_cost_per_token\": 7.5e-7,\n \"output_cost_per_token\": 0.0000045,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 7.5e-8\n },\n \"gpt-5.4-nano\": {\n \"input_cost_per_token\": 2e-7,\n \"output_cost_per_token\": 0.00000125,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 2e-8\n },\n \"gpt-5.4-nano-2026-03-17\": {\n \"input_cost_per_token\": 2e-7,\n \"output_cost_per_token\": 0.00000125,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 2e-8\n },\n \"gpt-5.5\": {\n \"input_cost_per_token\": 0.000005,\n \"output_cost_per_token\": 0.00003,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 5e-7\n },\n \"gpt-5.5-2026-04-23\": {\n \"input_cost_per_token\": 0.000005,\n \"output_cost_per_token\": 0.00003,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 5e-7\n },\n \"gpt-5.6\": {\n \"input_cost_per_token\": 0.000004,\n \"output_cost_per_token\": 0.00002,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 4e-7,\n \"cache_creation_input_token_cost\": 0.000005\n },\n \"gpt-5.6-cyber\": {\n \"input_cost_per_token\": 0.0000125,\n \"output_cost_per_token\": 0.000075,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 0.00000125,\n \"cache_creation_input_token_cost\": 0.000015625\n },\n \"gpt-5.6-luna\": {\n \"input_cost_per_token\": 2e-7,\n \"output_cost_per_token\": 0.0000012,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 2e-8,\n \"cache_creation_input_token_cost\": 2.5e-7\n },\n \"gpt-5.6-sol\": {\n \"input_cost_per_token\": 0.000004,\n \"output_cost_per_token\": 0.00002,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 4e-7,\n \"cache_creation_input_token_cost\": 0.000005\n },\n \"gpt-5.6-terra\": {\n \"input_cost_per_token\": 0.000002,\n \"output_cost_per_token\": 0.000012,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 2e-7,\n \"cache_creation_input_token_cost\": 0.0000025\n },\n \"gpt-6-astra\": {\n \"input_cost_per_token\": 0.00001,\n \"output_cost_per_token\": 0.00005,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 0.000001,\n \"cache_creation_input_token_cost\": 0.0000125\n },\n \"gpt-audio\": {\n \"input_cost_per_token\": 0.0000025,\n \"output_cost_per_token\": 0.00001,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"gpt-audio-1.5\": {\n \"input_cost_per_token\": 0.0000025,\n \"output_cost_per_token\": 0.00001,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"gpt-audio-2025-08-28\": {\n \"input_cost_per_token\": 0.0000025,\n \"output_cost_per_token\": 0.00001,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"gpt-audio-mini\": {\n \"input_cost_per_token\": 6e-7,\n \"output_cost_per_token\": 0.0000024,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"gpt-audio-mini-2025-10-06\": {\n \"input_cost_per_token\": 6e-7,\n \"output_cost_per_token\": 0.0000024,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"gpt-audio-mini-2025-12-15\": {\n \"input_cost_per_token\": 6e-7,\n \"output_cost_per_token\": 0.0000024,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"llama-3.1-8b-instant\": {\n \"input_cost_per_token\": 5e-8,\n \"output_cost_per_token\": 8e-8,\n \"litellm_provider\": \"groq\",\n \"mode\": \"chat\"\n },\n \"llama-3.3-70b-versatile\": {\n \"input_cost_per_token\": 5.9e-7,\n \"output_cost_per_token\": 7.9e-7,\n \"litellm_provider\": \"groq\",\n \"mode\": \"chat\"\n },\n \"meta-llama/llama-4-scout-17b-16e-instruct\": {\n \"input_cost_per_token\": 1.1e-7,\n \"output_cost_per_token\": 3.4e-7,\n \"litellm_provider\": \"groq\",\n \"mode\": \"chat\"\n },\n \"o1\": {\n \"input_cost_per_token\": 0.000015,\n \"output_cost_per_token\": 0.00006,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 0.0000075\n },\n \"o1-2024-12-17\": {\n \"input_cost_per_token\": 0.000015,\n \"output_cost_per_token\": 0.00006,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 0.0000075\n },\n \"o3\": {\n \"input_cost_per_token\": 0.000002,\n \"output_cost_per_token\": 0.000008,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 5e-7\n },\n \"o3-2025-04-16\": {\n \"input_cost_per_token\": 0.000002,\n \"output_cost_per_token\": 0.000008,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 5e-7\n },\n \"o3-mini\": {\n \"input_cost_per_token\": 0.0000011,\n \"output_cost_per_token\": 0.0000044,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 5.5e-7\n },\n \"o3-mini-2025-01-31\": {\n \"input_cost_per_token\": 0.0000011,\n \"output_cost_per_token\": 0.0000044,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 5.5e-7\n },\n \"o4-mini\": {\n \"input_cost_per_token\": 0.0000011,\n \"output_cost_per_token\": 0.0000044,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 2.75e-7\n },\n \"o4-mini-2025-04-16\": {\n \"input_cost_per_token\": 0.0000011,\n \"output_cost_per_token\": 0.0000044,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 2.75e-7\n },\n \"openai/gpt-oss-120b\": {\n \"input_cost_per_token\": 1.5e-7,\n \"output_cost_per_token\": 6e-7,\n \"litellm_provider\": \"groq\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 7.5e-8\n },\n \"openai/gpt-oss-20b\": {\n \"input_cost_per_token\": 7.5e-8,\n \"output_cost_per_token\": 3e-7,\n \"litellm_provider\": \"groq\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 3.75e-8\n },\n \"openai/gpt-oss-safeguard-20b\": {\n \"input_cost_per_token\": 7.5e-8,\n \"output_cost_per_token\": 3e-7,\n \"litellm_provider\": \"groq\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 3.7e-8\n },\n \"qwen/qwen3-32b\": {\n \"input_cost_per_token\": 2.9e-7,\n \"output_cost_per_token\": 5.9e-7,\n \"litellm_provider\": \"groq\",\n \"mode\": \"chat\"\n },\n \"text-embedding-3-large\": {\n \"input_cost_per_token\": 1.3e-7,\n \"output_cost_per_token\": 0,\n \"litellm_provider\": \"openai\",\n \"mode\": \"embedding\"\n },\n \"text-embedding-3-small\": {\n \"input_cost_per_token\": 2e-8,\n \"output_cost_per_token\": 0,\n \"litellm_provider\": \"openai\",\n \"mode\": \"embedding\"\n },\n \"text-embedding-ada-002\": {\n \"input_cost_per_token\": 1e-7,\n \"output_cost_per_token\": 0,\n \"litellm_provider\": \"openai\",\n \"mode\": \"embedding\"\n },\n \"text-embedding-ada-002-v2\": {\n \"input_cost_per_token\": 1e-7,\n \"output_cost_per_token\": 0,\n \"litellm_provider\": \"openai\",\n \"mode\": \"embedding\"\n },\n \"__voice__\": {\n \"deepgram-nova-3\": {\n \"mode\": \"stt\",\n \"unit\": \"usd_per_second\",\n \"rate\": 0.0001283333,\n \"provider\": \"deepgram\"\n },\n \"deepgram-nova-3-multilingual\": {\n \"mode\": \"stt\",\n \"unit\": \"usd_per_second\",\n \"rate\": 0.0001533333,\n \"provider\": \"deepgram\"\n },\n \"deepgram-nova-3-base\": {\n \"mode\": \"stt\",\n \"unit\": \"usd_per_second\",\n \"rate\": 0.0002416667,\n \"provider\": \"deepgram\"\n },\n \"assemblyai-universal-streaming\": {\n \"mode\": \"stt\",\n \"unit\": \"usd_per_second\",\n \"rate\": 0.0000416667,\n \"provider\": \"assemblyai\"\n },\n \"elevenlabs-multilingual-v2\": {\n \"mode\": \"tts\",\n \"unit\": \"usd_per_1k_chars\",\n \"rate\": 0.1,\n \"provider\": \"elevenlabs\"\n },\n \"elevenlabs-flash-v2.5\": {\n \"mode\": \"tts\",\n \"unit\": \"usd_per_1k_chars\",\n \"rate\": 0.05,\n \"provider\": \"elevenlabs\"\n },\n \"elevenlabs-turbo-v2.5\": {\n \"mode\": \"tts\",\n \"unit\": \"usd_per_1k_chars\",\n \"rate\": 0.05,\n \"provider\": \"elevenlabs\"\n },\n \"cartesia-sonic\": {\n \"mode\": \"tts\",\n \"unit\": \"usd_per_1k_chars\",\n \"rate\": 0.03,\n \"provider\": \"cartesia\"\n },\n \"cartesia-line\": {\n \"mode\": \"telephony\",\n \"unit\": \"usd_per_minute\",\n \"rate\": 0.06,\n \"provider\": \"cartesia\"\n },\n \"rime-mist-v2\": {\n \"mode\": \"tts\",\n \"unit\": \"usd_per_1k_chars\",\n \"rate\": 0.03,\n \"provider\": \"rime\"\n },\n \"twilio-us-inbound-local\": {\n \"mode\": \"telephony\",\n \"unit\": \"usd_per_minute\",\n \"rate\": 0.0085,\n \"provider\": \"twilio\"\n },\n \"twilio-us-outbound-local\": {\n \"mode\": \"telephony\",\n \"unit\": \"usd_per_minute\",\n \"rate\": 0.014,\n \"provider\": \"twilio\"\n },\n \"twilio-us-sip-inbound\": {\n \"mode\": \"telephony\",\n \"unit\": \"usd_per_minute\",\n \"rate\": 0.004,\n \"provider\": \"twilio\"\n }\n }\n}\n","/**\n * Offline pricing for voice legs (STT / TTS / telephony) from the vendored map.\n *\n * The voice twin of `pricing.ts`. The token cost map is per-token; a voice\n * pipeline's bill is per-second (STT), per-1k-chars (TTS), and per-minute\n * (telephony) instead, so the voice rates live under the reserved `\"__voice__\"`\n * key of `cost_map.json` with their own schema:\n *\n * \"deepgram-nova-3\": {\n * \"mode\": \"stt\", // discriminator: \"stt\" | \"tts\" | \"telephony\"\n * \"unit\": \"usd_per_second\", // explicit unit — a mismatch fails closed\n * \"rate\": 0.0001283333, // USD in that unit\n * \"provider\": \"deepgram\"\n * }\n *\n * Same fail-closed contract as token pricing: a vendor absent from the map (or an\n * entry whose `unit`/`mode` does not match the leg it is asked to price) is\n * unpriceable — {@link lookupVoiceRate} returns `null` and the adapter throws\n * {@link UnpriceableVoiceError} rather than silently metering the leg at $0. Pass a\n * per-unit override to enforce a leg the map cannot price.\n *\n * No network. The rates are a **drift-prone snapshot** of each vendor's public\n * list price — refresh them (`scripts/update-cost-map.mjs`) like the token map, or\n * estimates drift as vendors change prices. Telephony is **US-only in v1**.\n *\n * This is a faithful port of `src/floe_guard/voice_pricing.py`.\n */\n\nimport costMapJson from \"./cost_map.json\";\nimport { UnpriceableVoiceError } from \"./errors.js\";\n\nexport type VoiceMode = \"stt\" | \"tts\" | \"telephony\";\n\ninterface VoiceMapEntry {\n mode?: unknown;\n unit?: unknown;\n rate?: unknown;\n provider?: unknown;\n}\n\n/** The vendored voice rates — the reserved `\"__voice__\"` section of the cost map. */\nconst VOICE_MAP = ((costMapJson as Record<string, unknown>)[\"__voice__\"] ?? {}) as Record<\n string,\n VoiceMapEntry\n>;\n\n/**\n * The one unit each leg is billed in. An entry whose `unit` disagrees with its\n * leg is a schema mismatch and fails closed — a Deepgram $/min figure stored\n * without the ÷60 conversion would over-bill 60x if it were silently accepted.\n */\nexport const unitForMode: Record<VoiceMode, string> = {\n stt: \"usd_per_second\",\n tts: \"usd_per_1k_chars\",\n telephony: \"usd_per_minute\",\n};\n\n/** A resolved per-unit voice rate plus where it came from. */\nexport interface VoiceRate {\n mode: string;\n unit: string;\n rate: number;\n source: \"override\" | \"cost_map\";\n}\n\nfunction finiteNonNegative(value: unknown): value is number {\n // typeof excludes booleans (Python's _finite_non_negative excludes bool too).\n return typeof value === \"number\" && Number.isFinite(value) && value >= 0;\n}\n\n/**\n * Resolve a voice vendor to its per-unit rate, or `null` if unpriceable.\n *\n * The pure resolver (the voice twin of {@link resolvePrice}): it never throws.\n * Fail-closed on every mismatch — a missing vendor, an entry whose `mode` is not\n * `mode`, an entry whose `unit` is not the canonical unit for `mode`, or a\n * non-finite/negative rate — so a schema slip can never surface as a silent,\n * valid-looking price.\n */\nexport function lookupVoiceRate(model: string | null | undefined, mode: VoiceMode): number | null {\n if (model === null || model === undefined) return null;\n const entry = Object.prototype.hasOwnProperty.call(VOICE_MAP, model)\n ? VOICE_MAP[model]\n : undefined;\n if (!entry) return null;\n if (entry.mode !== mode) return null;\n if (entry.unit !== unitForMode[mode]) return null;\n const rate = entry.rate;\n if (!finiteNonNegative(rate)) return null;\n return rate;\n}\n\n/**\n * Resolve a leg's per-unit rate, fail-closed. An `override` wins over the map.\n *\n * Throws {@link UnpriceableVoiceError} when neither an override nor the bundled\n * map can price the leg — the guard refuses to meter spend it cannot measure.\n */\nexport function resolveVoiceRate(\n model: string | null | undefined,\n mode: VoiceMode,\n override?: number | null,\n): VoiceRate {\n if (override !== undefined && override !== null) {\n if (!finiteNonNegative(override)) {\n throw new RangeError(\n `voice ${mode} override must be a finite, non-negative number, got ${override}`,\n );\n }\n return { mode, unit: unitForMode[mode], rate: override, source: \"override\" };\n }\n const rate = lookupVoiceRate(model, mode);\n if (rate === null) throw new UnpriceableVoiceError(model ?? null, mode);\n return { mode, unit: unitForMode[mode], rate, source: \"cost_map\" };\n}\n\n/**\n * USD for one leg. `quantity` is seconds (stt), characters (tts), or minutes\n * (telephony); negative quantities clamp to zero.\n */\nexport function voiceLegCost(mode: VoiceMode, quantity: number, rate: number): number {\n // Reject non-finite quantities: Math.max(0, NaN) is NaN, so a NaN/Infinity\n // quantity would return a non-finite USD amount that then poisons the guard's\n // running total (NaN disables every ceiling comparison). Negatives still clamp.\n if (!Number.isFinite(quantity)) {\n throw new RangeError(`voice ${mode} quantity must be a finite number, got ${quantity}`);\n }\n const q = Math.max(0, quantity);\n if (mode === \"stt\") return q * rate; // seconds * $/second\n if (mode === \"tts\") return (q / 1000) * rate; // chars / 1000 * $/1k-chars\n if (mode === \"telephony\") return q * rate; // minutes * $/minute\n throw new RangeError(`unknown voice mode ${mode}`);\n}\n\n/**\n * USD for one voice leg, or `null` when the leg is unconfigured (skip it).\n *\n * The single entry point the adapters use. A leg with neither a vendor (`model`)\n * nor an `override` is unconfigured — return `null` so the token-only contract is\n * preserved and nothing is metered. A leg that *is* configured but cannot be\n * priced throws {@link UnpriceableVoiceError} (via {@link resolveVoiceRate}) rather\n * than accruing a silent $0.\n */\nexport function priceVoiceLeg(\n mode: VoiceMode,\n quantity: number,\n options: { model?: string | null; override?: number | null } = {},\n): number | null {\n const model = options.model ?? null;\n const override = options.override ?? null;\n if (model === null && override === null) return null;\n const resolved = resolveVoiceRate(model, mode, override);\n return voiceLegCost(mode, quantity, resolved.rate);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACWO,IAAM,iBAAN,cAA6B,MAAM;AAAA,EACxC,YAAY,SAAiB;AAC3B,UAAM,OAAO;AACb,SAAK,OAAO;AACZ,WAAO,eAAe,MAAM,WAAW,SAAS;AAAA,EAClD;AACF;AAQO,IAAM,iBAAN,cAA6B,eAAe;AAAA,EACxC;AAAA,EACA;AAAA,EAET,YAAY,UAAkB,UAAkB,SAAkB;AAGhE;AAAA,MACE,WACE,+CAA0C,SAAS,QAAQ,CAAC,CAAC,QAAQ,SAAS,QAAQ,CAAC,CAAC;AAAA,IAC5F;AACA,SAAK,OAAO;AACZ,SAAK,WAAW;AAChB,SAAK,WAAW;AAAA,EAClB;AACF;AAsEO,IAAM,wBAAN,cAAoC,eAAe;AAAA,EAC/C;AAAA,EACA;AAAA,EAET,YAAY,QAAuB,MAAc;AAE/C,UAAM,QAAQ,WAAW,OAA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,OAAQ,EAAqB,iBAAiB;AAAA,QACvE,OAAO,KAAK;AAAA,QACZ,UAAU,KAAK;AAAA,MACjB,CAAC;AACD,UAAI,SAAS,KAAM,MAAK,MAAM,WAAW,eAAe,IAAI;AAAA,IAC9D;AAAA,EAEF;AAAA,EAEQ,UAAgB;AAGtB,QAAI,KAAK,QAAS,MAAK,mBAAmB;AAC1C,SAAK,MAAM,SAAS;AAAA,EACtB;AAAA,EAEQ,cAAoB;AAC1B,SAAK,SAAS;AACd,SAAK,UAAU;AAAA,EACjB;AAAA;AAAA,EAGQ,qBAA2B;AACjC,UAAM,OAAO,KAAK;AAClB,QAAI,SAAS,QAAQ,CAAC,KAAK,MAAM;AAC/B,WAAK,YAAY;AACjB;AAAA,IACF;AACA,SAAK,MAAM,QAAQ,KAAK,MAAM;AAC9B,SAAK,OAAO;AACZ,SAAK,SAAS;AACd,SAAK,YAAY;AAAA,EACnB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOQ,UAAU,QAAwB;AACxC,WAAO,KAAK,MAAM,SAAS,oBAAmB,aAAa,KAAK,MAAM,CAAC,MAAM,QAAQ;AACnF,YAAM,QAAQ,KAAK,MAAM,MAAM;AAC/B,UAAI,UAAU,UAAa,MAAM,KAAM,MAAK,MAAM,QAAQ,MAAM,MAAM;AAAA,IACxE;AAAA,EACF;AACF;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/adapters/livekit.ts","../../src/errors.ts","../../src/gates.ts","../../src/cost_map.json","../../src/leg-units.ts","../../src/rate-card.ts","../../src/voice-pricing.ts"],"sourcesContent":["/**\n * LiveKit Agents adapter (optional peer: `npm i @livekit/agents`).\n *\n * Like the Python `LiveKitBudgetGuard`, a LiveKit `AgentSession` (STT -> LLM ->\n * TTS) has no single call site to wrap: turns fire for the life of a call. The\n * two enforcement points are the agent's LLM turn hook (before the LLM call, so a\n * turn is admitted or blocked before its TTS/audio spend piles on) and the\n * session's usage/metrics event (real usage, after). {@link LiveKitBudgetGuard}\n * holds the reservation state across both.\n *\n * import { BudgetGuard } from \"floe-guard\";\n * import { LiveKitBudgetGuard } from \"floe-guard/adapters/livekit\";\n *\n * const guard = new BudgetGuard(1.0, {\n * priceOverrides: {\n * \"gemini-2.0-flash\": { inputCostPerToken: 0.30e-6, outputCostPerToken: 2.5e-6 },\n * },\n * });\n * const budget = new LiveKitBudgetGuard(guard, { model: \"gemini-2.0-flash\" });\n *\n * const session = new AgentSession({ ... });\n * budget.attach(session, agent); // wire reserve / settle / release\n * await session.start({ agent, room });\n *\n * ## Why agents-js, not a blind port of the Python adapter\n *\n * The Node SDK (`@livekit/agents`) differs from Python and was verified against\n * the installed types (v1.6.x):\n *\n * - **LLM turn hook.** Python wraps `agent.llm_node`, an async generator. The JS\n * analog is `Agent.llmNode(chatCtx, toolCtx, modelSettings):\n * Promise<ReadableStream<ChatChunk | string | FlushSentinel> | null>` — it\n * returns a web `ReadableStream`, not a generator. We reserve BEFORE calling the\n * original, then wrap the returned stream so a consumer cancel (interrupt)\n * releases the hold — the JS twin of Python's generator `except BaseException`.\n *\n * - **Settlement event.** Session-level `metrics_collected` is *deprecated in\n * Python* (→ `session_usage_updated` + `ChatMessage.metrics`). In **agents-js**\n * it is **not** deprecated: `AgentSession` (a `TypedEmitter<AgentSessionCallbacks>`)\n * still emits `metrics_collected` with a `MetricsCollectedEvent { metrics:\n * AgentMetrics }`, and `AgentMetrics` is a discriminated union keyed by `type`\n * (`'llm_metrics' | 'stt_metrics' | 'tts_metrics' | ...`) — not the `isinstance`\n * classes Python uses. We settle on that live event.\n *\n * LiveKit's `LLMMetrics` does not name the served model in a way we rely on, so\n * cost is settled against the `model` passed here (as in Python). STT/TTS spend —\n * often a voice agent's larger bill — is metered whenever you name the vendor:\n * pass `sttModel` / `ttsModel` and the rate comes from the bundled voice cost map,\n * or pass a per-unit override (`sttUsdPerSecond` / `ttsUsdPer1kChars`) which wins\n * over the map. Telephony (per-minute) is metered via {@link meterTelephony},\n * since LiveKit emits no telephony metric. A leg with neither a vendor nor an\n * override is left un-metered (the token-only contract); a vendor the voice map\n * cannot price fails closed ({@link UnpriceableVoiceError}).\n *\n * Scope is strictly **pre-turn / pre-call admission plus per-turn settlement**.\n * There is no mid-call intervention: an admitted turn runs to completion; nothing\n * here cuts a turn off partway.\n */\n\nimport { BudgetExceeded } from \"../errors.js\";\nimport { preCall } from \"../gates.js\";\nimport type { BudgetGuard, ReservationHandle } from \"../guard.js\";\nimport { priceVoiceLeg } from \"../voice-pricing.js\";\n\n/**\n * The `LLMMetrics` fields we settle against (agents-js discriminated-union member\n * `type: 'llm_metrics'`). Typed structurally so the adapter carries no hard\n * dependency on `@livekit/agents` — the same idiom the Vercel-AI middleware uses\n * for `ai`. The test file pins these shapes against the real exported types.\n */\ninterface LlmMetricsLike {\n readonly type: \"llm_metrics\";\n readonly promptTokens: number;\n readonly completionTokens: number;\n}\n\n/** `STTMetrics` fields we meter against (`type: 'stt_metrics'`). Duration is ms. */\ninterface SttMetricsLike {\n readonly type: \"stt_metrics\";\n /** Duration of the pushed audio in **milliseconds** (LiveKit's `audioDurationMs`). */\n readonly audioDurationMs: number;\n}\n\n/** `TTSMetrics` fields we meter against (`type: 'tts_metrics'`). */\ninterface TtsMetricsLike {\n readonly type: \"tts_metrics\";\n readonly charactersCount: number;\n}\n\n/** Any member of LiveKit's `AgentMetrics` union — we branch on `type`. */\ntype AgentMetricsLike =\n | LlmMetricsLike\n | SttMetricsLike\n | TtsMetricsLike\n | { readonly type: string };\n\n/** The `MetricsCollectedEvent` payload (`{ metrics: AgentMetrics }`). */\ninterface MetricsCollectedEventLike {\n readonly metrics: AgentMetricsLike;\n}\n\n/**\n * The slice of `AgentSession` we wire onto — its typed event emitter. Structural,\n * so a stubbed session in a test (or the real `AgentSession`) both satisfy it.\n */\nexport interface LiveKitSessionLike {\n on(event: \"metrics_collected\", listener: (ev: MetricsCollectedEventLike) => void): unknown;\n on(event: \"close\", listener: (ev: unknown) => void): unknown;\n}\n\n/** A web `ReadableStream` (Node 18+ global), as returned by `Agent.llmNode`. */\ntype LlmNodeStream = ReadableStream<unknown>;\n\n/**\n * The slice of `Agent` we wrap — its `llmNode` turn hook. The real signature is\n * `llmNode(chatCtx, toolCtx, modelSettings): Promise<ReadableStream<...> | null>`;\n * we forward the arguments unchanged, so an upstream signature change can't break\n * the wrapper.\n */\nexport interface LiveKitAgentLike {\n llmNode: (...args: unknown[]) => Promise<LlmNodeStream | null>;\n}\n\n/** Callback invoked when a turn is blocked, so the bot can speak a wrap-up line. */\nexport type OnBudgetExceeded = (error: BudgetExceeded) => Promise<void> | void;\n\nexport interface LiveKitBudgetGuardOptions {\n /**\n * Model id to settle LLM cost against (LiveKit's `LLMMetrics` carries no model\n * name we rely on). Must be priceable via the bundled cost map or the guard's\n * `priceOverrides`.\n */\n model: string;\n /**\n * Invoked with the {@link BudgetExceeded} when a turn is blocked, so a bot can\n * speak a graceful \"wrapping up\" line before the turn ends silently (the LLM\n * hook returns no stream). If omitted, the {@link BudgetExceeded} propagates out\n * of `llmNode`.\n */\n onBudgetExceeded?: OnBudgetExceeded;\n /** Voice-map vendor key for the STT leg (e.g. `\"deepgram-nova-3\"`). */\n sttModel?: string;\n /** Voice-map vendor key for the TTS leg (e.g. `\"elevenlabs-flash-v2.5\"`). */\n ttsModel?: string;\n /** Voice-map vendor key for the telephony leg (e.g. `\"twilio-us-inbound-local\"`). */\n telephony?: string;\n /** Per-second STT override — wins over `sttModel`. Omit both to leave STT un-metered. */\n sttUsdPerSecond?: number;\n /** Per-1k-chars TTS override — wins over `ttsModel`. Omit both to leave TTS un-metered. */\n ttsUsdPer1kChars?: number;\n /** Per-minute telephony override — wins over `telephony`. */\n telephonyUsdPerMinute?: number;\n}\n\n/**\n * One `llmNode` invocation awaiting (or already past) its `LLMMetrics` event.\n *\n * `open` means the USD amount is still held on the {@link BudgetGuard}. Early\n * release (next turn, interrupt, close) clears the guard hold but leaves the slot\n * in the FIFO queue so a delayed metrics event settles against this turn's slot\n * (with `amount` 0) instead of stealing a later turn's hold.\n */\ninterface TurnSlot {\n amount: ReservationHandle;\n open: boolean;\n}\n\n/**\n * Enforce a {@link BudgetGuard} ceiling on a LiveKit `AgentSession`, one turn at\n * a time: reserve before the LLM turn, settle on real usage, release on interrupt.\n */\nexport class LiveKitBudgetGuard {\n private readonly guard: BudgetGuard;\n private readonly model: string;\n private readonly onBudgetExceeded?: OnBudgetExceeded;\n private readonly sttModel?: string;\n private readonly ttsModel?: string;\n private readonly telephony?: string;\n private readonly sttUsdPerSecond?: number;\n private readonly ttsUsdPer1kChars?: number;\n private readonly telephonyUsdPerMinute?: number;\n\n private pending = false;\n private attached = false;\n private active: TurnSlot | null = null;\n /** FIFO of turns that may still emit `LLMMetrics` (including early-released). */\n private readonly slots: TurnSlot[] = [];\n /**\n * Cap on the FIFO. A realtime / text-only turn returns no stream and emits\n * `realtime_metrics` (not `llm_metrics`), so its slot never settles and would\n * linger; on a long call the queue would grow without bound. Past this many\n * slots we drop the oldest (releasing an open hold), bounding memory and the\n * settlement drift a stale slot introduces.\n */\n private static readonly MAX_SLOTS = 64;\n\n constructor(guard: BudgetGuard, options: LiveKitBudgetGuardOptions) {\n this.guard = guard;\n this.model = options.model;\n this.onBudgetExceeded = options.onBudgetExceeded;\n this.sttModel = options.sttModel;\n this.ttsModel = options.ttsModel;\n this.telephony = options.telephony;\n this.sttUsdPerSecond = options.sttUsdPerSecond;\n this.ttsUsdPer1kChars = options.ttsUsdPer1kChars;\n this.telephonyUsdPerMinute = options.telephonyUsdPerMinute;\n // Bound once so the emitter calls them with the right `this`.\n this.onMetrics = this.onMetrics.bind(this);\n this.onClose = this.onClose.bind(this);\n // Fail fast: a misconfigured voice vendor throws UnpriceableVoiceError at\n // construction, not mid-call. quantity 0 resolves the rate (priced at $0)\n // without metering; an unconfigured leg is a no-op (null).\n priceVoiceLeg(\"stt\", 0, { model: this.sttModel, override: this.sttUsdPerSecond });\n priceVoiceLeg(\"tts\", 0, { model: this.ttsModel, override: this.ttsUsdPer1kChars });\n priceVoiceLeg(\"telephony\", 0, { model: this.telephony, override: this.telephonyUsdPerMinute });\n }\n\n /**\n * Wire reserve (`agent.llmNode`), settle/meter (`metrics_collected`) and release\n * (`close`) onto a session + agent pair. Reserving before the LLM turn is what\n * blocks a turn before its TTS/audio spend piles on.\n */\n attach(session: LiveKitSessionLike, agent: LiveKitAgentLike): void {\n // One guard binds one session/agent pair. A second attach() would wrap the\n // wrapper and register duplicate listeners — each turn would then reserve and\n // settle twice, double-counting spend. Reject the repeat (a reconnect / retried\n // setup should create a fresh LiveKitBudgetGuard).\n if (this.attached) {\n throw new Error(\n \"LiveKitBudgetGuard.attach() called twice — a guard instance binds one \" +\n \"session/agent pair. Create a new LiveKitBudgetGuard to re-attach.\",\n );\n }\n this.attached = true;\n // Bind so the original keeps its `this` when we call it from the wrapper.\n const origLlmNode = agent.llmNode.bind(agent);\n\n const guardedLlmNode = async (...args: unknown[]): Promise<LlmNodeStream | null> => {\n // A previous turn that never settled still holds its reservation — release\n // the guard hold before opening this one, but keep a queue slot so delayed\n // metrics cannot steal this turn's hold.\n if (this.pending) this.earlyReleaseActive();\n\n let handle: ReservationHandle;\n try {\n handle = this.guard.reserve(); // throws BudgetExceeded before the turn runs\n } catch (err) {\n this.clearActive();\n if (err instanceof BudgetExceeded && this.onBudgetExceeded !== undefined) {\n // Let the bot speak a wrap-up line; the turn ends with no stream.\n await this.onBudgetExceeded(err);\n return null;\n }\n throw err;\n }\n\n const slot: TurnSlot = { amount: handle, open: true };\n this.slots.push(slot);\n this.active = slot;\n this.pending = true;\n this.trimSlots(slot);\n\n let stream: LlmNodeStream | null;\n try {\n stream = await origLlmNode(...args);\n } catch (err) {\n // Release only if this invocation still owns the open hold — a later turn\n // may already have early-released ours and reserved its own.\n if (this.active === slot) this.earlyReleaseActive();\n throw err;\n }\n\n // No stream to wrap (realtime / text-only turn): leave the slot open for the\n // metrics event to settle against.\n if (stream === null) return null;\n return this.guardStream(stream, slot);\n };\n\n agent.llmNode = guardedLlmNode;\n session.on(\"metrics_collected\", this.onMetrics);\n session.on(\"close\", this.onClose);\n }\n\n /**\n * Pre-call admission decision (`true` = admit, `false` = reject), delegating to\n * {@link preCall} on the wrapped guard's remaining budget. A coarse,\n * non-binding preflight — the binding hard-stop is the per-turn reserve wired by\n * {@link attach}. Pass `estimatedCallUsd` (e.g. `$/min × expected minutes`) to\n * reject earlier, when the remaining budget can't cover the call.\n */\n admitCall(options: { estimatedCallUsd?: number } = {}): boolean {\n return preCall(this.guard, options);\n }\n\n /**\n * Accrue telephony spend for `minutes` of call time (per-minute).\n *\n * LiveKit emits no telephony metric, so the transport/caller drives this — call\n * it as the call accrues minutes, or once with the final duration. This is\n * per-minute accrual, not live line-cutting: the guard meters the leg, it does\n * not cut the phone line mid-call. Priced from the voice map when `telephony` is\n * set, or the `telephonyUsdPerMinute` override; returns `null` (no-op) when the\n * leg is unconfigured, and fails closed on a vendor the voice map cannot price.\n * Returns the USD accrued, if any.\n */\n meterTelephony(minutes: number): number | null {\n const cost = priceVoiceLeg(\"telephony\", minutes, {\n model: this.telephony,\n override: this.telephonyUsdPerMinute,\n });\n if (cost !== null) this.guard.recordTool(\"livekit-telephony\", cost);\n return cost;\n }\n\n /**\n * Wrap the `llmNode` stream so a consumer cancel (interrupt) releases this turn's\n * hold — the JS twin of Python's generator `except BaseException`. Chunks pass\n * through untouched; a clean end leaves the hold for the metrics event to settle.\n */\n private guardStream(stream: LlmNodeStream, slot: TurnSlot): LlmNodeStream {\n const release = (): void => {\n // Release only if this turn still owns the open hold — a metrics event may\n // already have settled it, or a later turn early-released it.\n if (this.active === slot) this.earlyReleaseActive();\n };\n return stream.pipeThrough(\n new TransformStream<unknown, unknown>({\n transform(chunk, controller) {\n controller.enqueue(chunk); // passthrough; we only need the lifecycle hooks\n },\n // Clean completion: do NOT release — leave the hold for the metrics event\n // to settle against (mirrors Python's generator finishing normally).\n flush() {},\n // Interrupt / downstream cancel: free the held budget. `Transformer.cancel`\n // is honored on Node >=20.14; Node 18 does NOT invoke it — there the hold is\n // released at the next turn's early-release or on session close instead\n // (delayed, never leaked). TS's Transformer lib type lags and omits cancel —\n // cast to keep the type check (as the Vercel-AI middleware does).\n cancel() {\n release();\n },\n } as Transformer<unknown, unknown>),\n );\n }\n\n private onMetrics(ev: MetricsCollectedEventLike): void {\n const m = ev.metrics;\n if (m.type === \"llm_metrics\") {\n const metrics = m as LlmMetricsLike;\n // Pop the oldest turn slot. Early-released turns contribute 0 so a delayed\n // metrics event meters usage without consuming a later hold. An empty queue\n // (reserve hook bypassed) settles as a plain record().\n let reserved: ReservationHandle = 0;\n const slot = this.slots.shift();\n if (slot !== undefined) {\n if (slot.open) {\n reserved = slot.amount;\n slot.open = false;\n }\n if (this.active === slot) this.clearActive();\n }\n this.guard.settle(this.model, metrics.promptTokens, metrics.completionTokens, { reserved });\n } else if (m.type === \"stt_metrics\") {\n // audioDurationMs is milliseconds; the STT leg is priced per second.\n const seconds = (m as SttMetricsLike).audioDurationMs / 1000;\n const cost = priceVoiceLeg(\"stt\", seconds, {\n model: this.sttModel,\n override: this.sttUsdPerSecond,\n });\n if (cost !== null) this.guard.recordTool(\"livekit-stt\", cost);\n } else if (m.type === \"tts_metrics\") {\n const cost = priceVoiceLeg(\"tts\", (m as TtsMetricsLike).charactersCount, {\n model: this.ttsModel,\n override: this.ttsUsdPer1kChars,\n });\n if (cost !== null) this.guard.recordTool(\"livekit-tts\", cost);\n }\n // Other metric kinds (VAD, EOU, realtime, ...) carry no billable leg here.\n }\n\n private onClose(): void {\n // Session torn down with a turn still reserved — release it. Drop any leftover\n // slots so a post-close metrics event cannot touch a stale hold.\n if (this.pending) this.earlyReleaseActive();\n this.slots.length = 0;\n }\n\n private clearActive(): void {\n this.active = null;\n this.pending = false;\n }\n\n /** Drop the open guard hold; leave a zeroed queue slot for delayed metrics. */\n private earlyReleaseActive(): void {\n const slot = this.active;\n if (slot === null || !slot.open) {\n this.clearActive();\n return;\n }\n this.guard.release(slot.amount);\n slot.open = false;\n slot.amount = 0;\n this.clearActive();\n }\n\n /**\n * Bound the FIFO: drop oldest slots past {@link MAX_SLOTS}, releasing an open\n * hold as it goes. Never drops the just-reserved active slot. Prevents a long\n * call from accumulating slots for turns that never emit `llm_metrics`.\n */\n private trimSlots(active: TurnSlot): void {\n while (this.slots.length > LiveKitBudgetGuard.MAX_SLOTS && this.slots[0] !== active) {\n const stale = this.slots.shift();\n if (stale !== undefined && stale.open) this.guard.release(stale.amount);\n }\n }\n}\n","/**\n * Exceptions for floe-guard.\n *\n * Everything derives from {@link FloeGuardError} (the package-root base) so callers\n * can catch the whole family with a single `catch (e) { if (e instanceof FloeGuardError) ... }`.\n *\n * Mirrors `src/floe_guard/errors.py` in the Python package — message formats are\n * kept byte-for-byte identical so both adapters read the same.\n */\n\n/** Base class for every error raised by floe-guard. */\nexport class FloeGuardError extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"FloeGuardError\";\n Object.setPrototypeOf(this, new.target.prototype);\n }\n}\n\n/**\n * Thrown before an LLM call that would cross the configured spend ceiling.\n *\n * The guard throws this *instead of* letting the next call run, so a runaway loop\n * stops here rather than burning more money.\n */\nexport class BudgetExceeded extends FloeGuardError {\n readonly spentUsd: number;\n readonly limitUsd: number;\n\n constructor(spentUsd: number, limitUsd: number, message?: string) {\n // Subclasses (the token twin) pass their own message through so they don't\n // have to reassign `this.message` after super().\n super(\n message ??\n `BUDGET EXCEEDED — call blocked (spent $${spentUsd.toFixed(6)} of $${limitUsd.toFixed(6)} ceiling)`,\n );\n this.name = \"BudgetExceeded\";\n this.spentUsd = spentUsd;\n this.limitUsd = limitUsd;\n }\n}\n\n/**\n * Thrown before a call that would cross a token ceiling (aggregate or step).\n *\n * The token twin of {@link BudgetExceeded} — it extends it so the same retry\n * logic that treats a USD block as terminal (`!(error instanceof\n * BudgetExceeded)`) treats a token block as terminal too, with no extra wiring.\n * `spentUsd` / `limitUsd` are inherited but not meaningful here; the token\n * fields are the payload.\n *\n * `scope` is `\"aggregate\"` (the guard-wide `tokenLimit`) or `\"step\"` (the\n * innermost active {@link BudgetGuard.step} cap).\n */\nexport class TokenBudgetExceeded extends BudgetExceeded {\n readonly spentTokens: number;\n readonly limitTokens: number;\n readonly scope: \"aggregate\" | \"step\";\n\n constructor(spentTokens: number, limitTokens: number, scope: \"aggregate\" | \"step\") {\n // Pass the token-shaped message through super (BudgetExceeded's default is\n // dollar-shaped); 0/0 for the inherited spentUsd/limitUsd — a token block\n // spent no tracked USD.\n super(\n 0,\n 0,\n `TOKEN BUDGET EXCEEDED — call blocked (${scope}: ${spentTokens} of ` +\n `${limitTokens} token ceiling)`,\n );\n this.name = \"TokenBudgetExceeded\";\n this.spentTokens = spentTokens;\n this.limitTokens = limitTokens;\n this.scope = scope;\n }\n}\n\n/**\n * Thrown when a model cannot be priced and the guard is fail-closed.\n *\n * We refuse rather than silently accrue $0 — \"we cannot cap what we cannot price\".\n * Pass a manual price (`priceOverrides` or `record(..., { price })`) to make the\n * model enforceable.\n */\nexport class UnpriceableModelError extends FloeGuardError {\n readonly model: string;\n\n constructor(model: string) {\n super(\n `Cannot price model '${model}': not in the bundled cost map and no ` +\n `manual price was given. The guard cannot enforce a budget on spend ` +\n `it cannot measure. Pass a price override to enable enforcement.`,\n );\n this.name = \"UnpriceableModelError\";\n this.model = model;\n }\n}\n\n/**\n * Thrown when a per-unit leg cannot be priced and the guard is fail-closed.\n *\n * The per-unit twin of {@link UnpriceableModelError}: we refuse rather than\n * silently accrue $0 — \"we cannot cap what we cannot price\".\n *\n * It fires when NONE of the three sources can price the leg: no per-call\n * override, no usable entry in your rate card, and no usable entry in the\n * bundled per-unit leg map. \"Usable\" matters — an entry whose `mode` or `unit` is\n * wrong for the leg is rejected rather than reinterpreted, so a\n * configured-but-malformed rate-card entry lands here too. That case is the\n * reason the message names the rate card: blaming only the bundled map would send\n * you looking in the wrong place for a rate you had in fact declared.\n *\n * Mirrors `UnpriceableVoiceError` in `src/floe_guard/errors.py`.\n */\nexport class UnpriceableLegError extends FloeGuardError {\n readonly vendor: string | null;\n readonly mode: string;\n\n constructor(vendor: string | null, mode: string) {\n // Match Python's `{vendor!r}`: a string is quoted, None renders as `None`.\n const shown = vendor === null ? \"None\" : `'${vendor}'`;\n super(\n `Cannot price ${mode} vendor ${shown}: no per-call override, no usable ` +\n `entry in your rate card, and none in the bundled per-unit leg map — or ` +\n `an entry exists whose mode/unit is wrong for a ${mode} leg, which is ` +\n `refused rather than reinterpreted. The guard cannot enforce a budget on ` +\n `spend it cannot measure. Declare the rate you pay in your rate card ` +\n `(FLOE_RATE_CARD) or pass a per-unit override to enable enforcement.`,\n );\n // The runtime name stays \"UnpriceableVoiceError\" so existing log scrapes\n // and `err.name === …` checks keep matching. Only the exported symbol is\n // generalised; renaming this string would be a silent breaking change.\n this.name = \"UnpriceableVoiceError\";\n this.vendor = vendor;\n this.mode = mode;\n }\n}\n\n/**\n * Deprecated alias for {@link UnpriceableLegError}, kept so existing\n * `catch (e) { if (e instanceof UnpriceableVoiceError) … }` keeps working. It IS\n * the same class, not a subclass, so `instanceof` behaves identically in both\n * directions. Prefer the leg-shaped name in new code.\n *\n * An export alias rather than `const UnpriceableVoiceError = UnpriceableLegError`:\n * a const binding carries only the VALUE, so `let e: UnpriceableVoiceError` — a\n * type-position use that compiled before — fails with TS2749. Aliasing the class\n * on the export preserves both its value and its type identity, so deprecated\n * really means \"still works\".\n */\nexport { UnpriceableLegError as UnpriceableVoiceError };\n\n/**\n * Thrown when an **opt-in** ledger sync to Reconcile Mode fails.\n *\n * Covers a missing API key, a non-https/malformed base URL, a non-2xx response\n * (401 bad/missing key, 403 agent closed/suspended), a network/timeout failure, or\n * a malformed response. Sync is off by default and only runs when the caller\n * explicitly opts in ({@link BudgetGuard.enableSync} + {@link BudgetGuard.sync}) —\n * this error never fires for a guard that hasn't opted in, because such a guard\n * never sends.\n *\n * Mirrors `LedgerSyncError` in `src/floe_guard/errors.py`.\n */\nexport class LedgerSyncError extends FloeGuardError {\n constructor(message: string) {\n super(message);\n this.name = \"LedgerSyncError\";\n }\n}\n\n/**\n * Thrown before a call whose projected duration would blow the SLA.\n *\n * The latency twin of {@link BudgetExceeded}: `LatencyBudget.check()` throws this\n * *instead of* letting the next tool/model call start, so the chain sheds work or\n * falls back to a faster path rather than violating the end-user SLA. Cooperative —\n * killing an already-running stalled call is the framework's job (AbortSignal),\n * not the guard's.\n *\n * Mirrors `DeadlineExceeded` in `src/floe_guard/errors.py` — message format is\n * kept byte-for-byte identical so both adapters read the same.\n */\n/** Shared millisecond rounding for cross-language message parity: `toFixed(0)`\n * rounds half-up while Python's `:.0f` rounds half-to-even, so tie values\n * would break the byte-for-byte contract. Both packages use floor(x + 0.5)\n * (see `_round_half_up` in `src/floe_guard/errors.py`). */\nfunction roundHalfUp(ms: number): number {\n return Math.floor(ms + 0.5);\n}\n\nexport class DeadlineExceeded extends FloeGuardError {\n readonly elapsedMs: number;\n readonly slaMs: number;\n\n constructor(elapsedMs: number, slaMs: number) {\n super(\n `DEADLINE EXCEEDED — call blocked (elapsed ${roundHalfUp(elapsedMs)}ms of ${roundHalfUp(slaMs)}ms SLA)`,\n );\n this.name = \"DeadlineExceeded\";\n this.elapsedMs = elapsedMs;\n this.slaMs = slaMs;\n }\n}\n","/**\n * Pre-call admission gates for voice orchestrators.\n *\n * These decide **at the call boundary** whether to *admit* or *reject* an incoming\n * call, from the guard's remaining budget. They return the exact JSON shape each\n * provider's inbound webhook expects, so a free/local user can reject a call on\n * budget exhaustion with the **same contract** the hosted gateway serves — the paid\n * upgrade is a URL swap, not a rewrite.\n *\n * Scope — strictly pre-call. A gate answers one question: *given the budget left,\n * do we let this call start?* It does **not** intervene mid-call. Once a call is\n * admitted it runs to completion; nothing here cuts a call off partway.\n *\n * Budget, not balance: admission reads the guard's local *remaining budget*, a\n * ceiling signal — not an account balance. US-only telephony, v1.\n *\n * A faithful port of `src/floe_guard/gates.py`.\n */\n\nimport type { BudgetGuard } from \"./guard.js\";\n\n/**\n * True when there isn't budget left to admit one more call.\n *\n * A **non-binding preflight read**: it checks the guard's `remainingUsd` but does\n * *not* reserve anything, so under concurrent inbound calls it can admit more than\n * the budget strictly covers (two calls may see the same headroom and both pass).\n * It is coarse admission control — the binding, atomic hard-stop is the in-call\n * guard (`check` / `reserve` while the call runs). This mirrors the hosted pre-dial\n * gate, which is likewise check-only.\n *\n * With the default `estimatedCallUsd = 0` a call is rejected only once the budget\n * is fully spent (`remainingUsd` at or below zero). Pass an estimate (e.g.\n * `$/min × expected minutes`) to reject earlier, when the remaining budget can't\n * cover it; an estimate that *exactly* equals the remaining budget still admits\n * (inclusive ceiling, matching `BudgetGuard.reserve`). Budget signal, not a balance.\n *\n * @throws RangeError when `estimatedCallUsd` is negative or non-finite — a bad\n * estimate must not silently admit an exhausted guard (NaN/negative comparisons\n * are always false, the same trap `BudgetGuard` rejects for `limitUsd`).\n */\nexport function budgetExhausted(\n guard: BudgetGuard,\n options: { estimatedCallUsd?: number } = {},\n): boolean {\n // Default ONLY undefined — a `null` estimate is malformed input and must reach\n // validation (below) rather than being silently coerced to 0 (which would admit\n // the call with no intended headroom). Mirrors Python raising on a None estimate.\n const estimatedCallUsd = options.estimatedCallUsd === undefined ? 0 : options.estimatedCallUsd;\n if (!Number.isFinite(estimatedCallUsd) || estimatedCallUsd < 0) {\n throw new RangeError(\n `estimatedCallUsd must be a finite, non-negative number, got ${estimatedCallUsd}`,\n );\n }\n const remainingUsd = guard.remainingUsd;\n return remainingUsd <= 0 || remainingUsd < estimatedCallUsd;\n}\n\n/**\n * Generic pre-call admission decision: `true` = admit, `false` = reject.\n *\n * The provider-agnostic gate for Pipecat, custom telephony, or any inbound hook\n * without a first-class helper below. Wire the `false` case into your provider's\n * reject path.\n *\n * TODO(bland): Bland's *Send Call* metadata field name is an OPEN VERIFICATION\n * ITEM (pending confirmation) — this package does not invent it. Use `preCall` to\n * get the admit/reject decision and map `false` onto Bland's Pathway Webhook node\n * once the field name is confirmed.\n */\nexport function preCall(guard: BudgetGuard, options: { estimatedCallUsd?: number } = {}): boolean {\n return !budgetExhausted(guard, options);\n}\n\n/**\n * Response for Retell's inbound-call webhook — reject or admit the call.\n *\n * On budget exhaustion returns `{ call_inbound: { reject: true } }`; otherwise\n * `{ call_inbound: {...} }` carrying any `admit` overrides you pass\n * (`dynamic_variables`, `metadata`, `override_agent_id`, …).\n *\n * Retell contract (verified against docs.retellai.com/features/inbound-call-webhook):\n * **only the boolean `true` rejects** — any other value is ignored. The webhook\n * fires for inbound **phone and SMS** calls (not dial-to-sip); its behaviour for\n * web calls is not documented, so treat this as phone/SMS-only. 10s timeout, up to\n * 3 retries.\n */\nexport function retell(\n guard: BudgetGuard,\n options: { estimatedCallUsd?: number; admit?: Record<string, unknown> } = {},\n): { call_inbound: Record<string, unknown> } {\n if (budgetExhausted(guard, { estimatedCallUsd: options.estimatedCallUsd })) {\n return { call_inbound: { reject: true } };\n }\n // The gate's budget decision — not the caller's overrides — controls admission.\n // Strip `reject` from admit overrides so an errant `admit: { reject: true }` on\n // an available-budget call can't flip the response into Retell's reject shape.\n const safeAdmit = { ...(options.admit ?? {}) };\n delete safeAdmit.reject;\n return { call_inbound: safeAdmit };\n}\n\n/**\n * Response for Vapi's `assistant-request` webhook — reject or admit the call.\n *\n * On budget exhaustion returns `{ error: errorMessage }` (Vapi speaks it, then ends\n * the call). Otherwise admits with `{ assistantId }` if given (`assistantId` takes\n * precedence), else `{ assistant }`.\n *\n * Vapi has **no** `reject: true` boolean — rejection *is* returning an error, and\n * admission *is* returning an assistant. Respond within **~7.5 s** or the call may\n * fail (verified against docs.vapi.ai/server-url/spam-call-rejection).\n *\n * @throws RangeError when admitted (budget available) but neither `assistant` nor\n * `assistantId` was provided — there'd be nothing to hand Vapi.\n */\nexport function vapi(\n guard: BudgetGuard,\n options: {\n assistant?: Record<string, unknown>;\n assistantId?: string;\n errorMessage?: string;\n estimatedCallUsd?: number;\n } = {},\n): Record<string, unknown> {\n const {\n assistant,\n assistantId,\n errorMessage = \"Sorry, this agent is out of budget right now.\",\n estimatedCallUsd,\n } = options;\n if (budgetExhausted(guard, { estimatedCallUsd })) {\n return { error: errorMessage };\n }\n if (assistantId !== undefined && assistantId !== null) {\n return { assistantId };\n }\n if (assistant !== undefined && assistant !== null) {\n return { assistant };\n }\n throw new RangeError(\n \"vapi() admitted the call but has nothing to return: pass assistant or \" +\n \"assistantId for the admit path.\",\n );\n}\n","{\n \"__meta__\": {\n \"generated_at\": \"2026-09-14\",\n \"source\": \"LiteLLM public model prices (bundled snapshot); per-unit leg rates (stt/tts/telephony/sms/ocr/gpu/avatar) hand-curated from vendor list pages, leg rates last retrieved 2026-09-18\"\n },\n \"chat-latest\": {\n \"input_cost_per_token\": 0.000005,\n \"output_cost_per_token\": 0.00003,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 5e-7\n },\n \"chatgpt-4o-latest\": {\n \"input_cost_per_token\": 0.000005,\n \"output_cost_per_token\": 0.000015,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"claude-3-5-haiku-20241022\": {\n \"input_cost_per_token\": 8e-7,\n \"output_cost_per_token\": 0.000004,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\"\n },\n \"claude-3-5-sonnet-20240620\": {\n \"input_cost_per_token\": 0.000003,\n \"output_cost_per_token\": 0.000015,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\"\n },\n \"claude-3-5-sonnet-20241022\": {\n \"input_cost_per_token\": 0.000003,\n \"output_cost_per_token\": 0.000015,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\"\n },\n \"claude-3-7-sonnet-20250219\": {\n \"input_cost_per_token\": 0.000003,\n \"output_cost_per_token\": 0.000015,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 3e-7,\n \"cache_creation_input_token_cost\": 0.00000375\n },\n \"claude-3-haiku-20240307\": {\n \"input_cost_per_token\": 2.5e-7,\n \"output_cost_per_token\": 0.00000125,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 3e-8,\n \"cache_creation_input_token_cost\": 3e-7\n },\n \"claude-3-opus-20240229\": {\n \"input_cost_per_token\": 0.000015,\n \"output_cost_per_token\": 0.000075,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 0.0000015,\n \"cache_creation_input_token_cost\": 0.00001875\n },\n \"claude-4-opus-20250514\": {\n \"input_cost_per_token\": 0.000015,\n \"output_cost_per_token\": 0.000075,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 0.0000015,\n \"cache_creation_input_token_cost\": 0.00001875\n },\n \"claude-4-sonnet-20250514\": {\n \"input_cost_per_token\": 0.000003,\n \"output_cost_per_token\": 0.000015,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 3e-7,\n \"cache_creation_input_token_cost\": 0.00000375\n },\n \"claude-fable-5\": {\n \"input_cost_per_token\": 0.00001,\n \"output_cost_per_token\": 0.00005,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 0.000001,\n \"cache_creation_input_token_cost\": 0.0000125\n },\n \"claude-fable-5-1\": {\n \"input_cost_per_token\": 0.00001,\n \"output_cost_per_token\": 0.00005,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 2.5e-7,\n \"cache_creation_input_token_cost\": 0.0000125\n },\n \"claude-haiku-4-5\": {\n \"input_cost_per_token\": 0.000001,\n \"output_cost_per_token\": 0.000005,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1e-7,\n \"cache_creation_input_token_cost\": 0.00000125\n },\n \"claude-haiku-4-5-20251001\": {\n \"input_cost_per_token\": 0.000001,\n \"output_cost_per_token\": 0.000005,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1e-7,\n \"cache_creation_input_token_cost\": 0.00000125\n },\n \"claude-mythos-5\": {\n \"input_cost_per_token\": 0.00001,\n \"output_cost_per_token\": 0.00005,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 0.000001,\n \"cache_creation_input_token_cost\": 0.0000125\n },\n \"claude-mythos-5-1\": {\n \"input_cost_per_token\": 0.00001,\n \"output_cost_per_token\": 0.00005,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 2.5e-7,\n \"cache_creation_input_token_cost\": 0.0000125\n },\n \"claude-mythos-preview\": {\n \"input_cost_per_token\": 0.00001,\n \"output_cost_per_token\": 0.00005,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 0.000001,\n \"cache_creation_input_token_cost\": 0.0000125\n },\n \"claude-opus-4-1\": {\n \"input_cost_per_token\": 0.000015,\n \"output_cost_per_token\": 0.000075,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 0.0000015,\n \"cache_creation_input_token_cost\": 0.00001875\n },\n \"claude-opus-4-1-20250805\": {\n \"input_cost_per_token\": 0.000015,\n \"output_cost_per_token\": 0.000075,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 0.0000015,\n \"cache_creation_input_token_cost\": 0.00001875\n },\n \"claude-opus-4-20250514\": {\n \"input_cost_per_token\": 0.000015,\n \"output_cost_per_token\": 0.000075,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 0.0000015,\n \"cache_creation_input_token_cost\": 0.00001875\n },\n \"claude-opus-4-5\": {\n \"input_cost_per_token\": 0.000005,\n \"output_cost_per_token\": 0.000025,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 5e-7,\n \"cache_creation_input_token_cost\": 0.00000625\n },\n \"claude-opus-4-5-20251101\": {\n \"input_cost_per_token\": 0.000005,\n \"output_cost_per_token\": 0.000025,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 5e-7,\n \"cache_creation_input_token_cost\": 0.00000625\n },\n \"claude-opus-4-6\": {\n \"input_cost_per_token\": 0.000005,\n \"output_cost_per_token\": 0.000025,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 5e-7,\n \"cache_creation_input_token_cost\": 0.00000625\n },\n \"claude-opus-4-6-20260205\": {\n \"input_cost_per_token\": 0.000005,\n \"output_cost_per_token\": 0.000025,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 5e-7,\n \"cache_creation_input_token_cost\": 0.00000625\n },\n \"claude-opus-4-7\": {\n \"input_cost_per_token\": 0.000005,\n \"output_cost_per_token\": 0.000025,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 5e-7,\n \"cache_creation_input_token_cost\": 0.00000625\n },\n \"claude-opus-4-7-20260416\": {\n \"input_cost_per_token\": 0.000005,\n \"output_cost_per_token\": 0.000025,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 5e-7,\n \"cache_creation_input_token_cost\": 0.00000625\n },\n \"claude-opus-4-8\": {\n \"input_cost_per_token\": 0.000005,\n \"output_cost_per_token\": 0.000025,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 5e-7,\n \"cache_creation_input_token_cost\": 0.00000625\n },\n \"claude-opus-5\": {\n \"input_cost_per_token\": 0.000005,\n \"output_cost_per_token\": 0.000025,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 5e-7,\n \"cache_creation_input_token_cost\": 0.00000625\n },\n \"claude-sonnet-4-20250514\": {\n \"input_cost_per_token\": 0.000003,\n \"output_cost_per_token\": 0.000015,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 3e-7,\n \"cache_creation_input_token_cost\": 0.00000375\n },\n \"claude-sonnet-4-5\": {\n \"input_cost_per_token\": 0.000003,\n \"output_cost_per_token\": 0.000015,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 3e-7,\n \"cache_creation_input_token_cost\": 0.00000375\n },\n \"claude-sonnet-4-5-20250929\": {\n \"input_cost_per_token\": 0.000003,\n \"output_cost_per_token\": 0.000015,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 3e-7,\n \"cache_creation_input_token_cost\": 0.00000375\n },\n \"claude-sonnet-4-6\": {\n \"input_cost_per_token\": 0.000003,\n \"output_cost_per_token\": 0.000015,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 3e-7,\n \"cache_creation_input_token_cost\": 0.00000375\n },\n \"claude-sonnet-5\": {\n \"input_cost_per_token\": 0.000002,\n \"output_cost_per_token\": 0.00001,\n \"litellm_provider\": \"anthropic\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 2e-7,\n \"cache_creation_input_token_cost\": 0.0000025\n },\n \"computer-use-preview\": {\n \"input_cost_per_token\": 0.000003,\n \"output_cost_per_token\": 0.000012,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"daybreak-blue-latest\": {\n \"input_cost_per_token\": 0.000004,\n \"output_cost_per_token\": 0.00002,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 4e-7,\n \"cache_creation_input_token_cost\": 0.000005\n },\n \"daybreak-red-latest\": {\n \"input_cost_per_token\": 0.0000125,\n \"output_cost_per_token\": 0.000075,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 0.00000125,\n \"cache_creation_input_token_cost\": 0.000015625\n },\n \"ft:gpt-3.5-turbo\": {\n \"input_cost_per_token\": 0.000003,\n \"output_cost_per_token\": 0.000006,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"ft:gpt-3.5-turbo-0125\": {\n \"input_cost_per_token\": 0.000003,\n \"output_cost_per_token\": 0.000006,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"ft:gpt-3.5-turbo-0613\": {\n \"input_cost_per_token\": 0.000003,\n \"output_cost_per_token\": 0.000006,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"ft:gpt-3.5-turbo-1106\": {\n \"input_cost_per_token\": 0.000003,\n \"output_cost_per_token\": 0.000006,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"ft:gpt-4-0613\": {\n \"input_cost_per_token\": 0.00003,\n \"output_cost_per_token\": 0.00006,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"ft:gpt-4.1-2025-04-14\": {\n \"input_cost_per_token\": 0.000003,\n \"output_cost_per_token\": 0.000012,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 7.5e-7\n },\n \"ft:gpt-4.1-mini-2025-04-14\": {\n \"input_cost_per_token\": 8e-7,\n \"output_cost_per_token\": 0.0000032,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 2e-7\n },\n \"ft:gpt-4.1-nano-2025-04-14\": {\n \"input_cost_per_token\": 2e-7,\n \"output_cost_per_token\": 8e-7,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 5e-8\n },\n \"ft:gpt-4o-2024-08-06\": {\n \"input_cost_per_token\": 0.00000375,\n \"output_cost_per_token\": 0.000015,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 0.000001875\n },\n \"ft:gpt-4o-2024-11-20\": {\n \"input_cost_per_token\": 0.00000375,\n \"output_cost_per_token\": 0.000015,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_creation_input_token_cost\": 0.000001875\n },\n \"ft:gpt-4o-mini-2024-07-18\": {\n \"input_cost_per_token\": 3e-7,\n \"output_cost_per_token\": 0.0000012,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1.5e-7\n },\n \"ft:o4-mini-2025-04-16\": {\n \"input_cost_per_token\": 0.000004,\n \"output_cost_per_token\": 0.000016,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 0.000001\n },\n \"gemini-2.0-flash\": {\n \"input_cost_per_token\": 1e-7,\n \"output_cost_per_token\": 4e-7,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 2.5e-8\n },\n \"gemini-2.0-flash-001\": {\n \"input_cost_per_token\": 1e-7,\n \"output_cost_per_token\": 4e-7,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 2.5e-8\n },\n \"gemini-2.0-flash-lite\": {\n \"input_cost_per_token\": 7.5e-8,\n \"output_cost_per_token\": 3e-7,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1.875e-8\n },\n \"gemini-2.0-flash-lite-001\": {\n \"input_cost_per_token\": 7.5e-8,\n \"output_cost_per_token\": 3e-7,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1.875e-8\n },\n \"gemini-2.5-computer-use-preview-10-2025\": {\n \"input_cost_per_token\": 0.00000125,\n \"output_cost_per_token\": 0.00001,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\"\n },\n \"gemini-2.5-flash\": {\n \"input_cost_per_token\": 3e-7,\n \"output_cost_per_token\": 0.0000025,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 3e-8\n },\n \"gemini-2.5-flash-lite\": {\n \"input_cost_per_token\": 1e-7,\n \"output_cost_per_token\": 4e-7,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1e-8\n },\n \"gemini-2.5-flash-lite-preview-06-17\": {\n \"input_cost_per_token\": 1e-7,\n \"output_cost_per_token\": 4e-7,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1e-8\n },\n \"gemini-2.5-flash-lite-preview-09-2025\": {\n \"input_cost_per_token\": 1e-7,\n \"output_cost_per_token\": 4e-7,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1e-8\n },\n \"gemini-2.5-flash-preview-09-2025\": {\n \"input_cost_per_token\": 3e-7,\n \"output_cost_per_token\": 0.0000025,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 3e-8\n },\n \"gemini-2.5-pro\": {\n \"input_cost_per_token\": 0.00000125,\n \"output_cost_per_token\": 0.00001,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1.25e-7\n },\n \"gemini-2.5-pro-preview-tts\": {\n \"input_cost_per_token\": 0.000001,\n \"output_cost_per_token\": 0.00002,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1.25e-7\n },\n \"gemini-3-flash-preview\": {\n \"input_cost_per_token\": 5e-7,\n \"output_cost_per_token\": 0.000003,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 5e-8\n },\n \"gemini-3-pro-preview\": {\n \"input_cost_per_token\": 0.000002,\n \"output_cost_per_token\": 0.000012,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 2e-7\n },\n \"gemini-3.1-flash-lite\": {\n \"input_cost_per_token\": 2.5e-7,\n \"output_cost_per_token\": 0.0000015,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 2.5e-8\n },\n \"gemini-3.1-flash-lite-preview\": {\n \"input_cost_per_token\": 2.5e-7,\n \"output_cost_per_token\": 0.0000015,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 2.5e-8\n },\n \"gemini-3.1-pro-preview\": {\n \"input_cost_per_token\": 0.000002,\n \"output_cost_per_token\": 0.000012,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 2e-7\n },\n \"gemini-3.1-pro-preview-customtools\": {\n \"input_cost_per_token\": 0.000002,\n \"output_cost_per_token\": 0.000012,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 2e-7\n },\n \"gemini-3.5-flash\": {\n \"input_cost_per_token\": 0.0000015,\n \"output_cost_per_token\": 0.000009,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1.5e-7\n },\n \"gemini-3.5-flash-lite\": {\n \"input_cost_per_token\": 3e-7,\n \"output_cost_per_token\": 0.0000025,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 3e-8\n },\n \"gemini-3.6-flash\": {\n \"input_cost_per_token\": 7.5e-7,\n \"output_cost_per_token\": 0.00000375,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 7.5e-8\n },\n \"gemini-3.7-flash\": {\n \"input_cost_per_token\": 7.5e-7,\n \"output_cost_per_token\": 0.00000375,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 7.5e-8\n },\n \"gemini-3.8-flash\": {\n \"input_cost_per_token\": 7.5e-7,\n \"output_cost_per_token\": 0.00000375,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 7.5e-8\n },\n \"gemini-embedding-001\": {\n \"input_cost_per_token\": 1.5e-7,\n \"output_cost_per_token\": 0,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"embedding\"\n },\n \"gemini-embedding-2\": {\n \"input_cost_per_token\": 2e-7,\n \"output_cost_per_token\": 0,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"embedding\"\n },\n \"gemini-embedding-2-preview\": {\n \"input_cost_per_token\": 2e-7,\n \"output_cost_per_token\": 0,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"embedding\"\n },\n \"gemini-exp-1206\": {\n \"input_cost_per_token\": 3e-7,\n \"output_cost_per_token\": 0.0000025,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 3e-8\n },\n \"gemini-flash-latest\": {\n \"input_cost_per_token\": 3e-7,\n \"output_cost_per_token\": 0.0000025,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 3e-8\n },\n \"gemini-flash-lite-latest\": {\n \"input_cost_per_token\": 1e-7,\n \"output_cost_per_token\": 4e-7,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1e-8\n },\n \"gemini-gemma-2-27b-it\": {\n \"input_cost_per_token\": 3.5e-7,\n \"output_cost_per_token\": 0.00000105,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\"\n },\n \"gemini-gemma-2-9b-it\": {\n \"input_cost_per_token\": 3.5e-7,\n \"output_cost_per_token\": 0.00000105,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\"\n },\n \"gemini-omni-1.1-flash\": {\n \"input_cost_per_token\": 0.0000015,\n \"output_cost_per_token\": 0.000009,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\"\n },\n \"gemini-omni-flash-preview\": {\n \"input_cost_per_token\": 0.0000015,\n \"output_cost_per_token\": 0.000009,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\"\n },\n \"gemini-pro-latest\": {\n \"input_cost_per_token\": 0.00000125,\n \"output_cost_per_token\": 0.00001,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1.25e-7\n },\n \"gemini-robotics-er-1.5-preview\": {\n \"input_cost_per_token\": 3e-7,\n \"output_cost_per_token\": 0.0000025,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\"\n },\n \"gemini-robotics-er-1.6-preview\": {\n \"input_cost_per_token\": 0.000001,\n \"output_cost_per_token\": 0.000005,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\"\n },\n \"gemini-robotics-er-2-preview\": {\n \"input_cost_per_token\": 0.000002,\n \"output_cost_per_token\": 0.00001,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 2e-7\n },\n \"gemini-robotics-er-2-streaming-preview\": {\n \"input_cost_per_token\": 0.000002,\n \"output_cost_per_token\": 0.00001,\n \"litellm_provider\": \"gemini\",\n \"mode\": \"chat\"\n },\n \"gpt-3.5-turbo\": {\n \"input_cost_per_token\": 5e-7,\n \"output_cost_per_token\": 0.0000015,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"gpt-3.5-turbo-0125\": {\n \"input_cost_per_token\": 5e-7,\n \"output_cost_per_token\": 0.0000015,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"gpt-3.5-turbo-1106\": {\n \"input_cost_per_token\": 0.000001,\n \"output_cost_per_token\": 0.000002,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"gpt-3.5-turbo-16k\": {\n \"input_cost_per_token\": 0.000003,\n \"output_cost_per_token\": 0.000004,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"gpt-4\": {\n \"input_cost_per_token\": 0.00003,\n \"output_cost_per_token\": 0.00006,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"gpt-4-0125-preview\": {\n \"input_cost_per_token\": 0.00001,\n \"output_cost_per_token\": 0.00003,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"gpt-4-0314\": {\n \"input_cost_per_token\": 0.00003,\n \"output_cost_per_token\": 0.00006,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"gpt-4-0613\": {\n \"input_cost_per_token\": 0.00003,\n \"output_cost_per_token\": 0.00006,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"gpt-4-1106-preview\": {\n \"input_cost_per_token\": 0.00001,\n \"output_cost_per_token\": 0.00003,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"gpt-4-turbo\": {\n \"input_cost_per_token\": 0.00001,\n \"output_cost_per_token\": 0.00003,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"gpt-4-turbo-2024-04-09\": {\n \"input_cost_per_token\": 0.00001,\n \"output_cost_per_token\": 0.00003,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"gpt-4-turbo-preview\": {\n \"input_cost_per_token\": 0.00001,\n \"output_cost_per_token\": 0.00003,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"gpt-4.1\": {\n \"input_cost_per_token\": 0.000002,\n \"output_cost_per_token\": 0.000008,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 5e-7\n },\n \"gpt-4.1-2025-04-14\": {\n \"input_cost_per_token\": 0.000002,\n \"output_cost_per_token\": 0.000008,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 5e-7\n },\n \"gpt-4.1-mini\": {\n \"input_cost_per_token\": 4e-7,\n \"output_cost_per_token\": 0.0000016,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1e-7\n },\n \"gpt-4.1-mini-2025-04-14\": {\n \"input_cost_per_token\": 4e-7,\n \"output_cost_per_token\": 0.0000016,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1e-7\n },\n \"gpt-4.1-nano\": {\n \"input_cost_per_token\": 1e-7,\n \"output_cost_per_token\": 4e-7,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 2.5e-8\n },\n \"gpt-4.1-nano-2025-04-14\": {\n \"input_cost_per_token\": 1e-7,\n \"output_cost_per_token\": 4e-7,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 2.5e-8\n },\n \"gpt-4o\": {\n \"input_cost_per_token\": 0.0000025,\n \"output_cost_per_token\": 0.00001,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 0.00000125\n },\n \"gpt-4o-2024-05-13\": {\n \"input_cost_per_token\": 0.000005,\n \"output_cost_per_token\": 0.000015,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"gpt-4o-2024-08-06\": {\n \"input_cost_per_token\": 0.0000025,\n \"output_cost_per_token\": 0.00001,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 0.00000125\n },\n \"gpt-4o-2024-11-20\": {\n \"input_cost_per_token\": 0.0000025,\n \"output_cost_per_token\": 0.00001,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 0.00000125\n },\n \"gpt-4o-audio-preview\": {\n \"input_cost_per_token\": 0.0000025,\n \"output_cost_per_token\": 0.00001,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"gpt-4o-audio-preview-2024-12-17\": {\n \"input_cost_per_token\": 0.0000025,\n \"output_cost_per_token\": 0.00001,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"gpt-4o-audio-preview-2025-06-03\": {\n \"input_cost_per_token\": 0.0000025,\n \"output_cost_per_token\": 0.00001,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"gpt-4o-mini\": {\n \"input_cost_per_token\": 1.5e-7,\n \"output_cost_per_token\": 6e-7,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 7.5e-8\n },\n \"gpt-4o-mini-2024-07-18\": {\n \"input_cost_per_token\": 1.5e-7,\n \"output_cost_per_token\": 6e-7,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 7.5e-8\n },\n \"gpt-4o-mini-audio-preview\": {\n \"input_cost_per_token\": 1.5e-7,\n \"output_cost_per_token\": 6e-7,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"gpt-4o-mini-audio-preview-2024-12-17\": {\n \"input_cost_per_token\": 1.5e-7,\n \"output_cost_per_token\": 6e-7,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"gpt-4o-mini-search-preview\": {\n \"input_cost_per_token\": 1.5e-7,\n \"output_cost_per_token\": 6e-7,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 7.5e-8\n },\n \"gpt-4o-mini-search-preview-2025-03-11\": {\n \"input_cost_per_token\": 1.5e-7,\n \"output_cost_per_token\": 6e-7,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 7.5e-8\n },\n \"gpt-4o-search-preview\": {\n \"input_cost_per_token\": 0.0000025,\n \"output_cost_per_token\": 0.00001,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 0.00000125\n },\n \"gpt-4o-search-preview-2025-03-11\": {\n \"input_cost_per_token\": 0.0000025,\n \"output_cost_per_token\": 0.00001,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 0.00000125\n },\n \"gpt-5\": {\n \"input_cost_per_token\": 0.00000125,\n \"output_cost_per_token\": 0.00001,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1.25e-7\n },\n \"gpt-5-2025-08-07\": {\n \"input_cost_per_token\": 0.00000125,\n \"output_cost_per_token\": 0.00001,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1.25e-7\n },\n \"gpt-5-chat\": {\n \"input_cost_per_token\": 0.00000125,\n \"output_cost_per_token\": 0.00001,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1.25e-7\n },\n \"gpt-5-chat-latest\": {\n \"input_cost_per_token\": 0.00000125,\n \"output_cost_per_token\": 0.00001,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1.25e-7\n },\n \"gpt-5-mini\": {\n \"input_cost_per_token\": 2.5e-7,\n \"output_cost_per_token\": 0.000002,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 2.5e-8\n },\n \"gpt-5-mini-2025-08-07\": {\n \"input_cost_per_token\": 2.5e-7,\n \"output_cost_per_token\": 0.000002,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 2.5e-8\n },\n \"gpt-5-nano\": {\n \"input_cost_per_token\": 5e-8,\n \"output_cost_per_token\": 4e-7,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 5e-9\n },\n \"gpt-5-nano-2025-08-07\": {\n \"input_cost_per_token\": 5e-8,\n \"output_cost_per_token\": 4e-7,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 5e-9\n },\n \"gpt-5-search-api\": {\n \"input_cost_per_token\": 0.00000125,\n \"output_cost_per_token\": 0.00001,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1.25e-7\n },\n \"gpt-5-search-api-2025-10-14\": {\n \"input_cost_per_token\": 0.00000125,\n \"output_cost_per_token\": 0.00001,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1.25e-7\n },\n \"gpt-5.1\": {\n \"input_cost_per_token\": 0.00000125,\n \"output_cost_per_token\": 0.00001,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1.25e-7\n },\n \"gpt-5.1-2025-11-13\": {\n \"input_cost_per_token\": 0.00000125,\n \"output_cost_per_token\": 0.00001,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1.25e-7\n },\n \"gpt-5.1-chat-latest\": {\n \"input_cost_per_token\": 0.00000125,\n \"output_cost_per_token\": 0.00001,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1.25e-7\n },\n \"gpt-5.2\": {\n \"input_cost_per_token\": 0.00000175,\n \"output_cost_per_token\": 0.000014,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1.75e-7\n },\n \"gpt-5.2-2025-12-11\": {\n \"input_cost_per_token\": 0.00000175,\n \"output_cost_per_token\": 0.000014,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1.75e-7\n },\n \"gpt-5.2-chat-latest\": {\n \"input_cost_per_token\": 0.00000175,\n \"output_cost_per_token\": 0.000014,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1.75e-7\n },\n \"gpt-5.3-chat-latest\": {\n \"input_cost_per_token\": 0.00000175,\n \"output_cost_per_token\": 0.000014,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 1.75e-7\n },\n \"gpt-5.4\": {\n \"input_cost_per_token\": 0.0000025,\n \"output_cost_per_token\": 0.000015,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 2.5e-7\n },\n \"gpt-5.4-2026-03-05\": {\n \"input_cost_per_token\": 0.0000025,\n \"output_cost_per_token\": 0.000015,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 2.5e-7\n },\n \"gpt-5.4-mini\": {\n \"input_cost_per_token\": 7.5e-7,\n \"output_cost_per_token\": 0.0000045,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 7.5e-8\n },\n \"gpt-5.4-mini-2026-03-17\": {\n \"input_cost_per_token\": 7.5e-7,\n \"output_cost_per_token\": 0.0000045,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 7.5e-8\n },\n \"gpt-5.4-nano\": {\n \"input_cost_per_token\": 2e-7,\n \"output_cost_per_token\": 0.00000125,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 2e-8\n },\n \"gpt-5.4-nano-2026-03-17\": {\n \"input_cost_per_token\": 2e-7,\n \"output_cost_per_token\": 0.00000125,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 2e-8\n },\n \"gpt-5.5\": {\n \"input_cost_per_token\": 0.000005,\n \"output_cost_per_token\": 0.00003,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 5e-7\n },\n \"gpt-5.5-2026-04-23\": {\n \"input_cost_per_token\": 0.000005,\n \"output_cost_per_token\": 0.00003,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 5e-7\n },\n \"gpt-5.6\": {\n \"input_cost_per_token\": 0.000004,\n \"output_cost_per_token\": 0.00002,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 4e-7,\n \"cache_creation_input_token_cost\": 0.000005\n },\n \"gpt-5.6-cyber\": {\n \"input_cost_per_token\": 0.0000125,\n \"output_cost_per_token\": 0.000075,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 0.00000125,\n \"cache_creation_input_token_cost\": 0.000015625\n },\n \"gpt-5.6-luna\": {\n \"input_cost_per_token\": 2e-7,\n \"output_cost_per_token\": 0.0000012,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 2e-8,\n \"cache_creation_input_token_cost\": 2.5e-7\n },\n \"gpt-5.6-sol\": {\n \"input_cost_per_token\": 0.000004,\n \"output_cost_per_token\": 0.00002,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 4e-7,\n \"cache_creation_input_token_cost\": 0.000005\n },\n \"gpt-5.6-terra\": {\n \"input_cost_per_token\": 0.000002,\n \"output_cost_per_token\": 0.000012,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 2e-7,\n \"cache_creation_input_token_cost\": 0.0000025\n },\n \"gpt-6-astra\": {\n \"input_cost_per_token\": 0.00001,\n \"output_cost_per_token\": 0.00005,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 0.000001,\n \"cache_creation_input_token_cost\": 0.0000125\n },\n \"gpt-audio\": {\n \"input_cost_per_token\": 0.0000025,\n \"output_cost_per_token\": 0.00001,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"gpt-audio-1.5\": {\n \"input_cost_per_token\": 0.0000025,\n \"output_cost_per_token\": 0.00001,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"gpt-audio-2025-08-28\": {\n \"input_cost_per_token\": 0.0000025,\n \"output_cost_per_token\": 0.00001,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"gpt-audio-mini\": {\n \"input_cost_per_token\": 6e-7,\n \"output_cost_per_token\": 0.0000024,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"gpt-audio-mini-2025-10-06\": {\n \"input_cost_per_token\": 6e-7,\n \"output_cost_per_token\": 0.0000024,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"gpt-audio-mini-2025-12-15\": {\n \"input_cost_per_token\": 6e-7,\n \"output_cost_per_token\": 0.0000024,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\"\n },\n \"llama-3.1-8b-instant\": {\n \"input_cost_per_token\": 5e-8,\n \"output_cost_per_token\": 8e-8,\n \"litellm_provider\": \"groq\",\n \"mode\": \"chat\"\n },\n \"llama-3.3-70b-versatile\": {\n \"input_cost_per_token\": 5.9e-7,\n \"output_cost_per_token\": 7.9e-7,\n \"litellm_provider\": \"groq\",\n \"mode\": \"chat\"\n },\n \"meta-llama/llama-4-scout-17b-16e-instruct\": {\n \"input_cost_per_token\": 1.1e-7,\n \"output_cost_per_token\": 3.4e-7,\n \"litellm_provider\": \"groq\",\n \"mode\": \"chat\"\n },\n \"o1\": {\n \"input_cost_per_token\": 0.000015,\n \"output_cost_per_token\": 0.00006,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 0.0000075\n },\n \"o1-2024-12-17\": {\n \"input_cost_per_token\": 0.000015,\n \"output_cost_per_token\": 0.00006,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 0.0000075\n },\n \"o3\": {\n \"input_cost_per_token\": 0.000002,\n \"output_cost_per_token\": 0.000008,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 5e-7\n },\n \"o3-2025-04-16\": {\n \"input_cost_per_token\": 0.000002,\n \"output_cost_per_token\": 0.000008,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 5e-7\n },\n \"o3-mini\": {\n \"input_cost_per_token\": 0.0000011,\n \"output_cost_per_token\": 0.0000044,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 5.5e-7\n },\n \"o3-mini-2025-01-31\": {\n \"input_cost_per_token\": 0.0000011,\n \"output_cost_per_token\": 0.0000044,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 5.5e-7\n },\n \"o4-mini\": {\n \"input_cost_per_token\": 0.0000011,\n \"output_cost_per_token\": 0.0000044,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 2.75e-7\n },\n \"o4-mini-2025-04-16\": {\n \"input_cost_per_token\": 0.0000011,\n \"output_cost_per_token\": 0.0000044,\n \"litellm_provider\": \"openai\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 2.75e-7\n },\n \"openai/gpt-oss-120b\": {\n \"input_cost_per_token\": 1.5e-7,\n \"output_cost_per_token\": 6e-7,\n \"litellm_provider\": \"groq\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 7.5e-8\n },\n \"openai/gpt-oss-20b\": {\n \"input_cost_per_token\": 7.5e-8,\n \"output_cost_per_token\": 3e-7,\n \"litellm_provider\": \"groq\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 3.75e-8\n },\n \"openai/gpt-oss-safeguard-20b\": {\n \"input_cost_per_token\": 7.5e-8,\n \"output_cost_per_token\": 3e-7,\n \"litellm_provider\": \"groq\",\n \"mode\": \"chat\",\n \"cache_read_input_token_cost\": 3.7e-8\n },\n \"qwen/qwen3-32b\": {\n \"input_cost_per_token\": 2.9e-7,\n \"output_cost_per_token\": 5.9e-7,\n \"litellm_provider\": \"groq\",\n \"mode\": \"chat\"\n },\n \"text-embedding-3-large\": {\n \"input_cost_per_token\": 1.3e-7,\n \"output_cost_per_token\": 0,\n \"litellm_provider\": \"openai\",\n \"mode\": \"embedding\"\n },\n \"text-embedding-3-small\": {\n \"input_cost_per_token\": 2e-8,\n \"output_cost_per_token\": 0,\n \"litellm_provider\": \"openai\",\n \"mode\": \"embedding\"\n },\n \"text-embedding-ada-002\": {\n \"input_cost_per_token\": 1e-7,\n \"output_cost_per_token\": 0,\n \"litellm_provider\": \"openai\",\n \"mode\": \"embedding\"\n },\n \"text-embedding-ada-002-v2\": {\n \"input_cost_per_token\": 1e-7,\n \"output_cost_per_token\": 0,\n \"litellm_provider\": \"openai\",\n \"mode\": \"embedding\"\n },\n \"__legs__\": {\n \"deepgram-nova-3\": {\n \"mode\": \"stt\",\n \"unit\": \"usd_per_second\",\n \"rate\": 0.0001283333,\n \"provider\": \"deepgram\"\n },\n \"deepgram-nova-3-multilingual\": {\n \"mode\": \"stt\",\n \"unit\": \"usd_per_second\",\n \"rate\": 0.0001533333,\n \"provider\": \"deepgram\"\n },\n \"deepgram-nova-3-base\": {\n \"mode\": \"stt\",\n \"unit\": \"usd_per_second\",\n \"rate\": 0.0002416667,\n \"provider\": \"deepgram\"\n },\n \"assemblyai-universal-streaming\": {\n \"mode\": \"stt\",\n \"unit\": \"usd_per_second\",\n \"rate\": 0.0000416667,\n \"provider\": \"assemblyai\"\n },\n \"elevenlabs-multilingual-v2\": {\n \"mode\": \"tts\",\n \"unit\": \"usd_per_1k_chars\",\n \"rate\": 0.1,\n \"provider\": \"elevenlabs\"\n },\n \"elevenlabs-flash-v2.5\": {\n \"mode\": \"tts\",\n \"unit\": \"usd_per_1k_chars\",\n \"rate\": 0.05,\n \"provider\": \"elevenlabs\"\n },\n \"elevenlabs-turbo-v2.5\": {\n \"mode\": \"tts\",\n \"unit\": \"usd_per_1k_chars\",\n \"rate\": 0.05,\n \"provider\": \"elevenlabs\"\n },\n \"cartesia-sonic\": {\n \"mode\": \"tts\",\n \"unit\": \"usd_per_1k_chars\",\n \"rate\": 0.03,\n \"provider\": \"cartesia\"\n },\n \"cartesia-line\": {\n \"mode\": \"telephony\",\n \"unit\": \"usd_per_minute\",\n \"rate\": 0.06,\n \"provider\": \"cartesia\"\n },\n \"rime-mist-v2\": {\n \"mode\": \"tts\",\n \"unit\": \"usd_per_1k_chars\",\n \"rate\": 0.03,\n \"provider\": \"rime\"\n },\n \"twilio-us-inbound-local\": {\n \"mode\": \"telephony\",\n \"unit\": \"usd_per_minute\",\n \"rate\": 0.0085,\n \"provider\": \"twilio\"\n },\n \"twilio-us-outbound-local\": {\n \"mode\": \"telephony\",\n \"unit\": \"usd_per_minute\",\n \"rate\": 0.014,\n \"provider\": \"twilio\"\n },\n \"twilio-us-sip-inbound\": {\n \"mode\": \"telephony\",\n \"unit\": \"usd_per_minute\",\n \"rate\": 0.004,\n \"provider\": \"twilio\"\n },\n \"twilio-sms-us-outbound\": {\n \"mode\": \"sms\",\n \"unit\": \"usd_per_segment\",\n \"rate\": 0.0083,\n \"provider\": \"twilio\",\n \"source_url\": \"https://www.twilio.com/en-us/sms/pricing/us\",\n \"retrieved_at\": \"2026-09-18\"\n },\n \"twilio-sms-us-inbound\": {\n \"mode\": \"sms\",\n \"unit\": \"usd_per_segment\",\n \"rate\": 0.0083,\n \"provider\": \"twilio\",\n \"source_url\": \"https://www.twilio.com/en-us/sms/pricing/us\",\n \"retrieved_at\": \"2026-09-18\"\n },\n \"telnyx-sms-us-outbound\": {\n \"mode\": \"sms\",\n \"unit\": \"usd_per_segment\",\n \"rate\": 0.004,\n \"provider\": \"telnyx\",\n \"source_url\": \"https://telnyx.com/pricing/messaging\",\n \"retrieved_at\": \"2026-09-18\"\n },\n \"telnyx-sms-us-inbound\": {\n \"mode\": \"sms\",\n \"unit\": \"usd_per_segment\",\n \"rate\": 0.004,\n \"provider\": \"telnyx\",\n \"source_url\": \"https://telnyx.com/pricing/messaging\",\n \"retrieved_at\": \"2026-09-18\"\n },\n \"modal-b300\": {\n \"mode\": \"gpu\",\n \"unit\": \"usd_per_gpu_second\",\n \"rate\": 0.001972,\n \"provider\": \"modal\",\n \"source_url\": \"https://modal.com/pricing\",\n \"retrieved_at\": \"2026-09-18\"\n },\n \"modal-b200\": {\n \"mode\": \"gpu\",\n \"unit\": \"usd_per_gpu_second\",\n \"rate\": 0.001736,\n \"provider\": \"modal\",\n \"source_url\": \"https://modal.com/pricing\",\n \"retrieved_at\": \"2026-09-18\"\n },\n \"modal-h200-sxm\": {\n \"mode\": \"gpu\",\n \"unit\": \"usd_per_gpu_second\",\n \"rate\": 0.001261,\n \"provider\": \"modal\",\n \"source_url\": \"https://modal.com/pricing\",\n \"retrieved_at\": \"2026-09-18\"\n },\n \"modal-h100-sxm5\": {\n \"mode\": \"gpu\",\n \"unit\": \"usd_per_gpu_second\",\n \"rate\": 0.001097,\n \"provider\": \"modal\",\n \"source_url\": \"https://modal.com/pricing\",\n \"retrieved_at\": \"2026-09-18\"\n },\n \"modal-rtx-pro-6000\": {\n \"mode\": \"gpu\",\n \"unit\": \"usd_per_gpu_second\",\n \"rate\": 0.000842,\n \"provider\": \"modal\",\n \"source_url\": \"https://modal.com/pricing\",\n \"retrieved_at\": \"2026-09-18\"\n },\n \"modal-a100-80gb\": {\n \"mode\": \"gpu\",\n \"unit\": \"usd_per_gpu_second\",\n \"rate\": 0.000694,\n \"provider\": \"modal\",\n \"source_url\": \"https://modal.com/pricing\",\n \"retrieved_at\": \"2026-09-18\"\n },\n \"modal-a100-40gb\": {\n \"mode\": \"gpu\",\n \"unit\": \"usd_per_gpu_second\",\n \"rate\": 0.000583,\n \"provider\": \"modal\",\n \"source_url\": \"https://modal.com/pricing\",\n \"retrieved_at\": \"2026-09-18\"\n },\n \"modal-l40s\": {\n \"mode\": \"gpu\",\n \"unit\": \"usd_per_gpu_second\",\n \"rate\": 0.000542,\n \"provider\": \"modal\",\n \"source_url\": \"https://modal.com/pricing\",\n \"retrieved_at\": \"2026-09-18\"\n },\n \"modal-a10\": {\n \"mode\": \"gpu\",\n \"unit\": \"usd_per_gpu_second\",\n \"rate\": 0.000306,\n \"provider\": \"modal\",\n \"source_url\": \"https://modal.com/pricing\",\n \"retrieved_at\": \"2026-09-18\"\n },\n \"modal-l4\": {\n \"mode\": \"gpu\",\n \"unit\": \"usd_per_gpu_second\",\n \"rate\": 0.000222,\n \"provider\": \"modal\",\n \"source_url\": \"https://modal.com/pricing\",\n \"retrieved_at\": \"2026-09-18\"\n },\n \"modal-t4\": {\n \"mode\": \"gpu\",\n \"unit\": \"usd_per_gpu_second\",\n \"rate\": 0.000164,\n \"provider\": \"modal\",\n \"source_url\": \"https://modal.com/pricing\",\n \"retrieved_at\": \"2026-09-18\"\n },\n \"gcp-vision-text-detection\": {\n \"mode\": \"ocr\",\n \"unit\": \"usd_per_page\",\n \"rate\": 0.0015,\n \"provider\": \"gcp\",\n \"source_url\": \"https://cloud.google.com/vision/pricing\",\n \"retrieved_at\": \"2026-09-18\"\n },\n \"gcp-vision-document-text-detection\": {\n \"mode\": \"ocr\",\n \"unit\": \"usd_per_page\",\n \"rate\": 0.0015,\n \"provider\": \"gcp\",\n \"source_url\": \"https://cloud.google.com/vision/pricing\",\n \"retrieved_at\": \"2026-09-18\"\n },\n \"aws-textract-detect-document-text\": {\n \"mode\": \"ocr\",\n \"unit\": \"usd_per_page\",\n \"rate\": 0.0015,\n \"provider\": \"aws\",\n \"source_url\": \"https://aws.amazon.com/textract/pricing/\",\n \"retrieved_at\": \"2026-09-18\"\n },\n \"aws-textract-analyze-forms\": {\n \"mode\": \"ocr\",\n \"unit\": \"usd_per_page\",\n \"rate\": 0.05,\n \"provider\": \"aws\",\n \"source_url\": \"https://aws.amazon.com/textract/pricing/\",\n \"retrieved_at\": \"2026-09-18\"\n },\n \"aws-textract-analyze-tables\": {\n \"mode\": \"ocr\",\n \"unit\": \"usd_per_page\",\n \"rate\": 0.015,\n \"provider\": \"aws\",\n \"source_url\": \"https://aws.amazon.com/textract/pricing/\",\n \"retrieved_at\": \"2026-09-18\"\n },\n \"tavus-cvi-starter\": {\n \"mode\": \"avatar\",\n \"unit\": \"usd_per_minute\",\n \"rate\": 0.37,\n \"provider\": \"tavus\",\n \"source_url\": \"https://www.tavus.io/pricing\",\n \"retrieved_at\": \"2026-09-18\"\n },\n \"gcp-vision-text-detection-high-volume\": {\n \"mode\": \"ocr\",\n \"unit\": \"usd_per_page\",\n \"rate\": 0.0006,\n \"provider\": \"gcp\",\n \"source_url\": \"https://cloud.google.com/vision/pricing\",\n \"retrieved_at\": \"2026-09-18\"\n },\n \"gcp-vision-document-text-detection-high-volume\": {\n \"mode\": \"ocr\",\n \"unit\": \"usd_per_page\",\n \"rate\": 0.0006,\n \"provider\": \"gcp\",\n \"source_url\": \"https://cloud.google.com/vision/pricing\",\n \"retrieved_at\": \"2026-09-18\"\n },\n \"aws-textract-detect-document-text-high-volume\": {\n \"mode\": \"ocr\",\n \"unit\": \"usd_per_page\",\n \"rate\": 0.0006,\n \"provider\": \"aws\",\n \"source_url\": \"https://aws.amazon.com/textract/pricing/\",\n \"retrieved_at\": \"2026-09-18\"\n },\n \"tavus-cvi-growth\": {\n \"mode\": \"avatar\",\n \"unit\": \"usd_per_minute\",\n \"rate\": 0.32,\n \"provider\": \"tavus\",\n \"source_url\": \"https://www.tavus.io/pricing\",\n \"retrieved_at\": \"2026-09-18\"\n },\n \"tavus-cvi-business\": {\n \"mode\": \"avatar\",\n \"unit\": \"usd_per_minute\",\n \"rate\": 0.26,\n \"provider\": \"tavus\",\n \"source_url\": \"https://www.tavus.io/pricing\",\n \"retrieved_at\": \"2026-09-18\"\n }\n }\n}\n","/**\n * The per-unit leg vocabulary: which legs exist, and the one unit each bills in.\n *\n * Deliberately dependency-free. This module imports nothing from the rest of the\n * package, which is the whole point: both the PRICING path (`voice-pricing.ts`)\n * and the VALIDATION path (`rate-card.ts`) need this table, and `rate-card`\n * cannot import `voice-pricing` because `voice-pricing` imports `rate-card`.\n *\n * That cycle is why the rate-card loader originally checked only that `mode` was\n * a non-empty string — and that gap recreated the exact failure the rate card\n * exists to prevent. A typo'd `\"orc\"` passed validation, then resolved as a\n * different leg from `\"ocr\"`, so a lookup for a key that ALSO exists in the\n * bundled map silently fell through to the public list price. The user declared\n * a rate, the guard used someone else's number, and nothing said a word.\n *\n * One table, imported by both sides, cannot drift from itself.\n *\n * Port of `src/floe_guard/leg_units.py`.\n */\n\n/**\n * The legs the bundled map can price per unit. Named for the leg rather than for\n * voice — the mechanism is not voice-specific.\n *\n * The bar for adding a member: it arrives WITH a unit below, an arm in\n * `voiceLegCost`, and sourced entries in the cost map. A mode with no unit fails\n * closed on every call, which is worse than not having the mode at all.\n */\nexport type LegMode = \"stt\" | \"tts\" | \"telephony\" | \"sms\" | \"ocr\" | \"gpu\" | \"avatar\";\n\n/**\n * The one unit each leg is billed in. An entry whose `unit` disagrees with its\n * leg is a schema mismatch and fails closed — a Deepgram $/min figure stored\n * without the ÷60 conversion would over-bill 60x if it were silently accepted.\n * The same trap applies to the P1.11 legs: OCR vendors quote per 1,000 pages and\n * GPU vendors quote per hour, so both are converted at curation time and stored\n * in the canonical per-unit form.\n */\nexport const unitForMode: Record<LegMode, string> = {\n stt: \"usd_per_second\",\n tts: \"usd_per_1k_chars\",\n telephony: \"usd_per_minute\",\n sms: \"usd_per_segment\",\n ocr: \"usd_per_page\",\n gpu: \"usd_per_gpu_second\",\n avatar: \"usd_per_minute\",\n};\n\n/** Every legal mode, for validation and error messages. */\nexport const LEG_MODES: readonly string[] = Object.keys(unitForMode);\n","/**\n * User-supplied rate card — the rates YOU actually pay.\n *\n * The bundled cost map is a snapshot of each vendor's PUBLIC LIST price. Almost\n * nobody pays list: volume tiers, negotiated contracts, committed-spend\n * discounts, carrier passthrough fees and plan minimums all move the real\n * number. A COGS tool that reports list prices as if they were your costs is\n * guessing, so the map is a starting point the user confirms or replaces — never\n * an assertion about a bill.\n *\n * Resolution order (see `voice-pricing.ts`):\n *\n * per-call override -> rate card -> bundled cost map -> UnpriceableLegError\n *\n * A rate card can both OVERRIDE a bundled vendor and ADD one the map has never\n * heard of, which is how vendors that publish no usable figure (Mistral OCR,\n * Azure Document Intelligence, HeyGen, Simli, Beyond Presence) get priced.\n *\n * Entries use the same schema as the bundled `__legs__` section:\n *\n * { \"acme-ocr\": { \"mode\": \"ocr\", \"unit\": \"usd_per_page\", \"rate\": 0.0009 } }\n *\n * `confirmed` is the difference between a number someone checked and a number we\n * guessed. Bundled rates resolve as `confirmed: false` (list price, unverified);\n * rate-card rates default to `confirmed: true` because you typed them.\n *\n * DIFFERENCE FROM THE PYTHON PACKAGE: `FLOE_RATE_CARD` here holds inline JSON,\n * not a file path. This package must work in runtimes with no filesystem, and\n * reading a file would force `node:fs` and make rate resolution async — which\n * would turn every synchronous pricing call in the SDK inside out. Pass an\n * object to {@link setRateCard} for anything more elaborate.\n */\n\nimport { LEG_MODES, unitForMode } from \"./leg-units.js\";\n\n/** Environment variable holding rate-card JSON (inline, not a path). */\nexport const RATE_CARD_ENV = \"FLOE_RATE_CARD\";\n\n/** One user-declared rate. Mirrors the bundled `__legs__` entry schema. */\nexport interface RateCardEntry {\n mode: string;\n unit: string;\n rate: number;\n provider?: string;\n source_url?: string;\n retrieved_at?: string;\n confirmed?: boolean;\n}\n\n// The only keys an entry may carry. An unknown key is rejected rather than\n// ignored: a typo'd \"price\" would otherwise leave the real rate undefined and\n// silently fall through to a list price.\nconst ALLOWED_ENTRY_KEYS = new Set([\n \"mode\",\n \"unit\",\n \"rate\",\n \"provider\",\n \"source_url\",\n \"retrieved_at\",\n \"confirmed\",\n]);\nconst REQUIRED_ENTRY_KEYS = [\"mode\", \"unit\", \"rate\"] as const;\n\nlet RATE_CARD: Record<string, RateCardEntry> = {};\n\nfunction envValue(name: string): string | undefined {\n // The package compiles with `types: []` (no @types/node), so `process` is not\n // globally typed and may not exist at all in a browser.\n const p = (globalThis as { process?: { env?: Record<string, string | undefined> } }).process;\n return p?.env?.[name];\n}\n\n/**\n * Reject a malformed entry loudly — shape, mode, AND mode/unit consistency.\n *\n * The mode check is the load-bearing one. `mode` was once validated only as a\n * non-empty string, which let a typo like `\"orc\"` through: it then resolved as a\n * different leg from `\"ocr\"`, so a lookup for a key that ALSO exists in the\n * bundled map silently fell through to the public list price. You declared a\n * rate, the guard used someone else's number, and nothing said a word — the\n * precise failure this module exists to prevent. Both the table and the units\n * come from `leg-units.ts` so this validator cannot drift from the pricing path\n * that consumes it.\n */\nfunction validateEntry(key: string, entry: unknown): asserts entry is RateCardEntry {\n if (typeof entry !== \"object\" || entry === null || Array.isArray(entry)) {\n throw new TypeError(`Rate card entry '${key}' must be an object.`);\n }\n const e = entry as Record<string, unknown>;\n const extra = Object.keys(e)\n .filter((k) => !ALLOWED_ENTRY_KEYS.has(k))\n .sort();\n if (extra.length) {\n throw new TypeError(\n `Rate card entry '${key}' has unknown field(s): ${extra.join(\", \")}. ` +\n `Allowed: ${[...ALLOWED_ENTRY_KEYS].sort().join(\", \")}.`,\n );\n }\n const missing = REQUIRED_ENTRY_KEYS.filter((k) => !(k in e));\n if (missing.length) {\n throw new TypeError(`Rate card entry '${key}' is missing required field(s): ${missing.join(\", \")}.`);\n }\n for (const field of [\"mode\", \"unit\"] as const) {\n if (typeof e[field] !== \"string\" || !e[field]) {\n throw new TypeError(`Rate card entry '${key}': ${field} must be a non-empty string.`);\n }\n }\n const mode = e.mode as string;\n if (!LEG_MODES.includes(mode)) {\n throw new TypeError(\n `Rate card entry '${key}': unknown mode '${mode}'. ` +\n `Expected one of: ${[...LEG_MODES].sort().join(\", \")}.`,\n );\n }\n const expectedUnit = unitForMode[mode as keyof typeof unitForMode];\n if (e.unit !== expectedUnit) {\n throw new TypeError(\n `Rate card entry '${key}': a '${mode}' leg bills in '${expectedUnit}', got ` +\n `'${String(e.unit)}'. The unit is not a label — pricing multiplies by it, so ` +\n `the wrong one mis-bills by whatever the conversion factor is.`,\n );\n }\n const rate = e.rate;\n if (typeof rate !== \"number\" || !Number.isFinite(rate) || rate < 0) {\n throw new RangeError(\n `Rate card entry '${key}': rate must be a finite, non-negative number, got ${String(rate)}.`,\n );\n }\n if (\"confirmed\" in e && typeof e.confirmed !== \"boolean\") {\n throw new TypeError(`Rate card entry '${key}': confirmed must be true or false.`);\n }\n for (const field of [\"provider\", \"source_url\", \"retrieved_at\"] as const) {\n if (field in e && typeof e[field] !== \"string\") {\n throw new TypeError(`Rate card entry '${key}': ${field} must be a string.`);\n }\n }\n}\n\n/**\n * Read and validate a rate card from an object or from JSON text. When omitted,\n * `$FLOE_RATE_CARD` is consulted; unset yields an empty card (the zero-config\n * default). Throws on unreadable or malformed input — deliberately loud, because\n * silently falling back to list prices produces confident, wrong COGS.\n */\nexport function loadRateCard(source?: unknown): Record<string, RateCardEntry> {\n let input = source;\n if (input === undefined || input === null) {\n const fromEnv = envValue(RATE_CARD_ENV);\n if (!fromEnv) return {};\n input = fromEnv;\n }\n let raw: unknown;\n if (typeof input === \"string\") {\n try {\n raw = JSON.parse(input);\n } catch (e) {\n throw new TypeError(\n `Rate card is not valid JSON: ${(e as Error).message}. ` +\n `${RATE_CARD_ENV} holds inline JSON in this package, not a file path.`,\n );\n }\n } else {\n raw = input;\n }\n if (typeof raw !== \"object\" || raw === null || Array.isArray(raw)) {\n throw new TypeError(\"Rate card must be a JSON object mapping vendor keys to entries.\");\n }\n const out: Record<string, RateCardEntry> = {};\n for (const [key, entry] of Object.entries(raw as Record<string, unknown>)) {\n validateEntry(key, entry);\n // Copy the ENTRY, not just the outer object: retaining the caller's nested\n // object would leave them holding the same thing the guard prices from, so a\n // later `card.acme.rate = 0` would change a validated rate with no validation.\n out[key] = { ...entry };\n }\n return out;\n}\n\n/**\n * Freeze a validated card so mutating what you read cannot re-price a leg.\n *\n * Frozen rather than copy-on-read on purpose: {@link currentRateCard} is called\n * on EVERY priced leg, so copying there would put an O(entries) allocation in the\n * hot path. `Object.freeze` gives the same protection for free.\n */\nfunction freeze(card: Record<string, RateCardEntry>): Record<string, RateCardEntry> {\n for (const entry of Object.values(card)) Object.freeze(entry);\n return Object.freeze(card);\n}\n\n/**\n * Install a rate card for this process and return a frozen view of it. `{}`\n * clears it. The installed card is a copy, so mutating whatever you passed in\n * afterwards cannot change what the guard prices from.\n */\nexport function setRateCard(source?: unknown): Record<string, RateCardEntry> {\n RATE_CARD = freeze(loadRateCard(source));\n return RATE_CARD;\n}\n\n/** The rate card in force, frozen. Empty when none is configured. */\nexport function currentRateCard(): Record<string, RateCardEntry> {\n return RATE_CARD;\n}\n\n// Load once at module init so `FLOE_RATE_CARD=... node agent.js` needs no code\n// change. A broken card throws here rather than at the first priced leg, which\n// is the difference between a startup failure and a wrong invoice.\nRATE_CARD = freeze(loadRateCard());\n","/**\n * Offline pricing for per-unit legs from the vendored map.\n *\n * The per-unit twin of `pricing.ts`. The token cost map is per-token; these legs\n * are billed in anything but tokens — per second (STT), per 1k chars (TTS), per\n * minute (telephony, avatar), per segment (SMS), per page (OCR) and per\n * GPU-second (GPU) — so their rates live under the reserved `\"__legs__\"` key of\n * `cost_map.json` with their own schema:\n *\n * \"deepgram-nova-3\": {\n * \"mode\": \"stt\", // discriminator: see LegMode\n * \"unit\": \"usd_per_second\", // explicit unit — a mismatch fails closed\n * \"rate\": 0.0001283333, // USD in that unit\n * \"provider\": \"deepgram\"\n * }\n *\n * The section was called `\"__voice__\"` until P1.11. The mechanism was never\n * voice-specific, and once it grew SMS, OCR, GPU and avatar rates the old name\n * was actively misleading — so it is now `\"__legs__\"`. The loader reads the new\n * name first and falls back to the old one, which is what makes the rename\n * non-breaking for a `cost_map.json` generated before it.\n *\n * The line between this map and the token map is the BILLING UNIT, not the\n * modality: per-token spend lives in the flat model map, per-anything-else lives\n * here. LLM inference is therefore NOT a leg, while a rented GPU-second is.\n *\n * Same fail-closed contract as token pricing: a vendor absent from the map (or an\n * entry whose `unit`/`mode` does not match the leg it is asked to price) is\n * unpriceable — {@link lookupVoiceRate} returns `null` and the adapter throws\n * {@link UnpriceableVoiceError} rather than silently metering the leg at $0. Pass a\n * per-unit override to enforce a leg the map cannot price.\n *\n * No network. The rates are a **drift-prone snapshot** of each vendor's public\n * list price — refresh them (`scripts/update-cost-map.mjs`, which names the\n * source URL and retrieval date for every entry) like the token map, or\n * estimates drift as vendors change prices. Telephony and SMS are **US-only in\n * v1**, and several rates are volume- or region-tiered: the map vendors the\n * DEAREST public tier, because over-pricing a spend guard stops one call early\n * while under-pricing lets a crossing call through.\n *\n * This is a faithful port of `src/floe_guard/voice_pricing.py`.\n */\n\nimport costMapJson from \"./cost_map.json\";\nimport { UnpriceableVoiceError } from \"./errors.js\";\nimport { LEG_MODES, unitForMode, type LegMode } from \"./leg-units.js\";\nimport { currentRateCard } from \"./rate-card.js\";\n\n/**\n * The legs the bundled map can price per unit.\n *\n * Named for the leg rather than for voice — the pricing mechanism is not\n * voice-specific — but the MEMBERS are deliberately unchanged: each one needs a\n * unit in `unitForMode` and an entry shape in the cost map, so widening this is\n * a pricing change, not a rename. {@link VoiceMode} remains as a deprecated\n * alias.\n */\nexport type { LegMode };\n\n/**\n * Deprecated alias for {@link LegMode}. Prefer the leg-shaped name. It now spans\n * legs that are not voice at all; the name is kept only for compatibility.\n */\nexport type VoiceMode = LegMode;\n\ninterface VoiceMapEntry {\n mode?: unknown;\n unit?: unknown;\n rate?: unknown;\n provider?: unknown;\n // Provenance, present only on rates curated with a citation (P1.11 onward).\n // Absent means UNVERIFIED — see VoiceRate.\n source_url?: unknown;\n retrieved_at?: unknown;\n confirmed?: unknown;\n}\n\n/**\n * The vendored per-unit leg rates — the reserved `\"__legs__\"` section of the\n * cost map.\n *\n * Renamed from `\"__voice__\"` in P1.11, when the section grew SMS, OCR, GPU and\n * avatar rates and the old name became actively misleading. Reading new-name\n * first and old-name second is what makes the rename non-breaking: a\n * cost_map.json generated before the rename still resolves, so an older vendored\n * map (or a user's pinned copy) keeps working untouched.\n */\nconst rawCostMap = costMapJson as Record<string, unknown>;\nconst VOICE_MAP = (rawCostMap[\"__legs__\"] ?? rawCostMap[\"__voice__\"] ?? {}) as Record<\n string,\n VoiceMapEntry\n>;\n\n// Re-exported from leg-units, which owns the table. It lives there so the\n// rate-card validator can check mode/unit consistency without importing this\n// module, which imports IT. See leg-units for why that cycle mattered.\nexport { unitForMode, LEG_MODES };\n\n/**\n * A resolved per-unit leg rate plus where it came from.\n *\n * The provenance fields are the difference between a number and an auditable\n * number. A COGS figure built on an unverified list price should be presentable\n * as exactly that — \"$1.50/1k pages, Google's list page, read 2026-09-18, not\n * yet confirmed by you\" — so a console can ask for confirmation instead of\n * quietly reporting a guess as a cost.\n */\nexport interface VoiceRate {\n mode: string;\n unit: string;\n rate: number;\n /**\n * Where the number came from, cheapest-trust first: `cost_map` (public list\n * price) < `rate_card` (you declared it) < `override` (passed at the call\n * site). A later vendor-invoice read supersedes all of them at reconcile time,\n * and the gap between the estimate and that actual is the variance signal.\n */\n source: \"override\" | \"rate_card\" | \"cost_map\";\n provider?: string;\n /**\n * Public price-list URL and the date it was read. Present only on rates\n * curated with a citation; absent means UNVERIFIED and should be shown as such\n * rather than rendered as a blank.\n */\n source_url?: string;\n retrieved_at?: string;\n /**\n * Has a human accepted this number as what they actually pay? Bundled list\n * prices are `false` until confirmed; a rate you declared is `true`.\n */\n confirmed: boolean;\n}\n\nfunction finiteNonNegative(value: unknown): value is number {\n // typeof excludes booleans (Python's _finite_non_negative excludes bool too).\n return typeof value === \"number\" && Number.isFinite(value) && value >= 0;\n}\n\n/**\n * Resolve a voice vendor to its per-unit rate, or `null` if unpriceable.\n *\n * The pure resolver (the voice twin of {@link resolvePrice}): it never throws.\n * Fail-closed on every mismatch — a missing vendor, an entry whose `mode` is not\n * `mode`, an entry whose `unit` is not the canonical unit for `mode`, or a\n * non-finite/negative rate — so a schema slip can never surface as a silent,\n * valid-looking price.\n */\nexport function lookupVoiceRate(model: string | null | undefined, mode: VoiceMode): number | null {\n const found = lookupLegEntry(model, mode);\n return found === null ? null : (found.entry.rate as number);\n}\n\n/** Fail-closed on every mismatch: wrong mode, wrong unit, or a bad rate. */\nfunction entryIsUsable(entry: unknown, mode: VoiceMode): entry is VoiceMapEntry {\n if (typeof entry !== \"object\" || entry === null) return false;\n const e = entry as VoiceMapEntry;\n if (e.mode !== mode) return false;\n if (e.unit !== unitForMode[mode]) return false;\n return finiteNonNegative(e.rate);\n}\n\n/**\n * The entry that prices this leg and which source it came from.\n *\n * Rate card first, bundled map second — your negotiated rate beats a list price.\n *\n * One deliberate asymmetry: if the rate card declares this exact vendor AND this\n * exact leg but the declaration is broken (wrong unit, bad rate), this returns\n * `null` instead of falling through to the bundled price. You said what this leg\n * costs you; silently substituting a list price you never chose would be a\n * confident wrong number, which is the failure this module exists to prevent. A\n * card entry for a DIFFERENT mode is not a declaration about this leg, so that\n * falls through normally.\n */\nfunction lookupLegEntry(\n model: string | null | undefined,\n mode: VoiceMode,\n): { entry: VoiceMapEntry; source: \"rate_card\" | \"cost_map\" } | null {\n if (model === null || model === undefined) return null;\n const card = currentRateCard();\n const declared = Object.prototype.hasOwnProperty.call(card, model) ? card[model] : undefined;\n if (declared && declared.mode === mode) {\n return entryIsUsable(declared, mode) ? { entry: declared, source: \"rate_card\" } : null;\n }\n const entry = Object.prototype.hasOwnProperty.call(VOICE_MAP, model)\n ? VOICE_MAP[model]\n : undefined;\n if (entryIsUsable(entry, mode)) return { entry, source: \"cost_map\" };\n return null;\n}\n\n/**\n * Resolve a leg's per-unit rate, fail-closed. An `override` wins over the map.\n *\n * Throws {@link UnpriceableVoiceError} when neither an override nor the bundled\n * map can price the leg — the guard refuses to meter spend it cannot measure.\n */\nexport function resolveVoiceRate(\n model: string | null | undefined,\n mode: VoiceMode,\n override?: number | null,\n): VoiceRate {\n if (override !== undefined && override !== null) {\n if (!finiteNonNegative(override)) {\n throw new RangeError(\n `voice ${mode} override must be a finite, non-negative number, got ${override}`,\n );\n }\n // Passed at the call site by a human who knows what this leg costs, so it is\n // confirmed by construction.\n return {\n mode,\n unit: unitForMode[mode],\n rate: override,\n source: \"override\",\n confirmed: true,\n };\n }\n const found = lookupLegEntry(model, mode);\n if (found === null) throw new UnpriceableVoiceError(model ?? null, mode);\n const { entry, source } = found;\n const str = (v: unknown): string | undefined => (typeof v === \"string\" ? v : undefined);\n return {\n mode,\n unit: unitForMode[mode],\n rate: entry.rate as number,\n source,\n ...(str(entry.provider) !== undefined ? { provider: str(entry.provider) } : {}),\n ...(str(entry.source_url) !== undefined ? { source_url: str(entry.source_url) } : {}),\n ...(str(entry.retrieved_at) !== undefined ? { retrieved_at: str(entry.retrieved_at) } : {}),\n // A declared rate is confirmed unless the card says otherwise (an imported or\n // draft card can mark entries unconfirmed); a bundled list price is\n // UNCONFIRMED until a human accepts it.\n confirmed: typeof entry.confirmed === \"boolean\" ? entry.confirmed : source === \"rate_card\",\n };\n}\n\n/**\n * USD for one leg. `quantity` is seconds (stt), characters (tts), or minutes\n * (telephony); negative quantities clamp to zero.\n */\nexport function voiceLegCost(mode: VoiceMode, quantity: number, rate: number): number {\n // Reject non-finite quantities: Math.max(0, NaN) is NaN, so a NaN/Infinity\n // quantity would return a non-finite USD amount that then poisons the guard's\n // running total (NaN disables every ceiling comparison). Negatives still clamp.\n if (!Number.isFinite(quantity)) {\n throw new RangeError(`voice ${mode} quantity must be a finite number, got ${quantity}`);\n }\n const q = Math.max(0, quantity);\n // Every mode except tts is a plain quantity * rate; the unit is what differs,\n // and the unit was already checked when the rate was resolved. tts is the one\n // arm with arithmetic, because its rate is quoted per 1000 chars.\n if (\n mode === \"stt\" || // seconds * $/second\n mode === \"telephony\" || // minutes * $/minute\n mode === \"sms\" || // segments * $/segment\n mode === \"ocr\" || // pages * $/page\n mode === \"gpu\" || // gpu-seconds * $/gpu-second\n mode === \"avatar\" // minutes * $/minute\n ) {\n return q * rate;\n }\n if (mode === \"tts\") return (q / 1000) * rate; // chars / 1000 * $/1k-chars\n throw new RangeError(`unknown voice mode ${mode}`);\n}\n\n/**\n * USD for one voice leg, or `null` when the leg is unconfigured (skip it).\n *\n * The single entry point the adapters use. A leg with neither a vendor (`model`)\n * nor an `override` is unconfigured — return `null` so the token-only contract is\n * preserved and nothing is metered. A leg that *is* configured but cannot be\n * priced throws {@link UnpriceableVoiceError} (via {@link resolveVoiceRate}) rather\n * than accruing a silent $0.\n */\nexport function priceVoiceLeg(\n mode: VoiceMode,\n quantity: number,\n options: { model?: string | null; override?: number | null } = {},\n): number | null {\n const model = options.model ?? null;\n const override = options.override ?? null;\n if (model === null && override === null) return null;\n const resolved = resolveVoiceRate(model, mode, override);\n return voiceLegCost(mode, quantity, resolved.rate);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACWO,IAAM,iBAAN,cAA6B,MAAM;AAAA,EACxC,YAAY,SAAiB;AAC3B,UAAM,OAAO;AACb,SAAK,OAAO;AACZ,WAAO,eAAe,MAAM,WAAW,SAAS;AAAA,EAClD;AACF;AAQO,IAAM,iBAAN,cAA6B,eAAe;AAAA,EACxC;AAAA,EACA;AAAA,EAET,YAAY,UAAkB,UAAkB,SAAkB;AAGhE;AAAA,MACE,WACE,+CAA0C,SAAS,QAAQ,CAAC,CAAC,QAAQ,SAAS,QAAQ,CAAC,CAAC;AAAA,IAC5F;AACA,SAAK,OAAO;AACZ,SAAK,WAAW;AAChB,SAAK,WAAW;AAAA,EAClB;AACF;AAyEO,IAAM,sBAAN,cAAkC,eAAe;AAAA,EAC7C;AAAA,EACA;AAAA,EAET,YAAY,QAAuB,MAAc;AAE/C,UAAM,QAAQ,WAAW,OAAO,SAAS,IAAI,MAAM;AACnD;AAAA,MACE,gBAAgB,IAAI,WAAW,KAAK,gKAEgB,IAAI;AAAA,IAI1D;AAIA,SAAK,OAAO;AACZ,SAAK,SAAS;AACd,SAAK,OAAO;AAAA,EACd;AACF;;;AC9FO,SAAS,gBACd,OACA,UAAyC,CAAC,GACjC;AAIT,QAAM,mBAAmB,QAAQ,qBAAqB,SAAY,IAAI,QAAQ;AAC9E,MAAI,CAAC,OAAO,SAAS,gBAAgB,KAAK,mBAAmB,GAAG;AAC9D,UAAM,IAAI;AAAA,MACR,+DAA+D,gBAAgB;AAAA,IACjF;AAAA,EACF;AACA,QAAM,eAAe,MAAM;AAC3B,SAAO,gBAAgB,KAAK,eAAe;AAC7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