Skip to content

Enable low-latency streaming for fresh installs#10

Merged
a692570 merged 1 commit into
mainfrom
codex/default-low-latency-streaming
Jul 17, 2026
Merged

Enable low-latency streaming for fresh installs#10
a692570 merged 1 commit into
mainfrom
codex/default-low-latency-streaming

Conversation

@a692570

@a692570 a692570 commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Summary

Enable Deepgram streaming by default when Bolo uses its default deepgram/nova-3 STT model. Keep explicit off, AssemblyAI selection, and custom-model behavior intact.

Why this change

Fresh installs used batch transcription while the maintainer configuration enabled streaming, so new users did not receive the same low-latency path.

Testing

  • Tested locally on macOS
  • cargo fmt --all -- --check
  • cargo test --release (53 passed)
  • python3 -m pytest -q (43 passed)
  • Shell scripts pass bash -n
  • Reviewed the configuration fallback behavior

Documentation

  • README updated for the new default and explicit opt-out
  • No UI change

Notes

Selecting a non-default BOLO_STT_MODEL leaves streaming disabled unless the user explicitly selects a streaming provider.

@entelligence-ai-pr-reviews

entelligence-ai-pr-reviews Bot commented Jul 17, 2026

Copy link
Copy Markdown

EntelligenceAI PR Summary

This PR makes Deepgram streaming (deepgram/nova-3) the default STT mode, replacing the previous opt-in behavior, and refactors the related configuration logic for testability.

  • README.md: Updated docs so BOLO_STT_STREAMING='off' is now required to disable streaming; added clarification that non-default BOLO_STT_MODEL keeps streaming off unless overridden
  • src/main.rs: load_streaming_provider now accepts stt_model; new streaming_provider_from_config function implements smart defaulting (Deepgram streaming auto-enabled for deepgram/nova-3, explicit config values still take precedence)
  • src/main.rs: Unit tests added to cover all branching scenarios of the new default behavior

Confidence Score: 5/5 - Safe to Merge

Safe to merge — this PR cleanly promotes Deepgram streaming (deepgram/nova-3) to the default STT mode and refactors load_streaming_provider into a testable streaming_provider_from_config function with no identified logic, security, or runtime issues. The behavioral change (opt-out via BOLO_STT_STREAMING='off' rather than opt-in) is well-documented in README.md, including the edge case where a non-default BOLO_STT_MODEL suppresses streaming unless explicitly overridden. No review comments were generated and heuristic analysis found zero issues at any severity level.

Key Findings:

  • streaming_provider_from_config in src/main.rs correctly accepts stt_model as a parameter, enabling isolated unit testing of the streaming decision logic without environment side effects — a meaningful improvement in testability.
  • The README update accurately captures the new default-on semantics and the interaction between BOLO_STT_STREAMING and BOLO_STT_MODEL, reducing the risk of operator misconfiguration on fresh installs.
  • No critical, significant, or medium-severity issues were surfaced by either automated heuristics or manual review, and there are no pre-existing unresolved comments carried into this PR.
Files requiring special attention
  • src/main.rs
  • README.md

@entelligence-ai-pr-reviews

Copy link
Copy Markdown

Walkthrough

This PR changes the default behavior of STT streaming so that Deepgram (deepgram/nova-3) streaming is enabled by default instead of requiring explicit opt-in. Documentation is updated to reflect the new default, and the streaming provider loading logic is refactored into a testable function with smart defaulting. Unit tests covering all branching scenarios are added.

Changes

File(s) Summary
README.md Updated STT streaming documentation to reflect Deepgram streaming is now on by default; revised instructions for disabling streaming via BOLO_STT_STREAMING='off'; added note about non-default BOLO_STT_MODEL keeping streaming off unless explicitly set.
src/main.rs Refactored load_streaming_provider to accept stt_model parameter; extracted streaming_provider_from_config with smart defaulting logic (auto-enables Deepgram streaming for deepgram/nova-3); added unit tests for all branching scenarios.

Sequence Diagram

This diagram shows the interactions between components:

sequenceDiagram
    title STT Streaming Provider Configuration Flow

    participant Config as Config::new()
    participant LSP as load_streaming_provider()
    participant SPFC as streaming_provider_from_config()
    participant Env as Environment Variables

    Config->>Env: load_env_value("BOLO_STT_MODEL")
    Env-->>Config: stt_model (or "deepgram/nova-3")

    Config->>LSP: load_streaming_provider(&stt_model)
    activate LSP

    LSP->>Env: load_env_value("BOLO_STT_STREAMING")
    Env-->>LSP: value (or None)

    opt value is None
        LSP->>Env: load_env_value("BOLO_STREAMING_STT")
        Env-->>LSP: value (or None)
    end

    LSP->>SPFC: streaming_provider_from_config(value, stt_model)
    activate SPFC

    alt value is None
        Note over SPFC: Determine default from stt_model
        alt stt_model == "deepgram/nova-3"
            Note over SPFC: default = "deepgram"
        else stt_model is anything else
            Note over SPFC: default = "off"
        end
    end

    alt resolved value == "deepgram" / "nova-3" / "nova3"
        SPFC-->>LSP: Some(StreamingProvider::Deepgram)
    else resolved value == "assemblyai" / "assembly" / "on"
        SPFC-->>LSP: Some(StreamingProvider::AssemblyAi)
    else resolved value == "off" or unrecognized
        SPFC-->>LSP: None
    end

    deactivate SPFC
    LSP-->>Config: Option<StreamingProvider>
    deactivate LSP

    Note over Config: Store stt_model and streaming_stt in Config struct
Loading

@a692570
a692570 merged commit f252ec0 into main Jul 17, 2026
2 checks passed
@a692570
a692570 deleted the codex/default-low-latency-streaming branch July 17, 2026 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant