mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-17 18:13:43 +00:00
fix(cliproxy): refresh upstream model and quota surfaces (#1158)
* fix(cliproxy): refresh upstream model and quota surfaces * test(cliproxy): cover codex legacy model fallback
This commit is contained in:
1 parent
66865127d7
commit
50b0ffba75
7 files changed
+220
-97
No files matched your search
@@ -45,7 +45,7 @@ describe('ModelConfigSection presets', () => {
|
||||
ANTHROPIC_MODEL: 'gpt-5.4',
|
||||
ANTHROPIC_DEFAULT_OPUS_MODEL: 'gpt-5.4',
|
||||
ANTHROPIC_DEFAULT_SONNET_MODEL: 'gpt-5.4',
|
||||
ANTHROPIC_DEFAULT_HAIKU_MODEL: 'gpt-5-codex-mini',
|
||||
ANTHROPIC_DEFAULT_HAIKU_MODEL: 'gpt-5.4-mini',
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -130,6 +130,27 @@ describe('FlexibleModelSelector', () => {
|
||||
expect(screen.getAllByText('gpt-5.3-codex-high').length).toBeGreaterThan(0);
|
||||
});
|
||||
|
||||
it('preserves saved legacy codex model IDs under the current-value fallback', async () => {
|
||||
render(
|
||||
<FlexibleModelSelector
|
||||
label="Primary model"
|
||||
value="gpt-5-codex"
|
||||
onChange={vi.fn()}
|
||||
catalog={MODEL_CATALOGS.codex}
|
||||
allModels={[]}
|
||||
/>
|
||||
);
|
||||
|
||||
expect(screen.getByRole('button', { name: /gpt-5-codex/i })).toBeInTheDocument();
|
||||
|
||||
await userEvent.click(screen.getByRole('button', { name: /gpt-5-codex/i }));
|
||||
|
||||
expect(screen.getByText('Current value')).toBeInTheDocument();
|
||||
expect(screen.getAllByText('gpt-5-codex').length).toBeGreaterThan(0);
|
||||
expect(screen.getByText('gpt-5.4')).toBeInTheDocument();
|
||||
expect(screen.getByText('gpt-5.4-mini')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('preserves explicit suffixes on supplemental codex models outside the static catalog', async () => {
|
||||
const onChange = vi.fn();
|
||||
|
||||
|
||||
Reference in new issue
Block a user