Skip to main content

Directory Structure

When adding a new provider, you need to create a directory for the provider that follows the following structure:

litellm/llms/
โ””โ”€โ”€ provider_name/
โ”œโ”€โ”€ completion/ # use when endpoint is equivalent to openai's `/v1/completions`
โ”‚ โ”œโ”€โ”€ handler.py
โ”‚ โ””โ”€โ”€ transformation.py
โ”œโ”€โ”€ chat/ # use when endpoint is equivalent to openai's `/v1/chat/completions`
โ”‚ โ”œโ”€โ”€ handler.py
โ”‚ โ””โ”€โ”€ transformation.py
โ”œโ”€โ”€ embed/ # use when endpoint is equivalent to openai's `/v1/embeddings`
โ”‚ โ”œโ”€โ”€ handler.py
โ”‚ โ””โ”€โ”€ transformation.py
โ”œโ”€โ”€ audio_transcription/ # use when endpoint is equivalent to openai's `/v1/audio/transcriptions`
โ”‚ โ”œโ”€โ”€ handler.py
โ”‚ โ””โ”€โ”€ transformation.py
โ””โ”€โ”€ rerank/ # use when endpoint is equivalent to cohere's `/rerank` endpoint.
โ”œโ”€โ”€ handler.py
โ””โ”€โ”€ transformation.py