feat: configure deep search llm models
This commit is contained in:
@@ -15,7 +15,7 @@ The standalone runtime uses the built-in `node:sqlite` module and therefore requ
|
||||
7. Generate a Markdown report with numbered citations.
|
||||
8. Persist task state, sources, events, report, and research memory in SQLite.
|
||||
|
||||
The planner and report writer use an OpenAI-compatible model when configured. If the model is unavailable, deterministic planning and citation-safe extractive reporting keep the service operational.
|
||||
The planner and report writer use an optional model selected from TKMind's Unified Model Center. MindSearch stores only the Provider Key ID and model name. Deep Search calls a secret-protected Portal gateway, and the provider API key never leaves the Portal process. If the selected model is unavailable, deterministic planning and citation-safe extractive reporting keep the service operational.
|
||||
|
||||
`createDeepSearchEngine` also accepts an explicit `memorySink` callback. It is disabled by default; an in-process TKMind integration can inject `memoryV2.write` without giving the standalone service an unrestricted outbound memory endpoint. Memory sink failures are fail-open and recorded as task events.
|
||||
|
||||
@@ -24,6 +24,7 @@ The planner and report writer use an OpenAI-compatible model when configured. If
|
||||
```bash
|
||||
TKMIND_DEEP_SEARCH_SEARXNG_URL=http://127.0.0.1:8080/search \
|
||||
TKMIND_DEEP_SEARCH_DB=.deep-search/research.sqlite \
|
||||
TKMIND_DEEP_SEARCH_SECRET=local-shared-secret \
|
||||
npm run dev:deep-search
|
||||
```
|
||||
|
||||
@@ -70,14 +71,14 @@ Start response:
|
||||
| `TKMIND_DEEP_SEARCH_DB` | `.deep-search/research.sqlite` | SQLite database |
|
||||
| `TKMIND_DEEP_SEARCH_SEARXNG_URL` | `http://127.0.0.1:8080/search` | Upstream search endpoint |
|
||||
| `TKMIND_DEEP_SEARCH_SECRET` | empty | Optional `X-Secret-Key` required by non-health routes |
|
||||
| `TKMIND_DEEP_SEARCH_LLM_URL` | empty | OpenAI-compatible chat-completions endpoint |
|
||||
| `TKMIND_DEEP_SEARCH_LLM_API_KEY` | empty | Optional model API key |
|
||||
| `TKMIND_DEEP_SEARCH_LLM_MODEL` | empty | Planner and report model |
|
||||
| `TKMIND_DEEP_SEARCH_LLM_GATEWAY_URL` | `http://127.0.0.1:8081/api/internal/deep-search/llm` | Portal LLM gateway |
|
||||
| `TKMIND_DEEP_SEARCH_LLM_GATEWAY_SECRET` | `TKMIND_DEEP_SEARCH_SECRET` | Portal gateway bearer secret |
|
||||
|
||||
## Isolation and safety
|
||||
|
||||
- The default bind address is loopback only.
|
||||
- An optional service secret protects all non-health endpoints.
|
||||
- The same secret can authenticate the local service to the Portal LLM gateway.
|
||||
- MCP forwards the current TKMind user ID as `X-User-Id`.
|
||||
- Task status, event, and cancellation routes enforce user ownership when a user ID is present.
|
||||
- Source reading rejects credentials, loopback, link-local, private, multicast, and private-DNS destinations.
|
||||
@@ -94,11 +95,15 @@ The built-in disabled service is:
|
||||
"adapter": "research-http",
|
||||
"endpoint": "http://127.0.0.1:20100",
|
||||
"healthPath": "/health",
|
||||
"enabled": false
|
||||
"enabled": false,
|
||||
"llmProviderKeyId": "",
|
||||
"llmModel": ""
|
||||
}
|
||||
```
|
||||
|
||||
After local verification, enable the service and MindSearch in `memindadm`, then select `deep-search` for the `research` route. New Goose sessions receive:
|
||||
In `memindadm` → `MindSearch` → `TKMind Deep Search`, select an optional active Provider configuration and one of its models. The list comes directly from Unified Model Center. The `测试 LLM` action checks that exact Provider/model combination before saving the MindSearch configuration. Selecting “不使用 LLM(确定性降级)” leaves both fields empty.
|
||||
|
||||
After local verification, enable the service and MindSearch, then select `deep-search` for the `research` route. New Goose sessions receive:
|
||||
|
||||
- `tkmind_research`
|
||||
- `tkmind_research_status`
|
||||
|
||||
Reference in New Issue
Block a user