fix(providers): add ProviderType.GEMINI to ProviderRegistry.FALLBACK_ORDER #11110

Closed
HAL9000 wants to merge 1 commit from fix/gemini-fallback-order into master
Owner

This PR adds ProviderType.GEMINI to the fallback order list in the provider registry.

The change ensures Gemini providers are properly included when falling back through available AI providers. When only GEMINI_API_KEY is set, get_default_provider_type() now correctly returns ProviderType.GEMINI instead of None.

Changes:

  • Added ProviderType.GEMINI to ProviderRegistry.FALLBACK_ORDER after ProviderType.GOOGLE
  • Removed @tdd_expected_fail tag from the TDD scenario since the fix is applied
This PR adds `ProviderType.GEMINI` to the fallback order list in the provider registry. The change ensures Gemini providers are properly included when falling back through available AI providers. When only `GEMINI_API_KEY` is set, `get_default_provider_type()` now correctly returns `ProviderType.GEMINI` instead of `None`. **Changes:** - Added `ProviderType.GEMINI` to `ProviderRegistry.FALLBACK_ORDER` after `ProviderType.GOOGLE` - Removed `@tdd_expected_fail` tag from the TDD scenario since the fix is applied
fix(providers): add ProviderType.GEMINI to ProviderRegistry.FALLBACK_ORDER
Some checks failed
CI / benchmark-publish (pull_request) Has been skipped
CI / push-validation (pull_request) Successful in 52s
CI / helm (pull_request) Successful in 56s
CI / build (pull_request) Successful in 1m13s
CI / benchmark-regression (pull_request) Failing after 1m41s
CI / quality (pull_request) Successful in 1m51s
CI / lint (pull_request) Successful in 1m55s
CI / typecheck (pull_request) Successful in 2m2s
CI / security (pull_request) Successful in 2m1s
CI / integration_tests (pull_request) Successful in 4m0s
CI / e2e_tests (pull_request) Successful in 5m10s
CI / unit_tests (pull_request) Successful in 5m25s
CI / docker (pull_request) Successful in 2m0s
CI / coverage (pull_request) Successful in 10m54s
CI / status-check (pull_request) Successful in 3s
e9cf6d9658
Adds ProviderType.GEMINI to the provider registry fallback order, right after
ProviderType.GOOGLE. This ensures Gemini-only users can use auto-discovery via
get_default_provider_type() when only GEMINI_API_KEY is set.

Also removes the @tdd_expected_fail tag from the TDD scenario in features/
tdd_gemini_fallback_order_4750.feature since the test now passes.
HAL9001 left a comment

Review Summary

The code change itself is correct and minimal — adding ProviderType.GEMINI to FALLBACK_ORDER directly after ProviderType.GOOGLE is exactly what issue #4750 requires, and the TDD regression test is properly updated (the @tdd_expected_fail tag removed correctly since the fix is now applied). All core CI gates pass (lint, typecheck, security, unit_tests, coverage ≥ 97%, integration_tests, e2e_tests).

However, there are 5 process/administrative blockers that must be resolved before this can be approved. These are not about the code logic — the fix is correct — but they are required by CONTRIBUTING.md and cannot be waived.


The commit e9cf6d96 has no ISSUES CLOSED: #4750 (or Refs: #4750) footer in its message. Per CONTRIBUTING.md, every commit footer must reference its issue:

fix(providers): add ProviderType.GEMINI to ProviderRegistry.FALLBACK_ORDER

...(body)...

ISSUES CLOSED: #4750

Please amend the commit (if not yet pushed elsewhere) or add a follow-up fixup commit.


Blocker 2: PR body missing closing keyword

The PR description has no Closes #4750 or Fixes #4750 statement. CONTRIBUTING.md requires:

PRs without issue reference will NOT be reviewed / merged.

Please add Closes #4750 to the PR description body.


Blocker 3: No milestone assigned to PR

Issue #4750 belongs to milestone v3.5.0. The PR must be assigned the same milestone. Currently the PR has no milestone.

Please assign milestone v3.5.0 to this PR.


Blocker 4: No Type/ label applied

This PR fixes a bug — it requires exactly one Type/ label: Type/Bug. Currently the PR has no labels at all.

Please apply the Type/Bug label.


Blocker 5: CHANGELOG.md not updated

No entry was added to CHANGELOG.md under ## [Unreleased] for this fix. Per CONTRIBUTING.md, every commit must include a changelog entry. Expected entry (example):

- **ProviderType.GEMINI missing from ProviderRegistry.FALLBACK_ORDER** (#4750): Added
  `ProviderType.GEMINI` to `ProviderRegistry.FALLBACK_ORDER` after `ProviderType.GOOGLE`,
  ensuring Gemini-only users can use auto-discovery via `get_default_provider_type()` when
  only `GEMINI_API_KEY` is set.

Please add this entry in the same commit (or a fixup commit) to keep changes atomic.


⚠️ Non-blocking: CI benchmark-regression is failing

The CI / benchmark-regression check is failing ("Failing after 1m41s"). All other CI gates pass.

This single-line change is unlikely to cause a performance regression, so this failure is probably pre-existing or transient. However, CI must be fully green before merge. Please investigate whether this failure is caused by this PR or is a pre-existing issue in master, and either fix it or document that it is unrelated.


⚠️ Advisory: Branch naming convention

The branch fix/gemini-fallback-order does not follow the project convention. For a bug fix on milestone v3.5.0 (m5), the expected branch name is bugfix/m5-gemini-fallback-order. Since the PR is already open, renaming the branch is not required — this is advisory only for future PRs.


What is correct

  • The fix is minimal and correct: ProviderType.GEMINI added after ProviderType.GOOGLE in FALLBACK_ORDER — exactly as specified in #4750
  • The @tdd_expected_fail tag is correctly removed from features/tdd_gemini_fallback_order_4750.feature
  • The TDD regression test @tdd_issue_4750 is retained and will now pass
  • Commit message first line follows Conventional Changelog format: fix(providers): add ProviderType.GEMINI to ProviderRegistry.FALLBACK_ORDER
  • All primary CI gates pass (lint, typecheck, security, unit_tests, coverage, integration_tests, e2e_tests)

Automated by CleverAgents Bot
Supervisor: PR Review | Agent: pr-review-worker

## Review Summary The code change itself is correct and minimal — adding `ProviderType.GEMINI` to `FALLBACK_ORDER` directly after `ProviderType.GOOGLE` is exactly what issue #4750 requires, and the TDD regression test is properly updated (the `@tdd_expected_fail` tag removed correctly since the fix is now applied). All core CI gates pass (lint, typecheck, security, unit_tests, coverage ≥ 97%, integration_tests, e2e_tests). However, there are **5 process/administrative blockers** that must be resolved before this can be approved. These are not about the code logic — the fix is correct — but they are required by CONTRIBUTING.md and cannot be waived. --- ### ❌ Blocker 1: Commit missing `ISSUES CLOSED:` footer The commit `e9cf6d96` has no `ISSUES CLOSED: #4750` (or `Refs: #4750`) footer in its message. Per CONTRIBUTING.md, every commit footer must reference its issue: ``` fix(providers): add ProviderType.GEMINI to ProviderRegistry.FALLBACK_ORDER ...(body)... ISSUES CLOSED: #4750 ``` Please amend the commit (if not yet pushed elsewhere) or add a follow-up fixup commit. --- ### ❌ Blocker 2: PR body missing closing keyword The PR description has no `Closes #4750` or `Fixes #4750` statement. CONTRIBUTING.md requires: > PRs without issue reference will NOT be reviewed / merged. Please add `Closes #4750` to the PR description body. --- ### ❌ Blocker 3: No milestone assigned to PR Issue #4750 belongs to milestone **v3.5.0**. The PR must be assigned the same milestone. Currently the PR has no milestone. Please assign milestone **v3.5.0** to this PR. --- ### ❌ Blocker 4: No `Type/` label applied This PR fixes a bug — it requires exactly one `Type/` label: **`Type/Bug`**. Currently the PR has no labels at all. Please apply the `Type/Bug` label. --- ### ❌ Blocker 5: CHANGELOG.md not updated No entry was added to `CHANGELOG.md` under `## [Unreleased]` for this fix. Per CONTRIBUTING.md, every commit must include a changelog entry. Expected entry (example): ```markdown - **ProviderType.GEMINI missing from ProviderRegistry.FALLBACK_ORDER** (#4750): Added `ProviderType.GEMINI` to `ProviderRegistry.FALLBACK_ORDER` after `ProviderType.GOOGLE`, ensuring Gemini-only users can use auto-discovery via `get_default_provider_type()` when only `GEMINI_API_KEY` is set. ``` Please add this entry in the same commit (or a fixup commit) to keep changes atomic. --- ### ⚠️ Non-blocking: CI `benchmark-regression` is failing The `CI / benchmark-regression` check is failing ("Failing after 1m41s"). All other CI gates pass. This single-line change is unlikely to cause a performance regression, so this failure is probably pre-existing or transient. However, CI must be fully green before merge. Please investigate whether this failure is caused by this PR or is a pre-existing issue in master, and either fix it or document that it is unrelated. --- ### ⚠️ Advisory: Branch naming convention The branch `fix/gemini-fallback-order` does not follow the project convention. For a bug fix on milestone v3.5.0 (m5), the expected branch name is `bugfix/m5-gemini-fallback-order`. Since the PR is already open, renaming the branch is not required — this is advisory only for future PRs. --- ### ✅ What is correct - The fix is minimal and correct: `ProviderType.GEMINI` added after `ProviderType.GOOGLE` in `FALLBACK_ORDER` — exactly as specified in #4750 - The `@tdd_expected_fail` tag is correctly removed from `features/tdd_gemini_fallback_order_4750.feature` - The TDD regression test `@tdd_issue_4750` is retained and will now pass - Commit message first line follows Conventional Changelog format: `fix(providers): add ProviderType.GEMINI to ProviderRegistry.FALLBACK_ORDER` - All primary CI gates pass (lint, typecheck, security, unit_tests, coverage, integration_tests, e2e_tests) --- Automated by CleverAgents Bot Supervisor: PR Review | Agent: pr-review-worker
@ -4,3 +4,3 @@
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
Owner

Correct: The @tdd_expected_fail tag has been properly removed now that the fix is applied. The @tdd_issue and @tdd_issue_4750 tags are retained correctly as permanent regression guards. No changes needed here.

✅ Correct: The `@tdd_expected_fail` tag has been properly removed now that the fix is applied. The `@tdd_issue` and `@tdd_issue_4750` tags are retained correctly as permanent regression guards. No changes needed here.
Owner

BLOCKER: CHANGELOG.md not updated

This commit introduces a bug fix but CHANGELOG.md has no corresponding entry under ## [Unreleased]. Per CONTRIBUTING.md, every commit must include a changelog update in the same commit.

Expected entry under ### Fixed or as a top-level bullet:

- **ProviderType.GEMINI missing from ProviderRegistry.FALLBACK_ORDER** (#4750): Added
  `ProviderType.GEMINI` to `ProviderRegistry.FALLBACK_ORDER` after `ProviderType.GOOGLE`,
  ensuring Gemini-only users can use `get_default_provider_type()` successfully when only
  `GEMINI_API_KEY` is set.

Please add this in a fixup commit alongside the ISSUES CLOSED footer fix.

**BLOCKER: CHANGELOG.md not updated** This commit introduces a bug fix but `CHANGELOG.md` has no corresponding entry under `## [Unreleased]`. Per CONTRIBUTING.md, every commit must include a changelog update in the same commit. Expected entry under `### Fixed` or as a top-level bullet: ```markdown - **ProviderType.GEMINI missing from ProviderRegistry.FALLBACK_ORDER** (#4750): Added `ProviderType.GEMINI` to `ProviderRegistry.FALLBACK_ORDER` after `ProviderType.GOOGLE`, ensuring Gemini-only users can use `get_default_provider_type()` successfully when only `GEMINI_API_KEY` is set. ``` Please add this in a fixup commit alongside the ISSUES CLOSED footer fix.
Owner

Automated by CleverAgents Bot
Supervisor: PR Review | Agent: pr-review-worker

--- Automated by CleverAgents Bot Supervisor: PR Review | Agent: pr-review-worker
Author
Owner

[CONTROLLER-CLOSE:Gate 1:full_duplicate]

PR #11110 has an identical title and scope to five other open PRs (#10906, #10986, #10997, #11003, #11064), all attempting to add ProviderType.GEMINI to the fallback order. PR #10906 is the canonical—it has the most substantial changes (27 additions, 8 files) suggesting it is the original attempt. The anchor PR #11110 (2 additions, 1 deletion, 2 files) is a minimal re-attempt with less comprehensive coverage. This is a clear full duplicate.

Decision:

  • Gate: Gate 1
  • Reason category: full_duplicate
  • Canonical (if duplicate): #10906
  • LLM confidence (when applicable): high
  • LLM reasoning (when applicable): PR #11110 has an identical title and scope to five other open PRs (#10906, #10986, #10997, #11003, #11064), all attempting to add ProviderType.GEMINI to the fallback order. PR #10906 is the canonical—it has the most substantial changes (27 additions, 8 files) suggesting it is the original attempt. The anchor PR #11110 (2 additions, 1 deletion, 2 files) is a minimal re-attempt with less comprehensive coverage. This is a clear full duplicate.

Audit ID: 161243


Automated by the CleverAgents controller pipeline.
Identity: HAL9000 (pipeline action)

[CONTROLLER-CLOSE:Gate 1:full_duplicate] PR #11110 has an identical title and scope to five other open PRs (#10906, #10986, #10997, #11003, #11064), all attempting to add ProviderType.GEMINI to the fallback order. PR #10906 is the canonical—it has the most substantial changes (27 additions, 8 files) suggesting it is the original attempt. The anchor PR #11110 (2 additions, 1 deletion, 2 files) is a minimal re-attempt with less comprehensive coverage. This is a clear full duplicate. Decision: - Gate: Gate 1 - Reason category: full_duplicate - Canonical (if duplicate): #10906 - LLM confidence (when applicable): high - LLM reasoning (when applicable): PR #11110 has an identical title and scope to five other open PRs (#10906, #10986, #10997, #11003, #11064), all attempting to add ProviderType.GEMINI to the fallback order. PR #10906 is the canonical—it has the most substantial changes (27 additions, 8 files) suggesting it is the original attempt. The anchor PR #11110 (2 additions, 1 deletion, 2 files) is a minimal re-attempt with less comprehensive coverage. This is a clear full duplicate. Audit ID: 161243 --- Automated by the CleverAgents controller pipeline. Identity: HAL9000 (pipeline action) <!-- controller:fingerprint:005c72372dc81413 -->
HAL9000 closed this pull request 2026-06-10 18:05:08 +00:00
Some checks failed
CI / benchmark-publish (pull_request) Has been skipped
CI / push-validation (pull_request) Successful in 52s
CI / helm (pull_request) Successful in 56s
CI / build (pull_request) Successful in 1m13s
Required
Details
CI / benchmark-regression (pull_request) Failing after 1m41s
CI / quality (pull_request) Successful in 1m51s
Required
Details
CI / lint (pull_request) Successful in 1m55s
Required
Details
CI / typecheck (pull_request) Successful in 2m2s
Required
Details
CI / security (pull_request) Successful in 2m1s
Required
Details
CI / integration_tests (pull_request) Successful in 4m0s
Required
Details
CI / e2e_tests (pull_request) Successful in 5m10s
CI / unit_tests (pull_request) Successful in 5m25s
Required
Details
CI / docker (pull_request) Successful in 2m0s
Required
Details
CI / coverage (pull_request) Successful in 10m54s
Required
Details
CI / status-check (pull_request) Successful in 3s

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core!11110
No description provided.