mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-03 06:51:53 +01:00
* api: allow byok model providers to hint at good edit tools For our own models, we set up the edit tools they get. For generic open- ended providers like OpenRouter, we will have a 'learning' functionality. But for BYOK providers that can provide a curated set of models (e.g. Cerebras) we should let them tell us what edit tool is appropriate for models they give us so users have a good experience from request 0. The API is intentionally loose because edit tools continue to evolve and our set of available tools will continue to change. So I do not surface any of these in actual API types, but give a string array of hints the provider can give us. If in the future none of the tools they hint are ones we recognize, as the space evolves, then the chat extension will fall back to its default learning behavior. * comment
31 lines
1014 B
TypeScript
31 lines
1014 B
TypeScript
/*---------------------------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
*--------------------------------------------------------------------------------------------*/
|
|
|
|
declare module 'vscode' {
|
|
|
|
// TODO - @lramos15 - Issue link
|
|
|
|
export interface LanguageModelChat {
|
|
/**
|
|
* The capabilities of the language model.
|
|
*/
|
|
readonly capabilities: {
|
|
/**
|
|
* Whether the language model supports tool calling.
|
|
*/
|
|
readonly supportsToolCalling: boolean;
|
|
/**
|
|
* Whether the language model supports image to text. This means it can take an image as input and produce a text response.
|
|
*/
|
|
readonly supportsImageToText: boolean;
|
|
|
|
/**
|
|
* The tools the model prefers for making file edits. See {@link LanguageModelChatCapabilities.editTools}.
|
|
*/
|
|
readonly editToolsHint?: readonly string[];
|
|
};
|
|
}
|
|
}
|