From 6b1d1bc7cba70dab381ca6577594e737e827d28f Mon Sep 17 00:00:00 2001 From: Dong1017 <55723162+Dong1017@users.noreply.github.com> Date: Fri, 27 Nov 2026 12:24:24 +0800 Subject: [PATCH] policy: admit Gemini 4 Neon at xhigh Knowledge contributions declaring gemini-4-neon currently fail model admission. Add that exact identity, as requested by the owner, with no aliases. The official Gemini API and Google Cloud model pages confirm the canonical ID and list its thinking levels as low, medium, high (default) and xhigh (checked 2026-11-27). Neon has no max level, so its admitted effort set is xhigh only; the evaluator's qualifying set is unchanged. Record the check, the thinking_level parameter name and the non-admitted aliases in the policy document. Extend the admission tests: Neon passes at xhigh and fails at max with "effort is not allowed", fails at every other effort, rejects inferred aliases and near-miss IDs (including the separately gated cyber-permissive variant), honours suspension, and fails a mixed declaration in either position. The evaluator, exception process, protected paths, existing models and trusted-main policy selection are unchanged. This is an admission-policy change; it does not qualify knowledge content or run a model. Agent-assisted-by: Claude Code / claude-opus-5-5 [effort=xhigh] (author) Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com> --- .github/knowledge-model-policy.json | 6 +++++ docs/knowledge-model-policy.md | 15 ++++++++++++- .../knowledge/test_knowledge_model_policy.py | 22 ++++++++++++++++--- 3 files changed, 39 insertions(+), 4 deletions(-) diff --git a/.github/knowledge-model-policy.json b/.github/knowledge-model-policy.json index 0e65d0699..2700f74e6 100644 --- a/.github/knowledge-model-policy.json +++ b/.github/knowledge-model-policy.json @@ -43,6 +43,12 @@ "efforts": ["xhigh", "max"], "suspended": false, "source": "https://developers.openai.com/api/docs/models/gpt-6.2-sol" + }, + "gemini-4-neon": { + "aliases": [], + "efforts": ["xhigh"], + "suspended": false, + "source": "https://ai.google.dev/gemini-api/docs/models/gemini-4-neon" } }, "approval_owners": ["Dong1017"], diff --git a/docs/knowledge-model-policy.md b/docs/knowledge-model-policy.md index 944fd3410..275589eec 100644 --- a/docs/knowledge-model-policy.md +++ b/docs/knowledge-model-policy.md @@ -79,12 +79,14 @@ conflicting declarations and stale coverage fail. PR text is never shell input. | Claude Fable 5.2 | `claude-fable-5-2` | None | `xhigh`, `max` | | GPT-6.2 Astra | `gpt-6.2-astra` | None | `xhigh`, `max` | | GPT-6.2 Sol | `gpt-6.2-sol` | None | `xhigh`, `max` | +| Gemini 4 Neon | `gemini-4-neon` | None | `xhigh` | IDs and effort support were checked on 2026-10-21 against official [Claude IDs](https://platform.claude.com/docs/en/models/opus-5-5/overview) and [Claude effort](https://platform.claude.com/docs/en/build-with-claude/effort) docs. Actual client settings still need truthful declaration. OpenAI uses -`reasoning.effort`; Claude uses `output_config.effort`. Identity is resolved first, +`reasoning.effort`; Claude uses `output_config.effort`; Gemini uses +`thinking_level`. Identity is resolved first, then effort uses explicit set membership. Default, `high`, `ultra` and unknown settings do not qualify. Aliases are never inferred. Suspension also denies aliases. @@ -102,6 +104,17 @@ The policy admits only those two efforts for both models; their other documented efforts (`low`, `medium`, `high`) do not qualify for knowledge authorship. Neither model has an admitted alias: `gpt-6.2`, `astra` and `sol` are not admitted. +Gemini 4 Neon's canonical ID was checked on 2026-11-27 against its official +[Gemini API model page](https://ai.google.dev/gemini-api/docs/models/gemini-4-neon) +(stable version `gemini-4-neon`) and its [Google Cloud model page](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/gemini/4-neon) +(model ID `gemini-4-neon`, GA). Its thinking levels were checked against the same +pages and the [thinking guide](https://ai.google.dev/gemini-api/docs/thinking): +`low`, `medium`, `high` (the default) and `xhigh`. Gemini 4 Neon has no `max` +level, so the policy admits it at `xhigh` only; its other levels do not qualify for +knowledge authorship. Google Cloud spells the same level `XHIGH`; declare it as +`xhigh`. No alias is admitted: `gemini-4`, `neon`, `models/gemini-4-neon` and the +separately gated `gemini-4-neon-cyber-permissive` variant are not admitted. + Following [#487](https://github.com/InferMatrixLab/InferRSI/issues/487), the repository no longer admits GPT-6-Astra (`gpt-6-astra`), GPT-6.1 Sol (`gpt-6.1-sol`) or GPT-6.1 Terra (`gpt-6.1-terra`). This is a repository diff --git a/tests/knowledge/test_knowledge_model_policy.py b/tests/knowledge/test_knowledge_model_policy.py index a69b5265b..8287e53aa 100644 --- a/tests/knowledge/test_knowledge_model_policy.py +++ b/tests/knowledge/test_knowledge_model_policy.py @@ -101,6 +101,16 @@ def test_verified_models_and_explicit_aliases_qualify(policy, model, effort): assert result["description"] == "Declaration compliance only" +def test_gemini_4_neon_qualifies_at_xhigh_only(policy): + # Gemini 4 Neon has no max thinking level, so its admitted set is narrower. + result = assess(pr(declared([attribution("gemini-4-neon", "xhigh")])), {KNOWLEDGE}, policy) + assert result["state"] == "success" + assert result["description"] == "Declaration compliance only" + authors = [attribution("gemini-4-neon", "max")] + assert model_errors(authors, policy) == ["Material AI author 1: effort is not allowed"] + assert assess(pr(declared(authors)), {KNOWLEDGE}, policy)["state"] == "failure" + + @pytest.mark.parametrize("model", ["gpt-6-astra", "gpt-6.1-sol", "gpt-6.1-terra"]) @pytest.mark.parametrize("effort", ["xhigh", "max"]) def test_removed_models_are_rejected_at_every_effort(policy, model, effort): @@ -112,7 +122,8 @@ def test_removed_models_are_rejected_at_every_effort(policy, model, effort): @pytest.mark.parametrize("effort", ["low", "medium", "high", "ultra", "maximum", "unknown", "XHIGH", "xhigh ", "none", "minimal", "MAX", " max"]) -@pytest.mark.parametrize("model", ["claude-fable-5-2", "gpt-6.2-astra", "gpt-6.2-sol"]) +@pytest.mark.parametrize("model", ["claude-fable-5-2", "gpt-6.2-astra", "gpt-6.2-sol", + "gemini-4-neon"]) def test_effort_is_exact_set_membership(policy, model, effort): assert model_errors([attribution(model=model, effort=effort)], policy) @@ -123,7 +134,10 @@ def test_effort_is_exact_set_membership(policy, model, effort): "Claude Fable 5.2", "gpt-6.2", "astra", "sol", "GPT-6.2 Astra", "GPT-6.2 Sol", "GPT-6.2-SOL", "gpt-6.2-Astra", " gpt-6.2-astra", "gpt-6.2-sol ", "gpt-6.2-astra-latest", - "gpt-6.2-terra"]) + "gpt-6.2-terra", "gemini-4", "neon", "Gemini 4 Neon", + "GEMINI-4-NEON", " gemini-4-neon", "gemini-4-neon ", + "models/gemini-4-neon", "gemini-4-neon-latest", + "gemini-4-neon-cyber-permissive", "gemini-4-hydrogen"]) def test_unknown_models_and_inferred_aliases_fail(policy, model): assert assess(pr(declared([attribution(model)])), {KNOWLEDGE}, policy)["state"] == "failure" @@ -133,6 +147,7 @@ def test_unknown_models_and_inferred_aliases_fail(policy, model): ("claude-fable-5-2", ("claude-fable-5-2",)), ("gpt-6.2-astra", ("gpt-6.2-astra",)), ("gpt-6.2-sol", ("gpt-6.2-sol",)), + ("gemini-4-neon", ("gemini-4-neon",)), ]) def test_suspension_overrides_canonical_and_alias(policy, canonical, identities): policy["models"][canonical]["suspended"] = True @@ -142,7 +157,8 @@ def test_suspension_overrides_canonical_and_alias(policy, canonical, identities) @pytest.mark.parametrize("bad", [attribution("unapproved-model"), attribution("gpt-6.1-sol"), attribution("sol"), attribution("GPT-6.2-Sol"), - attribution("gpt-6.2-astra", "high")]) + attribution("gpt-6.2-astra", "high"), + attribution("gemini-4-neon", "max")]) def test_one_noncompliant_author_fails_a_mixed_declaration(policy, bad): good = attribution("gpt-6.2-astra", "max") assert model_errors([good], policy) == []