refactor(core)!: rename Provider to LLMProvider and update implementations

- Export `LLMProvider` from `owlen-core` and replace public `Provider` re-exports.
- Convert `OllamaProvider` to implement the new `LLMProvider` trait with associated future types.
- Adjust imports and trait bounds in `remote_client.rs` to use the updated types.
- Add comprehensive provider interface tests (`provider_interface.rs`) verifying router routing and provider registry model listing with `MockProvider`.
- Align dependency versions across workspace crates by switching to workspace-managed versions.
- Extend CI (`.woodpecker.yml`) with a dedicated test step and generate coverage reports.
- Update architecture documentation to reflect the new provider abstraction.
This commit is contained in:
2025-10-12 01:54:25 +02:00
parent 5ac0d152cb
commit 952e4819fe
16 changed files with 664 additions and 459 deletions

View File

@@ -143,28 +143,27 @@ fn run_config_command(command: ConfigCommand) -> Result<()> {
fn run_config_doctor() -> Result<()> {
let config_path = core_config::default_config_path();
let existed = config_path.exists();
let mut config = config::try_load_config().unwrap_or_else(|| Config::default());
let mut config = config::try_load_config().unwrap_or_default();
let mut changes = Vec::new();
if !existed {
changes.push("created configuration file from defaults".to_string());
}
if config
if !config
.providers
.get(&config.general.default_provider)
.is_none()
.contains_key(&config.general.default_provider)
{
config.general.default_provider = "ollama".to_string();
changes.push("default provider missing; reset to 'ollama'".to_string());
}
if config.providers.get("ollama").is_none() {
if !config.providers.contains_key("ollama") {
core_config::ensure_provider_config(&mut config, "ollama");
changes.push("added default ollama provider configuration".to_string());
}
if config.providers.get("ollama-cloud").is_none() {
if !config.providers.contains_key("ollama-cloud") {
core_config::ensure_provider_config(&mut config, "ollama-cloud");
changes.push("added default ollama-cloud provider configuration".to_string());
}