fix(pi): strengthen final release proof
This commit is contained in:
@@ -205,7 +205,7 @@ function validateCapturedRequests(protocol, modelId, requests) {
|
||||
const authHeader = protocol === 'anthropic-messages' ? 'x-api-key' : 'authorization';
|
||||
const expectedAuth = protocol === 'anthropic-messages' ? LOCAL_API_KEY : `Bearer ${LOCAL_API_KEY}`;
|
||||
const problems = [];
|
||||
if (matching.length !== 4) problems.push(`expected 4 requests, got ${matching.length}`);
|
||||
if (matching.length !== 6) problems.push(`expected 6 requests, got ${matching.length}`);
|
||||
if (matching.some((request) => request.method !== 'POST')) problems.push('non-POST request');
|
||||
if (matching.some((request) => request.path !== expectedPath(protocol))) problems.push('unexpected endpoint path');
|
||||
if (matching.some((request) => request.headers[authHeader] !== expectedAuth)) problems.push('credential header mismatch');
|
||||
|
||||
Reference in New Issue
Block a user