You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "Yilialinn (via GitHub)" <gi...@apache.org> on 2026/04/07 09:28:44 UTC
[PR] docs: fix ai-proxy-multi attribute nesting and add missing health check sub-attributes [apisix]
Yilialinn opened a new pull request, #13169:
URL: https://github.com/apache/apisix/pull/13169
## Summary
- Fix incorrect nesting of `override` and `checks` attributes in the `ai-proxy-multi` plugin attribute table:
- Move `logging.override.*` → `instances.override.*` (`override` is a sub-attribute of `instances`, not `logging`)
- Move `checks.*` → `instances.checks.*` (`checks` is a sub-attribute of `instances`, not a top-level attribute)
- Add missing health check sub-attributes: `healthy.interval`, `healthy.http_statuses`, `healthy.successes`, `unhealthy.interval`, `unhealthy.http_statuses`, `unhealthy.http_failures`, `unhealthy.timeout`
- Apply the same fixes to both English and Chinese documentation
Ref: https://github.com/apache/apisix/issues/12879#issuecomment-3727614880
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] docs: fix ai-proxy-multi attribute nesting and add missing health check sub-attributes [apisix]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #13169:
URL: https://github.com/apache/apisix/pull/13169#discussion_r3056843584
##########
docs/zh/latest/plugins/ai-proxy-multi.md:
##########
@@ -76,17 +76,26 @@ description: ai-proxy-multi 插件通过负载均衡、重试、故障转移和
| logging | object | 否 | | | 日志配置。 |
| logging.summaries | boolean | 否 | false | | 如果为 true,记录请求 LLM 模型、持续时间、请求和响应令牌。 |
| logging.payloads | boolean | 否 | false | | 如果为 true,记录请求和响应负载。 |
-| logging.override | object | 否 | | | 覆盖设置。 |
-| logging.override.endpoint | string | 否 | | | 用于替换默认端点的 LLM 提供商端点。如果未配置,插件使用默认的 OpenAI 端点 `https://api.openai.com/v1/chat/completions`。 |
-| checks | object | 否 | | | 健康检查配置。请注意,目前 OpenAI、DeepSeek 和 AIMLAPI 不提供官方健康检查端点。您可以在 `openai-compatible` 提供商下配置的其他 LLM 服务可能有可用的健康检查端点。 |
-| checks.active | object | 是 | | | 主动健康检查配置。 |
-| checks.active.type | string | 否 | http | [http, https, tcp] | 健康检查连接类型。 |
-| checks.active.timeout | number | 否 | 1 | | 健康检查超时时间(秒)。 |
-| checks.active.concurrency | integer | 否 | 10 | | 同时检查的上游节点数量。 |
-| checks.active.host | string | 否 | | | HTTP 主机。 |
-| checks.active.port | integer | 否 | | 1 到 65535(包含) | HTTP 端口。 |
-| checks.active.http_path | string | 否 | / | | HTTP 探测请求的路径。 |
-| checks.active.https_verify_certificate | boolean | 否 | true | | 如果为 true,验证节点的 TLS 证书。 |
+| instances.override | object | 否 | | | 覆盖设置。 |
+| instances.override.endpoint | string | 否 | | | 用于替换默认端点的 LLM 提供商端点。如果未配置,插件使用默认的 OpenAI 端点 `https://api.openai.com/v1/chat/completions`。 |
+| instances.checks | object | 否 | | | 健康检查配置。请注意,目前 OpenAI、DeepSeek 和 AIMLAPI 不提供官方健康检查端点。您可以在 `openai-compatible` 提供商下配置的其他 LLM 服务可能有可用的健康检查端点。 |
+| instances.checks.active | object | 是 | | | 主动健康检查配置。 |
+| instances.checks.active.type | string | 否 | http | [http, https, tcp] | 健康检查连接类型。`http_path`、`healthy.http_statuses` 和 `unhealthy.http_statuses` 仅在 `type` 为 `http` 或 `https` 时有效;当 `type` 为 `tcp` 时不适用。 |
+| instances.checks.active.timeout | number | 否 | 1 | | 健康检查超时时间(秒)。 |
+| instances.checks.active.concurrency | integer | 否 | 10 | | 同时检查的上游节点数量。 |
+| instances.checks.active.host | string | 否 | | | HTTP 主机。 |
+| instances.checks.active.port | integer | 否 | | 1 到 65535(包含) | HTTP 端口。 |
+| instances.checks.active.http_path | string | 否 | / | | HTTP 探测请求的路径。 |
+| instances.checks.active.https_verify_certificate | boolean | 否 | true | | 如果为 true,验证节点的 TLS 证书。 |
+| instances.checks.active.healthy | object | 否 | | | 健康检查配置。 |
+| instances.checks.active.healthy.interval | integer | 否 | 1 | | 检查健康节点的时间间隔(秒)。 |
+| instances.checks.active.healthy.http_statuses | array[integer] | 否 | [200,302] | 200 到 599 之间的状态码(包含) | 定义健康节点的 HTTP 状态码数组,仅当 `instances.checks.active.type` 为 `http` 或 `https` 时有效。 |
+| instances.checks.active.healthy.successes | integer | 否 | 2 | 1 到 254(包含) | 定义健康节点所需的成功探测次数。 |
+| instances.checks.active.unhealthy | object | 否 | | | 不健康检查配置。 |
+| instances.checks.active.unhealthy.interval | integer | 否 | 1 | | 检查不健康节点的时间间隔(秒)。 |
+| instances.checks.active.unhealthy.http_statuses | array[integer] | 否 | [429,404,500,501,502,503,504,505] | 200 到 599 之间的状态码(包含) | 定义不健康节点的 HTTP 状态码数组,仅当 `instances.checks.active.type` 为 `http` 或 `https` 时有效。 |
+| instances.checks.active.unhealthy.http_failures | integer | 否 | 5 | 1 到 254(包含) | 定义不健康节点的 HTTP 失败次数。 |
+| instances.checks.active.unhealthy.timeout | integer | 否 | 3 | 1 到 254(包含) | 定义不健康节点的探测超时次数。 |
Review Comment:
这里的 `instances.checks.active.unhealthy.timeout` 从描述来看是“超时次数(计数)”,但同一层级还有 `instances.checks.active.timeout`(通常表示超时时间/时长)。为避免配置歧义,建议将该字段名在文档中调整为更像计数的命名(例如 `...unhealthy.timeouts`),或在描述中明确这是“次数”而不是“秒”,并确认字段名与插件实际 schema 一致。
```suggestion
| instances.checks.active.unhealthy.timeout | integer | 否 | 3 | 1 到 254(包含) | 定义将节点判定为不健康前允许的探测超时次数(计数,不是秒数)。 |
```
##########
docs/en/latest/plugins/ai-proxy-multi.md:
##########
@@ -76,17 +76,26 @@ In addition, the Plugin also supports logging LLM request information in the acc
| logging | object | False | | | Logging configurations. |
| logging.summaries | boolean | False | false | | If true, log request LLM model, duration, request, and response tokens. |
| logging.payloads | boolean | False | false | | If true, log request and response payload. |
-| logging.override | object | False | | | Override setting. |
-| logging.override.endpoint | string | False | | | LLM provider endpoint to replace the default endpoint with. If not configured, the Plugin uses the default OpenAI endpoint `https://api.openai.com/v1/chat/completions`. |
-| checks | object | False | | | Health check configurations. Note that at the moment, OpenAI, DeepSeek, and AIMLAPI do not provide an official health check endpoint. Other LLM services that you can configure under `openai-compatible` provider may have available health check endpoints. |
-| checks.active | object | True | | | Active health check configurations. |
-| checks.active.type | string | False | http | [http, https, tcp] | Type of health check connection. |
-| checks.active.timeout | number | False | 1 | | Health check timeout in seconds. |
-| checks.active.concurrency | integer | False | 10 | | Number of upstream nodes to be checked at the same time. |
-| checks.active.host | string | False | | | HTTP host. |
-| checks.active.port | integer | False | | between 1 and 65535 inclusive | HTTP port. |
-| checks.active.http_path | string | False | / | | Path for HTTP probing requests. |
-| checks.active.https_verify_certificate | boolean | False | true | | If true, verify the node's TLS certificate. |
+| instances.override | object | False | | | Override setting. |
+| instances.override.endpoint | string | False | | | LLM provider endpoint to replace the default endpoint with. If not configured, the Plugin uses the default OpenAI endpoint `https://api.openai.com/v1/chat/completions`. |
+| instances.checks | object | False | | | Health check configurations. Note that at the moment, OpenAI, DeepSeek, and AIMLAPI do not provide an official health check endpoint. Other LLM services that you can configure under `openai-compatible` provider may have available health check endpoints. |
+| instances.checks.active | object | True | | | Active health check configurations. |
+| instances.checks.active.type | string | False | http | [http, https, tcp] | Type of health check connection. When set to `tcp`, HTTP-specific fields such as `http_path`, `https_verify_certificate`, and `healthy`/`unhealthy` `http_statuses` do not apply; those fields are only used for `http` and `https` checks. |
+| instances.checks.active.timeout | number | False | 1 | | Health check timeout in seconds. |
+| instances.checks.active.concurrency | integer | False | 10 | | Number of upstream nodes to be checked at the same time. |
+| instances.checks.active.host | string | False | | | Host used for health check probing. |
+| instances.checks.active.port | integer | False | | between 1 and 65535 inclusive | Port used for health check probing. |
+| instances.checks.active.http_path | string | False | / | | Path for probing requests. Applies only when `type` is `http` or `https`. |
+| instances.checks.active.https_verify_certificate | boolean | False | true | | If true, verify the node's TLS certificate. Applies only when `type` is `https`. |
+| instances.checks.active.healthy | object | False | | | Healthy check configurations. Any nested HTTP status configuration applies only when `type` is `http` or `https`. |
+| instances.checks.active.healthy.interval | integer | False | 1 | | Time interval of checking healthy nodes, in seconds. |
+| instances.checks.active.healthy.http_statuses | array[integer] | False | [200,302] | status code between 200 and 599 inclusive | An array of HTTP status codes that defines a healthy node. Applies only when `instances.checks.active.type` is `http` or `https`. |
+| instances.checks.active.healthy.successes | integer | False | 2 | between 1 and 254 inclusive | Number of successful probes to define a healthy node. |
+| instances.checks.active.unhealthy | object | False | | | Unhealthy check configurations. |
+| instances.checks.active.unhealthy.interval | integer | False | 1 | | Time interval of checking unhealthy nodes, in seconds. |
+| instances.checks.active.unhealthy.http_statuses | array[integer] | False | [429,404,500,501,502,503,504,505] | status code between 200 and 599 inclusive | An array of HTTP status codes that defines an unhealthy node. Applies only when `instances.checks.active.type` is `http` or `https`. |
+| instances.checks.active.unhealthy.http_failures | integer | False | 5 | between 1 and 254 inclusive | Number of HTTP failures to define an unhealthy node. |
+| instances.checks.active.unhealthy.timeout | integer | False | 3 | between 1 and 254 inclusive | Number of probe timeouts to define an unhealthy node. |
Review Comment:
The name `instances.checks.active.unhealthy.timeout` is easy to confuse with `instances.checks.active.timeout` (which is a duration in seconds). Since the description indicates this field is a *count* of timeouts, consider renaming the documented key to a plural/counter-style name (e.g., `...unhealthy.timeouts`) or explicitly clarifying in the description that it is a count (not seconds), and ensure the key matches the actual plugin schema.
```suggestion
| instances.checks.active.unhealthy.timeout | integer | False | 3 | between 1 and 254 inclusive | Number of probe timeout events used to define an unhealthy node (this value is a count, not a duration in seconds or milliseconds). |
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] docs: fix ai-proxy-multi attribute nesting and add missing health check sub-attributes [apisix]
Posted by "Yilialinn (via GitHub)" <gi...@apache.org>.
Yilialinn merged PR #13169:
URL: https://github.com/apache/apisix/pull/13169
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] docs: fix ai-proxy-multi attribute nesting and add missing health check sub-attributes [apisix]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #13169:
URL: https://github.com/apache/apisix/pull/13169#discussion_r3056307004
##########
docs/en/latest/plugins/ai-proxy-multi.md:
##########
@@ -76,17 +76,26 @@ In addition, the Plugin also supports logging LLM request information in the acc
| logging | object | False | | | Logging configurations. |
| logging.summaries | boolean | False | false | | If true, log request LLM model, duration, request, and response tokens. |
| logging.payloads | boolean | False | false | | If true, log request and response payload. |
-| logging.override | object | False | | | Override setting. |
-| logging.override.endpoint | string | False | | | LLM provider endpoint to replace the default endpoint with. If not configured, the Plugin uses the default OpenAI endpoint `https://api.openai.com/v1/chat/completions`. |
-| checks | object | False | | | Health check configurations. Note that at the moment, OpenAI, DeepSeek, and AIMLAPI do not provide an official health check endpoint. Other LLM services that you can configure under `openai-compatible` provider may have available health check endpoints. |
-| checks.active | object | True | | | Active health check configurations. |
-| checks.active.type | string | False | http | [http, https, tcp] | Type of health check connection. |
-| checks.active.timeout | number | False | 1 | | Health check timeout in seconds. |
-| checks.active.concurrency | integer | False | 10 | | Number of upstream nodes to be checked at the same time. |
-| checks.active.host | string | False | | | HTTP host. |
-| checks.active.port | integer | False | | between 1 and 65535 inclusive | HTTP port. |
-| checks.active.http_path | string | False | / | | Path for HTTP probing requests. |
-| checks.active.https_verify_certificate | boolean | False | true | | If true, verify the node's TLS certificate. |
+| instances.override | object | False | | | Override setting. |
+| instances.override.endpoint | string | False | | | LLM provider endpoint to replace the default endpoint with. If not configured, the Plugin uses the default OpenAI endpoint `https://api.openai.com/v1/chat/completions`. |
+| instances.checks | object | False | | | Health check configurations. Note that at the moment, OpenAI, DeepSeek, and AIMLAPI do not provide an official health check endpoint. Other LLM services that you can configure under `openai-compatible` provider may have available health check endpoints. |
Review Comment:
This row has a large run of extra whitespace after `instances.checks`, which makes future diffs noisier and the table harder to maintain. Consider normalizing spacing to match the surrounding rows (single space padding around `|` separators).
```suggestion
| instances.checks | object | False | | | Health check configurations. Note that at the moment, OpenAI, DeepSeek, and AIMLAPI do not provide an official health check endpoint. Other LLM services that you can configure under `openai-compatible` provider may have available health check endpoints. |
```
##########
docs/en/latest/plugins/ai-proxy-multi.md:
##########
@@ -76,17 +76,26 @@ In addition, the Plugin also supports logging LLM request information in the acc
| logging | object | False | | | Logging configurations. |
| logging.summaries | boolean | False | false | | If true, log request LLM model, duration, request, and response tokens. |
| logging.payloads | boolean | False | false | | If true, log request and response payload. |
-| logging.override | object | False | | | Override setting. |
-| logging.override.endpoint | string | False | | | LLM provider endpoint to replace the default endpoint with. If not configured, the Plugin uses the default OpenAI endpoint `https://api.openai.com/v1/chat/completions`. |
-| checks | object | False | | | Health check configurations. Note that at the moment, OpenAI, DeepSeek, and AIMLAPI do not provide an official health check endpoint. Other LLM services that you can configure under `openai-compatible` provider may have available health check endpoints. |
-| checks.active | object | True | | | Active health check configurations. |
-| checks.active.type | string | False | http | [http, https, tcp] | Type of health check connection. |
-| checks.active.timeout | number | False | 1 | | Health check timeout in seconds. |
-| checks.active.concurrency | integer | False | 10 | | Number of upstream nodes to be checked at the same time. |
-| checks.active.host | string | False | | | HTTP host. |
-| checks.active.port | integer | False | | between 1 and 65535 inclusive | HTTP port. |
-| checks.active.http_path | string | False | / | | Path for HTTP probing requests. |
-| checks.active.https_verify_certificate | boolean | False | true | | If true, verify the node's TLS certificate. |
+| instances.override | object | False | | | Override setting. |
+| instances.override.endpoint | string | False | | | LLM provider endpoint to replace the default endpoint with. If not configured, the Plugin uses the default OpenAI endpoint `https://api.openai.com/v1/chat/completions`. |
+| instances.checks | object | False | | | Health check configurations. Note that at the moment, OpenAI, DeepSeek, and AIMLAPI do not provide an official health check endpoint. Other LLM services that you can configure under `openai-compatible` provider may have available health check endpoints. |
+| instances.checks.active | object | True | | | Active health check configurations. |
+| instances.checks.active.type | string | False | http | [http, https, tcp] | Type of health check connection. |
+| instances.checks.active.timeout | number | False | 1 | | Health check timeout in seconds. |
+| instances.checks.active.concurrency | integer | False | 10 | | Number of upstream nodes to be checked at the same time. |
+| instances.checks.active.host | string | False | | | HTTP host. |
+| instances.checks.active.port | integer | False | | between 1 and 65535 inclusive | HTTP port. |
+| instances.checks.active.http_path | string | False | / | | Path for HTTP probing requests. |
+| instances.checks.active.https_verify_certificate | boolean | False | true | | If true, verify the node's TLS certificate. |
+| instances.checks.active.healthy | object | False | | | Healthy check configurations. |
+| instances.checks.active.healthy.interval | integer | False | 1 | | Time interval of checking healthy nodes, in seconds. |
+| instances.checks.active.healthy.http_statuses | array[integer] | False | [200,302] | status code between 200 and 599 inclusive | An array of HTTP status codes that defines a healthy node. |
+| instances.checks.active.healthy.successes | integer | False | 2 | between 1 and 254 inclusive | Number of successful probes to define a healthy node. |
+| instances.checks.active.unhealthy | object | False | | | Unhealthy check configurations. |
+| instances.checks.active.unhealthy.interval | integer | False | 1 | | Time interval of checking unhealthy nodes, in seconds. |
+| instances.checks.active.unhealthy.http_statuses | array[integer] | False | [429,404,500,501,502,503,504,505] | status code between 200 and 599 inclusive | An array of HTTP status codes that defines an unhealthy node. |
Review Comment:
`instances.checks.active.type` allows `tcp`, but `healthy.http_statuses` / `unhealthy.http_statuses` are HTTP-specific. Please clarify in the descriptions (or Valid column) that these fields apply only when `type` is `http`/`https` to prevent misconfiguration/confusion for `tcp` checks.
```suggestion
| instances.checks.active.healthy.http_statuses | array[integer] | False | [200,302] | status code between 200 and 599 inclusive | An array of HTTP status codes that defines a healthy node. Applies only when `instances.checks.active.type` is `http` or `https`. |
| instances.checks.active.healthy.successes | integer | False | 2 | between 1 and 254 inclusive | Number of successful probes to define a healthy node. |
| instances.checks.active.unhealthy | object | False | | | Unhealthy check configurations. |
| instances.checks.active.unhealthy.interval | integer | False | 1 | | Time interval of checking unhealthy nodes, in seconds. |
| instances.checks.active.unhealthy.http_statuses | array[integer] | False | [429,404,500,501,502,503,504,505] | status code between 200 and 599 inclusive | An array of HTTP status codes that defines an unhealthy node. Applies only when `instances.checks.active.type` is `http` or `https`. |
```
##########
docs/zh/latest/plugins/ai-proxy-multi.md:
##########
@@ -76,17 +76,26 @@ description: ai-proxy-multi 插件通过负载均衡、重试、故障转移和
| logging | object | 否 | | | 日志配置。 |
| logging.summaries | boolean | 否 | false | | 如果为 true,记录请求 LLM 模型、持续时间、请求和响应令牌。 |
| logging.payloads | boolean | 否 | false | | 如果为 true,记录请求和响应负载。 |
-| logging.override | object | 否 | | | 覆盖设置。 |
-| logging.override.endpoint | string | 否 | | | 用于替换默认端点的 LLM 提供商端点。如果未配置,插件使用默认的 OpenAI 端点 `https://api.openai.com/v1/chat/completions`。 |
-| checks | object | 否 | | | 健康检查配置。请注意,目前 OpenAI、DeepSeek 和 AIMLAPI 不提供官方健康检查端点。您可以在 `openai-compatible` 提供商下配置的其他 LLM 服务可能有可用的健康检查端点。 |
-| checks.active | object | 是 | | | 主动健康检查配置。 |
-| checks.active.type | string | 否 | http | [http, https, tcp] | 健康检查连接类型。 |
-| checks.active.timeout | number | 否 | 1 | | 健康检查超时时间(秒)。 |
-| checks.active.concurrency | integer | 否 | 10 | | 同时检查的上游节点数量。 |
-| checks.active.host | string | 否 | | | HTTP 主机。 |
-| checks.active.port | integer | 否 | | 1 到 65535(包含) | HTTP 端口。 |
-| checks.active.http_path | string | 否 | / | | HTTP 探测请求的路径。 |
-| checks.active.https_verify_certificate | boolean | 否 | true | | 如果为 true,验证节点的 TLS 证书。 |
+| instances.override | object | 否 | | | 覆盖设置。 |
+| instances.override.endpoint | string | 否 | | | 用于替换默认端点的 LLM 提供商端点。如果未配置,插件使用默认的 OpenAI 端点 `https://api.openai.com/v1/chat/completions`。 |
+| instances.checks | object | 否 | | | 健康检查配置。请注意,目前 OpenAI、DeepSeek 和 AIMLAPI 不提供官方健康检查端点。您可以在 `openai-compatible` 提供商下配置的其他 LLM 服务可能有可用的健康检查端点。 |
+| instances.checks.active | object | 是 | | | 主动健康检查配置。 |
+| instances.checks.active.type | string | 否 | http | [http, https, tcp] | 健康检查连接类型。 |
+| instances.checks.active.timeout | number | 否 | 1 | | 健康检查超时时间(秒)。 |
+| instances.checks.active.concurrency | integer | 否 | 10 | | 同时检查的上游节点数量。 |
+| instances.checks.active.host | string | 否 | | | HTTP 主机。 |
+| instances.checks.active.port | integer | 否 | | 1 到 65535(包含) | HTTP 端口。 |
+| instances.checks.active.http_path | string | 否 | / | | HTTP 探测请求的路径。 |
+| instances.checks.active.https_verify_certificate | boolean | 否 | true | | 如果为 true,验证节点的 TLS 证书。 |
+| instances.checks.active.healthy | object | 否 | | | 健康检查配置。 |
+| instances.checks.active.healthy.interval | integer | 否 | 1 | | 检查健康节点的时间间隔(秒)。 |
+| instances.checks.active.healthy.http_statuses | array[integer] | 否 | [200,302] | 200 到 599 之间的状态码(包含) | 定义健康节点的 HTTP 状态码数组。 |
+| instances.checks.active.healthy.successes | integer | 否 | 2 | 1 到 254(包含) | 定义健康节点所需的成功探测次数。 |
+| instances.checks.active.unhealthy | object | 否 | | | 不健康检查配置。 |
+| instances.checks.active.unhealthy.interval | integer | 否 | 1 | | 检查不健康节点的时间间隔(秒)。 |
+| instances.checks.active.unhealthy.http_statuses | array[integer] | 否 | [429,404,500,501,502,503,504,505] | 200 到 599 之间的状态码(包含) | 定义不健康节点的 HTTP 状态码数组。 |
Review Comment:
`instances.checks.active.type` 支持 `tcp`,但 `healthy.http_statuses` / `unhealthy.http_statuses` 仅适用于 HTTP/HTTPS 类型的检查。建议在这两项的描述(或 Valid 列)中注明仅当 `type` 为 `http`/`https` 时有效,避免 `tcp` 场景产生歧义。
```suggestion
| instances.checks.active.healthy.http_statuses | array[integer] | 否 | [200,302] | 200 到 599 之间的状态码(包含) | 定义健康节点的 HTTP 状态码数组,仅当 `instances.checks.active.type` 为 `http` 或 `https` 时有效。 |
| instances.checks.active.healthy.successes | integer | 否 | 2 | 1 到 254(包含) | 定义健康节点所需的成功探测次数。 |
| instances.checks.active.unhealthy | object | 否 | | | 不健康检查配置。 |
| instances.checks.active.unhealthy.interval | integer | 否 | 1 | | 检查不健康节点的时间间隔(秒)。 |
| instances.checks.active.unhealthy.http_statuses | array[integer] | 否 | [429,404,500,501,502,503,504,505] | 200 到 599 之间的状态码(包含) | 定义不健康节点的 HTTP 状态码数组,仅当 `instances.checks.active.type` 为 `http` 或 `https` 时有效。 |
```
##########
docs/zh/latest/plugins/ai-proxy-multi.md:
##########
@@ -76,17 +76,26 @@ description: ai-proxy-multi 插件通过负载均衡、重试、故障转移和
| logging | object | 否 | | | 日志配置。 |
| logging.summaries | boolean | 否 | false | | 如果为 true,记录请求 LLM 模型、持续时间、请求和响应令牌。 |
| logging.payloads | boolean | 否 | false | | 如果为 true,记录请求和响应负载。 |
-| logging.override | object | 否 | | | 覆盖设置。 |
-| logging.override.endpoint | string | 否 | | | 用于替换默认端点的 LLM 提供商端点。如果未配置,插件使用默认的 OpenAI 端点 `https://api.openai.com/v1/chat/completions`。 |
-| checks | object | 否 | | | 健康检查配置。请注意,目前 OpenAI、DeepSeek 和 AIMLAPI 不提供官方健康检查端点。您可以在 `openai-compatible` 提供商下配置的其他 LLM 服务可能有可用的健康检查端点。 |
-| checks.active | object | 是 | | | 主动健康检查配置。 |
-| checks.active.type | string | 否 | http | [http, https, tcp] | 健康检查连接类型。 |
-| checks.active.timeout | number | 否 | 1 | | 健康检查超时时间(秒)。 |
-| checks.active.concurrency | integer | 否 | 10 | | 同时检查的上游节点数量。 |
-| checks.active.host | string | 否 | | | HTTP 主机。 |
-| checks.active.port | integer | 否 | | 1 到 65535(包含) | HTTP 端口。 |
-| checks.active.http_path | string | 否 | / | | HTTP 探测请求的路径。 |
-| checks.active.https_verify_certificate | boolean | 否 | true | | 如果为 true,验证节点的 TLS 证书。 |
+| instances.override | object | 否 | | | 覆盖设置。 |
+| instances.override.endpoint | string | 否 | | | 用于替换默认端点的 LLM 提供商端点。如果未配置,插件使用默认的 OpenAI 端点 `https://api.openai.com/v1/chat/completions`。 |
+| instances.checks | object | 否 | | | 健康检查配置。请注意,目前 OpenAI、DeepSeek 和 AIMLAPI 不提供官方健康检查端点。您可以在 `openai-compatible` 提供商下配置的其他 LLM 服务可能有可用的健康检查端点。 |
+| instances.checks.active | object | 是 | | | 主动健康检查配置。 |
+| instances.checks.active.type | string | 否 | http | [http, https, tcp] | 健康检查连接类型。 |
+| instances.checks.active.timeout | number | 否 | 1 | | 健康检查超时时间(秒)。 |
+| instances.checks.active.concurrency | integer | 否 | 10 | | 同时检查的上游节点数量。 |
+| instances.checks.active.host | string | 否 | | | HTTP 主机。 |
+| instances.checks.active.port | integer | 否 | | 1 到 65535(包含) | HTTP 端口。 |
+| instances.checks.active.http_path | string | 否 | / | | HTTP 探测请求的路径。 |
+| instances.checks.active.https_verify_certificate | boolean | 否 | true | | 如果为 true,验证节点的 TLS 证书。 |
+| instances.checks.active.healthy | object | 否 | | | 健康检查配置。 |
+| instances.checks.active.healthy.interval | integer | 否 | 1 | | 检查健康节点的时间间隔(秒)。 |
+| instances.checks.active.healthy.http_statuses | array[integer] | 否 | [200,302] | 200 到 599 之间的状态码(包含) | 定义健康节点的 HTTP 状态码数组。 |
+| instances.checks.active.healthy.successes | integer | 否 | 2 | 1 到 254(包含) | 定义健康节点所需的成功探测次数。 |
+| instances.checks.active.unhealthy | object | 否 | | | 不健康检查配置。 |
+| instances.checks.active.unhealthy.interval | integer | 否 | 1 | | 检查不健康节点的时间间隔(秒)。 |
+| instances.checks.active.unhealthy.http_statuses | array[integer] | 否 | [429,404,500,501,502,503,504,505] | 200 到 599 之间的状态码(包含) | 定义不健康节点的 HTTP 状态码数组。 |
Review Comment:
`instances.checks.active.type` 支持 `tcp`,但 `healthy.http_statuses` / `unhealthy.http_statuses` 仅适用于 HTTP/HTTPS 类型的检查。建议在这两项的描述(或 Valid 列)中注明仅当 `type` 为 `http`/`https` 时有效,避免 `tcp` 场景产生歧义。
```suggestion
| instances.checks.active.healthy.http_statuses | array[integer] | 否 | [200,302] | 200 到 599 之间的状态码(包含) | 定义健康节点的 HTTP 状态码数组,仅当 `instances.checks.active.type` 为 `http` 或 `https` 时有效。 |
| instances.checks.active.healthy.successes | integer | 否 | 2 | 1 到 254(包含) | 定义健康节点所需的成功探测次数。 |
| instances.checks.active.unhealthy | object | 否 | | | 不健康检查配置。 |
| instances.checks.active.unhealthy.interval | integer | 否 | 1 | | 检查不健康节点的时间间隔(秒)。 |
| instances.checks.active.unhealthy.http_statuses | array[integer] | 否 | [429,404,500,501,502,503,504,505] | 200 到 599 之间的状态码(包含) | 定义不健康节点的 HTTP 状态码数组,仅当 `instances.checks.active.type` 为 `http` 或 `https` 时有效。 |
```
##########
docs/zh/latest/plugins/ai-proxy-multi.md:
##########
@@ -76,17 +76,26 @@ description: ai-proxy-multi 插件通过负载均衡、重试、故障转移和
| logging | object | 否 | | | 日志配置。 |
| logging.summaries | boolean | 否 | false | | 如果为 true,记录请求 LLM 模型、持续时间、请求和响应令牌。 |
| logging.payloads | boolean | 否 | false | | 如果为 true,记录请求和响应负载。 |
-| logging.override | object | 否 | | | 覆盖设置。 |
-| logging.override.endpoint | string | 否 | | | 用于替换默认端点的 LLM 提供商端点。如果未配置,插件使用默认的 OpenAI 端点 `https://api.openai.com/v1/chat/completions`。 |
-| checks | object | 否 | | | 健康检查配置。请注意,目前 OpenAI、DeepSeek 和 AIMLAPI 不提供官方健康检查端点。您可以在 `openai-compatible` 提供商下配置的其他 LLM 服务可能有可用的健康检查端点。 |
-| checks.active | object | 是 | | | 主动健康检查配置。 |
-| checks.active.type | string | 否 | http | [http, https, tcp] | 健康检查连接类型。 |
-| checks.active.timeout | number | 否 | 1 | | 健康检查超时时间(秒)。 |
-| checks.active.concurrency | integer | 否 | 10 | | 同时检查的上游节点数量。 |
-| checks.active.host | string | 否 | | | HTTP 主机。 |
-| checks.active.port | integer | 否 | | 1 到 65535(包含) | HTTP 端口。 |
-| checks.active.http_path | string | 否 | / | | HTTP 探测请求的路径。 |
-| checks.active.https_verify_certificate | boolean | 否 | true | | 如果为 true,验证节点的 TLS 证书。 |
+| instances.override | object | 否 | | | 覆盖设置。 |
+| instances.override.endpoint | string | 否 | | | 用于替换默认端点的 LLM 提供商端点。如果未配置,插件使用默认的 OpenAI 端点 `https://api.openai.com/v1/chat/completions`。 |
+| instances.checks | object | 否 | | | 健康检查配置。请注意,目前 OpenAI、DeepSeek 和 AIMLAPI 不提供官方健康检查端点。您可以在 `openai-compatible` 提供商下配置的其他 LLM 服务可能有可用的健康检查端点。 |
+| instances.checks.active | object | 是 | | | 主动健康检查配置。 |
+| instances.checks.active.type | string | 否 | http | [http, https, tcp] | 健康检查连接类型。 |
Review Comment:
`instances.checks.active.type` 支持 `tcp`,但 `healthy.http_statuses` / `unhealthy.http_statuses` 仅适用于 HTTP/HTTPS 类型的检查。建议在这两项的描述(或 Valid 列)中注明仅当 `type` 为 `http`/`https` 时有效,避免 `tcp` 场景产生歧义。
```suggestion
| instances.checks.active.type | string | 否 | http | [http, https, tcp] | 健康检查连接类型。`http_path`、`healthy.http_statuses` 和 `unhealthy.http_statuses` 仅在 `type` 为 `http` 或 `https` 时有效;当 `type` 为 `tcp` 时不适用。 |
```
##########
docs/en/latest/plugins/ai-proxy-multi.md:
##########
@@ -76,17 +76,26 @@ In addition, the Plugin also supports logging LLM request information in the acc
| logging | object | False | | | Logging configurations. |
| logging.summaries | boolean | False | false | | If true, log request LLM model, duration, request, and response tokens. |
| logging.payloads | boolean | False | false | | If true, log request and response payload. |
-| logging.override | object | False | | | Override setting. |
-| logging.override.endpoint | string | False | | | LLM provider endpoint to replace the default endpoint with. If not configured, the Plugin uses the default OpenAI endpoint `https://api.openai.com/v1/chat/completions`. |
-| checks | object | False | | | Health check configurations. Note that at the moment, OpenAI, DeepSeek, and AIMLAPI do not provide an official health check endpoint. Other LLM services that you can configure under `openai-compatible` provider may have available health check endpoints. |
-| checks.active | object | True | | | Active health check configurations. |
-| checks.active.type | string | False | http | [http, https, tcp] | Type of health check connection. |
-| checks.active.timeout | number | False | 1 | | Health check timeout in seconds. |
-| checks.active.concurrency | integer | False | 10 | | Number of upstream nodes to be checked at the same time. |
-| checks.active.host | string | False | | | HTTP host. |
-| checks.active.port | integer | False | | between 1 and 65535 inclusive | HTTP port. |
-| checks.active.http_path | string | False | / | | Path for HTTP probing requests. |
-| checks.active.https_verify_certificate | boolean | False | true | | If true, verify the node's TLS certificate. |
+| instances.override | object | False | | | Override setting. |
+| instances.override.endpoint | string | False | | | LLM provider endpoint to replace the default endpoint with. If not configured, the Plugin uses the default OpenAI endpoint `https://api.openai.com/v1/chat/completions`. |
+| instances.checks | object | False | | | Health check configurations. Note that at the moment, OpenAI, DeepSeek, and AIMLAPI do not provide an official health check endpoint. Other LLM services that you can configure under `openai-compatible` provider may have available health check endpoints. |
+| instances.checks.active | object | True | | | Active health check configurations. |
+| instances.checks.active.type | string | False | http | [http, https, tcp] | Type of health check connection. |
+| instances.checks.active.timeout | number | False | 1 | | Health check timeout in seconds. |
+| instances.checks.active.concurrency | integer | False | 10 | | Number of upstream nodes to be checked at the same time. |
+| instances.checks.active.host | string | False | | | HTTP host. |
+| instances.checks.active.port | integer | False | | between 1 and 65535 inclusive | HTTP port. |
+| instances.checks.active.http_path | string | False | / | | Path for HTTP probing requests. |
+| instances.checks.active.https_verify_certificate | boolean | False | true | | If true, verify the node's TLS certificate. |
+| instances.checks.active.healthy | object | False | | | Healthy check configurations. |
Review Comment:
`instances.checks.active.type` allows `tcp`, but `healthy.http_statuses` / `unhealthy.http_statuses` are HTTP-specific. Please clarify in the descriptions (or Valid column) that these fields apply only when `type` is `http`/`https` to prevent misconfiguration/confusion for `tcp` checks.
```suggestion
| instances.checks.active.type | string | False | http | [http, https, tcp] | Type of health check connection. When set to `tcp`, HTTP-specific fields such as `http_path`, `https_verify_certificate`, and `healthy`/`unhealthy` `http_statuses` do not apply; those fields are only used for `http` and `https` checks. |
| instances.checks.active.timeout | number | False | 1 | | Health check timeout in seconds. |
| instances.checks.active.concurrency | integer | False | 10 | | Number of upstream nodes to be checked at the same time. |
| instances.checks.active.host | string | False | | | Host used for health check probing. |
| instances.checks.active.port | integer | False | | between 1 and 65535 inclusive | Port used for health check probing. |
| instances.checks.active.http_path | string | False | / | | Path for probing requests. Applies only when `type` is `http` or `https`. |
| instances.checks.active.https_verify_certificate | boolean | False | true | | If true, verify the node's TLS certificate. Applies only when `type` is `https`. |
| instances.checks.active.healthy | object | False | | | Healthy check configurations. Any nested HTTP status configuration applies only when `type` is `http` or `https`. |
```
##########
docs/zh/latest/plugins/ai-proxy-multi.md:
##########
@@ -76,17 +76,26 @@ description: ai-proxy-multi 插件通过负载均衡、重试、故障转移和
| logging | object | 否 | | | 日志配置。 |
| logging.summaries | boolean | 否 | false | | 如果为 true,记录请求 LLM 模型、持续时间、请求和响应令牌。 |
| logging.payloads | boolean | 否 | false | | 如果为 true,记录请求和响应负载。 |
-| logging.override | object | 否 | | | 覆盖设置。 |
-| logging.override.endpoint | string | 否 | | | 用于替换默认端点的 LLM 提供商端点。如果未配置,插件使用默认的 OpenAI 端点 `https://api.openai.com/v1/chat/completions`。 |
-| checks | object | 否 | | | 健康检查配置。请注意,目前 OpenAI、DeepSeek 和 AIMLAPI 不提供官方健康检查端点。您可以在 `openai-compatible` 提供商下配置的其他 LLM 服务可能有可用的健康检查端点。 |
-| checks.active | object | 是 | | | 主动健康检查配置。 |
-| checks.active.type | string | 否 | http | [http, https, tcp] | 健康检查连接类型。 |
-| checks.active.timeout | number | 否 | 1 | | 健康检查超时时间(秒)。 |
-| checks.active.concurrency | integer | 否 | 10 | | 同时检查的上游节点数量。 |
-| checks.active.host | string | 否 | | | HTTP 主机。 |
-| checks.active.port | integer | 否 | | 1 到 65535(包含) | HTTP 端口。 |
-| checks.active.http_path | string | 否 | / | | HTTP 探测请求的路径。 |
-| checks.active.https_verify_certificate | boolean | 否 | true | | 如果为 true,验证节点的 TLS 证书。 |
+| instances.override | object | 否 | | | 覆盖设置。 |
+| instances.override.endpoint | string | 否 | | | 用于替换默认端点的 LLM 提供商端点。如果未配置,插件使用默认的 OpenAI 端点 `https://api.openai.com/v1/chat/completions`。 |
+| instances.checks | object | 否 | | | 健康检查配置。请注意,目前 OpenAI、DeepSeek 和 AIMLAPI 不提供官方健康检查端点。您可以在 `openai-compatible` 提供商下配置的其他 LLM 服务可能有可用的健康检查端点。 |
Review Comment:
此行在 `instances.checks` 后有较长的多余空格,容易导致后续改动产生噪声 diff,也不利于维护。建议将空格规范化为与周围行一致的格式(`|` 分隔符两侧使用一致的单空格对齐方式)。
```suggestion
| instances.checks | object | 否 | | | 健康检查配置。请注意,目前 OpenAI、DeepSeek 和 AIMLAPI 不提供官方健康检查端点。您可以在 `openai-compatible` 提供商下配置的其他 LLM 服务可能有可用的健康检查端点。 |
```
##########
docs/en/latest/plugins/ai-proxy-multi.md:
##########
@@ -76,17 +76,26 @@ In addition, the Plugin also supports logging LLM request information in the acc
| logging | object | False | | | Logging configurations. |
| logging.summaries | boolean | False | false | | If true, log request LLM model, duration, request, and response tokens. |
| logging.payloads | boolean | False | false | | If true, log request and response payload. |
-| logging.override | object | False | | | Override setting. |
-| logging.override.endpoint | string | False | | | LLM provider endpoint to replace the default endpoint with. If not configured, the Plugin uses the default OpenAI endpoint `https://api.openai.com/v1/chat/completions`. |
-| checks | object | False | | | Health check configurations. Note that at the moment, OpenAI, DeepSeek, and AIMLAPI do not provide an official health check endpoint. Other LLM services that you can configure under `openai-compatible` provider may have available health check endpoints. |
-| checks.active | object | True | | | Active health check configurations. |
-| checks.active.type | string | False | http | [http, https, tcp] | Type of health check connection. |
-| checks.active.timeout | number | False | 1 | | Health check timeout in seconds. |
-| checks.active.concurrency | integer | False | 10 | | Number of upstream nodes to be checked at the same time. |
-| checks.active.host | string | False | | | HTTP host. |
-| checks.active.port | integer | False | | between 1 and 65535 inclusive | HTTP port. |
-| checks.active.http_path | string | False | / | | Path for HTTP probing requests. |
-| checks.active.https_verify_certificate | boolean | False | true | | If true, verify the node's TLS certificate. |
+| instances.override | object | False | | | Override setting. |
+| instances.override.endpoint | string | False | | | LLM provider endpoint to replace the default endpoint with. If not configured, the Plugin uses the default OpenAI endpoint `https://api.openai.com/v1/chat/completions`. |
+| instances.checks | object | False | | | Health check configurations. Note that at the moment, OpenAI, DeepSeek, and AIMLAPI do not provide an official health check endpoint. Other LLM services that you can configure under `openai-compatible` provider may have available health check endpoints. |
+| instances.checks.active | object | True | | | Active health check configurations. |
+| instances.checks.active.type | string | False | http | [http, https, tcp] | Type of health check connection. |
+| instances.checks.active.timeout | number | False | 1 | | Health check timeout in seconds. |
+| instances.checks.active.concurrency | integer | False | 10 | | Number of upstream nodes to be checked at the same time. |
+| instances.checks.active.host | string | False | | | HTTP host. |
+| instances.checks.active.port | integer | False | | between 1 and 65535 inclusive | HTTP port. |
+| instances.checks.active.http_path | string | False | / | | Path for HTTP probing requests. |
+| instances.checks.active.https_verify_certificate | boolean | False | true | | If true, verify the node's TLS certificate. |
+| instances.checks.active.healthy | object | False | | | Healthy check configurations. |
+| instances.checks.active.healthy.interval | integer | False | 1 | | Time interval of checking healthy nodes, in seconds. |
+| instances.checks.active.healthy.http_statuses | array[integer] | False | [200,302] | status code between 200 and 599 inclusive | An array of HTTP status codes that defines a healthy node. |
+| instances.checks.active.healthy.successes | integer | False | 2 | between 1 and 254 inclusive | Number of successful probes to define a healthy node. |
+| instances.checks.active.unhealthy | object | False | | | Unhealthy check configurations. |
+| instances.checks.active.unhealthy.interval | integer | False | 1 | | Time interval of checking unhealthy nodes, in seconds. |
+| instances.checks.active.unhealthy.http_statuses | array[integer] | False | [429,404,500,501,502,503,504,505] | status code between 200 and 599 inclusive | An array of HTTP status codes that defines an unhealthy node. |
Review Comment:
`instances.checks.active.type` allows `tcp`, but `healthy.http_statuses` / `unhealthy.http_statuses` are HTTP-specific. Please clarify in the descriptions (or Valid column) that these fields apply only when `type` is `http`/`https` to prevent misconfiguration/confusion for `tcp` checks.
```suggestion
| instances.checks.active.healthy.http_statuses | array[integer] | False | [200,302] | status code between 200 and 599 inclusive | An array of HTTP status codes that defines a healthy node. Applies only when `instances.checks.active.type` is `http` or `https`. |
| instances.checks.active.healthy.successes | integer | False | 2 | between 1 and 254 inclusive | Number of successful probes to define a healthy node. |
| instances.checks.active.unhealthy | object | False | | | Unhealthy check configurations. |
| instances.checks.active.unhealthy.interval | integer | False | 1 | | Time interval of checking unhealthy nodes, in seconds. |
| instances.checks.active.unhealthy.http_statuses | array[integer] | False | [429,404,500,501,502,503,504,505] | status code between 200 and 599 inclusive | An array of HTTP status codes that defines an unhealthy node. Applies only when `instances.checks.active.type` is `http` or `https`. |
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org