Commit ae2b452
committed
fix(showcase/ms-agent-python): pin transcription baseURL to real OpenAI
The voice route's `GuardedOpenAITranscriptionService` was constructing
`new OpenAI({ apiKey })` without a `baseURL` override. The OpenAI
client falls back to the `OPENAI_BASE_URL` env var, which production
docker/Railway sets to `http://aimock:4010/v1` so LLM completions stay
deterministic. aimock's transcription handler then returned a 502
"Invalid file format" (or a canned "What is the weather in Tokyo?"
fixture on dev), surfacing as "CopilotChat: Transcription failed" on
every mic recording.
Mirrored langgraph-python's voice route: read
`OPENAI_TRANSCRIPTION_BASE_URL` first, fall back to
`https://api.openai.com/v1`. The sample-audio button stays
deterministic (synchronous text injection); the mic now exercises real
Whisper.1 parent 6a1fceb commit ae2b452
1 file changed
Lines changed: 25 additions & 1 deletion
Lines changed: 25 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
34 | 54 | | |
35 | 55 | | |
36 | 56 | | |
37 | 57 | | |
38 | 58 | | |
39 | 59 | | |
| 60 | + | |
| 61 | + | |
40 | 62 | | |
41 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
42 | 66 | | |
43 | 67 | | |
44 | 68 | | |
| |||
0 commit comments