aigw-orchestrator
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseOrchestrate a full Envoy AI Gateway deployment by asking intake questions and composing the appropriate atomic skills. Use this when the user wants to set up AI Gateway from scratch or add a new provider.
通过询问需求问题并组合对应的原子技能,编排完整的Envoy AI Gateway部署流程。当用户希望从零开始搭建AI Gateway或添加新的服务提供商时,可使用本流程。
Intake Questions
需求收集问题
Before generating configuration, ask:
-
Installation
- Do you already have Envoy Gateway installed? If not, we need .
/aigw-install - Do you need rate limiting or InferencePool? (addons)
- Do you already have Envoy Gateway installed? If not, we need
-
Provider
- Which AI provider(s)? (OpenAI, Anthropic, AWS Bedrock, Azure OpenAI, GCP Vertex AI, Cohere, self-hosted/Ollama, etc.)
- For cloud providers: How will you authenticate? (API key, IRSA/Pod Identity, service account, etc.)
-
Routing
- Route by model? (e.g., gpt-4o-mini → backend A, claude-3-5-sonnet → backend B)
- Need failover or traffic splitting?
-
Environment
- Namespace for Gateway and routes?
- Gateway name (if reusing existing)?
在生成配置之前,请询问以下问题:
-
安装相关
- 你是否已经安装了Envoy Gateway?如果没有,我们需要使用。
/aigw-install - 是否需要限流功能或InferencePool?(附加组件)
- 你是否已经安装了Envoy Gateway?如果没有,我们需要使用
-
服务提供商
- 选择的AI服务提供商有哪些?(OpenAI、Anthropic、AWS Bedrock、Azure OpenAI、GCP Vertex AI、Cohere、自托管/Ollama等)
- 对于云服务提供商:将采用何种认证方式?(API密钥、IRSA/Pod身份、服务账号等)
-
路由配置
- 是否按模型路由?(例如:gpt-4o-mini → 后端A,claude-3-5-sonnet → 后端B)
- 是否需要故障转移或流量拆分?
-
环境配置
- Gateway和路由所在的命名空间?
- Gateway名称(如果复用现有实例)?
Composition Flow
编排流程
- If fresh install: Run with user's version/namespace preferences.
/aigw-install - Gateway + ClientTrafficPolicy: Ensure Gateway exists and has ClientTrafficPolicy with .
bufferLimit: 50Mi - For each provider:
- Run with BackendName, Schema, Hostname, Port. (AIServiceBackend must reference Backend, not K8s Service.)
/aigw-backend - Run with PolicyType and AIServiceBackendName; create Secret if API key. At most one BackendSecurityPolicy per backend.
/aigw-auth - Add BackendTLSPolicy for HTTPS backends.
- Run
- Route: Run with GatewayName, BackendNames, and optional ModelHeader for each rule.
/aigw-route
- 全新安装场景:根据用户选择的版本和命名空间,执行。
/aigw-install - Gateway + ClientTrafficPolicy:确保Gateway已存在,且配置了带有的ClientTrafficPolicy。
bufferLimit: 50Mi - 针对每个服务提供商:
- 执行,传入BackendName、Schema、Hostname、Port参数。(AIServiceBackend必须关联Backend,而非K8s Service。)
/aigw-backend - 执行,传入PolicyType和AIServiceBackendName;若使用API密钥则创建Secret。每个后端最多配置一个BackendSecurityPolicy。
/aigw-auth - 为HTTPS后端添加BackendTLSPolicy。
- 执行
- 路由配置:执行,传入GatewayName、BackendNames,以及每个规则可选的ModelHeader。
/aigw-route
Example: OpenAI + Anthropic
示例:OpenAI + Anthropic
Intake: User wants OpenAI (gpt-4o-mini) and Anthropic (claude-3-5-sonnet) behind one Gateway.
Generated flow:
- Install (if needed):
/aigw-install - Gateway + ClientTrafficPolicy (from aigw-route skill)
- Backend + AIServiceBackend for OpenAI: BackendName=openai, Schema=OpenAI, Hostname=api.openai.com, Port=443
/aigw-backend - BackendSecurityPolicy + Secret for OpenAI: PolicyType=APIKey, AIServiceBackendName=openai
/aigw-auth - BackendTLSPolicy for api.openai.com
- Backend + AIServiceBackend for Anthropic: BackendName=anthropic, Schema=Anthropic, Hostname=api.anthropic.com, Port=443
/aigw-backend - BackendSecurityPolicy + Secret for Anthropic: PolicyType=AnthropicAPIKey, AIServiceBackendName=anthropic
/aigw-auth - BackendTLSPolicy for api.anthropic.com
- AIGatewayRoute with two rules:
- Match x-ai-eg-model=gpt-4o-mini → openai
- Match x-ai-eg-model=claude-3-5-sonnet → anthropic
需求收集:用户希望在同一个Gateway后部署OpenAI(gpt-4o-mini)和Anthropic(claude-3-5-sonnet)。
生成的编排流程:
- 安装(若未安装):
/aigw-install - 配置Gateway + ClientTrafficPolicy(来自aigw-route技能)
- 为OpenAI配置Backend + AIServiceBackend:BackendName=openai, Schema=OpenAI, Hostname=api.openai.com, Port=443
/aigw-backend - 为OpenAI配置BackendSecurityPolicy + Secret:PolicyType=APIKey, AIServiceBackendName=openai
/aigw-auth - 为api.openai.com配置BackendTLSPolicy
- 为Anthropic配置Backend + AIServiceBackend:BackendName=anthropic, Schema=Anthropic, Hostname=api.anthropic.com, Port=443
/aigw-backend - 为Anthropic配置BackendSecurityPolicy + Secret:PolicyType=AnthropicAPIKey, AIServiceBackendName=anthropic
/aigw-auth - 为api.anthropic.com配置BackendTLSPolicy
- 配置AIGatewayRoute,包含两条规则:
- 匹配x-ai-eg-model=gpt-4o-mini → 路由至openai
- 匹配x-ai-eg-model=claude-3-5-sonnet → 路由至anthropic
Checklist
检查清单
- All intake questions answered
- Install steps included if needed
- ClientTrafficPolicy with bufferLimit on Gateway
- Each provider has Backend + AIServiceBackend + BackendSecurityPolicy + BackendTLSPolicy (for HTTPS)
- At most one BackendSecurityPolicy per AIServiceBackend (or InferencePool)
- AIGatewayRoute rules match user's routing intent
- Secrets created for API keys (never hardcode keys in YAML)
- 所有需求收集问题已答复
- 按需包含安装步骤
- Gateway已配置带bufferLimit的ClientTrafficPolicy
- 每个服务提供商都配置了Backend + AIServiceBackend + BackendSecurityPolicy + BackendTLSPolicy(针对HTTPS)
- 每个AIServiceBackend(或InferencePool)最多配置一个BackendSecurityPolicy
- AIGatewayRoute规则符合用户的路由需求
- 已为API密钥创建Secret(绝不在YAML中硬编码密钥)