@yeaft/webchat-agent 1.0.158 → 1.0.159
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.
- package/llm-config-cli.js +15 -1
- package/package.json +1 -1
package/llm-config-cli.js
CHANGED
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
discoverGitHubCopilotModels,
|
|
6
6
|
discoverOpenAICompatibleModels,
|
|
7
7
|
GITHUB_COPILOT_PROVIDER,
|
|
8
|
+
modelEntryForGitHubCopilotProvider,
|
|
8
9
|
modelIdsFromProviderModels,
|
|
9
10
|
} from './llm-model-discovery.js';
|
|
10
11
|
|
|
@@ -217,9 +218,22 @@ export async function useGitHubCopilot(config, options = {}) {
|
|
|
217
218
|
}
|
|
218
219
|
}
|
|
219
220
|
|
|
221
|
+
const providerModels = [...discovery.providerModels];
|
|
222
|
+
if (allowUnknown) {
|
|
223
|
+
const known = new Set(discoveredIds);
|
|
224
|
+
for (const model of [primaryModel, fastModel].filter(Boolean)) {
|
|
225
|
+
if (known.has(model)) continue;
|
|
226
|
+
providerModels.push(modelEntryForGitHubCopilotProvider(model));
|
|
227
|
+
known.add(model);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
220
231
|
const next = { ...config };
|
|
221
232
|
const providers = Array.isArray(config.providers) ? [...config.providers] : [];
|
|
222
|
-
const provider = {
|
|
233
|
+
const provider = {
|
|
234
|
+
...GITHUB_COPILOT_PROVIDER,
|
|
235
|
+
models: providerModels,
|
|
236
|
+
};
|
|
223
237
|
const index = providers.findIndex(p => p && p.name === provider.name);
|
|
224
238
|
if (index >= 0) providers[index] = provider;
|
|
225
239
|
else providers.push(provider);
|
package/package.json
CHANGED