Skip to content

Releases: AbdallahAHO/funcai

v1.2.0

07 Apr 08:51

Choose a tag to compare

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

16 Mar 08:46

Choose a tag to compare

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

16 Mar 08:24

Choose a tag to compare

Initial Release

AI as a Function — define a Zod schema, get validated structured output back.

Features

  • Core: createAiFn() factory with typed ai.fn() builder, Zod schema validation, retry with exponential backoff, fallback model chains, and AiFnError with 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 generate for prompt-as-code (.prompt.md → TypeScript), funcai scaffold for bootstrapping complete AI feature folders
  • Build: Dual ESM/CJS output, tree-shakeable, Node.js >= 20

Install

pnpm add funcai zod

npm: https://www.npmjs.com/package/funcai