@@ -18,7 +18,7 @@ function load() {
|
||||
MODELS_SRC +
|
||||
'\n' +
|
||||
TUI_SRC +
|
||||
'\n;this.__exports = { bareAgentHonorExplicitQvacModel, bareAgentApplyLiveModel, bareAgentApplyProviderProfile, bareAgentQvacGetProfile, bareAgentQvacFindChatModel }',
|
||||
'\n;this.__exports = { bareAgentHonorExplicitQvacModel, bareAgentApplyLiveModel, bareAgentApplyProviderProfile, bareAgentQvacGetProfile, bareAgentQvacFindChatModel, bareAgentQvacResolveCtxSize, bareAgentQvacSyncSettingsForModel }',
|
||||
sandbox
|
||||
)
|
||||
return sandbox.__exports
|
||||
@@ -56,6 +56,26 @@ test('apply live model on QVAC sets both keys and profile when catalog-known', a
|
||||
t.is(next.qvac_profile, 'lite')
|
||||
})
|
||||
|
||||
test('live QVAC model switch resets ctx to the new model card', async (t) => {
|
||||
const { bareAgentApplyLiveModel, bareAgentQvacResolveCtxSize, bareAgentQvacGetProfile } =
|
||||
load()
|
||||
const next = bareAgentApplyLiveModel(
|
||||
{
|
||||
backend: 'qvac',
|
||||
qvac_profile: 'recommended',
|
||||
qvac_model: 'QWEN3_1_7B_INST_Q4',
|
||||
qvac_ctx_size: 32768
|
||||
},
|
||||
'QWEN3_5_4B_MULTIMODAL_Q4_K_M'
|
||||
)
|
||||
t.is(next.qvac_model, 'QWEN3_5_4B_MULTIMODAL_Q4_K_M')
|
||||
t.is(next.qvac_ctx_size, 0)
|
||||
t.is(
|
||||
bareAgentQvacResolveCtxSize(next, bareAgentQvacGetProfile(next.qvac_profile)),
|
||||
262144
|
||||
)
|
||||
})
|
||||
|
||||
test('apply live model on REST only changes model', async (t) => {
|
||||
const { bareAgentApplyLiveModel } = load()
|
||||
const next = bareAgentApplyLiveModel(
|
||||
|
||||
Reference in New Issue
Block a user