Skip to main content

Drop-in Google Generative AI SDK shim for EvalOps llm-gateway routing

Project description

evalops-google-generativeai

Drop-in google-generativeai shim for stamping EvalOps organization scope, principal attribution, trace IDs, and provider references onto Google Generative AI calls.

This package wraps the official Google Generative AI SDK so teams can route model calls through EvalOps with minimal code changes.

Python

pip install evalops-google-generativeai
import evalops_google_generativeai as genai

genai.configure(
    organization_id="org_123",
    principal="user:ada@example.com",
)

model = genai.GenerativeModel("gemini-2.0-flash")
response = model.generate_content("hello")

Environment

  • EVALOPS_API_KEY or GOOGLE_API_KEY: Platform-issued bearer token.
  • EVALOPS_ORGANIZATION_ID: organization scope stamped into requests.
  • EVALOPS_PRINCIPAL: optional actor string for audit attribution.
  • EVALOPS_TRACE_ID: optional trace correlation ID.
  • EVALOPS_LLM_GATEWAY_GOOGLE_URL: Google-compatible gateway base URL.
  • EVALOPS_LLM_GATEWAY_URL: fallback gateway base URL.
  • EVALOPS_PROVIDER_ENVIRONMENT: defaults to prod.
  • EVALOPS_PROVIDER_CREDENTIAL_NAME: optional provider ref credential name.
  • EVALOPS_PROVIDER_TEAM_ID: optional provider ref team ID.

Provider References

Set provider reference environment variables when a request should select a specific provider credential. Organizations with default provider routing can omit those values and keep the vendor SDK call shape.

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

evalops_google_generativeai-0.4.0.tar.gz (19.8 kB view details)

Uploaded Source

Built Distribution

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

evalops_google_generativeai-0.4.0-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file evalops_google_generativeai-0.4.0.tar.gz.

File metadata

File hashes

Hashes for evalops_google_generativeai-0.4.0.tar.gz
Algorithm Hash digest
SHA256 eaeb5aa973711c032a1b26c3dc45ab756fe8b083eb67034f1100b7c178de4311
MD5 a35b8ec9fdc12bfbb4436e663b4fd89f
BLAKE2b-256 4ee9547b4788d226104911f92f7b60de3d6491b8153a5a568400684d74590e5d

See more details on using hashes here.

Provenance

The following attestation bundles were made for evalops_google_generativeai-0.4.0.tar.gz:

Publisher: publish.yml on evalops/evalops-google-generativeai

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file evalops_google_generativeai-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for evalops_google_generativeai-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6fbf765767166f73b95862b1751c145e90c6dd3b1d1c9625389f7276373805f3
MD5 69b63aa357e969d6d4f71752e2fe019f
BLAKE2b-256 cbaf383006a142c2c5a89b2b6511a77f21af158c5ae8974deb0115ae5d7c858f

See more details on using hashes here.

Provenance

The following attestation bundles were made for evalops_google_generativeai-0.4.0-py3-none-any.whl:

Publisher: publish.yml on evalops/evalops-google-generativeai

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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