Choosing AI models in your app
Every vibe that writes text or draws pictures uses a default model, and you can leave it at that. When the model itself is part of the fun — a picker in a writing app, a side-by-side of image models, a "try it with a different model" button — your app can ask which models it may use and hand one back.
Anyone who can open the app can see its list. Ask for it in your own words, the way you ask for anything else:
- "Let me pick which model writes the poem."
- "Compare image models side by side on the same picture, starting with a penguin riding a bicycle."
- "Add a model menu next to the Generate button."
What the list holds
The app asks for one kind at a time: image models (what <ImgGen> draws
with) or text models (what callAI answers with). Each kind comes back in
this order:
- Your own pick — the model you chose in your account settings for that kind, when you are signed in.
- The app's pick — the model this app's maker chose in the app's settings.
- The app's default — when the app has no pick of its own, the maker's account-wide pick, or else the platform's pick for this app.
- The curated catalog — every other model the platform offers for that kind.
A model appears once, at its first place in that order. One entry is marked as the default: the model the app uses when it names none, which is the app's pick when there is one. Each entry carries a display name and a short description, ready to show in a menu.
Picking a model
When the app names a model, that request uses it; when it names none, the app keeps its default. If you saved your own provider key in your app's model settings, your own key covers the model you chose in settings; other models run on credits, billed to the person making the request. Image editing — restyling a photo — keeps the platform's image-edit model unless the app has a specific reason to choose another.
For builders reading the code
The calls are listModels({ kind: "image" }) and listModels({ kind: "text" })
beside callAI, then callAI(prompt, { schema, model }) or
<ImgGen model={id} />. The full reference, with a picker and a side-by-side
audition you can copy, lives in the
callAI reference ("Choosing a model") and the
ImgGen reference ("Choosing a Model").