Add sticky round-robin for combos (#831)

Made-with: Cursor
This commit is contained in:
Abhishek Divekar
2026-05-01 16:36:36 +07:00
committed by GitHub
parent 0da61d8f7b
commit 3f17ee0e21
8 changed files with 160 additions and 24 deletions
+4 -2
View File
@@ -84,14 +84,16 @@ export async function handleFetch(request) {
if (comboModels) {
const comboStrategies = settings.comboStrategies || {};
const comboStrategy = comboStrategies[providerInput]?.fallbackStrategy || settings.comboStrategy || "fallback";
log.info("FETCH", `Combo "${providerInput}" with ${comboModels.length} providers (strategy: ${comboStrategy})`);
const comboStickyLimit = settings.comboStickyRoundRobinLimit;
log.info("FETCH", `Combo "${providerInput}" with ${comboModels.length} providers (strategy: ${comboStrategy}, sticky: ${comboStickyLimit})`);
return handleComboChat({
body,
models: comboModels,
handleSingleModel: (b, m) => handleSingleProviderFetch(b, m, request, apiKey, settings),
log,
comboName: providerInput,
comboStrategy
comboStrategy,
comboStickyLimit
});
}