mirror of
https://github.com/garrytan/gstack.git
synced 2026-10-02 17:40:02 +02:00
test(office-hours-attempt): the fake judge SDK response carries stop_reason like the real API (structured judge requires end_turn)
This commit is contained in:
1 parent
a0a6df2a8e
commit
6bdb0bf1be
1 file changed
+1
-1
@@ -606,7 +606,7 @@ const fakeJudgeRequest = async (body, options) => {
|
||||
const id = attempt;
|
||||
await new Promise(resolve => setTimeout(resolve, scenario === 'late-judge' ? 130 : 10));
|
||||
event({ kind: 'judge-ready', id, aborted: options?.signal?.aborted ?? false });
|
||||
return { content: [{ type: 'text', text: JSON.stringify({ reason_substance: scenario === 'bad-score' ? 3 : 5, reasoning: 'fixture specific tradeoff' }) }] };
|
||||
return { stop_reason: 'end_turn', content: [{ type: 'text', text: JSON.stringify({ reason_substance: scenario === 'bad-score' ? 3 : 5, reasoning: 'fixture specific tradeoff' }) }] };
|
||||
};
|
||||
mock.module('@anthropic-ai/sdk', () => ({ default: class { messages = { create: fakeJudgeRequest }; } }));
|
||||
globalThis.fetch = () => { throw new Error('No network is permitted in this free lifecycle fixture'); };
|
||||
|
||||
Reference in new issue
Block a user