Skip to content

Commit ed01ded

Browse files
authored
Merge pull request #4677 from Felixkw12/feat/opper-provider
feat: add Opper as an OpenAI-compatible provider alias
2 parents f17bcb0 + afb8dac commit ed01ded

13 files changed

Lines changed: 130 additions & 4 deletions

File tree

‎agent-schema.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@
224224
"properties": {
225225
"provider": {
226226
"type": "string",
227-
"description": "The underlying provider type. Defaults to \"openai\" when not set. Supported values: openai, anthropic, google, amazon-bedrock, dmr, and any built-in alias (requesty, openrouter, api-route, atlascloud, azure, xai, ollama, mistral, baseten, daoxe, ovhcloud, groq, fireworks-ai, deepseek, cerebras, togetherai, huggingface, moonshotai, vercel, cloudflare-workers-ai, cloudflare-ai-gateway, nvidia, github-copilot, chatgpt, opencode, opencode-go, etc.).",
227+
"description": "The underlying provider type. Defaults to \"openai\" when not set. Supported values: openai, anthropic, google, amazon-bedrock, dmr, and any built-in alias (requesty, openrouter, opper, api-route, atlascloud, azure, xai, ollama, mistral, baseten, daoxe, ovhcloud, groq, fireworks-ai, deepseek, cerebras, togetherai, huggingface, moonshotai, vercel, cloudflare-workers-ai, cloudflare-ai-gateway, nvidia, github-copilot, chatgpt, opencode, opencode-go, etc.).",
228228
"examples": [
229229
"openai",
230230
"anthropic",

‎docs/configuration/models/index.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ models:
1818
first_available: [list] # Optional: candidate model refs, tried in order by available credentials.
1919
# Mutually exclusive with other model settings.
2020
provider: string # Required unless using first_available. One of: openai, anthropic, google, amazon-bedrock,
21-
# dmr, mistral, xai, nebius, nvidia, minimax, baseten, daoxe, ovhcloud, groq, fireworks-ai, deepseek, cerebras, togetherai, huggingface, moonshotai, vercel, cloudflare-workers-ai, cloudflare-ai-gateway, requesty, openrouter, api-route, atlascloud,
21+
# dmr, mistral, xai, nebius, nvidia, minimax, baseten, daoxe, ovhcloud, groq, fireworks-ai, deepseek, cerebras, togetherai, huggingface, moonshotai, vercel, cloudflare-workers-ai, cloudflare-ai-gateway, requesty, openrouter, opper, api-route, atlascloud,
2222
# azure, ollama, github-copilot, or a named provider defined
2323
# under the top-level `providers:` section.
2424
model: string # Required: model identifier
@@ -60,7 +60,7 @@ models:
6060
| Property | Type | Required | Description |
6161
| --------------------- | ---------- | -------- | ------------------------------------------------------------------------------------- |
6262
| `first_available` | array | ✗ | Candidate model references tried in order; selects the first whose credentials are configured. Mutually exclusive with other model settings. |
63-
| `provider` | string | ✓/✗ | Required for regular model definitions; omitted for `first_available` selectors. Provider: `openai`, `anthropic`, `google`, `amazon-bedrock`, `dmr`, `mistral`, `xai`, `nebius`, `nvidia`, `minimax`, `baseten`, `daoxe`, `ovhcloud`, `groq`, `fireworks-ai`, `deepseek`, `cerebras`, `togetherai`, `huggingface`, `moonshotai`, `vercel`, `cloudflare-workers-ai`, `cloudflare-ai-gateway`, `requesty`, `openrouter`, `api-route`, `atlascloud`, `azure`, `ollama`, `github-copilot`, `chatgpt`, `opencode`, `opencode-go`, or any [named provider](../../providers/custom/index.md). |
63+
| `provider` | string | ✓/✗ | Required for regular model definitions; omitted for `first_available` selectors. Provider: `openai`, `anthropic`, `google`, `amazon-bedrock`, `dmr`, `mistral`, `xai`, `nebius`, `nvidia`, `minimax`, `baseten`, `daoxe`, `ovhcloud`, `groq`, `fireworks-ai`, `deepseek`, `cerebras`, `togetherai`, `huggingface`, `moonshotai`, `vercel`, `cloudflare-workers-ai`, `cloudflare-ai-gateway`, `requesty`, `openrouter`, `opper`, `api-route`, `atlascloud`, `azure`, `ollama`, `github-copilot`, `chatgpt`, `opencode`, `opencode-go`, or any [named provider](../../providers/custom/index.md). |
6464
| `model` | string | ✓/✗ | Required for regular model definitions; omitted for `first_available` selectors. Model name (e.g., `gpt-4o`, `claude-sonnet-4-5`, `gemini-3.5-flash`) |
6565
| `description` | string | ✗ | Informational, human-readable summary of the model's purpose or strengths (e.g., "fast and cheap, good for summaries"). Not sent to the model. Can be combined with `first_available` (a selector's description is kept when it resolves). |
6666
| `temperature` | float | ✗ | Sampling randomness. Range is provider-dependent — typically `0.0–2.0` (Anthropic caps at `1.0`). `0.0` is deterministic. |
@@ -558,7 +558,7 @@ for a complete local-server configuration.
558558
## Custom HTTP Headers
559559

560560
For OpenAI-compatible providers (`openai`, `github-copilot`, `mistral`, `xai`,
561-
`nebius`, `nvidia`, `minimax`, `baseten`, `daoxe`, `ovhcloud`, `groq`, `fireworks-ai`, `deepseek`, `cerebras`, `togetherai`, `huggingface`, `moonshotai`, `vercel`, `cloudflare-workers-ai`, `cloudflare-ai-gateway`, `requesty`, `openrouter`, `atlascloud`, `ollama`, and any custom provider using the OpenAI API),
561+
`nebius`, `nvidia`, `minimax`, `baseten`, `daoxe`, `ovhcloud`, `groq`, `fireworks-ai`, `deepseek`, `cerebras`, `togetherai`, `huggingface`, `moonshotai`, `vercel`, `cloudflare-workers-ai`, `cloudflare-ai-gateway`, `requesty`, `openrouter`, `opper`, `atlascloud`, `ollama`, and any custom provider using the OpenAI API),
562562
`provider_opts.http_headers` adds arbitrary HTTP headers to every outgoing
563563
request:
564564

‎docs/data/nav.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,8 @@
227227
url: /providers/opencode-go/
228228
- title: OpenCode Zen
229229
url: /providers/opencode-zen/
230+
- title: Opper
231+
url: /providers/opper/
230232
- title: OpenRouter
231233
url: /providers/openrouter/
232234
- title: OVHcloud

‎docs/providers/opper/index.md‎

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
title: "Opper"
3+
description: "Use Opper models with Docker Agent."
4+
keywords: docker agent, ai agents, model providers, llm, opper
5+
weight: 225
6+
canonical: https://docs.docker.com/ai/docker-agent/providers/opper/
7+
---
8+
9+
_Use Opper models with Docker Agent._
10+
11+
## Overview
12+
13+
[Opper](https://opper.ai) is an EU-hosted AI gateway that serves models from
14+
many providers behind one OpenAI-compatible endpoint, with one API key.
15+
Docker Agent includes built-in support for Opper as an alias provider.
16+
17+
## Setup
18+
19+
1. Create an API key at [platform.opper.ai](https://platform.opper.ai).
20+
2. Set the environment variable:
21+
22+
```bash
23+
export OPPER_API_KEY=your-api-key
24+
```
25+
26+
## Usage
27+
28+
### Inline Syntax
29+
30+
```yaml
31+
agents:
32+
root:
33+
model: opper/claude-sonnet-4-6
34+
description: Assistant using Opper
35+
instruction: You are a helpful assistant.
36+
```
37+
38+
### Named Model
39+
40+
```yaml
41+
models:
42+
opper_model:
43+
provider: opper
44+
model: claude-sonnet-4-6
45+
temperature: 0.7
46+
max_tokens: 8192
47+
48+
agents:
49+
root:
50+
model: opper_model
51+
description: Assistant using Opper
52+
instruction: You are a helpful assistant.
53+
```
54+
55+
## Available Models
56+
57+
Opper model IDs come in two forms. A bare pool name such as
58+
`claude-sonnet-4-6` or `gpt-5.4-mini` lets Opper pick a provider for each
59+
request. A `provider/model` ID such as `anthropic/claude-sonnet-4-6` pins one
60+
route. List the model IDs your key can call with:
61+
62+
```bash
63+
curl https://api.opper.ai/v3/compat/models \
64+
-H "Authorization: Bearer $OPPER_API_KEY"
65+
```
66+
67+
The public catalogue is also available without a key at
68+
`https://api.opper.ai/v3/models`. Docker Agent's default for Opper is
69+
`claude-sonnet-4-6`.

‎docs/providers/overview/index.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ Use this table to find a built-in provider's config key and authentication metho
6767
| Cloudflare AI Gateway | `cloudflare-ai-gateway` | `CLOUDFLARE_API_TOKEN` + `CLOUDFLARE_ACCOUNT_ID` + `CLOUDFLARE_GATEWAY_ID` |
6868
| Requesty | `requesty` | `REQUESTY_API_KEY` |
6969
| OpenRouter | `openrouter` | `OPENROUTER_API_KEY` |
70+
| Opper | `opper` | `OPPER_API_KEY` |
7071
| API Route | `api-route` | `API_ROUTE_API_KEY` |
7172
| Atlas Cloud | [`atlascloud`](../atlascloud/index.md) | `ATLASCLOUD_API_KEY` |
7273
| Azure OpenAI | `azure` | `AZURE_API_KEY` + `base_url` (override the key with `token_key`) |

‎examples/README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ remote MCP endpoints.
210210
| [`atlascloud.yaml`](atlascloud.yaml) | Atlas Cloud open-model host (`atlascloud`). |
211211
| [`baseten.yaml`](baseten.yaml) | Baseten cloud provider. |
212212
| [`daoxe.yaml`](daoxe.yaml) | DaoXE multi-model gateway provider. |
213+
| [`opper.yaml`](opper.yaml) | Opper multi-model gateway provider. |
213214
| [`ovhcloud.yaml`](ovhcloud.yaml) | OVHcloud AI Endpoints provider. |
214215
| [`groq.yaml`](groq.yaml) | Groq fast-inference provider. |
215216
| [`fireworks.yaml`](fireworks.yaml) | Fireworks AI open-model inference (`fireworks-ai`). |

‎examples/opper.yaml‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# yaml-language-server: $schema=../agent-schema.json
2+
3+
models:
4+
opper_model:
5+
provider: opper
6+
model: claude-sonnet-4-6
7+
8+
agents:
9+
root:
10+
model: opper_model
11+
description: Assistant using Opper
12+
instruction: |
13+
You are a helpful assistant.
14+
toolsets:
15+
- type: filesystem
16+
- type: shell
17+
- type: think

‎pkg/config/auto.go‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ var cloudProviders = []providerConfig{
6464
{"openrouter", []string{"OPENROUTER_API_KEY"}, "OPENROUTER_API_KEY", "OPENROUTER_API_KEY"},
6565
{"api-route", []string{"API_ROUTE_API_KEY"}, "API_ROUTE_API_KEY", "API_ROUTE_API_KEY"},
6666
{"atlascloud", []string{"ATLASCLOUD_API_KEY"}, "ATLASCLOUD_API_KEY", "ATLASCLOUD_API_KEY"},
67+
{"opper", []string{"OPPER_API_KEY"}, "OPPER_API_KEY", "OPPER_API_KEY"},
6768
{"baseten", []string{"BASETEN_API_KEY"}, "BASETEN_API_KEY", "BASETEN_API_KEY"},
6869
{"ovhcloud", []string{"OVH_AI_ENDPOINTS_ACCESS_TOKEN"}, "OVH_AI_ENDPOINTS_ACCESS_TOKEN", "OVH_AI_ENDPOINTS_ACCESS_TOKEN"},
6970
{"daoxe", []string{"DAOXE_API_KEY"}, "DAOXE_API_KEY", "DAOXE_API_KEY"},
@@ -163,6 +164,7 @@ var DefaultModels = map[string]string{
163164
"openrouter": "meta-llama/llama-4-maverick",
164165
"api-route": "gpt-6.1-sol",
165166
"atlascloud": "qwen/qwen3.8-max",
167+
"opper": "claude-sonnet-4-6",
166168
"baseten": "deepseek-ai/DeepSeek-V4-Pro",
167169
"ovhcloud": "Qwen3.5-397B-A17B",
168170
"daoxe": "claude-sonnet-4-6",

‎pkg/config/auto_test.go‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,13 @@ func TestAvailableProviders_NoGateway(t *testing.T) {
8888
},
8989
expectedProvider: "atlascloud",
9090
},
91+
{
92+
name: "opper api key present",
93+
envVars: map[string]string{
94+
"OPPER_API_KEY": "test-key",
95+
},
96+
expectedProvider: "opper",
97+
},
9198
{
9299
name: "baseten api key present",
93100
envVars: map[string]string{
@@ -336,6 +343,15 @@ func TestAutoModelConfig(t *testing.T) {
336343
expectedModel: "gpt-6.1-sol",
337344
expectedMaxTokens: 32000,
338345
},
346+
{
347+
name: "opper provider",
348+
envVars: map[string]string{
349+
"OPPER_API_KEY": "test-key",
350+
},
351+
expectedProvider: "opper",
352+
expectedModel: "claude-sonnet-4-6",
353+
expectedMaxTokens: 32000,
354+
},
339355
{
340356
name: "baseten provider",
341357
envVars: map[string]string{

‎pkg/model/provider/aliases.go‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ var Aliases = map[string]Alias{
7575
BaseURL: "https://api.atlascloud.ai/v1",
7676
TokenEnvVar: "ATLASCLOUD_API_KEY",
7777
},
78+
"opper": {
79+
APIType: "openai",
80+
BaseURL: "https://api.opper.ai/v3/compat",
81+
TokenEnvVar: "OPPER_API_KEY",
82+
},
7883
"mistral": {
7984
APIType: "openai",
8085
BaseURL: "https://api.mistral.ai/v1",

0 commit comments

Comments
 (0)