Skip to content
Français

ModelPricesOptions

import type { ModelPricesOptions } from "@elie-laloum/outpost/harness";
  • sourceOptional
    "models.dev" | "openrouter" | undefined
    Public catalog to load: models.dev (default) or openrouter.
  • providerOptional
    string | undefined
    Required models.dev provider ID; ignored for OpenRouter.
  • modelsRequired
    Readonly<Record<string, string>>
    Outpost model names mapped to exact IDs in the selected catalog; loads only these prices.
  • currencyOptional
    "EUR" | "USD" | undefined
    Output currency, USD by default; EUR requires usdExchangeRate.
  • usdExchangeRateOptional
    number | undefined
    Caller-supplied amount of EUR for one USD when currency is EUR. USD accepts only 1.
  • urlOptional
    string | undefined
    Optional absolute HTTP(S) catalog endpoint, without embedded credentials or fragment. Defaults to the public source URL.
  • signalOptional
    AbortSignal | undefined
    Cancels the catalog request and body reading.
  • timeoutMsOptional
    number | undefined
    Total catalog request deadline, 15000 ms by default.
  • maxResponseBytesOptional
    number | undefined
    Maximum catalog response bytes, 32 MiB by default.
export interface ModelPricesOptions {
  readonly source?: "models.dev" | "openrouter";
  readonly provider?: string;
  readonly models: Readonly<Record<string, string>>;
  readonly currency?: "EUR" | "USD";
  readonly usdExchangeRate?: number;
  readonly url?: string;
  readonly signal?: AbortSignal;
  readonly timeoutMs?: number;
  readonly maxResponseBytes?: number;
}