fix(consultation): make agentic runtime the default
This commit is contained in:
@@ -135,9 +135,10 @@ function mergeUsage(usages: Promise<Usage>[]): Promise<Usage> {
|
||||
}
|
||||
|
||||
function shouldUseAgenticRuntime(user: { id: string; app_metadata?: Record<string, unknown> }) {
|
||||
const mode = process.env.CONSULTATION_AGENTIC_RUNTIME?.trim().toLowerCase() ?? "legacy";
|
||||
const mode = process.env.CONSULTATION_AGENTIC_RUNTIME?.trim().toLowerCase() ?? "enabled";
|
||||
if (mode === "legacy") return false;
|
||||
if (mode === "enabled") return true;
|
||||
if (mode !== "canary") return false;
|
||||
if (mode !== "canary") return true;
|
||||
const ids = new Set((process.env.CONSULTATION_AGENTIC_CANARY_USER_IDS ?? "")
|
||||
.split(",").map((value) => value.trim()).filter(Boolean));
|
||||
const roles = Array.isArray(user.app_metadata?.roles) ? user.app_metadata.roles : [];
|
||||
|
||||
Reference in New Issue
Block a user