feat: add DaoXE as an OpenAI-compatible provider alias

Mirrors the OVHcloud alias-provider pattern: alias entry with DAOXE_API_KEY,
auto-config support, system-message merge behavior shared with the other
OpenAI-compatible gateway aliases, provider docs page, example recipe, and
test coverage across the touched packages. The models.dev catalog already
carries the daoxe entry, so the default model resolves through it.

Signed-off-by: seven7763 <seven7763@users.noreply.github.com>
This commit is contained in:
seven7763 authored and Arnaud Héritier committed 2026-10-07 17:10:39 +02:00
1 parent 816f77951b
commit de2fa74601
13 files changed
+127 -4

No files matched your search

+1 -1
View File
@@ -224,7 +224,7 @@
"properties": {
"provider": {
"type": "string",
"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, azure, xai, ollama, mistral, baseten, ovhcloud, groq, fireworks-ai, deepseek, cerebras, togetherai, huggingface, moonshotai, vercel, cloudflare-workers-ai, cloudflare-ai-gateway, nvidia, github-copilot, chatgpt, opencode, opencode-go, etc.).",
"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, 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.).",
"examples": [
"openai",
"anthropic",
+3 -3
View File
@@ -18,7 +18,7 @@ models:
first_available: [list] # Optional: candidate model refs, tried in order by available credentials.
# Mutually exclusive with other model settings.
provider: string # Required unless using first_available. One of: openai, anthropic, google, amazon-bedrock,
# dmr, mistral, xai, nebius, nvidia, minimax, baseten, ovhcloud, groq, fireworks-ai, deepseek, cerebras, togetherai, huggingface, moonshotai, vercel, cloudflare-workers-ai, cloudflare-ai-gateway, requesty, openrouter,
# 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,
# azure, ollama, github-copilot, or a named provider defined
# under the top-level `providers:` section.
model: string # Required: model identifier
@@ -60,7 +60,7 @@ models:
| Property | Type | Required | Description |
| --------------------- | ---------- | -------- | ------------------------------------------------------------------------------------- |
| `first_available` | array | ✗ | Candidate model references tried in order; selects the first whose credentials are configured. Mutually exclusive with other model settings. |
| `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`, `ovhcloud`, `groq`, `fireworks-ai`, `deepseek`, `cerebras`, `togetherai`, `huggingface`, `moonshotai`, `vercel`, `cloudflare-workers-ai`, `cloudflare-ai-gateway`, `requesty`, `openrouter`, `azure`, `ollama`, `github-copilot`, `chatgpt`, `opencode`, `opencode-go`, or any [named provider](../../providers/custom/index.md). |
| `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`, `azure`, `ollama`, `github-copilot`, `chatgpt`, `opencode`, `opencode-go`, or any [named provider](../../providers/custom/index.md). |
| `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`) |
| `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). |
| `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.
## Custom HTTP Headers
For OpenAI-compatible providers (`openai`, `github-copilot`, `mistral`, `xai`,
`nebius`, `nvidia`, `minimax`, `baseten`, `ovhcloud`, `groq`, `fireworks-ai`, `deepseek`, `cerebras`, `togetherai`, `huggingface`, `moonshotai`, `vercel`, `cloudflare-workers-ai`, `cloudflare-ai-gateway`, `requesty`, `openrouter`, `ollama`, and any custom provider using the OpenAI API),
`nebius`, `nvidia`, `minimax`, `baseten`, `daoxe`, `ovhcloud`, `groq`, `fireworks-ai`, `deepseek`, `cerebras`, `togetherai`, `huggingface`, `moonshotai`, `vercel`, `cloudflare-workers-ai`, `cloudflare-ai-gateway`, `requesty`, `openrouter`, `ollama`, and any custom provider using the OpenAI API),
`provider_opts.http_headers` adds arbitrary HTTP headers to every outgoing
request:
+2
View File
@@ -177,6 +177,8 @@
url: /providers/cloudflare-workers-ai/
- title: ChatGPT
url: /providers/chatgpt/
- title: DaoXE
url: /providers/daoxe/
- title: DeepSeek
url: /providers/deepseek/
- title: Docker Model Runner
+66
View File
@@ -0,0 +1,66 @@
---
title: "DaoXE"
description: "Use DaoXE models with Docker Agent."
keywords: docker agent, ai agents, model providers, llm, daoxe
weight: 245
canonical: https://docs.docker.com/ai/docker-agent/providers/daoxe/
---
_Use DaoXE models with Docker Agent._
## Overview
[DaoXE](https://daoxe.com) is a multi-model LLM gateway that serves models from
multiple vendors behind one OpenAI-compatible endpoint. Docker Agent includes
built-in support for DaoXE as an alias provider.
## Setup
1. Create an API key from your DaoXE account dashboard.
2. Set the environment variable:
```bash
export DAOXE_API_KEY=your-api-key
```
## Usage
### Inline Syntax
```yaml
agents:
root:
model: daoxe/<model-id>
description: Assistant using DaoXE
instruction: You are a helpful assistant.
```
### Named Model
```yaml
models:
daoxe_model:
provider: daoxe
model: <model-id>
temperature: 0.7
max_tokens: 8192
agents:
root:
model: daoxe_model
description: Assistant using DaoXE
instruction: You are a helpful assistant.
```
## Available Models
DaoXE's catalog is account-scoped and changes over time: new models appear as
upstream vendors release them. List the model IDs your account can call with:
```bash
curl https://api.daoxe.com/v1/models \
-H "Authorization: Bearer $DAOXE_API_KEY"
```
Use any ID from that response as the `model` value. Docker Agent's default for
DaoXE is `claude-sonnet-4-6`.
+1
View File
@@ -53,6 +53,7 @@ Use this table to find a built-in provider's config key and authentication metho
| NVIDIA NIM | `nvidia` | `NVIDIA_API_KEY` |
| MiniMax | `minimax` | `MINIMAX_API_KEY` |
| Baseten | `baseten` | `BASETEN_API_KEY` |
| DaoXE | `daoxe` | `DAOXE_API_KEY` |
| OVHcloud | `ovhcloud` | `OVH_AI_ENDPOINTS_ACCESS_TOKEN` |
| Groq | `groq` | `GROQ_API_KEY` |
| Fireworks AI | `fireworks-ai` | `FIREWORKS_API_KEY` |
+1
View File
@@ -199,6 +199,7 @@ remote MCP endpoints.
| [`model_env_substitution.yaml`](model_env_substitution.yaml) | `${env.VAR}` substitution in a model's `model` / `base_url`. |
| [`nebius.yaml`](nebius.yaml) | Nebius cloud provider. |
| [`baseten.yaml`](baseten.yaml) | Baseten cloud provider. |
| [`daoxe.yaml`](daoxe.yaml) | DaoXE multi-model gateway provider. |
| [`ovhcloud.yaml`](ovhcloud.yaml) | OVHcloud AI Endpoints provider. |
| [`groq.yaml`](groq.yaml) | Groq fast-inference provider. |
| [`fireworks.yaml`](fireworks.yaml) | Fireworks AI open-model inference (`fireworks-ai`). |
+17
View File
@@ -0,0 +1,17 @@
# yaml-language-server: $schema=../agent-schema.json
models:
daoxe_model:
provider: daoxe
model: claude-sonnet-4-6
agents:
root:
model: daoxe_model
description: Assistant using DaoXE
instruction: |
You are a helpful assistant.
toolsets:
- type: filesystem
- type: shell
- type: think
+2
View File
@@ -64,6 +64,7 @@ var cloudProviders = []providerConfig{
{"openrouter", []string{"OPENROUTER_API_KEY"}, "OPENROUTER_API_KEY", "OPENROUTER_API_KEY"},
{"baseten", []string{"BASETEN_API_KEY"}, "BASETEN_API_KEY", "BASETEN_API_KEY"},
{"ovhcloud", []string{"OVH_AI_ENDPOINTS_ACCESS_TOKEN"}, "OVH_AI_ENDPOINTS_ACCESS_TOKEN", "OVH_AI_ENDPOINTS_ACCESS_TOKEN"},
{"daoxe", []string{"DAOXE_API_KEY"}, "DAOXE_API_KEY", "DAOXE_API_KEY"},
{"groq", []string{"GROQ_API_KEY"}, "GROQ_API_KEY", "GROQ_API_KEY"},
{"fireworks-ai", []string{"FIREWORKS_API_KEY"}, "FIREWORKS_API_KEY", "FIREWORKS_API_KEY"},
{"deepseek", []string{"DEEPSEEK_API_KEY"}, "DEEPSEEK_API_KEY", "DEEPSEEK_API_KEY"},
@@ -160,6 +161,7 @@ var DefaultModels = map[string]string{
"openrouter": "meta-llama/llama-4-maverick",
"baseten": "deepseek-ai/DeepSeek-V4-Pro",
"ovhcloud": "Qwen3.5-397B-A17B",
"daoxe": "claude-sonnet-4-6",
"groq": "llama-3.3-70b-versatile",
"fireworks-ai": "accounts/fireworks/models/kimi-k3",
"deepseek": "deepseek-v4-pro",
+16
View File
@@ -88,6 +88,13 @@ func TestAvailableProviders_NoGateway(t *testing.T) {
},
expectedProvider: "ovhcloud",
},
{
name: "daoxe api key present",
envVars: map[string]string{
"DAOXE_API_KEY": "test-key",
},
expectedProvider: "daoxe",
},
{
name: "groq api key present",
envVars: map[string]string{
@@ -324,6 +331,15 @@ func TestAutoModelConfig(t *testing.T) {
expectedModel: "Qwen3.5-397B-A17B",
expectedMaxTokens: 32000,
},
{
name: "daoxe provider",
envVars: map[string]string{
"DAOXE_API_KEY": "test-key",
},
expectedProvider: "daoxe",
expectedModel: "claude-sonnet-4-6",
expectedMaxTokens: 32000,
},
{
name: "groq provider",
envVars: map[string]string{
+5
View File
@@ -89,6 +89,11 @@ var Aliases = map[string]Alias{
BaseURL: "https://oai.endpoints.kepler.ai.cloud.ovh.net/v1",
TokenEnvVar: "OVH_AI_ENDPOINTS_ACCESS_TOKEN",
},
"daoxe": {
APIType: "openai",
BaseURL: "https://api.daoxe.com/v1",
TokenEnvVar: "DAOXE_API_KEY",
},
"groq": {
APIType: "openai",
BaseURL: "https://api.groq.com/openai/v1",
+1
View File
@@ -40,6 +40,7 @@ func TestCatalogAliases(t *testing.T) {
expected := map[string]Alias{
"openrouter": {APIType: "openai", BaseURL: "https://openrouter.ai/api/v1", TokenEnvVar: "OPENROUTER_API_KEY"},
"baseten": {APIType: "openai", BaseURL: "https://inference.baseten.co/v1", TokenEnvVar: "BASETEN_API_KEY"},
"daoxe": {APIType: "openai", BaseURL: "https://api.daoxe.com/v1", TokenEnvVar: "DAOXE_API_KEY"},
"ovhcloud": {APIType: "openai", BaseURL: "https://oai.endpoints.kepler.ai.cloud.ovh.net/v1", TokenEnvVar: "OVH_AI_ENDPOINTS_ACCESS_TOKEN"},
"groq": {APIType: "openai", BaseURL: "https://api.groq.com/openai/v1", TokenEnvVar: "GROQ_API_KEY"},
"deepseek": {APIType: "openai", BaseURL: "https://api.deepseek.com/v1", TokenEnvVar: "DEEPSEEK_API_KEY"},
+1
View File
@@ -263,6 +263,7 @@ func (c *Client) convertMessages(ctx context.Context, messages []chat.Message) [
// system messages and are deliberately absent so their behavior is unchanged.
var openModelHostProviders = map[string]bool{
"baseten": true,
"daoxe": true,
"ovhcloud": true,
"openrouter": true,
"nebius": true,
@@ -35,6 +35,16 @@ func TestChatCompletions_MergesConsecutiveSystemMessages(t *testing.T) {
})
}
func TestDaoxe_MergesConsecutiveSystemMessages(t *testing.T) {
t.Parallel()
assertMergesConsecutiveMessages(t, &latest.ModelConfig{
Provider: "daoxe",
Model: "gpt-4o",
TokenKey: "MY_TOKEN",
})
}
func TestBaseten_MergesConsecutiveSystemMessages(t *testing.T) {
t.Parallel()
@@ -159,6 +169,7 @@ func TestShouldMergeConsecutiveMessages_Gating(t *testing.T) {
{"open-model host alias openrouter", &latest.ModelConfig{Provider: "openrouter", Model: "qwen/qwen3.6-35b"}, true},
{"open-model host alias nebius", &latest.ModelConfig{Provider: "nebius", Model: "Qwen/Qwen3"}, true},
{"baseten", &latest.ModelConfig{Provider: "baseten", Model: "zai-org/GLM-5.2"}, true},
{"daoxe, no base_url", &latest.ModelConfig{Provider: "daoxe", Model: "claude-sonnet-4-6"}, true},
{"ovhcloud", &latest.ModelConfig{Provider: "ovhcloud", Model: "Qwen3.5-397B-A17B"}, true},
{"open-model host alias cerebras", &latest.ModelConfig{Provider: "cerebras", Model: "qwen-3-coder-480b"}, true},
{"open-model host fireworks", &latest.ModelConfig{Provider: "fireworks", Model: "accounts/fireworks/models/kimi-k3"}, true},