Skip to content
Merged
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
5 changes: 5 additions & 0 deletions .env.template
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,11 @@
# Set base URL to enable (default: http://localhost:11434/v1)
# OLLAMA_BASE_URL=http://localhost:11434/v1

# Alibaba Cloud Bailian (百炼)
# BAILIAN_API_KEY=...
# BAILIAN_BASE_URL=https://dashscope.aliyuncs.com/compatible-mode/v1
Comment thread
coderabbitai[bot] marked this conversation as resolved.
# BAILIAN_MODELS=text-embedding-v3,text-embedding-v4

# vLLM (OpenAI-compatible server)
# VLLM_API_KEY is optional; set it only if vllm serve was started with --api-key.
# VLLM_API_KEY=token-abc123
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,14 @@
# Local git worktrees
/.worktrees/

# Local pre-commit hook (not shared)
/.githooks/

# Others
/*.bck.yml
/repomix-output.*
/coverage.out
/.claude/

# Superpower design docs and plans (never commit)
/docs/superpowers/
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,5 +128,5 @@ Full reference: `.env.template` and `config/config.yaml`
- **Resilience:** Configured via `config/config.yaml` - global `resilience.retry.*` and `resilience.circuit_breaker.*` defaults with optional per-provider overrides under `providers.<name>.resilience.retry.*` and `providers.<name>.resilience.circuit_breaker.*`. Retry defaults: `max_retries` (3), `initial_backoff` (1s), `max_backoff` (30s), `backoff_factor` (2.0), `jitter_factor` (0.1). Circuit breaker defaults: `failure_threshold` (5), `success_threshold` (2), `timeout` (30s)
- **Metrics:** `METRICS_ENABLED` (false), `METRICS_ENDPOINT` (/metrics)
- **Guardrails:** Configured via `config/config.yaml` only (except `GUARDRAILS_ENABLED` env var)
- **Providers:** `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, `GEMINI_API_KEY`, `USE_GOOGLE_GEMINI_NATIVE_API` (true by default; false uses Gemini's OpenAI-compatible chat API), `XAI_API_KEY`, `GROQ_API_KEY`, `OPENROUTER_API_KEY`, `ZAI_API_KEY`, `ZAI_BASE_URL` (optional Z.ai endpoint override), `MINIMAX_API_KEY`, `MINIMAX_BASE_URL` (optional MiniMax endpoint override), `XIAOMI_API_KEY`, `XIAOMI_BASE_URL` (optional Xiaomi MiMo endpoint override), `AZURE_API_KEY`, `AZURE_BASE_URL` (Azure OpenAI deployment base URL), `AZURE_API_VERSION` (optional Azure API version), `ORACLE_API_KEY` (Oracle API key), `ORACLE_BASE_URL` (Oracle OpenAI-compatible base URL), `<PROVIDER>[_SUFFIX]_MODELS` (comma-separated configured model list for any provider type), `OLLAMA_BASE_URL`, `VLLM_BASE_URL`, `VLLM_API_KEY` (optional upstream vLLM bearer token)
- **Providers:** `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, `GEMINI_API_KEY`, `USE_GOOGLE_GEMINI_NATIVE_API` (true by default; false uses Gemini's OpenAI-compatible chat API), `XAI_API_KEY`, `GROQ_API_KEY`, `OPENROUTER_API_KEY`, `ZAI_API_KEY`, `ZAI_BASE_URL` (optional Z.ai endpoint override), `MINIMAX_API_KEY`, `MINIMAX_BASE_URL` (optional MiniMax endpoint override), `XIAOMI_API_KEY`, `XIAOMI_BASE_URL` (optional Xiaomi MiMo endpoint override), `BAILIAN_API_KEY`, `BAILIAN_BASE_URL` (optional Bailian base URL for region switching; default `https://dashscope.aliyuncs.com/compatible-mode/v1`), `AZURE_API_KEY`, `AZURE_BASE_URL` (Azure OpenAI deployment base URL), `AZURE_API_VERSION` (optional Azure API version), `ORACLE_API_KEY` (Oracle API key), `ORACLE_BASE_URL` (Oracle OpenAI-compatible base URL), `<PROVIDER>[_SUFFIX]_MODELS` (comma-separated configured model list for any provider type), `OLLAMA_BASE_URL`, `VLLM_BASE_URL`, `VLLM_API_KEY` (optional upstream vLLM bearer token)
- **Provider model metadata:** `providers.<name>.models` accepts either model IDs (strings) or `{id, metadata}` objects. When `metadata` is supplied (`display_name`, `context_window`, `max_output_tokens`, `modes`, `capabilities`, `pricing`, …) it is merged onto the remote ai-model-list entry during enrichment, with operator values winning per-field. Primary use case: advertising context windows, capabilities, and pricing for local models (Ollama) and other custom endpoints whose IDs are not in the upstream registry.
Comment on lines +131 to 132

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add BAILIAN_MODELS to the provider reference.

This list is still incomplete without the embedding allowlist variable that the new Bailian docs and env template already advertise.

✍️ Suggested update
-  - `BAILIAN_BASE_URL` (optional Bailian base URL for region switching; default `https://dashscope.aliyuncs.com/compatible-mode/v1`), `AZURE_API_KEY`, ...
+  - `BAILIAN_BASE_URL` (optional Bailian base URL for region switching; default `https://dashscope.aliyuncs.com/compatible-mode/v1`),
+    `BAILIAN_MODELS` (optional model allowlist for embeddings), `AZURE_API_KEY`, ...
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- **Providers:** `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, `GEMINI_API_KEY`, `USE_GOOGLE_GEMINI_NATIVE_API` (true by default; false uses Gemini's OpenAI-compatible chat API), `XAI_API_KEY`, `GROQ_API_KEY`, `OPENROUTER_API_KEY`, `ZAI_API_KEY`, `ZAI_BASE_URL` (optional Z.ai endpoint override), `MINIMAX_API_KEY`, `MINIMAX_BASE_URL` (optional MiniMax endpoint override), `XIAOMI_API_KEY`, `XIAOMI_BASE_URL` (optional Xiaomi MiMo endpoint override), `BAILIAN_API_KEY`, `BAILIAN_BASE_URL` (optional Bailian base URL for region switching; default `https://dashscope.aliyuncs.com/compatible-mode/v1`), `AZURE_API_KEY`, `AZURE_BASE_URL` (Azure OpenAI deployment base URL), `AZURE_API_VERSION` (optional Azure API version), `ORACLE_API_KEY` (Oracle API key), `ORACLE_BASE_URL` (Oracle OpenAI-compatible base URL), `<PROVIDER>[_SUFFIX]_MODELS` (comma-separated configured model list for any provider type), `OLLAMA_BASE_URL`, `VLLM_BASE_URL`, `VLLM_API_KEY` (optional upstream vLLM bearer token)
- **Provider model metadata:** `providers.<name>.models` accepts either model IDs (strings) or `{id, metadata}` objects. When `metadata` is supplied (`display_name`, `context_window`, `max_output_tokens`, `modes`, `capabilities`, `pricing`, …) it is merged onto the remote ai-model-list entry during enrichment, with operator values winning per-field. Primary use case: advertising context windows, capabilities, and pricing for local models (Ollama) and other custom endpoints whose IDs are not in the upstream registry.
- **Providers:** `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, `GEMINI_API_KEY`, `USE_GOOGLE_GEMINI_NATIVE_API` (true by default; false uses Gemini's OpenAI-compatible chat API), `XAI_API_KEY`, `GROQ_API_KEY`, `OPENROUTER_API_KEY`, `ZAI_API_KEY`, `ZAI_BASE_URL` (optional Z.ai endpoint override), `MINIMAX_API_KEY`, `MINIMAX_BASE_URL` (optional MiniMax endpoint override), `XIAOMI_API_KEY`, `XIAOMI_BASE_URL` (optional Xiaomi MiMo endpoint override), `BAILIAN_API_KEY`, `BAILIAN_BASE_URL` (optional Bailian base URL for region switching; default `https://dashscope.aliyuncs.com/compatible-mode/v1`), `BAILIAN_MODELS` (optional model allowlist for embeddings), `AZURE_API_KEY`, `AZURE_BASE_URL` (Azure OpenAI deployment base URL), `AZURE_API_VERSION` (optional Azure API version), `ORACLE_API_KEY` (Oracle API key), `ORACLE_BASE_URL` (Oracle OpenAI-compatible base URL), `<PROVIDER>[_SUFFIX]_MODELS` (comma-separated configured model list for any provider type), `OLLAMA_BASE_URL`, `VLLM_BASE_URL`, `VLLM_API_KEY` (optional upstream vLLM bearer token)
- **Provider model metadata:** `providers.<name>.models` accepts either model IDs (strings) or `{id, metadata}` objects. When `metadata` is supplied (`display_name`, `context_window`, `max_output_tokens`, `modes`, `capabilities`, `pricing`, …) it is merged onto the remote ai-model-list entry during enrichment, with operator values winning per-field. Primary use case: advertising context windows, capabilities, and pricing for local models (Ollama) and other custom endpoints whose IDs are not in the upstream registry.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@CLAUDE.md` around lines 131 - 132, The provider reference in CLAUDE.md is
missing the BAILIAN_MODELS environment variable configuration, which should be
documented alongside the existing BAILIAN_API_KEY and BAILIAN_BASE_URL entries.
Add BAILIAN_MODELS to the provider environment variables list to complete the
Bailian provider documentation, following the same pattern used for other
provider model lists like OPENAI_MODELS, ANTHROPIC_MODELS, etc.

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ Example model identifiers are illustrative and subject to change; consult provid
| OpenRouter | `OPENROUTER_API_KEY` | `google/gemini-2.5-flash` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| Z.ai | `ZAI_API_KEY` (`ZAI_BASE_URL` optional) | `glm-5.1` | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ |
| xAI (Grok) | `XAI_API_KEY` | `grok-4` | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ |
| Alibaba Cloud Bailian | `BAILIAN_API_KEY` (`BAILIAN_BASE_URL` optional) | `qwen3-max` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| MiniMax | `MINIMAX_API_KEY` (`MINIMAX_BASE_URL` optional) | `MiniMax-M3` | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ |
| Xiaomi MiMo | `XIAOMI_API_KEY` (`XIAOMI_BASE_URL` optional) | `mimo-v2.5-pro` | ✅ | ✅ | ❌ | ❌ | ❌ | ✅ |
| Azure OpenAI | `AZURE_API_KEY` + `AZURE_BASE_URL` (`AZURE_API_VERSION` optional) | `gpt-5` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
Expand Down
2 changes: 1 addition & 1 deletion cmd/gomodel/docs/docs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion cmd/gomodel/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"gomodel/internal/providers"
"gomodel/internal/providers/anthropic"
"gomodel/internal/providers/azure"
"gomodel/internal/providers/bailian"
"gomodel/internal/providers/bedrock"
"gomodel/internal/providers/deepseek"
"gomodel/internal/providers/gemini"
Expand Down Expand Up @@ -76,7 +77,7 @@ func startApplication(application lifecycleApp, addr string) error {

// @title GoModel API
// @version 1.0
// @description AI gateway routing requests to multiple LLM providers (OpenAI, Anthropic, Gemini, Groq, OpenRouter, DeepSeek, Z.ai, xAI, MiniMax, Xiaomi MiMo, Oracle, Ollama). Drop-in OpenAI-compatible API.
// @description AI gateway routing requests to multiple LLM providers (OpenAI, Anthropic, Gemini, Groq, OpenRouter, DeepSeek, Z.ai, xAI, MiniMax, Xiaomi MiMo, Oracle, Ollama, Bailian). Drop-in OpenAI-compatible API.
// @BasePath /
// @schemes http
// @securityDefinitions.apikey BearerAuth
Expand Down Expand Up @@ -120,6 +121,7 @@ func main() {
factory.Add(openai.Registration)
factory.Add(openrouter.Registration)
factory.Add(azure.Registration)
factory.Add(bailian.Registration)
factory.Add(oracle.Registration)
factory.Add(anthropic.Registration)
factory.Add(bedrock.Registration)
Expand Down
11 changes: 10 additions & 1 deletion config/config.example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ server:
enable_passthrough_routes: true # expose /p/{provider}/{endpoint} passthrough routes
allow_passthrough_v1_alias: true # allow /p/{provider}/v1/... while keeping /p/{provider}/... canonical
user_path_header: "X-GoModel-User-Path" # env: USER_PATH_HEADER; inbound header used for user_path scoping
enabled_passthrough_providers: ["openai", "anthropic", "openrouter", "zai", "vllm", "deepseek"] # providers enabled on /p/{provider}/...
enabled_passthrough_providers: ["openai", "anthropic", "openrouter", "zai", "vllm", "deepseek", "bailian"] # providers enabled on /p/{provider}/...

models:
enabled_by_default: true # env: MODELS_ENABLED_BY_DEFAULT; when false, models stay unavailable until an override allows one or more user paths
Expand Down Expand Up @@ -199,6 +199,15 @@ providers:
type: anthropic
api_key: "sk-ant-..."

bailian:
type: bailian
api_key: "${BAILIAN_API_KEY}"
# base_url: "https://dashscope.aliyuncs.com/compatible-mode/v1"
# Alternative regions (replace {workspace-id} with your workspace):
# Singapore: "https://{workspace-id}.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1"
# Frankfurt: "https://{workspace-id}.eu-central-1.maas.aliyuncs.com/compatible-mode/v1"
# Hong Kong: "https://{workspace-id}.cn-hongkong.maas.aliyuncs.com/compatible-mode/v1"

Comment thread
coderabbitai[bot] marked this conversation as resolved.
gemini:
type: gemini
api_key: "..."
Expand Down
2 changes: 1 addition & 1 deletion config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1125,7 +1125,7 @@ func TestLoad_ConfigExample_UsesNestedModelCacheSettings(t *testing.T) {
t.Fatalf("expected Cache.Model.Redis to be nil in example config, got %+v", result.Config.Cache.Model.Redis)
}
gotProviders := result.Config.Server.EnabledPassthroughProviders
wantProviders := []string{"openai", "anthropic", "openrouter", "zai", "vllm", "deepseek"}
wantProviders := []string{"openai", "anthropic", "openrouter", "zai", "vllm", "deepseek", "bailian"}
if !reflect.DeepEqual(gotProviders, wantProviders) {
t.Fatalf("Server.EnabledPassthroughProviders = %v, want %v", gotProviders, wantProviders)
Comment on lines 1127 to 1130

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Keep the config tests isolated from Bailian env leakage.

clearProviderEnvVars still does not clear BAILIAN_API_KEY, BAILIAN_BASE_URL, or BAILIAN_MODELS. Once Bailian is part of the expected provider set, any ambient Bailian env vars can leak into the zero-config and provider-discovery tests.

🔧 Suggested fix
   "OLLAMA_API_KEY", "OLLAMA_BASE_URL", "OLLAMA_MODELS",
+  "BAILIAN_API_KEY", "BAILIAN_BASE_URL", "BAILIAN_MODELS",
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@config/config_test.go` around lines 1127 - 1130, The clearProviderEnvVars
function is not clearing the Bailian-related environment variables
(BAILIAN_API_KEY, BAILIAN_BASE_URL, and BAILIAN_MODELS), which can cause these
env vars to leak into the zero-config and provider-discovery tests. Update the
clearProviderEnvVars function to also clear these three Bailian environment
variables along with the other provider-specific env vars it currently clears,
ensuring test isolation is maintained.

}
Expand Down
1 change: 1 addition & 0 deletions docs/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
"providers/anthropic",
"providers/gemini",
"providers/deepseek",
"providers/bailian",
"providers/xiaomi",
"providers/vllm",
"providers/multiple-ollama",
Expand Down
2 changes: 1 addition & 1 deletion docs/openapi.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"openapi": "3.0.0",
"info": {
"description": "AI gateway routing requests to multiple LLM providers (OpenAI, Anthropic, Gemini, Groq, OpenRouter, DeepSeek, Z.ai, xAI, MiniMax, Oracle, Ollama). Drop-in OpenAI-compatible API.",
"description": "AI gateway routing requests to multiple LLM providers (OpenAI, Anthropic, Gemini, Groq, OpenRouter, DeepSeek, Z.ai, xAI, MiniMax, Xiaomi MiMo, Bailian, Oracle, Ollama). Drop-in OpenAI-compatible API.",
"title": "GoModel API",
"contact": {},
"version": "1.0"
Expand Down
104 changes: 104 additions & 0 deletions docs/providers/bailian.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
---
title: "Alibaba Cloud Bailian"
description: "Configure Alibaba Cloud Bailian (百炼 / DashScope) in GoModel, including the max_tokens compatibility shim for models like Qwen."
icon: "cloud"
---

Bailian (百炼) is Alibaba Cloud's model-as-a-service platform for the Qwen
family of models. GoModel routes to Bailian through its OpenAI-compatible
endpoint (`/compatible-mode/v1`).

Because Bailian deprecated `max_tokens` in April 2026 in favor of
`max_completion_tokens`, GoModel automatically maps the standard
`max_tokens` field to `max_completion_tokens` for every request — no
client change required.

## Configure

```bash
BAILIAN_API_KEY=...
```

Or in `config.yaml`:

```yaml
providers:
bailian:
type: bailian
api_key: "${BAILIAN_API_KEY}"
# base_url: "https://dashscope.aliyuncs.com/compatible-mode/v1"
```

## Base URLs

Bailian's OpenAI-compatible API is available in multiple regions. Set
`BAILIAN_BASE_URL` to switch:

| Region | URL |
| ------ | --- |
| Beijing (default) | `https://dashscope.aliyuncs.com/compatible-mode/v1` |
| Singapore | `https://{workspace-id}.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1` |
| Frankfurt | `https://{workspace-id}.eu-central-1.maas.aliyuncs.com/compatible-mode/v1` |
| Hong Kong | `https://{workspace-id}.cn-hongkong.maas.aliyuncs.com/compatible-mode/v1` |

## Model IDs

Common Qwen model identifiers — check the [Bailian model
list](https://www.alibabacloud.com/help/zh/model-studio/model-list) for the
current catalog:

| Model | Example ID |
| ----- | ---------- |
| Qwen 3.7 Max | `qwen3.7-max` |
| Qwen 3.7 Plus | `qwen3.7-plus` |
| Qwen 3.6 Flash | `qwen3.6-flash` |
| Qwen 3 Max | `qwen3-max` |
| Qwen 3 Plus | `qwen3-plus` |
| Qwen 3 Flash | `qwen3-flash` |
| Qwen 3 Coder Plus | `qwen3-coder-plus` |
| Text Embedding | `text-embedding-v3` |

## `max_tokens` compatibility

Bailian deprecated `max_tokens` on 2026-04-20 (effective 2026-05-30).
All Bailian models now require `max_completion_tokens` instead.

GoModel transparently maps the standard `max_tokens` parameter to
`max_completion_tokens` for every bailian model — send `max_tokens` as you
normally would, and GoModel rewrites it before forwarding to Bailian.

```bash
# max_tokens=4096 is automatically sent as max_completion_tokens=4096
curl http://localhost:8080/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3-max",
"messages": [{"role": "user", "content": "Hello"}],
"max_tokens": 4096
}'
```

## Supported features

| Feature | Supported |
| ------- | :-------: |
| Chat completions | ✅ |
| Streaming chat | ✅ |
| Responses (`/v1/responses`) | ✅ (translated to chat) |
| Embeddings | ✅ (configure model IDs via `BAILIAN_MODELS`) |
| Files (`/v1/files`) | ✅ |
| Batches (`/v1/batches`) | ✅ |
| Passthrough (`/p/bailian/...`) | ✅ |

<Note>
Embedding models (`text-embedding-v3`, `text-embedding-v4`) are served by
the compatible-mode API but are **not** auto-discovered from the upstream
`/v1/models` endpoint. Set `BAILIAN_MODELS=text-embedding-v3,text-embedding-v4`
or use `CONFIGURED_PROVIDER_MODELS_MODE=allowlist` to make them available.
</Note>
Comment on lines +93 to +98

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Don't make allowlist sound like a substitute for BAILIAN_MODELS.

CONFIGURED_PROVIDER_MODELS_MODE=allowlist only changes which configured models are exposed; it doesn't surface embeddings unless BAILIAN_MODELS is set. Please rephrase this note so the dependency stays explicit.

✍️ Suggested wording
-  Set `BAILIAN_MODELS=text-embedding-v3,text-embedding-v4`
-  or use `CONFIGURED_PROVIDER_MODELS_MODE=allowlist` to make them available.
+  Set `BAILIAN_MODELS=text-embedding-v3,text-embedding-v4`.
+  Optionally use `CONFIGURED_PROVIDER_MODELS_MODE=allowlist` if you want
+  only the configured models exposed.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<Note>
Embedding models (`text-embedding-v3`, `text-embedding-v4`) are served by
the compatible-mode API but are **not** auto-discovered from the upstream
`/v1/models` endpoint. Set `BAILIAN_MODELS=text-embedding-v3,text-embedding-v4`
or use `CONFIGURED_PROVIDER_MODELS_MODE=allowlist` to make them available.
</Note>
<Note>
Embedding models (`text-embedding-v3`, `text-embedding-v4`) are served by
the compatible-mode API but are **not** auto-discovered from the upstream
`/v1/models` endpoint. Set `BAILIAN_MODELS=text-embedding-v3,text-embedding-v4`.
Optionally use `CONFIGURED_PROVIDER_MODELS_MODE=allowlist` if you want
only the configured models exposed.
</Note>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/providers/bailian.mdx` around lines 93 - 98, The current note in the
Bailian provider documentation presents `BAILIAN_MODELS` and
`CONFIGURED_PROVIDER_MODELS_MODE=allowlist` as alternative solutions, which is
misleading. Rephrase the note to clarify that `BAILIAN_MODELS` must be set to
make embedding models available, and that
`CONFIGURED_PROVIDER_MODELS_MODE=allowlist` is a separate configuration that
only controls which pre-configured models are exposed. Make the dependency
explicit by explaining that setting
`BAILIAN_MODELS=text-embedding-v3,text-embedding-v4` is the required step, and
`CONFIGURED_PROVIDER_MODELS_MODE=allowlist` can be additionally used if you want
to restrict model visibility to only configured models.


## References

- [Bailian documentation](https://www.alibabacloud.com/help/zh/model-studio/)
- [OpenAI-compatible API reference](https://www.alibabacloud.com/help/zh/model-studio/compatibility-with-openai-responses-api)
- [Qwen model list](https://www.alibabacloud.com/help/zh/model-studio/model-list)
1 change: 1 addition & 0 deletions docs/providers/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ quirks.
| Z.ai | `ZAI_API_KEY` (`ZAI_BASE_URL` optional) | — |
| xAI (Grok) | `XAI_API_KEY` | — |
| MiniMax | `MINIMAX_API_KEY` (`MINIMAX_BASE_URL` optional) | — |
| Alibaba Cloud Bailian | `BAILIAN_API_KEY` (`BAILIAN_BASE_URL` optional) | [Alibaba Cloud Bailian](/providers/bailian) |
| Xiaomi MiMo | `XIAOMI_API_KEY` (`XIAOMI_BASE_URL` optional) | [Xiaomi MiMo](/providers/xiaomi) |
| Azure OpenAI | `AZURE_API_KEY` + `AZURE_BASE_URL` (`AZURE_API_VERSION` optional) | [Azure OpenAI](/providers/azure) |
| Amazon Bedrock | `BEDROCK_BASE_URL` (region or endpoint) + AWS credentials | [Amazon Bedrock](/providers/bedrock) |
Expand Down
Loading
Loading