From af5f0e52b9901aecbea2a1cf20eb8a90b27d5628 Mon Sep 17 00:00:00 2001 From: multipleof4 Date: Fri, 5 Dec 2025 17:24:33 -0800 Subject: [PATCH] Feat: forward quantization preferences --- src/streaming.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/streaming.js b/src/streaming.js index c6768a4..1679d61 100644 --- a/src/streaming.js +++ b/src/streaming.js @@ -9,7 +9,7 @@ export const buildBody=()=>{ const b=payloadWithSampling({model:SUNE.model.replace(/^(or:|oai:|g:|cla:|cf:)/,''),messages:msgs,stream:true}); if(SUNE.json_output){let s;try{s=JSON.parse(SUNE.json_schema||'null')}catch{s=null}if(s&&typeof s==='object'&&Object.keys(s).length>0){b.response_format={type:'json_schema',json_schema:s}}else{b.response_format={type:'json_object'}}} b.reasoning={...(SUNE.reasoning_effort&&SUNE.reasoning_effort!=='default'?{effort:SUNE.reasoning_effort}:{}),exclude:!SUNE.include_thoughts}; - if(SUNE.verbosity)b.verbosity=SUNE.verbosity; + if(Array.isArray(SUNE.quantizations)&&SUNE.quantizations.length)b.provider={...(b.provider||{}),quantizations:[...new Set(SUNE.quantizations.map(String))]}; if(SUNE.img_output&&!USER.donor){b.modalities=['text','image'];b.image_config={aspect_ratio:'1:1'}} return b } @@ -81,4 +81,3 @@ export async function streamChat(onDelta,streamId){ return await streamORP(body,onDelta,streamId) } -