Skip to content

fix: use latest UI LLM settings for ingest - #208

Closed
wachiravit-thitagran wants to merge 1 commit into
VectifyAI:mainfrom
wachiravit-thitagran:agent/fix-latest-ui-llm-settings
Closed

fix: use latest UI LLM settings for ingest#208
wachiravit-thitagran wants to merge 1 commit into
VectifyAI:mainfrom
wachiravit-thitagran:agent/fix-latest-ui-llm-settings

Conversation

@wachiravit-thitagran

Copy link
Copy Markdown

Summary

  • resolve persisted LLM settings at the start of every API or watcher file ingest
  • stop upload requests and long-lived watchers from retaining stale credentials after Workbench settings are saved
  • pass the freshly resolved key, base URL, headers, and timeout into local PageIndex calls without process-wide secret mutation
  • add regressions for credential rotation, watcher freshness, and PageIndex provider validation

Root cause

The Workbench settings endpoints persisted changes correctly, but /api/v1/add captured a credential bundle once per upload request and the watcher captured one once at startup. Later UI saves therefore did not affect already-running multi-file uploads or watchers. Local PageIndex also validated only provider environment variables before its per-call settings were applied.

Impact

Each file ingest now reads the latest persisted UI settings immediately before processing, including files discovered by an already-running watcher. Concurrent KBs retain per-request credential isolation.

Validation

  • pytest tests/test_indexer.py tests/test_add_command.py tests/test_api.py tests/test_watch_service.py::test_worker_does_not_reuse_bundle_captured_at_watcher_start -q - 226 passed
  • ruff check and ruff format --check on changed files
  • mypy openkb/api.py openkb/api_helpers.py openkb/cli.py openkb/indexer.py openkb/watch_service.py
  • git diff --check

@wachiravit-thitagran
wachiravit-thitagran force-pushed the agent/fix-latest-ui-llm-settings branch from 6763214 to 62877ee Compare July 29, 2026 09:35
@wachiravit-thitagran
wachiravit-thitagran deleted the agent/fix-latest-ui-llm-settings branch July 29, 2026 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant