feat(core): add db health checks and provider interoperability

Add automated SQLite health diagnostics with optional auto-repair,
startup and scheduled execution, authenticated API routes, an MCP tool,
and dashboard visibility for status and repair actions.

Improve provider compatibility by adding Cursor usage fetching and
v3.1.0 parity headers, introducing a per-connection Codex Responses
store opt-in with session fallback, fixing Codex non-stream combo and
SSE translation behavior, sanitizing Gemini googleSearch tool payloads
and Qwen thinking tool_choice handling, and hardening cleanup and call
log storage paths.
This commit is contained in:
diegosouzapw 2026-04-13 11:28:45 -03:00
parent 56f7a5baae
commit 48467bc514
59 changed files with 3080 additions and 120 deletions

View file

@ -328,6 +328,19 @@ test("DefaultExecutor.transformRequest is a passthrough and preserves model ids
assert.equal(result.model, "zai-org/GLM-5-FP8");
});
test("DefaultExecutor.transformRequest neutralizes incompatible tool_choice for Qwen thinking", () => {
const executor = new DefaultExecutor("qwen");
const body = {
messages: [{ role: "user", content: "hi" }],
thinking: { type: "enabled" },
tool_choice: { type: "function", function: { name: "pwd" } },
};
const result = executor.transformRequest("qwen3-coder-plus", body, true, {});
assert.notEqual(result, body);
assert.equal(result.tool_choice, "auto");
});
test("BaseExecutor helpers manage custom user agents and upstream extra headers", () => {
const headers = { "user-agent": "old", Authorization: "Bearer old" };