Fix CutOS Agent models config path
This commit is contained in:
@@ -30,6 +30,18 @@ const payload = {
|
||||
'api-key': 'test-key',
|
||||
};
|
||||
|
||||
test('defaults to Pi agent models config path', () => {
|
||||
assert.equal(
|
||||
piProvider.resolvePiModelsConfigFile({}),
|
||||
path.join(os.homedir(), '.pi', 'agent', 'models.json'),
|
||||
);
|
||||
});
|
||||
|
||||
test('allows PI_MODELS_CONFIG to override Pi models config path', () => {
|
||||
const customPath = path.join(os.tmpdir(), 'custom-pi-models.json');
|
||||
assert.equal(piProvider.resolvePiModelsConfigFile({ PI_MODELS_CONFIG: customPath }), path.resolve(customPath));
|
||||
});
|
||||
|
||||
test('creates a Pi models file and maps models to reasoning entries', async () => {
|
||||
const configFile = tempConfig();
|
||||
await apply(payload, {
|
||||
|
||||
Reference in New Issue
Block a user