From 57e8c4689ea8cf0ecb11cc3fcd5ddc2aeddb1a3c Mon Sep 17 00:00:00 2001 From: jtaroreh Date: Sun, 22 Nov 2026 17:37:10 -0800 Subject: [PATCH 1/3] Feat(models): normalize Gemini 4 and effort-suffixed models across cloud swarm and runtime --- skills/cloud-swarm/scripts/cloud_dispatch.py | 55 +++++++-- skills/cloud-swarm/scripts/cloud_worker.py | 47 ++++++-- .../setup-agystack/scripts/setup_runtime.py | 104 ++++++++++++++++++ tests/test_cloud_preflight_and_worker.py | 22 ++++ tests/test_cloud_worker_vertex_partner.py | 9 ++ tests/test_setup_runtime.py | 84 ++++++++++++++ 6 files changed, 304 insertions(+), 17 deletions(-) diff --git a/skills/cloud-swarm/scripts/cloud_dispatch.py b/skills/cloud-swarm/scripts/cloud_dispatch.py index 818e575..39d04ee 100644 --- a/skills/cloud-swarm/scripts/cloud_dispatch.py +++ b/skills/cloud-swarm/scripts/cloud_dispatch.py @@ -1054,6 +1054,17 @@ def run_preflight( raise RuntimeError(f"Gemini API ping failed: {exc}") from exc +def _strip_effort_suffix(model_str: str) -> str: + if not model_str: + return "" + cleaned = model_str.strip() + norm = cleaned.lower().replace("_", "-") + for suffix in ("-xhigh", "-high", "-medium", "-low"): + if norm.endswith(suffix) and len(cleaned) > len(suffix): + return cleaned[: -len(suffix)] + return cleaned + + def resolve_swarm_model( cli_model: Optional[str] = None, runtime_model: Optional[str] = None, @@ -1067,6 +1078,17 @@ def resolve_swarm_model( or os.environ.get("GEMINI_MODEL", "").strip() or None ) + if parent: + parent = _strip_effort_suffix(parent) + if parent.lower().replace("_", "-") in ( + "inherit", + "auto", + "inherit-parent", + "orchestrator", + "gemini-pro-orchestrator-g1-pro", + "gemini-pro-orchestrator-neon", + ): + parent = None if cli_model and cli_model.strip(): chosen = cli_model.strip() @@ -1110,13 +1132,20 @@ def resolve_swarm_model( default_model = parent or "gemini-3.8-flash" tier_map = { + "neon": "gemini-4-neon", + "gemini-neon": "gemini-4-neon", + "gemini-4-neon": "gemini-4-neon", + "argon": "gemini-4-argon", + "gemini-argon": "gemini-4-argon", + "gemini-4-argon": "gemini-4-argon", + "gemini-4": "gemini-4-argon", + "hydrogen": "gemini-4-hydrogen", + "gemini-hydrogen": "gemini-4-hydrogen", + "gemini-4-hydrogen": "gemini-4-hydrogen", "flash": "gemini-3.8-flash", "pro": "gemini-3.1-pro", "flash_lite": "gemini-3.1-flash-lite", "flash-lite": "gemini-3.1-flash-lite", - "argon": "gemini-4-argon", - "gemini-argon": "gemini-4-argon", - "gemini-4": "gemini-4-argon", "gemini": "gemini-3.8-flash", "deepseek": "deepseek-v4.1-flash", "deepseek-flash": "deepseek-v4.1-flash", @@ -1128,13 +1157,17 @@ def resolve_swarm_model( "auto": default_model, "inherit-parent": default_model, "inherit_parent": default_model, + "orchestrator": default_model, + "gemini-pro-orchestrator-g1-pro": default_model, + "gemini-pro-orchestrator-neon": default_model, } - norm_chosen = chosen.lower().replace("_", "-") - if chosen.lower() in tier_map: - return tier_map[chosen.lower()] - if norm_chosen in tier_map: - return tier_map[norm_chosen] - return chosen + stripped = _strip_effort_suffix(chosen) + norm_stripped = stripped.lower().replace("_", "-") + if stripped.lower() in tier_map: + return tier_map[stripped.lower()] + if norm_stripped in tier_map: + return tier_map[norm_stripped] + return stripped try: @@ -1306,7 +1339,9 @@ def main() -> None: Vertex AI Model Garden Tiers for Cloud Swarms: ----------------------------------------------------------------------------------------- Tier 1: Native MaaS (Instant Serverless, Zero Forms) - - gemini-4-argon Global Vertex AI endpoint, deep reasoning + - gemini-4-neon Global Vertex AI endpoint, frontier reasoning & coding + - gemini-4-argon Global Vertex AI endpoint, deep reasoning & systems engineering + - gemini-4-hydrogen Global Vertex AI endpoint, high-speed execution & verification - gemini-3.8-flash Global Vertex AI endpoint, balanced speed - gemini-3.1-pro Global Vertex AI endpoint, high capability - deepseek-v4.1-flash Global Vertex AI endpoint (deepseek-ai namespace) diff --git a/skills/cloud-swarm/scripts/cloud_worker.py b/skills/cloud-swarm/scripts/cloud_worker.py index 7394de0..5f8cd9d 100644 --- a/skills/cloud-swarm/scripts/cloud_worker.py +++ b/skills/cloud-swarm/scripts/cloud_worker.py @@ -703,6 +703,17 @@ def parse_porcelain_status(stdout: str) -> List[str]: is_partner_model as is_partner_model, measure_partner_client_startup as measure_partner_client_startup, ) +def _strip_effort_suffix(model_str: str) -> str: + if not model_str: + return "" + cleaned = model_str.strip() + norm = cleaned.lower().replace("_", "-") + for suffix in ("-xhigh", "-high", "-medium", "-low"): + if norm.endswith(suffix) and len(cleaned) > len(suffix): + return cleaned[: -len(suffix)] + return cleaned + + def resolve_worker_model(raw_model: Optional[str] = None, task_item: Any = None) -> str: """ Resolves the worker model for a task, respecting per-task overrides in task_item, @@ -722,20 +733,38 @@ def resolve_worker_model(raw_model: Optional[str] = None, task_item: Any = None) else: candidate = os.environ.get("MODEL_OVERRIDE", "").strip() - default_model = ( + raw_default = ( os.environ.get("DEFAULT_SWARM_MODEL", "").strip() or os.environ.get("DEFAULT_MODEL", "").strip() - or "gemini-3.8-flash" ) + stripped_default = _strip_effort_suffix(raw_default) + if not stripped_default or stripped_default.lower().replace("_", "-") in ( + "inherit", + "auto", + "inherit-parent", + "orchestrator", + "gemini-pro-orchestrator-g1-pro", + "gemini-pro-orchestrator-neon", + ): + default_model = "gemini-3.8-flash" + else: + default_model = stripped_default alias_map = { + "neon": "gemini-4-neon", + "gemini-neon": "gemini-4-neon", + "gemini-4-neon": "gemini-4-neon", + "argon": "gemini-4-argon", + "gemini-argon": "gemini-4-argon", + "gemini-4-argon": "gemini-4-argon", + "gemini-4": "gemini-4-argon", + "hydrogen": "gemini-4-hydrogen", + "gemini-hydrogen": "gemini-4-hydrogen", + "gemini-4-hydrogen": "gemini-4-hydrogen", "flash": "gemini-3.8-flash", "pro": "gemini-3.1-pro", "flash_lite": "gemini-3.1-flash-lite", "flash-lite": "gemini-3.1-flash-lite", - "argon": "gemini-4-argon", - "gemini-argon": "gemini-4-argon", - "gemini-4": "gemini-4-argon", "gemini": "gemini-3.8-flash", "deepseek": "publishers/deepseek-ai/models/deepseek-v4.1-flash-maas", "deepseek-flash": "publishers/deepseek-ai/models/deepseek-v4.1-flash-maas", @@ -748,17 +777,21 @@ def resolve_worker_model(raw_model: Optional[str] = None, task_item: Any = None) "inherit": default_model, "inherit-parent": default_model, "inherit_parent": default_model, + "orchestrator": default_model, + "gemini-pro-orchestrator-g1-pro": default_model, + "gemini-pro-orchestrator-neon": default_model, "": default_model, } alias_map.update(PARTNER_MODEL_ALIASES) - norm = candidate.lower() + stripped_candidate = _strip_effort_suffix(candidate) + norm = stripped_candidate.lower() if norm in alias_map: return alias_map[norm] norm_hyphen = norm.replace("_", "-") if norm_hyphen in alias_map: return alias_map[norm_hyphen] - return candidate + return stripped_candidate def execute_task( diff --git a/skills/setup-agystack/scripts/setup_runtime.py b/skills/setup-agystack/scripts/setup_runtime.py index f6c7629..0ec56ac 100644 --- a/skills/setup-agystack/scripts/setup_runtime.py +++ b/skills/setup-agystack/scripts/setup_runtime.py @@ -102,6 +102,108 @@ def _parse_version(stdout): ) +def _strip_effort_suffix(model_str: str): + cleaned = (model_str or "").strip() + norm = cleaned.lower().replace("_", "-") + for level in ("xhigh", "high", "medium", "low"): + suffix = f"-{level}" + if norm.endswith(suffix) and len(norm) > len(suffix): + return norm[: -len(suffix)], level + return norm, None + + +_CANONICAL_BASE_MODELS = { + "neon": "gemini-4-neon", + "gemini-neon": "gemini-4-neon", + "gemini-4-neon": "gemini-4-neon", + "argon": "gemini-4-argon", + "gemini-argon": "gemini-4-argon", + "gemini-4-argon": "gemini-4-argon", + "gemini-4": "gemini-4-argon", + "hydrogen": "gemini-4-hydrogen", + "gemini-hydrogen": "gemini-4-hydrogen", + "gemini-4-hydrogen": "gemini-4-hydrogen", + "flash": "gemini-3.8-flash", + "gemini": "gemini-3.8-flash", + "gemini-3.8-flash": "gemini-3.8-flash", + "pro": "gemini-3.1-pro", + "gemini-3.1-pro": "gemini-3.1-pro", + "flash-lite": "gemini-3.1-flash-lite", + "gemini-3.1-flash-lite": "gemini-3.1-flash-lite", + "deepseek": "deepseek-v4.1-flash", + "deepseek-flash": "deepseek-v4.1-flash", + "deepseek-4.1": "deepseek-v4.1-flash", + "deepseek-v4.1": "deepseek-v4.1-flash", + "deepseek-4.1-flash": "deepseek-v4.1-flash", + "deepseek-v4.1-flash": "deepseek-v4.1-flash", + "deepseek-v4.1-flash-maas": "deepseek-v4.1-flash", + "inherit": "inherit", + "auto": "inherit", + "inherit-parent": "inherit", + "orchestrator": "inherit", + "gemini-pro-orchestrator-g1-pro": "inherit", + "gemini-pro-orchestrator-neon": "inherit", + "": "inherit", +} + + +def normalize_model_for_surface( + raw_model: str, + surface: str = "invoke_subagent", + default_model: str = "gemini-3.8-flash", +) -> dict: + cleaned = (raw_model or "").strip() + norm_raw = cleaned.lower().replace("_", "-") + base_token, thought_level = _strip_effort_suffix(cleaned) + base_model = _CANONICAL_BASE_MODELS.get(base_token, base_token) + + if surface == "invoke_subagent": + if base_model in ("gemini-4-neon", "gemini-3.1-pro") or base_token.startswith( + ("claude-opus", "claude-sonnet", "claude-3") + ): + resolved = "pro" + elif base_model in ("gemini-4-hydrogen", "gemini-3.8-flash", "deepseek-v4.1-flash"): + resolved = "flash" + elif base_model == "gemini-3.1-flash-lite": + resolved = "flash_lite" + else: + resolved = "inherit" + elif surface == "cloud_swarm": + def_base_token, _ = _strip_effort_suffix(default_model or "") + def_canonical = _CANONICAL_BASE_MODELS.get(def_base_token, def_base_token) + normalized_default_model = ( + "gemini-3.8-flash" if (not def_canonical or def_canonical == "inherit") else def_canonical + ) + resolved = normalized_default_model if base_model == "inherit" else base_model + elif surface == "native_swarm": + if thought_level is not None or norm_raw.startswith("gemini-pro-orchestrator-"): + resolved = norm_raw + elif base_model == "gemini-4-neon": + resolved = "gemini-4-neon-high" + elif base_model == "gemini-4-argon": + resolved = "gemini-4-argon-high" + elif base_model == "gemini-4-hydrogen": + resolved = "gemini-4-hydrogen-medium" + elif base_model == "gemini-3.8-flash": + resolved = "gemini-3.8-flash-high" + elif base_model == "gemini-3.1-pro": + resolved = "gemini-4-neon-high" + elif base_token == "orchestrator": + resolved = "gemini-pro-orchestrator-g1-pro" + else: + resolved = base_model + else: + resolved = base_model + + return { + "raw": raw_model, + "base_model": base_model, + "thought_level": thought_level, + "surface": surface, + "resolved": resolved, + } + + def check_model_garden(project_id=None, region="us-central1", run_cmd_fn=None, import_fn=None): if run_cmd_fn is None: run_cmd_fn = run_cmd @@ -116,7 +218,9 @@ def check_model_garden(project_id=None, region="us-central1", run_cmd_fn=None, i "region": region, "anthropic_installed": False, "serverless_models": [ + "gemini-4-neon", "gemini-4-argon", + "gemini-4-hydrogen", "gemini-3.8-flash", "gemini-3.1-pro", "deepseek-v4.1-flash-maas", diff --git a/tests/test_cloud_preflight_and_worker.py b/tests/test_cloud_preflight_and_worker.py index 3f3ef0b..20dcfc2 100644 --- a/tests/test_cloud_preflight_and_worker.py +++ b/tests/test_cloud_preflight_and_worker.py @@ -810,7 +810,9 @@ def test_cloud_dispatch_list_models_flag(self): self.assertIn("Tier 3: Dedicated GPU Cluster Endpoints", out) self.assertIn("glm-5-3-flash", out) self.assertIn("llama-3.3-70b", out) + self.assertIn("gemini-4-neon", out) self.assertIn("gemini-4-argon", out) + self.assertIn("gemini-4-hydrogen", out) self.assertIn("deepseek-v4.1-flash", out) @patch("urllib.request.urlopen") @@ -855,10 +857,30 @@ def test_resolve_swarm_model_tier_mappings(self): self.assertEqual(resolve_swarm_model(cli_model="inherit_parent"), "gemini-3.8-flash") self.assertEqual(resolve_swarm_model(cli_model="argon"), "gemini-4-argon") self.assertEqual(resolve_swarm_model(cli_model="gemini-argon"), "gemini-4-argon") + self.assertEqual(resolve_swarm_model(cli_model="gemini-4-argon-high"), "gemini-4-argon") + self.assertEqual(resolve_swarm_model(cli_model="neon"), "gemini-4-neon") + self.assertEqual(resolve_swarm_model(cli_model="gemini-4-neon"), "gemini-4-neon") + self.assertEqual(resolve_swarm_model(cli_model="gemini-4-neon-xhigh"), "gemini-4-neon") + self.assertEqual(resolve_swarm_model(cli_model="hydrogen"), "gemini-4-hydrogen") + self.assertEqual(resolve_swarm_model(cli_model="gemini-4-hydrogen-medium"), "gemini-4-hydrogen") + self.assertEqual(resolve_swarm_model(cli_model="gemini-3.8-flash-high"), "gemini-3.8-flash") + self.assertEqual(resolve_swarm_model(cli_model="orchestrator"), "gemini-3.8-flash") + self.assertEqual(resolve_swarm_model(cli_model="gemini-pro-orchestrator-g1-pro"), "gemini-3.8-flash") + self.assertEqual(resolve_swarm_model(cli_model="gemini-pro-orchestrator-neon"), "gemini-3.8-flash") self.assertEqual(resolve_swarm_model(cli_model="gemini"), "gemini-3.8-flash") self.assertEqual(resolve_swarm_model(cli_model="deepseek"), "deepseek-v4.1-flash") self.assertEqual(resolve_swarm_model(cli_model="deepseek-flash"), "deepseek-v4.1-flash") self.assertEqual(cloud_worker.resolve_worker_model("argon"), "gemini-4-argon") + self.assertEqual(cloud_worker.resolve_worker_model("gemini-4-argon-high"), "gemini-4-argon") + self.assertEqual(cloud_worker.resolve_worker_model("neon"), "gemini-4-neon") + self.assertEqual(cloud_worker.resolve_worker_model("gemini-4-neon"), "gemini-4-neon") + self.assertEqual(cloud_worker.resolve_worker_model("gemini-4-neon-xhigh"), "gemini-4-neon") + self.assertEqual(cloud_worker.resolve_worker_model("hydrogen"), "gemini-4-hydrogen") + self.assertEqual(cloud_worker.resolve_worker_model("gemini-4-hydrogen-medium"), "gemini-4-hydrogen") + self.assertEqual(cloud_worker.resolve_worker_model("gemini-3.8-flash-high"), "gemini-3.8-flash") + self.assertEqual(cloud_worker.resolve_worker_model("orchestrator"), "gemini-3.8-flash") + self.assertEqual(cloud_worker.resolve_worker_model("gemini-pro-orchestrator-g1-pro"), "gemini-3.8-flash") + self.assertEqual(cloud_worker.resolve_worker_model("gemini-pro-orchestrator-neon"), "gemini-3.8-flash") self.assertEqual(cloud_worker.resolve_worker_model("deepseek"), "publishers/deepseek-ai/models/deepseek-v4.1-flash-maas") self.assertEqual(cloud_worker.resolve_worker_model("deepseek-flash"), "publishers/deepseek-ai/models/deepseek-v4.1-flash-maas") diff --git a/tests/test_cloud_worker_vertex_partner.py b/tests/test_cloud_worker_vertex_partner.py index afe6cd4..5803326 100644 --- a/tests/test_cloud_worker_vertex_partner.py +++ b/tests/test_cloud_worker_vertex_partner.py @@ -93,12 +93,19 @@ def test_gemini_models_are_not_partner_models(self): "gemini-3.8-flash", "gemini-3.1-pro", "gemini-3.1-flash-lite", + "gemini-4-neon", "gemini-4-argon", + "gemini-4-hydrogen", + "neon", "argon", + "hydrogen", + "gemini-4-neon-xhigh", + "gemini-4-hydrogen-medium", "flash", "pro", ] for model in gemini_models: + self.assertFalse(is_partner_model(model)) resolved = resolve_worker_model(model) self.assertFalse(is_partner_model(resolved)) @@ -682,7 +689,9 @@ def test_successful_probe(self): self.assertTrue(result["model_garden_verified"]) self.assertEqual(result["project_id"], "test-project") self.assertEqual(result["region"], "us-central1") + self.assertIn("gemini-4-neon", result["serverless_models"]) self.assertIn("gemini-4-argon", result["serverless_models"]) + self.assertIn("gemini-4-hydrogen", result["serverless_models"]) self.assertIn("deepseek-v4.1-flash-maas", result["serverless_models"]) self.assertIn("claude-3-5-sonnet-v2@20241022", result["partner_models"]) self.assertIn("claude-3-opus@20240229", result["partner_models"]) diff --git a/tests/test_setup_runtime.py b/tests/test_setup_runtime.py index c5f0fa1..5746c3b 100644 --- a/tests/test_setup_runtime.py +++ b/tests/test_setup_runtime.py @@ -887,6 +887,90 @@ def test_run_provisioning_full_flow(self, mock_run_cmd, mock_write_cfg): self.assertEqual(mock_write_cfg.call_args[1].get("service_account"), "custom-sa@developer.gserviceaccount.com") self.assertEqual(summary.get("service_account"), "custom-sa@developer.gserviceaccount.com") + def test_normalize_model_for_surface(self): + self.assertEqual( + setup_runtime.normalize_model_for_surface("gemini-4-neon-xhigh", "invoke_subagent"), + { + "raw": "gemini-4-neon-xhigh", + "base_model": "gemini-4-neon", + "thought_level": "xhigh", + "surface": "invoke_subagent", + "resolved": "pro", + }, + ) + self.assertEqual( + setup_runtime.normalize_model_for_surface("gemini-4-argon-high", "invoke_subagent")["resolved"], + "inherit", + ) + self.assertEqual( + setup_runtime.normalize_model_for_surface("gemini-4-hydrogen-medium", "invoke_subagent")["resolved"], + "flash", + ) + self.assertEqual( + setup_runtime.normalize_model_for_surface("gemini-3.8-flash-high", "invoke_subagent")["resolved"], + "flash", + ) + self.assertEqual( + setup_runtime.normalize_model_for_surface("flash_lite", "invoke_subagent")["resolved"], + "flash_lite", + ) + self.assertEqual( + setup_runtime.normalize_model_for_surface("orchestrator", "invoke_subagent")["resolved"], + "inherit", + ) + + self.assertEqual( + setup_runtime.normalize_model_for_surface("gemini-4-neon-xhigh", "cloud_swarm")["resolved"], + "gemini-4-neon", + ) + self.assertEqual( + setup_runtime.normalize_model_for_surface("gemini-4-argon-high", "cloud_swarm")["resolved"], + "gemini-4-argon", + ) + self.assertEqual( + setup_runtime.normalize_model_for_surface("gemini-4-hydrogen-medium", "cloud_swarm")["resolved"], + "gemini-4-hydrogen", + ) + self.assertEqual( + setup_runtime.normalize_model_for_surface("orchestrator", "cloud_swarm")["resolved"], + "gemini-3.8-flash", + ) + self.assertEqual( + setup_runtime.normalize_model_for_surface( + "inherit", "cloud_swarm", default_model="gemini-4-neon-high" + )["resolved"], + "gemini-4-neon", + ) + + self.assertEqual( + setup_runtime.normalize_model_for_surface("gemini-4-neon-xhigh", "native_swarm")["resolved"], + "gemini-4-neon-xhigh", + ) + self.assertEqual( + setup_runtime.normalize_model_for_surface("neon", "native_swarm")["resolved"], + "gemini-4-neon-high", + ) + self.assertEqual( + setup_runtime.normalize_model_for_surface("argon", "native_swarm")["resolved"], + "gemini-4-argon-high", + ) + self.assertEqual( + setup_runtime.normalize_model_for_surface("hydrogen", "native_swarm")["resolved"], + "gemini-4-hydrogen-medium", + ) + self.assertEqual( + setup_runtime.normalize_model_for_surface("flash", "native_swarm")["resolved"], + "gemini-3.8-flash-high", + ) + self.assertEqual( + setup_runtime.normalize_model_for_surface("orchestrator", "native_swarm")["resolved"], + "gemini-pro-orchestrator-g1-pro", + ) + self.assertEqual( + setup_runtime.normalize_model_for_surface("gemini-pro-orchestrator-neon", "native_swarm")["resolved"], + "gemini-pro-orchestrator-neon", + ) + if __name__ == "__main__": unittest.main() From 1fb1ea1d27e7b29364a48dd21aba85fdf4ce0da2 Mon Sep 17 00:00:00 2001 From: jtaroreh Date: Sun, 22 Nov 2026 17:38:16 -0800 Subject: [PATCH 2/3] Docs(skills): document Gemini 4 effort preset, boundary translation, and 3.8 Flash fallback --- agystack-models.md | 17 +++-- docs/guide/01-setup.md | 2 +- rules/AGENTS.md | 2 +- skills/architect/SKILL.md | 2 +- skills/cloud-swarm/SKILL.md | 2 +- skills/interrogate/SKILL.md | 2 +- .../references/antigravity-tools.md | 39 ++++++++++-- skills/setup-agystack/SKILL.md | 62 +++++++++++++++---- 8 files changed, 101 insertions(+), 27 deletions(-) diff --git a/agystack-models.md b/agystack-models.md index 02eecec..04e4df2 100644 --- a/agystack-models.md +++ b/agystack-models.md @@ -1,9 +1,16 @@ # agystack model configuration. One line per role. Delete a line to fall back to the skill default. -# Antigravity invoke_subagent model tiers: -# - inherit (Runs on the active parent chat session model, e.g. Gemini 3.8 Flash High) -# - pro (High-capability tier: deep reasoning, large refactors, complex design) -# - flash (Fast / balanced reasoning tier: exploration, reading, standard generation) -# - flash_lite (Lightweight tier: fast mechanical scans and lookups) +# +# Supported Model Identifiers: +# 1. Universal Tiers (Default, compatible with Gemini 3.8 Flash and any active parent session model): +# - inherit (Runs on the active parent chat session model, e.g. Gemini 3.8 Flash High or Gemini 4 Neon) +# - pro (High-capability tier: deep reasoning, large refactors, complex design) +# - flash (Fast / balanced reasoning tier: exploration, reading, standard generation) +# - flash_lite (Lightweight tier: fast mechanical scans and lookups) +# +# 2. Gemini 4 Effort-Balanced Identifiers (Automatically translated at each tool boundary): +# - gemini-4-neon-{low,medium,high,xhigh} (maps to 'pro' on invoke_subagent, 'gemini-4-neon' on /cloud-swarm, exact ID on native swarm) +# - gemini-4-argon-{low,medium,high} (maps to 'inherit' on invoke_subagent, 'gemini-4-argon' on /cloud-swarm, exact ID on native swarm) +# - gemini-4-hydrogen-{low,medium,high,xhigh} (maps to 'flash' on invoke_subagent, 'gemini-4-hydrogen' on /cloud-swarm, exact ID on native swarm) feature, refactoring: inherit bug-fix: inherit diff --git a/docs/guide/01-setup.md b/docs/guide/01-setup.md index 704f996..4cd9b7c 100644 --- a/docs/guide/01-setup.md +++ b/docs/guide/01-setup.md @@ -50,7 +50,7 @@ Run: /setup-agystack ``` -[`/setup-agystack`](../../skills/setup-agystack/SKILL.md) detects the models you have access to, shows you each role (code delegates, judgment, the review panels), and asks what you want. Answer the questions. It writes `~/.gemini/config/plugins/agystack/agystack-models.md`, a configuration file every agystack skill reads. +[`/setup-agystack`](../../skills/setup-agystack/SKILL.md) detects the models you have access to, shows you each role (code delegates, judgment, the review panels), and asks what you want. It offers both the **Universal / Gemini 3.8 Flash Compatible** default (`inherit`, `flash`, `pro`, ideal for Gemini 3.8 Flash users and following your active session model) and the **Gemini 4 Effort-Balanced** preset (`gemini-4-neon`, `gemini-4-argon`, `gemini-4-hydrogen` with `-low`, `-medium`, `-high`, `-xhigh` effort suffixes, which translate automatically across `invoke_subagent`, `/cloud-swarm`, and native `swarm`). Answer the questions. It writes `~/.gemini/config/plugins/agystack/agystack-models.md`, a configuration file every agystack skill reads. You only override what you care about. A role with no line in the rule keeps the skill's default. To restore a default later, delete that role's line, or just run `/setup-agystack` again. diff --git a/rules/AGENTS.md b/rules/AGENTS.md index 3f22cd1..1cd4294 100644 --- a/rules/AGENTS.md +++ b/rules/AGENTS.md @@ -32,7 +32,7 @@ Mirroring pstack in Cursor, enforce strict separation between coordination and c - **Autonomous & Hillclimb Playbooks (`Autonomous run`, `Hillclimb`, `Swarm`, `/goal`, `/loop`):** Unattended throughput invariant. Use `RequestFeedback: false`. Domain deliverables (`decision_trail.md`, `score.json`, `receipts/`) take precedence without interactive blocking. - **Read-Only Investigation Playbooks (`Investigation`, `How`, `Why`, `Runtime Forensics`):** Produces `investigation_report.md` with `RequestFeedback: false`. 6. **Cloud Swarm Model Selection & Zero-Friction Fallback:** - - **Prefer Tier 1 Serverless Models:** Default to frictionless serverless models that require zero console forms: `gemini-3.8-flash`, `gemini-4-argon`, or `deepseek-v4.1-flash` (MaaS). + - **Prefer Tier 1 Serverless Models:** Default to frictionless serverless models that require zero console forms: `gemini-4-neon`, `gemini-4-argon`, `gemini-4-hydrogen`, `gemini-3.8-flash`, or `deepseek-v4.1-flash` (MaaS). - **Gated Partner Gating Detection:** If a user requests an Anthropic partner model (`claude-3-opus`, `claude-3-5-sonnet`) that is not yet enabled in Vertex AI Model Garden, explain that Google enforces a one-time console form click-through that agents cannot accept programmatically, and immediately offer the Tier 1 zero-friction alternative. - **Open-Weights vs. MaaS Distinction:** Models like `GLM 5.3` or `Llama 3.3` on Model Garden are deployable open-weights requiring dedicated GPU endpoints (8x H100/B200 instances), not on-demand serverless APIs. Never attempt to dispatch Cloud Run tasks against deploy-only models without an active dedicated endpoint. diff --git a/skills/architect/SKILL.md b/skills/architect/SKILL.md index 86aa2f6..c591290 100644 --- a/skills/architect/SKILL.md +++ b/skills/architect/SKILL.md @@ -32,7 +32,7 @@ Skip Phase A only when the work is genuinely greenfield with no surrounding syst Run the **arena** skill with the design-sketch task and the Phase A grounding artifacts. Pass `references/runner-prompt.md` as each runner's prompt. Each candidate produces a design package shaped per `references/rationale-template.md`: the caller's usage written first, then the type sketch, function signatures, module map, and prose rationale derived from it. -Use your configured architect runners (defaults `pro`, `flash`, `inherit`). +Use your configured architect runners (defaults `pro`, `flash`, `inherit`). When `agystack-models.md` specifies Gemini 4 effort-suffixed entries (`gemini-4-neon-xhigh`, `gemini-4-argon-high`, `gemini-4-hydrogen-high`), translate them to the `invoke_subagent` enum (`pro`, `inherit`, `flash`), and if an account only has access to a single model tier (such as Gemini 3.8 Flash) or hits HTTP 429 `RESOURCE_EXHAUSTED` on `pro` or `flash`, fall back to `Model: "inherit"` so all panel slots complete. Design it twice. Require at least two structurally distinct candidates before synthesis, even when the first looks sufficient. This is the **exhaust-the-design-space** principle skill made concrete. Whole-shape alternatives, not point fixes inside one shape. diff --git a/skills/cloud-swarm/SKILL.md b/skills/cloud-swarm/SKILL.md index 9bbde11..3c38af3 100644 --- a/skills/cloud-swarm/SKILL.md +++ b/skills/cloud-swarm/SKILL.md @@ -37,7 +37,7 @@ Before launching cloud swarms, match the model to the project's Model Garden ena | Tier | Models | Endpoint Type | Friction | Setup Required | |---|---|---|---|---| -| **Tier 1: Native MaaS** | `gemini-4-argon`, `gemini-3.8-flash`, `deepseek-v4.1-flash` | Global Serverless | **Zero** | Instant via existing ADC / project IAM | +| **Tier 1: Native MaaS** | `gemini-4-neon`, `gemini-4-argon`, `gemini-4-hydrogen`, `gemini-3.8-flash`, `deepseek-v4.1-flash` | Global Serverless | **Zero** | Instant via existing ADC / project IAM | | **Tier 2: Gated Partner MaaS** | `claude-3-7-sonnet`, `claude-3-5-sonnet`, `claude-3-opus` | Regional Serverless | **Low / One-Time** | Console agreement click-through required | | **Tier 3: Dedicated GPU** | `glm-5-3-flash`, `llama-3.3-70b` | Dedicated Endpoint | **High** | Dedicated 8x H100/B200 GPU instance provisioning | diff --git a/skills/interrogate/SKILL.md b/skills/interrogate/SKILL.md index 1093ded..f3089de 100644 --- a/skills/interrogate/SKILL.md +++ b/skills/interrogate/SKILL.md @@ -36,7 +36,7 @@ Use the `interrogate reviewers` list from `~/.gemini/config/plugins/agystack/agy For each reviewer: - `TypeName`: `research` (or `self`) - `Role`: `Adversarial Reviewer ()` -- `Model`: configured tier (or `pro`, `flash`, `inherit`) +- `Model`: configured tier (or `pro`, `flash`, `inherit`). When `agystack-models.md` specifies Gemini 4 effort-suffixed entries (`gemini-4-neon-high`, `gemini-4-argon-high`, `gemini-4-hydrogen-medium`), translate them to the `invoke_subagent` enum (`pro`, `inherit`, `flash`). If an account only has access to a single model tier (such as Gemini 3.8 Flash) or hits HTTP 429 `RESOURCE_EXHAUSTED` on `pro` or `flash`, fall back to `Model: "inherit"` so all panel slots complete. - `Workspace`: `inherit` Fill `references/reviewer-prompt.md` with: diff --git a/skills/poteto-mode/references/antigravity-tools.md b/skills/poteto-mode/references/antigravity-tools.md index e259a7d..cf47077 100644 --- a/skills/poteto-mode/references/antigravity-tools.md +++ b/skills/poteto-mode/references/antigravity-tools.md @@ -189,19 +189,46 @@ Every playbook completion requires concrete proof on the real target surface bef ## Models -Antigravity subagents use native `invoke_subagent` model tiers. Model tiers (`inherit`, `pro`, `flash`, `flash_lite`) represent Gemini depth and compute budget tiers, not cross-family priors. +Antigravity subagents use native `invoke_subagent` model tiers (`inherit`, `pro`, `flash`, `flash_lite`), while `/cloud-swarm` and native `swarm` accept concrete model identifiers and effort suffixes. -- `inherit` (Inherits the active parent model, running your current session choice such as Gemini 3.8 Flash High with Antigravity 2.12.2 ADC support) +### Universal `invoke_subagent` Tiers + +- `inherit` (Inherits the active parent model, running your current session choice such as Gemini 3.8 Flash High or Gemini 4 Neon with Antigravity 2.12.2 ADC support) - `pro` (High-capability tier) - `flash` (Balanced fast tier: fast exploration, standard implementation, and reviews) - `flash_lite` (Lightweight tier: fast mechanical scans and lookups) +### Gemini 4 Family & Effort Suffixes + +`agystack-models.md` also supports Gemini 4 family identifiers with optional `-low`, `-medium`, `-high`, or `-xhigh` effort suffixes: +- `gemini-4-neon` (`gemini-4-neon-{low,medium,high,xhigh}`): Frontier reasoning and coding tier. +- `gemini-4-argon` (`gemini-4-argon-{low,medium,high}`): Deep reasoning and systems engineering tier. +- `gemini-4-hydrogen` (`gemini-4-hydrogen-{low,medium,high,xhigh}`): High-speed execution and verification tier. + +### Cross-Surface Boundary Translation + +Because each execution surface enforces its own schema, model identifiers configured in `agystack-models.md` translate deterministically at each tool boundary (`setup_runtime.normalize_model_for_surface`): + +| Configured `agystack-models.md` Entry | `invoke_subagent` (`Model` enum) | `/cloud-swarm` (Vertex AI / AI Studio) | Native `swarm` | +| --- | --- | --- | --- | +| `inherit` / `auto` | `inherit` | Active parent base model or `gemini-3.8-flash` | `inherit` | +| `pro` / `gemini-4-neon` / `gemini-4-neon-{low,medium,high,xhigh}` | `pro` | `gemini-3.1-pro` / `gemini-4-neon` (suffix stripped) | `gemini-4-neon-high` (or exact suffixed ID) | +| `gemini-4-argon` / `gemini-4-argon-{low,medium,high}` | `inherit` | `gemini-4-argon` (suffix stripped) | `gemini-4-argon-high` (or exact suffixed ID) | +| `flash` / `gemini-4-hydrogen` / `gemini-4-hydrogen-{low,medium,high,xhigh}` | `flash` | `gemini-3.8-flash` / `gemini-4-hydrogen` (suffix stripped) | `gemini-4-hydrogen-medium` (or exact suffixed ID) | +| `gemini-3.8-flash` / `gemini-3.8-flash-high` | `flash` | `gemini-3.8-flash` (suffix stripped) | `gemini-3.8-flash-high` | +| `flash_lite` / `gemini-3.1-flash-lite` | `flash_lite` | `gemini-3.1-flash-lite` | `gemini-3.1-flash-lite` | +| `orchestrator` / `gemini-pro-orchestrator-*` | `inherit` | Active parent base model or `gemini-3.8-flash` | `gemini-pro-orchestrator-g1-pro` (or exact ID) | + +### Quota / Single-Tier Fallback + +If an account only has access to a single model tier (such as Gemini 3.8 Flash) or encounters HTTP 429 `RESOURCE_EXHAUSTED` when spawning a `pro` or `flash` subagent via `invoke_subagent`, fall back immediately to `Model: "inherit"` so all subagents and multi-reviewer panel slots complete on the active session model without dropping coverage. + | Role / Intent | Antigravity Model Tier | | --- | --- | -| Primary reasoning / difficult tasks | `inherit` (runs on your active chat model, e.g. Gemini 3.8 Flash High) | -| Fast mechanical scanning / exploration | `flash` or `flash_lite` | -| Deep judgment, prose, architecture | `inherit` or `pro` | -| Multi-model review panels | Diverse combination across `inherit`, `flash`, and `pro` | +| Primary reasoning / difficult tasks | `inherit` (runs on your active chat model, e.g. Gemini 3.8 Flash High or Gemini 4 Neon) | +| Fast mechanical scanning / exploration | `flash` or `flash_lite` (or `gemini-4-hydrogen-medium`) | +| Deep judgment, prose, architecture | `inherit` or `pro` (or `gemini-4-neon-xhigh`, `gemini-4-argon-high`) | +| Multi-model review panels | Diverse combination across `inherit`, `flash`, and `pro` (or Neon, Argon, Hydrogen) | Read per-role overrides from `~/.gemini/config/plugins/agystack/agystack-models.md` (or `.agents/plugins/agystack/agystack-models.md`). If a line is missing, use the defaults above. diff --git a/skills/setup-agystack/SKILL.md b/skills/setup-agystack/SKILL.md index 89c90f0..7bea570 100644 --- a/skills/setup-agystack/SKILL.md +++ b/skills/setup-agystack/SKILL.md @@ -54,16 +54,21 @@ Do not leave the user to do the work. Complete the deployment end-to-end for the ### 2. Detect available models -Enumerate the model tiers you can pass to `invoke_subagent` (local) and `cloud_dispatch.py` (Cloud Run): +Enumerate the model tiers you can pass to `invoke_subagent` (local), `cloud_dispatch.py` (Cloud Run), and native `swarm`: **Local subagent tiers (`invoke_subagent`):** -- `pro`: High-capability tier (maximum reasoning budget for complex code, architecture, and hard tasks) -- `flash`: Balanced fast tier (fast execution for exploration and standard generation) +- `pro`: High-capability tier (maximum reasoning budget for complex code, architecture, and hard tasks; target for `gemini-4-neon-*`) +- `flash`: Balanced fast tier (fast execution for exploration and standard generation; target for `gemini-4-hydrogen-*` and `gemini-3.8-flash-*`) - `flash_lite`: Lightweight tier (minimal latency for quick lookups) -- `inherit` (or `auto`): Inherit parent chat model +- `inherit` (or `auto`): Inherit parent chat model (target for `gemini-4-argon-*` and universal parent inheritance) + +**Gemini 4 Effort-Balanced Identifiers (Cross-Surface Compatible):** +- `gemini-4-neon-{low,medium,high,xhigh}`: Frontier reasoning & coding (translates to `pro` on `invoke_subagent`, `gemini-4-neon` on `/cloud-swarm`, exact ID on native `swarm`) +- `gemini-4-argon-{low,medium,high}`: Deep reasoning & systems engineering (translates to `inherit` on `invoke_subagent`, `gemini-4-argon` on `/cloud-swarm`, exact ID on native `swarm`) +- `gemini-4-hydrogen-{low,medium,high,xhigh}`: High-speed execution & verification (translates to `flash` on `invoke_subagent`, `gemini-4-hydrogen` on `/cloud-swarm`, exact ID on native `swarm`) **Cloud Run swarm model tiers (`cloud_dispatch.py`):** -- **Tier 1 (Zero-Friction MaaS):** `gemini-4-argon`, `gemini-3.8-flash`, `deepseek-v4.1-flash` (Instant on global Vertex endpoint, zero forms). +- **Tier 1 (Zero-Friction MaaS):** `gemini-4-neon`, `gemini-4-argon`, `gemini-4-hydrogen`, `gemini-3.8-flash`, `deepseek-v4.1-flash` (Instant on global Vertex endpoint, zero forms). - **Tier 2 (Gated Partner MaaS):** `claude-3-7-sonnet`, `claude-3-5-sonnet`, `claude-3-opus` (Requires one-time Console agreement). - **Tier 3 (Dedicated GPU Endpoint):** Open-weights models like `glm-5-3-flash` requiring dedicated 8x H100/B200 GPU instances. @@ -73,21 +78,34 @@ If `~/.gemini/config/plugins/agystack/agystack-models.md` exists, read its curre ### 4. Map and confirm +Present two presets to the user (or allow per-role customization): +- **Preset 1: Universal / Gemini 3.8 Flash Compatible (Default).** Uses universal tiers (`inherit`, `flash`, and `pro`) so sessions running Gemini 3.8 Flash or any active parent model work out of the box without hardcoded model assumptions. +- **Preset 2: Gemini 4 Effort-Balanced (Neon / Argon / Hydrogen).** Uses Gemini 4 effort-suffixed identifiers (`gemini-4-neon-xhigh`, `gemini-4-neon-high`, `gemini-4-argon-high`, and `gemini-4-hydrogen-medium`). Boundary translation automatically maps these to `pro`, `inherit`, and `flash` for `invoke_subagent`, strips effort suffixes to base Vertex AI model IDs (`gemini-4-neon`, `gemini-4-argon`, `gemini-4-hydrogen`) for `/cloud-swarm`, and passes exact effort-suffixed IDs to native `swarm`. + Show every role with its model tier and confirm: - Single roles: `feature, refactoring`, `bug-fix`, `perf-issue`, `hillclimb`, `judgment and prose`, `hardest tasks`, `how explorer`, `how explainer`, `why investigators`, `why synthesizer`, `reflect tooling`, `reflect judgment, divergent, synthesizer`, `swarm workers` - Panel roles: `arena runners`, `arena cross-judge pool`, `architect runners`, `interrogate reviewers` ### 5. Write the model rule -Write to `.agents/plugins/agystack/agystack-models.md` if installed workspace-locally, otherwise `~/.gemini/config/plugins/agystack/agystack-models.md`: +Write to `.agents/plugins/agystack/agystack-models.md` if installed workspace-locally, otherwise `~/.gemini/config/plugins/agystack/agystack-models.md`. + +**Preset 1: Universal / Gemini 3.8 Flash Compatible (Default):** ``` # agystack model configuration. One line per role. Delete a line to fall back to the skill default. -# Antigravity invoke_subagent model tiers: -# - inherit (Runs on the active parent chat session model, e.g. Gemini 3.8 Flash High) -# - pro (High-capability tier: deep reasoning, large refactors, complex design) -# - flash (Fast / balanced reasoning tier: exploration, reading, standard generation) -# - flash_lite (Lightweight tier: fast mechanical scans and lookups) +# +# Supported Model Identifiers: +# 1. Universal Tiers (Default, compatible with Gemini 3.8 Flash and any active parent session model): +# - inherit (Runs on the active parent chat session model, e.g. Gemini 3.8 Flash High or Gemini 4 Neon) +# - pro (High-capability tier: deep reasoning, large refactors, complex design) +# - flash (Fast / balanced reasoning tier: exploration, reading, standard generation) +# - flash_lite (Lightweight tier: fast mechanical scans and lookups) +# +# 2. Gemini 4 Effort-Balanced Identifiers (Automatically translated at each tool boundary): +# - gemini-4-neon-{low,medium,high,xhigh} (maps to 'pro' on invoke_subagent, 'gemini-4-neon' on /cloud-swarm, exact ID on native swarm) +# - gemini-4-argon-{low,medium,high} (maps to 'inherit' on invoke_subagent, 'gemini-4-argon' on /cloud-swarm, exact ID on native swarm) +# - gemini-4-hydrogen-{low,medium,high,xhigh} (maps to 'flash' on invoke_subagent, 'gemini-4-hydrogen' on /cloud-swarm, exact ID on native swarm) feature, refactoring: inherit bug-fix: inherit @@ -108,6 +126,28 @@ architect runners: inherit, flash, pro interrogate reviewers: inherit, flash, pro ``` +**Preset 2: Gemini 4 Effort-Balanced (Neon / Argon / Hydrogen):** + +``` +feature, refactoring: gemini-4-neon-high +bug-fix: gemini-4-neon-high +perf-issue: gemini-4-argon-high +hillclimb: gemini-4-argon-high +judgment and prose: gemini-4-neon-high +hardest tasks: gemini-4-neon-xhigh +how explorer: gemini-4-hydrogen-medium +how explainer: gemini-4-neon-high +why investigators: gemini-4-hydrogen-medium +why synthesizer: gemini-4-argon-high +reflect tooling: gemini-4-hydrogen-medium +reflect judgment, divergent, synthesizer: gemini-4-neon-high +arena runners: gemini-4-neon-high, gemini-4-argon-high, gemini-4-hydrogen-high +arena cross-judge pool: gemini-4-neon-high, gemini-4-argon-high, gemini-4-hydrogen-high +swarm workers: gemini-4-hydrogen-medium +architect runners: gemini-4-neon-xhigh, gemini-4-argon-high, gemini-4-hydrogen-high +interrogate reviewers: gemini-4-neon-high, gemini-4-argon-high, gemini-4-hydrogen-medium +``` + ### 6. Confirm Confirm that the model rule and runtime settings are active for new sessions. From cbfff885b74d0cbd9d99fdcf039a0ca0001972a0 Mon Sep 17 00:00:00 2001 From: jtaroreh Date: Sun, 22 Nov 2026 17:54:04 -0800 Subject: [PATCH 3/3] Docs(setup-agystack): move preset summary to Step 3 to preserve Step 4 role key invariant --- skills/setup-agystack/SKILL.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/skills/setup-agystack/SKILL.md b/skills/setup-agystack/SKILL.md index 7bea570..708d88e 100644 --- a/skills/setup-agystack/SKILL.md +++ b/skills/setup-agystack/SKILL.md @@ -76,12 +76,12 @@ Enumerate the model tiers you can pass to `invoke_subagent` (local), `cloud_disp If `~/.gemini/config/plugins/agystack/agystack-models.md` exists, read its current role assignments. Otherwise start from skill defaults. -### 4. Map and confirm - Present two presets to the user (or allow per-role customization): - **Preset 1: Universal / Gemini 3.8 Flash Compatible (Default).** Uses universal tiers (`inherit`, `flash`, and `pro`) so sessions running Gemini 3.8 Flash or any active parent model work out of the box without hardcoded model assumptions. - **Preset 2: Gemini 4 Effort-Balanced (Neon / Argon / Hydrogen).** Uses Gemini 4 effort-suffixed identifiers (`gemini-4-neon-xhigh`, `gemini-4-neon-high`, `gemini-4-argon-high`, and `gemini-4-hydrogen-medium`). Boundary translation automatically maps these to `pro`, `inherit`, and `flash` for `invoke_subagent`, strips effort suffixes to base Vertex AI model IDs (`gemini-4-neon`, `gemini-4-argon`, `gemini-4-hydrogen`) for `/cloud-swarm`, and passes exact effort-suffixed IDs to native `swarm`. +### 4. Map and confirm + Show every role with its model tier and confirm: - Single roles: `feature, refactoring`, `bug-fix`, `perf-issue`, `hillclimb`, `judgment and prose`, `hardest tasks`, `how explorer`, `how explainer`, `why investigators`, `why synthesizer`, `reflect tooling`, `reflect judgment, divergent, synthesizer`, `swarm workers` - Panel roles: `arena runners`, `arena cross-judge pool`, `architect runners`, `interrogate reviewers`