fix(agent-teams): rotate lead session and clear stale teammate inbox

This commit is contained in:
Nguyen Khac Trung Kien
2026-02-08 10:15:56 +07:00
committed by YeonGyu-Kim
parent 11766b085d
commit 3f859828cc
4 changed files with 183 additions and 13 deletions
+5 -2
View File
@@ -7,10 +7,13 @@ function parseModel(model: string | undefined): { providerID: string; modelID: s
if (!model) {
return undefined
}
const [providerID, modelID] = model.split("/", 2)
if (!providerID || !modelID) {
const separatorIndex = model.indexOf("/")
if (separatorIndex <= 0 || separatorIndex >= model.length - 1) {
throw new Error("invalid_model_override_format")
}
const providerID = model.slice(0, separatorIndex)
const modelID = model.slice(separatorIndex + 1)
return { providerID, modelID }
}