@jeffreycao/copilot-api 1.14.20 → 1.14.21

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/README.md CHANGED
@@ -185,6 +185,7 @@ Here is an example `.claude/settings.json` file:
185
185
  "ANTHROPIC_BASE_URL": "http://localhost:4141",
186
186
  "ANTHROPIC_AUTH_TOKEN": "dummy",
187
187
  "ANTHROPIC_MODEL": "gpt-5.6-sol[1m]",
188
+ "ANTHROPIC_DEFAULT_OPUS_MODEL": "gpt-5.6-sol[1m]",
188
189
  "ANTHROPIC_DEFAULT_SONNET_MODEL": "gpt-5.6-sol[1m]",
189
190
  "ANTHROPIC_DEFAULT_HAIKU_MODEL": "gpt-5.6-luna[1m]",
190
191
  "CLAUDE_CODE_AUTO_COMPACT_WINDOW": "272000",
package/README.zh-CN.md CHANGED
@@ -187,6 +187,7 @@ npx @jeffreycao/copilot-api@latest start --claude-code
187
187
  "ANTHROPIC_BASE_URL": "http://localhost:4141",
188
188
  "ANTHROPIC_AUTH_TOKEN": "dummy",
189
189
  "ANTHROPIC_MODEL": "gpt-5.6-sol[1m]",
190
+ "ANTHROPIC_DEFAULT_OPUS_MODEL": "gpt-5.6-sol[1m]",
190
191
  "ANTHROPIC_DEFAULT_SONNET_MODEL": "gpt-5.6-sol[1m]",
191
192
  "ANTHROPIC_DEFAULT_HAIKU_MODEL": "gpt-5.6-luna[1m]",
192
193
  "CLAUDE_CODE_AUTO_COMPACT_WINDOW": "272000",
package/dist/main.js CHANGED
@@ -25,7 +25,7 @@ bindElectronFetch();
25
25
  const { auth } = await import("./auth-Rfz38SnR.js");
26
26
  const { debug } = await import("./debug-BijayADs.js");
27
27
  const { mcp } = await import("./mcp-BG6fpi6q.js");
28
- const { start } = await import("./start-RTCk-bpf.js");
28
+ const { start } = await import("./start-BHeD3nDG.js");
29
29
  await runMain(defineCommand({
30
30
  meta: {
31
31
  name: "copilot-api",
@@ -1468,7 +1468,7 @@ function resolveReportedProviderCost(input) {
1468
1468
  const totalCostNanos = Math.round(cost * COST_NANOS_PER_UNIT);
1469
1469
  if (totalCostNanos < 0) return null;
1470
1470
  return {
1471
- currency: input.pricingCurrency?.trim().toUpperCase() || "USD",
1471
+ currency: "USD",
1472
1472
  source: "upstream",
1473
1473
  total_cost_nanos: totalCostNanos
1474
1474
  };
@@ -4095,7 +4095,7 @@ const mapOutputToAnthropicContent = (output, options) => {
4095
4095
  for (const item of output) switch (item.type) {
4096
4096
  case "reasoning": {
4097
4097
  const thinkingText = extractReasoningText(item);
4098
- if (thinkingText.length > 0) contentBlocks.push({
4098
+ if (thinkingText.length > 0 || item.id && item.encrypted_content) contentBlocks.push({
4099
4099
  type: "thinking",
4100
4100
  thinking: thinkingText,
4101
4101
  signature: (item.encrypted_content ?? "") + "@" + item.id
@@ -4168,7 +4168,6 @@ const extractReasoningText = (item) => {
4168
4168
  continue;
4169
4169
  }
4170
4170
  };
4171
- if (!item.summary || item.summary.length === 0) return THINKING_TEXT;
4172
4171
  collectFromBlocks(item.summary);
4173
4172
  return segments.join(REASONING_SUMMARY_SEPARATOR).trim();
4174
4173
  };
@@ -7214,4 +7213,4 @@ server.route("/:provider/images", providerImageRoutes);
7214
7213
  //#endregion
7215
7214
  export { server };
7216
7215
 
7217
- //# sourceMappingURL=server-DFKKcrgz.js.map
7216
+ //# sourceMappingURL=server-Dk788DUw.js.map