---
title: "目錄結構"
url: "/docs/adding_provider/directory_structure"
canonical_url: "https://docs.litellm.ai/docs/adding_provider/directory_structure"
type: "docs"
last_updated: "2026-10-08"
related:
  - "/docs/contributing/adding_openai_compatible_providers"
  - "/docs/adding_provider/new_rerank_provider"
---
# 目錄結構

> Index of all LiteLLM docs: https://docs.litellm.ai/llms.txt


當新增一個新的提供者時，您需要為該提供者建立一個目錄，並遵循以下結構：

```
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
```

## Related pages

- [新增與 OpenAI 相容的提供者](https://docs.litellm.ai/docs/contributing/adding_openai_compatible_providers.md)
- [新增 Rerank 提供者](https://docs.litellm.ai/docs/adding_provider/new_rerank_provider.md)
