跳转至

apogee-ai-cost

Cost-aware router that picks the cheapest model meeting a quality bar.

This page is being expanded

The tables below are generated from the package source, so they are accurate. Narrative guides and worked examples are being written module by module.

Public API

Everything below is exported from the package root, so from apogee_ai_cost import X works for each name.

Layer Symbols
Application · DTOs BenchDTO, BudgetDTO, CountDTO, EstimateDTO, RecordDTO, ReportDTO
Application · Use cases BenchPricingUseCase, CheckBudgetUseCase, CountTokensUseCase, EstimateCostUseCase, GetReportUseCase, RecordUsageUseCase
Domain Budget, CostEntry, CostEstimate, Currency, Money, PricingEntry, Provider, TokenUsage
Domain · Enums TokenKind
Domain · Exceptions BudgetExceededException, CostError, PricingNotFoundException
Domain · Protocols (ports) IBudgetTracker, ICostRepository, IPricingTable, ITokenCounter
Infrastructure CostReport, InMemoryBudgetTracker, InMemoryCostRepository, JsonPricingLoader, JsonReportFormatter, MarkdownReportFormatter, PricingTable, TiktokenCounter, WhitespaceTokenCounter, builtin_entries

Install

Bash
pip install apogee-ai-cost

The base install has no required third-party dependency. Each extra unlocks one adapter.

Extra Pulls in
tiktoken tiktoken>=0.6

CLI

Installed as a console script, and registered as an apogee plugin so the same subcommands work under the global binary.

Bash
apogee-cost --help