fix(cli): don't force localhost gateway url in remote mode

Fixes remote gateway setup (remote mode) by not overriding url; adds regression tests. Thanks @oswalpalash.
This commit is contained in:
Palash Oswal
2026-01-06 09:30:45 -05:00
committed by GitHub
parent 5aa1ed2c96
commit b91012b697
6 changed files with 130 additions and 3 deletions

View File

@@ -9,10 +9,11 @@ export type GatewayCallOptions = {
};
export function resolveGatewayOptions(opts?: GatewayCallOptions) {
// Prefer an explicit override; otherwise let callGateway choose based on config.
const url =
typeof opts?.gatewayUrl === "string" && opts.gatewayUrl.trim()
? opts.gatewayUrl.trim()
: DEFAULT_GATEWAY_URL;
: undefined;
const token =
typeof opts?.gatewayToken === "string" && opts.gatewayToken.trim()
? opts.gatewayToken.trim()