feat: Add psc_endpoint parameter to Sandboxes.send_command and Sandboxes.generate_browser_ws_headers so VPC-SC sandboxes with ingressControlConfig.enablePrivateServiceConnect=true (which populate only connection_info.service_attachment, never load_balancer_hostname / load_balancer_ip) can route data-plane traffic through a customer-provisioned PSC endpoint. Existing non-VPC-SC callers are unaffected; the parameter defaults to None and the load-balancer branches remain the primary path.
#6995
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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. | |
| # | |
| # You can adjust the behavior by modifying this file. | |
| name: Run mypy | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| genai-mypy: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install mypy | |
| pip install google-cloud-aiplatform | |
| - name: Run mypy ${{ matrix.python-version }} | |
| run: mypy vertexai/_genai/ --strict --config-file=vertexai/_genai/mypy.ini |