Skip to content

v0.1.2

Choose a tag to compare

@github-actions github-actions released this 11 Oct 12:55
· 4 commits to main since this release

Fixed

  • Token usage of streaming calls. stream() calls (including LangChain models with
    streaming, as used by @cap-js/agents) were recorded when the stream opened, without token
    usage. They are now recorded when the stream ends, with AI Core's usage, finish reason, request
    id and cost.
  • Errors inside a stream were not recorded, and the call counted as a success. They are now
    recorded as errors and classified from the error event AI Core sends (for example SERVER,
    RATE_LIMIT, CONTENT_FILTER).
  • cds build and cds deploy left out the plugin's models. The TokenUsageLog entity and
    the admin service were added to cds.env when the plugin loaded, but cds build rebuilds
    cds.env afterwards, so the MTA had no usage-log table and no admin service. The models now
    come from the plugin's .cdsrc.js and are computed from the app's final configuration
    (profiles and environment variables included). Apps that worked around this by listing the
    models in cds.requires.tokenOptimizer.model keep working and can remove the list.
  • Admin service for Fiori elements: the in-memory entities (UseCases, Models,
    ErrorCategories, StepSavings, PromptPrefixChanges, Exporters) answered $count=true
    with 0, so list reports showed empty tables, and UseCases and Models returned tokens as a
    nested object instead of the tokens_* columns of their OData metadata.

Changed

  • latencyMs of streaming calls now covers the whole answer instead of the time until the
    stream opened. A stream closed early by the caller, or not read within 10 minutes, is recorded
    at that point without usage and with a note in savings.notes.
  • The mock AI Core server answers streaming requests as server-sent events and has a
    stream_error scenario.