Skip to content

Conversation

@Sameerlite
Copy link
Collaborator

Title

Add OpenAI Container API Support to LiteLLM SDK

Relevant issues

Adds support for OpenAI Container APIs (create, list, retrieve, delete) similar to existing video and responses APIs.

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have Added testing in the tests/litellm/ directory, Adding at least 1 test is a hard requirement - see details
  • I have added a screenshot of my new test passing locally
  • 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

Implements complete OpenAI Container API support in LiteLLM SDK, enabling users to manage containers with litellm.create_container(), litellm.list_containers(), litellm.retrieve_container(), and litellm.delete_container() (plus async versions).

Key Features Added

  • Complete CRUD operations: Create, list, retrieve, and delete containers
  • Sync & Async support: All operations available in both synchronous and asynchronous versions
  • Type safety: Full TypeScript-style type definitions for all container objects and parameters
  • OpenAI compatibility: Direct integration with OpenAI's Container API specification

Usage Examples

import litellm

# Create container
container = litellm.create_container(
    name="My Container",
    expires_after={"anchor": "last_active_at", "minutes": 20},
    custom_llm_provider="openai"
)

# List containers
containers = litellm.list_containers(limit=10, custom_llm_provider="openai")

# Retrieve specific container
container = litellm.retrieve_container(container_id="cntr_123", custom_llm_provider="openai")

# Delete container
result = litellm.delete_container(container_id="cntr_123", custom_llm_provider="openai")

# All operations support async versions
container = await litellm.acreate_container(name="Async Container")

@vercel
Copy link

vercel bot commented Oct 28, 2025

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

Project Deployment Preview Comments Updated (UTC)
litellm Error Error Oct 28, 2025 0:40am

Copy link
Contributor

@ishaan-jaff ishaan-jaff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Sameerlite Sameerlite merged commit bb68850 into litellm_sameer_oct_staging_2 Oct 29, 2025
35 of 45 checks passed
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.

3 participants