Auth choice tests: assert env-backed keyRef persistence

This commit is contained in:
joshavant
2026-02-22 15:56:33 -08:00
committed by Peter Steinberger
parent 58590087de
commit 56f73ae080

View File

@@ -44,7 +44,7 @@ describe("applyAuthChoiceMiniMax", () => {
async function readAuthProfiles(agentDir: string) {
return await readAuthProfilesForAgent<{
profiles?: Record<string, { key?: string }>;
profiles?: Record<string, { key?: string; keyRef?: { source: string; id: string } }>;
}>(agentDir);
}
@@ -154,7 +154,10 @@ describe("applyAuthChoiceMiniMax", () => {
expect(confirm).toHaveBeenCalled();
const parsed = await readAuthProfiles(agentDir);
expect(parsed.profiles?.["minimax-cn:default"]?.key).toBe("mm-env-token");
expect(parsed.profiles?.["minimax-cn:default"]?.keyRef).toEqual({
source: "env",
id: "MINIMAX_API_KEY",
});
});
it("uses minimax-api-lightning default model", async () => {