@nick3/copilot-api 1.6.0 → 1.6.1

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
@@ -23,7 +23,7 @@ if (typeof args["enterprise-url"] === "string") process.env.COPILOT_API_ENTERPRI
23
23
  const { auth } = await import("./auth-BXCeDjRG.js");
24
24
  const { checkUsage } = await import("./check-usage-CQxXYfUx.js");
25
25
  const { debug } = await import("./debug-BJfZVBB7.js");
26
- const { start } = await import("./start-DQlnH71A.js");
26
+ const { start } = await import("./start-eFWi3mS4.js");
27
27
  await runMain(defineCommand({
28
28
  meta: {
29
29
  name: "copilot-api",
@@ -3299,12 +3299,6 @@ const TOOL_REFERENCE_TURN_BOUNDARY = "Tool loaded.";
3299
3299
  const IDE_EXECUTE_CODE_TOOL = "mcp__ide__executeCode";
3300
3300
  const IDE_GET_DIAGNOSTICS_TOOL = "mcp__ide__getDiagnostics";
3301
3301
  const IDE_GET_DIAGNOSTICS_DESCRIPTION = "Get language diagnostics from VS Code. Returns errors, warnings, information, and hints for files in the workspace.";
3302
- const getAnthropicEffortForModel = (model) => {
3303
- const reasoningEffort = getReasoningEffortForModel(model);
3304
- if (reasoningEffort === "xhigh") return "max";
3305
- if (reasoningEffort === "none" || reasoningEffort === "minimal") return "low";
3306
- return reasoningEffort;
3307
- };
3308
3302
  const getCompactCandidateText = (message) => {
3309
3303
  if (message.role !== "user") return "";
3310
3304
  if (typeof message.content === "string") return message.content;
@@ -3439,7 +3433,12 @@ const prepareMessagesApiPayload = (payload, selectedModel) => {
3439
3433
  if (selectedModel?.capabilities.supports.adaptive_thinking && !disableThink) {
3440
3434
  payload.thinking = { type: "adaptive" };
3441
3435
  if (!hasThinking) payload.thinking.display = "summarized";
3442
- payload.output_config = { effort: getAnthropicEffortForModel(payload.model) };
3436
+ if (payload.model === "claude-opus-4.7") payload.thinking.display = "summarized";
3437
+ let effort = getReasoningEffortForModel(payload.model);
3438
+ if (effort === "none" || effort === "minimal") effort = "low";
3439
+ const reasoningEffort = selectedModel.capabilities.supports.reasoning_effort;
3440
+ if (reasoningEffort && !reasoningEffort.includes(effort)) effort = reasoningEffort.at(-1);
3441
+ payload.output_config = { effort };
3443
3442
  }
3444
3443
  };
3445
3444
 
@@ -6918,4 +6917,4 @@ server.route("/:provider/v1/models", providerModelRoutes);
6918
6917
 
6919
6918
  //#endregion
6920
6919
  export { server };
6921
- //# sourceMappingURL=server-CFijvv3C.js.map
6920
+ //# sourceMappingURL=server-BAlLdlCl.js.map