Skip to content

feat: add smart routing pattern detector#44

Open
saurabhhhcodes wants to merge 1 commit into
Ruthwik000:mainfrom
saurabhhhcodes:feat/pattern-detector-18
Open

feat: add smart routing pattern detector#44
saurabhhhcodes wants to merge 1 commit into
Ruthwik000:mainfrom
saurabhhhcodes:feat/pattern-detector-18

Conversation

@saurabhhhcodes
Copy link
Copy Markdown

Summary

  • adds detectByPatterns() for regex/keyword smart-routing task detection
  • includes built-in task patterns for code, review, math, reasoning, documents, docs, writing, translation, extraction, factual QA, chat, and Chinese prompts
  • returns confidence, matched patterns/keywords, model recommendation, timeout metadata, and unknown fallback results
  • exports the detector and TypeScript types from the package entrypoint
  • adds focused detector regression tests, including bounded long-input scanning

Validation

  • npm run build
  • node tests/pattern-detector.test.js
  • node tests/cross-provider.test.js
  • git diff --check

Closes #18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[GSSoC'26] Implement Pattern Detector

1 participant