feat(policies): add allowedProviders field for dynamic policies#39
Merged
Conversation
Add allowedProviders field to dynamic policy types for GDPR, HIPAA, and RBI compliance. This enables restricting LLM routing to specific providers when a dynamic policy matches. - Add allowedProviders to DynamicPolicy, CreateDynamicPolicyRequest, UpdateDynamicPolicyRequest - Add Builder.allowedProviders() methods with Javadoc - Update CHANGELOG for v2.1.0
- Removed allowedProviders from DynamicPolicy, CreateDynamicPolicyRequest, UpdateDynamicPolicyRequest - Added category field to DynamicPolicy and request types - Added Javadoc documentation showing correct usage via action config - Backend stores allowed_providers in action.config, not as top-level field
Agent proxy (Issue #886) returns wrapped responses:
- List endpoints return {"policies": [...]}
- Single policy endpoints return {"policy": {...}}
Added wrapper types:
- DynamicPoliciesResponse
- DynamicPolicyResponse
Fixed methods:
- listDynamicPolicies
- getDynamicPolicy
- createDynamicPolicy
- updateDynamicPolicy
- toggleDynamicPolicy
- getEffectiveDynamicPolicies
- Add addTenantIdHeader() call to buildOrchestratorRequest() method - Ensures tenant identification works in community/self-hosted mode - Fixes 'Missing tenant ID' error for dynamic policy API calls
Agent proxy (Issue #886) returns wrapped responses:
- List endpoints: {"policies": [...]}
- Single item endpoints: {"policy": {...}}
Updated test stubs to return wrapped responses.
- Added SENSITIVE_DATA for policies returning 'sensitive-data' category - Fixes getEffectiveStaticPolicies validation errors
The server's dynamic policy update endpoint uses PUT, not PATCH. This fixes HTTP 405 errors when toggling policy enabled state.
docs: add toggleDynamicPolicy HTTP method fix to changelog
saurabhjain1592
added a commit
that referenced
this pull request
Jan 6, 2026
* feat(policies): add allowedProviders field for dynamic policies
Add allowedProviders field to dynamic policy types for GDPR, HIPAA, and RBI
compliance. This enables restricting LLM routing to specific providers when
a dynamic policy matches.
- Add allowedProviders to DynamicPolicy, CreateDynamicPolicyRequest,
UpdateDynamicPolicyRequest
- Add Builder.allowedProviders() methods with Javadoc
- Update CHANGELOG for v2.1.0
* fix: use action.config for allowed_providers instead of top-level field
- Removed allowedProviders from DynamicPolicy, CreateDynamicPolicyRequest, UpdateDynamicPolicyRequest
- Added category field to DynamicPolicy and request types
- Added Javadoc documentation showing correct usage via action config
- Backend stores allowed_providers in action.config, not as top-level field
* fix: correct dynamic policy response parsing for wrapped API responses
Agent proxy (Issue #886) returns wrapped responses:
- List endpoints return {"policies": [...]}
- Single policy endpoints return {"policy": {...}}
Added wrapper types:
- DynamicPoliciesResponse
- DynamicPolicyResponse
Fixed methods:
- listDynamicPolicies
- getDynamicPolicy
- createDynamicPolicy
- updateDynamicPolicy
- toggleDynamicPolicy
- getEffectiveDynamicPolicies
* fix: add X-Tenant-ID header to orchestrator requests
- Add addTenantIdHeader() call to buildOrchestratorRequest() method
- Ensures tenant identification works in community/self-hosted mode
- Fixes 'Missing tenant ID' error for dynamic policy API calls
* test: update dynamic policy tests for wrapped API responses
Agent proxy (Issue #886) returns wrapped responses:
- List endpoints: {"policies": [...]}
- Single item endpoints: {"policy": {...}}
Updated test stubs to return wrapped responses.
* chore: bump version to 2.1.0
* fix: add sensitive-data category to PolicyCategory enum
- Added SENSITIVE_DATA for policies returning 'sensitive-data' category
- Fixes getEffectiveStaticPolicies validation errors
* fix: use PUT instead of PATCH for toggleDynamicPolicy
The server's dynamic policy update endpoint uses PUT, not PATCH.
This fixes HTTP 405 errors when toggling policy enabled state.
* fix: update toggleDynamicPolicy test to use PUT instead of PATCH
docs: add toggleDynamicPolicy HTTP method fix to changelog
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add
allowedProvidersfield to dynamic policy types for GDPR, HIPAA, and RBI compliance. This enables restricting LLM routing to specific providers when a dynamic policy matches.Changes
allowedProvidersfield toDynamicPolicyclass (getter + setter)allowedProvidersfield toCreateDynamicPolicyRequestwithBuilder.allowedProviders()methodallowedProvidersfield toUpdateDynamicPolicyRequestwithBuilder.allowedProviders()methodExample Usage
Related