@@ -963,6 +963,32 @@ func TestClientConfigHTTPOptions(t *testing.T) {
963963 expectedBaseURL : "https://aiplatform.googleapis.com/" ,
964964 expectedAPIVersion : "v1beta1" ,
965965 },
966+ {
967+ name : "Vertex AI Backend with us location" ,
968+ clientConfig : ClientConfig {
969+ Backend : BackendVertexAI ,
970+ Project : "test-project" ,
971+ Location : "us" ,
972+ HTTPOptions : HTTPOptions {},
973+ Credentials : & auth.Credentials {},
974+ },
975+ expectedBaseURL : "https://aiplatform.us.rep.googleapis.com/" ,
976+ expectedAPIVersion : "v1beta1" ,
977+ },
978+ {
979+ name : "Vertex AI Backend with us location and base URL override" ,
980+ clientConfig : ClientConfig {
981+ Backend : BackendVertexAI ,
982+ Project : "test-project" ,
983+ Location : "us" ,
984+ HTTPOptions : HTTPOptions {
985+ BaseURL : "https://my-custom-url.com/" ,
986+ },
987+ Credentials : & auth.Credentials {},
988+ },
989+ expectedBaseURL : "https://my-custom-url.com/" ,
990+ expectedAPIVersion : "v1beta1" ,
991+ },
966992 {
967993 name : "Google AI Backend with HTTP Client Timeout and no HTTPOptions" ,
968994 clientConfig : ClientConfig {
0 commit comments