Merge pull request #5547 from menloresearch/fix/undefined-setting-should-also-disable-context-shift

fix: handle context shift setting from old app versions
This commit is contained in:
Louis 2025-06-26 05:37:31 -07:00 committed by GitHub
commit 4229b9f873
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -280,7 +280,7 @@ export default class JanInferenceCortexExtension extends LocalOAIEngine {
...(model.id.toLowerCase().includes('jan-nano')
? { reasoning_budget: 0 }
: { reasoning_budget: this.reasoning_budget }),
...(this.context_shift === false
...(this.context_shift !== true // explicit true required to enable context shift
? { 'no-context-shift': true }
: {}),
...(modelSettings.ngl === -1 || modelSettings.ngl === undefined