The gateway process may not inherit AWS_REGION from the shell environment,
causing pi-ai to fall back to us-east-1. This breaks cross-region inference
profile IDs (eu.*, us.*, global.*) when bedrockDiscovery.region is set to
a different region.
Extract the region from bedrockDiscovery.region (primary) or the provider
baseUrl (fallback) and inject it into stream options so the Bedrock client
connects to the correct regional endpoint.