Skip to content

Commit e92e3c9

Browse files
committed
fix(knowledge): warn when embedding model has no pricing entry
1 parent 144b056 commit e92e3c9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

apps/sim/lib/knowledge/documents/service.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -682,6 +682,11 @@ export async function processDocumentAsync(
682682
totalTokensUsed: sql`total_tokens_used + ${totalEmbeddingTokens}`,
683683
},
684684
})
685+
} else {
686+
logger.warn(
687+
`[${documentId}] Embedding model "${embeddingModelName}" has no pricing entry — billing skipped`,
688+
{ totalEmbeddingTokens, embeddingModelName }
689+
)
685690
}
686691
} catch (billingError) {
687692
logger.error(`[${documentId}] Failed to record embedding usage`, { error: billingError })

0 commit comments

Comments
 (0)