mirror of
https://github.com/tiennm99/ccs.git
synced 2026-07-16 04:18:05 +00:00
fix: preserve supplemental codex effort variants
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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(
|
||||
<FlexibleModelSelector
|
||||
label="Primary model"
|
||||
value={undefined}
|
||||
onChange={onChange}
|
||||
catalog={MODEL_CATALOGS.codex}
|
||||
allModels={[{ id: 'gpt-5.5-codex-high', owned_by: 'openai' }]}
|
||||
/>
|
||||
);
|
||||
|
||||
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');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user