(
_executor: &mut AgentExecutor,
model_id: &str,
registry: &ProviderRegistry,
)
| 1645 | } |
| 1646 | |
| 1647 | fn select_model( |
| 1648 | _executor: &mut AgentExecutor, |
| 1649 | model_id: &str, |
| 1650 | registry: &ProviderRegistry, |
| 1651 | ) -> anyhow::Result<()> { |
| 1652 | let model = registry |
| 1653 | .list() |
| 1654 | .iter() |
| 1655 | .flat_map(|p| p.models()) |
| 1656 | .find(|m| m.id == model_id) |
| 1657 | .ok_or_else(|| anyhow::anyhow!("Model not found: {}", model_id))?; |
| 1658 | |
| 1659 | println!("Selected model: {} ({})\n", model_id, model.name); |
| 1660 | Ok(()) |
| 1661 | } |
| 1662 | |
| 1663 | const DEFAULT_PLUGIN_SERVER_URL: &str = "http://127.0.0.1:4096"; |
| 1664 |
no test coverage detected