Releases: OnlistTeam/typescript-sdk
Releases · OnlistTeam/typescript-sdk
Release list
v0.2.0
What's New
Declaration Merging for Provider Routing
The provider field on chat.completions.create() now type-checks natively — no @ts-expect-error needed:
const response = await client.chat.completions.create({
model: "openai/gpt-4o",
messages: [{ role: "user", content: "Hello" }],
provider: { sort: "price", allow_fallbacks: true },
});Rankings API
Access model and app usage leaderboards:
const rankings = await client.marketplace.rankings.models();
const apps = await client.marketplace.rankings.apps();Marketplace Retry
Automatic retries with exponential backoff and jitter for transient failures (408, 429, 5xx). Configurable via maxRetries (default: 2).
Other Improvements
- OPENAI_API_KEY fallback: The client reads
OPENAI_API_KEYifONLIST_API_KEYis not set, for easier migration. - NotFoundError: Dedicated error class for 404 responses from marketplace endpoints.
- Cleaner types: Removed
[key: string]: unknownindex signatures from model and provider interfaces for better autocomplete. - JSDoc: All exported classes, interfaces, and methods now include documentation comments.
Full Changelog: v0.1.0...v0.2.0