mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 07:20:43 +00:00
feat: carry manifest catalog discovery mode
This commit is contained in:
@@ -9,6 +9,9 @@ describe("manifest model catalog planner", () => {
|
||||
{
|
||||
id: "moonshot",
|
||||
modelCatalog: {
|
||||
discovery: {
|
||||
moonshot: "static",
|
||||
},
|
||||
providers: {
|
||||
Moonshot: {
|
||||
api: "openai-responses",
|
||||
@@ -32,6 +35,7 @@ describe("manifest model catalog planner", () => {
|
||||
{
|
||||
pluginId: "moonshot",
|
||||
provider: "moonshot",
|
||||
discovery: "static",
|
||||
rows: [
|
||||
{
|
||||
provider: "moonshot",
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { normalizeModelCatalogProviderRows } from "./normalize.js";
|
||||
import { normalizeModelCatalogProviderId } from "./refs.js";
|
||||
import type { ModelCatalog, NormalizedModelCatalogRow } from "./types.js";
|
||||
import type { ModelCatalog, ModelCatalogDiscovery, NormalizedModelCatalogRow } from "./types.js";
|
||||
|
||||
export type ManifestModelCatalogPlugin = {
|
||||
id: string;
|
||||
modelCatalog?: Pick<ModelCatalog, "providers">;
|
||||
modelCatalog?: Pick<ModelCatalog, "providers" | "discovery">;
|
||||
};
|
||||
|
||||
export type ManifestModelCatalogRegistry = {
|
||||
@@ -14,6 +14,7 @@ export type ManifestModelCatalogRegistry = {
|
||||
export type ManifestModelCatalogPlanEntry = {
|
||||
pluginId: string;
|
||||
provider: string;
|
||||
discovery?: ModelCatalogDiscovery;
|
||||
rows: readonly NormalizedModelCatalogRow[];
|
||||
};
|
||||
|
||||
@@ -113,6 +114,7 @@ function planManifestModelCatalogPluginEntries(params: {
|
||||
{
|
||||
pluginId: params.plugin.id,
|
||||
provider: normalizedProvider,
|
||||
discovery: params.plugin.modelCatalog?.discovery?.[normalizedProvider],
|
||||
rows,
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user