Skip to content

Feat: upgrade gateway version and add ai provider doc#472

Open
Aias00 wants to merge 2 commits intohigress-group:mainfrom
Aias00:feat/change_gateway_version
Open

Feat: upgrade gateway version and add ai provider doc#472
Aias00 wants to merge 2 commits intohigress-group:mainfrom
Aias00:feat/change_gateway_version

Conversation

@Aias00
Copy link
Copy Markdown

@Aias00 Aias00 commented Sep 25, 2025

upgrade gateway version and add ai provider doc

@lingma-agents
Copy link
Copy Markdown

lingma-agents Bot commented Sep 25, 2025

升级网关版本并新增AI提供商文档

变更概述
  • 文档
    • 在英文和中文的AI代理提供商文档中新增了对Grok、OpenRouter、Fireworks AI、Cohere、Together-AI、Dify、Google Vertex AI、AWS Bedrock和NVIDIA Triton Interference Server的支持说明。
    • 为新增的AI提供商添加了相应的配置字段说明和示例。
  • 配置调整
    • wasm-go.md文档中的网关镜像版本从旧版本升级至v2.1.8
变更文件
文件路径 变更说明
src/​content/​docs/​latest/​en/​plugins/​ai/​api-provider/​ai-proxy.​md 新增了对Grok、OpenRouter、Fireworks AI、Cohere、Together-AI、Dify、Google Vertex AI、AWS Bedrock和NVIDIA Triton Interference Server的支持说明及配置字段描述。
src/​content/​docs/​latest/​en/​user/​wasm-go.​md 将Docker compose中的网关镜像版本更新为`v2.1.8`。
src/​content/​docs/​latest/​zh-cn/​plugins/​ai/​api-provider/​ai-proxy.​md 新增了对Grok、OpenRouter、Fireworks AI、Dify、Google Vertex AI、AWS Bedrock和NVIDIA Triton Interference Server的支持说明及配置字段描述。
src/​content/​docs/​latest/​zh-cn/​user/​wasm-go.​md 将Docker compose中的网关镜像版本更新为`v2.1.8`。

💡 小贴士

与 lingma-agents 交流的方式

📜 直接回复评论
直接回复本条评论,lingma-agents 将自动处理您的请求。例如:

  • 在当前代码中添加详细的注释说明。

  • 请详细介绍一下你说的 LRU 改造方案,并使用伪代码加以说明。

📜 在代码行处标记
在文件的特定位置创建评论并 @lingma-agents。例如:

  • @lingma-agents 分析这个方法的性能瓶颈并提供优化建议。

  • @lingma-agents 对这个方法生成优化代码。

📜 在讨论中提问
在任何讨论中 @lingma-agents 来获取帮助。例如:

  • @lingma-agents 请总结上述讨论并提出解决方案。

  • @lingma-agents 请根据讨论内容生成优化代码。

Copy link
Copy Markdown

@lingma-agents lingma-agents Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔎 代码评审报告

🎯 评审意见概览
严重度 数量 说明
🔴 Blocker 0 阻断性问题,需立即修复。例如:系统崩溃、关键功能不可用或严重安全漏洞。
🟠 Critical 2 严重问题,高优先级修复。例如:核心功能异常或性能瓶颈影响用户体验。
🟡 Major 1 主要问题,建议修复。例如:非核心功能缺陷或代码维护性较差。
🟢 Minor 0 次要问题,酬情优化。例如:代码格式不规范或注释缺失。

总计: 3 个问题

📋 评审意见详情
💡 代码实现建议
以下是文件级别的代码建议,聚焦于代码的可读性、可维护性和潜在问题。
📖 src/content/docs/latest/en/plugins/ai/api-provider/ai-proxy.md (1 💬)
📖 src/content/docs/latest/zh-cn/plugins/ai/api-provider/ai-proxy.md (2 💬)
🚀 架构设计建议
以下是对代码架构和设计的综合分析,聚焦于跨文件交互、系统一致性和潜在优化空间。
🔍1. AI代理配置文档中的字段描述不一致问题

在英文和中文文档中,部分AI服务提供商的配置字段描述存在不一致。例如,NVIDIA Triton Interference Server在英文文档中使用了AWS相关的配置字段(awsAccessKey、awsSecretKey等),而在中文文档中却使用了modelVersion和tritonDomain等字段。这种不一致性可能导致用户混淆,影响文档的准确性和可用性。建议统一各语言版本的配置字段描述,并确保与实际实现一致。

📌 关键代码

| `awsAccessKey`            | string | Required   | -   | AWS Access Key, used for authentication        |
| `awsSecretKey`            | string | Required   | -   | AWS Secret Access Key, used for authentication |
| `awsRegion`               | string | Required   | -   | AWS region, e.g., us-east-1          |
| `bedrockAdditionalFields` | map    | Optional  | -   | Additional inference parameters that the model supports             |
| `awsAccessKey`            | string | 必填   | -   | AWS Access Key,用于身份认证        |
| `awsSecretKey`            | string | 必填   | -   | AWS Secret Access Key,用于身份认证 |
| `awsRegion`               | string | 必填   | -   | AWS 区域,例如:us-east-1          |
| `bedrockAdditionalFields` | map    | 非必填  | -   | Bedrock 额外模型请求参数             |

⚠️ 潜在风险

用户可能因文档不一致而配置错误,导致服务无法正常运行;降低文档质量和用户体验;增加技术支持成本。

🔍2. 网关镜像版本升级的兼容性风险

本次PR将网关镜像从旧版本升级到v2.1.8。虽然版本升级通常带来性能改进和新功能,但也可能引入与现有配置或插件的兼容性问题。建议在升级前进行全面的回归测试,确保所有现有功能正常工作,并提供详细的升级指南以帮助用户平稳过渡。

📌 关键代码

image: higress-registry.cn-hangzhou.cr.aliyuncs.com/higress/gateway:v2.1.8
image: higress-registry.cn-hangzhou.cr.aliyuncs.com/higress/gateway:v2.1.8

⚠️ 潜在风险

现有配置或插件可能因版本升级而失效;用户在升级过程中可能遇到不可预见的问题;缺乏升级指南可能导致用户困惑和不满。

🔍3. 新增AI服务提供商文档的完整性问题

本次PR新增了多个AI服务提供商的文档,包括Grok、OpenRouter、Fireworks AI、Cohere、Together-AI、Dify、Google Vertex AI、AWS Bedrock和NVIDIA Triton。虽然这些新增内容丰富了文档的覆盖范围,但部分服务(如Grok、OpenRouter、Fireworks AI等)仅提供了基本的type信息,缺乏详细的配置说明和使用示例。这可能导致用户在实际使用时遇到困难。建议为每个新增服务提供完整的配置说明和典型使用示例。

📌 关键代码

#### Grok

For Grok, the corresponding `type` is `grok`. It has no unique configuration fields.

#### OpenRouter

For OpenRouter, the corresponding `type` is `openrouter`. It has no unique configuration fields.

#### Fireworks AI

For Fireworks AI, the corresponding `type` is `fireworks`. It has no unique configuration fields.

⚠️ 潜在风险

用户可能因缺乏详细文档而无法正确配置和使用新增服务;降低文档的实用性和用户满意度;增加用户学习成本和技术支持负担。

审查详情
📒 文件清单 (4 个文件)
📝 变更: 4 个文件

📝 变更文件:

  • src/content/docs/latest/en/plugins/ai/api-provider/ai-proxy.md
  • src/content/docs/latest/en/user/wasm-go.md
  • src/content/docs/latest/zh-cn/plugins/ai/api-provider/ai-proxy.md
  • src/content/docs/latest/zh-cn/user/wasm-go.md

💡 小贴士

与 lingma-agents 交流的方式

📜 直接回复评论
直接回复本条评论,lingma-agents 将自动处理您的请求。例如:

  • 在当前代码中添加详细的注释说明。

  • 请详细介绍一下你说的 LRU 改造方案,并使用伪代码加以说明。

📜 在代码行处标记
在文件的特定位置创建评论并 @lingma-agents。例如:

  • @lingma-agents 分析这个方法的性能瓶颈并提供优化建议。

  • @lingma-agents 对这个方法生成优化代码。

📜 在讨论中提问
在任何讨论中 @lingma-agents 来获取帮助。例如:

  • @lingma-agents 请总结上述讨论并提出解决方案。

  • @lingma-agents 请根据讨论内容生成优化代码。

Comment on lines +291 to +296
| Name | Data Type | Requirement | Default | Description |
|---------------------------|--------|------|-----|------------------------------|
| `awsAccessKey` | string | Required | - | AWS Access Key, used for authentication |
| `awsSecretKey` | string | Required | - | AWS Secret Access Key, used for authentication |
| `awsRegion` | string | Required | - | AWS region, e.g., us-east-1 |
| `bedrockAdditionalFields` | map | Optional | - | Additional inference parameters that the model supports |
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

应统一 NVIDIA Triton Interference Server 配置字段描述与标题的一致性。

🟡 Major | 🧹 Code Smells

📋 问题详情

在英文文档中,NVIDIA Triton Interference Server 的标题和其配置字段描述不一致。标题表明是针对 NVIDIA Triton,但配置字段却包含了 AWS 相关的信息,这可能会导致用户混淆。应该确保标题和内容描述相匹配,或者明确指出这些字段适用于特定场景下的 Triton 接入方式。

💡 解决方案

修改 NVIDIA Triton Interference Server 的配置字段说明,使其与标题保持一致或添加注释以澄清用途。

-| Name                        | Data Type   | Requirement | Default | Description                           |
-|---------------------------|--------|------|-----|------------------------------|
-| `awsAccessKey`            | string | Required   | -   | AWS Access Key, used for authentication        |
-| `awsSecretKey`            | string | Required   | -   | AWS Secret Access Key, used for authentication |
-| `awsRegion`               | string | Required   | -   | AWS region, e.g., us-east-1          |
-| `bedrockAdditionalFields` | map    | Optional  | -   | Additional inference parameters that the model supports             |
+| Name                        | Data Type   | Requirement | Default | Description                           |
+|---------------------------|--------|------|-----|------------------------------|
+| `tritonServerUrl`         | string | Required   | -   | URL of the NVIDIA Triton Inference Server |
+| `modelVersion`            | string | Optional   | -   | Version of the model deployed on Triton |
+| `tritonAdditionalFields`  | map    | Optional   | -   | Additional inference parameters supported by the model |

您的反馈对我们很重要!(建议右键在新标签页中打开以下链接)

有用意见👍无用意见👎错误意见❌

Comment on lines +293 to +297
| 名称 | 数据类型 | 填写要求 | 默认值 | 描述 |
|---------------------------|--------|------|-----|------------------------------|
| `modelVersion` | string | 非必填 | - | 用于指定 Triton Server 中 model version |
| `tritonDomain` | string | 非必填 | - | Triton Server 部署的指定请求 Domain |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

应修正 AWS Bedrock 和 NVIDIA Triton 的配置字段描述错误。

🟠 Critical | 🐞 Bugs

📋 问题详情

中文文档中的 AWS Bedrock 和 NVIDIA Triton Interference Server 的配置字段存在互相错位的问题。AWS Bedrock 应该包含 AWS 相关字段,而 NVIDIA Triton 应该包含 Triton 特有的字段。当前两者之间的字段描述发生了交换,这对用户的实际使用会造成误导。

💡 解决方案

将 AWS Bedrock 和 NVIDIA Triton 的配置字段恢复到正确的位置,并更新字段描述。

-| 名称            | 数据类型  | 填写要求 | 默认值 | 描述                           |
-|---------------------------|--------|------|-----|------------------------------|
-| `modelVersion` | string   | 非必填  | -   | 用于指定 Triton Server 中 model version           |
-| `tritonDomain` | string   | 非必填  | -   | Triton Server 部署的指定请求 Domain            |
+| 名称                      | 数据类型 | 填写要求 | 默认值 | 描述                                             |
+|---------------------------|-----------|-------------|---------|--------------------------------------------------|
+| `awsAccessKey`            | string    | 必填    | -       | AWS Access Key,用于身份认证                  |
+| `awsSecretKey`            | string    | 必填    | -       | AWS Secret Access Key,用于身份认证           |
+| `awsRegion`               | string    | 必填    | -       | AWS 区域,例如:us-east-1                      |
+| `bedrockAdditionalFields` | map       | 非必填  | -       | Bedrock 额外模型请求参数                       |

您的反馈对我们很重要!(建议右键在新标签页中打开以下链接)

有用意见👍无用意见👎错误意见❌

Comment on lines +302 to +307
| 名称 | 数据类型 | 填写要求 | 默认值 | 描述 |
|---------------------------|--------|------|-----|------------------------------|
| `awsAccessKey` | string | 必填 | - | AWS Access Key,用于身份认证 |
| `awsSecretKey` | string | 必填 | - | AWS Secret Access Key,用于身份认证 |
| `awsRegion` | string | 必填 | - | AWS 区域,例如:us-east-1 |
| `bedrockAdditionalFields` | map | 非必填 | - | Bedrock 额外模型请求参数 |
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

应更正 NVIDIA Triton Interference Server 的配置字段描述。

🟠 Critical | 🐞 Bugs

📋 问题详情

中文文档中 NVIDIA Triton Interference Server 的配置字段描述实际上是 AWS Bedrock 的字段,这种错误会导致开发者误解如何配置该服务。应当提供正确的字段列表以及相应的描述信息。

💡 解决方案

更新 NVIDIA Triton Interference Server 的配置字段为正确的字段及其描述。

-| 名称                        | 数据类型   | 填写要求 | 默认值 | 描述                           |
-|---------------------------|--------|------|-----|------------------------------|
-| `awsAccessKey`            | string | 必填   | -   | AWS Access Key,用于身份认证        |
-| `awsSecretKey`            | string | 必填   | -   | AWS Secret Access Key,用于身份认证 |
-| `awsRegion`               | string | 必填   | -   | AWS 区域,例如:us-east-1          |
-| `bedrockAdditionalFields` | map    | 非必填  | -   | Bedrock 额外模型请求参数             |
+| 名称                        | 数据类型   | 填写要求 | 默认值 | 描述                           |
+|---------------------------|--------|------|-----|------------------------------|
+| `tritonServerUrl`         | string | 必填   | -   | NVIDIA Triton Inference Server 的 URL |
+| `modelVersion`            | string | 非必填  | -   | 指定 Triton Server 上的模型版本         |
+| `tritonAdditionalFields`  | map    | 非必填  | -   | 模型支持的额外推理参数                   |

您的反馈对我们很重要!(建议右键在新标签页中打开以下链接)

有用意见👍无用意见👎错误意见❌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant