Skip to content

fix(listen): separate STT provider retirement, routing allocation, and capacity admission #10048

Closed

Description

@Git-on-my-level

Incident

During the 2026-07-18 transcription incident, #9936 retired hosted Deepgram but also made parakeet,modulate-velma-2 the default real-time provider order. A production GKE rollout consequently sent the mobile fleet to a single Parakeet GPU pod with practical capacity around 25–30 concurrent streams; observed active streams exceeded 100.

The deploy workflow subsequently failed a Cloud Run runtime-env validation, but it did not roll back the completed GKE routing mutation.

Problem

Provider enablement, provider ordering, and provider traffic allocation are conflated. An ordered STT provider list answers which provider one request chooses; it does not constrain how much production traffic that provider may receive.

Retiring Omi-paid hosted Deepgram must not silently become a production routing migration or a capacity experiment.

Scope

Create a durable live-STT routing policy that treats these as independent controls:

  • provider enabled/retired status;
  • per-surface capability (language, codec, streaming vs prerecorded vs PTT);
  • explicit primary/fallback provider;
  • bounded provider admission/capacity budget;
  • rollout allocation for a provider, separate from eligibility;
  • health/circuit state that immediately falls back to Modulate when Parakeet is saturated or unhealthy.

Provider retirement must be subtractive: removing a provider must preserve the incumbent explicitly approved route, or fail deployment if no approved route remains. It must not implicitly promote another eligible provider to 100%.

Acceptance criteria

  • Routing policy has separate representations for provider eligibility, default route, fallback route, rollout allocation, and capacity/admission limits.
  • Parakeet has an enforced live-stream capacity budget below tested safe capacity; excess or unavailable requests fall back to Modulate without queueing indefinitely.
  • The capacity/fallback decision is emitted through the shared fallback telemetry with bounded labels and is visible in the resilience dashboard.
  • Changing a real-traffic default provider, increasing a provider allocation, removing its fallback, or changing a provider capacity limit is classified as a traffic migration and requires explicit rollout evidence.
  • Retiring hosted Deepgram alone cannot change the production primary provider.
  • Contract tests cover: retired-primary behavior, capacity exhaustion, provider-health failure, multilingual capability mismatch, and a 0%/canary/100% allocation transition.
  • A real traffic or production-like beta exercise proves fallback under saturation before Parakeet can receive non-zero broad production allocation.
  • The runbook documents immediate traffic-only mitigation (set allocation to 0 / force Modulate) without a code deploy.

Non-goals

  • Replacing or renegotiating Modulate in this issue.
  • Increasing Parakeet GPU fleet capacity without the routing guardrails above.
  • Redesigning the entire backend release system (tracked separately).

Evidence

Activity

  1. Git-on-my-level commented on Jul 23, 2026

    @Git-on-my-level
    MemberAuthor

    Live + main verification (2026-07-23) — leaving open

    Durable policy work landed on main via #10070 (f0b42e26, merged 2026-07-20), but production GKE has not absorbed it, so acceptance is not met.

    What landed on main (code/tests)

    AC theme Status on origin/main
    Separate eligibility / defaults Yes — backend/config/stt_provider_policy.py owns enablement + DEFAULT_MODELS_BY_SURFACE (modulate-velma-2,parakeet); Deepgram cloud retired (PROVIDER_SERVING_SURFACES[deepgram_cloud]=∅)
    Capacity + allocation controls Yes — PARAKEET_STREAM_CAPACITY / PARAKEET_STREAM_ALLOCATION_PERCENT in Parakeet Helm + backend/parakeet/admission.py
    Fallback telemetry Yes — record_fallback on Parakeet→Modulate path in utils/stt/streaming.py; circuit in provider_resilience.py
    Contract tests Partial — admission, helm contract, connection fallback, capacity rejection, multilingual policy tests exist; not a full named matrix for every AC bullet
    Traffic-migration classification Partial — settings classified in config/deployment-setting-classification.json; no dedicated “traffic migration evidence” gate beyond normal deploy
    Runbook: set allocation 0 / force Modulate without code deploy Not met as written — backend/docs/runbooks/parakeet-stream-capacity.md says changing capacity/allocation requires a Parakeet Helm rollout (“not a live runtime switch”)
    Prod-like soak before non-zero Parakeet allocation Not evidenced

    Live prod (prod-omi-gke / prod-omi-backend) — still unsafe/stale

    prod-omi-backend-listen (image backend:b0b1b69, updated 2026-07-20T13:01:46Z)
      STT_SERVICE_MODELS=dg-nova-3,modulate-velma-2,parakeet
      STT_PRERECORDED_MODEL=parakeet,modulate-velma-2
    
    prod-omi-parakeet (image parakeet:aa1133c, updated 2026-07-12T08:13:20Z)
      PARAKEET_STREAM_CAPACITY=<MISSING>
      PARAKEET_STREAM_ALLOCATION_PERCENT=<MISSING>
    
    prod-omi-pusher (updated 2026-07-22) — already on modulate-velma-2,parakeet
    

    Notes:

    Remaining to close this issue

    1. Roll out Parakeet Helm with capacity/allocation env (and image containing admission.py).
    2. Roll out backend-listen (and confirm) to STT_SERVICE_MODELS=modulate-velma-2,parakeet (and matching prerecorded order).
    3. Document / prove an immediate traffic-only mitigation (allocation 0 or Modulate-forced) without waiting on a full code rebuild — or explicitly rewrite that AC if Helm-only is the intended hatch.
    4. Record a real saturation→Modulate fallback exercise / soak evidence before claiming broad Parakeet allocation is safe.

    Leaving open until prod config matches the separated controls and the soak/runbook gaps above are closed.

  2. aryanorastar commented on Aug 6, 2026

    @aryanorastar
    Collaborator

    VERIFY — MAINTAINER-OPS / prod absorb (no contributor PR)

    Re-checked 2026-08-06 against David's 2026-07-23 leave-open note and current main.

    Already on main (via #10070):

    • backend/config/stt_provider_policy.py — eligibility vs defaults (Deepgram cloud retired; primary order modulate-first)
    • backend/parakeet/admission.py + Helm PARAKEET_STREAM_CAPACITY / PARAKEET_STREAM_ALLOCATION_PERCENT
    • fallback telemetry / circuit path
    • runbook backend/docs/runbooks/parakeet-stream-capacity.md (Helm-gated mitigation, not a live runtime switch)

    Still open by design (not a safe fork PR):

    1. Roll out Parakeet + backend-listen on prod GKE so live env matches the separated controls (David's check showed listen still on pre-fix(listen): enforce globally bounded Parakeet routing and fallback #10070 image / stale STT_SERVICE_MODELS, Parakeet missing capacity env).
    2. Saturation → Modulate soak evidence before broad Parakeet allocation.
    3. Traffic-only mitigation without rebuild — either prove Helm/ConfigMap hatch or rewrite that AC.

    I'm not opening a parallel routing PR: the durable policy already landed; remaining acceptance is deploy/ops + soak under maintainer ownership. Happy to help on a maintainer-requested follow-up (e.g. runbook AC rewrite or contract-test matrix) if that's useful.

  3. added
    capture
    p0
    p1
    understand
    p2
    and removed
    p0
    capture
    p1
    on Oct 6, 2026
  4. undivisible commented on Oct 15, 2026

    @undivisible
    Collaborator

    Already fixed on main: PR #10070 establishes Modulate primary, bounded Parakeet admission, fallback/circuit handling; main’s STT policy, tests, telemetry, and runbook preserve those separate controls.

    Closing. Reopen if you still see it on the latest build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    p2understand

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions