Metadata-Version: 2.4
Name: evalops-google-generativeai
Version: 0.3.0
Summary: Drop-in Google Generative AI SDK shim for EvalOps llm-gateway routing
Project-URL: Homepage, https://github.com/evalops/evalops-google-generativeai
Project-URL: Repository, https://github.com/evalops/evalops-google-generativeai
Project-URL: Changelog, https://github.com/evalops/evalops-google-generativeai/blob/main/CHANGELOG.md
Project-URL: Issues, https://github.com/evalops/evalops-google-generativeai/issues
Requires-Python: >=3.9
Requires-Dist: google-generativeai>=0.8.0
Provides-Extra: test
Requires-Dist: pytest>=8.0.0; extra == 'test'
Description-Content-Type: text/markdown

# 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

```bash
pip install evalops-google-generativeai
```

```python
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.
