Summary
_find_checkpoint() uses glob.glob('models/checkpoints/best_model.pth') and similar relative paths. When the process is launched from any directory other than the repo root (e.g., the CLI is run from ~ or a different project dir), all patterns match nothing and the function returns None, silently forcing the heuristic path every time.
Evidence
src/api/enhanced_strategy_recommender.py lines 113-118: five glob.glob() calls with relative path strings, no Path(__file__) anchor.
Fix
Anchor to the module's own location:
repo_root = Path(__file__).parents[3]
patterns = [str(repo_root / p) for p in [...]]
Summary
_find_checkpoint()usesglob.glob('models/checkpoints/best_model.pth')and similar relative paths. When the process is launched from any directory other than the repo root (e.g., the CLI is run from~or a different project dir), all patterns match nothing and the function returnsNone, silently forcing the heuristic path every time.Evidence
src/api/enhanced_strategy_recommender.pylines 113-118: fiveglob.glob()calls with relative path strings, noPath(__file__)anchor.Fix
Anchor to the module's own location: