Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,10 @@ function manager(
{ scope: () => 'sessions' },
workspaces,
{ ready },
...Array.from({ length: 23 }, () => undefined),
...Array.from({ length: 21 }, () => undefined),
new TestRuntimeUnitHostFactory(),
];
args[20] = { entries: () => [] };
args[18] = { entries: () => [] };
const value = Reflect.construct(WorkspaceInstanceManager, args) as WorkspaceInstanceManager;
const providers = (value as unknown as { providers: Map<string, RuntimeProviderFactory> }).providers;
providers.clear();
Expand Down
8 changes: 4 additions & 4 deletions packages/kap-server/test/config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,16 +159,16 @@ describe('server-v2 /api/v1/config', () => {
});
});

it('session create with a broken subagent model pool fails with VALIDATION_FAILED', async () => {
it('session create with a broken subagent model pool still succeeds', async () => {
await boot('[secondary_model.models]\n"provider/fast" = "fast and cheap"\n');
const res = await authedFetch(server as RunningServer, base, '/api/v1/sessions', {
method: 'POST',
headers: { 'content-type': 'application/json' },
body: JSON.stringify({ metadata: { cwd: home as string } }),
});
const body = (await res.json()) as Envelope<null>;
expect(body.code).toBe(ErrorCode.VALIDATION_FAILED);
expect(body.msg).toContain('[secondary_model].default_model is required');
const body = (await res.json()) as Envelope<{ id?: string }>;
expect(body.code).toBe(0);
expect(body.data?.id).toBeTruthy();
});
});

Expand Down
Loading