Skip to content

fix(knowledge): harden GraphRAG model and embedding compatibility - #747

Open
Lan-zk wants to merge 2 commits into
HKUDS:devfrom
Lan-zk:fix/graphrag-preflight-error-ui
Open

fix(knowledge): harden GraphRAG model and embedding compatibility#747
Lan-zk wants to merge 2 commits into
HKUDS:devfrom
Lan-zk:fix/graphrag-preflight-error-ui

Conversation

@Lan-zk

@Lan-zk Lan-zk commented Aug 1, 2026

Copy link
Copy Markdown

Description

Fix the GraphRAG compatibility gaps described in #745.

  • Preserve the selected DeepTutor chat provider and use the same provider-specific request options in compatibility probes and real indexing.
  • Support native structured output where available, with a schema-in-prompt fallback and strict local validation for compatible custom endpoints.
  • Normalize complete /embeddings operation URLs only in GraphRAG settings, preventing duplicated /embeddings/embeddings paths.
  • Forward embedding dimensions and custom headers consistently, and reject transports GraphRAG cannot use safely.
  • Run completion and embedding preflights before incremental updates write existing knowledge-base settings or input files.
  • Surface stable, secret-free completion and embedding errors while keeping tracebacks in server logs.

Compatibility

  • Existing GraphRAG index schemas and ready indexes are not changed or rebuilt.
  • Stored global chat and embedding profiles are not rewritten.
  • Other RAG engines retain their existing endpoint behavior.

Related Issues

Module(s) Affected

  • agents
  • api
  • config
  • core
  • knowledge
  • logging
  • services
  • tools
  • utils
  • web (Frontend)
  • docs (Documentation)
  • scripts
  • tests
  • Other: ...

Validation

  • Changed-file pre-commit hooks passed: Ruff, Ruff format, Prettier, detect-secrets, Bandit, and MyPy.
  • 102 focused GraphRAG/logging tests passed; the three router import cases used a minimal test configuration.
  • pytest tests/services/embedding: 104 passed.
  • npm run test:node: 369 passed.
  • npm run lint: 0 errors; 60 existing repository warnings.
  • npm run build: passed.
  • A complete re-index of an existing GraphRAG knowledge base succeeded with the patched DeepTutor 1.5.7 build.

Repository-wide pre-commit run --all-files still encounters unrelated baseline Prettier drift and the existing Bandit B108 finding in deeptutor/services/cli_apps/runner.py; those files are not changed by this PR.

Checklist

  • I have read and followed the contribution guidelines.
  • My code follows the project's coding standards.
  • I have run pre-commit run --all-files and fixed any issues. See the baseline note above; all hooks pass on the changed files.
  • I have added relevant tests for my changes.
  • I have updated the documentation (not required for this internal compatibility fix).
  • My changes do not introduce any new security vulnerabilities.

@Lan-zk Lan-zk changed the title fix(knowledge): add GraphRAG model compatibility layer fix(knowledge): harden GraphRAG model and embedding compatibility Aug 1, 2026
@Lan-zk
Lan-zk marked this pull request as ready for review August 1, 2026 23:18
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