feat: configure deep search llm models

This commit is contained in:
john
2026-07-23 22:46:10 +08:00
parent be1e4c18c0
commit 784a10a592
11 changed files with 360 additions and 35 deletions
+5
View File
@@ -90,6 +90,8 @@ export async function startResearchTask(question, {
endpoint,
depth = 'standard',
userId = null,
llmProviderKeyId = '',
llmModel = '',
timeoutMs = 30000,
fetchImpl = fetch,
secret = process.env.TKMIND_DEEP_SEARCH_SECRET,
@@ -98,6 +100,9 @@ export async function startResearchTask(question, {
question,
depth,
...(userId ? { userId } : {}),
...(llmProviderKeyId && llmModel
? { llm_provider_key_id: llmProviderKeyId, llm_model: llmModel }
: {}),
}, { timeoutMs, fetchImpl, userId, secret });
if (!body || typeof body !== 'object' || !body.task_id) throw new Error('Research service returned an invalid task');
return {