@jeffreycao/copilot-api 1.13.3 → 1.13.4

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 CHANGED
@@ -25,7 +25,7 @@ bindElectronFetch();
25
25
  const { auth } = await import("./auth-CtydxYcd.js");
26
26
  const { debug } = await import("./debug-CjJqlHl_.js");
27
27
  const { mcp } = await import("./mcp-BseuqgHR.js");
28
- const { start } = await import("./start-DHjCOvZC.js");
28
+ const { start } = await import("./start-DDL0wwno.js");
29
29
  await runMain(defineCommand({
30
30
  meta: {
31
31
  name: "copilot-api",
@@ -2746,6 +2746,13 @@ const prepareMessagesApiPayload = (payload, selectedModel) => {
2746
2746
  if (reasoningEffort && !reasoningEffort.includes(effort)) effort = reasoningEffort.at(-1);
2747
2747
  payload.output_config = { effort };
2748
2748
  }
2749
+ if (!selectedModel?.capabilities.supports.adaptive_thinking && payload.output_config?.effort) {
2750
+ const supported = selectedModel?.capabilities.supports.reasoning_effort;
2751
+ if (!supported || supported.length === 0) {
2752
+ delete payload.output_config.effort;
2753
+ if (Object.keys(payload.output_config).length === 0) delete payload.output_config;
2754
+ }
2755
+ }
2749
2756
  };
2750
2757
  //#endregion
2751
2758
  //#region src/routes/provider/messages/count-tokens-handler.ts
@@ -6586,4 +6593,4 @@ server.route("/:provider/v1/models", providerModelRoutes);
6586
6593
  //#endregion
6587
6594
  export { server };
6588
6595
 
6589
- //# sourceMappingURL=server-BXCLiIHf.js.map
6596
+ //# sourceMappingURL=server-BzgBFAIx.js.map