Supported Providers

InferShrink currently supports OpenAI and Anthropic. We route requests intelligently within each provider's ecosystem.

OpenAI Stable

Supports Chat Completions API. Compatible with openai>=1.0.0.

Anthropic Stable

Supports Messages API. Compatible with anthropic>=0.18.0.

OpenAI Integration

Wrap the standard client. All chat.completions.create arguments are supported, including tools/functions and JSON mode.

import openai
from infershrink import optimize

client = optimize(openai.Client())
response = client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Hello!"}],
)

Routing Tiers

Anthropic Integration

InferShrink automatically maps complexity to the Opus/Sonnet/Haiku family.

import anthropic
from infershrink import optimize

client = optimize(anthropic.Anthropic())
response = client.messages.create(
    model="claude-opus-4-6",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hello!"}],
)

Routing Tiers

Coming Soon

We are actively working on support for: