@dianshuv/copilot-api 0.11.1 → 0.11.3
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.mjs +7 -5
- package/package.json +1 -1
package/dist/main.mjs
CHANGED
|
@@ -1348,7 +1348,7 @@ const patchClaude = defineCommand({
|
|
|
1348
1348
|
|
|
1349
1349
|
//#endregion
|
|
1350
1350
|
//#region package.json
|
|
1351
|
-
var version = "0.11.
|
|
1351
|
+
var version = "0.11.3";
|
|
1352
1352
|
|
|
1353
1353
|
//#endregion
|
|
1354
1354
|
//#region src/lib/adaptive-rate-limiter.ts
|
|
@@ -7324,8 +7324,10 @@ function stripServerToolsFromPayload(tools) {
|
|
|
7324
7324
|
}
|
|
7325
7325
|
/**
|
|
7326
7326
|
* Effective 1M context window. Two ways a request lands on this size:
|
|
7327
|
-
* (a) base model id + context-1m-2025-08-07 beta header (e.g. claude-opus-4.8
|
|
7328
|
-
*
|
|
7327
|
+
* (a) base model id + context-1m-2025-08-07 beta header (e.g. claude-opus-4.8,
|
|
7328
|
+
* claude-opus-4.7),
|
|
7329
|
+
* (b) a distinct upstream "-1m-internal" model id (a historical convention; no
|
|
7330
|
+
* model currently on Copilot uses it, but the resolver still probes for it).
|
|
7329
7331
|
*/
|
|
7330
7332
|
const ONE_MILLION_CONTEXT_WINDOW_TOKENS = 1e6;
|
|
7331
7333
|
/**
|
|
@@ -7677,7 +7679,7 @@ function translateModelName(model) {
|
|
|
7677
7679
|
if (/^claude-sonnet-4-\d+$/.test(model)) return "claude-sonnet-4";
|
|
7678
7680
|
if (model === "claude-opus-4-8-1m") return "claude-opus-4.8";
|
|
7679
7681
|
if (model === "claude-opus-4-8") return "claude-opus-4.8";
|
|
7680
|
-
if (model === "claude-opus-4-7-1m") return "claude-opus-4.7
|
|
7682
|
+
if (model === "claude-opus-4-7-1m") return "claude-opus-4.7";
|
|
7681
7683
|
if (/^claude-opus-4-7$/.test(model)) return "claude-opus-4.7";
|
|
7682
7684
|
if (model === "claude-opus-4-6-1m") return "claude-opus-4.6-1m";
|
|
7683
7685
|
if (/^claude-opus-4-6$/.test(model)) return "claude-opus-4.6";
|
|
@@ -8051,7 +8053,7 @@ function translateErrorToAnthropicErrorEvent(error) {
|
|
|
8051
8053
|
|
|
8052
8054
|
//#endregion
|
|
8053
8055
|
//#region src/routes/messages/tool-call-recovery.ts
|
|
8054
|
-
const ENVELOPE = String.raw`(?:<(?:antml:)?function_calls>|call)`;
|
|
8056
|
+
const ENVELOPE = String.raw`(?:<(?:antml:)?function_calls>|call|count|court)`;
|
|
8055
8057
|
const INVOKE_BODY = String.raw`<(?:antml:)?invoke\s+name="[^"]+">(?:(?!<(?:antml:)?invoke\b)[\s\S])*?</(?:antml:)?invoke>`;
|
|
8056
8058
|
const LEAKED_REGION_RE = new RegExp(String.raw`(?:^|\n)[ \t]*(?:` + ENVELOPE + String.raw`[ \t\n]*(?:` + INVOKE_BODY + String.raw`\s*)+(?:</(?:antml:)?function_calls>)?|` + INVOKE_BODY + String.raw`)`, "g");
|
|
8057
8059
|
const STARTS_WITH_ENVELOPE_RE = new RegExp(String.raw`^[ \t\n]*` + ENVELOPE);
|