Repository navigation
chore(backend): disable hosted Deepgram serving - #9936
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2bf82335d7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Monitor follow-up: PTT stereo rejection + e2e STT fake fixAddressed both Codex P2 review threads on this Deepgram serving retirement PR. Thread 1 — Thread 2 — Verification (local, in worktree venv):
Both review threads resolved. CI has not registered new runs for this push yet (the branch is 50 commits behind main and in CONFLICTING state); the previously-failing Hermetic Backend E2E tests are verified green locally. |
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
bc496da to
15437fe
Compare
… providers Addresses two Codex P2 review comments on the Deepgram serving retirement: 1. Preserve provider channel contract (chat.py:1170): Deepgram was the only PTT provider that accepted stereo. The Parakeet/Modulate replacements wire a mono PCM path, so a channels=2 PTT request would be billed as two channels while being transcribed as mono, corrupting timing and quality. Reject channels != 1 explicitly with WS close 1008 instead of silently downmixing or double-billing. 2. Update listen e2e STT fake for enabled providers (receiver.py:133): the hermetic E2E harness still monkeypatched listen_receiver.process_audio_dg (removed by this PR) and forced STTService.deepgram (now raises). This broke 4 listen_stt e2e tests in the Hermetic Backend E2E CI check. Point the fake at the enabled provider entry points (parakeet/modulate) and return STTService.parakeet, and update the failure-status provider assertion accordingly. Verification: - tests/unit/test_desktop_transcribe.py::TestTranscribeStreamWebSocket: 13 passed (including the new test_ws_rejects_stereo_after_deepgram_retirement). - testing/e2e/test_listen_stt.py: 11 passed (the 4 previously failing tests now pass). - testing/e2e/test_listen_pusher_wire_contract.py: 6 passed. - py_compile clean on all touched files.
Two CI checks were failing on this branch: 1. Backend unit suite: test_dg_start_guard.py expected connect_to_deepgram to be reachable with hosted Deepgram, but the retirement makes the path self-hosted-only (_deepgram_client_for_request raises unless is_dg_self_hosted). Patch is_dg_self_hosted=True so the start() guard behavior is still exercised. 2. Formatting (dart): a merge of origin/main dragged in 8 unrelated app/ dart files with stale formatting. Revert them to main; this backend chore does not touch app/ code. Failure-Class: none Verification: - backend/.venv pytest tests/unit/test_dg_start_guard.py tests/unit/test_deepgram_serving_disabled.py tests/unit/test_stt_provider_policy.py -> 13 passed
15437fe to
46cbe91
Compare
|
@cursor address merge conflict |
|
Merge conflict resolved and pushed. What conflicted: Only one file —
Resolution: After merging Verification:
Pushed: |
Reconcile the backend-other line-count ratchet for validate-backend-runtime-env.py at the post-merge count of 1831 lines, combining the serving STT retirement and forbidden-env guard justifications. Co-authored-by: David Zhang <[email protected]>
## Summary - Disable hosted Deepgram for all real-traffic STT surfaces; deployment preferences cannot reactivate it. - Keep the self-hosted Deepgram Helm chart, its production `dg.omi.me` endpoint, and explicit self-hosted credential configuration. - Make provider/surface availability code-owned: hosted Deepgram is disabled, while self-hosted Deepgram is explicit streaming-only; default streaming, prerecorded, and PTT traffic uses Parakeet or Modulate. - Preserve the follow-up PTT stereo rejection and its E2E fake adjustment. ## Verification - 325 focused backend unit tests passed, covering provider policy, hosted-Deepgram rejection, prerecorded routing, streaming backoff, deployment references, runtime-env validation, and the PTT follow-up. - `validate-backend-runtime-env.py --env dev --check-workflows --check-rendered-cloud-run` passed. - `validate-backend-runtime-env.py --env prod --check-workflows --check-rendered-cloud-run` passed. - `make preflight` passed (24 deterministic checks). - Final Luna review approved the combined branch: zero net self-hosted-chart diff, hosted Deepgram blocked from real traffic, and the PTT follow-up retained. ## Local environment note - Attempted `backend/testing/e2e/test_listen_stt.py`; all 11 cases were blocked before app setup by an installed `google-auth` / `google_auth_httplib2` API mismatch (`google.auth.transport.Response` missing), not by an application assertion. ## Scope note This verifies checked-in deployment source and rendered manifests. No live Kubernetes or Cloud Run inspection was possible because this environment has no cluster context or gcloud access. Failure-Class: none


Summary
dg.omi.meendpoint, and explicit self-hosted credential configuration.Verification
validate-backend-runtime-env.py --env dev --check-workflows --check-rendered-cloud-runpassed.validate-backend-runtime-env.py --env prod --check-workflows --check-rendered-cloud-runpassed.make preflightpassed (24 deterministic checks).Local environment note
backend/testing/e2e/test_listen_stt.py; all 11 cases were blocked before app setup by an installedgoogle-auth/google_auth_httplib2API mismatch (google.auth.transport.Responsemissing), not by an application assertion.Scope note
This verifies checked-in deployment source and rendered manifests. No live Kubernetes or Cloud Run inspection was possible because this environment has no cluster context or gcloud access.
Failure-Class: none