Module: Clacky::Agent::LlmCaller

Included in:
Clacky::Agent
Defined in:
lib/clacky/agent/llm_caller.rb

Overview

LLM API call management Handles API calls with retry logic, fallback model support, and progress indication

Constant Summary collapse

RETRIES_BEFORE_FALLBACK =

Number of consecutive RetryableError failures (503/429/5xx) before switching to fallback. Network-level errors (connection failures, timeouts) do NOT trigger fallback — they are retried on the primary model for the full max_retries budget, since they are likely transient infrastructure blips rather than a model-level outage.

3
MAX_RETRIES_ON_FALLBACK =

After switching to the fallback model, allow this many retries before giving up. Kept lower than max_retries (10) because we have already exhausted the primary model.

5