Skip to content

Commit 78d6af7

Browse files
waleedlatif1claude
andcommitted
fix(knowledge): use getConfiguredEmbeddingModel in copilot KB creation
Copilot-created KBs were hardcoded to text-embedding-3-small, ignoring KB_EMBEDDING_MODEL. This caused cross-KB searches mixing copilot- and API-created KBs to hit the embedding-model-mismatch guard. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent b1643ee commit 78d6af7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

apps/sim/lib/copilot/tools/server/knowledge/knowledge-base.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ import {
1919
updateDocument,
2020
} from '@/lib/knowledge/documents/service'
2121
import {
22-
DEFAULT_EMBEDDING_MODEL,
2322
EMBEDDING_DIMENSIONS,
2423
generateSearchEmbedding,
24+
getConfiguredEmbeddingModel,
2525
} from '@/lib/knowledge/embeddings'
2626
import {
2727
createKnowledgeBase,
@@ -111,7 +111,7 @@ export const knowledgeBaseServerTool: BaseServerTool<KnowledgeBaseArgs, Knowledg
111111
description: args.description,
112112
workspaceId,
113113
userId: context.userId,
114-
embeddingModel: DEFAULT_EMBEDDING_MODEL,
114+
embeddingModel: getConfiguredEmbeddingModel(),
115115
embeddingDimension: EMBEDDING_DIMENSIONS,
116116
chunkingConfig: args.chunkingConfig || {
117117
maxSize: 1024,

0 commit comments

Comments
 (0)