@juspay/neurolink
Version:
Universal AI Development Platform with working MCP integration, multi-provider support, voice (TTS/STT/realtime), and professional CLI. 58+ external MCP servers discoverable, multimodal file processing, RAG pipelines. Build, test, and deploy AI applicatio
18 lines (17 loc) • 888 B
TypeScript
import type { TokenUsage } from "../types/index.js";
/**
* Calculate the dollar cost of a generate/stream call based on token usage.
* Returns 0 if the provider/model combination is not in the pricing table.
*/
export declare function calculateCost(provider: string, model: string, usage: TokenUsage): number;
/**
* Check if pricing is available for a provider/model combination.
* Checks the rate table directly instead of computing a cost,
* so even very cheap models (e.g. gemini-1.5-flash) are detected correctly.
*
* Zero-rate entries (the local-provider `_default` for lm-studio / llamacpp)
* count as "no pricing" — those providers explicitly don't have an upstream
* USD price, and any caller gated by `hasPricing()` should treat them as
* non-billable rather than zero-cost-billable.
*/
export declare function hasPricing(provider: string, model: string): boolean;