diff --git a/worker/src/lib/HeliconeProxyRequest/handler.ts b/worker/src/lib/HeliconeProxyRequest/handler.ts index 4fb13515e7..b27e06c734 100644 --- a/worker/src/lib/HeliconeProxyRequest/handler.ts +++ b/worker/src/lib/HeliconeProxyRequest/handler.ts @@ -44,8 +44,11 @@ export async function handleProxyRequest( ? new ReadableInterceptor(response.body, proxyRequest.isStream) : null; let body = interceptor ? interceptor.stream : null; - + const model = await proxyRequest.requestWrapper.getJson<{ model?: string }>(); if ( + (model.model && + model.model.includes("claude-3") && + proxyRequest.isStream) || proxyRequest.requestWrapper.heliconeHeaders.featureFlags.streamForceFormat ) { // eslint-disable-next-line @typescript-eslint/no-explicit-any