Skip to content

Releases: OnlistTeam/typescript-sdk

Release list

v0.2.0

Choose a tag to compare

@onlist-io onlist-io released this 30 Jun 09:21

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_KEY if ONLIST_API_KEY is not set, for easier migration.
  • NotFoundError: Dedicated error class for 404 responses from marketplace endpoints.
  • Cleaner types: Removed [key: string]: unknown index 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