chore(settings): align default ai model handling
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { SystemRole } from "@capakraken/shared";
|
||||
import { DEFAULT_OPENAI_MODEL, SystemRole } from "@capakraken/shared";
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
const {
|
||||
@@ -90,7 +90,7 @@ describe("settings procedure support", () => {
|
||||
},
|
||||
}), {
|
||||
aiProvider: "openai",
|
||||
azureOpenAiDeployment: "gpt-4o-mini",
|
||||
azureOpenAiDeployment: DEFAULT_OPENAI_MODEL,
|
||||
azureOpenAiApiKey: "should-be-ignored",
|
||||
smtpPassword: "also-ignored",
|
||||
});
|
||||
@@ -105,11 +105,11 @@ describe("settings procedure support", () => {
|
||||
create: {
|
||||
id: "singleton",
|
||||
aiProvider: "openai",
|
||||
azureOpenAiDeployment: "gpt-4o-mini",
|
||||
azureOpenAiDeployment: DEFAULT_OPENAI_MODEL,
|
||||
},
|
||||
update: {
|
||||
aiProvider: "openai",
|
||||
azureOpenAiDeployment: "gpt-4o-mini",
|
||||
azureOpenAiDeployment: DEFAULT_OPENAI_MODEL,
|
||||
},
|
||||
});
|
||||
expect(createAuditEntry).toHaveBeenCalledWith(expect.objectContaining({
|
||||
@@ -117,7 +117,7 @@ describe("settings procedure support", () => {
|
||||
action: "UPDATE",
|
||||
after: expect.objectContaining({
|
||||
aiProvider: "openai",
|
||||
azureOpenAiDeployment: "gpt-4o-mini",
|
||||
azureOpenAiDeployment: DEFAULT_OPENAI_MODEL,
|
||||
}),
|
||||
}));
|
||||
});
|
||||
@@ -182,7 +182,7 @@ describe("settings procedure support", () => {
|
||||
systemSettings: {
|
||||
findUnique: vi.fn().mockResolvedValue({
|
||||
aiProvider: "openai",
|
||||
azureOpenAiDeployment: "gpt-4o-mini",
|
||||
azureOpenAiDeployment: DEFAULT_OPENAI_MODEL,
|
||||
azureOpenAiApiKey: null,
|
||||
}),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user