Repository navigation
Commit 3688436
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 fa1a54b commit 3688436
1 file changed
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
189 | | - | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
190 | 193 | | |
191 | 194 | | |
192 | 195 | | |
193 | 196 | | |
194 | | - | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
195 | 201 | | |
196 | 202 | | |
197 | 203 | | |
| |||
0 commit comments