UAT: ProviderRegistry.switch_model() is missing — spec maps session/set_model operation to this method but it does not exist #4115

Open
opened 2026-04-06 10:27:31 +00:00 by freemo · 0 comments
Owner

Metadata

  • Branch: fix/providers-add-switch-model-method
  • Commit Message: fix(providers): add switch_model() method to ProviderRegistry per spec
  • Milestone: (none — backlog)
  • Parent Epic: #3365 (Epic: Additional LLM Provider Integrations — Cohere, Groq, Together AI, and Provider Abstraction)

Backlog note: This issue was discovered during autonomous UAT testing
on the LLM Provider Integration feature area. It does not block milestone
completion and has been placed in the backlog for human review and future
milestone assignment.

Bug Report

What was tested: ProviderRegistry API against the specification

Expected behavior (from spec, section "Session Operations", line 43286):

The specification maps the session/set_model operation to ProviderRegistry.switch_model():

Operation Implementation
session/set_model ProviderRegistry.switch_model()

This method should allow changing the active model for a session at runtime.

Actual behavior (from code analysis):

ProviderRegistry.switch_model() does not exist anywhere in the codebase. Searching src/cleveragents/ for switch_model returns zero results.

The ProviderRegistry class in src/cleveragents/providers/registry.py provides:

  • get_configured_providers()
  • get_all_providers()
  • get_provider_info()
  • is_provider_configured()
  • get_default_provider_type()
  • get_default_model()
  • create_llm()
  • create_ai_provider()

But no switch_model() method exists.

Code location:

  • src/cleveragents/providers/registry.pyProviderRegistry class (missing switch_model)
  • Spec: docs/specification.md line 43286

Steps to reproduce:

  1. Search for switch_model in the codebase: grep -rn "switch_model" src/
  2. Observe: zero results

Severity: Medium — the session/set_model operation cannot be implemented without this method. Users cannot change the active model for a session at runtime.

Subtasks

  • Write failing Behave scenario for ProviderRegistry.switch_model()
  • Implement switch_model(provider_type, model_id) method on ProviderRegistry
  • Wire switch_model() into the session/set_model operation handler
  • Add unit tests for the new method
  • Verify nox -e typecheck passes
  • Run nox (all default sessions)

Definition of Done

  • ProviderRegistry.switch_model(provider_type, model_id) method exists and works
  • session/set_model operation calls ProviderRegistry.switch_model()
  • All existing provider tests continue to pass
  • New Behave scenarios cover switch_model behavior
  • Coverage >= 97%

Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: ca-new-issue-creator

## Metadata - **Branch**: `fix/providers-add-switch-model-method` - **Commit Message**: `fix(providers): add switch_model() method to ProviderRegistry per spec` - **Milestone**: *(none — backlog)* - **Parent Epic**: #3365 (Epic: Additional LLM Provider Integrations — Cohere, Groq, Together AI, and Provider Abstraction) > **Backlog note:** This issue was discovered during autonomous UAT testing > on the LLM Provider Integration feature area. It does not block milestone > completion and has been placed in the backlog for human review and future > milestone assignment. ## Bug Report **What was tested:** `ProviderRegistry` API against the specification **Expected behavior (from spec, section "Session Operations", line 43286):** The specification maps the `session/set_model` operation to `ProviderRegistry.switch_model()`: | Operation | Implementation | |-----------|----------------| | `session/set_model` | `ProviderRegistry.switch_model()` | This method should allow changing the active model for a session at runtime. **Actual behavior (from code analysis):** `ProviderRegistry.switch_model()` does not exist anywhere in the codebase. Searching `src/cleveragents/` for `switch_model` returns zero results. The `ProviderRegistry` class in `src/cleveragents/providers/registry.py` provides: - `get_configured_providers()` - `get_all_providers()` - `get_provider_info()` - `is_provider_configured()` - `get_default_provider_type()` - `get_default_model()` - `create_llm()` - `create_ai_provider()` But **no `switch_model()` method** exists. **Code location:** - `src/cleveragents/providers/registry.py` — `ProviderRegistry` class (missing `switch_model`) - Spec: `docs/specification.md` line 43286 **Steps to reproduce:** 1. Search for `switch_model` in the codebase: `grep -rn "switch_model" src/` 2. Observe: zero results **Severity:** Medium — the `session/set_model` operation cannot be implemented without this method. Users cannot change the active model for a session at runtime. ## Subtasks - [ ] Write failing Behave scenario for `ProviderRegistry.switch_model()` - [ ] Implement `switch_model(provider_type, model_id)` method on `ProviderRegistry` - [ ] Wire `switch_model()` into the `session/set_model` operation handler - [ ] Add unit tests for the new method - [ ] Verify `nox -e typecheck` passes - [ ] Run `nox` (all default sessions) ## Definition of Done - [ ] `ProviderRegistry.switch_model(provider_type, model_id)` method exists and works - [ ] `session/set_model` operation calls `ProviderRegistry.switch_model()` - [ ] All existing provider tests continue to pass - [ ] New Behave scenarios cover `switch_model` behavior - [ ] Coverage >= 97% --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-new-issue-creator
freemo added this to the v3.2.0 milestone 2026-04-06 17:48:36 +00:00
freemo removed this from the v3.2.0 milestone 2026-04-06 20:39:46 +00:00
HAL9000 added this to the v3.5.0 milestone 2026-04-09 03:10: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.

Reference
cleveragents/cleveragents-core#4115
No description provided.