fix(agent-teams): rotate lead session and clear stale teammate inbox
This commit is contained in:
committed by
YeonGyu-Kim
parent
11766b085d
commit
3f859828cc
@@ -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 }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user