copilot-api-plus 1.2.40 → 1.2.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +10 -1
- package/dist/main.js.map +1 -1
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -1861,7 +1861,16 @@ function isToolChoiceForced(toolChoice) {
|
|
|
1861
1861
|
* /models endpoint doesn't expose thinking budget fields.
|
|
1862
1862
|
*/
|
|
1863
1863
|
function injectThinking(payload, resolvedModel) {
|
|
1864
|
-
if (payload.reasoning_effort || payload.thinking_budget)
|
|
1864
|
+
if (payload.reasoning_effort || payload.thinking_budget) {
|
|
1865
|
+
if (payload.reasoning_effort && payload.reasoning_effort !== "medium" && payload.reasoning_effort !== "low") {
|
|
1866
|
+
const cap = reasoningEffortCap.get(resolvedModel);
|
|
1867
|
+
if (cap) return {
|
|
1868
|
+
...payload,
|
|
1869
|
+
reasoning_effort: cap
|
|
1870
|
+
};
|
|
1871
|
+
}
|
|
1872
|
+
return payload;
|
|
1873
|
+
}
|
|
1865
1874
|
if (isToolChoiceForced(payload.tool_choice)) return payload;
|
|
1866
1875
|
const budget = getThinkingBudget(findModel(resolvedModel));
|
|
1867
1876
|
if (budget) return {
|