import Anthropic from "@anthropic-ai/sdk";
import type { DipclawConfig } from "../config/types.js";
import type { LlmClient, LlmResponse } from "./types.js";
export declare function createLlmClient(config: DipclawConfig): LlmClient;
/**
 * Pull token counters from an OpenAI chat.completions response.usage. The
 * automatic prompt cache (no cache_control needed; kicks in past ~1024 tokens
 * of stable prefix) reports cached input under `prompt_tokens_details.cached_tokens`
 * — we surface that as cacheReadInputTokens so dipclaw's logs / monitoring
 * code can treat the two providers uniformly.
 *
 * OpenAI has no separate "cache write" concept — the first request just pays
 * full rate and a later identical-prefix request gets the cached read.
 */
export declare function extractOpenAIUsage(usage: unknown): NonNullable<LlmResponse["usage"]> | undefined;
/**
 * Pull all four token counters out of an Anthropic response.usage object.
 * The cache_creation/cache_read fields are only present when at least one
 * cache_control breakpoint was used; default to 0 so downstream loggers
 * don't have to handle undefined separately. Without this, our execution
 * logs only see `input_tokens` (the uncached delta) and dramatically
 * under-report real input volume on cached requests.
 */
export declare function extractClaudeUsage(usage: Anthropic.Usage): NonNullable<LlmResponse["usage"]>;
