IssueLoop logs every LLM call — provider, model, prompt tokens, and completion tokens — toDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/onenot8/issueLoop/llms.txt
Use this file to discover all available pages before exploring further.
data/logs/llm_usage.jsonl. These functions read that log so you can audit token spend, detect runaway usage, and debug provider configuration without digging through raw files. All four functions are read-only; they do not trigger any LLM calls themselves.
get_token_consumption
Returns aggregated token usage totals, optionally filtered to a single provider.Optional provider filter. One of
"ollama", "anthropic", or "openai". Pass None or omit to aggregate across all providers.Total prompt (input) tokens consumed.
Total completion (output) tokens consumed.
Sum of prompt and completion tokens.
Number of individual LLM calls that contributed to these totals.
calls: 0 if the usage log does not yet exist.
get_token_consumption_by_provider
Returns per-provider token usage, with each provider’s totals in a nested dict. Useful for comparing cost across providers when using a fallback chain.str) to a consumption dict containing prompt_tokens, completion_tokens, total_tokens, and calls. Returns an empty dict if the usage log does not yet exist.
get_llm_call_history
Returns the most recent LLM call records in chronological order (oldest first within the returned slice).Maximum number of call records to return. Returns the last
limit entries from the log.ISO 8601 UTC timestamp of the call.
Provider that handled the call:
"ollama", "anthropic", or "openai".Model name used for the call (e.g.
"claude-sonnet-4-6", "qwen2.5-coder:7b").Number of prompt tokens in this call.
Number of completion tokens in this call.
Sum of prompt and completion tokens for this call.
get_llm_provider_status
Returns a snapshot of the configured LLM providers and their priority order, derived from the currentConfig object rather than from the usage log.
List of provider dicts in fallback priority order. Each entry has
provider (str), model (str), and has_api_key (bool).The name of the first (highest-priority) provider, or
None if no providers are configured.Number of additional fallback providers beyond the primary.
0 means no fallback is configured.Usage log format
Each line indata/logs/llm_usage.jsonl is a JSON object. This is the raw format that all four functions above read from:
rotate_logs() from the Database API if you need to manage its size over time.