Add reasoning_effort to Custom. Update inline image quality style

dade4eafa5ac6a88359d3b60143cf170fa6f9a9d

Cohee <18619528+Cohee1207@users.noreply.github.com>

2 files changed, +8 -1Showing whitespace changes
public/index.html+3 -1
@@ -1957,6 +1957,7 @@
19571957 <span data-i18n="image_inlining_hint_3">menu to attach an image file to the chat.</span>
19581958 </div>
19591959 <div class="flex-container flexFlowColumn wide100p textAlignCenter marginTop10" data-source="openai,custom">
1960+ <div class="flex-container oneline-dropdown">
19601961 <label for="openai_inline_image_quality" data-i18n="Inline Image Quality">
19611962 Inline Image Quality
19621963 </label>
@@ -1967,6 +1968,7 @@
19671968 </select>
19681969 </div>
19691970 </div>
1971+ </div>
19701972 <div class="range-block" data-source="makersuite">
19711973 <label for="use_makersuite_sysprompt" class="checkbox_label widthFreeExpand">
19721974 <input id="use_makersuite_sysprompt" type="checkbox" />
@@ -1995,7 +1997,7 @@
19951997 </span>
19961998 </div>
19971999 </div>
19982000 <div class="flex-container flexFlowColumn wide100p textAlignCenter marginTop10" data-source="openai,custom">
19992001 <div class="flex-container oneline-dropdown" title="Constrains effort on reasoning for reasoning models.&#10;Currently supported values are low, medium, and high.&#10;Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.">
20002002 <label for="openai_reasoning_effort" data-i18n="Reasoning Effort">
20012003 Reasoning Effort
src/endpoints/backends/chat-completions.js+5 -0
@@ -1027,6 +1027,11 @@ router.post('/generate', jsonParser, function (request, response) {
10271027 bodyParams.logprobs = true;
10281028 }
10291029
1030+ // A few of OpenAIs reasoning models support reasoning effort
1031+ if (['o1', 'o3-mini', 'o3-mini-2025-01-31'].includes(request.body.model)) {
1032+ bodyParams['reasoning_effort'] = request.body.reasoning_effort;
1033+ }
1034+
10301035 mergeObjectWithYaml(bodyParams, request.body.custom_include_body);
10311036 mergeObjectWithYaml(headers, request.body.custom_include_headers);
10321037