Skip to content

Conversation

@Sameerlite
Copy link
Collaborator

@Sameerlite Sameerlite commented Oct 29, 2025

Title

Add Router Support for OpenAI Container API

Relevant issues

Pre-Submission checklist

  • I have Added testing in the tests/litellm/ directory - Added test_container_router.py with 6 tests
  • I have added a screenshot of my new test passing locally - All 6 tests passing
  • My PR passes all unit tests on make test-unit
  • My PR's scope is as isolated as possible, it only solves 1 specific problem

Type

🆕 New Feature

Changes

Summary

Enables Container API operations (create, list, retrieve, delete) to be called through litellm proxy with full router support including load balancing, authentication, and fallbacks.

What's Added

1. Proxy Endpoints (litellm/proxy/container_endpoints/endpoints.py)

  • POST /v1/containers - Create container
  • GET /v1/containers - List containers
  • GET /v1/containers/{container_id} - Retrieve container
  • DELETE /v1/containers/{container_id} - Delete container

2. Router Integration

  • Added 8 container methods to Router.initialize_router_endpoints() (router.py)
  • Added container call types to factory_function Literal and async handler (router.py)
  • Added early routing check for container operations that don't require model parameter (route_llm_request.py)

3. Request Processing

  • Added container route types to common_request_processing.py
  • Provider extraction using same pattern as Files API (header > query > body > default)

Usage Example

curl -X POST http://localhost:4000/v1/containers \
  -H "Authorization: Bearer sk-1234" \
  -H "Content-Type: application/json" \
  -d '{"name": "My Container"}'
image

Logging
Screenshot 2025-10-30 at 3 36 04 PM
Screenshot 2025-10-30 at 3 36 24 PM

@vercel
Copy link

vercel bot commented Oct 29, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
litellm Error Error Oct 30, 2025 10:07am

@Sameerlite Sameerlite changed the title Add proxy support to container apis Add proxy support to container apis & logging support Oct 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants