-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
llmLLM provider relatedLLM provider related
Description
Parent Epic
Depends On
Summary
Propagate list_models_remote through the dispatcher layer so callers always
get the full model list regardless of which AnyProvider variant is active.
Changes
AnyProvider
Add delegation via the existing delegate_provider! macro:
// any.rs
impl LlmProvider for AnyProvider {
async fn list_models_remote(&self) -> Result<Vec<ModelInfo>, LlmError> {
delegate_provider!(self, |p| p.list_models_remote().await)
}
}RouterProvider
Aggregate models from all fallback providers, deduplicating by id:
async fn list_models_remote(&self) -> Result<Vec<ModelInfo>, LlmError> {
let mut seen = std::collections::HashSet::new();
let mut result = Vec::new();
for provider in &self.providers {
if let Ok(models) = provider.list_models_remote().await {
for m in models {
if seen.insert(m.id.clone()) {
result.push(m);
}
}
}
}
Ok(result)
}ModelOrchestrator
Aggregate across all registered sub-providers, tagging each ModelInfo
with the sub-provider name in display_name prefix when ambiguous:
async fn list_models_remote(&self) -> Result<Vec<ModelInfo>, LlmError> {
// iterate self.providers (HashMap<String, SubProvider>)
// collect and deduplicate
}Acceptance Criteria
-
AnyProvider::list_models_remotedelegates to inner variant. -
RouterProviderreturns union of all providers, no duplicates. -
ModelOrchestratorreturns union of all sub-providers. - All existing unit tests pass.
- Integration test:
AnyProvider::Ollama→list_models_remotehits mock Ollama.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
llmLLM provider relatedLLM provider related