Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

derive the agy model-id line pattern from one charset constant

[._.]/ Adam Eivye499b4ed398d
diff --git a/server/lib/antigravity.js b/server/lib/antigravity.js
index 6f4b1a5991..0b816a7ec2 100644
--- a/server/lib/antigravity.js
+++ b/server/lib/antigravity.js
@@ -42,8 +42,9 @@ export function isAntigravityCliProvider(provider) {
// its Zod schemas with; it is restated here rather than imported because
// `validation.js` pulls in the whole route-schema graph, which several mocked
// suites cannot absorb.
-const ANTIGRAVITY_MODEL_ID = /^[A-Za-z0-9][A-Za-z0-9._:/-]*$/;
-const ANTIGRAVITY_MODEL_LINE = /^([A-Za-z0-9][A-Za-z0-9._:/-]*)(?:\t.*)?$/;
+const MODEL_ID_CHARS = '[A-Za-z0-9][A-Za-z0-9._:/-]*';
+const ANTIGRAVITY_MODEL_ID = new RegExp(`^${MODEL_ID_CHARS}$`);
+const ANTIGRAVITY_MODEL_LINE = new RegExp(`^(${MODEL_ID_CHARS})(?:\\t.*)?$`);
/**
* Is this a syntactically valid agy model id? The defense-in-depth check