Separate settings per generation step; explain Practice and Exam on shares
All checks were successful
Verify and publish V2 container / build-and-push (push) Successful in 29s
All checks were successful
Verify and publish V2 container / build-and-push (push) Successful in 29s
- Settings -> AI: Planning, Writing, Python check and Second review each get their own model, reasoning effort, temperature and output limit, shown under Content generation. Unset choices follow Content generation, then the default model. - Shared quizzes say what Practice and Exam mean under the mode toggle. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
2454ab6e95
commit
10be5c39da
9 changed files with 128 additions and 36 deletions
|
|
@ -193,6 +193,33 @@ describe('the quiz check', () => {
|
|||
});
|
||||
});
|
||||
|
||||
describe('generation steps in Settings', () => {
|
||||
it('use Content generation settings until a step has its own', async () => {
|
||||
await connectAi();
|
||||
const { resolveModel } = await import('../server/ai/service.ts');
|
||||
const models = (await t.api('GET', '/api/ai/models')).body.models.filter((m: any) => m.enabled);
|
||||
for (const m of models) await t.api('PATCH', `/api/ai/models/${m.id}`, { capabilities: { reasoning: true } });
|
||||
const [a, b] = models;
|
||||
const none = { modelId: null, temperature: null, reasoningEffort: null, maxOutputTokens: null };
|
||||
await t.api('PUT', '/api/ai/tasks', { default: { ...none, modelId: a.id }, generate: { ...none, reasoningEffort: 'high' } });
|
||||
// Nothing set on the steps: they follow Content generation.
|
||||
for (const step of ['plan', 'write', 'check', 'review'] as const) expect(resolveModel(t.ctx, step).params.reasoningEffort).toBe('high');
|
||||
// A step's own effort wins; the others keep following.
|
||||
await t.api('PUT', '/api/ai/tasks', { plan: { ...none, reasoningEffort: 'low' } });
|
||||
expect(resolveModel(t.ctx, 'plan').params.reasoningEffort).toBe('low');
|
||||
expect(resolveModel(t.ctx, 'write').params.reasoningEffort).toBe('high');
|
||||
// A step with its own model does not take Content generation's parameters for it.
|
||||
if (b) {
|
||||
await t.api('PUT', '/api/ai/tasks', { review: { ...none, modelId: b.id } });
|
||||
const review = resolveModel(t.ctx, 'review');
|
||||
expect(review.model.id).toBe(b.id);
|
||||
expect(review.params.reasoningEffort).toBeUndefined();
|
||||
}
|
||||
const meta = (await t.api('GET', '/api/ai/meta')).body.tasks;
|
||||
expect(meta.plan).toMatchObject({ label: 'Planning', parent: 'generate' });
|
||||
});
|
||||
});
|
||||
|
||||
describe('generated sets', () => {
|
||||
it('get their own name and description, and flashcards are atomic without hints', async () => {
|
||||
await connectAi();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue