195
return;
196
}
198
>
let bridgeRequest;
199
>
try {
200
>
bridgeRequest = openAiRequestToBridge(vendor, body);
201
>
} catch (err) {
202
const message = err instanceof OpenAiTranslationError ? err.message : String(err);
203
this._writeJsonError(res, 400, message, 'invalid_request_error');
204
return;
205
}
207
>
const connection = this._bridgeRegistry.getServingConnection();
208
>
if (!connection) {
209
this._writeJsonError(res, 503, 'No renderer connection available to service BYOK models', 'api_error');
210
return;