fix(ai): align api key credentials with auth json

This commit is contained in:
Mario Zechner
2026-06-23 22:29:46 +02:00
parent b377623435
commit 49fbe6834f
9 changed files with 70 additions and 56 deletions
+2 -2
View File
@@ -149,7 +149,7 @@ describe("envApiKeyAuth", () => {
const stored = await auth.resolve({
model,
ctx: fakeAuthContext({ FIRST_KEY: "env" }),
credential: { type: "api-key", key: "stored" },
credential: { type: "api_key", key: "stored" },
});
expect(stored?.auth.apiKey).toBe("stored");
expect(stored?.source).toBe("stored credential");
@@ -170,7 +170,7 @@ describe("envApiKeyAuth", () => {
},
notify: () => {},
});
expect(credential).toEqual({ type: "api-key", key: "entered-key" });
expect(credential).toEqual({ type: "api_key", key: "entered-key" });
});
});