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) == []