Skip to content

v0.2.0

Choose a tag to compare

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

What's New

Typed Marketplace Responses

models.list() now returns list[Model] instead of list[dict], giving full attribute access:

models = client.marketplace.models.list()
for m in models.data:
    print(m.id, m.name)  # was m["id"], m["name"]

ModelDetail and ProviderDetail now inherit from their base types instead of duplicating fields.

Rankings API

Access model and app usage leaderboards:

rankings = client.marketplace.rankings.models()
apps = client.marketplace.rankings.apps()

Context Manager Support

with Onlist() as client:
    response = client.chat.completions.create(...)
# httpx client is properly closed

async with AsyncOnlist() as client:
    response = await client.chat.completions.create(...)

Marketplace Retry

Automatic retries with exponential backoff and jitter for transient failures (408, 429, 5xx). Configurable via max_retries (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.

Full Changelog: v0.1.0...v0.2.0