language_model: Denote the availability of language models (#15660)

This PR updates the `LanguageModel` trait with a new method for denoting
the availability of a model.

Right now we have two variants:

- `Public` for models that have no additional restrictions (other than
their respective setup/authentication requirements)
- `RequiresPlan` for models that require a specific Zed plan

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2024-08-01 18:26:27 -04:00 committed by GitHub
parent 906d9736d5
commit 5e011ab029
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 73 additions and 13 deletions

View file

@ -109,6 +109,7 @@ impl<T: PopoverTrigger> RenderOnce for ModelSelector<T> {
let id = available_model.id();
let provider_id = available_model.provider_id();
let model_name = available_model.name().0.clone();
let _availability = available_model.availability();
let selected_model = selected_model.clone();
let selected_provider = selected_provider.clone();
move |_| {