mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 09:00:42 +00:00
fix: adapt models registry fallback to release branch
This commit is contained in:
@@ -135,16 +135,17 @@ export async function modelsListCommand(
|
||||
return;
|
||||
}
|
||||
rows.length = 0;
|
||||
const fallbackRegistry = modelRegistry as ModelRegistry | undefined;
|
||||
rowContext = buildRowContext(false);
|
||||
seenKeys = appendDiscoveredRows({
|
||||
rows,
|
||||
models: modelRegistry?.getAll() ?? [],
|
||||
models: fallbackRegistry?.getAll() ?? [],
|
||||
context: rowContext,
|
||||
});
|
||||
if (modelRegistry) {
|
||||
if (fallbackRegistry) {
|
||||
await appendCatalogSupplementRows({
|
||||
rows,
|
||||
modelRegistry,
|
||||
modelRegistry: fallbackRegistry,
|
||||
context: rowContext,
|
||||
seenKeys,
|
||||
});
|
||||
|
||||
@@ -162,7 +162,6 @@ describe("loadProviderCatalogModelsForList", () => {
|
||||
expect.objectContaining({
|
||||
onlyPluginIds: ["moonshot"],
|
||||
requireCompleteDiscoveryEntryCoverage: true,
|
||||
discoveryEntriesOnly: true,
|
||||
}),
|
||||
);
|
||||
});
|
||||
@@ -206,7 +205,6 @@ describe("loadProviderCatalogModelsForList", () => {
|
||||
expect.objectContaining({
|
||||
onlyPluginIds: ["ollama"],
|
||||
requireCompleteDiscoveryEntryCoverage: true,
|
||||
discoveryEntriesOnly: true,
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
@@ -89,7 +89,6 @@ export async function hasProviderStaticCatalogForFilter(params: {
|
||||
onlyPluginIds: scopedPluginIds,
|
||||
includeUntrustedWorkspacePlugins: false,
|
||||
requireCompleteDiscoveryEntryCoverage: true,
|
||||
discoveryEntriesOnly: true,
|
||||
});
|
||||
return providers.some(
|
||||
(provider) =>
|
||||
@@ -159,7 +158,6 @@ export async function loadProviderCatalogModelsForList(params: {
|
||||
onlyPluginIds: scopedPluginIds,
|
||||
includeUntrustedWorkspacePlugins: false,
|
||||
requireCompleteDiscoveryEntryCoverage: params.staticOnly === true,
|
||||
discoveryEntriesOnly: params.staticOnly === true,
|
||||
})
|
||||
).filter(
|
||||
(provider) =>
|
||||
|
||||
Reference in New Issue
Block a user