Add provider_id context to PostStreamingResponseEvent

Created on 28 May 2025, 7 days ago

Problem/Motivation

Currently, the PostStreamingResponseEvent only contains some basic data regarding output and metadata.
It does not store information about which provider ID the post streaming response is coming from, in contrary to \Drupal\ai\Event\PostGenerateResponseEvent, which does provide a getProviderId method.

For the AI Usage Limits module, and probably others reacting to this event as well, it would be essential information to know which AI provider has triggered this event exactly.

Proposed resolution

- Add optional setProviderId() and getProviderId() methods to the event, and make sure implementing logic is able to provide a value for it.

📌 Task
Status

Active

Version

1.1

Component

AI Core module

Created by

🇧🇪Belgium svendecabooter Gent

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024