feat: carry manifest catalog discovery mode

This commit is contained in:
Shakker
2026-04-25 04:11:57 +01:00
parent 9e4a0e7f3c
commit 82a529aaaf
2 changed files with 8 additions and 2 deletions

View File

@@ -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",

View File

@@ -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,
},
];