Repository navigation
Commit ad8bb4d
fix(provider): use deep merge for providerOptions in applyCaching - Issue anomalyco#10241
- Change from shallow spread (...) to mergeDeep() for provider options
- Fixes bug where applyCaching overrides previous provider options
- Preserves interleaving options from normalizeMessages transform
- Ensures all provider options are properly merged instead of replaced
Root cause: The spread operator ({...a, ...b}) overwrites properties instead
of deep merging them, causing options set in earlier transforms to be lost.
Example: OpenAI-compatible provider with Claude model uses interleaving
(set in normalizeMessages), but applyCaching was overwriting these options.
Fix: Use remeda's mergeDeep() to properly merge nested option objects.1 parent 04b511e commit ad8bb4d
1 file changed
Lines changed: 9 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
| |||
0 commit comments