feat: cherry-pick PR #183 — multi-provider support, PWA, dynamic models, UI improvements
Cherry-picked from decolua/9router PR #183. Note: open-sse changes included but need further review due to extensive modifications. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -40,6 +40,15 @@ export async function getModelInfo(modelStr) {
|
||||
};
|
||||
}
|
||||
|
||||
// Check if this is a combo name before resolving as alias
|
||||
// This prevents combo names from being incorrectly routed to providers
|
||||
const combo = await getComboByName(parsed.model);
|
||||
if (combo) {
|
||||
// Return null provider to signal this should be handled as combo
|
||||
// The caller (handleChat) will detect this and handle it as combo
|
||||
return { provider: null, model: parsed.model };
|
||||
}
|
||||
|
||||
return getModelInfoCore(modelStr, getModelAliases);
|
||||
}
|
||||
|
||||
@@ -50,7 +59,7 @@ export async function getModelInfo(modelStr) {
|
||||
export async function getComboModels(modelStr) {
|
||||
// Only check if it's not in provider/model format
|
||||
if (modelStr.includes("/")) return null;
|
||||
|
||||
|
||||
const combo = await getComboByName(modelStr);
|
||||
if (combo && combo.models && combo.models.length > 0) {
|
||||
return combo.models;
|
||||
|
||||
Reference in New Issue
Block a user