Releases: AbdallahAHO/funcai
Releases · AbdallahAHO/funcai
v1.2.0
Features
- add local LM Studio and Ollama providers (#4) (
2e3b58b)
Fixes
- use npm 11 via npx for release publish (
c5d8337) - remove npm self-upgrade from release workflow (
5ba1944) - refresh OpenRouter registry (
a86c98c)
Full Changelog: v1.1.0...v1.2.0
v1.1.0
Features
- refresh model registry, add listModels() helper, switch default to Gemini (
63975a5)
Fixes
- correct E2E test model ID prefix to google/ (
faa40f7) - upgrade npm to latest for OIDC trusted publishing (
aac70a6) - use npm publish for OIDC trusted publishing support (
630b353) - increase E2E test timeout to 60s (
aa0935d)
Full Changelog: v1.0.0...v1.1.0
v1.0.0
Initial Release
AI as a Function — define a Zod schema, get validated structured output back.
Features
- Core:
createAiFn()factory with typedai.fn()builder, Zod schema validation, retry with exponential backoff, fallback model chains, andAiFnErrorwith attempt history - Prompts:
definePrompt()for reusable configs,{{VARIABLE}}template injection, few-shot examples with optional chain-of-thought reasoning - Providers: OpenRouter provider with lazy init, response healing, usage accounting, and 55+ model registry with typed IDs
- Tracing: PostHog trace plugin with automatic userId/sessionId mapping
- Multimodal: Images, PDFs, and audio via
ContentPart[]input - Testing: Built-in
.mock()/.unmock()on every function,track()+unmockAll()for batch cleanup,validateExamples()for few-shot validation - CLI:
funcai generatefor prompt-as-code (.prompt.md → TypeScript),funcai scaffoldfor bootstrapping complete AI feature folders - Build: Dual ESM/CJS output, tree-shakeable, Node.js >= 20
Install
pnpm add funcai zod