languageModels.ts ×6

Frontier kind: Code frontier

unlabeled · c_1637b688c6e1

8 tests · 32352 LOC · 158 files · introduces 0 tests · 30 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
6 ranges30 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
3305 ranges32352 lines · 158 files · Browse complete extent
All tests (intent)
8 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

1 file ranked by introduced lines: 30 introduced LOC across 6 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/workbench/contrib/chat/common/languageModels.ts 30 introduced LOC · 6 ranges

Open complete file

1145 const perModelConfigurations = new Map<string, IStringDictionary<unknown>>();
1146 for (const group of groups) {
1147 > if (group.vendor !== vendorId) { languageModels.ts
1148 continue;
1149 }
1151 > // For vendors without a configuration schema whose models were already
1152 > // resolved in the initial (groupless) load, groups only carry per-model
1153 > // settings and should not trigger a separate model resolution call.
1154 > // Instead, apply the per-model config to the already-resolved models.
1155 > if (!vendor.configuration && allModels.length > 0) {
1156 if (group.settings) {
1157 for (const model of allModels) {
1166 continue;
1167 }
1169 > const configuration = await this._resolveConfiguration(group, vendor.configuration);
1170 >
1171 > try {
1172 > const models = await provider.provideLanguageModelChatInfo({ group: group.name, silent, configuration }, CancellationToken.None);
1173 > if (models.length) {
1174 > // Provide a sensible default for `metadata.detail` so that
1175 > // multiple instances of the same vendor (e.g. multiple
1176 > // Ollama servers) are distinguishable in the model picker.
1177 > // Providers that supply their own `detail` keep it; when
1178 > // the provider does not set one, fall back to the user-
1179 > // configured group name.
1180 > for (let i = 0; i < models.length; i++) {
1181 > if (!models[i].metadata.detail) {
1182 models[i] = { ...models[i], metadata: { ...models[i].metadata, detail: group.name } };
1183 }
1185 > allModels.push(...models);
1186 > languageModelsGroups.push({ group, modelIdentifiers: models.map(m => m.identifier) });
1187 > }
1188 >
1189 > // Collect per-model configurations from the group
1190 > if (group.settings) {
1191 for (const model of models) {
1192 const modelConfig = group.settings[model.metadata.id];
1197 }
1198 }
1199 > } catch (error) { languageModels.ts
1200 languageModelsGroups.push({
1201 group,
1207 });
1208 }
1210
1211 const wasResolved = this._modelsGroups.has(vendorId);