feat(routing): add HTTP policy provider with revision-aware caching#846
Open
JasonOA888 wants to merge 1 commit intokatanemo:mainfrom
Open
feat(routing): add HTTP policy provider with revision-aware caching#846JasonOA888 wants to merge 1 commit intokatanemo:mainfrom
JasonOA888 wants to merge 1 commit intokatanemo:mainfrom
Conversation
Implements katanemo#812 - Support loading routing policy from external HTTP endpoint Changes: - Add PolicyProvider module with HTTP endpoint fetching and caching - Support policy_id + revision for revision-aware cache invalidation - Add extract_routing_metadata() to extract policy_id/revision from requests - Resolution order: inline policy > external provider > default - Configurable TTL and custom headers for policy endpoint The policy provider fetches routing preferences from an external HTTP endpoint when policy_id is provided in the request. Policies are cached by policy_id with revision comparison for efficient updates.
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.
Implements #812 - Support loading routing policy from external HTTP endpoint
Summary
PolicyProvidermodule with HTTP endpoint fetching and cachingpolicy_id+revisionfor revision-aware cache invalidationextract_routing_metadata()to extract policy_id/revision from requestsConfiguration
Request Format
{ "messages": [...], "policy_id": "customer-abc-123", "revision": 42 }Caching Behavior
policy_idwith storedrevisionFlow
policy_idandrevisionpolicy_idFixes #812