@theia/ai-core 1.76.0-next.4 → 1.76.0-next.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/lib/browser/ai-core-frontend-module.d.ts.map +1 -1
  2. package/lib/browser/ai-core-frontend-module.js +4 -0
  3. package/lib/browser/ai-core-frontend-module.js.map +1 -1
  4. package/lib/browser/discovering-provider-contribution.d.ts +92 -0
  5. package/lib/browser/discovering-provider-contribution.d.ts.map +1 -0
  6. package/lib/browser/discovering-provider-contribution.js +189 -0
  7. package/lib/browser/discovering-provider-contribution.js.map +1 -0
  8. package/lib/browser/discovering-provider-contribution.spec.d.ts +2 -0
  9. package/lib/browser/discovering-provider-contribution.spec.d.ts.map +1 -0
  10. package/lib/browser/discovering-provider-contribution.spec.js +233 -0
  11. package/lib/browser/discovering-provider-contribution.spec.js.map +1 -0
  12. package/lib/browser/favorite-models-service.d.ts +135 -0
  13. package/lib/browser/favorite-models-service.d.ts.map +1 -0
  14. package/lib/browser/favorite-models-service.js +279 -0
  15. package/lib/browser/favorite-models-service.js.map +1 -0
  16. package/lib/browser/favorite-models-service.spec.d.ts +2 -0
  17. package/lib/browser/favorite-models-service.spec.d.ts.map +1 -0
  18. package/lib/browser/favorite-models-service.spec.js +277 -0
  19. package/lib/browser/favorite-models-service.spec.js.map +1 -0
  20. package/lib/browser/frontend-language-model-alias-registry.js +1 -1
  21. package/lib/browser/frontend-language-model-service.d.ts.map +1 -1
  22. package/lib/browser/frontend-language-model-service.js +8 -0
  23. package/lib/browser/frontend-language-model-service.js.map +1 -1
  24. package/lib/browser/frontend-language-model-service.spec.d.ts +2 -0
  25. package/lib/browser/frontend-language-model-service.spec.d.ts.map +1 -0
  26. package/lib/browser/frontend-language-model-service.spec.js +76 -0
  27. package/lib/browser/frontend-language-model-service.spec.js.map +1 -0
  28. package/lib/browser/index.d.ts +3 -0
  29. package/lib/browser/index.d.ts.map +1 -1
  30. package/lib/browser/index.js +3 -0
  31. package/lib/browser/index.js.map +1 -1
  32. package/lib/browser/model-discovery-status-service.d.ts +52 -0
  33. package/lib/browser/model-discovery-status-service.d.ts.map +1 -0
  34. package/lib/browser/model-discovery-status-service.js +110 -0
  35. package/lib/browser/model-discovery-status-service.js.map +1 -0
  36. package/lib/browser/model-discovery-status-service.spec.d.ts +2 -0
  37. package/lib/browser/model-discovery-status-service.spec.d.ts.map +1 -0
  38. package/lib/browser/model-discovery-status-service.spec.js +86 -0
  39. package/lib/browser/model-discovery-status-service.spec.js.map +1 -0
  40. package/lib/common/ai-core-preferences.d.ts +11 -0
  41. package/lib/common/ai-core-preferences.d.ts.map +1 -1
  42. package/lib/common/ai-core-preferences.js +37 -1
  43. package/lib/common/ai-core-preferences.js.map +1 -1
  44. package/lib/common/index.d.ts +2 -0
  45. package/lib/common/index.d.ts.map +1 -1
  46. package/lib/common/index.js +2 -0
  47. package/lib/common/index.js.map +1 -1
  48. package/lib/common/language-model-ordering.spec.d.ts +2 -0
  49. package/lib/common/language-model-ordering.spec.d.ts.map +1 -0
  50. package/lib/common/language-model-ordering.spec.js +72 -0
  51. package/lib/common/language-model-ordering.spec.js.map +1 -0
  52. package/lib/common/language-model-util.d.ts +17 -1
  53. package/lib/common/language-model-util.d.ts.map +1 -1
  54. package/lib/common/language-model-util.js +44 -1
  55. package/lib/common/language-model-util.js.map +1 -1
  56. package/lib/common/language-model.d.ts +21 -0
  57. package/lib/common/language-model.d.ts.map +1 -1
  58. package/lib/common/language-model.js +50 -1
  59. package/lib/common/language-model.js.map +1 -1
  60. package/lib/common/language-model.spec.js +36 -0
  61. package/lib/common/language-model.spec.js.map +1 -1
  62. package/lib/common/model-discovery-status.d.ts +112 -0
  63. package/lib/common/model-discovery-status.d.ts.map +1 -0
  64. package/lib/common/model-discovery-status.js +18 -0
  65. package/lib/common/model-discovery-status.js.map +1 -0
  66. package/lib/common/model-discovery-util.d.ts +46 -0
  67. package/lib/common/model-discovery-util.d.ts.map +1 -0
  68. package/lib/common/model-discovery-util.js +128 -0
  69. package/lib/common/model-discovery-util.js.map +1 -0
  70. package/lib/common/model-discovery-util.spec.d.ts +2 -0
  71. package/lib/common/model-discovery-util.spec.d.ts.map +1 -0
  72. package/lib/common/model-discovery-util.spec.js +95 -0
  73. package/lib/common/model-discovery-util.spec.js.map +1 -0
  74. package/lib/node/ai-core-backend-module.d.ts.map +1 -1
  75. package/lib/node/ai-core-backend-module.js +8 -0
  76. package/lib/node/ai-core-backend-module.js.map +1 -1
  77. package/lib/node/backend-language-model-registry.d.ts.map +1 -1
  78. package/lib/node/backend-language-model-registry.js +1 -0
  79. package/lib/node/backend-language-model-registry.js.map +1 -1
  80. package/lib/node/index.d.ts +2 -0
  81. package/lib/node/index.d.ts.map +1 -1
  82. package/lib/node/index.js +2 -0
  83. package/lib/node/index.js.map +1 -1
  84. package/lib/node/model-discovery-fetcher.d.ts +43 -0
  85. package/lib/node/model-discovery-fetcher.d.ts.map +1 -0
  86. package/lib/node/model-discovery-fetcher.js +85 -0
  87. package/lib/node/model-discovery-fetcher.js.map +1 -0
  88. package/lib/node/model-snapshot-store.d.ts +26 -0
  89. package/lib/node/model-snapshot-store.d.ts.map +1 -0
  90. package/lib/node/model-snapshot-store.js +73 -0
  91. package/lib/node/model-snapshot-store.js.map +1 -0
  92. package/lib/node/test/test-model-discovery-fetcher.d.ts +21 -0
  93. package/lib/node/test/test-model-discovery-fetcher.d.ts.map +1 -0
  94. package/lib/node/test/test-model-discovery-fetcher.js +54 -0
  95. package/lib/node/test/test-model-discovery-fetcher.js.map +1 -0
  96. package/package.json +11 -11
  97. package/src/browser/ai-core-frontend-module.ts +5 -0
  98. package/src/browser/discovering-provider-contribution.spec.ts +304 -0
  99. package/src/browser/discovering-provider-contribution.ts +241 -0
  100. package/src/browser/favorite-models-service.spec.ts +336 -0
  101. package/src/browser/favorite-models-service.ts +297 -0
  102. package/src/browser/frontend-language-model-alias-registry.ts +1 -1
  103. package/src/browser/frontend-language-model-service.spec.ts +86 -0
  104. package/src/browser/frontend-language-model-service.ts +9 -1
  105. package/src/browser/index.ts +3 -0
  106. package/src/browser/model-discovery-status-service.spec.ts +101 -0
  107. package/src/browser/model-discovery-status-service.ts +123 -0
  108. package/src/common/ai-core-preferences.ts +40 -0
  109. package/src/common/index.ts +2 -0
  110. package/src/common/language-model-ordering.spec.ts +83 -0
  111. package/src/common/language-model-util.ts +43 -0
  112. package/src/common/language-model.spec.ts +45 -0
  113. package/src/common/language-model.ts +54 -0
  114. package/src/common/model-discovery-status.ts +132 -0
  115. package/src/common/model-discovery-util.spec.ts +105 -0
  116. package/src/common/model-discovery-util.ts +129 -0
  117. package/src/node/ai-core-backend-module.ts +8 -0
  118. package/src/node/backend-language-model-registry.ts +1 -0
  119. package/src/node/index.ts +2 -0
  120. package/src/node/model-discovery-fetcher.ts +105 -0
  121. package/src/node/model-snapshot-store.ts +80 -0
  122. package/src/node/test/test-model-discovery-fetcher.ts +62 -0
@@ -0,0 +1,135 @@
1
+ import { Emitter, Event, PreferenceService } from '@theia/core';
2
+ import { DiscoveredModel, ModelDiscoveryStatus } from '../common/model-discovery-status';
3
+ import { ModelDiscoveryStatusService } from './model-discovery-status-service';
4
+ /**
5
+ * How many of a provider's models are offered without the user asking. Enough to cover a provider's
6
+ * current line-up (a flagship, a fast one, a cheap one and their immediate predecessors) without
7
+ * turning the model pickers back into a catalogue.
8
+ */
9
+ export declare const FEATURED_MODEL_COUNT = 5;
10
+ /** What {@link FavoriteModelsService} derives from what the providers last reported. */
11
+ export interface DerivedFavorites {
12
+ /** Fully qualified ids of the models that are offered without the user asking. */
13
+ readonly featured: Set<string>;
14
+ /** Model-id prefixes of the providers that participate in discovery. */
15
+ readonly discoveryPrefixes: Set<string>;
16
+ }
17
+ /**
18
+ * Decides which models the model picker in the AI chat input offers.
19
+ *
20
+ * Discovery registers everything a provider offers, including one entry per release, which is far
21
+ * more than anyone picks between while chatting. What that picker shows is therefore the *favorites*:
22
+ * the models that are featured automatically plus the ones the user marked. Everywhere a model is
23
+ * chosen deliberately — an agent's model, a model alias — every discovered model stays on offer.
24
+ *
25
+ * A model is featured when it is one of the {@link FEATURED_MODEL_COUNT} most recently released
26
+ * undated ids of its provider — so `claude-opus-5` is featured while `claude-opus-5-20260401` is
27
+ * not. Because the featured set is derived from each discovery rather than stored, a model released
28
+ * tomorrow is offered the day it appears, and the user cannot end up pinned to a stale line-up.
29
+ *
30
+ * Both directions are the user's to override, and only the override is stored: a model offered by
31
+ * default is taken out of the picker by an entry in {@link PREFERENCE_NAME_HIDDEN_MODELS}, any other
32
+ * model is put into it by an entry in {@link PREFERENCE_NAME_FAVORITE_MODELS}. A model nobody touched
33
+ * appears in neither.
34
+ *
35
+ * Models of a provider that does not participate in discovery — one whose models are configured by
36
+ * hand, or a custom endpoint — are all favorites: listing them *was* the user's choice.
37
+ */
38
+ export declare class FavoriteModelsService {
39
+ protected readonly preferenceService: PreferenceService;
40
+ protected readonly discoveryStatus: ModelDiscoveryStatusService;
41
+ protected readonly onDidChangeEmitter: Emitter<void>;
42
+ /** Fired when the marked models or the featured set change. */
43
+ readonly onDidChange: Event<void>;
44
+ /** Memoized {@link getDerived}, dropped whenever a discovery reports something new. */
45
+ protected derived: DerivedFavorites | undefined;
46
+ protected init(): void;
47
+ /** Whether the chat input's model picker offers this model, be it featured, marked or hand-configured. */
48
+ isFavorite(modelId: string): boolean;
49
+ /**
50
+ * Whether the picker would offer this model without the user marking it: one of the newest of a
51
+ * provider that discovers, or any model of a provider that does not. Nothing was discovered for
52
+ * the latter, so its models are there because someone put them there - a manually configured
53
+ * provider, or a custom endpoint. That is choice enough.
54
+ */
55
+ protected isOfferedByDefault(modelId: string): boolean;
56
+ /** Whether the model's provider reports a discovery status, i.e. whether featuring applies to it at all. */
57
+ protected participatesInDiscovery(modelId: string): boolean;
58
+ /**
59
+ * Whether the model is offered automatically because it is among its provider's newest, in which
60
+ * case it cannot be unmarked.
61
+ */
62
+ isFeatured(modelId: string): boolean;
63
+ /** The ids the user marked explicitly, the ones offered by default excluded. */
64
+ getFavorites(): string[];
65
+ /** The ids the user took out of the picker, which would otherwise be offered by default. */
66
+ getHidden(): string[];
67
+ /**
68
+ * Whether the user decided anything about this provider's models, i.e. whether resetting it to the
69
+ * models it offers by default would change what the picker shows.
70
+ *
71
+ * @param modelIdPrefix prefix of the provider's registered model ids, e.g. `openai`
72
+ */
73
+ hasOverrides(modelIdPrefix: string): boolean;
74
+ /**
75
+ * Drops what the user decided about one provider's models, so the picker shows the models that
76
+ * provider offers by default again. The other providers are left alone.
77
+ *
78
+ * @param modelIdPrefix prefix of the provider's registered model ids, e.g. `openai`
79
+ */
80
+ resetToDefaults(modelIdPrefix: string): Promise<void>;
81
+ /**
82
+ * Puts a model into the picker or takes it out of it, whichever the current state calls for. Only
83
+ * the deviation from the default is stored: a model offered by default is taken out by an entry in
84
+ * the hidden list, and any other by dropping its entry from the favorites (or adding one).
85
+ */
86
+ toggleFavorite(modelId: string): Promise<void>;
87
+ protected write(preferenceName: string, ids: string[]): Promise<void>;
88
+ /** The featured ids across all providers that participate in discovery, fully qualified. */
89
+ protected getFeatured(): Set<string>;
90
+ /**
91
+ * What the last discovery implies, computed once and kept until it changes. The chat input asks
92
+ * per model on every render, and ranking each provider's models per question would mean sorting
93
+ * the whole catalogue as many times as it has entries.
94
+ */
95
+ protected getDerived(): DerivedFavorites;
96
+ /**
97
+ * The models of one provider that are offered automatically: at most {@link FEATURED_MODEL_COUNT}
98
+ * of its undated ids. A release-pinned id is never featured — the undated form of the same model
99
+ * already is, and pinning a release is the deliberate choice the switch on its row makes.
100
+ *
101
+ * They are ranked by what the provider reports about them, in that order:
102
+ *
103
+ * 1. most recently released, where the provider reports release dates (Anthropic, OpenAI);
104
+ * 2. a `-latest` pointer the provider maintains at the current model of a family, which only
105
+ * decides where there are no dates: a provider that reports them dates its pointers as well;
106
+ * 3. highest version in the id, which is what is left for Gemini — the naming of those models
107
+ * carries their generation (`gemini-3.7-flash` over `gemini-2.5-pro`).
108
+ *
109
+ * What the model aliases name has no say in this: an alias is a curated list of its own, pointing
110
+ * at the model a purpose should use, which is a different question from which models are worth
111
+ * offering in the picker.
112
+ *
113
+ * An explicitly configured list (`modelOverrides`) is featured in full: the user named it. So is a
114
+ * provider's own nomination ({@link DiscoveredModel.featured}), which a provider makes when the
115
+ * generic ranking cannot serve it — Copilot carries models of many vendors and nominates one each
116
+ * of the three the other providers offer directly, where "the newest five" would pick five of
117
+ * whichever vendor numbers its models highest.
118
+ */
119
+ protected selectFeatured(status: ModelDiscoveryStatus): DiscoveredModel[];
120
+ /** Orders two candidates of the same provider; `index` preserves the reported order as the last resort. */
121
+ protected compareFeatured(left: {
122
+ model: DiscoveredModel;
123
+ index: number;
124
+ }, right: {
125
+ model: DiscoveredModel;
126
+ index: number;
127
+ }): number;
128
+ /**
129
+ * Drops the marked and hidden ids of a provider that a successful discovery no longer offers, so
130
+ * that neither list accumulates models that no longer exist. Only a live discovery prunes: a
131
+ * cached result, a failure or a missing credential says nothing about what the provider offers.
132
+ */
133
+ protected pruneFavorites(status: ModelDiscoveryStatus): void;
134
+ }
135
+ //# sourceMappingURL=favorite-models-service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"favorite-models-service.d.ts","sourceRoot":"","sources":["../../src/browser/favorite-models-service.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAmB,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGjF,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAEzF,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAE/E;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,IAAI,CAAC;AAEtC,wFAAwF;AACxF,MAAM,WAAW,gBAAgB;IAC7B,kFAAkF;IAClF,QAAQ,CAAC,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC/B,wEAAwE;IACxE,QAAQ,CAAC,iBAA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AC;IAIpC;;;;OAIG;IACH,SAAS,CAAC,UAAU,IAAI,gBAAgB;IAgBxC;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,SAAS,CAAC,cAAc,CAAC,MAAM,EAAE,oBAAoB,GAAG,eAAe,EAAE;IAiBzE,2GAA2G;IAC3G,SAAS,CAAC,eAAe,CACrB,IAAI,EAAE;QAAE,KAAK,EAAE,eAAe,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAC/C,KAAK,EAAE;QAAE,KAAK,EAAE,eAAe,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GACjD,MAAM;IAgBT;;;;OAIG;IACH,SAAS,CAAC,cAAc,CAAC,MAAM,EAAE,oBAAoB,GAAG,IAAI;CAc/D"}
@@ -0,0 +1,279 @@
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2026 EclipseSource GmbH.
4
+ //
5
+ // This program and the accompanying materials are made available under the
6
+ // terms of the Eclipse Public License v. 2.0 which is available at
7
+ // http://www.eclipse.org/legal/epl-2.0.
8
+ //
9
+ // This Source Code may also be made available under the following Secondary
10
+ // Licenses when the conditions for such availability set forth in the Eclipse
11
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
+ // with the GNU Classpath Exception which is available at
13
+ // https://www.gnu.org/software/classpath/license.html.
14
+ //
15
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
+ // *****************************************************************************
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.FavoriteModelsService = exports.FEATURED_MODEL_COUNT = void 0;
19
+ const tslib_1 = require("tslib");
20
+ const core_1 = require("@theia/core");
21
+ const inversify_1 = require("@theia/core/shared/inversify");
22
+ const ai_core_preferences_1 = require("../common/ai-core-preferences");
23
+ const model_discovery_util_1 = require("../common/model-discovery-util");
24
+ const model_discovery_status_service_1 = require("./model-discovery-status-service");
25
+ /**
26
+ * How many of a provider's models are offered without the user asking. Enough to cover a provider's
27
+ * current line-up (a flagship, a fast one, a cheap one and their immediate predecessors) without
28
+ * turning the model pickers back into a catalogue.
29
+ */
30
+ exports.FEATURED_MODEL_COUNT = 5;
31
+ /**
32
+ * Decides which models the model picker in the AI chat input offers.
33
+ *
34
+ * Discovery registers everything a provider offers, including one entry per release, which is far
35
+ * more than anyone picks between while chatting. What that picker shows is therefore the *favorites*:
36
+ * the models that are featured automatically plus the ones the user marked. Everywhere a model is
37
+ * chosen deliberately — an agent's model, a model alias — every discovered model stays on offer.
38
+ *
39
+ * A model is featured when it is one of the {@link FEATURED_MODEL_COUNT} most recently released
40
+ * undated ids of its provider — so `claude-opus-5` is featured while `claude-opus-5-20260401` is
41
+ * not. Because the featured set is derived from each discovery rather than stored, a model released
42
+ * tomorrow is offered the day it appears, and the user cannot end up pinned to a stale line-up.
43
+ *
44
+ * Both directions are the user's to override, and only the override is stored: a model offered by
45
+ * default is taken out of the picker by an entry in {@link PREFERENCE_NAME_HIDDEN_MODELS}, any other
46
+ * model is put into it by an entry in {@link PREFERENCE_NAME_FAVORITE_MODELS}. A model nobody touched
47
+ * appears in neither.
48
+ *
49
+ * Models of a provider that does not participate in discovery — one whose models are configured by
50
+ * hand, or a custom endpoint — are all favorites: listing them *was* the user's choice.
51
+ */
52
+ let FavoriteModelsService = class FavoriteModelsService {
53
+ constructor() {
54
+ this.onDidChangeEmitter = new core_1.Emitter();
55
+ /** Fired when the marked models or the featured set change. */
56
+ this.onDidChange = this.onDidChangeEmitter.event;
57
+ }
58
+ init() {
59
+ this.discoveryStatus.onDidChange(status => {
60
+ this.derived = undefined;
61
+ this.pruneFavorites(status);
62
+ this.onDidChangeEmitter.fire();
63
+ });
64
+ this.preferenceService.onPreferenceChanged(event => {
65
+ if (event.preferenceName === ai_core_preferences_1.PREFERENCE_NAME_FAVORITE_MODELS || event.preferenceName === ai_core_preferences_1.PREFERENCE_NAME_HIDDEN_MODELS) {
66
+ this.onDidChangeEmitter.fire();
67
+ }
68
+ });
69
+ }
70
+ /** Whether the chat input's model picker offers this model, be it featured, marked or hand-configured. */
71
+ isFavorite(modelId) {
72
+ if (this.getHidden().includes(modelId)) {
73
+ return false;
74
+ }
75
+ return this.isOfferedByDefault(modelId) || this.getFavorites().includes(modelId);
76
+ }
77
+ /**
78
+ * Whether the picker would offer this model without the user marking it: one of the newest of a
79
+ * provider that discovers, or any model of a provider that does not. Nothing was discovered for
80
+ * the latter, so its models are there because someone put them there - a manually configured
81
+ * provider, or a custom endpoint. That is choice enough.
82
+ */
83
+ isOfferedByDefault(modelId) {
84
+ return !this.participatesInDiscovery(modelId) || this.isFeatured(modelId);
85
+ }
86
+ /** Whether the model's provider reports a discovery status, i.e. whether featuring applies to it at all. */
87
+ participatesInDiscovery(modelId) {
88
+ const separator = modelId.indexOf('/');
89
+ if (separator <= 0) {
90
+ return false;
91
+ }
92
+ return this.getDerived().discoveryPrefixes.has(modelId.substring(0, separator));
93
+ }
94
+ /**
95
+ * Whether the model is offered automatically because it is among its provider's newest, in which
96
+ * case it cannot be unmarked.
97
+ */
98
+ isFeatured(modelId) {
99
+ return this.getFeatured().has(modelId);
100
+ }
101
+ /** The ids the user marked explicitly, the ones offered by default excluded. */
102
+ getFavorites() {
103
+ return this.preferenceService.get(ai_core_preferences_1.PREFERENCE_NAME_FAVORITE_MODELS, []);
104
+ }
105
+ /** The ids the user took out of the picker, which would otherwise be offered by default. */
106
+ getHidden() {
107
+ return this.preferenceService.get(ai_core_preferences_1.PREFERENCE_NAME_HIDDEN_MODELS, []);
108
+ }
109
+ /**
110
+ * Whether the user decided anything about this provider's models, i.e. whether resetting it to the
111
+ * models it offers by default would change what the picker shows.
112
+ *
113
+ * @param modelIdPrefix prefix of the provider's registered model ids, e.g. `openai`
114
+ */
115
+ hasOverrides(modelIdPrefix) {
116
+ return [...this.getFavorites(), ...this.getHidden()].some(id => id.startsWith(`${modelIdPrefix}/`));
117
+ }
118
+ /**
119
+ * Drops what the user decided about one provider's models, so the picker shows the models that
120
+ * provider offers by default again. The other providers are left alone.
121
+ *
122
+ * @param modelIdPrefix prefix of the provider's registered model ids, e.g. `openai`
123
+ */
124
+ async resetToDefaults(modelIdPrefix) {
125
+ for (const preferenceName of [ai_core_preferences_1.PREFERENCE_NAME_FAVORITE_MODELS, ai_core_preferences_1.PREFERENCE_NAME_HIDDEN_MODELS]) {
126
+ const ids = this.preferenceService.get(preferenceName, []);
127
+ const kept = ids.filter(id => !id.startsWith(`${modelIdPrefix}/`));
128
+ if (kept.length !== ids.length) {
129
+ await this.write(preferenceName, kept);
130
+ }
131
+ }
132
+ }
133
+ /**
134
+ * Puts a model into the picker or takes it out of it, whichever the current state calls for. Only
135
+ * the deviation from the default is stored: a model offered by default is taken out by an entry in
136
+ * the hidden list, and any other by dropping its entry from the favorites (or adding one).
137
+ */
138
+ async toggleFavorite(modelId) {
139
+ const favorites = this.getFavorites();
140
+ const hidden = this.getHidden();
141
+ if (this.isFavorite(modelId)) {
142
+ if (favorites.includes(modelId)) {
143
+ await this.write(ai_core_preferences_1.PREFERENCE_NAME_FAVORITE_MODELS, favorites.filter(id => id !== modelId));
144
+ }
145
+ if (this.isOfferedByDefault(modelId)) {
146
+ await this.write(ai_core_preferences_1.PREFERENCE_NAME_HIDDEN_MODELS, [...hidden, modelId]);
147
+ }
148
+ return;
149
+ }
150
+ if (hidden.includes(modelId)) {
151
+ await this.write(ai_core_preferences_1.PREFERENCE_NAME_HIDDEN_MODELS, hidden.filter(id => id !== modelId));
152
+ }
153
+ // A model that was hidden while it was featured and has since fallen out of the featured set
154
+ // needs a mark of its own, or removing the entry would not bring it back.
155
+ if (!this.isOfferedByDefault(modelId)) {
156
+ await this.write(ai_core_preferences_1.PREFERENCE_NAME_FAVORITE_MODELS, [...favorites, modelId]);
157
+ }
158
+ }
159
+ async write(preferenceName, ids) {
160
+ await this.preferenceService.set(preferenceName, ids, core_1.PreferenceScope.User);
161
+ }
162
+ /** The featured ids across all providers that participate in discovery, fully qualified. */
163
+ getFeatured() {
164
+ return this.getDerived().featured;
165
+ }
166
+ /**
167
+ * What the last discovery implies, computed once and kept until it changes. The chat input asks
168
+ * per model on every render, and ranking each provider's models per question would mean sorting
169
+ * the whole catalogue as many times as it has entries.
170
+ */
171
+ getDerived() {
172
+ if (!this.derived) {
173
+ const featured = new Set();
174
+ const discoveryPrefixes = new Set();
175
+ for (const status of this.discoveryStatus.getStatuses()) {
176
+ const prefix = status.modelIdPrefix ?? status.providerId;
177
+ discoveryPrefixes.add(prefix);
178
+ for (const model of this.selectFeatured(status)) {
179
+ featured.add(`${prefix}/${model.id}`);
180
+ }
181
+ }
182
+ this.derived = { featured, discoveryPrefixes };
183
+ }
184
+ return this.derived;
185
+ }
186
+ /**
187
+ * The models of one provider that are offered automatically: at most {@link FEATURED_MODEL_COUNT}
188
+ * of its undated ids. A release-pinned id is never featured — the undated form of the same model
189
+ * already is, and pinning a release is the deliberate choice the switch on its row makes.
190
+ *
191
+ * They are ranked by what the provider reports about them, in that order:
192
+ *
193
+ * 1. most recently released, where the provider reports release dates (Anthropic, OpenAI);
194
+ * 2. a `-latest` pointer the provider maintains at the current model of a family, which only
195
+ * decides where there are no dates: a provider that reports them dates its pointers as well;
196
+ * 3. highest version in the id, which is what is left for Gemini — the naming of those models
197
+ * carries their generation (`gemini-3.7-flash` over `gemini-2.5-pro`).
198
+ *
199
+ * What the model aliases name has no say in this: an alias is a curated list of its own, pointing
200
+ * at the model a purpose should use, which is a different question from which models are worth
201
+ * offering in the picker.
202
+ *
203
+ * An explicitly configured list (`modelOverrides`) is featured in full: the user named it. So is a
204
+ * provider's own nomination ({@link DiscoveredModel.featured}), which a provider makes when the
205
+ * generic ranking cannot serve it — Copilot carries models of many vendors and nominates one each
206
+ * of the three the other providers offer directly, where "the newest five" would pick five of
207
+ * whichever vendor numbers its models highest.
208
+ */
209
+ selectFeatured(status) {
210
+ const discovered = status.discovered ?? [];
211
+ if (status.state === 'overridden') {
212
+ return [...discovered];
213
+ }
214
+ const nominated = discovered.filter(model => model.featured);
215
+ if (nominated.length > 0) {
216
+ return nominated;
217
+ }
218
+ return discovered
219
+ .filter(model => model_discovery_util_1.DiscoveredModels.undatedId(model.id) === undefined)
220
+ .map((model, index) => ({ model, index }))
221
+ .sort((left, right) => this.compareFeatured(left, right))
222
+ .slice(0, exports.FEATURED_MODEL_COUNT)
223
+ .map(entry => entry.model);
224
+ }
225
+ /** Orders two candidates of the same provider; `index` preserves the reported order as the last resort. */
226
+ compareFeatured(left, right) {
227
+ const byRelease = (right.model.released ?? 0) - (left.model.released ?? 0);
228
+ if (byRelease !== 0) {
229
+ return byRelease;
230
+ }
231
+ // Only where a provider reports no dates: a pointer at its current model of a family is as
232
+ // current as a model gets, and it carries no version, so it would otherwise sort behind every
233
+ // id that does. Where there are dates, the pointer carries one too and has been ordered by it.
234
+ const byPointer = Number(model_discovery_util_1.DiscoveredModels.isLatestPointer(right.model.id)) - Number(model_discovery_util_1.DiscoveredModels.isLatestPointer(left.model.id));
235
+ if (byPointer !== 0) {
236
+ return byPointer;
237
+ }
238
+ const byVersion = model_discovery_util_1.DiscoveredModels.compareByVersion(left.model.id, right.model.id);
239
+ return byVersion !== 0 ? byVersion : left.index - right.index;
240
+ }
241
+ /**
242
+ * Drops the marked and hidden ids of a provider that a successful discovery no longer offers, so
243
+ * that neither list accumulates models that no longer exist. Only a live discovery prunes: a
244
+ * cached result, a failure or a missing credential says nothing about what the provider offers.
245
+ */
246
+ pruneFavorites(status) {
247
+ if (status.state !== 'ready' || status.fromCache || !status.discovered) {
248
+ return;
249
+ }
250
+ const prefix = status.modelIdPrefix ?? status.providerId;
251
+ const offered = new Set(status.discovered.map(model => `${prefix}/${model.id}`));
252
+ for (const preferenceName of [ai_core_preferences_1.PREFERENCE_NAME_FAVORITE_MODELS, ai_core_preferences_1.PREFERENCE_NAME_HIDDEN_MODELS]) {
253
+ const ids = this.preferenceService.get(preferenceName, []);
254
+ const kept = ids.filter(id => !id.startsWith(`${prefix}/`) || offered.has(id));
255
+ if (kept.length !== ids.length) {
256
+ this.write(preferenceName, kept);
257
+ }
258
+ }
259
+ }
260
+ };
261
+ exports.FavoriteModelsService = FavoriteModelsService;
262
+ tslib_1.__decorate([
263
+ (0, inversify_1.inject)(core_1.PreferenceService),
264
+ tslib_1.__metadata("design:type", Object)
265
+ ], FavoriteModelsService.prototype, "preferenceService", void 0);
266
+ tslib_1.__decorate([
267
+ (0, inversify_1.inject)(model_discovery_status_service_1.ModelDiscoveryStatusService),
268
+ tslib_1.__metadata("design:type", model_discovery_status_service_1.ModelDiscoveryStatusService)
269
+ ], FavoriteModelsService.prototype, "discoveryStatus", void 0);
270
+ tslib_1.__decorate([
271
+ (0, inversify_1.postConstruct)(),
272
+ tslib_1.__metadata("design:type", Function),
273
+ tslib_1.__metadata("design:paramtypes", []),
274
+ tslib_1.__metadata("design:returntype", void 0)
275
+ ], FavoriteModelsService.prototype, "init", null);
276
+ exports.FavoriteModelsService = FavoriteModelsService = tslib_1.__decorate([
277
+ (0, inversify_1.injectable)()
278
+ ], FavoriteModelsService);
279
+ //# sourceMappingURL=favorite-models-service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"favorite-models-service.js","sourceRoot":"","sources":["../../src/browser/favorite-models-service.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;AAEhF,sCAAiF;AACjF,4DAAiF;AACjF,uEAA+G;AAE/G,yEAAkE;AAClE,qFAA+E;AAE/E;;;;GAIG;AACU,QAAA,oBAAoB,GAAG,CAAC,CAAC;AAUtC;;;;;;;;;;;;;;;;;;;;GAoBG;AAEI,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAA3B;QAQgB,uBAAkB,GAAG,IAAI,cAAO,EAAQ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CA3BQ,qBAAqB;IADjC,IAAA,sBAAU,GAAE;GACA,qBAAqB,CA4OjC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=favorite-models-service.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"favorite-models-service.spec.d.ts","sourceRoot":"","sources":["../../src/browser/favorite-models-service.spec.ts"],"names":[],"mappings":""}