Skip to content

Fix DeepgramSTTService base_url forcing HTTPS/WSS schemes#4026

Merged
markbackman merged 2 commits intomainfrom
mb/fix-deepgram-base-url
Mar 17, 2026
Merged

Fix DeepgramSTTService base_url forcing HTTPS/WSS schemes#4026
markbackman merged 2 commits intomainfrom
mb/fix-deepgram-base-url

Conversation

@markbackman
Copy link
Copy Markdown
Contributor

@markbackman markbackman commented Mar 13, 2026

Summary

  • Fixed DeepgramSTTService base_url parameter silently forcing wss:// / https:// schemes, breaking air-gapped or private deployments using ws:// or http://
  • Extracted URL derivation into a _derive_deepgram_urls() helper that respects the developer's scheme choice and consistently derives both the WebSocket and HTTP URLs the Deepgram SDK requires
  • Unrecognized schemes now log a warning and fall back to secure defaults

Testing

uv run pytest tests/test_deepgram_stt.py -v

Fixes

The base_url parameter previously forced wss:// and https:// schemes,
breaking air-gapped or private deployments that need ws:// or http://.
Extract URL derivation into _derive_deepgram_urls() helper that respects
the developers scheme choice while deriving the paired WebSocket and
HTTP URLs the Deepgram SDK requires.

Closes #4019
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 13, 2026

Codecov Report

❌ Patch coverage is 92.85714% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/pipecat/services/deepgram/stt.py 92.85% 1 Missing ⚠️
Files with missing lines Coverage Δ
src/pipecat/services/deepgram/stt.py 55.90% <92.85%> (+2.02%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@filipi87 filipi87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. 👍

@markbackman markbackman merged commit a32f558 into main Mar 17, 2026
6 checks passed
@markbackman markbackman deleted the mb/fix-deepgram-base-url branch March 17, 2026 20:39
markbackman added a commit that referenced this pull request Mar 21, 2026
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.

DeepgramSTTService Forcing HTTPS or WSS

2 participants