# =============================================================================
# Content Agents — Environment Configuration
# =============================================================================
# Copy this file to .env and fill in the keys for the VLM providers you use.
# The unedited material-agent example defaults to `nim`, so it requires
# NVIDIA_API_KEY. To use another provider, also set the MA_* backend/model
# overrides below or edit the YAML config directly.

# --- VLM Provider Keys (pick at least one) ---

# NVIDIA NIM (https://build.nvidia.com/)
NVIDIA_API_KEY=YOUR_NVIDIA_API_KEY

# OpenAI (https://platform.openai.com/api-keys)
OPENAI_API_KEY=YOUR_OPENAI_API_KEY

# Anthropic (https://console.anthropic.com/settings/keys)
ANTHROPIC_API_KEY=YOUR_ANTHROPIC_API_KEY

# Google Gemini (https://aistudio.google.com/apikey)
GOOGLE_API_KEY=YOUR_GOOGLE_API_KEY

# --- Material Agent provider override example (optional) ---
# Uncomment these when running apps/material_agent/configs/unified_example.yaml
# with OpenAI instead of the default NVIDIA NIM backend.
# MA_VLM_BACKEND=openai
# MA_VLM_MODEL=example-vlm-model
# MA_LLM_BACKEND=openai
# MA_LLM_MODEL=example-vlm-model

# --- Material Agent image generation (optional) ---
# Used by generated reference images and generated material-library textures.
# Defaults to public Gemini via GOOGLE_API_KEY/GEMINI_API_KEY when unset.
# MA_IMAGE_GEN_BACKEND=gemini
# MA_IMAGE_GEN_MODEL=gemini-3-pro-image-preview
# MA_IMAGE_GEN_BASE_URL=
# MA_IMAGE_GEN_API_KEY=not-used  # Only for explicit no-auth local endpoints

# --- Rendering / Optimizer Endpoints (optional) ---
# Set these to a full URL of a compatible rendering / scene optimizer
# service (e.g. local OVRTX). For NVCF deployments, use the
# NVCF_*_FUNCTION_ID alternatives instead.
# RENDER_ENDPOINT=http://localhost:8001
# OPTIMIZER_ENDPOINT=http://localhost:8002
# NVCF_RENDER_FUNCTION_ID=YOUR_RENDER_FUNCTION_ID
# NVCF_OPTIMIZER_FUNCTION_ID=YOUR_OPTIMIZER_FUNCTION_ID

# NGC API key (required for NVCF function invocation; get from https://ngc.nvidia.com/)
# NGC_API_KEY=YOUR_NGC_API_KEY

# --- VLM image encoding (optional) ---
# Multi-view renders are encoded inline as data URIs by default - no cloud
# storage is required. To upload renders to S3 instead, set
# MA_RENDERING_USE_DATA_URI=false plus WU_S3_BUCKET and AWS credentials
# via AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY or WU_S3_PROFILE.
# WU_S3_BUCKET=your-bucket-name
# WU_S3_REGION=us-east-2
# WU_S3_PROFILE=your-aws-profile
# MA_RENDERING_USE_DATA_URI=false

# --- Client-supplied S3 inputs (optional) ---
# Empty/unset allowlists reject every client-supplied s3_uri. List exact bucket
# names only, separated by commas or whitespace. Use a dedicated intake bucket
# and narrowly scoped service-role permissions as defense in depth.
# MA_S3_ALLOWED_BUCKETS=your-dedicated-intake-bucket
# JA_S3_ALLOWED_BUCKETS=your-dedicated-intake-bucket
# PA_S3_ALLOWED_BUCKETS=your-dedicated-intake-bucket
# TA_S3_ALLOWED_BUCKETS=your-dedicated-intake-bucket

# --- Material Agent prim clustering (optional) ---
# Service API users can set enable_prim_clustering=true per request.
# Uses NVIDIA image embeddings by default; set NVIDIA_API_KEY for hosted NIM
# or MA_CLUSTER_EMBEDDING_BASE_URL for a self-hosted compatible endpoint.
# MA_CLUSTER_EMBEDDING_BACKEND=nim
# MA_CLUSTER_EMBEDDING_MODEL=nvidia/llama-nemotron-embed-vl-1b-v2
# MA_CLUSTER_EMBEDDING_BASE_URL=
# MA_CLUSTER_EMBEDDING_MAX_WORKERS=4
# MA_CLUSTER_EMBEDDING_BATCH_SIZE=50
# MA_CLUSTER_MIN_PRIMS=50
# MA_CLUSTER_MAX_SIZE=25
# MA_CLUSTER_EMBEDDING_API_KEY=not-used

# =============================================================================
# OpenTelemetry Configuration (optional)
# =============================================================================

# Enable/disable telemetry globally (default: true)
OTEL_ENABLED=true

# Service identification
OTEL_SERVICE_NAME=content-agents
OTEL_SERVICE_VERSION=0.1.0
OTEL_ENVIRONMENT=development

# Exporters: console, langfuse, tempo, http, none
OTEL_EXPORTERS=console

# Sampling rate (0.0 to 1.0, default: 1.0 for 100%)
OTEL_SAMPLE_RATE=1.0

# Langfuse configuration (if using langfuse exporter)
# OTEL_LANGFUSE__PUBLIC_KEY=pk-lf-your-public-key
# OTEL_LANGFUSE__SECRET_KEY=sk-lf-your-secret-key
# OTEL_LANGFUSE__ENDPOINT=http://localhost:3000/api/public/otel
