This is an automated email from the ASF dual-hosted git repository.
shreemaanabhishek pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git
The following commit(s) were added to refs/heads/master by this push:
new a55134468 docs: include provider and gcp auth info (#12950)
a55134468 is described below
commit a551344684017e09a9aea1608033b8c919fa9dba
Author: Shreemaan Abhishek <[email protected]>
AuthorDate: Thu Jan 29 13:51:34 2026 +0545
docs: include provider and gcp auth info (#12950)
---
docs/en/latest/plugins/ai-proxy-multi.md | 7 +++++++
docs/en/latest/plugins/ai-proxy.md | 7 +++++++
docs/en/latest/plugins/ai-request-rewrite.md | 7 +++++++
docs/zh/latest/plugins/ai-proxy-multi.md | 7 +++++++
docs/zh/latest/plugins/ai-proxy.md | 7 +++++++
docs/zh/latest/plugins/ai-request-rewrite.md | 7 +++++++
6 files changed, 42 insertions(+)
diff --git a/docs/en/latest/plugins/ai-proxy-multi.md
b/docs/en/latest/plugins/ai-proxy-multi.md
index 5c195ada2..0c59fcb34 100644
--- a/docs/en/latest/plugins/ai-proxy-multi.md
+++ b/docs/en/latest/plugins/ai-proxy-multi.md
@@ -59,11 +59,18 @@ In addition, the Plugin also supports logging LLM request
information in the acc
| instances | array[object] | True |
| | LLM instance configurations. |
| instances.name | string | True |
| | Name of the LLM service instance. |
| instances.provider | string | True |
| [openai, deepseek, azure-openai, aimlapi, anthropic,
openrouter, gemini, vertex-ai, openai-compatible] | LLM service provider. When
set to `openai`, the Plugin will proxy the request to `api.openai.com`. When
set to `deepseek`, the Plugin will proxy the request to `api.deepseek.com`.
When set to `aimlapi`, the Plugin uses the OpenAI-compatible driver and proxies
the request to `api.aiml [...]
+| instances.provider_conf | object | False |
| | Configuration for the specific
provider. Required when `provider` is set to `vertex-ai` and `override` is not
configured. |
+| instances.provider_conf.project_id | string | True |
| | Google Cloud Project ID. |
+| instances.provider_conf.region | string | True |
| | Google Cloud Region. |
| instances.priority | integer | False | 0
| | Priority of the LLM instance in load
balancing. `priority` takes precedence over `weight`. |
| instances.weight | string | True | 0
| greater or equal to 0 | Weight of the LLM instance in
load balancing. |
| instances.auth | object | True |
| | Authentication configurations. |
| instances.auth.header | object | False |
| | Authentication headers. At least one of
the `header` and `query` should be configured. |
| instances.auth.query | object | False |
| | Authentication query parameters. At
least one of the `header` and `query` should be configured. |
+| instances.auth.gcp | object | False |
| | Configuration for Google Cloud Platform
(GCP) authentication. |
+| instances.auth.gcp.service_account_json | string | False |
| | Content of the GCP service account JSON
file. This can also be configured by setting the `GCP_SERVICE_ACCOUNT`
environment variable. |
+| instances.auth.gcp.max_ttl | integer | False |
| minimum = 1 | Maximum TTL (in seconds) for caching
the GCP access token. |
+| instances.auth.gcp.expire_early_secs| integer | False | 60
| minimum = 0 | Seconds to expire the access token
before its actual expiration time to avoid edge cases. |
| instances.options | object | False |
| | Model configurations. In addition to
`model`, you can configure additional parameters and they will be forwarded to
the upstream LLM service in the request body. For instance, if you are working
with OpenAI, DeepSeek, or AIMLAPI, you can configure additional parameters such
as `max_tokens`, `temperature`, `top_p`, and `stream`. See your LLM provider's
API documentation f [...]
| instances.options.model | string | False |
| | Name of the LLM model, such as `gpt-4`
or `gpt-3.5`. See your LLM provider's API documentation for more available
models. |
| logging | object | False |
| | Logging configurations. |
diff --git a/docs/en/latest/plugins/ai-proxy.md
b/docs/en/latest/plugins/ai-proxy.md
index e09f0c072..56bc7e1f0 100644
--- a/docs/en/latest/plugins/ai-proxy.md
+++ b/docs/en/latest/plugins/ai-proxy.md
@@ -52,9 +52,16 @@ In addition, the Plugin also supports logging LLM request
information in the acc
| Name | Type | Required | Default | Valid values
| Description |
|--------------------|--------|----------|---------|------------------------------------------|-------------|
| provider | string | True | | [openai, deepseek,
azure-openai, aimlapi, anthropic, openrouter, gemini, vertex-ai,
openai-compatible] | LLM service provider. When set to `openai`, the Plugin
will proxy the request to `https://api.openai.com/chat/completions`. When set
to `deepseek`, the Plugin will proxy the request to
`https://api.deepseek.com/chat/completions`. When set to `aimlapi`, the Plugin
uses the OpenAI-compatible driver and proxies the request to `https:// [...]
+| provider_conf | object | False | |
| Configuration for the specific provider. Required when
`provider` is set to `vertex-ai` and `override` is not configured. |
+| provider_conf.project_id | string | True | |
| Google Cloud Project ID. |
+| provider_conf.region | string | True | |
| Google Cloud Region. |
| auth | object | True | |
| Authentication configurations. |
| auth.header | object | False | |
| Authentication headers. At least one of `header` or `query`
must be configured. |
| auth.query | object | False | |
| Authentication query parameters. At least one of `header` or
`query` must be configured. |
+| auth.gcp | object | False | |
| Configuration for Google Cloud Platform (GCP) authentication. |
+| auth.gcp.service_account_json | string | False | |
| Content of the GCP service account JSON file. This can also
be configured by setting the `GCP_SERVICE_ACCOUNT` environment variable. |
+| auth.gcp.max_ttl | integer | False | | minimum = 1
| Maximum TTL (in seconds) for caching the GCP access token. |
+| auth.gcp.expire_early_secs | integer | False | 60 | minimum = 0
| Seconds to expire the access token before its actual
expiration time to avoid edge cases. |
| options | object | False | |
| Model configurations. In addition to `model`, you can configure
additional parameters and they will be forwarded to the upstream LLM service in
the request body. For instance, if you are working with OpenAI, you can
configure additional parameters such as `temperature`, `top_p`, and `stream`.
See your LLM provider's API documentation for more available options. |
| options.model | string | False | |
| Name of the LLM model, such as `gpt-4` or `gpt-3.5`. Refer to
the LLM provider's API documentation for available models. |
| override | object | False | |
| Override setting. |
diff --git a/docs/en/latest/plugins/ai-request-rewrite.md
b/docs/en/latest/plugins/ai-request-rewrite.md
index 955db9734..6304f59fe 100644
--- a/docs/en/latest/plugins/ai-request-rewrite.md
+++ b/docs/en/latest/plugins/ai-request-rewrite.md
@@ -37,9 +37,16 @@ The `ai-request-rewrite` plugin intercepts client requests
before they are forwa
| ------------------------- | ------------ | -------- |
------------------------------------------------------------------------------------
|
| prompt | Yes | String | The prompt send to LLM
service. |
| provider | Yes | String | Name of the LLM
service. Available options: openai, deekseek, azure-openai, aimlapi, anthropic,
openrouter, gemini, vertex-ai, and openai-compatible. When `aimlapi` is
selected, the plugin uses the OpenAI-compatible driver with a default endpoint
of `https://api.aimlapi.com/v1/chat/completions`. |
+| provider_conf | No | Object | Configuration for the
specific provider. Required when `provider` is set to `vertex-ai` and
`override` is not configured. |
+| provider_conf.project_id | Yes | String | Google Cloud Project
ID. |
+| provider_conf.region | Yes | String | Google Cloud Region. |
| auth | Yes | Object | Authentication
configuration |
| auth.header | No | Object | Authentication
headers. Key must match pattern `^[a-zA-Z0-9._-]+$`. |
| auth.query | No | Object | Authentication query
parameters. Key must match pattern `^[a-zA-Z0-9._-]+$`. |
+| auth.gcp | No | Object | Configuration for
Google Cloud Platform (GCP) authentication. |
+| auth.gcp.service_account_json | No | String | Content of the GCP
service account JSON file. This can also be configured by setting the
`GCP_SERVICE_ACCOUNT` environment variable. |
+| auth.gcp.max_ttl | No | Integer | Maximum TTL (in
seconds) for caching the GCP access token. Minimum: 1. |
+| auth.gcp.expire_early_secs| No | Integer | Seconds to expire the
access token before its actual expiration time to avoid edge cases. Minimum: 0.
Default: 60. |
| options | No | Object | Key/value settings for
the model |
| options.model | No | String | Model to execute.
Examples: "gpt-3.5-turbo" for openai, "deepseek-chat" for deekseek, or
"qwen-turbo" for openai-compatible or aimlapi services |
| override.endpoint | No | String | Override the default
endpoint when using OpenAI-compatible services (e.g., self-hosted models or
third-party LLM services). When the provider is 'openai-compatible', the
endpoint field is required. |
diff --git a/docs/zh/latest/plugins/ai-proxy-multi.md
b/docs/zh/latest/plugins/ai-proxy-multi.md
index 40f7157b3..2dc500848 100644
--- a/docs/zh/latest/plugins/ai-proxy-multi.md
+++ b/docs/zh/latest/plugins/ai-proxy-multi.md
@@ -59,11 +59,18 @@ description: ai-proxy-multi 插件通过负载均衡、重试、故障转移和
| instances | array[object] | 是 |
| | LLM 实例配置。 |
| instances.name | string | 是 |
| | LLM 服务实例的名称。 |
| instances.provider | string | 是 |
| [openai, deepseek, azure-openai, aimlapi, anthropic,
openrouter, gemini, vertex-ai, openai-compatible] | LLM 服务提供商。设置为 `openai`
时,插件将代理请求到 `api.openai.com`。设置为 `deepseek` 时,插件将代理请求到 `api.deepseek.com`。设置为
`aimlapi` 时,插件使用 OpenAI 兼容驱动程序,默认将请求代理到 `api.aimlapi.com`。设置为 `anthropic`
时,插件使用 OpenAI 兼容驱动程序,默认将请求代理到 `api.anthropic.com`。设置为 `openrouter` 时,插件使用
OpenAI 兼容驱动程序,默认将请求代理到 `openrouter.ai`。 [...]
+| instances.provider_conf | object | 否 |
| | 特定提供商的配置。当 `provider` 设置为 `vertex-ai` 且未配置
`override` 时必填。 |
+| instances.provider_conf.project_id | string | 是 |
| | Google Cloud 项目 ID。 |
+| instances.provider_conf.region | string | 是 |
| | Google Cloud 区域。 |
| instances.priority | integer | 否 | 0
| | LLM 实例在负载均衡中的优先级。`priority` 优先于 `weight`。 |
| instances.weight | string | 是 | 0
| 大于或等于 0 | LLM 实例在负载均衡中的权重。 |
| instances.auth | object | 是 |
| | 身份验证配置。 |
| instances.auth.header | object | 否 |
| | 身份验证标头。应配置 `header` 和 `query` 中的至少一个。 |
| instances.auth.query | object | 否 |
| | 身份验证查询参数。应配置 `header` 和 `query` 中的至少一个。 |
+| instances.auth.gcp | object | 否 |
| | Google Cloud Platform (GCP) 身份验证配置。 |
+| instances.auth.gcp.service_account_json | string | 否 |
| | GCP 服务账号 JSON 文件的内容。 |
+| instances.auth.gcp.max_ttl | integer | 否 |
| minimum = 1 | GCP 服务帐户 JSON
文件的内容。也可以通过设置“GCP_SERVICE_ACCOUNT”环境变量来配置 |
+| instances.auth.gcp.expire_early_secs| integer | 否 | 60
| minimum = 0 | 在访问令牌实际过期时间之前使其过期的秒数,以避免边缘情况。 |
| instances.options | object | 否 |
| | 模型配置。除了 `model` 之外,您还可以配置其他参数,它们将在请求体中转发到上游
LLM 服务。例如,如果您使用 OpenAI、DeepSeek 或 AIMLAPI,可以配置其他参数,如
`max_tokens`、`temperature`、`top_p` 和 `stream`。有关更多可用选项,请参阅您的 LLM 提供商的 API 文档。 |
| instances.options.model | string | 否 |
| | LLM 模型的名称,如 `gpt-4` 或
`gpt-3.5`。有关更多可用模型,请参阅您的 LLM 提供商的 API 文档。 |
| logging | object | 否 |
| | 日志配置。 |
diff --git a/docs/zh/latest/plugins/ai-proxy.md
b/docs/zh/latest/plugins/ai-proxy.md
index 8035237d7..0b9d9f81f 100644
--- a/docs/zh/latest/plugins/ai-proxy.md
+++ b/docs/zh/latest/plugins/ai-proxy.md
@@ -52,9 +52,16 @@ description: ai-proxy 插件通过将插件配置转换为所需的请求格式
| 名称 | 类型 | 必选项 | 默认值 | 有效值 | 描述
|
|--------------------|--------|----------|---------|------------------------------------------|-------------|
| provider | string | 是 | | [openai, deepseek,
azure-openai, aimlapi, anthropic, openrouter, gemini, vertex-ai,
openai-compatible] | LLM 服务提供商。当设置为 `openai` 时,插件将代理请求到
`https://api.openai.com/chat/completions`。当设置为 `deepseek` 时,插件将代理请求到
`https://api.deepseek.com/chat/completions`。当设置为 `aimlapi` 时,插件使用 OpenAI
兼容驱动程序,默认将请求代理到 `https://api.aimlapi.com/v1/chat/completions`。当设置为 `anthropic`
时,插件将代理请求到 `https://api.anthropic.com/v1/chat/completions`。当设置为 `openrouter`
时,插件 [...]
+| provider_conf | object | 否 | |
| 特定提供商的配置。当 `provider` 设置为 `vertex-ai` 且未配置 `override` 时必填。 |
+| provider_conf.project_id | string | 是 | |
| Google Cloud 项目 ID。 |
+| provider_conf.region | string | 是 | |
| Google Cloud 区域。 |
| auth | object | 是 | |
| 身份验证配置。 |
| auth.header | object | 否 | |
| 身份验证标头。必须配置 `header` 或 `query` 中的至少一个。 |
| auth.query | object | 否 | |
| 身份验证查询参数。必须配置 `header` 或 `query` 中的至少一个。 |
+| auth.gcp | object | 否 | |
| Google Cloud Platform (GCP) 身份验证配置。 |
+| auth.gcp.service_account_json | string | 否 | |
| GCP 服务账号 JSON 文件的内容。 |
+| auth.gcp.max_ttl | integer | 否 | | minimum = 1
| GCP 服务帐户 JSON 文件的内容。也可以通过设置“GCP_SERVICE_ACCOUNT”环境变量来配置。 |
+| auth.gcp.expire_early_secs | integer | 否 | 60 | minimum = 0
| 在访问令牌实际过期时间之前使其过期的秒数,以避免边缘情况。 |
| options | object | 否 | |
| 模型配置。除了 `model` 之外,您还可以配置其他参数,它们将在请求体中转发到上游 LLM 服务。例如,如果您使用
OpenAI,可以配置其他参数,如 `temperature`、`top_p` 和 `stream`。有关更多可用选项,请参阅您的 LLM 提供商的 API
文档。 |
| options.model | string | 否 | |
| LLM 模型的名称,如 `gpt-4` 或 `gpt-3.5`。请参阅 LLM 提供商的 API 文档以了解可用模型。 |
| override | object | 否 | |
| 覆盖设置。 |
diff --git a/docs/zh/latest/plugins/ai-request-rewrite.md
b/docs/zh/latest/plugins/ai-request-rewrite.md
index d98630d93..3768c0391 100644
--- a/docs/zh/latest/plugins/ai-request-rewrite.md
+++ b/docs/zh/latest/plugins/ai-request-rewrite.md
@@ -37,9 +37,16 @@ description: ai-request-rewrite 插件在客户端请求转发到上游服务之
| ------------------------- | ------------ | -------- |
------------------------------------------------------------------------------------
|
| prompt | 是 | String | 发送到 LLM 服务的提示。
|
| provider | 是 | String | LLM
服务的名称。可用选项:openai、deekseek、azure-openai、aimlapi、anthropic、openrouter、gemini、vertex-ai
和 openai-compatible。当选择 `aimlapi` 时,插件使用 OpenAI 兼容驱动程序,默认端点为
`https://api.aimlapi.com/v1/chat/completions`。 |
+| provider_conf | 否 | Object | 特定提供商的配置。当 `provider`
设置为 `vertex-ai` 且未配置 `override` 时必填。 |
+| provider_conf.project_id | 是 | String | Google Cloud 项目 ID。 |
+| provider_conf.region | 是 | String | Google Cloud 区域。 |
| auth | 是 | Object | 身份验证配置
|
| auth.header | 否 | Object | 身份验证头部。键必须匹配模式
`^[a-zA-Z0-9._-]+$`。 |
| auth.query | 否 | Object | 身份验证查询参数。键必须匹配模式
`^[a-zA-Z0-9._-]+$`。 |
+| auth.gcp | 否 | Object | Google Cloud Platform
(GCP) 身份验证配置。 |
+| auth.gcp.service_account_json | 否 | String | GCP 服务账号 JSON
文件的内容。也可以通过设置“GCP_SERVICE_ACCOUNT”环境变量来配置。 |
+| auth.gcp.max_ttl | 否 | Integer | 缓存 GCP 访问令牌的最大
TTL(秒)。最小值:1。 |
+| auth.gcp.expire_early_secs| 否 | Integer |
在访问令牌实际过期时间之前使其过期的秒数,以避免边缘情况。最小值:0。默认值:60。 |
| options | 否 | Object | 模型的键/值设置
|
| options.model | 否 | String | 要执行的模型。示例:openai 的
"gpt-3.5-turbo",deekseek 的 "deepseek-chat",或 openai-compatible 或 aimlapi 服务的
"qwen-turbo" |
| override.endpoint | 否 | String | 使用 OpenAI
兼容服务时覆盖默认端点(例如,自托管模型或第三方 LLM 服务)。当提供商为 'openai-compatible' 时,endpoint 字段是必需的。 |