Add a provider
Add a new AI provider to better-vault: list it in the model catalog, then give it a model factory, an optional web-search tool and a way to list models.
A provider is added in two files: the model catalog and the provider factory.
Add it to the catalog
In lib/ai/catalog.ts, add the provider with its id, name, whether it needs a key, and its image models if it has any.
Wire it up
In lib/ai/providers.ts, create its AI SDK model factory, its built-in web-search tool if it has one, and the call that lists its models.
Rules
Model calls go through the provider's Vercel AI SDK package, never its HTTP API; listing models is the only exception. Web mode is offered only when the provider has a built-in search tool.
Take model ids from the provider package's types or its models endpoint, not from memory. Keys arrive in the request body and must never appear in logs or error messages.
Add a Studio tool
Create a new Studio tool in better-vault: a definition, a server prompt and output schema, an options dialog and a viewer, registered on client and server.
Translations
Translate the better-vault interface into a new language with i18next: copy the English files, register the language, and check that no keys are missing.