refactor(ollama): replace handcrafted HTTP logic with ollama‑rs client and simplify request handling

- Switch to `ollama-rs` crate for chat, model listing, and streaming.
- Remove custom request building, authentication handling, and debug logging.
- Drop unsupported tool conversion; now ignore tool descriptors with a warning.
- Refactor model fetching to use local model info and optional cloud details.
- Consolidate error mapping via `map_ollama_error`.
- Update health check to use the new HTTP client.
- Delete obsolete `provider_interface.rs` test as the provider interface has changed.
This commit is contained in:
2025-10-12 07:09:58 +02:00
parent 15e5c1206b
commit fab63d224b
5 changed files with 680 additions and 728 deletions

View File

@@ -46,6 +46,7 @@ path-clean = "1.0"
tokio-stream = { workspace = true }
tokio-tungstenite = "0.21"
tungstenite = "0.21"
ollama-rs = { version = "0.3", features = ["stream", "headers"] }
[dev-dependencies]
tokio-test = { workspace = true }