fix: make DOCLING_SERVE_URL a runtime passthrough instead of startup …#1383
Open
ahmedbutt2015 wants to merge 1 commit intolangflow-ai:mainfrom
Open
fix: make DOCLING_SERVE_URL a runtime passthrough instead of startup …#1383ahmedbutt2015 wants to merge 1 commit intolangflow-ai:mainfrom
ahmedbutt2015 wants to merge 1 commit intolangflow-ai:mainfrom
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…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: