Core tests / core (push) Successful in 9m57s
Full verification / application (push) Failing after 5m16s
Full verification / local-brain (push) Failing after 6m15s
Realm simulation / simulated-live-world (push) Failing after 5m32s
WoW integration lab / real-worldserver (push) Canceled after 17m23s
Source branch: feature/ai-brain-router Source commit: c2a09e0460465201a58aaab56c71424e9a96405e
43 lines
1.6 KiB
JavaScript
43 lines
1.6 KiB
JavaScript
const {test}=require('node:test');
|
|
const assert=require('node:assert/strict');
|
|
const {routeBrain}=require('../.test-build/llm/index.js');
|
|
const {seed}=require('../.test-build/seed.js');
|
|
|
|
test('Qwen3.5 4B is the default configured local brain',()=>{
|
|
const state=seed();
|
|
assert.equal(state.settings.model,'qwen3.5:4b');
|
|
assert.equal(state.settings.brains.residentModel,'qwen3.5:4b');
|
|
assert.equal(state.settings.brains.heroModel,'qwen3.5:4b');
|
|
});
|
|
|
|
test('Zaku receives the hero brain budget',()=>{
|
|
const state=seed();
|
|
state.settings.provider='ollama';
|
|
const zaku=state.bots.find(b=>b.id==='hero-zaku');
|
|
const route=routeBrain(zaku,state.settings);
|
|
assert.equal(route.provider,'ollama');
|
|
assert.equal(route.model,'qwen3.5:4b');
|
|
assert.equal(route.memoryLimit,state.settings.brains.heroMemoryLimit);
|
|
assert.equal(route.maxTokens,state.settings.brains.heroMaxTokens);
|
|
assert.match(route.reason,/Hero/);
|
|
});
|
|
|
|
test('background residents use deterministic utility brain by default',()=>{
|
|
const state=seed();
|
|
state.settings.provider='ollama';
|
|
const resident=state.bots.find(b=>b.tier==='resident'&&b.simulationBand==='background');
|
|
const route=routeBrain(resident,state.settings);
|
|
assert.equal(route.provider,'deterministic');
|
|
assert.match(route.reason,/Background/);
|
|
});
|
|
|
|
test('foreground residents use configured local model',()=>{
|
|
const state=seed();
|
|
state.settings.provider='ollama';
|
|
const resident=state.bots.find(b=>b.tier==='resident');
|
|
resident.simulationBand='foreground';
|
|
const route=routeBrain(resident,state.settings);
|
|
assert.equal(route.provider,'ollama');
|
|
assert.equal(route.model,state.settings.brains.residentModel);
|
|
});
|