Skip to content

Releases

Release 1.0.0

Choose a tag to compare

@kamilmysliwiec kamilmysliwiec released this 04 Dec 11:45
4331f55

Behaviour changes

  • Members marked @internal are no longer in the type declarations, and the types that public signatures name are now exported. Code that called an internal member no longer compiles; nothing changes at run time. describeModel() is no longer exported. (#93)
  • Invalid model pricing, token and cost budgets, and durable run limits now fail at startup. (#35, #38, #19, #12)

Bug fixes

  • fix(schemas): validate cached tool argument schemas by @donejeh in #11
  • fix(workflows): validate durable agent run limits by @donejeh in #12
  • fix(budgets): validate token and cost limits by @devchux in #19
  • fix(tools): unwrap observable exception-filter results by @rafaself in #22
  • fix(http): clean up streaming response resources by @devchux in #20
  • fix(models): preserve distinct fallback entries by @rafaself in #29
  • fix(workflows): keep approval keys unique when a provider reuses tool call ids by @johnnyhuirilef in #30
  • fix(ai): resolve retry, timeout, and resilience precedence by @rafaself in #26
  • fix(workflows): fail a response that repeats a tool call id (bd85567)
  • fix(models): validate language model pricing at startup by @sadatsajid in #35
  • fix(models): validate embedding model pricing at startup by @helmipradita in #38
  • fix(ai): report the usage of an answer that is not the object (e9ff213)
  • fix(ai): align retry jitter defaults by @rafaself in #48
  • fix(retry): honor retry-after with custom backoff by @rafaself in #52
  • fix(retry): read every retry-after http date as gmt by @kamilmysliwiec in #54
  • fix(workflows): list no pending approvals for a run that has ended by @ofri-peretz in #74

Dependencies

  • fix(deps): accept @nestjs/resilience and @nestjs/workflows 1.x by @kamilmysliwiec in #94

Full Changelog: 0.0.2...1.0.0

Release 0.0.2

Choose a tag to compare

@kamilmysliwiec kamilmysliwiec released this 06 Nov 20:26
8243e56
  • Merge pull request #8 from rafaself/feat/embedding-model-support (ebcdddd)
  • docs(embeddings): leave the embedding guide to the docs site (82420c9)
  • style: restore the formatting of untouched lines (c781506)
  • fix(embeddings): run the resilience policy around each request (c579e63)
  • docs(embeddings): document setup and execution limits (a21a2bc)
  • test(embeddings): add fakes and acceptance coverage (c7d4d01)
  • feat(embeddings): add resilient single and batch calls (dd2478c)
  • feat(embeddings): register and inject named models (08d49bd)
  • chore: describe the package on npm (#6) (d52c6c7)

Release 0.0.1

Choose a tag to compare

@kamilmysliwiec kamilmysliwiec released this 05 Nov 08:00
f8c8e5a

The first release of @nestjs/ai: language models for Nest applications, built on the AI SDK (ai 7).

  • Models: registered by name in AiModule.forRoot({ models }), from any @ai-sdk/* provider package, and called through AiService. generateText(), generateObject() with a schema, and streamText(). @InjectModel() injects one for your own AI SDK calls.
  • Reliable calls: timeouts, retries that honor retry-after, and fallback models, on @nestjs/resilience policies or presets of your own. Budgets and usage events carry each call's tokens and cost.
  • Agent functions: provider methods with @AgentFunction() are the tools a model may call. Guards, interceptors, pipes and exception filters run on every call, with the execution context type 'ai', and AiExecutionContext reads the call in them. One method can also be an MCP tool, with @nestjs/mcp's @Tool().
  • Streaming: answers stream to the AI SDK's useChat() on Express, Fastify and the Node adapter, with keep-alive comments while a function runs.
  • Durable runs: @nestjs/ai/workflows runs agents on @nestjs/workflows. A run survives restarts, can wait for a person's approval, and gives each function call an idempotency key.
  • Testing: @nestjs/ai/testing's FakeModel answers with text, tool calls, objects or errors, without a network.
  • Auth packages: with @nestjs/authentication 0.1.4 and @nestjs/authorization 0.1.2 or later, their global guard, @CurrentUser() and @Can() policies work on agent function calls.

Docs: https://docs.nestjs.com/ai/overview