Harden Exact reconcile and soften post-Generate warm.

Overwrite foreign steps/cfg in sparse patches when the user did not ask for params, and skip the cold-load path when Ollama already has the chat model resident.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Leonid Pershin
2026-08-23 06:58:53 +03:00
co-authored by Cursor
parent 5f33130381
commit 7aadb40a11
7 changed files with 117 additions and 35 deletions
+14 -2
View File
@@ -123,10 +123,22 @@ describe('session.js', () => {
const explicit = mergeExactParamsForGenerate(
{ generate: true, steps: 12, cfg: 2 },
{ exact, profiles: exact.profiles, profileName: 'turbo' },
{ exact, profiles: exact.profiles, profileName: 'turbo', userParamIntent: true },
);
assert.equal(explicit.patch.steps, 12);
assert.equal(explicit.patch.cfg, 2);
assert.equal(explicit.patch.cfg, 2);
const forced = mergeExactParamsForGenerate(
{ generate: true, steps: 20, cfg: 7 },
{
exact: { generation: { steps: 8, cfg: 1 }, profiles: { turbo: { steps: 8, cfg: 1, sigma_shift: 1.15 } } },
profiles: { turbo: { steps: 8, cfg: 1, sigma_shift: 1.15 } },
profileName: 'turbo',
userParamIntent: false,
},
);
assert.equal(forced.patch.steps, 8);
assert.equal(forced.patch.cfg, 1);
});
it('resolveExactProfileDefaults picks raw over generation defaults', () => {