For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
  • About NVIDIA NeMo Relay
    • Overview
    • Architecture
    • Ecosystem
    • Concepts
    • Release Notes
  • Getting Started
    • Agent Runtime Primer
    • Prerequisites
    • Installation
    • Configuration / Setup
    • Quick Start
  • NVIDIA NeMo Relay CLI
    • About
    • Basic Usage
    • Claude Code
    • Codex
    • Cursor
    • Hermes Agent
  • Supported Integrations
    • About
    • OpenClaw Plugin Guide
    • LangChain Integration Guide
    • LangGraph Integration Guide
    • Deep Agents Integration Guide
  • Instrument Applications
    • About
    • Adding Scopes and Marks
    • Instrument a Tool Call
    • Instrument an LLM Call
    • Add Middleware
    • Code Examples
  • Observability Plugin
    • About
    • Configuration
    • Agent Trajectory Interchange Format (ATIF)
    • Agent Trajectory Observability Format (ATOF)
    • OpenTelemetry
    • OpenInference
  • Adaptive Plugin
    • About
    • Configuration
    • Adaptive Cache Governor (ACG)
    • Adaptive Hints
  • NeMo Guardrails Plugin
    • About
    • Configuration
  • Integrate into Frameworks
    • About
    • Adding Scopes
    • Wrap Tool Calls
    • Wrap LLM Calls
    • Handle Non-Serializable Data
    • Using Codecs
    • Provider Codecs
    • Provider Response Codecs
    • Code Examples
  • Build Plugins
    • About
    • Define a Plugin
    • Validate Plugin Configuration
    • Plugin Configuration Files
    • Register Plugin Behavior
    • Design Plugin Configuration
    • NeMo Guardrails Example Plugin
    • Code Examples
  • Contribute
    • About
    • Development Setup
    • Workflow and Reviews
    • Testing and Documentation
  • Reference
    • APIs
      • Python Library Reference
      • Node.js Library Reference
      • Rust Library Reference
        • nemo-relay
          • api
          • codec
            • anthropic
            • openai_chat
            • openai_responses
            • pricing
              • CacheReadAccounting
              • ModelPricing
              • PricingCatalog
              • PricingCatalogError
              • PricingConfig
              • PricingResolver
              • TokenRateTier
              • PricingSource
              • PricingSourceConfig
              • PricingUnit
              • PromptCachePricing
              • TokenPricingRates
              • RateScheduleApplication
              • active_pricing_resolver
              • TokenRateSchedule
              • attach_estimated_cost
              • attach_estimated_cost_for_provider
              • estimate_cost
              • estimate_cost_for_provider
              • estimate_cost_with_catalog
              • estimate_cost_with_provider
              • infer_model_provider
              • pricing_for_model
              • pricing_for_provider
              • reset_active_pricing_resolver
              • set_active_pricing_resolver
            • request
            • response
            • streaming
            • traits
          • config_editor
          • error
          • json
          • observability
          • plugin
          • plugins
          • stream
          • editor_config
        • nemo-relay-adaptive
        • nemo-relay-ffi
    • Performance
  • Resources
    • Support and FAQs
    • Glossary
    • Troubleshooting Guide
    • Community
    • Legal
NVIDIANVIDIA
Developer-friendly docs for your API
Privacy Policy | Your Privacy Choices | Terms of Service | Accessibility | Corporate Policies | Product Security | Contact

Copyright © 2026, NVIDIA Corporation.

LogoLogo
On this page
  • Implementations
  • impl PricingResolver
  • from_catalogs
  • from_config
  • from_sources
  • pricing_for_model
  • pricing_for
  • estimate_cost
  • estimate_cost_for_provider
  • Trait Implementations
  • impl Clone for PricingResolver
  • clone
  • clone_from
  • impl Debug for PricingResolver
  • fmt
  • impl Default for PricingResolver
  • default
  • impl PartialEq for PricingResolver
  • eq
  • ne
  • impl StructuralPartialEq for PricingResolver
ReferenceAPIsRust Library Referencenemo-relaycodecpricing

Struct Pricing Resolver

||View as Markdown|
Previous

Struct Pricing Config

Next

Struct Token Rate Tier

Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-ffi.

1pub struct PricingResolver { /* private fields */ }

Ordered pricing lookup chain.

Implementations

impl PricingResolver

impl PricingResolver

from_catalogs

pub fn from_catalogs(catalogs: Vec<PricingCatalog>) -> Self

Builds a resolver from already-loaded catalogs in precedence order.

from_config

pub fn from_config(config: &PricingConfig) -> Result<Self, PricingCatalogError>

Builds a resolver from declarative config.

from_sources

pub fn from_sources(
    sources: Vec<Box<dyn PricingSource>>,
) -> Result<Self, PricingCatalogError>

Builds a resolver from imperative source implementations.

pricing_for_model

pub fn pricing_for_model(&self, model: &str) -> Option<ModelPricing>

Finds pricing for a canonical model ID or alias.

pricing_for

pub fn pricing_for(
    &self,
    provider: Option<&str>,
    model: &str,
) -> Option<ModelPricing>

Finds pricing for a provider/model pair, with model-only fallback.

estimate_cost

pub fn estimate_cost(&self, model: &str, usage: &Usage) -> Option<CostEstimate>

Estimates cost for a model/usage pair when pricing is known.

estimate_cost_for_provider

pub fn estimate_cost_for_provider(
    &self,
    provider: Option<&str>,
    model: &str,
    usage: &Usage,
) -> Option<CostEstimate>

Estimates cost for a provider/model pair when pricing is known.

Trait Implementations

impl Clone for PricingResolver

impl Clone for PricingResolver

clone

fn clone(&self) -> PricingResolver

clone_from

fn clone_from(&mut self, source: &Self)

impl Debug for PricingResolver

impl Debug for PricingResolver

fmt

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Default for PricingResolver

impl Default for PricingResolver

default

fn default() -> PricingResolver

impl PartialEq for PricingResolver

impl PartialEq for PricingResolver

eq

fn eq(&self, other: &PricingResolver) -> bool

ne

fn ne(&self, other: &Rhs) -> bool

impl StructuralPartialEq for PricingResolver

impl StructuralPartialEq for PricingResolver