Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:BerriAI Litellm Provider Endpoints Support

From Leeroopedia

Template:Implementation metadata

Overview

Description

The provider_endpoints_support.json file is a comprehensive capability matrix that maps every LiteLLM provider to the API endpoints it supports. This file documents which providers can handle chat completions, embeddings, image generation, audio transcription, batches, reranking, and many other endpoint types.

The file serves as both documentation and a validation resource. It is used by CI tests to verify that all provider folders in the codebase have corresponding entries, and that all documented endpoints in the project's documentation sidebar are defined in this file. It also provides display names and documentation URLs for each provider.

Usage

This file is consumed by code coverage tests to ensure documentation completeness:

  • tests/code_coverage_tests/check_provider_folders_documented.py -- Verifies every provider folder in litellm/llms/ has a matching entry in this file
  • tests/code_coverage_tests/check_endpoint_coverage.py -- Ensures all endpoints listed in sidebars.js are defined in this file
# Loading the file in tests:
file_path = repo_root / "provider_endpoints_support.json"
with open(file_path) as f:
    data = json.load(f)
providers = data.get("providers", {})

Data Schema

Top-Level Structure

{
    "_comment": "This file defines which endpoints are supported by each LiteLLM provider",
    "_schema": {
        "provider_slug": {
            "display_name": "...",
            "url": "...",
            "endpoints": {
                "chat_completions": "description...",
                "messages": "description...",
                ...
            }
        }
    },
    "providers": {
        "openai": { ... },
        "anthropic": { ... },
        "bedrock": { ... },
        ...
    }
}

Self-Documenting Schema

The _schema key provides documentation for the file structure itself, describing each field and endpoint type in human-readable format.

Schema Fields

Provider Entry Object

Field Type Required Description
display_name String Yes Human-readable name with provider slug in backticks (e.g., "Anthropic (`anthropic`)")
url String No URL to the provider's documentation page on LiteLLM docs
endpoints Object Yes Map of endpoint names to boolean support flags

Endpoint Support Flags

Each endpoint in the endpoints object is a boolean (true/false) indicating whether the provider supports that endpoint type:

Endpoint API Path Description
chat_completions /chat/completions Standard chat completion endpoint (OpenAI format)
messages /messages Anthropic Messages API format
responses /responses OpenAI/Anthropic unified Responses API
embeddings /embeddings Text embedding generation
image_generations /image/generations Image generation from text prompts
audio_transcriptions /audio/transcriptions Audio-to-text transcription
audio_speech /audio/speech Text-to-speech generation
moderations /moderations Content moderation classification
batches /batches Batch API for asynchronous processing
rerank /rerank Document reranking
ocr /ocr Optical character recognition
search /search Search endpoint
skills /skills Skills endpoint
interactions Varies Google AI Interactions API
a2a_(Agent Gateway) /a2a/{agent}/message/send Agent-to-Agent Protocol support
container /containers OpenAI Containers API
container_file /containers/{id}/files Container file operations
compact /responses/compact Compact responses endpoint
files /files File upload/management operations
image_edits /images/edits Image editing endpoint
vector_stores_create /vector_stores Vector store creation
vector_stores_search /vector_stores/{id}/search Vector store search
video_generations /videos/generations Video generation
count_tokens Varies Token counting support

Sample Provider Entries

Provider chat_completions messages responses embeddings batches Notable Features
openai true true true true true Full endpoint coverage
anthropic true true true false true skills, count_tokens
bedrock true true true true false Broad model support
vertex_ai true true true true true Google Cloud models
azure true true true true true Azure OpenAI
a2a true false false false false Agent-to-Agent only
assemblyai false false false false false Audio transcription only

Usage Examples

CI: Checking Provider Folder Coverage

# From tests/code_coverage_tests/check_provider_folders_documented.py:
def test_all_provider_folders_documented():
    """
    1. Every provider folder in litellm/llms/ has a corresponding entry
       in provider_endpoints_support.json
    2. Every provider in litellm/llms/openai_like/providers.json is
       documented in provider_endpoints_support.json
    """
    data = load_provider_endpoints_support()
    documented_providers = get_documented_provider_slugs(data)
    # Compare against provider folders in litellm/llms/
    ...

CI: Checking Endpoint Coverage

# From tests/code_coverage_tests/check_endpoint_coverage.py:
def test_endpoint_coverage():
    """
    Validates that each endpoint documented in sidebars.js has a
    corresponding entry in provider_endpoints_support.json.
    """
    file_path = repo_root / "provider_endpoints_support.json"
    data = json.load(open(file_path))
    defined_endpoints = get_defined_endpoints(data)
    # Compare against sidebars.js endpoint listings
    ...

Querying Provider Capabilities

The data structure allows simple lookups to determine if a provider supports a specific endpoint:

# Conceptual usage:
import json

with open("provider_endpoints_support.json") as f:
    data = json.load(f)

# Check if Anthropic supports batch API
supports_batches = data["providers"]["anthropic"]["endpoints"].get("batches", False)
# True

# Check if Bedrock supports image generation
supports_images = data["providers"]["bedrock"]["endpoints"].get("image_generations", False)
# True/False depending on entry

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment