Finalize the bring your own key api (#255892)

* Start small

* start on new byok api

* Some more api work

* Hook up more of the API

* A single file with no errors yay!

* Some cleanup

* Slow and steady progress

* More code

* Add resolve

* Hate everything

* More progress on rewriting id

* Some error fixing

* Fix null service

* Use claude to fix tests

* Fix tests

* Fix tests

* More test fixing

* Some setup

* Some model picker stuff

* Fix model picker with new BYOK api

* Remove support for contirbuting to mdel picker action bar

* Adjust to allow for user prompting

* Add event

* Fix conflicts
This commit is contained in:
Logan Ramos
2025-07-18 13:42:55 -04:00
committed by GitHub
parent a426831dba
commit 8551a1d51d
19 changed files with 699 additions and 508 deletions

View File

@@ -15,22 +15,25 @@ suite('chat', () => {
disposables = [];
// Register a dummy default model which is required for a participant request to go through
disposables.push(lm.registerChatModelProvider('test-lm', {
async provideLanguageModelResponse(_messages, _options, _extensionId, _progress, _token) {
disposables.push(lm.registerChatModelProvider('test-lm-vendor', {
async prepareLanguageModelChat(_options, _token) {
return [{
id: 'test-lm',
name: 'test-lm',
family: 'test',
version: '1.0.0',
maxInputTokens: 100,
maxOutputTokens: 100,
isDefault: true,
isUserSelectable: true
}];
},
async provideLanguageModelChatResponse(_model, _messages, _options, _progress, _token) {
return undefined;
},
async provideTokenCount(_text, _token) {
async provideTokenCount(_model, _text, _token) {
return 1;
},
}, {
name: 'test-lm',
version: '1.0.0',
family: 'test',
vendor: 'test-lm-vendor',
maxInputTokens: 100,
maxOutputTokens: 100,
isDefault: true,
isUserSelectable: true
}));
});