Repository navigation
Commit 7da5764
authored
fix(voice): migrate OpenAI Realtime to GA API + make agent .env authoritative (#46)
Voice mode was fully broken: OpenAI shut off the Realtime Beta API, and a
stray placeholder env var could shadow the real key.
OpenAI Realtime GA migration (src/voice/openai-realtime.ts):
- Drop the deprecated `OpenAI-Beta: realtime=v1` header (the server now
rejects it: 'The Realtime Beta API is no longer supported').
- session.update converted to GA shape: session.type='realtime',
output_modalities, nested audio.input/audio.output (format + voice +
turn_detection + transcription).
- Handle GA event names response.output_audio[_transcript].* alongside
the old beta names.
.env precedence (src/index.ts, src/voice/server.ts):
- Agent-dir .env now OVERRIDES inherited env instead of skipping keys that
are already set. A placeholder like OPENAI_API_KEY="your-...-here" in a
shell profile was silently beating the real key in the agent .env, which
surfaced to users as the misleading 'no API key set' message.
- index.ts loader also strips surrounding quotes and skips comments/blanks.
Bumps to 1.5.1. Verified locally: adapter connects, session created +
configured, no 'Voice mode unavailable'.1 parent a9c65d0 commit 7da5764
5 files changed
Lines changed: 36 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
379 | 379 | | |
380 | 380 | | |
381 | 381 | | |
382 | | - | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
383 | 385 | | |
384 | 386 | | |
385 | 387 | | |
386 | | - | |
387 | | - | |
388 | | - | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
389 | 391 | | |
| 392 | + | |
| 393 | + | |
390 | 394 | | |
391 | 395 | | |
392 | 396 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | 47 | | |
49 | 48 | | |
50 | 49 | | |
| |||
83 | 82 | | |
84 | 83 | | |
85 | 84 | | |
86 | | - | |
87 | 85 | | |
88 | 86 | | |
89 | 87 | | |
| |||
147 | 145 | | |
148 | 146 | | |
149 | 147 | | |
| 148 | + | |
| 149 | + | |
150 | 150 | | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
159 | 167 | | |
160 | | - | |
161 | 168 | | |
162 | 169 | | |
163 | 170 | | |
| |||
285 | 292 | | |
286 | 293 | | |
287 | 294 | | |
288 | | - | |
289 | 295 | | |
290 | 296 | | |
291 | 297 | | |
| |||
302 | 308 | | |
303 | 309 | | |
304 | 310 | | |
305 | | - | |
306 | 311 | | |
307 | 312 | | |
308 | 313 | | |
| |||
388 | 393 | | |
389 | 394 | | |
390 | 395 | | |
| 396 | + | |
391 | 397 | | |
| 398 | + | |
392 | 399 | | |
393 | 400 | | |
394 | 401 | | |
395 | 402 | | |
396 | 403 | | |
397 | 404 | | |
| 405 | + | |
398 | 406 | | |
399 | 407 | | |
400 | 408 | | |
401 | 409 | | |
| 410 | + | |
402 | 411 | | |
403 | 412 | | |
404 | 413 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
595 | 595 | | |
596 | 596 | | |
597 | 597 | | |
598 | | - | |
599 | | - | |
600 | | - | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
601 | 601 | | |
602 | 602 | | |
603 | 603 | | |
| |||
0 commit comments