/** * Qwen response → UsageInfo transformer. * * Pure function — no I/O, no side effects. Converts the raw DashScope * OpenAI-compatible chat completion shape into the canonical UsageInfo * record used throughout hazo_llm_api. */ import type { UsageInfo } from "../../pricing/types.js"; interface QwenResponseLike { choices?: Array<{ finish_reason?: string; }>; usage?: { prompt_tokens?: number; completion_tokens?: number; total_tokens?: number; }; model?: string; } export interface QwenUsageInputs { /** Raw DashScope / OpenAI-compatible response object. */ raw: QwenResponseLike; /** Model name to use when the response doesn't include one (e.g. image gen). */ model_fallback: string; /** Wall-clock milliseconds from request start to response received. */ latency_ms: number; } /** * Convert a raw Qwen API response into a UsageInfo record. * * Token counts default to 0 when absent (image generation calls return no * usage block). Call compute_cost() on the result to populate cost_usd. */ export declare function qwen_response_to_usage(inputs: QwenUsageInputs): UsageInfo; export {}; //# sourceMappingURL=qwen_response_to_usage.d.ts.map