import * as plugins from './plugins.js'; /** * The Claude API prices of the models Anthropic lists as available, from * https://platform.claude.com/docs/en/about-claude/pricing, checked 2026-10-21, keyed by the service the response * reports: `standard`, and `fast` for Fast mode. Priority Tier has no published per-token price, so it is absent and a * call served in it is refused. Fast-mode cache rates apply the page's caching multipliers to the Fast-mode base * price (1.25× and 2× for writes; 0.05× hits on Claude Opus 5.5, 0.1× otherwise). Model ids and dated snapshots are * from the model pages (https://platform.claude.com/docs/en/models//overview). */ export declare const ANTHROPIC_MODEL_PRICES: readonly plugins.IModelPrice[]; /** The price of exactly this model id or one of its listed snapshots; `undefined` for any other id. */ export declare function getAnthropicModelPrice(modelIdArg: string): plugins.IModelPrice | undefined; /** What one server-tool `type` of a Messages request costs beyond the model's tokens. */ export interface IAnthropicServerToolPrice { /** The exact `type` of the tool definition in the request's `tools`. */ type: string; /** * Integer micro-USD per call, by the name `usage.server_tool_use` counts the calls under (`web_search` for * `web_search_requests`), for every call a request declaring this tool may be billed for. `{}` is a tool that * costs only its tokens and has no counter. */ toolCallFees: Readonly>; source: plugins.IModelSource; } /** * The server tools whose cost is published, by exact `type`: every version of web search and web fetch the tool * reference lists (https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-reference), at the fees of * https://platform.claude.com/docs/en/about-claude/pricing ($10 per 1,000 searches, no fee for fetches, free code * execution with the 2026 versions), and the dated tool search variants, which are not metered and cost only the * tool definitions they load, as input tokens (the tool search page's "Usage"), all checked 2026-10-22. Undated * aliases (`tool_search_tool_regex`, which resolves to the latest version), code execution (billed by container * time), the advisor (billed at the advisor model's token rates) and the MCP connector are absent, so a request * declaring them cannot be priced. */ export declare const ANTHROPIC_SERVER_TOOL_PRICES: readonly IAnthropicServerToolPrice[]; /** The price of exactly this server-tool `type`; `undefined` for any other type, which a request cannot be priced with. */ export declare function getAnthropicServerToolPrice(typeArg: string): IAnthropicServerToolPrice | undefined; /** * The price of one request's answers: the model's price with the call fees of the server tools the request declares * (`serverToolTypesArg`, the `type` of each server tool in its `tools`; client tools are not passed). `undefined` * when one of the types has no price, so the request cannot be priced. */ export declare function getAnthropicRequestPrice(priceArg: plugins.IModelPrice, serverToolTypesArg: readonly string[]): plugins.IModelPrice | undefined; /** * Reads a Messages API `usage` object, raw as the API sends it at the end of a call (a stream's usage merged from * `message_start` and the last `message_delta`). * * `input_tokens` excludes the cache; cache writes are split by lifetime from `cache_creation` * (`ephemeral_5m_input_tokens`, `ephemeral_1h_input_tokens`), and writes it does not split go to * `unknownLifetimeCacheWriteTokens`. The service is `service_tier`, or `fast` for a standard-tier call whose `speed` * is `fast`; any other speed names a service no price has. An `inference_geo` other than `global` is the surcharge * `inference_geo:`, which a price without that surcharge refuses. Server-tool calls come * from `server_tool_use` (`web_search_requests` as `web_search`, and so on). A usage that is not complete throws a * `ModelUsageReadError`, and so does one with a `usage.iterations` entry other than `message` (an advisor's * `advisor_message`, for example), whose tokens the top-level counts leave out. */ export declare function readAnthropicMessagesUsage(rawUsageArg: unknown): plugins.IModelPricedUsage;