You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description: When configuring a custom OpenAI-compatible proxy via OPENAI_API_BASE and OPENAI_API_KEY in .env, short documents process fine, but long documents (>20 pages) fail during index_long_document with litellm.AuthenticationError: 401 Unauthorized or API key not configured.
Root Cause: openkb.indexer.index_long_document instantiates PageIndexClient without passing through the resolved base_url and api_key from the credential bundle, and pageindex.index.utils.llm_completion does not inject api_base/api_key into litellm.completion().
Expected Behavior: PageIndexClient and its internal LiteLLM calls should inherit the active KB's resolved OPENAI_API_BASE and OPENAI_API_KEY.
Steps to Reproduce
Configure .env with a custom OpenAI-compatible proxy:
Ingest a long PDF (>20 pages, e.g., 30 pages) via openkb add doc.pdf or watch service.
index_long_document triggers PageIndexClient, which throws litellm.AuthenticationError: Error code: 401 - {'error': 'API key required for remote API access'} because credentials are not forwarded to LiteLLM inside pageindex.index.utils.
Description: When configuring a custom OpenAI-compatible proxy via OPENAI_API_BASE and OPENAI_API_KEY in .env, short documents process fine, but long documents (>20 pages) fail during index_long_document with litellm.AuthenticationError: 401 Unauthorized or API key not configured.
Root Cause: openkb.indexer.index_long_document instantiates PageIndexClient without passing through the resolved base_url and api_key from the credential bundle, and pageindex.index.utils.llm_completion does not inject api_base/api_key into litellm.completion().
Expected Behavior: PageIndexClient and its internal LiteLLM calls should inherit the active KB's resolved OPENAI_API_BASE and OPENAI_API_KEY.
Steps to Reproduce
.envwith a custom OpenAI-compatible proxy:model: openai/your-modelinconfig.yaml.openkb add doc.pdfor watch service.index_long_documenttriggersPageIndexClient, which throwslitellm.AuthenticationError: Error code: 401 - {'error': 'API key required for remote API access'}because credentials are not forwarded to LiteLLM insidepageindex.index.utils.