API Reference ReqLLM v#1.0.0

View Source

Modules

Main API facade for Req AI.

Application supervisor for ReqLLM.

Model capability discovery and validation.

Runtime catalog system that applies configuration to the compile-time base catalog.

Compile-time base catalog built from priv/models_dev/*.json.

Context represents a conversation history as a collection of messages.

Centralized debug logging for ReqLLM development and troubleshooting.

Embedding functionality for ReqLLM.

Error handling system for ReqLLM using Splode.

Error class for API-related failures and HTTP errors.

Error for when we can't parse the JSON response.

Error for API request failures, HTTP errors, and network issues.

Error for provider response parsing failures and unexpected response formats.

Error for when generated objects don't match the expected schema.

Error for stream processing failures.

Error class for invalid input parameters and configurations.

Error for unsupported model capabilities.

Error for invalid message content.

Error for invalid message structures or validation failures.

Error for invalid message list structures.

Error for unimplemented functionality.

Error for invalid or missing parameters.

Error for unknown or unsupported providers.

Error for providers that exist but have no implementation (metadata-only).

Error for invalid message roles.

Error for invalid schema definitions.

Error class for unexpected or unhandled errors.

Error for unexpected or unhandled errors.

Error class for validation failures and parameter errors.

Error for parameter validation failures.

A GenServer-based AI agent that uses ReqLLM for streaming text generation with tool calling.

Text generation functionality for ReqLLM.

Handles API key lookup with the following precedence

Message represents a single conversation message with multi-modal content support.

ContentPart represents a single piece of content within a message.

Unified metadata and configuration schema definitions.

Represents an AI model configuration for ReqLLM.

Handles loading metadata from JSON files for AI models.

Composable parameter transformation engine for applying model-specific rules to options.

Behavior for LLM provider implementations.

Domain-Specific Language for defining ReqLLM providers.

Default implementations for common provider behavior patterns.

Runtime generation options processing for ReqLLM providers.

Registry for AI providers and their supported models.

Shared utilities for provider implementations.

AWS Bedrock provider implementation using the Provider behavior.

Parser for AWS Event Stream protocol.

Anthropic model family support for AWS Bedrock.

AWS Bedrock Converse API support for unified tool calling across models.

Meta Llama model family support for AWS Bedrock.

OpenAI model family support for AWS Bedrock.

Shared utilities for unwrapping AWS Bedrock response formats.

AWS Security Token Service (STS) integration for AssumeRole.

Provider implementation for Anthropic Claude models.

Shared helper functions for Anthropic model adapters (Bedrock, Vertex).

Anthropic-specific context encoding for the Messages API format.

Shared extended thinking/reasoning support for Anthropic models on third-party platforms.

Anthropic-specific response decoding for the Messages API format.

Cerebras provider – OpenAI-compatible Chat Completions API with ultra-fast inference.

Google Gemini provider – built on the OpenAI baseline defaults with Gemini-specific customizations.

Google Vertex AI provider implementation.

Anthropic model family support for Google Vertex AI.

Google Cloud OAuth2 authentication for Vertex AI.

Groq provider – 100% OpenAI Chat Completions compatible with Groq's high-performance hardware.

Generic Meta Llama provider implementing Meta's native prompt format.

OpenAI provider implementation with dual-driver architecture for Chat and Responses APIs.

Behaviour for OpenAI API endpoint drivers.

OpenAI Chat Completions API driver.

Defines reusable parameter transformation profiles for OpenAI models.

OpenAI Responses API driver for reasoning models.

OpenRouter provider – OpenAI Chat Completions compatible with OpenRouter's unified API.

xAI (Grok) provider – OpenAI Chat Completions compatible with xAI's models and features.

Z.AI provider – OpenAI-compatible Chat Completions API (Standard Endpoint).

Z.AI Coder provider – OpenAI-compatible Chat Completions API (Coding Endpoint).

High-level representation of an LLM turn.

Stream processing utilities for ReqLLM responses.

Single schema authority for NimbleOptions ↔ JSON Schema conversion.

Shared utilities for example scripts in scripts/.

Req step that integrates with Splode error handling.

Req step that attaches test fixture functionality when running in test environments.

Req step that handles automatic retries for transient network errors.

Centralized Req step that extracts token usage from provider responses, normalizes usage values across providers, computes costs, and emits telemetry.

Represents a single chunk in a streaming response.

A streaming response container that provides both real-time streaming and asynchronous metadata.

GenServer that manages streaming LLM sessions with backpressure and SSE parsing.

Main orchestration for ReqLLM streaming operations.

Finch HTTP client for ReqLLM streaming operations.

Lightweight HTTP context for streaming operations.

Provider-agnostic Server-Sent Events (SSE) parsing utilities.

Tool definition for AI model function calling.

Represents a single tool call from an assistant message.

Mix Tasks

Generate text or structured objects from any supported AI model with unified interface.

Validate ReqLLM model coverage using the fixture system.

Synchronize AI model catalog and pricing data from the models.dev API.