Skip to main content
This release has two breaking changes:
  1. The llm:call_cost hook event was renamed to cost:llm:request;
  2. The cost object in events and LLM responses has a new format.

Migration steps

Event renaming

Update each hook that listens for llm:call_cost to use cost:llm:request:

Before

After

Cost payload

On the @outputai/llm module, the cost field in both the .generateText() response and the cost:llm:request event has a new format:

Before

After

Note: components used to be an object; it is now an array.