refactor: Implement modular candle-binding architecture (#254)#266
refactor: Implement modular candle-binding architecture (#254)#266
Conversation
✅ Deploy Preview for vllm-semantic-router ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
👥 vLLM Semantic Team NotificationThe following members have been identified for the changed files in this PR and have been automatically assigned: 📁
|
|
@OneZero-Y @Xunzhuo Let's have the following resolved before merging
|
|
@OneZero-Y now since we work on the feature branch, how about you use this branch for both refactoring and new embedding models? |
|
@rootfs OK, I'll advance the embedded model on this branch |
|
@OneZero-Y that's great! I'll switch to this work as soon as i can. |
| let handles = vec![ | ||
| self.spawn_intent_task(texts_owned.clone(), Arc::clone(&intent_results)), | ||
| self.spawn_pii_task(texts_owned.clone(), Arc::clone(&pii_results)), | ||
| self.spawn_security_task(texts_owned, Arc::clone(&security_results)), | ||
| ]; | ||
|
|
||
| // Wait for all threads to complete | ||
| for handle in handles { | ||
| handle.join().map_err(|_| { | ||
| let unified_err = concurrency_error( | ||
| "thread join", | ||
| "Failed to join parallel classification thread", | ||
| ); | ||
| candle_core::Error::from(unified_err) | ||
| })?; | ||
| } |
There was a problem hiding this comment.
This could be simplified a bit. Something like
let intent_handle = thread::spawn(|| intent_task(texts)); // slice is fine, no need to own the data.
let pii_handle = ... same
let security_handle = ... same
let intent_results = intent_handle.join()?; // map_err omitted
let pii_results = pii_handle.join()?;
let security_results = security_handle.join()?;
There was a problem hiding this comment.
Since we're on the topic of threads - you may like some of the abstractions that the rayon crate provides
| pub fn parallel_detect(&self, texts: &[&str]) -> Result<Vec<PIIResult>> { | ||
| let mut results = Vec::new(); | ||
| for text in texts { | ||
| results.push(self.detect_pii(text)?); | ||
| } | ||
| Ok(results) | ||
| } |
There was a problem hiding this comment.
If you want this to be in parallel you could do something like
// add `use rayon::prelude::*;` at top of file
Ok(texts.par_iter().map(|text| self.detect_pii(text)?).collect())There was a problem hiding this comment.
Though I'm starting to suspect that what you actually want, for the long term, is an async runtime.
There was a problem hiding this comment.
@ivarflakstad thanks for looking into this. On a separate note, for async to run most efficiently, would you help look at the if locking is done the right way?
There was a problem hiding this comment.
Sure :)
Are you thinking about any specific locks in particular? (pr is fairly large 😉 )
There was a problem hiding this comment.
thank you @ivarflakstad
The classify_text is currently protected under lock. This could get us performance hit, would you help share your ideas? Thanks
There was a problem hiding this comment.
Sorry for the delay.
I'd definitely look into using OnceCell instead of lazy_static.
But it depends. Will you actually be updating these static values at runtime? More than once?
If yes, then at the very least you want to use RwLock instead of Mutex because I doubt you're planning to write to the value as much as you read it.
If OnceCell doesn't cut it, perhaps you'll want to give OnceLock, LazyCell, or LazyLock a try :)
There was a problem hiding this comment.
thank you @ivarflakstad
can you review #528?
a2fe984 to
0ee291f
Compare
|
@rootfs though runtime testing is blocked by incompatible local GPU hardware (GT 730 CC 3.5 < required CC 8.0 for Flash Attention 2). Could you help verify with a compatible GPU if available? |
|
@OneZero-Y sure, I am using L4, the unit test passed on my end, let me run again and post the test log |
|
@OneZero-Y here is my local test results using PR #489 |
Signed-off-by: Huamin Chen <hchen@redhat.com>
Signed-off-by: Huamin Chen <hchen@redhat.com>
Signed-off-by: carlory <baofa.fan@daocloud.io>
Signed-off-by: Huamin Chen <hchen@redhat.com>
Signed-off-by: OneZero-Y <aukovyps@163.com>
…ntention (#516) - Remove duplicate UNIFIED_CLASSIFIER global state - Optimize PARALLEL_LORA_ENGINE lock contention by using Arc clone Signed-off-by: OneZero-Y <aukovyps@163.com>
* Update test description from Math to General (#483) Signed-off-by: carlory <baofa.fan@daocloud.io> * feat: add HuggingChat support (#477) * add chat ui to dashboard and docker compose & refactor dashboard/backend/ Signed-off-by: JaredforReal <w13431838023@gmail.com> * try fix network error Signed-off-by: JaredforReal <w13431838023@gmail.com> * more --------- Signed-off-by: JaredforReal <w13431838023@gmail.com> Co-authored-by: bitliu <bitliu@tencent.com> * project: 2025 Q4 roadmap (#487) * project: q4 roadmap * project: q4 roadmap * project: q4 roadmap * more * more * more * more * feat: add shelleck precommit hook (#488) * feat: add shelleck precommit hook Signed-off-by: yuluo-yx <yuluo08290126@gmail.com> * feat: add shelleck precommit hook Signed-off-by: yuluo-yx <yuluo08290126@gmail.com> * feat: add shelleck precommit hook Signed-off-by: yuluo-yx <yuluo08290126@gmail.com> --------- Signed-off-by: yuluo-yx <yuluo08290126@gmail.com> * project: add q4 roadmap news (#495) * fix missing shellcheck in pre-commit image (#497) Signed-off-by: carlory <baofa.fan@daocloud.io> * infra: update tools (#501) Signed-off-by: yuluo-yx <yuluo08290126@gmail.com> * feat(demo): enhance OpenShift demo scripts with improved UX (#478) - Reduce model selection test to 4 categories (2×Model-A, 2×Model-B) - Add new "Classification Examples" option calling curl-examples.sh - Update reasoning examples to avoid cache hits from previous tests - Remove benign examples from PII and Jailbreak tests (show only attacks) - Enhance live-semantic-router-logs.sh with better color visibility: - Fix duplicate "WITH SCORE" text in classification output - Fix CACHE HIT background color extending over timestamp - Distinguish reasoning enabled vs disabled messages - Remove redundant "(standard routing)" text - Add background colors for Model-A/Model-B routing display These improvements make the live demo clearer and more impactful for presentations and demonstrations. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: Yossi Ovadia <yovadia@redhat.com> Co-authored-by: Claude <noreply@anthropic.com> * fix: fix precommit Argument list too long error (#502) Signed-off-by: yuluo-yx <yuluo08290126@gmail.com> * feat: enforce milvus dial timeout if set (#503) Signed-off-by: cryo <zdtna412@gmail.com> * Add IETF draft publication: Multi-Provider Extensions for Agentic AI Inference APIs (#506) * Initial plan * Add new IETF draft publication for Multi-Provider Extensions for Agentic AI Inference APIs Co-authored-by: rootfs <7062400+rootfs@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: rootfs <7062400+rootfs@users.noreply.github.com> * Allow semantic cache similarity threshold to be set at the category level (#493) * Initial plan * Add category-level cache settings: enabled and similarity_threshold Co-authored-by: rootfs <7062400+rootfs@users.noreply.github.com> * Add comprehensive tests for category-level cache settings Co-authored-by: rootfs <7062400+rootfs@users.noreply.github.com> * Update config files and documentation for category-level cache settings - Updated 7 config YAML files (development, production, testing, e2e, and 3 recipes) with commented examples of category-level cache settings - Added comprehensive documentation section explaining category-level cache configuration - Updated semantic cache overview and in-memory cache docs with category-level examples - Added best practices for threshold selection and privacy considerations Co-authored-by: rootfs <7062400+rootfs@users.noreply.github.com> * Remove duplicate code in FindSimilar functions Refactored FindSimilar() to delegate to FindSimilarWithThreshold() with default threshold instead of duplicating the entire implementation. This eliminates 226 lines of duplicate code across inmemory_cache.go and milvus_cache.go. Co-authored-by: rootfs <7062400+rootfs@users.noreply.github.com> * Update src/semantic-router/pkg/extproc/request_handler.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Revert changes from unsigned commit ae39fe2 Restored the classificationText empty check that was removed in the previous commit. Co-authored-by: rootfs <7062400+rootfs@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: rootfs <7062400+rootfs@users.noreply.github.com> Co-authored-by: Huamin Chen <rootfs@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Allow jailbreak detection and threshold to be configured at the category level (#508) * Initial plan * Add category-level jailbreak detection configuration Co-authored-by: Xunzhuo <48784001+Xunzhuo@users.noreply.github.com> * Add documentation for category-level jailbreak settings Co-authored-by: Xunzhuo <48784001+Xunzhuo@users.noreply.github.com> * Update documentation for category-level jailbreak detection - Add category-level jailbreak configuration to jailbreak-protection.md - Update category configuration docs with jailbreak_enabled parameter - Add security-focused configuration example - Update global configuration docs with category override notes - Update README to mention fine-grained security control Co-authored-by: Xunzhuo <48784001+Xunzhuo@users.noreply.github.com> * Add category-level jailbreak threshold configuration - Add JailbreakThreshold field to Category struct - Add GetJailbreakThresholdForCategory helper method - Create CheckForJailbreakWithThreshold and AnalyzeContentForJailbreakWithThreshold methods - Update performSecurityChecks to use category-specific threshold - Add 5 comprehensive tests for threshold configuration - Update example configs with threshold tuning examples - Update documentation with threshold configuration and tuning guidelines - Add threshold tuning guide with recommendations for different category types Co-authored-by: Xunzhuo <48784001+Xunzhuo@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Xunzhuo <48784001+Xunzhuo@users.noreply.github.com> * Allow PII detection threshold to be set at the category level (#510) * Initial plan * Add category-level PII threshold support Co-authored-by: Xunzhuo <48784001+Xunzhuo@users.noreply.github.com> * Update documentation with API integration notes Co-authored-by: Xunzhuo <48784001+Xunzhuo@users.noreply.github.com> * Fix markdown linting issues Co-authored-by: Xunzhuo <48784001+Xunzhuo@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Xunzhuo <48784001+Xunzhuo@users.noreply.github.com> * Fix: The caller information points to the wrapper function instead of the actual call location (#518) Signed-off-by: carlory <baofa.fan@daocloud.io> * feat: Implement hybrid cache that use in-memory index and milvus based doc store (#504) * feat: add HNSW index to inmemory semantic cache and implement hybrid cache that use in-memory index and milvus based doc store Signed-off-by: Huamin Chen <hchen@redhat.com> * chore: run go mod tidy to clean up module dependencies Signed-off-by: Huamin Chen <hchen@redhat.com> * conditionally build candle cuda support Signed-off-by: Huamin Chen <hchen@redhat.com> * rebuild index upon restart Signed-off-by: Huamin Chen <hchen@redhat.com> * precommit fix Signed-off-by: Huamin Chen <hchen@redhat.com> * fix precommit Signed-off-by: Huamin Chen <hchen@redhat.com> * fix precommit Signed-off-by: Huamin Chen <hchen@redhat.com> * fix precommit Signed-off-by: Huamin Chen <hchen@redhat.com> * disable cuda build on ci Signed-off-by: Huamin Chen <hchen@redhat.com> * review feedback Signed-off-by: Huamin Chen <hchen@redhat.com> * review feedback Signed-off-by: Huamin Chen <hchen@redhat.com> * review feedback Signed-off-by: Huamin Chen <hchen@redhat.com> * review feedback Signed-off-by: Huamin Chen <hchen@redhat.com> --------- Signed-off-by: Huamin Chen <hchen@redhat.com> --------- Signed-off-by: carlory <baofa.fan@daocloud.io> Signed-off-by: JaredforReal <w13431838023@gmail.com> Signed-off-by: yuluo-yx <yuluo08290126@gmail.com> Signed-off-by: Yossi Ovadia <yovadia@redhat.com> Signed-off-by: cryo <zdtna412@gmail.com> Signed-off-by: Huamin Chen <hchen@redhat.com> Co-authored-by: 杨朱 · Kiki <baofa.fan@daocloud.io> Co-authored-by: Jared <w13431838023@gmail.com> Co-authored-by: bitliu <bitliu@tencent.com> Co-authored-by: shown <yuluo08290126@gmail.com> Co-authored-by: Yossi Ovadia <yovadia@redhat.com> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: cryo <zdtna412@gmail.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: rootfs <7062400+rootfs@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Xunzhuo <48784001+Xunzhuo@users.noreply.github.com>
* Update test description from Math to General (#483) Signed-off-by: carlory <baofa.fan@daocloud.io> * feat: add HuggingChat support (#477) * add chat ui to dashboard and docker compose & refactor dashboard/backend/ Signed-off-by: JaredforReal <w13431838023@gmail.com> * try fix network error Signed-off-by: JaredforReal <w13431838023@gmail.com> * more --------- Signed-off-by: JaredforReal <w13431838023@gmail.com> Co-authored-by: bitliu <bitliu@tencent.com> * project: 2025 Q4 roadmap (#487) * project: q4 roadmap * project: q4 roadmap * project: q4 roadmap * more * more * more * more * feat: add shelleck precommit hook (#488) * feat: add shelleck precommit hook Signed-off-by: yuluo-yx <yuluo08290126@gmail.com> * feat: add shelleck precommit hook Signed-off-by: yuluo-yx <yuluo08290126@gmail.com> * feat: add shelleck precommit hook Signed-off-by: yuluo-yx <yuluo08290126@gmail.com> --------- Signed-off-by: yuluo-yx <yuluo08290126@gmail.com> * project: add q4 roadmap news (#495) * fix missing shellcheck in pre-commit image (#497) Signed-off-by: carlory <baofa.fan@daocloud.io> * infra: update tools (#501) Signed-off-by: yuluo-yx <yuluo08290126@gmail.com> * feat(demo): enhance OpenShift demo scripts with improved UX (#478) - Reduce model selection test to 4 categories (2×Model-A, 2×Model-B) - Add new "Classification Examples" option calling curl-examples.sh - Update reasoning examples to avoid cache hits from previous tests - Remove benign examples from PII and Jailbreak tests (show only attacks) - Enhance live-semantic-router-logs.sh with better color visibility: - Fix duplicate "WITH SCORE" text in classification output - Fix CACHE HIT background color extending over timestamp - Distinguish reasoning enabled vs disabled messages - Remove redundant "(standard routing)" text - Add background colors for Model-A/Model-B routing display These improvements make the live demo clearer and more impactful for presentations and demonstrations. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: Yossi Ovadia <yovadia@redhat.com> Co-authored-by: Claude <noreply@anthropic.com> * fix: fix precommit Argument list too long error (#502) Signed-off-by: yuluo-yx <yuluo08290126@gmail.com> * feat: enforce milvus dial timeout if set (#503) Signed-off-by: cryo <zdtna412@gmail.com> * Add IETF draft publication: Multi-Provider Extensions for Agentic AI Inference APIs (#506) * Initial plan * Add new IETF draft publication for Multi-Provider Extensions for Agentic AI Inference APIs Co-authored-by: rootfs <7062400+rootfs@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: rootfs <7062400+rootfs@users.noreply.github.com> * Allow semantic cache similarity threshold to be set at the category level (#493) * Initial plan * Add category-level cache settings: enabled and similarity_threshold Co-authored-by: rootfs <7062400+rootfs@users.noreply.github.com> * Add comprehensive tests for category-level cache settings Co-authored-by: rootfs <7062400+rootfs@users.noreply.github.com> * Update config files and documentation for category-level cache settings - Updated 7 config YAML files (development, production, testing, e2e, and 3 recipes) with commented examples of category-level cache settings - Added comprehensive documentation section explaining category-level cache configuration - Updated semantic cache overview and in-memory cache docs with category-level examples - Added best practices for threshold selection and privacy considerations Co-authored-by: rootfs <7062400+rootfs@users.noreply.github.com> * Remove duplicate code in FindSimilar functions Refactored FindSimilar() to delegate to FindSimilarWithThreshold() with default threshold instead of duplicating the entire implementation. This eliminates 226 lines of duplicate code across inmemory_cache.go and milvus_cache.go. Co-authored-by: rootfs <7062400+rootfs@users.noreply.github.com> * Update src/semantic-router/pkg/extproc/request_handler.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Revert changes from unsigned commit ae39fe2 Restored the classificationText empty check that was removed in the previous commit. Co-authored-by: rootfs <7062400+rootfs@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: rootfs <7062400+rootfs@users.noreply.github.com> Co-authored-by: Huamin Chen <rootfs@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Allow jailbreak detection and threshold to be configured at the category level (#508) * Initial plan * Add category-level jailbreak detection configuration Co-authored-by: Xunzhuo <48784001+Xunzhuo@users.noreply.github.com> * Add documentation for category-level jailbreak settings Co-authored-by: Xunzhuo <48784001+Xunzhuo@users.noreply.github.com> * Update documentation for category-level jailbreak detection - Add category-level jailbreak configuration to jailbreak-protection.md - Update category configuration docs with jailbreak_enabled parameter - Add security-focused configuration example - Update global configuration docs with category override notes - Update README to mention fine-grained security control Co-authored-by: Xunzhuo <48784001+Xunzhuo@users.noreply.github.com> * Add category-level jailbreak threshold configuration - Add JailbreakThreshold field to Category struct - Add GetJailbreakThresholdForCategory helper method - Create CheckForJailbreakWithThreshold and AnalyzeContentForJailbreakWithThreshold methods - Update performSecurityChecks to use category-specific threshold - Add 5 comprehensive tests for threshold configuration - Update example configs with threshold tuning examples - Update documentation with threshold configuration and tuning guidelines - Add threshold tuning guide with recommendations for different category types Co-authored-by: Xunzhuo <48784001+Xunzhuo@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Xunzhuo <48784001+Xunzhuo@users.noreply.github.com> * Allow PII detection threshold to be set at the category level (#510) * Initial plan * Add category-level PII threshold support Co-authored-by: Xunzhuo <48784001+Xunzhuo@users.noreply.github.com> * Update documentation with API integration notes Co-authored-by: Xunzhuo <48784001+Xunzhuo@users.noreply.github.com> * Fix markdown linting issues Co-authored-by: Xunzhuo <48784001+Xunzhuo@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Xunzhuo <48784001+Xunzhuo@users.noreply.github.com> * Fix: The caller information points to the wrapper function instead of the actual call location (#518) Signed-off-by: carlory <baofa.fan@daocloud.io> * feat: Implement hybrid cache that use in-memory index and milvus based doc store (#504) * feat: add HNSW index to inmemory semantic cache and implement hybrid cache that use in-memory index and milvus based doc store Signed-off-by: Huamin Chen <hchen@redhat.com> * chore: run go mod tidy to clean up module dependencies Signed-off-by: Huamin Chen <hchen@redhat.com> * conditionally build candle cuda support Signed-off-by: Huamin Chen <hchen@redhat.com> * rebuild index upon restart Signed-off-by: Huamin Chen <hchen@redhat.com> * precommit fix Signed-off-by: Huamin Chen <hchen@redhat.com> * fix precommit Signed-off-by: Huamin Chen <hchen@redhat.com> * fix precommit Signed-off-by: Huamin Chen <hchen@redhat.com> * fix precommit Signed-off-by: Huamin Chen <hchen@redhat.com> * disable cuda build on ci Signed-off-by: Huamin Chen <hchen@redhat.com> * review feedback Signed-off-by: Huamin Chen <hchen@redhat.com> * review feedback Signed-off-by: Huamin Chen <hchen@redhat.com> * review feedback Signed-off-by: Huamin Chen <hchen@redhat.com> * review feedback Signed-off-by: Huamin Chen <hchen@redhat.com> --------- Signed-off-by: Huamin Chen <hchen@redhat.com> --------- Signed-off-by: carlory <baofa.fan@daocloud.io> Signed-off-by: JaredforReal <w13431838023@gmail.com> Signed-off-by: yuluo-yx <yuluo08290126@gmail.com> Signed-off-by: Yossi Ovadia <yovadia@redhat.com> Signed-off-by: cryo <zdtna412@gmail.com> Signed-off-by: Huamin Chen <hchen@redhat.com> Co-authored-by: 杨朱 · Kiki <baofa.fan@daocloud.io> Co-authored-by: Jared <w13431838023@gmail.com> Co-authored-by: bitliu <bitliu@tencent.com> Co-authored-by: shown <yuluo08290126@gmail.com> Co-authored-by: Yossi Ovadia <yovadia@redhat.com> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: cryo <zdtna412@gmail.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: rootfs <7062400+rootfs@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Xunzhuo <48784001+Xunzhuo@users.noreply.github.com>
* Update test description from Math to General (#483) Signed-off-by: carlory <baofa.fan@daocloud.io> * feat: add HuggingChat support (#477) * add chat ui to dashboard and docker compose & refactor dashboard/backend/ Signed-off-by: JaredforReal <w13431838023@gmail.com> * try fix network error Signed-off-by: JaredforReal <w13431838023@gmail.com> * more --------- Signed-off-by: JaredforReal <w13431838023@gmail.com> Co-authored-by: bitliu <bitliu@tencent.com> * project: 2025 Q4 roadmap (#487) * project: q4 roadmap * project: q4 roadmap * project: q4 roadmap * more * more * more * more * feat: add shelleck precommit hook (#488) * feat: add shelleck precommit hook Signed-off-by: yuluo-yx <yuluo08290126@gmail.com> * feat: add shelleck precommit hook Signed-off-by: yuluo-yx <yuluo08290126@gmail.com> * feat: add shelleck precommit hook Signed-off-by: yuluo-yx <yuluo08290126@gmail.com> --------- Signed-off-by: yuluo-yx <yuluo08290126@gmail.com> * project: add q4 roadmap news (#495) * fix missing shellcheck in pre-commit image (#497) Signed-off-by: carlory <baofa.fan@daocloud.io> * infra: update tools (#501) Signed-off-by: yuluo-yx <yuluo08290126@gmail.com> * feat(demo): enhance OpenShift demo scripts with improved UX (#478) - Reduce model selection test to 4 categories (2×Model-A, 2×Model-B) - Add new "Classification Examples" option calling curl-examples.sh - Update reasoning examples to avoid cache hits from previous tests - Remove benign examples from PII and Jailbreak tests (show only attacks) - Enhance live-semantic-router-logs.sh with better color visibility: - Fix duplicate "WITH SCORE" text in classification output - Fix CACHE HIT background color extending over timestamp - Distinguish reasoning enabled vs disabled messages - Remove redundant "(standard routing)" text - Add background colors for Model-A/Model-B routing display These improvements make the live demo clearer and more impactful for presentations and demonstrations. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: Yossi Ovadia <yovadia@redhat.com> Co-authored-by: Claude <noreply@anthropic.com> * fix: fix precommit Argument list too long error (#502) Signed-off-by: yuluo-yx <yuluo08290126@gmail.com> * feat: enforce milvus dial timeout if set (#503) Signed-off-by: cryo <zdtna412@gmail.com> * Add IETF draft publication: Multi-Provider Extensions for Agentic AI Inference APIs (#506) * Initial plan * Add new IETF draft publication for Multi-Provider Extensions for Agentic AI Inference APIs Co-authored-by: rootfs <7062400+rootfs@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: rootfs <7062400+rootfs@users.noreply.github.com> * Allow semantic cache similarity threshold to be set at the category level (#493) * Initial plan * Add category-level cache settings: enabled and similarity_threshold Co-authored-by: rootfs <7062400+rootfs@users.noreply.github.com> * Add comprehensive tests for category-level cache settings Co-authored-by: rootfs <7062400+rootfs@users.noreply.github.com> * Update config files and documentation for category-level cache settings - Updated 7 config YAML files (development, production, testing, e2e, and 3 recipes) with commented examples of category-level cache settings - Added comprehensive documentation section explaining category-level cache configuration - Updated semantic cache overview and in-memory cache docs with category-level examples - Added best practices for threshold selection and privacy considerations Co-authored-by: rootfs <7062400+rootfs@users.noreply.github.com> * Remove duplicate code in FindSimilar functions Refactored FindSimilar() to delegate to FindSimilarWithThreshold() with default threshold instead of duplicating the entire implementation. This eliminates 226 lines of duplicate code across inmemory_cache.go and milvus_cache.go. Co-authored-by: rootfs <7062400+rootfs@users.noreply.github.com> * Update src/semantic-router/pkg/extproc/request_handler.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Revert changes from unsigned commit ae39fe2 Restored the classificationText empty check that was removed in the previous commit. Co-authored-by: rootfs <7062400+rootfs@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: rootfs <7062400+rootfs@users.noreply.github.com> Co-authored-by: Huamin Chen <rootfs@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Allow jailbreak detection and threshold to be configured at the category level (#508) * Initial plan * Add category-level jailbreak detection configuration Co-authored-by: Xunzhuo <48784001+Xunzhuo@users.noreply.github.com> * Add documentation for category-level jailbreak settings Co-authored-by: Xunzhuo <48784001+Xunzhuo@users.noreply.github.com> * Update documentation for category-level jailbreak detection - Add category-level jailbreak configuration to jailbreak-protection.md - Update category configuration docs with jailbreak_enabled parameter - Add security-focused configuration example - Update global configuration docs with category override notes - Update README to mention fine-grained security control Co-authored-by: Xunzhuo <48784001+Xunzhuo@users.noreply.github.com> * Add category-level jailbreak threshold configuration - Add JailbreakThreshold field to Category struct - Add GetJailbreakThresholdForCategory helper method - Create CheckForJailbreakWithThreshold and AnalyzeContentForJailbreakWithThreshold methods - Update performSecurityChecks to use category-specific threshold - Add 5 comprehensive tests for threshold configuration - Update example configs with threshold tuning examples - Update documentation with threshold configuration and tuning guidelines - Add threshold tuning guide with recommendations for different category types Co-authored-by: Xunzhuo <48784001+Xunzhuo@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Xunzhuo <48784001+Xunzhuo@users.noreply.github.com> * Allow PII detection threshold to be set at the category level (#510) * Initial plan * Add category-level PII threshold support Co-authored-by: Xunzhuo <48784001+Xunzhuo@users.noreply.github.com> * Update documentation with API integration notes Co-authored-by: Xunzhuo <48784001+Xunzhuo@users.noreply.github.com> * Fix markdown linting issues Co-authored-by: Xunzhuo <48784001+Xunzhuo@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Xunzhuo <48784001+Xunzhuo@users.noreply.github.com> * Fix: The caller information points to the wrapper function instead of the actual call location (#518) Signed-off-by: carlory <baofa.fan@daocloud.io> * feat: Implement hybrid cache that use in-memory index and milvus based doc store (#504) * feat: add HNSW index to inmemory semantic cache and implement hybrid cache that use in-memory index and milvus based doc store Signed-off-by: Huamin Chen <hchen@redhat.com> * chore: run go mod tidy to clean up module dependencies Signed-off-by: Huamin Chen <hchen@redhat.com> * conditionally build candle cuda support Signed-off-by: Huamin Chen <hchen@redhat.com> * rebuild index upon restart Signed-off-by: Huamin Chen <hchen@redhat.com> * precommit fix Signed-off-by: Huamin Chen <hchen@redhat.com> * fix precommit Signed-off-by: Huamin Chen <hchen@redhat.com> * fix precommit Signed-off-by: Huamin Chen <hchen@redhat.com> * fix precommit Signed-off-by: Huamin Chen <hchen@redhat.com> * disable cuda build on ci Signed-off-by: Huamin Chen <hchen@redhat.com> * review feedback Signed-off-by: Huamin Chen <hchen@redhat.com> * review feedback Signed-off-by: Huamin Chen <hchen@redhat.com> * review feedback Signed-off-by: Huamin Chen <hchen@redhat.com> * review feedback Signed-off-by: Huamin Chen <hchen@redhat.com> --------- Signed-off-by: Huamin Chen <hchen@redhat.com> * merge main to feat branch Signed-off-by: Huamin Chen <hchen@redhat.com> --------- Signed-off-by: carlory <baofa.fan@daocloud.io> Signed-off-by: JaredforReal <w13431838023@gmail.com> Signed-off-by: yuluo-yx <yuluo08290126@gmail.com> Signed-off-by: Yossi Ovadia <yovadia@redhat.com> Signed-off-by: cryo <zdtna412@gmail.com> Signed-off-by: Huamin Chen <hchen@redhat.com> Co-authored-by: 杨朱 · Kiki <baofa.fan@daocloud.io> Co-authored-by: Jared <w13431838023@gmail.com> Co-authored-by: bitliu <bitliu@tencent.com> Co-authored-by: shown <yuluo08290126@gmail.com> Co-authored-by: Yossi Ovadia <yovadia@redhat.com> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: cryo <zdtna412@gmail.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: rootfs <7062400+rootfs@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Xunzhuo <48784001+Xunzhuo@users.noreply.github.com>
7d84e64 to
3230c35
Compare
* chore: fix unit test Signed-off-by: Huamin Chen <hchen@redhat.com> * fix go vet Signed-off-by: Huamin Chen <hchen@redhat.com> * fix ci Signed-off-by: Huamin Chen <hchen@redhat.com> * fix ci Signed-off-by: Huamin Chen <hchen@redhat.com> * split test-binding to two stages on ci Signed-off-by: Huamin Chen <hchen@redhat.com> * ignore test failure due to embeddinggemma restriction Signed-off-by: Huamin Chen <hchen@redhat.com> * reorder ci test sequences to avoid missing models Signed-off-by: Huamin Chen <hchen@redhat.com> --------- Signed-off-by: Huamin Chen <hchen@redhat.com>
…reads based on review vllm-project#266 (comment) Signed-off-by: Huamin Chen <hchen@redhat.com>
…reads based on review vllm-project#266 (comment) Signed-off-by: Huamin Chen <hchen@redhat.com>
|
🚀🔥 |
|
@OneZero-Y are you on semantic router slack? or can you reach me via email hchen@redhat.com? Let's coauthor a blog post on this progress, thanks. |
…reads based on review (#528) * refactor: Replace lazy_static with OnceLock for zero-cost concurrent reads based on review #266 (comment) Signed-off-by: Huamin Chen <hchen@redhat.com> * update tests Signed-off-by: Huamin Chen <hchen@redhat.com> --------- Signed-off-by: Huamin Chen <hchen@redhat.com>
Signed-off-by: Huamin Chen <hchen@redhat.com>
* chore: fix lint error Signed-off-by: Huamin Chen <hchen@redhat.com> * chore: fix lint error Signed-off-by: Huamin Chen <hchen@redhat.com> --------- Signed-off-by: Huamin Chen <hchen@redhat.com>
|
Thank you all the great work for this significant milestone. I am merging this to main branch to trigger more CI. Will follow up in the new few days on issues and enhancement. |
|
@rootfs I left you a message at slack |
|
@OneZero-Y @ivarflakstad the blog post PR is here vllm-project/vllm-project.github.io#104 |

Maintains backward compatibility while enabling future model integrations.
refactor: Implement modular candle-binding architecture
Maintains backward compatibility while enabling future model integrations.
What type of PR is this?
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #485
Release Notes: Yes/No