Add default agentDir to loadCustomModels for consistency
This commit is contained in:
@@ -98,7 +98,7 @@ export function resolveApiKey(keyConfig: string): string | undefined {
|
|||||||
* Load custom models from models.json in agent config dir
|
* Load custom models from models.json in agent config dir
|
||||||
* Returns { models, error } - either models array or error message
|
* Returns { models, error } - either models array or error message
|
||||||
*/
|
*/
|
||||||
function loadCustomModels(agentDir: string): { models: Model<Api>[]; error: string | null } {
|
function loadCustomModels(agentDir: string = getAgentDir()): { models: Model<Api>[]; error: string | null } {
|
||||||
const configPath = join(agentDir, "models.json");
|
const configPath = join(agentDir, "models.json");
|
||||||
if (!existsSync(configPath)) {
|
if (!existsSync(configPath)) {
|
||||||
return { models: [], error: null };
|
return { models: [], error: null };
|
||||||
|
|||||||
Reference in New Issue
Block a user