xiaodcs-copilot-api 2.5.1-public.2 → 2.5.1-public.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/README.md +8 -0
- package/dist/main.js +1 -1
- package/dist/{server-DmKNMBLd.js → models-BOrd_Vgi.js} +1093 -12293
- package/dist/{protocol-BTFLbI8m.js → protocol-CpMGdO6U.js} +5 -3
- package/dist/{runtime-CWU5BNBf.js → runtime-s-DMZGEK.js} +3 -1
- package/dist/server-Bq4fR6aD.js +11507 -0
- package/dist/{start-WdcRgBSL.js → start-BRXpCbKi.js} +286 -4
- package/dist/transport-DahPg_3h.js +2 -0
- package/dist/{transport-DE8Q0wU-.js → transport-hrgJN3gk.js} +2 -2
- package/package.json +2 -2
- package/qoder-bridge/README.md +2 -0
- package/dist/provider-proxy-BbLwvtD_.js +0 -263
- package/dist/transport-HOWgkXsv.js +0 -2
|
@@ -225,10 +225,12 @@ function parseChat(value) {
|
|
|
225
225
|
...typeof message.tool_call_id === "string" ? { tool_call_id: message.tool_call_id } : {}
|
|
226
226
|
});
|
|
227
227
|
}
|
|
228
|
-
if (!["user", "tool"].includes(conversation.at(-1)?.role ?? "")) throw new BridgeError("The last conversation message must be from the user");
|
|
229
228
|
if (Buffer.byteLength(system.join("\n") + JSON.stringify(conversation) + JSON.stringify(tools)) > 1024 * 1024) throw new BridgeError("Text exceeds the 1 MiB limit", 413);
|
|
230
|
-
const
|
|
231
|
-
const
|
|
229
|
+
const last = conversation.at(-1);
|
|
230
|
+
const continuation = last?.role === "assistant";
|
|
231
|
+
const history = continuation ? conversation : conversation.slice(0, -1);
|
|
232
|
+
const current = continuation ? "Continue the assistant response from the conversation above. Do not repeat the existing response or invent missing tool results." : last?.role === "tool" ? JSON.stringify(last) : last?.content ?? "Respond according to the provided instructions.";
|
|
233
|
+
const prompt = history.length ? `Previous conversation (JSON data):\n${JSON.stringify(history)}\n\n${continuation ? "Continuation request" : "Current message (JSON data)"}:\n${current}` : current;
|
|
232
234
|
return {
|
|
233
235
|
model: input.model.trim(),
|
|
234
236
|
stream: input.stream === true,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as makeImage, d as BridgeError, f as record, l as validateImageUrl, s as decodeDataImage, u as clientToolServer } from "./protocol-
|
|
1
|
+
import { c as makeImage, d as BridgeError, f as record, l as validateImageUrl, s as decodeDataImage, u as clientToolServer } from "./protocol-CpMGdO6U.js";
|
|
2
2
|
import { mkdtemp, rm } from "node:fs/promises";
|
|
3
3
|
import { tmpdir } from "node:os";
|
|
4
4
|
import { join } from "node:path";
|
|
@@ -369,6 +369,8 @@ function createBackend(runQuery = query, token) {
|
|
|
369
369
|
id: m.value,
|
|
370
370
|
name: m.displayName,
|
|
371
371
|
context_window: m.defaultContextWindow ?? Math.min(...m.availableContextWindows?.length ? m.availableContextWindows : [m.maxInputTokens ?? 128e3]),
|
|
372
|
+
reasoning_efforts: m.efforts,
|
|
373
|
+
default_reasoning_level: m.defaultEffort,
|
|
372
374
|
max_input_tokens: m.maxInputTokens,
|
|
373
375
|
max_output_tokens: m.maxOutputTokens,
|
|
374
376
|
available_context_windows: m.availableContextWindows,
|