Commit a325efe
fix: replace JSON.stringify comparison with structural deep-equal for ProviderModelOptions
JSON.stringify is sensitive to property insertion order, so two
semantically identical ProviderModelOptions objects constructed with
keys in different orders would serialize to different strings. This
caused sameModelOptions to return false incorrectly, triggering
unnecessary Claude session restarts that cleared the resume cursor
and lost conversation context.
Replace with a recursive structural equality check that compares
objects by their defined (non-undefined) keys and values regardless
of key ordering.
Co-authored-by: Julius Marminge <juliusmarminge@users.noreply.github.com>1 parent 5c9cfcd commit a325efe
File tree
1 file changed
+14
-1
lines changed- apps/server/src/orchestration/Layers
1 file changed
+14
-1
lines changedLines changed: 14 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
78 | 91 | | |
79 | 92 | | |
80 | 93 | | |
81 | | - | |
| 94 | + | |
82 | 95 | | |
83 | 96 | | |
84 | 97 | | |
| |||
0 commit comments