6eb9c41407
CI / build (pull_request) Successful in 44s
CI / helm (pull_request) Successful in 53s
CI / lint (pull_request) Successful in 59s
CI / quality (pull_request) Successful in 1m0s
CI / push-validation (pull_request) Successful in 44s
CI / typecheck (pull_request) Successful in 1m9s
CI / security (pull_request) Successful in 1m10s
CI / unit_tests (pull_request) Successful in 5m47s
CI / docker (pull_request) Successful in 1m34s
CI / integration_tests (pull_request) Successful in 8m33s
CI / coverage (pull_request) Successful in 9m9s
CI / status-check (pull_request) Successful in 4s
Address reviewer blocking issues on PR #11003: 1. Remove unused `import os` and inner `MagicMock` re-import from the gemini fallback step definitions (ruff F401). 2. Remove `@tdd_expected_fail` from the TDD feature now that the registry fix makes the scenario pass; keep `@tdd_issue` / `@tdd_issue_4750` as permanent regression markers. 3. Rewrite three feature step texts to use the env-var step defs that already exist in `provider_registry_steps.py` instead of duplicating them (drops the `env var` phrasing the original feature used and that had no matching step def). 4. Add `"gemini"` to `FallbackSelector.DEFAULT_FALLBACK_ORDER` after `"google"` so the actor-configured fallback chain mirrors the registry-level fix. 5. Rename three of the new feature/step pairs to avoid ambiguous-step collisions that crashed every behave-parallel worker at module-load time (the root cause of the "8 features errored, 0 scenarios" pattern): - `the result should be ProviderType "GEMINI"` collided with `cli_steps.py:138`'s `@then("the result should be {expected}")`; renamed to `the gemini fallback default should be ProviderType "GEMINI"`. - `the result should be None` had the same collision; renamed to `the clean gemini registry default should be None`. - `@given("I have the ProviderRegistry class")` was duplicated in `provider_registry_steps.py:186`; the duplicate is removed and the existing definition is reused. ISSUES CLOSED: #10906
41 lines
2.0 KiB
Gherkin
41 lines
2.0 KiB
Gherkin
Feature: Fallback order includes ProviderType.GEMINI
|
|
As a developer
|
|
I want ProviderType.GEMINI to be included in ProviderRegistry.FALLBACK_ORDER
|
|
So that Gemini becomes a valid fallback when no higher-priority provider is configured
|
|
|
|
@unit @providers @registry @fallback
|
|
Scenario: GEMINI appears in FALLBACK_ORDER list
|
|
Given I have the ProviderRegistry class
|
|
When I check the FALLBACK_ORDER contents
|
|
Then GEMINI should be present in the fallback order
|
|
And OPENAI should still be first in the order
|
|
And ANTHROPIC should still be second in the order
|
|
|
|
@unit @providers @registry @fallback
|
|
Scenario: Gemini-only provider gets selected as default via fallback order
|
|
Given a registry with only gemini API key set to "sk-gemini-test"
|
|
And CLEVERAGENTS_DEFAULT_PROVIDER is not set
|
|
When I request the default provider type
|
|
Then the gemini fallback default should be ProviderType "GEMINI"
|
|
|
|
@unit @providers @registry @fallback
|
|
Scenario: Gemini fallback selected after OPENAI, ANTHROPIC, GOOGLE are unconfigured
|
|
Given a registry with only gemini API key set to "sk-gemini-test"
|
|
And CLEVERAGENTS_DEFAULT_PROVIDER is not set
|
|
When I iterate through FALLBACK_ORDER and find the first configured provider
|
|
Then GEMINI should be the first configured provider found
|
|
|
|
@unit @providers @registry @fallback
|
|
Scenario: Gemini in fallback order does not affect explicit env override
|
|
Given a registry with only gemini API key set to "sk-gemini-test"
|
|
And CLEVERAGENTS_DEFAULT_PROVIDER is set to "gemini"
|
|
When I request the default provider type
|
|
Then the gemini fallback default should be ProviderType "GEMINI"
|
|
|
|
@unit @providers @registry @fallback
|
|
Scenario: Gemini with all other providers unconfigured returns None only when GEMINI also has no key
|
|
Given a gemini-registry with no API keys configured
|
|
And CLEVERAGENTS_ALLOW_MOCK_PROVIDER is not set
|
|
When I request the default provider type from a clean registry
|
|
Then the clean gemini registry default should be None
|