v0.2.0
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_KEYifONLIST_API_KEYis not set, for easier migration. - NotFoundError: Dedicated error class for 404 responses from marketplace endpoints.
Full Changelog: v0.1.0...v0.2.0