파일 관리

파일 관리 (File Management)

config.yaml에 외부 YAML 파일을 포함하는 방법을 알려드려요. include를 사용해 외부 YAML 파일을 config.yaml에 포함할 수 있어요.

출처: 문서

본문

빠른 시작 사용법 (Quick Start Usage)

콘피그 파일을 포함하려면 include를 단일 파일 또는 파일 목록과 함께 사용하세요.

parent_config.yaml의 내용:

include:
  - model_config.yaml # 👈 Key change, will include the contents of model_config.yaml

litellm_settings:
  callbacks: ["prometheus"]

model_config.yaml의 내용:

model_list:
  - model_name: gpt-5.6-terra
    litellm_params:
      model: openai/gpt-5.6-terra
      api_base: https://exampleopenaiendpoint-production.up.railway.app/
  - model_name: fake-anthropic-endpoint
    litellm_params:
      model: anthropic/fake
      api_base: https://exampleanthropicendpoint-production.up.railway.app/

프록시 서버 시작

이렇게 하면 콘피그 parent_config.yaml로 프록시 서버가 시작돼요. include 지시어가 사용되므로 서버는 model_config.yaml의 내용도 포함해요.

litellm --config parent_config.yaml --detailed_debug

include 사용 예시 (Examples using include)

단일 파일 포함:

include:
  - model_config.yaml

여러 파일 포함:

include:
  - model_config.yaml
  - another_config.yaml