MCPcopy
hub / github.com/promptfoo/promptfoo / getModelAuditCurrentVersion

Function getModelAuditCurrentVersion

src/updates.ts:76–85  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

74}
75
76export async function getModelAuditCurrentVersion(): Promise<string | null> {
77 try {
78 // Check the actual binary version (works with pip, pipx, or any installation method)
79 const { stdout } = await execAsync('modelaudit --version');
80 const versionMatch = stdout.match(/modelaudit,?\s+version\s+(\S+)/i);
81 return versionMatch ? versionMatch[1] : null;
82 } catch {
83 return null;
84 }
85}
86
87export async function checkModelAuditUpdates(): Promise<boolean> {
88 if (getEnvBool('PROMPTFOO_DISABLE_UPDATE')) {

Callers 3

updates.test.tsFile · 0.90
checkModelAuditInstalledFunction · 0.90
checkModelAuditUpdatesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…