Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BillingDashboardURL ¶
BillingDashboardURL returns the public URL where the user can inspect their billing / quota for the given provider, or empty string if no canonical surface exists.
/usage surfaces this as a footer so the dollar estimate has an authoritative escape hatch — the catalog drifts, the invoice doesn't.
URLs are stable hostnames; we point at the dashboards' index rather than deep links because the deep paths churn more often (OpenAI's "Usage" tab has been renamed three times in two years, for example).
Types ¶
type Estimate ¶ added in v0.5.0
Estimate is a public-list-price estimate in USD. It is not an invoice and is unavailable when the catalog cannot price the complete usage record.
func ForUsage ¶ added in v0.5.0
ForUsage calculates an estimated USD amount for provider-reported usage. Prices are expressed by models.dev as USD per one million tokens. Cache creation is included only when models.dev publishes a cache-write rate; unknown dimensions remain unavailable rather than being guessed.