Repository navigation
feat(llm-gateway): enable production serving - #9651
Merged
Merged
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
This was referenced Jul 17, 2026
kodjima33
added a commit
that referenced
this pull request
Jul 17, 2026
…ts (#9922) ## Summary Prod chat (mobile TestFlight + App Store) went down after today's prod backend deploy — every `POST /v2/messages` hung 122–560s (vs the normal 3–10s) until mobile clients gave up. **Root cause:** `d83e37d21a` ("feat(llm-gateway): enable production serving", merged Jul 13) turned on `OMI_LLM_GATEWAY_FEATURE_MODE=gateway` for all prod backend services, but the llm-gateway itself was never deployed to prod: - Cloud Run services point at `http://172.16.160.108` — the static IP `prod-omi-self-hosted-llm-ip-address` is **RESERVED with no forwarding rule** (TCP blackhole; audit logs show no forwarding rule ever attached). - GKE `backend-listen` points at `prod-omi-llm-gateway.prod-omi-backend.svc.cluster.local` — **no such helm release/service exists** in the prod cluster. Because prod deploys had been failing since Jul 14 (fixed by #9911), the flag sat unshipped until today's deploy (`backend:7290a41`, ~11:43 UTC) released it. Every `omi:auto:*` LLM call (chat_agent, chat_extraction, fair_use, onboarding) then hung through connect timeouts + openai-client retries before falling back to the direct path. **This PR** flips the five prod `OMI_LLM_GATEWAY_FEATURE_MODE` entries to `'off'` (Cloud Run backend / backend-sync / backend-sync-backfill via anchor / backend-integration, plus GKE backend-listen), matching the live mitigation already applied to prod, and updates the deploy contract test to encode "wiring declared, serving off until the gateway is actually deployed". URL/token wiring stays so re-enablement is a one-line flip once a reachable prod gateway exists. ## Live mitigation already applied (prod is healthy now) - Removed `OMI_LLM_GATEWAY_FEATURE_MODE` from Cloud Run `backend` (revision `backend-01158-lmd`, 100% traffic), `backend-sync`, `backend-sync-backfill`, `backend-integration`; same for GKE `prod-omi-backend-listen` via `kubectl set env`. - This PR makes the repo manifest match prod so the next deploy doesn't re-break chat. ## Verification - Before: real-user `POST /v2/messages` latencies 122s/248s/364s/505s on `backend-7290a41`; gateway telemetry `outcome=error reason=unexpected_error` (fair_use, onboarding) and `outcome=fallback reason=timeout` (chat_agent, chat_extraction). - After: real-user POSTs 3.5s/3.6s/8.8s 200 on `backend-01158-lmd`; authenticated end-to-end send as a real user (`viUv7Gt…`) via `https://api.omi.me/v2/messages` returned the AI reply over SSE in **3.9s**. - `pytest tests/unit/test_llm_gateway_deploy_contract.py tests/unit/test_backend_runtime_env_validator.py` → 61 passed. - `validate-backend-runtime-env.py --env dev --check-workflows` and `--env prod --check-workflows` → both pass. - `helm lint charts/backend-listen -f prod_omi_backend_listen_values.yaml` → 0 failed. - Note: `scripts/pre-deploy-check.sh` not run locally (uv cannot fetch cpython 3.11.15 on this machine right now); CI runs the same contract. ## Product invariants affected none ## Failure class (fixes) Failure-Class: new Adds `.github/failure-classes/FC-unprovisioned-rollout-target.json`: a rollout flag routing production traffic to a service endpoint must not be enabled for an environment until that endpoint is provisioned and reachable there (evidence: #9651). ## Follow-up - Deploy the llm-gateway to prod (helm release + ingress bound to `prod-omi-self-hosted-llm-ip-address`, service token, Vertex WI perms) before flipping FEATURE_MODE back to `gateway`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
undivisible
pushed a commit
to undivisible/omi
that referenced
this pull request
Sep 29, 2026
…ts (BasedHardware#9922) ## Summary Prod chat (mobile TestFlight + App Store) went down after today's prod backend deploy — every `POST /v2/messages` hung 122–560s (vs the normal 3–10s) until mobile clients gave up. **Root cause:** `d83e37d21a` ("feat(llm-gateway): enable production serving", merged Jul 13) turned on `OMI_LLM_GATEWAY_FEATURE_MODE=gateway` for all prod backend services, but the llm-gateway itself was never deployed to prod: - Cloud Run services point at `http://172.16.160.108` — the static IP `prod-omi-self-hosted-llm-ip-address` is **RESERVED with no forwarding rule** (TCP blackhole; audit logs show no forwarding rule ever attached). - GKE `backend-listen` points at `prod-omi-llm-gateway.prod-omi-backend.svc.cluster.local` — **no such helm release/service exists** in the prod cluster. Because prod deploys had been failing since Jul 14 (fixed by BasedHardware#9911), the flag sat unshipped until today's deploy (`backend:7290a41`, ~11:43 UTC) released it. Every `omi:auto:*` LLM call (chat_agent, chat_extraction, fair_use, onboarding) then hung through connect timeouts + openai-client retries before falling back to the direct path. **This PR** flips the five prod `OMI_LLM_GATEWAY_FEATURE_MODE` entries to `'off'` (Cloud Run backend / backend-sync / backend-sync-backfill via anchor / backend-integration, plus GKE backend-listen), matching the live mitigation already applied to prod, and updates the deploy contract test to encode "wiring declared, serving off until the gateway is actually deployed". URL/token wiring stays so re-enablement is a one-line flip once a reachable prod gateway exists. ## Live mitigation already applied (prod is healthy now) - Removed `OMI_LLM_GATEWAY_FEATURE_MODE` from Cloud Run `backend` (revision `backend-01158-lmd`, 100% traffic), `backend-sync`, `backend-sync-backfill`, `backend-integration`; same for GKE `prod-omi-backend-listen` via `kubectl set env`. - This PR makes the repo manifest match prod so the next deploy doesn't re-break chat. ## Verification - Before: real-user `POST /v2/messages` latencies 122s/248s/364s/505s on `backend-7290a41`; gateway telemetry `outcome=error reason=unexpected_error` (fair_use, onboarding) and `outcome=fallback reason=timeout` (chat_agent, chat_extraction). - After: real-user POSTs 3.5s/3.6s/8.8s 200 on `backend-01158-lmd`; authenticated end-to-end send as a real user (`viUv7Gt…`) via `https://api.omi.me/v2/messages` returned the AI reply over SSE in **3.9s**. - `pytest tests/unit/test_llm_gateway_deploy_contract.py tests/unit/test_backend_runtime_env_validator.py` → 61 passed. - `validate-backend-runtime-env.py --env dev --check-workflows` and `--env prod --check-workflows` → both pass. - `helm lint charts/backend-listen -f prod_omi_backend_listen_values.yaml` → 0 failed. - Note: `scripts/pre-deploy-check.sh` not run locally (uv cannot fetch cpython 3.11.15 on this machine right now); CI runs the same contract. ## Product invariants affected none ## Failure class (fixes) Failure-Class: new Adds `.github/failure-classes/FC-unprovisioned-rollout-target.json`: a rollout flag routing production traffic to a service endpoint must not be enabled for an environment until that endpoint is provisioned and reachable there (evidence: BasedHardware#9651). ## Follow-up - Deploy the llm-gateway to prod (helm release + ingress bound to `prod-omi-self-hosted-llm-ip-address`, service token, Vertex WI perms) before flipping FEATURE_MODE back to `gateway`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.