Skip to content

Commit 4482eb4

Browse files
committed
review feedback
Signed-off-by: Huamin Chen <[email protected]>
1 parent 3fb7cf1 commit 4482eb4

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

examples/mcp-classifier-server/server.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -530,9 +530,7 @@ async def health_check(request):
530530
parser.add_argument(
531531
"--http", action="store_true", help="Run in HTTP mode instead of stdio"
532532
)
533-
parser.add_argument(
534-
"--port", type=int, default=8090, help="HTTP port (default: 8090)"
535-
)
533+
parser.add_argument("--port", type=int, default=8090, help="HTTP port")
536534
args = parser.parse_args()
537535

538536
if args.http:

src/semantic-router/pkg/connectivity/mcp/stdio_client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ func (c *StdioClient) Connect() error {
7676
}()
7777

7878
c.log(LoggingLevelDebug, fmt.Sprintf("Starting MCP client..."))
79-
// Note: In mcp-go v0.42.0-beta.1, connection starts automatically; Start() method is not used
79+
// Note: Connection starts automatically; Start() method is not required
8080

8181
c.log(LoggingLevelDebug, fmt.Sprintf("Initializing MCP client..."))
8282
// Initialize the client with a simple request (no params needed for basic initialization)

src/semantic-router/pkg/utils/classification/classifier.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ func newClassifierWithOptions(cfg *config.RouterConfig, options ...option) (*Cla
296296
// NewClassifier creates a new classifier with model selection and jailbreak/PII detection capabilities.
297297
// Both in-tree and MCP classifiers can be configured simultaneously for category classification.
298298
// At runtime, in-tree classifier will be tried first, with MCP as a fallback,
299-
// allowing flexible deployment scenarios such as gradual migration or A/B testing.
299+
// allowing flexible deployment scenarios such as gradual migration.
300300
func NewClassifier(cfg *config.RouterConfig, categoryMapping *CategoryMapping, piiMapping *PIIMapping, jailbreakMapping *JailbreakMapping) (*Classifier, error) {
301301
options := []option{
302302
withJailbreak(jailbreakMapping, createJailbreakInitializer(cfg.PromptGuard.UseModernBERT), createJailbreakInference(cfg.PromptGuard.UseModernBERT)),

src/semantic-router/pkg/utils/classification/mcp_classifier.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818

1919
const (
2020
// DefaultMCPThreshold is the default confidence threshold for MCP classification.
21-
// For multi-class classification, a value of 0.5 means that a predicted class must have more than 50% confidence
21+
// For multi-class classification, a value of 0.5 means that a predicted class must have at least 50% confidence
2222
// to be selected. Adjust this threshold as needed for your use case.
2323
DefaultMCPThreshold = 0.5
2424
)

0 commit comments

Comments
 (0)