Skip to content

improvement: allow transformedData in hook results#1676

Open
mangopep wants to merge 1 commit into
Portkey-AI:mainfrom
mangopep:feature-include-hook-transformed-data
Open

improvement: allow transformedData in hook results#1676
mangopep wants to merge 1 commit into
Portkey-AI:mainfrom
mangopep:feature-include-hook-transformed-data

Conversation

@mangopep

Copy link
Copy Markdown

Description: (required)

  • Fixes Feature: Add transformedData to the hook_results #1651.
  • Adds an opt-in include_hook_transformed_data config flag.
  • Preserves transformedData inside hook_results only when explicitly enabled.
  • Keeps existing behavior unchanged by default, so transformed data is still omitted unless opted in.

Validation Screenshots

tests/unit/src/middlewares/hooks/index.test.ts

![hooks-index-test]
Screenshot 2026-05-31 at 7 39 31 AM

tests/unit/src/handlers/services/hooksService.test.ts

![hooks-service-test]
Screenshot 2026-05-31 at 7 40 32 AM

Tests Run/Test cases added: (required)

  • Added unit test for default behavior: transformedData is omitted
  • Added unit test for opt-in behavior: transformedData is included
  • npx jest tests/unit/src/middlewares/hooks/index.test.ts --runInBand
  • npx jest tests/unit/src/handlers/services/hooksService.test.ts --runInBand
  • npm run format:check
  • npm run build

Type of Change:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Add transformedData to the hook_results

2 participants