# Common
APP_NAME=tim-ai-atend-agnt-integ-tia
K8S_NAMESPACE=agnt-ai-atendimento
IMAGE_REPOSITORY=iad.ocir.io/SEU_NAMESPACE/tia
IMAGE_TAG=regional-xai-pool-v1
TIA_SERVICE_TYPE=LoadBalancer
TERMINATION_GRACE_SECONDS=600
DRAIN_SECONDS=30
PDB_MIN_AVAILABLE=2

# Logical xAI targets. Add/remove targets here without modifying scripts/YAML.
# A target represents one pool/upstream endpoint and does not need to be 1:1
# with an OCI region. This also supports multiple pools in the same region.
XAI_TARGETS="ORD IAD"

# Existing TIA resources
CPU_TIA_BRIDGE_REQ=250m
MEM_TIA_BRIDGE_REQ=512Mi
CPU_TIA_BRIDGE_LIM=1000m
MEM_TIA_BRIDGE_LIM=1Gi
CPU_TIA_REQ=500m
MEM_TIA_REQ=1Gi
CPU_TIA_LIM=2000m
MEM_TIA_LIM=2Gi
CPU_XAI_POOL_REQ=200m
MEM_XAI_POOL_REQ=256Mi
CPU_XAI_POOL_LIM=1000m
MEM_XAI_POOL_LIM=768Mi

# Pool profile - XAI_POOL_SIZE means prewarmed upstream WebSockets PER POD.
# It is NOT the OCI/xAI service limit; tune it to the negotiated capacity.
XAI_POOL_SIZE=50
XAI_POOL_UNAVAILABLE_FREE=2
XAI_POOL_RECOVER_FREE=5
XAI_POOL_CONNECTION_TTL_S=540
XAI_POOL_REFRESH_JITTER_S=45
XAI_POOL_PREWARM_CONCURRENCY=5
XAI_POOL_BARGE_IN_CLEAR_TIMEOUT_S=1.0
XAI_TTS_VOICE=c8x2ieiocufs
XAI_TTS_LANGUAGE=pt-BR
XAI_UPSTREAM_AUTH_METHOD=API_KEY

# HPA. replicas * XAI_POOL_SIZE must fit each target/endpoint capacity.
HPA_MIN_REPLICAS=1
HPA_MAX_REPLICAS=3
HPA_CPU_TARGET=65

# Example target ORD
ORD_REGION_ID=ord
ORD_REGION_REPLICAS=1
ORD_XAI_UPSTREAM_URL=wss://peordagnt002prd.pe.inference.generativeai.us-chicago-1.oci.oraclecloud.com/xai/v1/tts
ORD_XAI_SECRET_NAME=xai-ord-credentials

# Example target IAD
IAD_REGION_ID=iad
IAD_REGION_REPLICAS=1
IAD_XAI_UPSTREAM_URL=wss://peiadagnt003prd.pe.inference.generativeai.us-ashburn-1.oci.oraclecloud.com/xai/v1/tts
IAD_XAI_SECRET_NAME=xai-iad-credentials

# Add another region without changing code:
# XAI_TARGETS="ORD IAD GRU"
# GRU_REGION_ID=gru
# GRU_REGION_REPLICAS=1
# GRU_XAI_UPSTREAM_URL=wss://<endpoint>/xai/v1/tts
# GRU_XAI_SECRET_NAME=xai-gru-credentials

# Multiple independent pools in one OCI region are also supported:
# XAI_TARGETS="ORD_PRIMARY ORD_SECONDARY IAD"
# ORD_PRIMARY_REGION_ID=ord-primary
# ORD_PRIMARY_REGION_REPLICAS=1
# ORD_PRIMARY_XAI_UPSTREAM_URL=wss://<endpoint-a>/xai/v1/tts
# ORD_PRIMARY_XAI_SECRET_NAME=xai-ord-primary-credentials
# ORD_SECONDARY_REGION_ID=ord-secondary
# ORD_SECONDARY_REGION_REPLICAS=1
# ORD_SECONDARY_XAI_UPSTREAM_URL=wss://<endpoint-b>/xai/v1/tts
# ORD_SECONDARY_XAI_SECRET_NAME=xai-ord-secondary-credentials
