Skip to content

Commit 005f5f6

Browse files
committed
fix(server): expect derived model capabilities after provider delete
The catalog delete test asserted an exact model object from before the catalog derived capabilities, so it only failed once both changes met on one branch. Also declare SKIP_KEY before the ref that reads it.
1 parent d804da2 commit 005f5f6

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

apps/pythinker-web/src/components/UpdateToast.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ const state = ref<DesktopUpdateState>();
1212
const busy = ref(false);
1313
/** Versions the user skipped. Persisted per version so the prompt does not
1414
return for the same build; an unnamed version is skipped for the session. */
15-
const skipped = ref<string[]>(readSkipped());
1615
const SKIP_KEY = 'pythinker.update.skipped';
16+
const skipped = ref<string[]>(readSkipped());
1717
1818
let removeListener: (() => void) | undefined;
1919

packages/server/test/model-catalog.e2e.test.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,15 @@ describe('model/provider catalog routes', () => {
274274

275275
const models = await appOf(r).inject({ method: 'GET', url: '/api/v1/models' });
276276
expect(envelopeOf<{ items: Array<{ provider: string }> }>(models.json()).data?.items)
277-
.toEqual([{ provider: 'openai', model: 'gpt4o', display_name: 'gpt-4o', max_context_size: 128000 }]);
277+
.toEqual([
278+
{
279+
provider: 'openai',
280+
model: 'gpt4o',
281+
display_name: 'gpt-4o',
282+
max_context_size: 128000,
283+
capabilities: ['image_in', 'tool_use'],
284+
},
285+
]);
278286
});
279287

280288
it('maps unknown provider and model ids to catalog not-found error codes', async () => {

0 commit comments

Comments
 (0)