Skip to content

Commit 6d84622

Browse files
authored
refactor(agents): privatize model catalog types (#106801)
1 parent 90a545b commit 6d84622

3 files changed

Lines changed: 4 additions & 8 deletions

File tree

‎scripts/deadcode-exports.baseline.mjs‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -785,10 +785,6 @@ export const KNIP_UNUSED_EXPORT_BASELINE = [
785785
"src/agents/mcp-ui-resource.ts: testing",
786786
"src/agents/media-generation-task-status-shared.ts: findRecentStartedMediaGenerationTaskForSession",
787787
"src/agents/media-generation-task-status-shared.ts: resetRecentMediaGenerationDuplicateGuardsForTests",
788-
"src/agents/model-catalog-route.ts: ModelCatalogLogicalIdentity",
789-
"src/agents/model-catalog-route.ts: ModelCatalogLogicalOverrides",
790-
"src/agents/model-catalog-route.ts: ModelCatalogRouteMatcher",
791-
"src/agents/model-catalog-visibility.ts: LogicalModelCatalogEntryState",
792788
"src/agents/model-fallback-observation.ts: resetModelFallbackDecisionLogCoalescingForTest",
793789
"src/agents/model-fallback.ts: FallbackSummaryError",
794790
"src/agents/model-fallback.ts: testing",

‎src/agents/model-catalog-route.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ import type { ProviderModelRouteCandidate } from "../plugin-sdk/provider-model-t
99
import type { ModelCatalogEntry } from "./model-catalog.types.js";
1010
import { splitTrailingAuthProfile } from "./model-ref-profile.js";
1111

12-
export type ModelCatalogRouteMatcher = (
12+
type ModelCatalogRouteMatcher = (
1313
entry: ModelCatalogEntry,
1414
route: ProviderModelRouteCandidate,
1515
) => boolean;
1616

17-
export type ModelCatalogLogicalIdentity = { id: string; key: string };
17+
type ModelCatalogLogicalIdentity = { id: string; key: string };
1818

1919
/** Provider-owned catalog equivalence and exact physical-route matching. */
2020
export type ModelCatalogRoutePolicy = {
@@ -33,7 +33,7 @@ export type ModelCatalogRouteProjection =
3333
policy: ModelCatalogRoutePolicy;
3434
};
3535

36-
export type ModelCatalogLogicalOverrides = Partial<
36+
type ModelCatalogLogicalOverrides = Partial<
3737
Pick<ModelCatalogEntry, "name" | "contextWindow" | "contextTokens" | "reasoning" | "input">
3838
>;
3939

‎src/agents/model-catalog-visibility.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export type ModelCatalogAuthChecker = (
3535
) => boolean | Promise<boolean>;
3636
type ModelCatalogEntryAuthChecker = (entry: ModelCatalogEntry) => boolean | Promise<boolean>;
3737

38-
export type LogicalModelCatalogEntryState = {
38+
type LogicalModelCatalogEntryState = {
3939
authBacked: boolean;
4040
compatible: boolean;
4141
preferred: boolean;

0 commit comments

Comments
 (0)