From 105274961bb9947e93386877619d31f65933b059 Mon Sep 17 00:00:00 2001 From: silveroxides Date: Mon, 10 Aug 2026 01:39:25 +0200 Subject: [PATCH] chore(release): bump version to 1.3.9 Include the hidden Gemini 4 Flash capability placeholder and repository scope safeguards. Keep the model out of the UI until hosted API documentation confirms activation. --- AGENTS.md | 4 +++- gemini_nodes.py | 9 +++++++-- pyproject.toml | 2 +- tests/test_gemini_nodes.py | 17 +++++++++++++++++ 4 files changed, 28 insertions(+), 4 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 56ebeda..8d086c9 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -16,4 +16,6 @@ python_executable: C:\Users\ishim\Tools\ComfyUI\.venv\Scripts\python.exe ## Repository-Specific Instructions -Add only rules that apply specifically to this custom-node repository below this heading. +- Treat the user's stated task boundary as a hard workspace-flow constraint. Do not expand a targeted change or question into adjacent authentication modes, transports, model catalogs, dependencies, UI redesigns, or speculative audits unless their relevance to the requested workflow is first established or the user explicitly approves the expanded scope. +- Keep inspection proportional to the exact question: search for the concrete identifier, read only its containing boundary, and stop once the behavior is supported. Do not replace a direct answer with broad file reads, multi-subsystem analysis, or oversized diffs. +- Describe plans and reviews through the user-facing controls and behaviors they affect before implementation details. Explicitly identify which visible fields are used, ignored, conditional, renamed, or preserved in each mode. diff --git a/gemini_nodes.py b/gemini_nodes.py index 0a6a88b..6435b69 100644 --- a/gemini_nodes.py +++ b/gemini_nodes.py @@ -144,15 +144,20 @@ class SSL_GeminiTextPrompt(IO.ComfyNode): _seed_map_cache: dict = {} # Maps (input_seed, fingerprint_without_seed) -> successful_gemini_seed _client_cache: dict = {} # Maps client_key tuple -> genai.Client instance + # Placeholder only. Keep this out of the model combo until Google's hosted-model + # documentation confirms the final ID and gemini-3.6-flash-equivalent capabilities + # for both Gemini Developer API and Enterprise Agent Platform. + GEMINI_4_FLASH_PREVIEW = "gemini-4-flash-preview" + # Define model lists centrally to ensure consistency between cache logic and execution logic THINKING_MODELS = [ "gemini-1.5-pro-002", "gemini-2.0-flash-thinking-exp", "gemini-2.0-flash-thinking-exp-01-21", "gemini-2.0-flash-thinking-exp-1219", "gemini-2.5-pro", "gemini-2.5-flash", "gemini-2.5-flash-preview-04-17", "gemini-2.5-pro-exp-03-25", - "gemini-3-flash-preview", "gemini-3.1-pro-preview", "gemini-3.5-flash", "gemini-3.5-flash-lite", "gemini-3.6-flash", "gemini-pro-latest", "gemini-flash-latest", "gemini-flash-lite-latest" + "gemini-3-flash-preview", "gemini-3.1-pro-preview", "gemini-3.5-flash", "gemini-3.5-flash-lite", "gemini-3.6-flash", GEMINI_4_FLASH_PREVIEW, "gemini-pro-latest", "gemini-flash-latest", "gemini-flash-lite-latest" ] GEN3_THINKING_MODELS = [ "gemini-pro-latest", "gemini-flash-latest", "gemini-3.1-pro-preview", - "gemini-3-flash-preview", "gemini-3.5-flash", "gemini-3.5-flash-lite", "gemini-3.6-flash" + "gemini-3-flash-preview", "gemini-3.5-flash", "gemini-3.5-flash-lite", "gemini-3.6-flash", GEMINI_4_FLASH_PREVIEW ] IMAGE_MODELS = [ "gemini-2.5-flash-image-preview", "gemini-2.5-flash-image", diff --git a/pyproject.toml b/pyproject.toml index 7ff2daf..9772c03 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "ComfyUI_Gemini_Expanded_API" description = "Node for usage of Gemini API" -version = "1.3.8" +version = "1.3.9" license = {file = "LICENSE"} dependencies = ["google-genai>=2.17.0", "numpy", "torch"] diff --git a/tests/test_gemini_nodes.py b/tests/test_gemini_nodes.py index 24b34fb..db63697 100644 --- a/tests/test_gemini_nodes.py +++ b/tests/test_gemini_nodes.py @@ -417,6 +417,23 @@ def test_confirmed_current_models_are_visible_without_removing_legacy_ids(): assert model in model_input.options +def test_gemini_4_placeholder_matches_3_6_without_ui_exposure(): + placeholder = gemini_nodes.SSL_GeminiTextPrompt.GEMINI_4_FLASH_PREVIEW + reference = "gemini-3.6-flash" + + for capability_list in ( + gemini_nodes.SSL_GeminiTextPrompt.THINKING_MODELS, + gemini_nodes.SSL_GeminiTextPrompt.GEN3_THINKING_MODELS, + gemini_nodes.SSL_GeminiTextPrompt.IMAGE_MODELS, + gemini_nodes.SSL_GeminiTextPrompt.MEDIA_RES_MODELS, + ): + assert (placeholder in capability_list) == (reference in capability_list) + + schema = gemini_nodes.SSL_GeminiTextPrompt.define_schema() + model_input = next(input_ for input_ in schema.inputs if input_.id == "model") + assert placeholder not in model_input.options + + def test_timeout_returns_custom_fallback_without_caching(monkeypatch): release_request = threading.Event()