ollama: Remove dead code (#38550)

The `Duration` argument in `get_models` has been unused for over a year.

The `complete` function is also unused and it has fallen behind in new
feature additions such as Authorization support. This used to exist
because ollama didn't support tools in streaming mode, `with_tools` also
existed because of that. Now however there is no reason to keep this
around.

`ChatResponseDelta ` had unnecessary `#[allow(unused)]` macros since the
fields are marked `pub`. Using `#[expect(unused)]` would've caught this.

Release Notes:

- N/A
This commit is contained in:
tidely
2025-09-24 02:19:52 -06:00
committed by GitHub
parent 9418a2f4bc
commit d5a99d079e
2 changed files with 1 additions and 48 deletions
@@ -105,8 +105,7 @@ impl State {
// As a proxy for the server being "authenticated", we'll check if its up by fetching the models
cx.spawn(async move |this, cx| {
let models =
get_models(http_client.as_ref(), &api_url, api_key.as_deref(), None).await?;
let models = get_models(http_client.as_ref(), &api_url, api_key.as_deref()).await?;
let tasks = models
.into_iter()