Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions providers/llmgateway/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# LLM Gateway Provider

This provider enables access to 150+ AI models through [LLM Gateway](https://llmgateway.io), an OpenAI-compatible API gateway that provides unified access to 40+ LLM providers.

## Directory Structure

- **models/**: TOML configuration files for all supported models
- **provider.toml**: Provider configuration
- **logo.svg**: Provider logo

## Regenerating Models

Model configurations are generated from the [LLM Gateway repository](https://github.com/theopenco/llmgateway):

```bash
npx tsx scripts/export-models-dev.ts
```

## How It Works

LLM Gateway acts as a unified proxy for multiple AI providers. You can access any supported model through a single API endpoint using your LLM Gateway API key.

## Prerequisites

```bash
export LLMGATEWAY_API_KEY="your-api-key"
```

## Supported Providers

- OpenAI (GPT-3.5, GPT-4, GPT-4o, GPT-5, o1, o3, o4-mini)
- Anthropic (Claude 3, 3.5, 3.7, 4, 4.5)
- Google (Gemini 1.5, 2.0, 2.5, 3, Gemma)
- Meta (Llama 3.1, 3.3, 4)
- xAI (Grok 2, 3, 4)
- DeepSeek (V3, R1)
- Alibaba (Qwen Max, Plus, Flash, VL, Coder)
- Mistral (Large, Pixtral, Mixtral)
- ZAI (GLM 4.5, 4.6, 4.7)
- ByteDance (Seed, Seedream)
- Moonshot (Kimi K2)
- Perplexity (Sonar)
- And many more...

## Usage with AI SDK

```typescript
import { createOpenAICompatible } from "@ai-sdk/openai-compatible";

const llmgateway = createOpenAICompatible({
baseURL: "https://api.llmgateway.io/v1",
apiKey: process.env.LLMGATEWAY_API_KEY,
});

const result = await generateText({
model: llmgateway("claude-sonnet-4-5"),
prompt: "Hello!",
});
```

## Links

- [Documentation](https://llmgateway.io/docs)
- [Pricing](https://llmgateway.io/pricing)
- [GitHub](https://github.com/theopenco/llmgateway)
4 changes: 4 additions & 0 deletions providers/llmgateway/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions providers/llmgateway/models/auto.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name = "Auto Route"
family = "auto"
release_date = "2024-01-01"
last_updated = "2024-01-01"
attachment = true
reasoning = false
temperature = true
tool_call = true
structured_output = true
open_weights = false

[cost]
input = 0.00
output = 0.00

[limit]
context = 128_000
output = 16_384

[modalities]
input = ["text", "image"]
output = ["text"]
24 changes: 24 additions & 0 deletions providers/llmgateway/models/claude-3-5-haiku-20241022.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name = "Claude 3.5 Haiku (2024-10-22)"
family = "claude"
release_date = "2024-10-22"
last_updated = "2024-10-22"
attachment = false
reasoning = false
temperature = true
tool_call = true
structured_output = false
open_weights = false
status = "deprecated"

[cost]
input = 0.80
output = 4.00
cache_read = 0.08

[limit]
context = 200_000
output = 8_192

[modalities]
input = ["text"]
output = ["text"]
23 changes: 23 additions & 0 deletions providers/llmgateway/models/claude-3-5-haiku.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name = "Claude 3.5 Haiku"
family = "claude"
release_date = "2024-10-22"
last_updated = "2024-10-22"
attachment = false
reasoning = false
temperature = true
tool_call = true
structured_output = false
open_weights = false

[cost]
input = 0.80
output = 4.00
cache_read = 0.08

[limit]
context = 200_000
output = 8_192

[modalities]
input = ["text"]
output = ["text"]
23 changes: 23 additions & 0 deletions providers/llmgateway/models/claude-3-5-sonnet-20240620.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name = "Claude 3.5 Sonnet (Old)"
family = "claude"
release_date = "2024-06-20"
last_updated = "2024-06-20"
attachment = true
reasoning = false
temperature = true
tool_call = true
structured_output = false
open_weights = false

[cost]
input = 3.00
output = 15.00
cache_read = 0.30

[limit]
context = 200_000
output = 8_192

[modalities]
input = ["text", "image"]
output = ["text"]
23 changes: 23 additions & 0 deletions providers/llmgateway/models/claude-3-5-sonnet.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name = "Claude 3.5 Sonnet"
family = "claude"
release_date = "2024-06-20"
last_updated = "2024-06-20"
attachment = false
reasoning = false
temperature = true
tool_call = true
structured_output = false
open_weights = false

[cost]
input = 3.00
output = 15.00
cache_read = 0.30

[limit]
context = 200_000
output = 16_384

[modalities]
input = ["text"]
output = ["text"]
23 changes: 23 additions & 0 deletions providers/llmgateway/models/claude-3-7-sonnet-20250219.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name = "Claude 3.7 Sonnet (2025-02-19)"
family = "claude"
release_date = "2025-02-19"
last_updated = "2025-02-19"
attachment = false
reasoning = true
temperature = true
tool_call = true
structured_output = false
open_weights = false

[cost]
input = 3.00
output = 15.00
cache_read = 0.30

[limit]
context = 200_000
output = 8_192

[modalities]
input = ["text"]
output = ["text"]
23 changes: 23 additions & 0 deletions providers/llmgateway/models/claude-3-7-sonnet.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name = "Claude 3.7 Sonnet"
family = "claude"
release_date = "2025-02-24"
last_updated = "2025-02-24"
attachment = false
reasoning = true
temperature = true
tool_call = true
structured_output = false
open_weights = false

[cost]
input = 3.00
output = 15.00
cache_read = 0.30

[limit]
context = 200_000
output = 8_192

[modalities]
input = ["text"]
output = ["text"]
23 changes: 23 additions & 0 deletions providers/llmgateway/models/claude-3-haiku.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name = "Claude 3 Haiku"
family = "claude"
release_date = "2024-03-04"
last_updated = "2024-03-04"
attachment = true
reasoning = false
temperature = true
tool_call = true
structured_output = false
open_weights = false

[cost]
input = 0.25
output = 1.25
cache_read = 0.03

[limit]
context = 200_000
output = 4_096

[modalities]
input = ["text", "image"]
output = ["text"]
23 changes: 23 additions & 0 deletions providers/llmgateway/models/claude-3-opus.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name = "Claude 3 Opus"
family = "claude"
release_date = "2024-03-04"
last_updated = "2024-03-04"
attachment = true
reasoning = false
temperature = true
tool_call = true
structured_output = false
open_weights = false

[cost]
input = 15.00
output = 75.00
cache_read = 1.50

[limit]
context = 200_000
output = 4_096

[modalities]
input = ["text", "image"]
output = ["text"]
23 changes: 23 additions & 0 deletions providers/llmgateway/models/claude-haiku-4-5-20251001.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name = "Claude Haiku 4.5 (2025-10-01)"
family = "claude"
release_date = "2025-10-15"
last_updated = "2025-10-15"
attachment = false
reasoning = false
temperature = true
tool_call = true
structured_output = true
open_weights = false

[cost]
input = 1.00
output = 5.00
cache_read = 0.10

[limit]
context = 200_000
output = 64_000

[modalities]
input = ["text"]
output = ["text"]
23 changes: 23 additions & 0 deletions providers/llmgateway/models/claude-haiku-4-5.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name = "Claude Haiku 4.5"
family = "claude"
release_date = "2025-10-15"
last_updated = "2025-10-15"
attachment = false
reasoning = false
temperature = true
tool_call = true
structured_output = true
open_weights = false

[cost]
input = 1.00
output = 5.00
cache_read = 0.10

[limit]
context = 200_000
output = 64_000

[modalities]
input = ["text"]
output = ["text"]
23 changes: 23 additions & 0 deletions providers/llmgateway/models/claude-opus-4-1-20250805.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name = "Claude Opus 4.1"
family = "claude"
release_date = "2025-08-05"
last_updated = "2025-08-05"
attachment = true
reasoning = true
temperature = true
tool_call = true
structured_output = true
open_weights = false

[cost]
input = 15.00
output = 75.00
cache_read = 1.50

[limit]
context = 200_000
output = 32_000

[modalities]
input = ["text", "image"]
output = ["text"]
23 changes: 23 additions & 0 deletions providers/llmgateway/models/claude-opus-4-20250514.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name = "Claude Opus 4 (2025-05-14)"
family = "claude"
release_date = "2025-05-22"
last_updated = "2025-05-22"
attachment = false
reasoning = true
temperature = true
tool_call = true
structured_output = false
open_weights = false

[cost]
input = 15.00
output = 75.00
cache_read = 1.50

[limit]
context = 200_000
output = 16_384

[modalities]
input = ["text"]
output = ["text"]
Loading