ZIm/crates/language_model/src
Thorsten Ball 6686f66949
ollama: Ensure only single task fetches models (#19830)
Before this change, we'd see a ton of requests from the Ollama provider
trying to fetch models:

```
[2024-10-28T15:00:52+01:00 DEBUG reqwest::connect] starting new connection: http://localhost:11434/
[2024-10-28T15:00:52+01:00 DEBUG reqwest::connect] starting new connection: http://localhost:11434/
[2024-10-28T15:00:52+01:00 DEBUG reqwest::connect] starting new connection: http://localhost:11434/
[2024-10-28T15:00:52+01:00 DEBUG reqwest::connect] starting new connection: http://localhost:11434/
[2024-10-28T15:00:52+01:00 DEBUG reqwest::connect] starting new connection: http://localhost:11434/
[2024-10-28T15:00:52+01:00 DEBUG reqwest::connect] starting new connection: http://localhost:11434/
[2024-10-28T15:00:52+01:00 DEBUG reqwest::connect] starting new connection: http://localhost:11434/
[2024-10-28T15:00:52+01:00 DEBUG reqwest::connect] starting new connection: http://localhost:11434/
[2024-10-28T15:00:52+01:00 DEBUG reqwest::connect] starting new connection: http://localhost:11434/
[2024-10-28T15:00:52+01:00 DEBUG reqwest::connect] starting new connection: https://api.zed.dev/
[2024-10-28T15:00:52+01:00 DEBUG reqwest::connect] starting new connection: http://localhost:11434/
[2024-10-28T15:00:52+01:00 DEBUG reqwest::connect] starting new connection: http://localhost:11434/
[2024-10-28T15:00:52+01:00 DEBUG reqwest::connect] starting new connection: http://localhost:11434/
[2024-10-28T15:00:52+01:00 DEBUG reqwest::connect] starting new connection: http://localhost:11434/
[2024-10-28T15:00:52+01:00 DEBUG reqwest::connect] starting new connection: http://localhost:11434/
[2024-10-28T15:00:52+01:00 DEBUG reqwest::connect] starting new connection: http://localhost:11434/
[2024-10-28T15:00:52+01:00 DEBUG reqwest::connect] starting new connection: http://localhost:11434/
```

Turns out we'd send a request on *every* change to settings.

Now, with this change, we only send a single request.

Release Notes:

- N/A

Co-authored-by: Bennet <bennet@zed.dev>
2024-10-28 15:40:50 +01:00
..
model Remove Qwen2 model (#18444) 2024-09-27 13:30:25 -04:00
provider ollama: Ensure only single task fetches models (#19830) 2024-10-28 15:40:50 +01:00
language_model.rs telemetry: Add language_name and model_provider (#18640) 2024-10-04 14:37:27 -04:00
provider.rs Add GitHub Copilot Chat Support (#14842) 2024-07-30 09:32:58 +02:00
rate_limiter.rs Allow customization of the model used for tool calling (#15479) 2024-07-30 16:18:53 +02:00
registry.rs assistant: Add support for displaying billing-related errors (#19082) 2024-10-11 13:22:45 -04:00
request.rs Allow Anthropic custom models to override temperature (#18160) 2024-09-20 14:59:12 -06:00
role.rs Restructure workflow step resolution and fix inserting newlines (#15720) 2024-08-05 09:18:06 +02:00
settings.rs Allow Anthropic custom models to override temperature (#18160) 2024-09-20 14:59:12 -06:00