Skip to content

fix: make DOCLING_SERVE_URL a runtime passthrough instead of startup …#1383

Open
ahmedbutt2015 wants to merge 1 commit intolangflow-ai:mainfrom
ahmedbutt2015:fix/docling-serve-url-runtime-passthrough
Open

fix: make DOCLING_SERVE_URL a runtime passthrough instead of startup …#1383
ahmedbutt2015 wants to merge 1 commit intolangflow-ai:mainfrom
ahmedbutt2015:fix/docling-serve-url-runtime-passthrough

Conversation

@ahmedbutt2015
Copy link
Copy Markdown

…snapshot

Fixes #1375

Previously, DOCLING_SERVICE_URL and HOST_IP were resolved once at module import time in src/api/docling.py. Any change to DOCLING_SERVE_URL after onboarding (e.g. pointing to a different docling-serve instance) was silently ignored until the backend process was fully restarted.

Changes:

  • src/api/docling.py: replace the module-level static URL assignment with a get_docling_service_url() function that reads os.getenv("DOCLING_SERVE_URL") on every call, falling back to the auto-detected host when not set. health() now calls get_docling_service_url() per request.
  • src/utils/docling_client.py: import get_docling_service_url() instead of the stale DOCLING_SERVICE_URL string so every conversion request resolves the current URL from the environment at call time.

…snapshot

Fixes langflow-ai#1375

Previously, DOCLING_SERVICE_URL and HOST_IP were resolved once at module
import time in src/api/docling.py. Any change to DOCLING_SERVE_URL after
onboarding (e.g. pointing to a different docling-serve instance) was silently
ignored until the backend process was fully restarted.

Changes:
- src/api/docling.py: replace the module-level static URL assignment with a
  get_docling_service_url() function that reads os.getenv("DOCLING_SERVE_URL")
  on every call, falling back to the auto-detected host when not set.
  health() now calls get_docling_service_url() per request.
- src/utils/docling_client.py: import get_docling_service_url() instead of
  the stale DOCLING_SERVICE_URL string so every conversion request resolves
  the current URL from the environment at call time.
@github-actions github-actions bot added backend 🔷 Issues related to backend services (OpenSearch, Langflow, APIs) community bug 🔴 Something isn't working. labels Apr 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend 🔷 Issues related to backend services (OpenSearch, Langflow, APIs) bug 🔴 Something isn't working. community

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: make DOCLING_SERVE_URL pas through the headers

1 participant