Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

Use environment variable for Athina logging URL (#7628)

vivek-athina8e2653c6092d
diff --git a/docs/my-website/docs/observability/athina_integration.md b/docs/my-website/docs/observability/athina_integration.md
index cd1442f35ab..f7c99a4a9c6 100644
--- a/docs/my-website/docs/observability/athina_integration.md
+++ b/docs/my-website/docs/observability/athina_integration.md
@@ -79,6 +79,17 @@ Following are the allowed fields in metadata, their types, and their description
* `expected_response: Optional[str]` - This is the reference response to compare against for evaluation purposes. This is useful for segmenting inference calls by expected response.
* `user_query: Optional[str]` - This is the user's query. For conversational applications, this is the user's last message.
+
+## Using a self hosted deployment of Athina
+
+If you are using a self hosted deployment of Athina, you will need to set the `ATHINA_BASE_URL` environment variable to point to your self hosted deployment.
+
+```python
+...
+os.environ["ATHINA_BASE_URL"]= "http://localhost:9000"
+...
+```
+
## Support & Talk with Athina Team
- [Schedule Demo 👋](https://cal.com/shiv-athina/30min)
diff --git a/litellm/integrations/athina.py b/litellm/integrations/athina.py
index f669b7c9ac3..250b384c75e 100644
--- a/litellm/integrations/athina.py
+++ b/litellm/integrations/athina.py
@@ -12,7 +12,7 @@ class AthinaLogger:
"athina-api-key": self.athina_api_key,
"Content-Type": "application/json",
}
- self.athina_logging_url = "https://log.athina.ai/api/v1/log/inference"
+ self.athina_logging_url = os.getenv("ATHINA_BASE_URL", "https://log.athina.ai") + "/api/v1/log/inference"
self.additional_keys = [
"environment",
"prompt_slug",