mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-17 08:00:59 +00:00
Add default agentDir to loadCustomModels for consistency
This commit is contained in:
parent
d67559a5e4
commit
1236ab8007
1 changed files with 1 additions and 1 deletions
|
|
@ -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 };
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue