feat(antigravity): support custom Google Cloud project ID (#2227)

Co-authored-by: nickwizard <nickwizard@users.noreply.github.com>
This commit is contained in:
diegosouzapw
2026-05-14 05:11:24 -03:00
parent 22f2c033da
commit bf83aa55de
55 changed files with 358 additions and 112 deletions

View File

@@ -60,10 +60,7 @@ export async function PUT(request: Request, { params }: { params: Promise<{ id:
return NextResponse.json({ mapping });
} catch (error: any) {
console.error("Failed to update mapping:", error);
return NextResponse.json(
{ error: "Failed to update mapping" },
{ status: 500 }
);
return NextResponse.json({ error: "Failed to update mapping" }, { status: 500 });
}
}
@@ -82,9 +79,6 @@ export async function DELETE(request: Request, { params }: { params: Promise<{ i
return NextResponse.json({ success: true });
} catch (error: any) {
console.error("Failed to delete mapping:", error);
return NextResponse.json(
{ error: "Failed to delete mapping" },
{ status: 500 }
);
return NextResponse.json({ error: "Failed to delete mapping" }, { status: 500 });
}
}

View File

@@ -27,10 +27,7 @@ export async function GET(request: Request) {
return NextResponse.json({ mappings });
} catch (error: any) {
console.error("Failed to list model-combo mappings:", error);
return NextResponse.json(
{ error: "Failed to list model-combo mappings" },
{ status: 500 }
);
return NextResponse.json({ error: "Failed to list model-combo mappings" }, { status: 500 });
}
}
@@ -57,9 +54,6 @@ export async function POST(request: Request) {
return NextResponse.json({ mapping }, { status: 201 });
} catch (error: any) {
console.error("Failed to create model-combo mapping:", error);
return NextResponse.json(
{ error: "Failed to create model-combo mapping" },
{ status: 500 }
);
return NextResponse.json({ error: "Failed to create model-combo mapping" }, { status: 500 });
}
}

View File

@@ -187,9 +187,12 @@ export async function ensureLoopbackServerReady(opts: EnsureReadyOptions = {}):
// ECONNREFUSED). Using a synthetic connection id so no real DB lookup
// is needed; the 404 is sufficient proof the server is dispatching.
const probePort = process.env.OMNIROUTE_PORT || process.env.PORT || "20128";
const res = await f(`http://127.0.0.1:${probePort}/api/providers/__readiness_probe__/models`, {
signal: AbortSignal.timeout(2_000),
});
const res = await f(
`http://127.0.0.1:${probePort}/api/providers/__readiness_probe__/models`,
{
signal: AbortSignal.timeout(2_000),
}
);
if (res.status >= 200 && res.status < 600) return;
} catch (err) {
lastErr = err;