Model discovery
A model catalog answers what is configured, not whether a request will succeed at this instant.
import { ExternalServiceProvider } from '@preternatural-js/client-sdk'
const publicModels = await client.models.list()
const openaiModels = await client.models.list({
provider: ExternalServiceProvider.openai
})
const productModels = await client.models.list({
productId: 'your-product-id',
provider: ExternalServiceProvider.openai
})Without productId, this reads the public gateway catalog without establishing a customer session. With productId, it authenticates the customer and limits results to providers configured for that product and models covered by its usage rules. A missing product is an error, not a successful empty catalog.
Use returned model IDs for your model selector. Keep the selected provider, product and model together in the request scope. A catalog result does not verify account authentication, current upstream quota, provider feature compatibility or service readiness.
The product rule editor prefers the project’s provider subset, but can show the broader catalog when that subset has no matches, and can retain an already-selected model outside it. Validate the product’s actual provider assignment and limits before sending requests.
Subscription models
A subscription relay uses native account model discovery, not this regular-product public catalog. Multiplexed catalogs can be a union with partial member coverage; visibility does not guarantee fallback on every member. Follow the relay’s generated native setup and its subscription details rather than treating public API-key model IDs as subscription entitlements.