@jeffreycao/copilot-api 1.6.0-beta.2 → 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-DAlTk9BR.js");
24
24
  const { checkUsage } = await import("./check-usage-B-1bXEu4.js");
25
25
  const { debug } = await import("./debug-DcC7ZPH0.js");
26
- const { start } = await import("./start-JMKr-2eK.js");
26
+ const { start } = await import("./start-CZaoeGeK.js");
27
27
  const main = defineCommand({
28
28
  meta: {
29
29
  name: "copilot-api",
@@ -1930,12 +1930,6 @@ const TOOL_REFERENCE_TURN_BOUNDARY = "Tool loaded.";
1930
1930
  const IDE_EXECUTE_CODE_TOOL = "mcp__ide__executeCode";
1931
1931
  const IDE_GET_DIAGNOSTICS_TOOL = "mcp__ide__getDiagnostics";
1932
1932
  const IDE_GET_DIAGNOSTICS_DESCRIPTION = "Get language diagnostics from VS Code. Returns errors, warnings, information, and hints for files in the workspace.";
1933
- const getAnthropicEffortForModel = (model) => {
1934
- const reasoningEffort = getReasoningEffortForModel(model);
1935
- if (reasoningEffort === "xhigh") return "max";
1936
- if (reasoningEffort === "none" || reasoningEffort === "minimal") return "low";
1937
- return reasoningEffort;
1938
- };
1939
1933
  const getCompactCandidateText = (message) => {
1940
1934
  if (message.role !== "user") return "";
1941
1935
  if (typeof message.content === "string") return message.content;
@@ -2054,7 +2048,12 @@ const prepareMessagesApiPayload = (payload, selectedModel) => {
2054
2048
  if (selectedModel?.capabilities.supports.adaptive_thinking && !disableThink) {
2055
2049
  payload.thinking = { type: "adaptive" };
2056
2050
  if (!hasThinking) payload.thinking.display = "summarized";
2057
- payload.output_config = { effort: getAnthropicEffortForModel(payload.model) };
2051
+ if (payload.model === "claude-opus-4.7") payload.thinking.display = "summarized";
2052
+ let effort = getReasoningEffortForModel(payload.model);
2053
+ if (effort === "none" || effort === "minimal") effort = "low";
2054
+ const reasoningEffort = selectedModel.capabilities.supports.reasoning_effort;
2055
+ if (reasoningEffort && !reasoningEffort.includes(effort)) effort = reasoningEffort.at(-1);
2056
+ payload.output_config = { effort };
2058
2057
  }
2059
2058
  };
2060
2059
 
@@ -3026,4 +3025,4 @@ server.route("/:provider/v1/models", providerModelRoutes);
3026
3025
 
3027
3026
  //#endregion
3028
3027
  export { server };
3029
- //# sourceMappingURL=server-DYDw_yEw.js.map
3028
+ //# sourceMappingURL=server-CBnVrsFn.js.map