Skip to content

feat: expose SDK model registry exports#134

Merged
AdirAmsalem merged 2 commits into
mainfrom
sdk-model-registry-exports
May 13, 2026
Merged

feat: expose SDK model registry exports#134
AdirAmsalem merged 2 commits into
mainfrom
sdk-model-registry-exports

Conversation

@AdirAmsalem
Copy link
Copy Markdown
Contributor

@AdirAmsalem AdirAmsalem commented May 13, 2026

Expose SDK-owned model registry metadata so consumers can rely on canonical model names, alias normalization, and filtered model listings instead of duplicating model literals.
This keeps existing SDK model factories working while adding stable helpers for registry consumers and preserving *-latest as server-resolved moving targets.

import { isCanonicalModel, listModels, resolveCanonicalModelAlias } from "@decartai/sdk";

const canonical = resolveCanonicalModelAlias("lucy-pro-v2v"); // "lucy-clip"
const videoModels = listModels({ kind: "video", canonicalOnly: true });
const isCanonical = canonical !== undefined && isCanonicalModel(canonical);

Validated with unit tests, typecheck, and build.


Note

Medium Risk
Expands the SDK’s public surface area around model identifiers and adds new alias/listing logic; low runtime risk but moderate compatibility risk for consumers depending on prior exports/types.

Overview
Adds public model-registry exports from the package root (CanonicalModel, modelAliases, isModel/isCanonicalModel, resolveModelAlias/resolveCanonicalModelAlias, and listModels) so consumers can normalize model inputs and enumerate available models by kind.

Introduces explicit canonical model name schemas (excluding *-latest and deprecated aliases) while keeping existing model factories and broader model validation accepting legacy/latest names; unit tests are expanded to cover the new helpers, listing behavior, and to assert raw zod schemas are not exported from the root.

Reviewed by Cursor Bugbot for commit a3973ff. Bugbot is set up for automated code reviews on this repo. Configure here.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 13, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@decartai/sdk@134

commit: a3973ff

@AdirAmsalem AdirAmsalem changed the title [codex] Expose SDK model registry exports feat: expose SDK model registry exports May 13, 2026
@AdirAmsalem AdirAmsalem marked this pull request as ready for review May 13, 2026 08:52
@AdirAmsalem AdirAmsalem merged commit dbc8a77 into main May 13, 2026
5 checks passed
@AdirAmsalem AdirAmsalem deleted the sdk-model-registry-exports branch May 13, 2026 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant