원클릭으로
aigw-route
Create an AIGatewayRoute to bind AI backends to a Gateway with model-based routing
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Create an AIGatewayRoute to bind AI backends to a Gateway with model-based routing
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Configure client-facing traffic policies -- timeouts, connection limits, TLS settings, HTTP behavior
Production-grade Envoy Gateway setup with comprehensive security, observability, high availability, and operational best practices
Integrate Envoy Gateway with Istio ambient mesh or Cilium for unified ingress and service mesh
Envoy Gateway version information, compatibility matrix, and upgrade readiness checks
Envoy AI Gateway contribution orchestrator — interviews you about your contribution and guides you through the correct workflow using contributor skills
Envoy Gateway contribution orchestrator — interviews you about your contribution and guides you through the correct workflow using contributor skills
| name | aigw-route |
| description | Create an AIGatewayRoute to bind AI backends to a Gateway with model-based routing |
| arguments | [{"name":"GatewayName","description":"Name of the Gateway to attach the route to","required":true},{"name":"RouteName","description":"Name for the AIGatewayRoute resource","required":false},{"name":"ModelHeader","description":"Value for x-ai-eg-model header match (e.g., gpt-4o-mini)","required":false},{"name":"BackendNames","description":"Comma-separated list of AIServiceBackend names","required":true}] |
Create an AIGatewayRoute that attaches AI service backends to a Gateway. The route uses rules with matches (typically on x-ai-eg-model header) and backendRefs to route traffic. The AI Gateway ExtProc extracts the model name from the request body and injects it into x-ai-eg-model before routing—clients do not need to set this header. AI Gateway generates an HTTPRoute (same name) and HTTPRouteFilters (host rewrite, 404 fallback) from this.
Envoy Gateway defaults to 32KiB buffer limit, which is too small for AI requests. Attach a ClientTrafficPolicy to your Gateway:
apiVersion: gateway.envoyproxy.io/v1alpha1
kind: ClientTrafficPolicy
metadata:
name: client-buffer-limit
namespace: default # TODO: Match your Gateway namespace
spec:
targetRefs:
- group: gateway.networking.k8s.io
kind: Gateway
name: ${GatewayName} # TODO: Replace with your Gateway name
connection:
bufferLimit: 50Mi
apiVersion: aigateway.envoyproxy.io/v1alpha1
kind: AIGatewayRoute
metadata:
name: ${RouteName} # TODO: Replace with descriptive name (e.g., openai-route)
namespace: default # TODO: Match Gateway namespace
spec:
parentRefs:
- name: ${GatewayName}
kind: Gateway
group: gateway.networking.k8s.io
rules:
- matches:
- headers:
- type: Exact
name: x-ai-eg-model
value: ${ModelHeader} # TODO: e.g., gpt-4o-mini, claude-3-5-sonnet
backendRefs:
- name: ${BackendNames} # TODO: AIServiceBackend name(s)
Traffic splitting by weight:
rules:
- matches:
- headers:
- type: Exact
name: x-ai-eg-model
value: gpt-4o
backendRefs:
- name: openai-backend
weight: 80
- name: azure-openai-backend
weight: 20
Failover by priority (lower number = higher priority):
rules:
- matches:
- headers:
- type: Exact
name: x-ai-eg-model
value: gpt-4o
backendRefs:
- name: primary-openai
priority: 0
- name: fallback-openai
priority: 1
To route all models to a single backend:
rules:
- backendRefs:
- name: my-openai-backend
For streaming responses (e.g., chat completions with stream: true), increase the request timeout:
rules:
- matches:
- headers:
- type: Exact
name: x-ai-eg-model
value: gpt-4o
timeouts:
request: 300s # 5 minutes for long streaming
backendRefs:
- name: openai-backend
Override the model name sent to the backend:
backendRefs:
- name: azure-openai-backend
modelNameOverride: gpt-4o # Azure deployment name
For InferencePool backends (Gateway API Inference Extension; requires addon):
backendRefs:
- name: my-inference-pool
group: inference.networking.k8s.io
kind: InferencePool
Constraints: Only one InferencePool per rule; cannot mix InferencePool with AIServiceBackend in the same rule. Cross-namespace references require ReferenceGrant in the target namespace.