diff --git a/.github/auto-approve.yml b/.github/auto-approve.yml index 311ebbb853..f8ad6477eb 100644 --- a/.github/auto-approve.yml +++ b/.github/auto-approve.yml @@ -1,3 +1,17 @@ +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # https://github.com/googleapis/repo-automation-bots/tree/main/packages/auto-approve processes: - "OwlBotTemplateChanges" diff --git a/.github/header-checker-lint.yml b/.github/header-checker-lint.yml index 6fe78aa798..96f7d8fad2 100644 --- a/.github/header-checker-lint.yml +++ b/.github/header-checker-lint.yml @@ -1,3 +1,17 @@ +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + {"allowedCopyrightHolders": ["Google LLC"], "allowedLicenses": ["Apache-2.0", "MIT", "BSD-3"], "ignoreFiles": ["**/requirements.txt", "**/requirements-test.txt", "**/__init__.py", "samples/**/constraints.txt", "samples/**/constraints-test.txt"], diff --git a/.github/release-please.yml b/.github/release-please.yml index a388f17a75..5bbe09a548 100644 --- a/.github/release-please.yml +++ b/.github/release-please.yml @@ -1,3 +1,17 @@ +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + releaseType: python handleGHRelease: true manifest: true diff --git a/.github/release-trigger.yml b/.github/release-trigger.yml index ffb9d6d89c..c9623f1410 100644 --- a/.github/release-trigger.yml +++ b/.github/release-trigger.yml @@ -1,2 +1,16 @@ +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + enabled: true multiScmName: python-aiplatform diff --git a/.github/workflows/block_major_releases.yml b/.github/workflows/block_major_releases.yml index 3f69bcff5b..1e904dfc1b 100644 --- a/.github/workflows/block_major_releases.yml +++ b/.github/workflows/block_major_releases.yml @@ -1,3 +1,17 @@ +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # This workflow blocks release-please PRs for major versions unless they have at least 2 approvals. name: Enforce Multiple Approvals for Major Releases diff --git a/.github/workflows/google-contributor-stale.yml b/.github/workflows/google-contributor-stale.yml index ebff9cfcd6..62e81a4e51 100644 --- a/.github/workflows/google-contributor-stale.yml +++ b/.github/workflows/google-contributor-stale.yml @@ -1,3 +1,17 @@ +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # This workflow closes PRs that have had no activity for 14 days. name: Close inactive google-contributor PRs diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml index b2542f5bfa..04988b99f2 100644 --- a/.github/workflows/mypy.yml +++ b/.github/workflows/mypy.yml @@ -1,3 +1,17 @@ +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # This workflow runs mypy for static type checking on the vertexai/_genai submodule. # See https://mypy.readthedocs.io/en/stable/index.html for more information. # diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index b9dfbeb1da..d91cd26c95 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -1,3 +1,17 @@ +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # This workflow warns and then closes issues that have had no activity for a specified amount of time. name: Mark and close stale issues diff --git a/.sample_configs/process_configs.yaml b/.sample_configs/process_configs.yaml index 91c8b61c8f..7b10a30de9 100644 --- a/.sample_configs/process_configs.yaml +++ b/.sample_configs/process_configs.yaml @@ -1,3 +1,17 @@ +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + global: api_endpoint: us-central1-aiplatform.googleapis.com api_endpoint_comment: The AI Platform services require regional API endpoints. diff --git a/.sample_configs/variants.yaml b/.sample_configs/variants.yaml index 0ef9cf7bc7..9470ed5ec2 100644 --- a/.sample_configs/variants.yaml +++ b/.sample_configs/variants.yaml @@ -1,3 +1,17 @@ +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + batch_delete_data_items: - '' batch_migrate_resources: diff --git a/sdk_schema_tests/method_signature_tests/method_signature_tests.py b/sdk_schema_tests/method_signature_tests/method_signature_tests.py index c3417f3352..5e91f46c74 100644 --- a/sdk_schema_tests/method_signature_tests/method_signature_tests.py +++ b/sdk_schema_tests/method_signature_tests/method_signature_tests.py @@ -1,3 +1,17 @@ +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """Tests for method_signature.""" from inspect import signature diff --git a/tests/system/aiplatform/test_vizier.py b/tests/system/aiplatform/test_vizier.py index 0f592cc7ce..014fa21062 100644 --- a/tests/system/aiplatform/test_vizier.py +++ b/tests/system/aiplatform/test_vizier.py @@ -1,3 +1,17 @@ +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + import pytest from google.api_core import exceptions diff --git a/tests/unit/agentplatform/genai/replays/test_public_generate_rubrics.py b/tests/unit/agentplatform/genai/replays/test_public_generate_rubrics.py index d09abb0ef6..352485639a 100644 --- a/tests/unit/agentplatform/genai/replays/test_public_generate_rubrics.py +++ b/tests/unit/agentplatform/genai/replays/test_public_generate_rubrics.py @@ -182,7 +182,7 @@ def test_public_method_generate_rubrics_with_metric(client): """Tests the public generate_rubrics method with a metric.""" client._api_client._http_options.api_version = "v1beta1" client._api_client._http_options.base_url = ( - "https://us-central1-staging-aiplatform.sandbox.googleapis.com/" + "https://us-central1-aiplatform.googleapis.com/" ) metric_resource_name = "projects/977012026409/locations/us-central1/evaluationMetrics/6048334299558576128" metric = types.Metric( diff --git a/tests/unit/agentplatform/genai/replays/test_skills_delete.py b/tests/unit/agentplatform/genai/replays/test_skills_delete.py index a8bd0ba2f2..41b119ab86 100644 --- a/tests/unit/agentplatform/genai/replays/test_skills_delete.py +++ b/tests/unit/agentplatform/genai/replays/test_skills_delete.py @@ -1,3 +1,17 @@ +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """Tests the skills.delete() method against the prod endpoint.""" from tests.unit.agentplatform.genai.replays import pytest_helper diff --git a/tests/unit/agentplatform/genai/replays/test_skills_get.py b/tests/unit/agentplatform/genai/replays/test_skills_get.py index e217ee2e97..d342ea213b 100644 --- a/tests/unit/agentplatform/genai/replays/test_skills_get.py +++ b/tests/unit/agentplatform/genai/replays/test_skills_get.py @@ -1,3 +1,17 @@ +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """Tests the skills.get() method against the prod endpoint.""" from google.api_core import exceptions diff --git a/tests/unit/agentplatform/genai/replays/test_skills_list.py b/tests/unit/agentplatform/genai/replays/test_skills_list.py index 06613df086..acf1c0444b 100644 --- a/tests/unit/agentplatform/genai/replays/test_skills_list.py +++ b/tests/unit/agentplatform/genai/replays/test_skills_list.py @@ -1,3 +1,17 @@ +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """Tests the skills.list() method against the prod endpoint.""" from tests.unit.agentplatform.genai.replays import pytest_helper diff --git a/tests/unit/agentplatform/genai/replays/test_skills_retrieve.py b/tests/unit/agentplatform/genai/replays/test_skills_retrieve.py index ba634c8a10..768eb2c072 100644 --- a/tests/unit/agentplatform/genai/replays/test_skills_retrieve.py +++ b/tests/unit/agentplatform/genai/replays/test_skills_retrieve.py @@ -1,3 +1,17 @@ +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """Tests the skills.retrieve() method against the autopush endpoint.""" from tests.unit.agentplatform.genai.replays import pytest_helper diff --git a/tests/unit/agentplatform/genai/run_replay_tests.sh b/tests/unit/agentplatform/genai/run_replay_tests.sh index ab0a909a89..caf4d7641d 100755 --- a/tests/unit/agentplatform/genai/run_replay_tests.sh +++ b/tests/unit/agentplatform/genai/run_replay_tests.sh @@ -1,4 +1,17 @@ #!/bin/bash +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # This script runs replay tests for the Vertex SDK GenAI client # It is intended to be used from the google3 directory of a CitC client. diff --git a/tests/unit/agentplatform/genai/test_sandbox.py b/tests/unit/agentplatform/genai/test_sandbox.py index 3d8f7d1e13..9672e473a9 100644 --- a/tests/unit/agentplatform/genai/test_sandbox.py +++ b/tests/unit/agentplatform/genai/test_sandbox.py @@ -80,7 +80,7 @@ def test_send_command(self, mock_get_api_client): mock_sandbox = mock.Mock() mock_sandbox.connection_info.load_balancer_ip = None mock_sandbox.connection_info.load_balancer_hostname = ( - "test-us-central1.sandbox.vertexai.goog" + "test-us-central1.example.vertexai.goog" ) mock_sandbox.connection_info.routing_token = "test_routing_token" mock_http_client = mock_get_api_client.return_value @@ -100,7 +100,7 @@ def test_send_command(self, mock_get_api_client): _, kwargs = call_args http_options = kwargs["http_options"] assert http_options.base_url == ( - "https://test-us-central1.sandbox.vertexai.goog/test/path" + "https://test-us-central1.example.vertexai.goog/test/path" ) assert http_options.headers["Authorization"] == "Bearer test_token" @@ -116,7 +116,7 @@ def test_generate_browser_ws_headers( mock_sandbox = mock.Mock() mock_sandbox.connection_info.load_balancer_ip = None mock_sandbox.connection_info.load_balancer_hostname = ( - "test-us-central1.sandbox.vertexai.goog" + "test-us-central1.example.vertexai.goog" ) mock_sandbox.connection_info.routing_token = "test_routing_token" mock_http_client = mock_get_api_client.return_value @@ -130,7 +130,7 @@ def test_generate_browser_ws_headers( timeout=3600, ) ) - assert ws_url == "wss://test-us-central1.sandbox.vertexai.goog/test/endpoint" + assert ws_url == "wss://test-us-central1.example.vertexai.goog/test/endpoint" assert ( headers["Sec-WebSocket-Protocol"] == "v1.stream, test_token, test_routing_token, 9222" diff --git a/tests/unit/vertex_ray/test_prediction_utils.py b/tests/unit/vertex_ray/test_prediction_utils.py index d77930b8aa..d41b0fc399 100644 --- a/tests/unit/vertex_ray/test_prediction_utils.py +++ b/tests/unit/vertex_ray/test_prediction_utils.py @@ -1,3 +1,17 @@ +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """Test utils for Prediction Tests.""" import numpy as np diff --git a/vertexai/generative_models/_generative_models.py b/vertexai/generative_models/_generative_models.py index e9d5c26505..c41f2802a0 100644 --- a/vertexai/generative_models/_generative_models.py +++ b/vertexai/generative_models/_generative_models.py @@ -2400,8 +2400,7 @@ def _fix_schema_dict_for_gapic_in_place(schema_dict: Dict[str, Any]) -> None: # those listed in "properties". We remove this because that is # already our default behavior. # True: This means that additional properties are allowed with any value - # type. We replace this with an equivalent empty dict: - # https://screenshot.googleplex.com/yvgmAmZay5Dw7qY + # type. We replace this with an equivalent empty dict. if (additional := schema_dict.get("additionalProperties")) is not None: if additional is False: del schema_dict["additionalProperties"] diff --git a/vertexai/language_models/_distillation.py b/vertexai/language_models/_distillation.py index 2fc8f691ae..944d8a4769 100644 --- a/vertexai/language_models/_distillation.py +++ b/vertexai/language_models/_distillation.py @@ -1,3 +1,17 @@ +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + from typing import Optional, Union from google.cloud import aiplatform diff --git a/vertexai/preview/evaluation/multimodal_utils.py b/vertexai/preview/evaluation/multimodal_utils.py index c2a08aaac1..d415597043 100644 --- a/vertexai/preview/evaluation/multimodal_utils.py +++ b/vertexai/preview/evaluation/multimodal_utils.py @@ -1,3 +1,17 @@ +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """Utility functions for multimodal evaluation.""" import logging