-
Notifications
You must be signed in to change notification settings - Fork 794
Expand file tree
/
Copy pathconfig.yaml
More file actions
2273 lines (2224 loc) · 65.7 KB
/
Copy pathconfig.yaml
File metadata and controls
2273 lines (2224 loc) · 65.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
version: v0.3
listeners:
- name: http-8899
address: 0.0.0.0
port: 8899
timeout: 300s
providers:
defaults:
default_model: qwen3-8b
default_reasoning_effort: medium
reasoning_families:
qwen3:
type: chat_template_kwargs
parameter: enable_thinking
gpt:
type: reasoning_effort
parameter: reasoning.effort
models:
- name: qwen3-8b
reasoning_family: qwen3
provider_model_id: qwen3-8b-instruct
api_format: openai
pricing:
currency: USD
prompt_per_1m: 0.18
cached_input_per_1m: 0.04
cache_write_per_1m: 0.225
completion_per_1m: 0.42
external_model_ids:
openai: qwen3-8b
analytics: qwen3-routing
backend_refs:
- name: local-primary
endpoint: 127.0.0.1:8000
protocol: http
weight: 80
type: chat
api_key_env: VLLM_SR_PRIMARY_API_KEY
- name: remote-secondary
base_url: https://api.example.com/v1
provider: openai
auth_header: Authorization
auth_prefix: Bearer
extra_headers:
X-Tenant: reference-config
api_version: "2025-03-01"
chat_path: /chat/completions
api_key: static-demo-key
weight: 20
- name: qwen3-32b
reasoning_family: gpt
provider_model_id: qwen3-32b-instruct
api_format: anthropic
pricing:
currency: USD
prompt_per_1m: 1.2
cached_input_per_1m: 0.3
completion_per_1m: 3.4
external_model_ids:
internal: qwen3-32b
backend_refs:
- name: large-primary
endpoint: 127.0.0.1:8001
protocol: http
weight: 100
- name: llava-omni
provider_model_id: llava-omni-preview
api_format: openai
pricing:
currency: USD
prompt_per_1m: 2.5
cached_input_per_1m: 0.5
completion_per_1m: 4.0
external_model_ids:
openai: llava-omni-preview
backend_refs:
- name: omni-primary
endpoint: 127.0.0.1:8002
protocol: http
weight: 100
- name: sdxl-image
provider_model_id: sdxl-image
api_format: openai
pricing:
currency: USD
prompt_per_1m: 4.0
completion_per_1m: 4.0
external_model_ids:
openai: gpt-image-1
backend_refs:
- name: image-primary
endpoint: 127.0.0.1:8003
protocol: http
weight: 100
routing:
modelCards:
- name: qwen3-8b
param_size: 8B
context_window_size: 131072
description: General-purpose text model for the default routing tier.
capabilities: [chat, reasoning, tools]
quality_score: 0.83
modality: ar
tags: [default, fast]
- name: qwen3-32b
param_size: 32B
context_window_size: 131072
description: Higher-quality text model for complex and verified requests.
capabilities: [chat, reasoning, long-context]
loras:
- name: computer-science-expert
description: Adapter specialized for advanced computer science and software design prompts.
quality_score: 0.96
modality: ar
tags: [premium, analysis]
- name: llava-omni
param_size: 13B
context_window_size: 65536
description: Omni model that can satisfy both text and multimodal orchestration paths.
capabilities: [chat, vision, multimodal]
quality_score: 0.88
modality: omni
tags: [multimodal, omni]
- name: sdxl-image
param_size: 3B
context_window_size: 8192
description: Diffusion-style image generation backend used by image routes.
capabilities: [image_generation]
quality_score: 0.79
modality: diffusion
tags: [image, diffusion]
signals:
keywords:
- name: code_keywords
operator: OR
method: bm25
keywords: ["code", "function", "debug", "algorithm", "refactor"]
case_sensitive: false
bm25_threshold: 0.1
- name: machine_learning
operator: OR
method: bm25
keywords: ["machine learning", "model training", "gradient", "neural network", "classifier"]
case_sensitive: false
bm25_threshold: 0.1
- name: urgent_keywords
operator: OR
method: ngram
keywords: ["urgent", "immediate", "asap", "emergency"]
case_sensitive: false
ngram_threshold: 0.4
ngram_arity: 3
- name: fuzzy_sensitive_keywords
operator: OR
method: fuzzy
keywords: ["social security", "credit card", "password", "api key"]
case_sensitive: false
fuzzy_match: true
fuzzy_threshold: 82
embeddings:
- name: technical_support
threshold: 0.75
aggregation_method: max
candidates:
- how to configure the system
- installation guide
- troubleshooting steps
- error message explanation
- name: account_management
threshold: 0.72
aggregation_method: any
candidates:
- password reset
- account settings
- billing information
- subscription management
# query_modality declares which modality of incoming request payload the
# embedding rule's query is computed from. Defaults to "text" when
# omitted. Setting it to "image" or "audio" requires
# global.model_catalog.embeddings.semantic.embedding_config.model_type=multimodal
# so the query and candidate embeddings land in the same shared space;
# see website/docs/tutorials/signal/learned/embedding.md for the worked
# multimodal example.
- name: clinical_query_intent
query_modality: text
threshold: 0.72
aggregation_method: max
candidates:
- patient symptoms or clinical question
- medication interaction or dosage question
- test result interpretation request
domains:
- name: business
description: Business and management related queries.
mmlu_categories: [business]
model_scores:
- model: qwen3-32b
score: 0.96
use_reasoning: true
- name: law
description: Legal questions and policy topics.
mmlu_categories: [law]
- name: psychology
description: Psychology and mental-health oriented prompts.
mmlu_categories: [psychology]
- name: health
description: Health and medical information requests.
mmlu_categories: [health]
- name: "computer science"
description: Computer science and engineering prompts.
mmlu_categories: ["computer science"]
- name: other
description: General fallback traffic.
mmlu_categories: [other]
fact_check:
- name: needs_fact_check
description: Prompts with factual claims that should be verified.
- name: no_fact_check_needed
description: Creative prompts that do not need factual verification.
user_feedbacks:
- name: wrong_answer
description: The user indicates the previous answer was incorrect.
- name: need_clarification
description: The user asks for a clearer or more detailed answer.
reasks:
- name: likely_dissatisfied
description: The current user turn closely repeats the immediately previous user turn.
threshold: 0.8
lookback_turns: 1
- name: persistently_dissatisfied
description: The current user turn repeats the last two user turns in a row.
threshold: 0.8
lookback_turns: 2
preferences:
- name: terse_answers
description: Users who prefer short, direct responses.
examples:
- keep it concise
- bullet points only
- answer in one paragraph
threshold: 0.7
language:
- name: zh
description: Chinese-language requests.
# threshold: minimum lingua-go confidence required (0 = built-in default 0.3)
threshold: 0.0
- name: es
description: Spanish-language requests.
context:
- name: long_context
min_tokens: 32K
max_tokens: 256K
description: Requests that need larger effective context windows.
structure:
- name: many_questions
description: Prompts that contain many explicit questions.
feature:
type: count
source:
type: regex
pattern: '[??]'
predicate:
gte: 4
- name: at_most_one_question
description: Prompts with one or fewer explicit questions.
feature:
type: count
source:
type: regex
pattern: '[??]'
predicate:
lte: 1
- name: numbered_steps
description: Prompts that contain numbered list items such as "1. ..."
feature:
type: exists
source:
type: regex
pattern: '(?m)^\s*\d+\.\s+'
- name: first_then_flow
description: Prompts that express an ordered workflow.
feature:
type: sequence
source:
type: sequence
case_sensitive: false
sequences:
- ["first", "then"]
- ["first", "next", "finally"]
- ["首先", "然后"]
- ["先", "再"]
- name: constraint_dense
description: Prompts with dense explicit constraints relative to multilingual text units.
feature:
type: density
source:
type: keyword_set
case_sensitive: false
keywords:
- under
- at most
- at least
- within
- no more than
- 不超过
- 至少
- 最多
predicate:
gt: 0.08
- name: format_directive_dense
description: Prompts with dense output-format directives relative to multilingual text units.
feature:
type: density
source:
type: keyword_set
keywords: ["table", "bullet", "json", "markdown", "表格", "列表", "JSON"]
predicate:
gt: 0.08
- name: low_question_density
description: Prompts with very low question density relative to multilingual text units.
feature:
type: density
source:
type: regex
pattern: '[??]'
predicate:
lt: 0.05
complexity:
- name: needs_reasoning
threshold: 0.75
description: Escalate multi-step reasoning or synthesis-heavy prompts.
hard:
candidates:
- solve this step by step
- compare multiple tradeoffs
- analyze the root cause
image_candidates:
- generate a detailed architecture diagram
easy:
candidates:
- answer briefly
- quick summary
- simple rewrite
image_candidates:
- make a simple icon
composer:
operator: OR
conditions:
- type: context
name: long_context
- type: domain
name: "computer science"
modality:
- name: AR
description: Text-only autoregressive requests.
- name: DIFFUSION
description: Image-generation requests.
- name: BOTH
description: Requests that need both text and image generation.
role_bindings:
- name: admin
description: Requests from platform administrators.
role: admin
subjects:
- kind: Group
name: platform-admins
- name: premium_user
description: Requests from paid end users.
role: premium_user
subjects:
- kind: Group
name: premium-tier
jailbreak:
- name: prompt_injection
method: hybrid
threshold: 0.8
include_history: true
description: Detect common prompt-injection or jailbreak attempts.
jailbreak_patterns:
- ignore previous instructions
- reveal the hidden prompt
- jailbreak mode
benign_patterns:
- explain the policy
- summarize the safety rules
pii:
- name: restricted_pii
threshold: 0.85
include_history: true
pii_types_allowed:
- EMAIL_ADDRESS
description: Sensitive prompts where only low-risk identifiers may pass through.
kb:
- name: privacy_policy
kb: privacy_kb
target:
kind: group
value: privacy_policy
match: best
- name: security_containment
kb: privacy_kb
target:
kind: group
value: security_containment
match: best
- name: frontier_reasoning
kb: privacy_kb
target:
kind: group
value: frontier_reasoning
match: best
- name: local_standard
kb: privacy_kb
target:
kind: group
value: local_standard
match: best
conversation:
- name: multi_turn_user
description: At least two user messages.
feature:
type: count
source:
type: message
role: user
predicate:
gte: 2
- name: has_tools
description: Request defines at least one tool.
feature:
type: count
source:
type: tool_definition
predicate:
gte: 1
- name: active_tool_use
description: Tool-result continuation inside an agent loop.
feature:
type: exists
source:
type: active_tool_loop
- name: has_developer_msg
description: Request contains a developer message.
feature:
type: exists
source:
type: message
role: developer
- name: heavy_non_user
description: Non-user messages exceed threshold.
feature:
type: count
source:
type: message
role: non_user
predicate:
gt: 5
lte: 99
events:
- name: critical_payment_event
description: Critical payment or transaction events that need incident-grade routing.
event_types:
- payment_failed
- transaction_declined
severities:
- critical
- high
action_codes:
- TXN_DECLINE
temporal: true
projections:
partitions:
- name: support_intents
semantics: exclusive
temperature: 0.3
members:
- technical_support
- account_management
default: technical_support
scores:
- name: request_difficulty
method: weighted_sum
inputs:
- type: embedding
name: technical_support
weight: 0.18
value_source: confidence
match: 1.0
miss: 0.0
- type: embedding
name: account_management
weight: -0.08
value_source: confidence
- type: complexity
name: needs_reasoning:medium
weight: 0.18
- type: complexity
name: needs_reasoning:hard
weight: 0.36
- type: context
name: long_context
weight: 0.18
- type: structure
name: first_then_flow
weight: 0.12
- name: privacy_kb_bias
method: weighted_sum
inputs:
- type: kb_metric
kb: privacy_kb
metric: private_vs_public
weight: 1.0
value_source: score
mappings:
- name: request_band
source: request_difficulty
method: threshold_bands
calibration:
method: sigmoid_distance
slope: 10.0
outputs:
- name: support_fast
lte: 0.20
- name: support_balanced
gt: 0.20
lt: 0.45
- name: support_escalated
gte: 0.45
decisions:
- name: static_business_route
description: Static fallback for standard business traffic.
priority: 200
tier: 2
output_contract: Preserve any explicit user-requested output format exactly.
rules:
operator: AND
conditions:
- type: domain
name: business
modelRefs:
- model: qwen3-8b
use_reasoning: false
reasoning_description: Prefer fast, direct business answers.
candidateIterations:
- variable: candidate
source: models
models:
- model: qwen3-8b
lora_name: business-adapter
weight: 1.0
use_reasoning: false
reasoning_description: Candidate iteration reference model for DSL authoring coverage.
reasoning_effort: low
outputs:
- type: model
value: candidate
algorithm:
type: static
plugins:
- type: system_prompt
configuration:
enabled: true
mode: insert
system_prompt: You are a senior business consultant. Give practical recommendations and clear tradeoffs.
- type: semantic-cache
configuration:
enabled: true
similarity_threshold: 0.82
ttl_seconds: 7200
- type: tools
configuration:
enabled: true
mode: filtered
semantic_selection: true
allow_tools:
- search_web
block_tools:
- exec_cmd
# Disabled sample: add mode only (filter fields belong under mode: filter; see legal_confidence_route).
- type: tool_selection
configuration:
enabled: false
mode: add
tools_db_path: config/tools_db.json
top_k: 5
similarity_threshold: 0.30
strategy: default
fallback_to_empty: false
advanced_filtering:
enabled: true
candidate_pool_size: 30
min_combined_score: 0.4
emits:
- kind: retention
retention:
drop: false
ttl_turns: 4
keep_current_model: true
prefer_prefix_retention: true
- name: legal_confidence_route
description: Confidence-routed legal and factual traffic.
priority: 190
rules:
operator: OR
conditions:
- type: domain
name: law
- type: fact_check
name: needs_fact_check
modelRefs:
- model: qwen3-8b
use_reasoning: true
reasoning_effort: medium
weight: 0.4
- model: qwen3-32b
use_reasoning: true
reasoning_description: Escalate when confidence is weak.
reasoning_effort: high
weight: 0.6
algorithm:
type: confidence
on_error: fallback
confidence:
confidence_method: hybrid
threshold: 0.72
hybrid_weights:
logprob_weight: 0.65
margin_weight: 0.35
on_error: skip
escalation_order: small_to_large
cost_quality_tradeoff: 0.45
token_filter: alpha_numeric
verifier_server_url: ""
verifier_timeout_seconds: 0
plugins:
- type: hallucination
configuration:
enabled: true
use_nli: true
hallucination_action: header
unverified_factual_action: header
include_hallucination_details: true
# Disabled sample: filter mode only (reference config union coverage for ToolSelectionPluginConfig filter fields).
- type: tool_selection
configuration:
enabled: false
mode: filter
relevance_threshold: 0.25
preserve_count: 2
- name: health_ratings_route
description: Ratings-based route for health requests that need fact verification.
priority: 180
rules:
operator: AND
conditions:
- type: domain
name: health
- type: fact_check
name: needs_fact_check
modelRefs:
- model: qwen3-8b
use_reasoning: true
reasoning_effort: medium
- model: qwen3-32b
use_reasoning: true
reasoning_effort: high
algorithm:
type: ratings
ratings:
max_concurrent: 3
on_error: skip
adaptations:
mode: bypass
plugins:
- type: router_replay
configuration:
enabled: true
max_records: 10000
capture_request_body: true
capture_response_body: true
max_body_bytes: 4096
# 0 = no truncation (the documented default). Set to a positive
# byte cap to independently limit structured tool-trace fields
# (prompt, tool_definitions, and each tool-call's arguments/output)
# without having to shrink max_body_bytes.
max_tool_trace_bytes: 0
# Cap the number of tool-trace steps retained per record. Long
# agent sessions (many sequential tool calls) can otherwise grow
# the trace unbounded and OOM the router (#1835). 0 = no cap.
max_tool_trace_steps: 100
- name: computer-science-remom-route
description: ReMoM route for complex computer science prompts.
priority: 170
output_contract_spec:
type: reference_selection
reference:
source: candidate_responses
id_format: index
extract:
mode: exact
sources: [content]
postprocess:
- type: dereference_selected_reference
rules:
operator: AND
conditions:
- type: domain
name: "computer science"
- type: complexity
name: needs_reasoning:hard
modelRefs:
- model: qwen3-32b
use_reasoning: true
reasoning_description: Use the strongest text model for synthesis.
reasoning_effort: high
lora_name: computer-science-expert
weight: 0.5
- model: qwen3-8b
use_reasoning: true
reasoning_effort: medium
weight: 0.2
- model: llava-omni
use_reasoning: true
reasoning_effort: high
weight: 0.3
algorithm:
type: remom
remom:
breadth_schedule: [3, 2]
model_distribution: round_robin
temperature: 0.7
include_reasoning: true
compaction_strategy: last_n_tokens
compaction_tokens: 512
synthesis_template: Fuse the strongest technical findings into a final answer.
synthesis_model: qwen3-32b
max_concurrent: 3
round_timeout_seconds: 120
min_successful_responses: 2
on_error: skip
shuffle_seed: 7
include_intermediate_responses: true
max_responses_per_round: 2
plugins:
- type: memory
configuration:
enabled: true
retrieval_limit: 6
similarity_threshold: 0.72
auto_store: true
hybrid_search: true
hybrid_mode: rerank
reflection:
enabled: true
algorithm: recency_semantic
max_inject_tokens: 384
recency_decay_days: 14
dedup_threshold: 0.9
block_patterns:
- api key
- password
- name: deliberation-fusion-route
description: Fusion route for prompts that benefit from panel deliberation.
priority: 165
rules:
operator: AND
conditions:
- type: domain
name: business
- type: complexity
name: needs_reasoning:hard
modelRefs:
- model: qwen3-8b
use_reasoning: true
reasoning_effort: medium
weight: 0.5
- model: qwen3-32b
use_reasoning: true
reasoning_effort: high
weight: 0.5
algorithm:
type: fusion
fusion:
model: qwen3-32b
analysis_models:
- qwen3-8b
- qwen3-32b
max_concurrent: 2
max_completion_tokens: 512
round_timeout_seconds: 90
min_successful_responses: 1
temperature: 0.2
include_analysis: true
include_intermediate_responses: true
on_error: skip
analysis_template: ""
synthesis_template: ""
judge_prompt_version: fusion-v1
# Grounding-aware synthesis: score panel responses for faithfulness
# (hallucination detector against context, else cross-model NLI) and
# use the scores to guide the judge. Disabled by default.
grounding:
enabled: false
reference: hybrid # hybrid | context | panel
policy: weight # weight | annotate | filter (see below)
min_score: 0.0 # filter policy only: drop below this (0-1)
min_keep: 1 # filter policy only: keep at least this many
nli_contradiction_penalty: 1.0
on_error: skip # skip (fall back to plain fusion) | fail
# policy controls how the scores are used:
# weight (default) keep every response; tell the judge to weight
# each answer by its score (a correct lone dissenter is kept).
# annotate keep every response; pass the scores to the judge as notes.
# filter hard-drop responses below min_score (keep min_keep).
# filter regresses quality on contested factual questions because it
# deletes the correct dissenter; see bench/grounded_fusion/FINDINGS.md.
- name: router-flow-workflow-route
description: Router Flow route for bounded static or dynamic micro-agent workflows.
priority: 164
rules:
operator: AND
conditions:
- type: domain
name: business
- type: complexity
name: needs_reasoning:hard
modelRefs:
- model: qwen3-8b
use_reasoning: true
reasoning_effort: medium
weight: 0.5
- model: qwen3-32b
use_reasoning: true
reasoning_effort: high
weight: 0.5
algorithm:
type: workflows
workflows:
mode: dynamic
template: micro_agent
planner:
model: qwen3-32b
max_steps: 6
max_parallel: 2
max_completion_tokens: 1024
round_timeout_seconds: 90
min_successful_responses: 1
temperature: 0.2
include_intermediate_responses: true
on_error: fail
- name: terse_feedback_route
description: Terse-answer route that allows Router Learning adaptation to adjust feedback-driven routing.
priority: 160
rules:
operator: AND
conditions:
- type: preference
name: terse_answers
modelRefs:
- model: qwen3-8b
use_reasoning: false
- model: qwen3-32b
use_reasoning: false
adaptations:
adaptation:
mode: apply
plugins:
- type: fast_response
configuration:
message: The primary model is saturated, so a lightweight response was returned immediately.
- type: request_params
configuration:
blocked_params:
- logprobs
- top_logprobs
max_tokens_limit: 8192
max_n: 4
strip_unknown: false
- name: support_router_dc_route
description: Embedding-driven support route that escalates only when the derived projection band says the request is not a simple support query.
priority: 150
rules:
operator: AND
conditions:
- type: embedding
name: technical_support
- type: projection
name: support_escalated
modelRefs:
- model: qwen3-8b
use_reasoning: false
- model: qwen3-32b
use_reasoning: true
algorithm:
type: router_dc
router_dc:
temperature: 0.2
dimension_size: 384
min_similarity: 0.7
use_query_contrastive: true
use_model_contrastive: true
require_descriptions: true
use_capabilities: true
plugins:
- type: header_mutation
configuration:
add:
- name: X-Tenant-Tier
value: premium
update:
- name: X-Route-Source
value: semantic-router
delete:
- X-Debug-Trace
- name: urgent_automix_route
description: Cost-aware urgent handling with AutoMix.
priority: 145
rules:
operator: AND
conditions:
- type: keyword
name: urgent_keywords
modelRefs:
- model: qwen3-8b
use_reasoning: false
- model: qwen3-32b
use_reasoning: true
algorithm:
type: automix
automix:
verification_threshold: 0.78
max_escalations: 2
cost_aware_routing: true
cost_quality_tradeoff: 0.35
discount_factor: 0.9
use_logprob_verification: true
plugins:
- type: response_jailbreak
configuration:
enabled: true
threshold: 0.85
action: header
- name: safe_hybrid_route
description: Composite route combining AND, OR, and NOT with Hybrid selection.
priority: 140
rules:
operator: AND
conditions:
- type: domain
name: business
- operator: OR
conditions:
- type: keyword
name: urgent_keywords
- type: complexity
name: needs_reasoning:hard
- operator: NOT
conditions:
- type: jailbreak
name: prompt_injection
modelRefs:
- model: qwen3-8b
use_reasoning: true
- model: qwen3-32b
use_reasoning: true
algorithm:
type: hybrid
hybrid: