llmbrake 0.2.0 → 0.2.1

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/dist/prices.d.ts CHANGED
@@ -1,11 +1,12 @@
1
1
  /**
2
2
  * Default price table, USD per 1M tokens, standard (non-batch, short-context) tier.
3
3
  *
4
- * ⚠️ NEEDS VERIFICATION before production use. Provider prices change often.
5
- * Values were read on 2026-10-09 from:
4
+ * Provider prices change often; check them before relying on a cap in production.
5
+ * Values were last checked on 2026-10-17 against:
6
6
  * - OpenAI: https://developers.openai.com/api/docs/pricing
7
7
  * - Anthropic: https://docs.anthropic.com/en/docs/about-claude/pricing
8
- * Anthropic model IDs below are illustrative; confirm the exact IDs your endpoint accepts.
8
+ * Anthropic IDs for the current generation were checked against the models overview page (2026-10-17).
9
+ * Claude Haiku 5.5 is priced at its prompts-up-to-100K tier.
9
10
  * Long-context, batch, regional/data-residency uplifts and fast/priority tiers are NOT modeled.
10
11
  * Override or extend via `createGuard({ prices: { ...DEFAULT_PRICES, ...yours } })`.
11
12
  */
package/dist/prices.js CHANGED
@@ -1,14 +1,23 @@
1
- const OPENAI = "https://developers.openai.com/api/docs/pricing (read 2026-10-09, verify)";
2
- const ANTHROPIC = "https://docs.anthropic.com/en/docs/about-claude/pricing (read 2026-10-09, verify)";
1
+ const OPENAI = "https://developers.openai.com/api/docs/pricing (checked 2026-10-17, verify for production)";
2
+ const ANTHROPIC = "https://docs.anthropic.com/en/docs/about-claude/pricing (checked 2026-10-17, verify for production)";
3
3
  export const DEFAULT_PRICES = {
4
+ "gpt-6-astra": { inputPerMTok: 10.0, cachedInputPerMTok: 1.0, outputPerMTok: 50.0, source: OPENAI },
5
+ "gpt-6-sol": { inputPerMTok: 2.0, cachedInputPerMTok: 0.2, outputPerMTok: 10.0, source: OPENAI },
4
6
  "gpt-6.1-sol": { inputPerMTok: 2.0, cachedInputPerMTok: 0.1, outputPerMTok: 10.0, source: OPENAI },
5
7
  "gpt-6-luna": { inputPerMTok: 0.1, cachedInputPerMTok: 0.01, outputPerMTok: 0.5, source: OPENAI },
8
+ "gpt-5.6-sol": { inputPerMTok: 4.0, cachedInputPerMTok: 0.4, outputPerMTok: 20.0, source: OPENAI },
9
+ "gpt-5.6-terra": { inputPerMTok: 2.0, cachedInputPerMTok: 0.2, outputPerMTok: 12.0, source: OPENAI },
10
+ "gpt-5.6-luna": { inputPerMTok: 0.2, cachedInputPerMTok: 0.02, outputPerMTok: 1.2, source: OPENAI },
6
11
  "gpt-5.5": { inputPerMTok: 5.0, cachedInputPerMTok: 0.5, outputPerMTok: 30.0, source: OPENAI },
7
12
  "gpt-5.4": { inputPerMTok: 2.5, cachedInputPerMTok: 0.25, outputPerMTok: 15.0, source: OPENAI },
8
13
  "gpt-5.4-mini": { inputPerMTok: 0.75, cachedInputPerMTok: 0.075, outputPerMTok: 4.5, source: OPENAI },
9
14
  "gpt-5.4-nano": { inputPerMTok: 0.2, cachedInputPerMTok: 0.02, outputPerMTok: 1.25, source: OPENAI },
10
15
  "gpt-4.1-mini": { inputPerMTok: 0.4, cachedInputPerMTok: 0.1, outputPerMTok: 1.6, source: OPENAI },
11
16
  "gpt-4o-mini": { inputPerMTok: 0.15, cachedInputPerMTok: 0.075, outputPerMTok: 0.6, source: OPENAI },
17
+ "claude-fable-5-1": { inputPerMTok: 10.0, cachedInputPerMTok: 0.25, outputPerMTok: 50.0, source: ANTHROPIC },
18
+ "claude-opus-5-5": { inputPerMTok: 4.0, cachedInputPerMTok: 0.2, outputPerMTok: 20.0, source: ANTHROPIC },
19
+ "claude-sonnet-5-5": { inputPerMTok: 2.0, cachedInputPerMTok: 0.1, outputPerMTok: 10.0, source: ANTHROPIC },
20
+ "claude-haiku-5-5": { inputPerMTok: 0.1, cachedInputPerMTok: 0.01, outputPerMTok: 0.5, source: ANTHROPIC },
12
21
  "claude-opus-4-8": { inputPerMTok: 5.0, cachedInputPerMTok: 0.5, outputPerMTok: 25.0, source: ANTHROPIC },
13
22
  "claude-sonnet-5": { inputPerMTok: 2.0, cachedInputPerMTok: 0.2, outputPerMTok: 10.0, source: ANTHROPIC },
14
23
  "claude-haiku-4-5": { inputPerMTok: 1.0, cachedInputPerMTok: 0.1, outputPerMTok: 5.0, source: ANTHROPIC },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "llmbrake",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Per-customer monthly USD budgets for OpenAI-compatible chat calls: track cost, auto-downgrade near the cap, block at the cap.",
5
5
  "license": "MIT",
6
6
  "author": "LLMBrake contributors",