Fix Zai and Minimax auth for usage
This commit is contained in:
@@ -291,6 +291,12 @@ describe("runDashboard — AuthStorage & ModelRegistry wiring", () => {
|
||||
expect(serverOpts.authStorage.setApiKey).toBeTypeOf("function");
|
||||
expect(serverOpts.authStorage.clearApiKey).toBeTypeOf("function");
|
||||
expect(serverOpts.authStorage.hasApiKey).toBeTypeOf("function");
|
||||
expect(serverOpts.authStorage.getApiKeyProviders()).toEqual([
|
||||
{ id: "kimi-coding", name: "Kimi" },
|
||||
{ id: "minimax", name: "Minimax" },
|
||||
{ id: "openrouter", name: "OpenRouter" },
|
||||
{ id: "zai", name: "Zai" },
|
||||
]);
|
||||
});
|
||||
|
||||
it("creates AuthStorage via AuthStorage.create()", async () => {
|
||||
@@ -642,4 +648,3 @@ describe("runDashboard — per-project engine manager (multi-project)", () => {
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -247,9 +247,18 @@ const mocks = vi.hoisted(() => {
|
||||
|
||||
const authStorage = {
|
||||
getApiKey: vi.fn().mockResolvedValue(undefined),
|
||||
reload: vi.fn(),
|
||||
getOAuthProviders: vi.fn().mockReturnValue([]),
|
||||
hasAuth: vi.fn().mockReturnValue(false),
|
||||
login: vi.fn(),
|
||||
logout: vi.fn(),
|
||||
set: vi.fn(),
|
||||
remove: vi.fn(),
|
||||
get: vi.fn(),
|
||||
};
|
||||
|
||||
const modelRegistry = {
|
||||
getAll: vi.fn().mockReturnValue([]),
|
||||
registerProvider: vi.fn(),
|
||||
refresh: vi.fn(),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user