Skip to content

Commit 4b6251a

Browse files
Docs: Update documentation for model loader changes
- Updated MODELLOADER.md to reflect hash-based change detection - Clarified that formatting/whitespace changes do not trigger reloads - Updated CHANGELOG.md with changes from #29
1 parent a61628e commit 4b6251a

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Fixed
11+
- Model loader callback consistency - N8nApiModelLoader and JsonFileModelLoader now both only fire callbacks when models actually change (Closes #29)
12+
- JsonFileModelLoader no longer triggers reloads on formatting/whitespace changes
13+
14+
### Changed
15+
- Added `getModelsHash()` method to base ModelLoader class for consistent hash-based change detection
16+
- Both loaders now use unified `lastHash` property name
17+
1018
## [0.0.9] - 2025-10-22
1119

1220
### Added

docs/MODELLOADER.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ MODELS_POLL_INTERVAL=1 # Polling interval in seconds (default: 1)
2828

2929
**Behavior:**
3030
- Startup: Reads file synchronously, throws if not found or invalid JSON
31-
- Hot-reload: Polls file content (hash-based), reloads on changes
31+
- Hot-reload: Polls file and compares model hash, reloads only when models change
3232
- Polling interval: Configurable via `MODELS_POLL_INTERVAL` (default: 1s)
3333
- Invalid models: Filtered out with warnings, server continues
34-
- Hash comparison: Only reloads when file content actually changed
34+
- Hash comparison: Only reloads when model content actually changed (not formatting/whitespace)
3535

3636
**Validation:**
3737
- Model ID: Non-empty string
@@ -82,6 +82,7 @@ AUTO_DISCOVERY_POLL_INTERVAL=300
8282

8383
**Polling:**
8484
- Runs at startup, then at configured interval
85+
- Hash comparison: Only fires callbacks when models actually change
8586
- On failure: Logs error, keeps existing models, retries later
8687
- Disabled when `AUTO_DISCOVERY_POLL_INTERVAL=0`
8788

0 commit comments

Comments
 (0)