Sometimes I like using the Vercel AI Gateway in VSCode. If I use up my subscription and need to do something small for a team project I can use a team budget. I can try out models that aren't available on my subscription. And sometimes there are model promotions that are worth trying out.
But constructing the JSON for chatLanguageModels.json for each model is always a pain. So one evening I put together a CLI that lets me search for a model in the Vercel AI Gateway and output the JSON that can be pasted in.
This was built inside of another project so it may need some adapation;
- The script depends on the
@better-fetch/fetch @clack/prompts consola sort-es supports-color zodpackages. - I built this in a mixed CommonJS/ESM project (old codebase still using typescript's CommonJS output for bundles; but with ESM cli scripts to get top-level await) so it uses
.mtsand amtsFixImporthelper that hacks around how Node.js and TypeScript c