Model Pricing Helpers
Generated from crates/node/dist/model_pricing.d.ts.
Import from nemo-relay-node/model_pricing.
Model pricing plugin configuration helpers.
Interfaces
CacheWriteRate
Prompt-cache write price for a duration in seconds, or the default price without duration.
TokenPricingRates
Token rates per million tokens.
PromptCachePricing
Prompt-cache accounting for a catalog entry.
TokenRateTier
One prompt-token threshold tier.
PromptTokenThresholdRateSchedule
Token rate schedule selected by prompt-token thresholds.
ModelPricing
One model pricing catalog entry.
PricingCatalog
Inline pricing catalog.
InlineSource
Pricing source holding an inline catalog.
FileSource
Pricing source read from a JSON file.
PricingConfig
Model pricing config.
Functions
defaultConfig
Creates a default model pricing config with no sources.
tokenRates
Creates token rates with defaults applied.
promptCache
Creates prompt-cache accounting with defaults applied.
tokenRateTier
Creates one rate tier.
promptTokenThresholdRateSchedule
Creates a rate schedule from tiers.
catalogEntry
Creates one catalog entry with defaults applied.
inlineCatalog
Creates an inline catalog from entries.
inlineSource
Creates a pricing source from an inline catalog.
fileSource
Creates a pricing source from a JSON file path.
pricingConfig
Creates a model pricing config from sources in precedence order.
ComponentSpec
Wraps model pricing config as a plugin component.
validateConfig
Validates model pricing config without activating it.
parseConfig
Validates an untyped model pricing document and returns it as a config; throws on error diagnostics.
Type Aliases
PricingSource
Pricing source.
Constants
PRICING_PLUGIN_KIND
Plugin kind of the model pricing component.
Re-exports
Json