forked from farhoodlabs/paperclip
fix: address Hermes adapter review feedback
This commit is contained in:
@@ -227,7 +227,7 @@ export function listServerAdapters(): ServerAdapterModule[] {
|
||||
|
||||
export async function detectAdapterModel(
|
||||
type: string,
|
||||
): Promise<{ model: string | null; provider: string | null; source: string | null } | null> {
|
||||
): Promise<{ model: string; provider: string; source: string } | null> {
|
||||
const adapter = adaptersByType.get(type);
|
||||
if (!adapter?.detectModel) return null;
|
||||
const detected = await adapter.detectModel();
|
||||
|
||||
@@ -677,7 +677,7 @@ export function agentRoutes(db: Db) {
|
||||
const type = req.params.type as string;
|
||||
|
||||
const detected = await detectAdapterModel(type);
|
||||
res.json(detected ?? { model: null, provider: null, source: null });
|
||||
res.json(detected);
|
||||
});
|
||||
|
||||
router.post(
|
||||
|
||||
Reference in New Issue
Block a user