AI Gateway: 404 route_not_found on /v1/chat/completions
Symptom
- Agent chat fails. The worker log may only show
unhandled errors in a TaskGroup (1 sub-exception). - Deeper in that log (or Envoy):
POST /v1/chat/completions404route_not_found. kubectl -n zelkor get aigatewayrouteis empty for the platform release.
Cause
The chart renders AIGatewayRoute only when a provider credential is set. helm upgrade -f overlay.yaml with workspace.models.providers.*.apiKey: "" replaces a previous secret and deletes the route. Helm --reuse-values does not keep a key that the overlay explicitly clears.
Confirm
bash
kubectl -n zelkor get aigatewayroute,backend
helm get values zelkor-platform -n zelkorExpect a backend and route for the provider you use. If apiKey (or vllm.backendUrl / ollamaLocal.host) is empty and defaultModel is set, Helm now fails at template time instead of shipping a dead gateway.
Fix
- Pass the credential again (do not commit it):
bash
helm upgrade zelkor-platform charts/zelkor-platform \
--namespace zelkor \
--reuse-values \
--set-file workspace.models.providers.openai.apiKey=./openai.keyUse the provider key you actually run (for example ollamaCloud.apiKey).
Keep secrets out of git overlays. Empty
apiKey: ""in a file you-fon every upgrade will wipe the route.Retry the agent call.