feat: 운영 안정성과 세션 음성 경험 개선
This commit is contained in:
parent
facc4ad2d9
commit
c788343467
95 changed files with 8431 additions and 1785 deletions
|
|
@ -36,6 +36,7 @@ interface AdminEngineConfigResponse {
|
|||
engine_mode: string;
|
||||
engine_url: string;
|
||||
model: string;
|
||||
reasoning_effort: string | null;
|
||||
updated_by: string | null;
|
||||
updated_at: number | null;
|
||||
}
|
||||
|
|
@ -135,7 +136,18 @@ test.describe("database-backed runtime state", () => {
|
|||
const engineResponse = await page.request.get("/api/admin/engine-config");
|
||||
await expectResponseOk(engineResponse);
|
||||
const currentEngine = (await engineResponse.json()) as AdminEngineConfigResponse;
|
||||
const nextModel = `db-persist-${slug}`;
|
||||
const capabilityResponse = await page.request.get(
|
||||
`/api/admin/engine-capabilities?engine_mode=${encodeURIComponent(currentEngine.engine_mode)}`,
|
||||
);
|
||||
await expectResponseOk(capabilityResponse);
|
||||
const capability = (await capabilityResponse.json()) as {
|
||||
models: Array<{ id: string; default_reasoning_effort?: string | null }>;
|
||||
};
|
||||
const candidate =
|
||||
capability.models.find((model) => model.id !== currentEngine.model) ?? capability.models[0];
|
||||
if (!candidate) throw new Error("engine capability returned no selectable model");
|
||||
const nextModel = candidate.id;
|
||||
const nextEffort = candidate.default_reasoning_effort ?? null;
|
||||
|
||||
try {
|
||||
const enginePatch = await page.request.patch("/api/admin/engine-config", {
|
||||
|
|
@ -143,6 +155,7 @@ test.describe("database-backed runtime state", () => {
|
|||
engine_mode: currentEngine.engine_mode,
|
||||
engine_url: currentEngine.engine_url,
|
||||
model: nextModel,
|
||||
reasoning_effort: nextEffort,
|
||||
},
|
||||
});
|
||||
await expectResponseOk(enginePatch);
|
||||
|
|
@ -151,6 +164,7 @@ test.describe("database-backed runtime state", () => {
|
|||
engine_mode: currentEngine.engine_mode,
|
||||
engine_url: currentEngine.engine_url,
|
||||
model: nextModel,
|
||||
reasoning_effort: nextEffort,
|
||||
updated_by: adminEmail,
|
||||
});
|
||||
expect(updatedEngine.updated_at).toBeGreaterThan(0);
|
||||
|
|
@ -168,6 +182,7 @@ test.describe("database-backed runtime state", () => {
|
|||
engine_mode: currentEngine.engine_mode,
|
||||
engine_url: currentEngine.engine_url,
|
||||
model: currentEngine.model,
|
||||
reasoning_effort: currentEngine.reasoning_effort,
|
||||
},
|
||||
});
|
||||
await expectResponseOk(restoreResponse);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue