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:
1 parent
147fc168f9
commit
07717bad60
30 files changed
+773
-159
No files matched your search
@@ -30,7 +30,18 @@ export async function PUT(request, { params }) {
|
||||
try {
|
||||
const { id } = await params;
|
||||
const body = await request.json();
|
||||
const { name, priority, globalPriority, defaultModel, isActive, apiKey, testStatus, lastError, lastErrorAt } = body;
|
||||
const {
|
||||
name,
|
||||
priority,
|
||||
globalPriority,
|
||||
defaultModel,
|
||||
isActive,
|
||||
apiKey,
|
||||
testStatus,
|
||||
lastError,
|
||||
lastErrorAt,
|
||||
providerSpecificData
|
||||
} = body;
|
||||
|
||||
const existing = await getProviderConnectionById(id);
|
||||
if (!existing) {
|
||||
@@ -47,6 +58,12 @@ export async function PUT(request, { params }) {
|
||||
if (testStatus !== undefined) updateData.testStatus = testStatus;
|
||||
if (lastError !== undefined) updateData.lastError = lastError;
|
||||
if (lastErrorAt !== undefined) updateData.lastErrorAt = lastErrorAt;
|
||||
if (providerSpecificData !== undefined) {
|
||||
updateData.providerSpecificData = {
|
||||
...(existing.providerSpecificData || {}),
|
||||
...providerSpecificData,
|
||||
};
|
||||
}
|
||||
|
||||
const updated = await updateProviderConnection(id, updateData);
|
||||
|
||||
|
||||
Reference in new issue
Block a user