fix: Fix the description of basePath related fields of ai-proxy plugin (#3870)

Signed-off-by: CH3CHO <ch3cho@qq.com>
This commit is contained in:
Kent Dong
2026-05-25 15:02:39 +08:00
committed by GitHub
parent 632c6ca655
commit b8ff815100
2 changed files with 4 additions and 2 deletions

View File

@@ -56,7 +56,8 @@ description: AI 代理插件配置参考
| `retryOnFailure` | object | 非必填 | - | 当请求失败时立即进行重试 |
| `reasoningContentMode` | string | 非必填 | - | 如何处理大模型服务返回的推理内容。目前支持以下取值passthrough正常输出推理内容、ignore不输出推理内容、concat将推理内容拼接在常规输出内容之前。默认为 passthrough。仅支持通义千问服务。 |
| `capabilities` | map of string | 非必填 | - | 部分 provider 的部分 ai 能力原生兼容 openai/v1 格式,不需要重写,可以直接转发,通过此配置项指定来开启转发, key 表示的是采用的厂商协议能力values 表示的真实的厂商该能力的 api path, 厂商协议能力当前支持: openai/v1/chatcompletions, openai/v1/embeddings, openai/v1/imagegeneration, openai/v1/audiospeech, cohere/v1/rerank |
| `subPath` | string | 非必填 | - | 如果配置了subPath将会先移除请求path中该前缀,再进行后续处理 |
| `basePath` | string | 非必填 | - | 如果配置了 basePath可用于在请求 path 中移除该前缀,或添加至请求 path 中,默认为进行移除 |
| `basePathHandling` | string | 非必填 | removePrefix | basePathHandling 用于指定 basePath 的处理方式。可选值removePrefix移除路径前缀将请求转发给上游时去除 basePath 前缀后再拼接、prepend添加路径前缀将请求转发给上游时在路径前面添加 basePath 前缀) |
| `contextCleanupCommands` | array of string | 非必填 | - | 上下文清理命令列表。当请求的 messages 中存在完全匹配任意一个命令的 user 消息时,将该消息及之前所有非 system 消息清理掉,只保留 system 消息和该命令之后的消息。可用于主动清理对话上下文。 |
`context`的配置字段说明如下:

View File

@@ -52,7 +52,8 @@ Plugin execution priority: `100`
| `context` | object | Optional | - | Configuration for AI conversation context information |
| `customSettings` | array of customSetting | Optional | - | Specifies overrides or fills parameters for AI requests |
| `failover` | object | Optional | - | Configures apiToken failover. When an apiToken becomes unavailable, it is removed from the available token list and restored after a successful health check or after the cooldown period expires. |
| `subPath` | string | Optional | - | If subPath is configured, the prefix will be removed from the request path before further processing. |
| `basePath` | string | Optional | - | If configured, basePath can be used to remove the prefix from the request path, or prepend the prefix to the request path. Defaults to removal. |
| `basePathHandling` | string | Optional | removePrefix | basePathHandling specifies how basePath is processed. Possible values: removePrefix (removes the basePath prefix from the request path before forwarding to upstream), prepend (adds the basePath prefix to the request path when forwarding to upstream) |
| `contextCleanupCommands` | array of string | Optional | - | List of context cleanup commands. When a user message in the request exactly matches any of the configured commands, that message and all non-system messages before it will be removed, keeping only system messages and messages after the command. This enables users to actively clear conversation history. |
**Details for the `context` configuration fields:**