Skip to main content

A simple Vertex AI proxy that automatically refresh tokens for you.

Project description

Simple Vertex Bridge

A simple Vertex AI proxy that automatically refresh tokens for you.

[中文]

Usage

Prerequisites

  • Install uv.

Authentication

There are two ways to authenticate:

  1. By gcloud CLI
    • Install gcloud CLI.
    • Run gcloud auth application-default login to authenticate.
  2. By service account key
    • Create a service account key in the Google Cloud Console, according to this documentation.
    • Download the json key file.
    • Set the GOOGLE_APPLICATION_CREDENTIALS environment variable to the path of the key file.

Launch

  • Note: svbridge-config.json will be created in the current directory.
  1. You can run uvx simple-vertex-bridge to launch the bridge directly from pypi.
  2. Or clone this repo and enter and run uv sync, then activate venv and run python svbridge.py.

Now your API is ready

  • API Endpoint: http://localhost:8086/v1/chat/completions, v1 can be omitted.
  • API Key: anything, the bridge will replace it with the Vertex AI token.

License

The Unlicense.

TBH I dont care what you do with this code, just dont sue me if it breaks something. uwu

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

simple_vertex_bridge-0.1.0.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

simple_vertex_bridge-0.1.0-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file simple_vertex_bridge-0.1.0.tar.gz.

File metadata

  • Download URL: simple_vertex_bridge-0.1.0.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for simple_vertex_bridge-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ad2e48a7c98b209dfb95ff9209450dc1b59f4fdd67a26f8d42bcf44b39a5b2a1
MD5 9f9a80af44fb5f5bb8f20eee8554b06d
BLAKE2b-256 bfbd7706fdd3d235bd849ef4bc5ccd898791372bbf85d1e0fa91b721bfaa08b1

See more details on using hashes here.

File details

Details for the file simple_vertex_bridge-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for simple_vertex_bridge-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b686b5d95bddc61eb4b53ecb5fc9d73e3a62742f010e6a438160f875f2fec412
MD5 005dc91522ae96c806505953511dbecc
BLAKE2b-256 a83e9446aca152572e2fea188288a40d5fb5ec753c675036b665e2ef4de2ddf5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page