fix: remove the suggest model in provider page

This commit is contained in:
2026-07-19 20:09:43 +07:00
parent c90f620694
commit 16eabec743
36 changed files with 146 additions and 771 deletions
+1 -5
View File
@@ -66,7 +66,7 @@ describe("DB Concurrency — atomic safety", () => {
expect(list.pagination.totalItems).toBeGreaterThanOrEqual(N);
}, 15000);
it("mixed concurrent: usage + details + connections + aliases", async () => {
it("mixed concurrent: usage, aliases, and connections", async () => {
const ops = [];
for (let i = 0; i < 50; i++) {
ops.push(db.saveRequestUsage({
@@ -74,16 +74,12 @@ describe("DB Concurrency — atomic safety", () => {
tokens: { prompt_tokens: 20 }, status: "ok",
}));
ops.push(db.setModelAlias(`a-${i}`, `target-${i}`));
ops.push(db.disableModels("openai", [`d-${i}`]));
}
await Promise.all(ops);
const aliases = await db.getModelAliases();
expect(Object.keys(aliases).filter((k) => k.startsWith("a-")).length).toBe(50);
const disabled = await db.getDisabledByProvider("openai");
expect(disabled.length).toBeGreaterThanOrEqual(50);
const stats = await db.getUsageStats("24h");
expect(stats.byProvider.anthropic.requests).toBe(50);
}, 30000);