Fix AI Feature Attribution for Customer Billing

Problem to solve

AI Gateway reporting shows high percentage of null values for feature_enabled_by_namespace_ids field. This prevents:

  • Accurate customer billing for AI features
  • Sales teams from showing customers their usage data
  • Proper revenue attribution

Why now?

  • Events in Duo Agent Platform (like receive_start_duo_workflow) are missing the feature_enabled_by_namespace_ids field
  • Field teams cannot report AI adoption/utilization to customers
  • Revenue attribution is broken

Proposed solution

Add feature_enabled_by_namespace_ids to the InternalEventAdditionalProperties for Duo Agent Platform events in server.py

Definition of done

  • feature_enabled_by_namespace_ids field is added to all Duo Agent Platform events
  • Field correctly captures which namespace enabled/pays for the feature (not just where it's used)
  • Percentage of null values for this field drops significantly (target: <10%)
  • AI Gateway can properly attribute usage to paying customers
Edited by Dasha Adushkina