import { IChatEndpoint, IChatEndpointTokenPricing } from '../../../platform/networking/common/networking'; import type { LanguageModelChatInformation, LanguageModelConfigurationSchema } from 'vscode'; /** * Picks a sensible default reasoning-effort level given the levels advertised * by an endpoint and the model `family`. The picker must never receive * `undefined`, otherwise the UI shows an "undefined" state. * * Selection order: * - claude / Kimi K3 families → 'high' if available * - other families → 'medium' if available * - fallback → the first advertised level */ export declare function pickDefaultReasoningEffort(effortLevels: readonly string[], family: string): string | undefined; /** * Returns the localized description shown in the picker hover for a given * reasoning-effort `level`. Centralised here so every provider surfaces the * same wording. Falls back to the raw level for unknown values. */ export declare function getReasoningEffortDescription(level: string): string; /** * Returns the localized, title-cased picker label for a given * reasoning-effort `level`. Centralised here so every provider surfaces the * same wording. Falls back to capitalizing an unknown value. */ export declare function getReasoningEffortLabel(level: string): string; /** * Builds the `reasoningEffort` property descriptor for a model's * {@link LanguageModelConfigurationSchema}. Centralises the default-selection * and localized descriptions so the picker stays consistent across the * Copilot and BYOK code paths. */ export declare function buildReasoningEffortSchemaProperty(effortLevels: readonly string[], family: string): NonNullable[string]; /** * Returns the localized, title-cased picker label for an Auto routing tier. * Falls back to capitalizing an unknown value. */ export declare function getAutoModeTierLabel(tier: string): string; /** * Returns the localized description shown in the picker hover for an Auto * routing tier. Falls back to the raw tier for unknown values. */ export declare function getAutoModeTierDescription(tier: string): string; /** * Builds the `tier` property descriptor for the Auto model's * {@link LanguageModelConfigurationSchema}. Rendered by the model picker the * same way thinking effort is, but labelled "Tier". */ export declare function buildAutoModeTierSchemaProperty(tiers: readonly string[], defaultTier: string): NonNullable[string]; /** * Returns a description of the model's capabilities and intended use cases. * This is shown in the rich hover when selecting models. */ export declare function getModelCapabilitiesDescription(endpoint: IChatEndpoint | LanguageModelChatInformation | { name: string; family: string; }): string | undefined; /** * Formats the Auto discount as a short label (e.g. "10% discount" or * "10% to 20% discount"). Returns `undefined` when there is no discount. * * @param discountRange Discount as fractions (e.g. `0.1` for 10%). */ export declare function getAutoModelDiscountLabel(discountRange?: { low: number; high: number; }): string | undefined; /** * Builds the shared description shown for the Auto model. The discount sentence * is only included when a non-zero discount is provided. * * @param discountRange Discount as fractions (e.g. `0.1` for 10%). When omitted * or zero, the discount sentence is left out entirely. */ export declare function getAutoModelDescription(discountRange?: { low: number; high: number; }): string; /** * Formats a token count as a human-readable string (e.g. 128K, 1M, 2.5M). */ export declare function formatTokenCount(count: number): string; /** * Formats a compact pricing label for display in the model management column. * Shows input and output AICs per million tokens. */ export declare function formatPricingLabel(pricing: IChatEndpointTokenPricing): string; /** * A single pricing tier as returned by CAPI. `cache_read_price` and * `max_prompt_tokens` are the current field names; `cache_price` and * `context_max` are the earlier spellings and are still accepted. */ interface IRawTokenPriceTier { input_price?: number; cache_read_price?: number; cache_price?: number; cache_write_price?: number; output_price?: number; max_prompt_tokens?: number; context_max?: number; } /** * Raw token prices from the CAPI billing response. Supports both the tiered * format (API 2026-06-01+, prices in AIUs) and the legacy flat format * (pre-2026-06-01, prices in nano-AIUs) which is still used by some endpoints * such as the cloud agents (`/agents/swe/models`) model picker. */ export interface IRawTokenPrices { batch_size?: number; input_price?: number; cache_price?: number; output_price?: number; default?: IRawTokenPriceTier; long_context?: IRawTokenPriceTier; } export interface INormalizedPriceTier { readonly inputPrice: number; readonly outputPrice: number; readonly cachePrice: number | undefined; readonly cacheWritePrice: number | undefined; readonly contextMax?: number; } export interface INormalizedTokenPricing { readonly default: INormalizedPriceTier; readonly longContext?: INormalizedPriceTier; } /** * Converts raw billing token prices into normalized AICs (credits) per million tokens. * Handles both tiered (AIU) and legacy flat (nano-AIU) formats. * * When a `long_context` tier is present but its prices match the `default` tier, * it is omitted from the result. */ export declare function normalizeTokenPrices(tokenPrices: IRawTokenPrices | undefined): INormalizedTokenPricing | undefined; export {}; //# sourceMappingURL=languageModelAccess.d.ts.map