Merge remote-tracking branch 'origin/master' into gitea/feature/end

Resolved conflicts taking origin/master (v0.5.55) as canonical, with local
features re-applied:
- runtime log level (LOG_LEVEL env + dashboard Settings → Logging, applied
  immediately and persisted across restarts)
- free/noAuth provider enable/disable toggle via providerStrategies.enabled
- parallel model testing (Test All Models / Test Selected Keys)
This commit is contained in:
2026-08-17 00:38:31 +07:00
parent e7470e955e
commit 7e45ead2ac
557 changed files with 53396 additions and 6935 deletions

View File

@@ -0,0 +1,35 @@
// #2591 — Alibaba Intl key types split across two hosts:
// - alicode-intl: Coding Plan keys (sk-sp-...) → coding-intl.dashscope.aliyuncs.com
// - alims-intl: standard DashScope API keys (sk-...) → dashscope-intl.aliyuncs.com/compatible-mode
// The two key types are NOT interchangeable across hosts. Split into two providers
// so each key type reaches its own host.
import { describe, it, expect } from "vitest";
import alicodeIntl from "../../open-sse/providers/registry/alicode-intl.js";
import alimsIntl from "../../open-sse/providers/registry/alims-intl.js";
describe("alicode-intl endpoint (Coding Plan keys)", () => {
it("routes to the coding-intl host for Coding Plan keys", () => {
expect(alicodeIntl.id).toBe("alicode-intl");
expect(alicodeIntl.transport.baseUrl).toBe(
"https://coding-intl.dashscope.aliyuncs.com/v1/chat/completions"
);
});
it("keeps the chat/completions path and preserveCacheControl quirk", () => {
expect(alicodeIntl.transport.baseUrl).toContain("/v1/chat/completions");
expect(alicodeIntl.transport.quirks.preserveCacheControl).toBe(true);
});
});
describe("alims-intl endpoint (standard DashScope keys)", () => {
it("routes to the compatible-mode DashScope endpoint for standard keys", () => {
expect(alimsIntl.id).toBe("alims-intl");
expect(alimsIntl.transport.baseUrl).toBe(
"https://dashscope-intl.aliyuncs.com/compatible-mode/v1/chat/completions"
);
});
it("does not use the coding-intl host that rejects standard keys", () => {
expect(alimsIntl.transport.baseUrl).not.toContain("coding-intl.dashscope.aliyuncs.com");
});
});