fix(lint): quiet ollama num_ctx normalizer · openclaw/openclaw@62375ae
vincentkoc
·
2026-05-15
·
via Recent Commits to openclaw:main
File tree
src/commands/doctor/shared
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1201,10 +1201,7 @@ function applyLegacyOllamaProviderNumCtxParams(params: {
|
1201 | 1201 | return { |
1202 | 1202 | provider: { |
1203 | 1203 | ...params.provider, |
1204 | | -params: { |
1205 | | - ...(rawParams ?? {}), |
1206 | | -num_ctx: numCtx, |
1207 | | -}, |
| 1204 | +params: rawParams ? { ...rawParams, num_ctx: numCtx } : { num_ctx: numCtx }, |
1208 | 1205 | }, |
1209 | 1206 | changed: true, |
1210 | 1207 | }; |
@@ -1283,13 +1280,9 @@ export function normalizeLegacyOllamaNativeNumCtxParams(
|
1283 | 1280 | changes.push( |
1284 | 1281 | `Set models.providers.${sanitizeForLog(providerId)}.models[${index}].params.num_ctx to ${numCtx} for native Ollama compatibility.`, |
1285 | 1282 | ); |
1286 | | -return { |
1287 | | - ...model, |
1288 | | -params: { |
1289 | | - ...(rawParams ?? {}), |
1290 | | -num_ctx: numCtx, |
1291 | | -}, |
1292 | | -}; |
| 1283 | +return Object.assign({}, model, { |
| 1284 | +params: rawParams ? { ...rawParams, num_ctx: numCtx } : { num_ctx: numCtx }, |
| 1285 | +}); |
1293 | 1286 | }); |
1294 | 1287 | |
1295 | 1288 | if (!modelsChanged && !providerParams.changed) { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。