test(voice): match API-key realtime auth response

This commit is contained in:
devv-shayan committed 2026-10-04 23:03:09 +05:00
1 parent 8f5710e7cb
commit 467c4e928d
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -261,7 +261,7 @@ try {
result.mints.every( result.mints.every(
(mint) => (mint) =>
mint.status === 200 && mint.status === 200 &&
mint.auth === (auth === 'oauth' ? 'codex-oauth' : 'api-key'), mint.auth === (auth === 'oauth' ? 'codex-oauth' : 'env'),
), ),
); );
assert.ok(result.negotiations.every((entry) => entry.status === 201)); assert.ok(result.negotiations.every((entry) => entry.status === 201));
+2 -2
View File
@@ -469,7 +469,7 @@ export async function initKeySetup({
throw new Error( throw new Error(
payload.error || 'Could not check ChatGPT sign-in.', payload.error || 'Could not check ChatGPT sign-in.',
); );
if (response.ok && payload.available) { if (payload.available) {
writeStoredCloudVoiceAuthMode('oauth'); writeStoredCloudVoiceAuthMode('oauth');
render(status); render(status);
say( say(
@@ -490,7 +490,7 @@ export async function initKeySetup({
}); });
const loginPayload = await loginResponse.json().catch(() => ({})); const loginPayload = await loginResponse.json().catch(() => ({}));
if (lifetime.signal.aborted) return; if (lifetime.signal.aborted) return;
if (!loginResponse.ok && loginResponse.status !== 202) { if (!loginResponse.ok) {
say( say(
loginPayload.error || loginPayload.error ||
payload.error || payload.error ||