litellm appends /v1/messages itself, so the default Anthropic base URL
ending in /v1 made PageIndex OSS indexing 404 for any Anthropic API-key
model.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
PageIndex OSS resolved its indexing model from the active chat LLM, so an
OAuth-only chat provider (Codex) blocked indexing entirely. Resolve it from
the Task model instead when one is set, and fall back to the chat LLM
otherwise, so existing setups behave the same.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
_generate_queries cleaned each LLM-returned line with
line.strip().lstrip("0123456789.-) "). str.lstrip takes a character SET, not a
prefix, so besides the intended "1. "/"2) " list markers it also ate any
leading digits of the query itself: "2024 budget forecast" -> "budget
forecast", "5G network rollout" -> "G network rollout". The KB was then
searched for a materially different query whenever a variant began with a
number (years, 5G, 3D, versions). Strip a real leading list marker with a
regex instead.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
_describe_group handled only asyncio.TimeoutError, so any other exception
out of the batcher propagated through asyncio.gather, aborted
_load_image_nodes, and took the whole document ingest with it. Every
sibling failure path in the same function skips and logs instead: missing
or non-multimodal embedding client, unavailable LLM, reader OSError, empty
captions. The batch group was the one seam that re-raised.
The current batcher folds its own errors into [None] * len(images), so
this is defensive: the loader should not have to depend on that internal
detail to keep captions best-effort, and the batch path is opt-in and the
least exercised.
The new test replaces the batcher with one that raises and asserts the
ingest still returns.
Signed-off-by: cgycorey <cgycorey@users.noreply.github.com>
Expose inspectable extraction coverage, retain structured provenance, resolve bilingual figure and table references without similarity substitution, and provide bounded local page/region fallback with source identity checks.
Opper (https://opper.ai) is an EU-hosted AI gateway: 700+ models from
50+ providers behind one OpenAI-compatible API and one key. This adds it
as a named provider. The LLM entry follows the Requesty one (#1631). The
embedding entry follows the OpenRouter one, with a default model and
dimension like the OpenAI entry.
- provider_registry.py: gateway ProviderSpec after FutureInfra. Env
OPPER_API_KEY, base URL https://api.opper.ai/v3/compat. Base URL
detection keys on the api.opper.ai host rather than a bare "opper"
substring, so unrelated URLs that happen to contain it are not claimed.
- Embeddings: Opper serves OpenAI-compatible /embeddings under the same
base URL. Registered in embedding_endpoint.py (label, default endpoint,
/embeddings path rule), provider_runtime.py (default
text-embedding-3-large, 3072 dims) and the GraphRAG OpenAI-compatible
binding set.
- Tests: registry lookup and base detection, runtime resolution for the
opper binding and for an openai binding pointed at Opper, the Settings
LLM choice, native tool calling, the embedding runtime and the GraphRAG
api_base translation.
Like the other recent gateway additions, it stays out of the curated
init menus, the README and the capability table. Opper model ids are
bare names (claude-sonnet-4-6, gpt-5.4-mini, text-embedding-3-large), so
the existing model-level rules for claude-, gpt-5 and gemini apply as
they are, and the text-embedding-3 rule sends dimensions=3072.
Checked: python -m py_compile on the ten changed files, git diff --check.
Not run locally: pytest, ruff and pre-commit.
Disclosure: I work at Opper.
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: Bingxi Zhao (Frank) <13051345080@163.com>
* fix(embedding): log progress callback failures instead of swallowing them
embed/embed_contents wrapped progress_callback in 'except Exception: pass'.
A failing progress sink vanished without a trace while indexing continued,
making KB index progress untrustworthy (stalled reads with no diagnostics).
Keep the callback best-effort (embedding runs must not fail on UI feedback)
but log a warning with batch context and the underlying exception.
* fix: log image progress callback failures instead of swallowing them
_describe_one wrapped image_progress_callback in 'except Exception: pass',
so a broken progress sink silently dropped indexing progress updates with
no trace. Log a warning with completed/total context and keep the batch
running; add a focused test covering visible failure logging and
uninterrupted loading.
* fix(lightrag): warn when workspace meta.json exists but is unusable
workspace_for() swallowed OSError/ValueError when reading meta.json and
silently fell back to the path-hash workspace name, which can open an
empty store with no log trail. Missing files stay silent; unreadable or
corrupt meta now logs a warning with the path and exception type while
keeping the same fallback behavior.
* test(codebuddy): make credential fixture expiry relative to now
test_load_credentials_parses_session wrote a hard-coded expiresAt of
1791055241000 (2026-10-03 15:40:41 UTC) and asserted is_expired() is
False. Once that instant passed the assertion flipped, so the test now
fails on every Python version for every branch.
Derive expiresAt / refreshExpiresAt from time.time() so the fixture
always describes a live session, and assert against the value written.
---------
Co-authored-by: XZH <cto@xzh.ai>
* fix(rag): classify invalid persisted index errors and include re-index steps
Searching a knowledge base whose persisted vector store contains invalid
vectors (issue #440) was misclassified: the ValueError raised at index
load wraps a provider-facing "Details: ..." tail, so search_error_result
matched the embedding-provider branch first and returned
invalid_embedding_provider_response without needs_reindex, blaming the
provider instead of the damaged index.
Check the persisted-index diagnosis first, include the recorded failure
reason (which store file, which vector) in the user-facing answer, and
spell out recovery: run the knowledge base's 'Re-index' action; re-uploading
documents reuses the damaged store and cannot repair it.
* test(codebuddy): make credential fixture expiry relative to now
test_load_credentials_parses_session wrote a hard-coded expiresAt of
1791055241000 (2026-10-03 15:40:41 UTC) and asserted is_expired() is
False. Once that instant passed the assertion flipped, so the test now
fails on every Python version for every branch.
Derive expiresAt / refreshExpiresAt from time.time() so the fixture
always describes a live session, and assert against the value written.
---------
Co-authored-by: XZH <cto@xzh.ai>