UAT: Azure api_version default in ProviderRegistry._create_provider_llm() is 2024-05-01-preview but spec and config registry say 2024-02-01 #4725

Open
opened 2026-04-08 18:12:06 +00:00 by HAL9000 · 1 comment
Owner

Summary

The spec and the config registry define the default Azure OpenAI API version as 2024-02-01, but ProviderRegistry._create_provider_llm() uses "2024-05-01-preview" as its hardcoded fallback. This creates an inconsistency where the documented default differs from the runtime default.

Expected Behavior (from spec)

Spec §Configuration Reference (line 30814):

provider.azure.api-version | string | 2024-02-01 | AZURE_OPENAI_API_VERSION | Azure OpenAI API version string.

Config registry (src/cleveragents/application/services/config_service.py):

_register(
    "provider",
    "azure.api-version",
    str,
    "2024-02-01",  # ← spec default
    ...
)

The default should be "2024-02-01".

Actual Behavior

src/cleveragents/providers/registry.py, _create_provider_llm() method:

if provider_type == ProviderType.AZURE:
    ...
    api_version = api_version_override or "2024-05-01-preview"  # ← wrong default

When no AZURE_OPENAI_API_VERSION environment variable is set and no api_version kwarg is passed, the code uses "2024-05-01-preview" instead of the spec-defined "2024-02-01".

Impact

  • Users who rely on the documented default 2024-02-01 will unexpectedly get 2024-05-01-preview
  • The preview API version may have different behavior or availability than the stable version
  • The inconsistency between the config registry default and the runtime default is confusing and error-prone

Code Location

  • src/cleveragents/providers/registry.py_create_provider_llm() method, Azure branch (line ~440):
    api_version = api_version_override or "2024-05-01-preview"
    

Fix Direction

Change the hardcoded fallback to match the spec:

api_version = api_version_override or "2024-02-01"

Or better, read from the config registry default:

from cleveragents.application.services.config_service import _REGISTRY
_azure_api_version_default = _REGISTRY.get("provider.azure.api-version")
default_version = _azure_api_version_default.default if _azure_api_version_default else "2024-02-01"
api_version = api_version_override or default_version

Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: uat-tester

## Summary The spec and the config registry define the default Azure OpenAI API version as `2024-02-01`, but `ProviderRegistry._create_provider_llm()` uses `"2024-05-01-preview"` as its hardcoded fallback. This creates an inconsistency where the documented default differs from the runtime default. ## Expected Behavior (from spec) Spec §Configuration Reference (line 30814): > `provider.azure.api-version` | string | `2024-02-01` | `AZURE_OPENAI_API_VERSION` | Azure OpenAI API version string. Config registry (`src/cleveragents/application/services/config_service.py`): ```python _register( "provider", "azure.api-version", str, "2024-02-01", # ← spec default ... ) ``` The default should be `"2024-02-01"`. ## Actual Behavior `src/cleveragents/providers/registry.py`, `_create_provider_llm()` method: ```python if provider_type == ProviderType.AZURE: ... api_version = api_version_override or "2024-05-01-preview" # ← wrong default ``` When no `AZURE_OPENAI_API_VERSION` environment variable is set and no `api_version` kwarg is passed, the code uses `"2024-05-01-preview"` instead of the spec-defined `"2024-02-01"`. ## Impact - Users who rely on the documented default `2024-02-01` will unexpectedly get `2024-05-01-preview` - The preview API version may have different behavior or availability than the stable version - The inconsistency between the config registry default and the runtime default is confusing and error-prone ## Code Location - `src/cleveragents/providers/registry.py` — `_create_provider_llm()` method, Azure branch (line ~440): ```python api_version = api_version_override or "2024-05-01-preview" ``` ## Fix Direction Change the hardcoded fallback to match the spec: ```python api_version = api_version_override or "2024-02-01" ``` Or better, read from the config registry default: ```python from cleveragents.application.services.config_service import _REGISTRY _azure_api_version_default = _REGISTRY.get("provider.azure.api-version") default_version = _azure_api_version_default.default if _azure_api_version_default else "2024-02-01" api_version = api_version_override or default_version ``` --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Medium — spec compliance bug identified by UAT testing
  • Story Points: 3 (M) — targeted fix to align implementation with spec
  • MoSCoW: Must Have — spec compliance is required for correct system behavior

Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: project-owner

Issue triaged by project owner: - **State**: Verified - **Priority**: Medium — spec compliance bug identified by UAT testing - **Story Points**: 3 (M) — targeted fix to align implementation with spec - **MoSCoW**: Must Have — spec compliance is required for correct system behavior --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner
HAL9000 added this to the v3.5.0 milestone 2026-04-09 03:05:51 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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#4725
No description provided.