Module: Durable

Defined in:
lib/durable.rb,
lib/durable/llm.rb,
lib/durable/llm/cli.rb,
lib/durable/llm/client.rb,
lib/durable/llm/errors.rb,
lib/durable/llm/version.rb,
lib/durable/llm/providers.rb,
lib/durable/llm/configuration.rb,
lib/durable/llm/providers/xai.rb,
lib/durable/llm/providers/base.rb,
lib/durable/llm/providers/groq.rb,
lib/durable/llm/providers/cohere.rb,
lib/durable/llm/providers/google.rb,
lib/durable/llm/providers/openai.rb,
lib/durable/llm/providers/mistral.rb,
lib/durable/llm/providers/deepseek.rb,
lib/durable/llm/providers/opencode.rb,
lib/durable/llm/providers/together.rb,
lib/durable/llm/providers/anthropic.rb,
lib/durable/llm/providers/fireworks.rb,
lib/durable/llm/providers/openrouter.rb,
lib/durable/llm/providers/perplexity.rb,
lib/durable/llm/providers/huggingface.rb,
lib/durable/llm/providers/azure_openai.rb

Overview

This file defines the abstract base class for all LLM providers in the Durable gem, establishing a common interface and shared functionality that all provider implementations must follow. It defines required methods like completion, models, and streaming capabilities, provides caching mechanisms for model lists, handles default API key resolution, and includes stub implementations for optional features like embeddings. The base class ensures consistency across different LLM providers while allowing each provider to implement their specific API communication patterns and response handling.

Defined Under Namespace

Modules: Llm