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:
+14
-2
@@ -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', () => {
|
||||
|
||||
Reference in New Issue
Block a user