diff --git a/ui/src/lib/codex-effort.ts b/ui/src/lib/codex-effort.ts index 5bc13019..ff2d311a 100644 --- a/ui/src/lib/codex-effort.ts +++ b/ui/src/lib/codex-effort.ts @@ -34,7 +34,8 @@ export function getCodexEffortVariants( maxEffort: CodexEffort | undefined ): string[] { if (!maxEffort) { - return [stripCodexEffortSuffix(modelId)]; + const explicitEffort = parseCodexEffort(modelId); + return [applyCodexEffortSuffix(modelId, explicitEffort)]; } const normalizedModelId = stripCodexEffortSuffix(modelId); diff --git a/ui/tests/unit/components/cliproxy/provider-model-selector.test.tsx b/ui/tests/unit/components/cliproxy/provider-model-selector.test.tsx index 198a839a..d7c15e75 100644 --- a/ui/tests/unit/components/cliproxy/provider-model-selector.test.tsx +++ b/ui/tests/unit/components/cliproxy/provider-model-selector.test.tsx @@ -129,4 +129,26 @@ describe('FlexibleModelSelector', () => { expect(screen.getByText('gpt-5.3-codex')).toBeInTheDocument(); expect(screen.getAllByText('gpt-5.3-codex-high').length).toBeGreaterThan(0); }); + + it('preserves explicit suffixes on supplemental codex models outside the static catalog', async () => { + const onChange = vi.fn(); + + render( + + ); + + await userEvent.click(screen.getByRole('button', { name: /select model/i })); + + expect(screen.getByText(/All Models \(1\)/i)).toBeInTheDocument(); + expect(screen.getByText('gpt-5.5-codex-high')).toBeInTheDocument(); + + await userEvent.click(screen.getByText('gpt-5.5-codex-high')); + expect(onChange).toHaveBeenCalledWith('gpt-5.5-codex-high'); + }); });