Keyless voice: say where to add the OpenAI key instead of blaming the microphone

This commit is contained in:
Said Turksever authored and Sameh Khamis committed 2026-11-10 16:11:17 -08:00
1 parent 775e9df120
commit 09d02b6e7a
7 files changed
+40 -6

No files matched your search

+14
View File
@@ -143,3 +143,17 @@ test('controller lifetime stops pending transport and releases resources through
assert.equal(controller.stream, null);
assert.equal(controller.isActive(), false);
});
test('a missing server key keeps its code, so the UI can point to Provider Settings', async () => {
const backend = createRealtimeBackend({
tokenTransport: async () =>
Response.json(
{ error: 'OPENAI_API_KEY is not set', code: 'API_KEY_MISSING' },
{ status: 503 },
),
});
await assert.rejects(backend.requestToken(), {
message: 'OPENAI_API_KEY is not set',
code: 'API_KEY_MISSING',
});
});