|
|
|
|
@ -287,5 +287,27 @@ test.describe('Live generation with OpenAI', () => {
|
|
|
|
|
expect(entry.synthesis_id).toBe(synthesisId);
|
|
|
|
|
expect(entry.job_id).toBeTruthy();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ═══════════════════════════════════════════════════════════════
|
|
|
|
|
// LLM call logs verification
|
|
|
|
|
// ═══════════════════════════════════════════════════════════════
|
|
|
|
|
const jobId = usedEntries[0]?.job_id;
|
|
|
|
|
if (jobId) {
|
|
|
|
|
const logsResp = await apiCall(page, 'GET', `/api/v1/llm-logs/${jobId}`);
|
|
|
|
|
expect(logsResp.status).toBe(200);
|
|
|
|
|
const logs = logsResp.data;
|
|
|
|
|
expect(Array.isArray(logs)).toBe(true);
|
|
|
|
|
expect(logs.length).toBeGreaterThan(0);
|
|
|
|
|
|
|
|
|
|
// Should have at least a rewrite call
|
|
|
|
|
const callTypes = logs.map((l: any) => l.call_type);
|
|
|
|
|
expect(callTypes).toContain('rewrite');
|
|
|
|
|
|
|
|
|
|
// Each log entry should have model and timing
|
|
|
|
|
for (const log of logs) {
|
|
|
|
|
expect(log.model).toBeTruthy();
|
|
|
|
|
expect(log.duration_ms).toBeGreaterThanOrEqual(0);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|