Commit a5394c0
committed
feat: implement decision-based routing with plugin architecture
This commit introduces a comprehensive decision-based routing system with a flexible plugin architecture, replacing the previous category-based approach.
## Core Changes
### 1. Decision-Based Architecture
- Replaced Category-based routing with Decision-based routing
- Decisions combine multiple rules (keyword, embedding, domain) using AND/OR operators
- Added DecisionEngine for evaluating rule combinations and selecting optimal decisions
- Support for priority and confidence-based decision selection strategies
### 2. Plugin System
- Introduced flexible plugin architecture for Decision-level configurations
- Supported plugin types: semantic-cache, jailbreak, pii, system_prompt
- Each plugin has type-specific configuration stored as raw JSON
- Helper methods for type-safe plugin configuration access
### 3. Model References
- Renamed ModelScores to ModelRefs, removed score field
- Currently supports single model per decision (maxItems: 1)
- Simplified model selection logic based on decision priority
### 4.
## Core Changes
### 1. Decision-Based Architecture
- Replaced Category-based routing with Decision-based routing
- Decisions combine multiple rules (kete
### 1. Decisiatc- Replaced Category-based routinged- Decisions combine multiple rules (keyword, embedding, domapo- Added DecisionEngine for evaluating rule combinations and selecting optimal decisioh - Support for priority and confidence-based decision selection strategies
### 2. Plug a
### 2. Plugin System
- Introduced flexible plugin architecture for Deci.go- Introduced flexibur- Supported plugin types: semantic-cache, jailbreak, pii, system_prompt
- ch- Each plugin has type-specific configuration stored as raw JSON
- Hel C- Helper methods for type-safe plugin configuration access
###s
### 3. Model References
- Renamed ModelScores to ModelReute- Renamed ModelScores si- Currently supports single model per decision (maxItee - Simplified model selection logic based on decision priorira
### 4.
## Core Changes
### 1. Decision-Based Architecture: w## Cor C
### 1. Decisis i- Replaced Category-based routingrt- Decisions combine multiple rules (kete
### 1. Decisiatc- Rge### 1. Decisiatc- Replaced Category-bass
### 2. Plug a
### 2. Plugin System
- Introduced flexible plugin architecture for Deci.go- Introduced flexibur- Supported plugin types: semantic-cache, jailbreak, pii, system_prompt
- ch- Each plugin has type-specific configuration stored as raw JSON
- Hel C- Helper methorra### 2. Plugiio- Introduced flexib:
- ch- Each plugin has type-specific configuration stored as raw JSON
- Hel C- Helper methods for type-safe plugin configuration access
###s
##
## Corst
### 1. Decisie p### 1. Decisis i- Replaced Category-based ross### 1. Decisiatc- Rge### 1. Decisiatc- Replaced Category-bass
### 2. Plug a
### 2. PluginEx
### 2. Plug a
### 2. Plugin System
- Introduced flexible plXun### 2. Plugirs- Introduced
git reset HEAD~1
git status --short
cd /Users/bitliu/vs
cd /Users/bitliu/vs/src/semantic-router && git status
git checkout -b feat/decision-based-routing-with-plugins 2>&1
cd /Users/bitliu/vs
bash -c cd
Signed-off-by: bitliu <[email protected]>1 parent c7b5934 commit a5394c0
File tree
9 files changed
+221
-175
lines changed- src/semantic-router/pkg
- apis/vllm.ai/v1alpha1
- classification
- config
- k8s
9 files changed
+221
-175
lines changedLines changed: 10 additions & 46 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | | - | |
44 | | - | |
| 43 | + | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | 71 | | |
77 | 72 | | |
78 | 73 | | |
| |||
92 | 87 | | |
93 | 88 | | |
94 | 89 | | |
95 | | - | |
| 90 | + | |
96 | 91 | | |
97 | 92 | | |
98 | 93 | | |
99 | 94 | | |
100 | 95 | | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | 96 | | |
107 | 97 | | |
108 | 98 | | |
109 | 99 | | |
110 | 100 | | |
111 | 101 | | |
112 | | - | |
| 102 | + | |
113 | 103 | | |
114 | 104 | | |
115 | 105 | | |
116 | | - | |
| 106 | + | |
117 | 107 | | |
118 | | - | |
| 108 | + | |
119 | 109 | | |
120 | 110 | | |
121 | 111 | | |
122 | 112 | | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | 113 | | |
150 | 114 | | |
151 | 115 | | |
| |||
Lines changed: 4 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments