mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-12 20:15:40 +00:00
fix: preserve supplemental codex effort variants
This commit is contained in:
1 parent
e2ca197397
commit
3a63cc0431
2 files changed
+24
-1
No files matched your search
@@ -34,7 +34,8 @@ export function getCodexEffortVariants(
|
|||||||
maxEffort: CodexEffort | undefined
|
maxEffort: CodexEffort | undefined
|
||||||
): string[] {
|
): string[] {
|
||||||
if (!maxEffort) {
|
if (!maxEffort) {
|
||||||
return [stripCodexEffortSuffix(modelId)];
|
const explicitEffort = parseCodexEffort(modelId);
|
||||||
|
return [applyCodexEffortSuffix(modelId, explicitEffort)];
|
||||||
}
|
}
|
||||||
|
|
||||||
const normalizedModelId = stripCodexEffortSuffix(modelId);
|
const normalizedModelId = stripCodexEffortSuffix(modelId);
|
||||||
|
|||||||
@@ -129,4 +129,26 @@ describe('FlexibleModelSelector', () => {
|
|||||||
expect(screen.getByText('gpt-5.3-codex')).toBeInTheDocument();
|
expect(screen.getByText('gpt-5.3-codex')).toBeInTheDocument();
|
||||||
expect(screen.getAllByText('gpt-5.3-codex-high').length).toBeGreaterThan(0);
|
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