·
6 commits
to main
since this release
Minor Changes
-
#94
2a8a7ccThanks @FranciscoMoretti! - ## Config defaults &defineConfighelperNew features
defineConfig()helper — new type-safe wrapper forchat.config.ts. The gateway type is inferred fromai.gateway, so autocomplete and type errors are scoped to the model IDs available in the chosen gateway. Replacesatisfies ConfigInputwithdefineConfig({...}).- Gateway-specific defaults — all AI config fields (models, tools, workflows) are now optional. Omitted fields are automatically filled from per-gateway defaults at runtime via
applyDefaults(). Onlyai.gatewayis required. chatjs configCLI command — new command that prints the fully-resolved configuration for the current project, applying all defaults. Useful for debugging and verifying your setup.- Separate defaults per gateway —
vercel,openrouter,openai, andopenai-compatibleeach have their own typed defaults (ModelDefaultsFor<G>), ensuring model IDs are validated against the correct gateway's model registry. - Stricter image/video tool schemas —
tools.imageandtools.videonow use a discriminated union:enabled: truerequires adefaultmodel, whileenabled: falsemakes it optional.
Breaking changes
None — existing configs using
satisfies ConfigInputcontinue to work. Migrating todefineConfig()is recommended for better DX but not required.