Repository navigation
Commit 5dd687f
committed
fix(deepgram): treat blank env API key as unconfigured in realtime transcription
A whitespace-only DEEPGRAM_API_KEY made the Deepgram realtime transcription
provider report configured, then sent an unusable bearer credential.
- Wrap process.env.DEEPGRAM_API_KEY with normalizeOptionalString in
isConfigured so blank env values are treated as not configured
- Wrap process.env.DEEPGRAM_API_KEY with normalizeOptionalString in
createSession so blank values are rejected locally before connecting
- Add isConfigured test suite covering: unset, set, whitespace-only
env, and provider-config apiKey paths
- Add createSession test for whitespace-only env key rejection
This matches the blank-credential guard applied in the OpenAI speech
provider (PR #108212) and Xiaomi MiMo provider (PR #108558).1 parent 04221fc commit 5dd687f
2 files changed
Lines changed: 37 additions & 2 deletions
File tree
- extensions/deepgram
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
91 | 123 | | |
92 | 124 | | |
93 | 125 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
250 | | - | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
251 | 254 | | |
252 | 255 | | |
253 | | - | |
| 256 | + | |
254 | 257 | | |
255 | 258 | | |
256 | 259 | | |
| |||
0 commit comments