From d4d529833ded522e03e92b00a34875824230fde5 Mon Sep 17 00:00:00 2001 From: Luis Pater Date: Fri, 5 Dec 2025 21:24:12 +0800 Subject: [PATCH] **refactor(antigravity): handle `anyOf` property, remove `exclusiveMinimum`, and comment unused prod URL** --- internal/runtime/executor/antigravity_executor.go | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/internal/runtime/executor/antigravity_executor.go b/internal/runtime/executor/antigravity_executor.go index f83ba789..ccd25e7d 100644 --- a/internal/runtime/executor/antigravity_executor.go +++ b/internal/runtime/executor/antigravity_executor.go @@ -525,6 +525,19 @@ func (e *AntigravityExecutor) buildRequest(ctx context.Context, auth *cliproxyau strJSON = util.DeleteKey(strJSON, "minItems") strJSON = util.DeleteKey(strJSON, "minLength") strJSON = util.DeleteKey(strJSON, "maxLength") + strJSON = util.DeleteKey(strJSON, "exclusiveMinimum") + + paths = make([]string, 0) + util.Walk(gjson.Parse(strJSON), "", "anyOf", &paths) + for _, p := range paths { + anyOf := gjson.Get(strJSON, p) + if anyOf.IsArray() { + anyOfItems := anyOf.Array() + if len(anyOfItems) > 0 { + strJSON, _ = sjson.SetRaw(strJSON, p[:len(p)-len(".anyOf")], anyOfItems[0].Raw) + } + } + } payload = []byte(strJSON) } @@ -665,7 +678,7 @@ func antigravityBaseURLFallbackOrder(auth *cliproxyauth.Auth) []string { return []string{ antigravityBaseURLDaily, antigravityBaseURLAutopush, - antigravityBaseURLProd, + // antigravityBaseURLProd, } }