@evalops/google-generativeai
v0.4.0
Published
Drop-in Google Generative AI SDK shim for EvalOps llm-gateway routing
Readme
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-generativeaiimport evalops_google_generativeai as genai
genai.configure(
organization_id="org_123",
principal="user:[email protected]",
)
model = genai.GenerativeModel("gemini-2.0-flash")
response = model.generate_content("hello")Environment
EVALOPS_API_KEYorGOOGLE_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 toprod.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.
