This commit is contained in:
@@ -56,3 +56,40 @@ test('fetch REST models uses /models and falls back on empty', async (t) => {
|
||||
)
|
||||
t.ok(s.bareAgentRestModelsFallback('groq').some((m) => m.id === 'llama-3.3-70b-versatile'))
|
||||
})
|
||||
|
||||
test('honor explicit QVAC model does not fall back to profile default', async (t) => {
|
||||
const s = load()
|
||||
const next = s.bareAgentHonorExplicitQvacModel(
|
||||
{
|
||||
qvac_profile: 'recommended',
|
||||
qvac_model: 'QWEN3_8B_INST_Q4_K_M',
|
||||
model: 'QWEN3_8B_INST_Q4_K_M'
|
||||
},
|
||||
{ chatModel: 'QWEN3_1_7B_INST_Q4' }
|
||||
)
|
||||
t.is(next.qvac_model, 'QWEN3_8B_INST_Q4_K_M')
|
||||
t.is(next.model, 'QWEN3_8B_INST_Q4_K_M')
|
||||
})
|
||||
|
||||
test('apply live model switches QVAC and REST independently', async (t) => {
|
||||
const s = load()
|
||||
const qvac = s.bareAgentApplyLiveModel(
|
||||
{ backend: 'qvac', qvac_profile: 'recommended', qvac_model: 'QWEN3_1_7B_INST_Q4' },
|
||||
'QWEN3_600M_INST_Q4'
|
||||
)
|
||||
t.is(qvac.qvac_model, 'QWEN3_600M_INST_Q4')
|
||||
t.is(qvac.qvac_profile, 'lite')
|
||||
const rest = s.bareAgentApplyLiveModel(
|
||||
{
|
||||
backend: 'rest',
|
||||
provider: 'groq',
|
||||
rest_api_key: 'gsk',
|
||||
rest_base_url: 'https://api.groq.com/openai/v1',
|
||||
model: 'old'
|
||||
},
|
||||
'llama-3.1-8b-instant'
|
||||
)
|
||||
t.is(rest.backend, 'rest')
|
||||
t.is(rest.model, 'llama-3.1-8b-instant')
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user