Skip to content

feat: add -latest model aliases#114

Merged
AdirAmsalem merged 1 commit intomainfrom
latest-model-aliases
Apr 6, 2026
Merged

feat: add -latest model aliases#114
AdirAmsalem merged 1 commit intomainfrom
latest-model-aliases

Conversation

@AdirAmsalem
Copy link
Copy Markdown
Contributor

@AdirAmsalem AdirAmsalem commented Apr 6, 2026

Summary

Adds -latest convenience aliases (lucy-latest, lucy-vton-latest, lucy-restyle-latest, lucy-clip-latest, lucy-motion-latest, lucy-image-latest) that always point to the current latest version of each model family. These are resolved server-side, so the SDK passes them through as-is with no deprecation warnings.

This lets users opt into "always use the newest version" without updating their code when new model versions ship.

Usage

// Realtime
client.connect({ model: models.realtime("lucy-latest") });
client.connect({ model: models.realtime("lucy-vton-latest") });
client.connect({ model: models.realtime("lucy-restyle-latest") });

// Video (queue)
client.queue.submitAndPoll({ model: models.video("lucy-latest"), ... });
client.queue.submitAndPoll({ model: models.video("lucy-clip-latest"), ... });
client.queue.submitAndPoll({ model: models.video("lucy-restyle-latest"), ... });
client.queue.submitAndPoll({ model: models.video("lucy-motion-latest"), ... });

// Image (process)
client.process({ model: models.image("lucy-image-latest"), ... });

Test plan

  • Unit tests: 175 pass (includes alias resolution, surface validation, no deprecation warnings)
  • E2E tests: all 5 new -latest tests pass against live API
  • Lint: pnpm biome check clean

Note

Low Risk
Low risk: adds new model name literals/definitions and corresponding tests without changing existing canonical/deprecated behavior; main risk is accidental mismatch in alias schema/URL paths causing validation or routing errors.

Overview
Adds server-resolved -latest model aliases across realtime, video, and image surfaces (e.g. lucy-latest, lucy-restyle-latest, lucy-motion-latest, lucy-image-latest) by extending the SDK’s model name unions, input schema map, and model registry with new URL/queue paths.

Expands coverage with new unit assertions for alias typing/definitions (including dual-surface checks and ensuring no deprecation warnings) and E2E tests that exercise the new aliases against the Process/Queue APIs.

Reviewed by Cursor Bugbot for commit 97e714b. 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 Apr 6, 2026

Open in StackBlitz

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

commit: 97e714b

@AdirAmsalem AdirAmsalem merged commit f61e054 into main Apr 6, 2026
5 checks passed
@AdirAmsalem AdirAmsalem deleted the latest-model-aliases branch April 6, 2026 22:17
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Reviewed by Cursor Bugbot for commit 97e714b. Configure here.

.describe("The trajectory of the desired movement of the object in the image"),
seed: z.number().optional().describe("The seed to use for the generation"),
resolution: motionResolutionSchema,
}),
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicated motion schema risks future inconsistency

Medium Severity

The lucy-motion-latest entry in modelInputSchemas is a full copy-paste of the inline lucy-motion schema definition. Every other -latest alias reuses a named schema variable (videoEdit2Schema, restyleSchema, videoEditSchema, imageEditSchema), but the motion schema was defined inline and then duplicated. If the motion schema is later updated (e.g., constraint changes, new fields), only one copy may get updated, causing silent divergence between lucy-motion and lucy-motion-latest.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 97e714b. Configure here.

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