canonicalLookup (core/model-pricing.ts)

inbrain · src/core/model-pricing.ts · typescript · MIT
ai

Central table of paid cloud model pricing for various providers, used across the codebase.

// Source: https://github.com/inbrainfun/inbrain | License: MIT | Copyright 2026 Inbrain Contributors
// Provided via justclaw.it.com; keep this notice with the code.
/**
 * model-pricing.ts — single source of truth for paid cloud CHAT/completion
 * model pricing (USD per 1M tokens, input | output).
 *
 * Every chat-pricing site in the codebase derives its numbers from this table:
 *   - anthropic-pricing.ts          (bare-keyed Anthropic view + estimateMaxCostUsd)
 *   - takes-quality-eval/pricing.ts (curated fail-closed allowlist)
 *   - eval-contradictions/cost-tracker.ts (silent-Haiku-fallback view)
 *   - cross-modal-eval/runner.ts    (multi-provider eval panel)
 *   - skillopt/preflight.ts         (Sonnet-fallback warn-only estimate)
 * The bare-keyed `ANTHROPIC_PRICING` view is itse

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key