Skip to content

feat: allow overriding llmgw url for local development - #137

Merged
andreitava-uip merged 1 commit into
mainfrom
feat/llmgw-identity-url
Sep 10, 2026
Merged

feat: allow overriding llmgw url for local development#137
andreitava-uip merged 1 commit into
mainfrom
feat/llmgw-identity-url

Conversation

@andreitava-uip

@andreitava-uip andreitava-uip commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Why

LLMGW_URL is used for everything: LLM calls and the identity token. So you can't point it at a local gateway:

  • the token would get minted from localhost instead of alpha
  • request URLs come out as {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 the X-UiPath-Internal-* headers, which we already send.

What

LLMGatewaySettings now respects UIPATH_SERVICE_URL_LLMGATEWAY. This is the same per-service override from uipath-platform that 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 through LLMGW_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).

@andreitava-uip
andreitava-uip merged commit b55b243 into main Sep 10, 2026
17 checks passed
@andreitava-uip
andreitava-uip deleted the feat/llmgw-identity-url branch September 10, 2026 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants