Skip to content

Commit bc6690e

Browse files
authored
Merge pull request #187 from SharpAI/feature/coral-tpu-detection
chore: update benchmark scripts for reporting and test runs
2 parents bd8da83 + 17e4eab commit bc6690e

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

skills/analysis/home-security-benchmark/scripts/generate-report.cjs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ function buildHTML(allResults, fixtureImages, { liveMode = false, liveStatus = n
109109
tokens: r.tokens || r.data?.tokenTotals?.total,
110110
perfSummary: r.perfSummary || r.data?.perfSummary || null,
111111
system: r.data?.system || {},
112+
serverParams: r.data?.serverParams || {},
112113
tokenTotals: r.data?.tokenTotals || {},
113114
suites: (r.data?.suites || []).map(s => ({
114115
name: s.name,
@@ -492,6 +493,15 @@ function renderPerformance() {
492493
let html = '<div class="header"><div class="page-title">⚡ Performance</div>';
493494
html += '<div class="page-subtitle">' + esc(run.model || '?') + ' — ' + shortDate(run.timestamp) + '</div></div>';
494495
496+
if (run.serverParams && typeof run.serverParams === 'object' && Object.keys(run.serverParams).length > 0) {
497+
let paramStr = '';
498+
for (const k in run.serverParams) {
499+
if (paramStr) paramStr += ' | ';
500+
paramStr += '<b>' + esc(k) + '</b>: ' + esc(String(run.serverParams[k]));
501+
}
502+
html += '<div style="font-size:0.75rem; color:var(--text-dim); margin-left: 2rem; margin-top: 0.5rem; padding-bottom: 0.5rem;">[Server Params] ' + paramStr + '</div>';
503+
}
504+
495505
// Hero cards
496506
html += '<div class="hero-grid">';
497507
const ttftAvg = perf?.ttft?.avgMs;

skills/analysis/home-security-benchmark/scripts/run-benchmark.cjs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,10 +230,14 @@ function suite(name, fn) {
230230
suites.push({ name, fn, tests: [] });
231231
}
232232

233+
let targetServerParams = {};
234+
try { targetServerParams = JSON.parse(process.env.AEGIS_SERVER_PARAMS || '{}'); } catch { }
235+
233236
const results = {
234237
timestamp: new Date().toISOString(),
235238
gateway: GATEWAY_URL,
236239
vlm: VLM_URL || null,
240+
serverParams: targetServerParams,
237241
system: {},
238242
model: {},
239243
suites: [],
@@ -333,6 +337,9 @@ async function llmCall(messages, opts = {}) {
333337
...(model && { model }),
334338
...(temperature !== undefined && { temperature }),
335339
...(opts.expectJSON && { top_p: 0.8 }),
340+
// For JSON-expected tests on local servers, enable server-side JSON mode
341+
// which activates prefix buffering to strip hallucinated artifacts
342+
...(opts.expectJSON && !isCloudApi && { response_format: { type: 'json_object' } }),
336343
...(opts.tools && { tools: opts.tools }),
337344
// Model-family-specific params (e.g. reasoning_effort:'none' for Mistral).
338345
// These are merged last so they take precedence over defaults.

0 commit comments

Comments
 (0)