fix(runtime): tighten codex native-only phase 4 truth
This commit is contained in:
parent
1f7dd2100f
commit
5d014b375b
12 changed files with 29 additions and 25 deletions
|
|
@ -62,7 +62,7 @@ export function normalizeProviderModelProbeFailureReason(message: string): strin
|
|||
if (
|
||||
/The '[^']+' model is not supported when using Codex with a ChatGPT account\./i.test(trimmed)
|
||||
) {
|
||||
return 'Not available with Codex ChatGPT subscription';
|
||||
return 'Not available on this Codex native runtime';
|
||||
}
|
||||
if (/The requested model is not available for your account\./i.test(trimmed)) {
|
||||
return 'Not available for this account';
|
||||
|
|
|
|||
|
|
@ -116,6 +116,10 @@ export const ProviderRuntimeBackendSelector = ({
|
|||
return null;
|
||||
}
|
||||
|
||||
if (provider.providerId === 'codex' && options.length === 1) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const selectedBackendId = provider.selectedBackendId ?? options[0]?.id ?? '';
|
||||
const selectedOption = options.find((option) => option.id === selectedBackendId) ?? options[0];
|
||||
const resolvedOption = options.find((option) => option.id === provider.resolvedBackendId) ?? null;
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ const API_KEY_PROVIDER_CONFIG: Record<
|
|||
},
|
||||
codex: {
|
||||
envVarName: 'OPENAI_API_KEY',
|
||||
name: 'OpenAI API Key',
|
||||
name: 'Codex API Key',
|
||||
title: 'API key',
|
||||
description:
|
||||
'Codex native requires API-key credentials. Save OPENAI_API_KEY here and the app will mirror it into the native CODEX_API_KEY environment when launching Codex.',
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ function normalizeModelReason(rawReason: string | null | undefined): string | nu
|
|||
if (
|
||||
/The '[^']+' model is not supported when using Codex with a ChatGPT account\./i.test(trimmed)
|
||||
) {
|
||||
return 'Not available with Codex ChatGPT subscription';
|
||||
return 'Not available on this Codex native runtime';
|
||||
}
|
||||
if (/The requested model is not available for your account\./i.test(trimmed)) {
|
||||
return 'Not available for this account';
|
||||
|
|
|
|||
|
|
@ -28,9 +28,9 @@ export const TEAM_MODEL_UI_DISABLED_BADGE_LABEL = 'Disabled';
|
|||
export const GPT_5_1_CODEX_MINI_UI_DISABLED_REASON =
|
||||
'Temporarily disabled for team agents - this model has been less reliable with task and reply tool contracts.';
|
||||
export const GPT_5_1_CODEX_MAX_CHATGPT_UI_DISABLED_REASON =
|
||||
'Temporarily disabled for team agents when using Codex ChatGPT subscription - this model has been observed returning "Not available with Codex ChatGPT subscription".';
|
||||
'Temporarily disabled for team agents - this model is not currently available on the Codex native runtime.';
|
||||
export const GPT_5_2_CODEX_UI_DISABLED_REASON =
|
||||
'Temporarily disabled for team agents - this model has been observed returning "Not available with Codex ChatGPT subscription".';
|
||||
'Temporarily disabled for team agents - this model is not currently available on the Codex native runtime.';
|
||||
export const GPT_5_3_CODEX_SPARK_UI_DISABLED_REASON =
|
||||
'Temporarily disabled for team agents - this model has been less reliable with bootstrap, task, and reply tool contracts.';
|
||||
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ describe('CliProviderModelAvailabilityService', () => {
|
|||
expect.objectContaining({
|
||||
modelId: 'gpt-5.4',
|
||||
status: 'unavailable',
|
||||
reason: 'Not available with Codex ChatGPT subscription',
|
||||
reason: 'Not available on this Codex native runtime',
|
||||
}),
|
||||
],
|
||||
})
|
||||
|
|
|
|||
|
|
@ -402,7 +402,7 @@ describe('TeamProvisioningService prepare/auth behavior', () => {
|
|||
|
||||
expect(result.ready).toBe(false);
|
||||
expect(result.message).toContain('Selected model gpt-5.2-codex is unavailable.');
|
||||
expect(result.message).toContain('Not available with Codex ChatGPT subscription');
|
||||
expect(result.message).toContain('Not available on this Codex native runtime');
|
||||
});
|
||||
|
||||
it('keeps timed out Codex model verification as a warning with a clean generic reason', async () => {
|
||||
|
|
|
|||
|
|
@ -505,7 +505,7 @@ describe('ProviderRuntimeSettingsDialog', () => {
|
|||
id: 'key-1',
|
||||
envVarName: 'OPENAI_API_KEY',
|
||||
scope: 'user',
|
||||
name: 'OpenAI API Key',
|
||||
name: 'Codex API Key',
|
||||
maskedValue: 'sk-proj-...1234',
|
||||
createdAt: Date.now(),
|
||||
},
|
||||
|
|
|
|||
|
|
@ -243,7 +243,7 @@ describe('TeamModelSelector disabled Codex models', () => {
|
|||
expect(disabledButton?.getAttribute('aria-disabled')).toBe('true');
|
||||
expect(disabledButton?.textContent).toContain('Disabled');
|
||||
expect(disabledButton?.getAttribute('title')).toContain(
|
||||
'Not available with Codex ChatGPT subscription'
|
||||
'Temporarily disabled for team agents - this model is not currently available on the Codex native runtime.'
|
||||
);
|
||||
|
||||
await act(async () => {
|
||||
|
|
@ -391,7 +391,7 @@ describe('TeamModelSelector disabled Codex models', () => {
|
|||
value: 'gpt-5.2-codex',
|
||||
onValueChange: () => undefined,
|
||||
modelIssueReasonByValue: {
|
||||
'gpt-5.2-codex': 'Not available with Codex ChatGPT subscription',
|
||||
'gpt-5.2-codex': 'Not available on this Codex native runtime',
|
||||
},
|
||||
})
|
||||
);
|
||||
|
|
@ -404,7 +404,7 @@ describe('TeamModelSelector disabled Codex models', () => {
|
|||
);
|
||||
expect(issueButton?.className).toContain('border-red-500/40');
|
||||
expect(issueButton?.getAttribute('title')).toBe(
|
||||
'Not available with Codex ChatGPT subscription'
|
||||
'Not available on this Codex native runtime'
|
||||
);
|
||||
|
||||
await act(async () => {
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ describe('ProvisioningProviderStatusList', () => {
|
|||
backendSummary: 'Codex native',
|
||||
details: [
|
||||
'5.4 Mini - verified',
|
||||
'5.1 Codex Max - unavailable - Not available with Codex ChatGPT subscription',
|
||||
'5.1 Codex Max - unavailable - Not available on this Codex native runtime',
|
||||
],
|
||||
},
|
||||
],
|
||||
|
|
@ -68,7 +68,7 @@ describe('ProvisioningProviderStatusList', () => {
|
|||
);
|
||||
expect(host.textContent).toContain('5.4 Mini - verified');
|
||||
expect(host.textContent).toContain(
|
||||
'5.1 Codex Max - unavailable - Not available with Codex ChatGPT subscription'
|
||||
'5.1 Codex Max - unavailable - Not available on this Codex native runtime'
|
||||
);
|
||||
|
||||
const detailLines = Array.from(host.querySelectorAll('p'));
|
||||
|
|
@ -90,11 +90,11 @@ describe('ProvisioningProviderStatusList', () => {
|
|||
details: [
|
||||
'5.2 - verified',
|
||||
'5.3 Codex - check failed - Model verification timed out',
|
||||
'5.1 Codex Max - unavailable - Not available with Codex ChatGPT subscription',
|
||||
'5.1 Codex Max - unavailable - Not available on this Codex native runtime',
|
||||
],
|
||||
},
|
||||
])
|
||||
).toBe('5.1 Codex Max - unavailable - Not available with Codex ChatGPT subscription');
|
||||
).toBe('5.1 Codex Max - unavailable - Not available on this Codex native runtime');
|
||||
});
|
||||
|
||||
it('summarizes timed out model verification separately from hard failures', async () => {
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ describe('runProviderPrepareDiagnostics', () => {
|
|||
},
|
||||
'gpt-5.2-codex': {
|
||||
status: 'failed',
|
||||
line: '5.2 Codex - unavailable - Not available with Codex ChatGPT subscription',
|
||||
line: '5.2 Codex - unavailable - Not available on this Codex native runtime',
|
||||
warningLine: null,
|
||||
},
|
||||
})
|
||||
|
|
@ -47,7 +47,7 @@ describe('runProviderPrepareDiagnostics', () => {
|
|||
},
|
||||
'gpt-5.2-codex': {
|
||||
status: 'failed',
|
||||
line: '5.2 Codex - unavailable - Not available with Codex ChatGPT subscription',
|
||||
line: '5.2 Codex - unavailable - Not available on this Codex native runtime',
|
||||
warningLine: null,
|
||||
},
|
||||
});
|
||||
|
|
@ -129,14 +129,14 @@ describe('runProviderPrepareDiagnostics', () => {
|
|||
expect(result.status).toBe('failed');
|
||||
expect(result.details).toEqual([
|
||||
'5.4 - verified',
|
||||
'5.2 Codex - unavailable - Not available with Codex ChatGPT subscription',
|
||||
'5.2 Codex - unavailable - Not available on this Codex native runtime',
|
||||
]);
|
||||
expect(progressUpdates.at(-1)).toEqual({
|
||||
completedCount: 2,
|
||||
totalCount: 2,
|
||||
details: [
|
||||
'5.4 - verified',
|
||||
'5.2 Codex - unavailable - Not available with Codex ChatGPT subscription',
|
||||
'5.2 Codex - unavailable - Not available on this Codex native runtime',
|
||||
],
|
||||
});
|
||||
expect(prepareProvisioning).toHaveBeenCalledTimes(2);
|
||||
|
|
@ -173,7 +173,7 @@ describe('runProviderPrepareDiagnostics', () => {
|
|||
|
||||
expect(result.status).toBe('failed');
|
||||
expect(result.details).toEqual([
|
||||
'5.1 Codex Max - unavailable - Not available with Codex ChatGPT subscription',
|
||||
'5.1 Codex Max - unavailable - Not available on this Codex native runtime',
|
||||
]);
|
||||
});
|
||||
|
||||
|
|
@ -357,7 +357,7 @@ describe('runProviderPrepareDiagnostics', () => {
|
|||
expect(result.details).toEqual([
|
||||
'5.2 - verified',
|
||||
'5.4 Mini - verified',
|
||||
'5.2 Codex - unavailable - Not available with Codex ChatGPT subscription',
|
||||
'5.2 Codex - unavailable - Not available on this Codex native runtime',
|
||||
]);
|
||||
expect(prepareProvisioning).toHaveBeenCalledTimes(2);
|
||||
expect(prepareProvisioning).toHaveBeenNthCalledWith(
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ describe('getProvisioningModelIssue', () => {
|
|||
status: 'failed',
|
||||
details: [
|
||||
'5.4 Mini - verified',
|
||||
'5.1 Codex Max - unavailable - Not available with Codex ChatGPT subscription',
|
||||
'5.1 Codex Max - unavailable - Not available on this Codex native runtime',
|
||||
],
|
||||
},
|
||||
],
|
||||
|
|
@ -23,8 +23,8 @@ describe('getProvisioningModelIssue', () => {
|
|||
providerId: 'codex',
|
||||
modelId: 'gpt-5.1-codex-max',
|
||||
kind: 'unavailable',
|
||||
reason: 'Not available with Codex ChatGPT subscription',
|
||||
detail: '5.1 Codex Max - unavailable - Not available with Codex ChatGPT subscription',
|
||||
reason: 'Not available on this Codex native runtime',
|
||||
detail: '5.1 Codex Max - unavailable - Not available on this Codex native runtime',
|
||||
});
|
||||
});
|
||||
|
||||
|
|
@ -37,7 +37,7 @@ describe('getProvisioningModelIssue', () => {
|
|||
status: 'failed',
|
||||
details: [
|
||||
'5.4 Mini - verified',
|
||||
'5.1 Codex Max - unavailable - Not available with Codex ChatGPT subscription',
|
||||
'5.1 Codex Max - unavailable - Not available on this Codex native runtime',
|
||||
],
|
||||
},
|
||||
],
|
||||
|
|
|
|||
Loading…
Reference in a new issue