diff --git a/CHANGELOG.md b/CHANGELOG.md index 082e0f8df..168cefaa8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,20 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ### Fixed +- **ProviderType.GEMINI missing from ProviderRegistry.FALLBACK_ORDER** (#10906, #4750): + Added `ProviderType.GEMINI` to both `ProviderRegistry.FALLBACK_ORDER` (after + `ProviderType.GOOGLE`) and `FallbackSelector.DEFAULT_FALLBACK_ORDER` (after + `"google"`). The GEMINI enum value, capabilities, default model, and API key mapping + were already defined in the registry but Gemini-only users could not get a provider + via the fallback chain — `get_default_provider_type()` returned ``None`` when only + ``GEMINI_API_KEY`` was set. Also removed the ``@tdd_expected_fail`` tag from the + Behave regression test (`features/tdd_gemini_fallback_order_4750.feature`) since the + bug is now resolved and the test must pass normally. + +### Fixed + +- **Cross-actor subgraph cycle detection reads actor_ref field** (#1431): Fixed + - **Cross-actor subgraph cycle detection reads actor_ref field** (#1431): Fixed `_detect_subgraph_cycles()`, `_map_node()`, and the `compile_actor()` main loop in `src/cleveragents/actor/compiler.py` to read `actor_ref` from the top-level diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 1b5c41879..a53343841 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -31,3 +31,4 @@ Below are some of the specific details of various contributions. * HAL 9000 has contributed comprehensive milestone documentation for v3.6.0 (Advanced Concepts & Deferred Features) and v3.7.0 (TUI Implementation) (PR #9903): split into sub-documents covering context strategies, LLM backends, resource types, A2A rename, container tool execution, scope chain resolution, cost/safety budgets, E2E workflow tests, code review examples, plugin architecture, TUI layout, persona system, reference/command input, session management, configuration, and TuiMaterializer integration. * HAL 9000 has contributed the LLMTraceRepository data-integrity fix (PR #8185 / issue #7505): replaced the unconditional `session.commit()` in `LLMTraceRepository.save()` with a dual-path implementation that respects the UnitOfWork pattern — flushing only when an external session is provided, and flushing + committing + closing when operating standalone. This eliminates premature transaction commits, loss of rollback capability, and a docstring/implementation mismatch. * HAL 9000 has contributed the ACMS Index Data Model and File Traversal Engine (PR #9664 / issue #9579): foundational data structures for indexed context entries with hot/warm/cold/archive storage tier classification, tag system, and a timeout-safe chunked file traversal engine for large projects with 10,000+ files. +* HAL 9000 has contributed the ProviderType.GEMINI fallback order fix (PR #10906 / issue #4750): added GEMINI to both ProviderRegistry.FALLBACK_ORDER and FallbackSelector.DEFAULT_FALLBACK_ORDER so Gemini-only users can get a default provider via the fallback chain, and converted the TDD @tdd_expected_fail regression test to a permanent guard. diff --git a/features/steps/tdd_gemini_fallback_order_4750_steps.py b/features/steps/tdd_gemini_fallback_order_4750_steps.py index 91c74fb44..669991c61 100644 --- a/features/steps/tdd_gemini_fallback_order_4750_steps.py +++ b/features/steps/tdd_gemini_fallback_order_4750_steps.py @@ -2,14 +2,15 @@ Issue: #4750 — ProviderType.GEMINI missing from ProviderRegistry.FALLBACK_ORDER TDD Issue: #10896 +Fixed by: PR #10906 -This test captures the bug: when only GEMINI_API_KEY is set (without GOOGLE_API_KEY), -get_default_provider_type() returns None instead of ProviderType.GEMINI because -GEMINI is absent from FALLBACK_ORDER. +This test captures the regression that was fixed when ProviderType.GEMINI was added +to both ProviderRegistry.FALLBACK_ORDER and FallbackSelector.DEFAULT_FALLBACK_ORDER. +Previously, get_default_provider_type() returned None instead of ProviderType.GEMINI +when only GEMINI_API_KEY was set (without GOOGLE_API_KEY) because GEMINI was absent +from FALLBACK_ORDER. -The @tdd_expected_fail tag inverts the result so CI passes while the bug exists. -Once the fix is applied (adding ProviderType.GEMINI to FALLBACK_ORDER), the -@tdd_expected_fail tag must be removed and the test must pass normally. +The @tdd_expected_fail tag has been removed — this is now a permanent regression guard. """ from __future__ import annotations diff --git a/features/tdd_gemini_fallback_order_4750.feature b/features/tdd_gemini_fallback_order_4750.feature index 882e2f08e..04d614b10 100644 --- a/features/tdd_gemini_fallback_order_4750.feature +++ b/features/tdd_gemini_fallback_order_4750.feature @@ -3,7 +3,7 @@ Feature: TDD: ProviderType.GEMINI missing from ProviderRegistry.FALLBACK_ORDER I want get_default_provider_type() to return ProviderType.GEMINI via the fallback chain So that Gemini-only users can use auto-discovery without setting GOOGLE_API_KEY - @tdd_issue @tdd_issue_4750 @tdd_expected_fail + @tdd_issue @tdd_issue_4750 Scenario: Gemini-only user gets GEMINI as default provider via fallback order Given a ProviderRegistry configured with only gemini_api_key set And CLEVERAGENTS_DEFAULT_PROVIDER is not set for tdd test diff --git a/src/cleveragents/providers/fallback_selector.py b/src/cleveragents/providers/fallback_selector.py index ea177f248..c6a36c341 100644 --- a/src/cleveragents/providers/fallback_selector.py +++ b/src/cleveragents/providers/fallback_selector.py @@ -64,6 +64,7 @@ class FallbackSelector: "openai", "anthropic", "google", + "gemini", "azure", "openrouter", "groq", diff --git a/src/cleveragents/providers/registry.py b/src/cleveragents/providers/registry.py index 5aafdfe85..81a36b83c 100644 --- a/src/cleveragents/providers/registry.py +++ b/src/cleveragents/providers/registry.py @@ -220,6 +220,7 @@ class ProviderRegistry: ProviderType.OPENAI, ProviderType.ANTHROPIC, ProviderType.GOOGLE, + ProviderType.GEMINI, ProviderType.AZURE, ProviderType.OPENROUTER, ProviderType.GROQ,