# Continuum Router 설정# 이 예제는 모든 사용 가능한 설정 옵션과 기본값을 보여줍니다# 서버 설정server:# bind_address는 단일 문자열 또는 주소 배열을 허용합니다# TCP 형식: "host:port", Unix 소켓 형식: "unix:/path/to/socket"bind_address:"0.0.0.0:8080"# 단일 주소 (하위 호환)# bind_address: # 또는 다중 주소:# - "0.0.0.0:8080" # 모든 인터페이스의 TCP# - "unix:/var/run/router.sock" # Unix 소켓 (Unix/Linux/macOS만 해당)# socket_mode: 0o660 # 선택 사항: Unix 소켓 파일 권한workers:4# 워커 스레드 수 (0 = 자동 감지)connection_pool_size:100# 백엔드당 최대 유휴 연결 수# 모델 메타데이터 설정 (선택 사항)model_metadata_file:"model-metadata.yaml"# 외부 모델 메타데이터 파일 경로# 백엔드 설정backends:# 내장 설정이 있는 네이티브 OpenAI API-name:"openai"type:openai# 네이티브 OpenAI 백엔드 사용api_key:"${CONTINUUM_OPENAI_API_KEY}"# 환경 변수에서 로드org_id:"${CONTINUUM_OPENAI_ORG_ID}"# 선택적 조직 IDweight:3models:# 사용할 모델 지정-gpt-4o-gpt-4o-mini-o3-mini-text-embedding-3-largeretry_override:# 백엔드별 재시도 설정 (선택 사항)max_attempts:5base_delay:"200ms"max_delay:"30s"exponential_backoff:truejitter:true# 사용자 정의 메타데이터가 있는 일반 OpenAI 호환 백엔드-name:"openai-compatible"url:"https://custom-llm.example.com"weight:1models:-"gpt-4"-"gpt-3.5-turbo"model_configs:# 메타데이터가 포함된 향상된 모델 설정-id:"gpt-4"aliases:# 이 메타데이터를 공유하는 대체 ID (선택 사항)-"gpt-4-0125-preview"-"gpt-4-turbo-preview"metadata:display_name:"GPT-4"summary:"복잡한작업을위한가장유능한GPT-4모델"capabilities:["text","image","function_calling"]knowledge_cutoff:"2024-04"pricing:input_tokens:0.03output_tokens:0.06limits:context_window:128000max_output:4096# 자동 URL 감지가 있는 Ollama 로컬 서버-name:"local-ollama"type:ollama# 기본값 http://localhost:11434weight:2models:-"llama2"-"mistral"-"codellama"# vLLM 서버-name:"vllm-server"type:vllmurl:"http://localhost:8000"weight:1# 지정하지 않으면 모델이 자동으로 검색됩니다# 네임스페이스 접두사가 있는 모델 (예: "custom/gpt-4")은# 자동으로 기본 이름의 메타데이터와 일치합니다 (예: "gpt-4")# Google Gemini API (네이티브 백엔드)-name:"gemini"type:gemini# 네이티브 Gemini 백엔드 사용api_key:"${CONTINUUM_GEMINI_API_KEY}"# 환경 변수에서 로드weight:2models:-gemini-2.5-pro-gemini-2.5-flash-gemini-2.0-flash# 헬스 모니터링 설정health_checks:enabled:true# 헬스 체크 활성화/비활성화interval:"30s"# 백엔드 상태 확인 주기timeout:"10s"# 헬스 체크 요청 타임아웃unhealthy_threshold:3# 비정상으로 표시되기 전 실패 횟수healthy_threshold:2# 정상으로 표시되기 전 성공 횟수endpoint:"/v1/models"# 헬스 체크에 사용되는 엔드포인트# 요청 처리 및 타임아웃 설정timeouts:connection:"10s"# TCP 연결 설정 타임아웃request:standard:# 비스트리밍 요청first_byte:"30s"# 첫 바이트 수신까지의 시간total:"180s"# 전체 요청 타임아웃 (3분)streaming:# 스트리밍 (SSE) 요청first_byte:"60s"# 첫 SSE 청크까지의 시간chunk_interval:"30s"# 청크 간 최대 시간total:"600s"# 전체 스트리밍 타임아웃 (10분)image_generation:# 이미지 생성 요청 (DALL-E 등)first_byte:"60s"# 첫 바이트 수신까지의 시간total:"180s"# 전체 타임아웃 (기본 3분)model_overrides:# 모델별 타임아웃 오버라이드gpt-5-latest:streaming:total:"1200s"# GPT-5용 20분gpt-4o:streaming:total:"900s"# GPT-4o용 15분health_check:timeout:"5s"# 헬스 체크 타임아웃interval:"30s"# 헬스 체크 간격request:max_retries:3# 요청 최대 재시도 횟수retry_delay:"1s"# 재시도 간 초기 지연# 전역 재시도 및 복원력 설정retry:max_attempts:3# 최대 재시도 횟수base_delay:"100ms"# 재시도 간 기본 지연max_delay:"30s"# 재시도 간 최대 지연exponential_backoff:true# 지수 백오프 사용jitter:true# 지연에 무작위 지터 추가# 캐싱 및 최적화 설정cache:model_cache_ttl:"300s"# 모델 목록 캐시 5분deduplication_ttl:"60s"# 요청 중복 제거 1분enable_deduplication:true# 요청 중복 제거 활성화# 로깅 설정logging:level:"info"# 로그 레벨: trace, debug, info, warn, errorformat:"json"# 로그 형식: json, prettyenable_colors:false# 컬러 출력 활성화 (pretty 형식용)# Files API 설정files:enabled:true# Files API 엔드포인트 활성화/비활성화max_file_size:536870912# 최대 파일 크기 (바이트, 기본: 512MB)storage_path:"./data/files"# 업로드된 파일 저장 경로 (~지원)retention_days:0# 파일 보존 기간 (일, 0 = 영구 보존)metadata_storage:persistent# 메타데이터 백엔드: "memory" 또는 "persistent" (기본)cleanup_orphans_on_startup:false# 시작 시 고아 파일 자동 정리# 인증 및 권한auth:method:api_key# "none" 또는 "api_key" (기본)required_scope:files# 접근에 필요한 API 키 스코프enforce_ownership:true# 사용자가 자신의 파일만 접근 가능admin_can_access_all:true# admin 스코프는 모든 파일 접근 가능# 로드 밸런싱 설정load_balancer:strategy:"round_robin"# 전략: round_robin, weighted, randomhealth_aware:true# 정상 백엔드로만 라우팅# 분산 추적 설정tracing:enabled:true# 분산 추적 활성화/비활성화w3c_trace_context:true# W3C Trace Context 지원 (traceparent 헤더)headers:trace_id:"X-Trace-ID"# 추적 ID 헤더 이름request_id:"X-Request-ID"# 요청 ID 헤더 이름correlation_id:"X-Correlation-ID"# 상관 ID 헤더 이름# 서킷 브레이커 설정circuit_breaker:enabled:false# 서킷 브레이커 활성화failure_threshold:5# 회로 개방까지의 실패 횟수recovery_timeout:"60s"# 복구 시도까지의 시간half_open_retries:3# 반개방 상태에서의 재시도 횟수# 속도 제한 설정rate_limiting:enabled:false# 속도 제한 활성화requests_per_second:100# 전역 초당 요청 수burst_size:200# 버스트 용량# Admin API 설정admin:auth:method:bearer_token# 인증 방법: none, bearer_token, basic, api_keytoken:"${ADMIN_TOKEN}"# Admin 인증 토큰stats:enabled:true# 통계 수집 활성화/비활성화retention_window:24h# 윈도우 쿼리용 링 버퍼 보존 기간token_tracking:true# 응답 본문에서 토큰 사용량 파싱persistence:enabled:true# 재시작 시 통계 영속 활성화path:./data/stats.json# 스냅샷 파일 경로snapshot_interval:5m# 주기적 스냅샷 간격max_age:7d# 시작 시 이보다 오래된 스냅샷은 폐기# 메트릭 및 모니터링 설정metrics:enabled:false# 메트릭 수집 활성화endpoint:"/metrics"# 메트릭 엔드포인트 경로include_labels:true# 상세 레이블 포함
# 최소 설정 - 나머지 설정은 기본값 사용server:bind_address:"0.0.0.0:8080"backends:-name:"ollama"url:"http://localhost:11434"-name:"lm-studio"url:"http://localhost:1234"
# 기본 설정exportCONTINUUM_BIND_ADDRESS="0.0.0.0:9000"exportCONTINUUM_BACKEND_URLS="http://localhost:11434,http://localhost:1234"exportCONTINUUM_LOG_LEVEL="debug"# 고급 설정exportCONTINUUM_CONNECTION_POOL_SIZE="200"exportCONTINUUM_HEALTH_CHECK_INTERVAL="60s"exportCONTINUUM_MODEL_CACHE_TTL="600s"exportCONTINUUM_ENABLE_DEDUPLICATION="true"# 라우터 시작continuum-router
# 설정 파일과 오버라이드 사용continuum-router--configconfig.yaml--bind"0.0.0.0:9000"# 백엔드 임시 오버라이드continuum-router--configconfig.yaml--backends"http://localhost:11434"# 테스트용 헬스 체크 설정 조정continuum-router--configconfig.yaml--health-check-interval10# 샘플 설정 생성continuum-router--generate-config>my-config.yaml