feat: allow overriding llmgw url for local development - #137
Merged
Conversation
andreitava-uip
requested review from
DragosBobolea,
cosminacho,
cristipufu,
dragosvelcea,
ionmincu,
ionut-mihalache-uipath,
radu-mocanu and
vldcmp-uipath
as code owners
September 10, 2026 09:28
ionut-mihalache-uipath
approved these changes
Sep 10, 2026
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.
Why
LLMGW_URLis used for everything: LLM calls and the identity token. So you can't point it at a local gateway:{LLMGW_URL}/{org}/{tenant}/llmgateway_/api/.... That prefix is added by the front door in cloud. A gateway running on its own only serves/api/...and gets org/tenant from theX-UiPath-Internal-*headers, which we already send.What
LLMGatewaySettingsnow respectsUIPATH_SERVICE_URL_LLMGATEWAY. This is the same per-service override fromuipath-platformthat we already use for AgentHub (UIPATH_SERVICE_URL_AGENTHUB), not a new mechanism.When set, LLM and discovery requests go to that host as
/api/..., prefix dropped. Discovery cache key uses the resolved URL so local and cloud don't share entries. Token minting is not touched and still goes throughLLMGW_URL.Backwards compatible: if the var is not set, URLs are exactly what they were before.
Affects core and langchain (core change, langchain bumps with it).