|
|
@@ -241,13 +241,15 @@ describe('the shipped Web composition', () => {
|
|
|
}
|
|
|
})
|
|
|
|
|
|
- it('applies the default-off subagent model-selection preference only to new sessions', async () => {
|
|
|
- await ctx.settings.update(SUBAGENT_MODEL_SELECTION_SETTINGS_NAMESPACE, { enabled: false })
|
|
|
+ it('applies the default-off subagent model allowlist only to new sessions', async () => {
|
|
|
+ await ctx.settings.update(SUBAGENT_MODEL_SELECTION_SETTINGS_NAMESPACE, { allowedModels: [] })
|
|
|
const disabled = await ctx.agents.create({
|
|
|
sessionId: SessionId('preset-model-selection-disabled'),
|
|
|
setup: agentCtx => ctx.agentPresets.mount(agentCtx, 'standard').then(() => undefined),
|
|
|
})
|
|
|
- await ctx.settings.update(SUBAGENT_MODEL_SELECTION_SETTINGS_NAMESPACE, { enabled: true })
|
|
|
+ await ctx.settings.update(SUBAGENT_MODEL_SELECTION_SETTINGS_NAMESPACE, {
|
|
|
+ allowedModels: [{ provider: 'deepseek-official', model: 'deepseek-v4-flash' }],
|
|
|
+ })
|
|
|
const enabled = await ctx.agents.create({
|
|
|
sessionId: SessionId('preset-model-selection-enabled'),
|
|
|
setup: agentCtx => ctx.agentPresets.mount(agentCtx, 'standard').then(() => undefined),
|
|
|
@@ -263,7 +265,7 @@ describe('the shipped Web composition', () => {
|
|
|
]))
|
|
|
expect(toolNames(ctx, disabled.agent)).not.toContain('list_subagent_models')
|
|
|
} finally {
|
|
|
- await ctx.settings.update(SUBAGENT_MODEL_SELECTION_SETTINGS_NAMESPACE, { enabled: false })
|
|
|
+ await ctx.settings.update(SUBAGENT_MODEL_SELECTION_SETTINGS_NAMESPACE, { allowedModels: [] })
|
|
|
await enabled.dispose()
|
|
|
await disabled.dispose()
|
|
|
}
|