• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

yzhao062 / pyod / 26122516955
93%
master: 93%

Build:
Build:
LAST BUILD BRANCH: development
DEFAULT BRANCH: master
Ran 19 May 2026 08:33PM UTC
Jobs 11
Files 186
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

19 May 2026 07:14AM UTC coverage: 93.874% (+0.06%) from 93.813%
26122516955

push

github

yzhao062
v3.5.3: KB-tools API for agent-driven and LLM-driven routing

Surface 1 (agent tools):
- ADEngine.get_kb_for_routing(profile, top_k=3, constraints=None) returns a
  structured KB snapshot (every shipped detector with strengths, weaknesses,
  best_for, avoid_when, complexity, benchmark_rank, modality_match) filtered
  by exclude_detectors + data_type_strict and sorted by modality-specific
  benchmark rank keys (TSB_AD_overall for time-series, BOND_deep for graph,
  NLP_ADBench_overall for text, MVTec_overall for image, ADBench_overall
  fallback). Each entry carries resolved_rank + resolved_rank_key for
  downstream tools.
- ADEngine.make_plan(detector_choices, justifications=None, params=None)
  validates names against the KB (case-sensitive, must be shipped) and
  returns a closed-schema DetectionPlan consumable by build_detector / run.

Surface 2 (programmatic API):
- ADEngine.plan_detection(profile, priority='balanced', constraints=None, *,
  top_k=3, llm_client=None, llm_strict=None) accepts a (prompt: str) -> str
  callable. Engine builds the routing prompt internally, invokes the
  callable, parses the response, enforces the constrained KB context
  post-parse (LLM cannot bypass exclude_detectors / data_type_strict), and
  returns a DetectionPlan with note='llm-driven via plan_detection(...)' +
  evidence=['llm_routing']. On LLM call or parse failure, falls back to
  rule routing with a RuntimeWarning. llm_strict=True per-call overrides
  the PYOD3_LLM_STRICT env var; precedence is explicit kwarg > env > default.
- pyod/utils/_llm.py: new module with LLMCallable Protocol, RoutingParseError,
  build_routing_prompt(kb_context, top_k), parse_routing_response(response,
  kb, top_k). Parser tolerates surrounding prose, markdown fences, BOM/CRLF,
  skips unknown / non-shipped detectors with a logged warning, dedupes,
  truncates to top_k.

top_k generalization: plan_detection's previous valid[1:3] hard cap is now
valid[1:top_k]. Default 3 preserves v3... (continued)

483 of 502 new or added lines in 3 files covered. (96.22%)

18589 of 19802 relevant lines covered (93.87%)

10.3 hits per line

Uncovered Changes

Lines Coverage ∆ File
16
82.42
pyod/utils/_llm.py
2
91.96
1.23% pyod/utils/ad_engine.py
1
99.67
pyod/test/test_kb_router_surface1.py
Jobs
ID Job ID Ran Files Coverage
1 26122516955.1 19 May 2026 08:33PM UTC 186
93.09
GitHub Action Run
2 26122516955.2 19 May 2026 08:34PM UTC 186
93.85
GitHub Action Run
3 26122516955.3 19 May 2026 08:35PM UTC 186
93.09
GitHub Action Run
4 26122516955.4 19 May 2026 08:35PM UTC 186
93.85
GitHub Action Run
5 26122516955.5 19 May 2026 08:38PM UTC 186
93.85
GitHub Action Run
6 26122516955.6 19 May 2026 08:39PM UTC 186
93.85
GitHub Action Run
7 26122516955.7 19 May 2026 08:43PM UTC 186
93.85
GitHub Action Run
8 26122516955.8 19 May 2026 08:44PM UTC 186
93.09
GitHub Action Run
9 26122516955.9 19 May 2026 08:45PM UTC 186
93.85
GitHub Action Run
10 26122516955.10 19 May 2026 08:51PM UTC 186
93.85
GitHub Action Run
11 26122516955.11 19 May 2026 08:52PM UTC 186
93.85
GitHub Action Run
Source Files on build 26122516955
  • Tree
  • List 186
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 868d6c30 on github
  • Prev Build on master (#26069370838)
  • Next Build on development (#26987782611)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc