documentation: Update ocm/ccm examples

This commit is contained in:
世界
2026-03-10 21:49:18 +08:00
parent 67621ee6ba
commit 8bb4c4dd32
4 changed files with 81 additions and 18 deletions

View File

@@ -37,7 +37,9 @@ OCMOpenAI Codex 多路复用器)服务是一个多路复用服务,允许
OpenAI OAuth 凭据文件的路径。
如果未指定,默认值为 `~/.codex/auth.json`
如果未指定,默认值为
- 如果设置了 `CODEX_HOME` 环境变量,则使用 `$CODEX_HOME/auth.json`
- 否则使用 `~/.codex/auth.json`
刷新的令牌会自动写回相同位置。
@@ -111,6 +113,9 @@ TLS 配置,参阅 [TLS](/zh/configuration/shared/tls/#inbound)。
`~/.codex/config.toml` 中添加:
```toml
# profile = "ocm" # 设为默认配置
[model_providers.ocm]
name = "OCM Proxy"
base_url = "http://127.0.0.1:8080/v1"
@@ -143,11 +148,11 @@ codex --profile ocm
"users": [
{
"name": "alice",
"token": "sk-alice-secret-token"
"token": "sk-ocm-hello-world"
},
{
"name": "bob",
"token": "sk-bob-secret-token"
"token": "sk-ocm-hello-bob"
}
]
}
@@ -160,11 +165,13 @@ codex --profile ocm
`~/.codex/config.toml` 中添加:
```toml
# profile = "ocm" # 设为默认配置
[model_providers.ocm]
name = "OCM Proxy"
base_url = "http://127.0.0.1:8080/v1"
supports_websockets = true
experimental_bearer_token = "sk-alice-secret-token"
experimental_bearer_token = "sk-ocm-hello-world"
[profiles.ocm]
model_provider = "ocm"