Optional
Readonly
onAn optional event fired when the available set of language models changes.
Get the list of available language models provided by this provider
Options which specify the calling context of this function
A cancellation token
The list of available language models
Returns the response for a chat request, passing the results to the progress callback.
The LanguageModelChatProvider
must emit the response parts to the progress callback as they are received from the language model.
The language model to use
The messages to include in the request
Options for the request
The progress to emit the streamed response chunks to
A cancellation token
A promise that resolves when the response is complete. Results are actually passed to the progress callback.
Returns the number of tokens for a given text using the model-specific tokenizer logic
The language model to use
The text to count tokens for
A cancellation token
The number of tokens
A LanguageModelChatProvider implements access to language models, which users can then use through the chat view, or through extension API by acquiring a LanguageModelChat. An example of this would be an OpenAI provider that provides models like gpt-5, o3, etc.
Stubbed