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]

docs(image_handling.md): architecture doc on image handling on the proxy

Krrish Dholakiaf68e27a0c8fe
diff --git a/docs/my-website/docs/proxy/image_handling.md b/docs/my-website/docs/proxy/image_handling.md
new file mode 100644
index 00000000000..300ab0bc386
--- /dev/null
+++ b/docs/my-website/docs/proxy/image_handling.md
@@ -0,0 +1,21 @@
+import Image from '@theme/IdealImage';
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+
+# Image URL Handling
+
+<Image img={require('../../img/image_handling.png')} style={{ width: '900px', height: 'auto' }} />
+
+Some LLM API's don't support url's for images, but do support base-64 strings.
+
+For those, LiteLLM will:
+
+1. Detect a URL being passed
+2. Check if the LLM API supports a URL
+3. Else, will download the base64
+4. Send the provider a base64 string.
+
+
+LiteLLM also caches this result, in-memory to reduce latency for subsequent calls.
+
+The limit for an in-memory cache is 1MB.
\ No newline at end of file
diff --git a/docs/my-website/img/image_handling.png b/docs/my-website/img/image_handling.png
new file mode 100644
index 00000000000..bd56206911c
Binary files /dev/null and b/docs/my-website/img/image_handling.png differ
diff --git a/docs/my-website/sidebars.js b/docs/my-website/sidebars.js
index a1499cc0b01..96267d09dab 100644
--- a/docs/my-website/sidebars.js
+++ b/docs/my-website/sidebars.js
@@ -53,7 +53,7 @@ const sidebars = {
{
type: "category",
label: "Architecture",
- items: ["proxy/architecture", "proxy/db_info", "router_architecture", "proxy/user_management_heirarchy", "proxy/jwt_auth_arch"],
+ items: ["proxy/architecture", "proxy/db_info", "router_architecture", "proxy/user_management_heirarchy", "proxy/jwt_auth_arch", "proxy/image_handling"],
},
{
type: "link",