docs: neutralize provider-specific path wording

This commit is contained in:
Ravi Tharuma
2026-03-27 11:11:06 +01:00
parent d54de441d3
commit 224f0de353
3 changed files with 12 additions and 12 deletions

View File

@@ -74,11 +74,11 @@ CLIProxyAPI includes integrated support for [Amp CLI](https://ampcode.com) and A
- **Model mapping** to route unavailable models to alternatives (e.g., `claude-opus-4.5``claude-sonnet-4`)
- Security-first design with localhost-only management endpoints
When routing needs to stay deterministic, prefer the provider-specific paths over the merged OpenAI-compatible `/v1/...` endpoints:
When routing needs to stay deterministic, prefer the provider-specific paths over the merged `/v1/...` endpoints:
- Use `/api/provider/anthropic/v1/messages` to force the Anthropic executor.
- Use `/api/provider/google/v1beta/models/...` to force the Gemini/Google executor.
- Use `/api/provider/openai/v1/chat/completions` for OpenAI-compatible executors.
- Use `/api/provider/{provider}/v1/messages` for messages-style backends.
- Use `/api/provider/{provider}/v1beta/models/...` for model-scoped generate endpoints.
- Use `/api/provider/{provider}/v1/chat/completions` for chat-completions backends.
This matters when `oauth-model-alias`, alias pools, or fallback mappings reuse the same client-visible model name across multiple backends. In those cases, `/v1/models` may show the merged alias view instead of the executor you intend to hit. Treat the provider-specific request path as the source of truth for backend selection.

View File

@@ -73,11 +73,11 @@ CLIProxyAPI 已内置对 [Amp CLI](https://ampcode.com) 和 Amp IDE 扩展的支
- 智能模型回退与自动路由
- 以安全为先的设计,管理端点仅限 localhost
当你需要确定地命中某个后端执行器时,优先使用 provider-specific 路径,而不是合并后的 OpenAI 兼容 `/v1/...` 端点:
当你需要确定地命中某个后端执行器时,优先使用 provider-specific 路径,而不是合并后的 `/v1/...` 端点:
- 使用 `/api/provider/anthropic/v1/messages` 强制走 Anthropic 执行器
- 使用 `/api/provider/google/v1beta/models/...` 强制走 Gemini/Google 执行器
- 使用 `/api/provider/openai/v1/chat/completions` 强制走 OpenAI 兼容执行器
- 对于 messages 风格的后端,使用 `/api/provider/{provider}/v1/messages`
- 对于按模型路径暴露生成接口的后端,使用 `/api/provider/{provider}/v1beta/models/...`
- 对于 chat-completions 风格的后端,使用 `/api/provider/{provider}/v1/chat/completions`
这一点在 `oauth-model-alias`、alias 池或 model fallback 让多个后端复用同一个客户端可见模型名时尤其重要。此时 `/v1/models` 可能展示的是合并后的别名视图,而不是你真正想命中的执行器。对于后端选择,请以 provider-specific 的请求路径为准。

View File

@@ -74,11 +74,11 @@ CLIProxyAPIは[Amp CLI](https://ampcode.com)およびAmp IDE拡張機能の統
- 利用できないモデルを代替モデルにルーティングする**モデルマッピング**(例:`claude-opus-4.5``claude-sonnet-4`
- localhostのみの管理エンドポイントによるセキュリティファーストの設計
どのバックエンド実行系に送るかを確定させたい場合は、統合された OpenAI 互換 `/v1/...` エンドポイントよりも provider-specific のパスを優先してください。
どのバックエンド実行系に送るかを確定させたい場合は、統合された `/v1/...` エンドポイントよりも provider-specific のパスを優先してください。
- Anthropic 実行系を強制したい場合`/api/provider/anthropic/v1/messages`
- Gemini/Google 実行系を強制したい場合`/api/provider/google/v1beta/models/...`
- OpenAI 互換実行系を強制したい場合`/api/provider/openai/v1/chat/completions`
- messages 系のバックエンドに`/api/provider/{provider}/v1/messages`
- モデル単位の generate 系エンドポイントに`/api/provider/{provider}/v1beta/models/...`
- chat-completions 系のバックエンドに`/api/provider/{provider}/v1/chat/completions`
これは `oauth-model-alias`、alias プール、model fallback によって複数のバックエンドが同じクライアント向けモデル名を共有する場合に特に重要です。その場合、`/v1/models` は実際に狙っている実行系ではなく、統合後のエイリアス表示を返すことがあります。バックエンド選択の基準としては provider-specific のリクエストパスを使ってください。