feat(providers): expose antigravity preview aliases and gemini cli onboarding

Centralize Antigravity public model definitions and use the
client-visible preview aliases in provider discovery, model catalog
responses, and default alias seeding.

Add Gemini CLI managed-project onboarding with retries when
loadCodeAssist does not return a project, and update Gemini CLI header
fingerprints to match newer native clients.

Improve non-stream handling by converting NDJSON event payloads into
SSE-compatible parsing for stream=false requests, add PUT support for
the settings API, expand Gemini schema cleanup for local refs and
unsupported keys, and include Anthropic beta headers for API-key
requests.
This commit is contained in:
diegosouzapw 2026-04-16 23:25:58 -03:00
parent 7b51ccd9e4
commit 14d18d27b1
19 changed files with 624 additions and 97 deletions

View file

@ -1,6 +1,7 @@
import { describe, test } from "node:test";
import assert from "node:assert/strict";
import { getSettings, updateSettings } from "../../src/lib/db/settings.ts";
const settingsRoute = await import("../../src/app/api/settings/route.ts");
describe("Settings API - debugMode and hiddenSidebarItems", () => {
describe("debugMode", () => {
@ -77,5 +78,19 @@ describe("Settings API - debugMode and hiddenSidebarItems", () => {
"antigravitySignatureCacheMode should be updated"
);
});
test("PUT /api/settings reuses the PATCH update flow", async () => {
const response = await settingsRoute.PUT(
new Request("http://localhost/api/settings", {
method: "PUT",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ antigravitySignatureCacheMode: "bypass" }),
})
);
const body = await response.json();
assert.equal(response.status, 200);
assert.equal(body.antigravitySignatureCacheMode, "bypass");
});
});
});