Spaces:
Running
Running
github-actions[bot] commited on
Commit ·
baeebee
1
Parent(s): b17013f
deploy: bdb0bbf — 更新 config.yaml
Browse files- litellm/config.yaml +3 -41
litellm/config.yaml
CHANGED
|
@@ -1,68 +1,31 @@
|
|
| 1 |
-
# ─────────────────────────────────────────────────────────────────────────────
|
| 2 |
# LiteLLM Gateway Configuration
|
| 3 |
-
#
|
| 4 |
-
#
|
|
|
|
| 5 |
|
| 6 |
general_settings:
|
| 7 |
master_key: os.environ/LITELLM_MASTER_KEY
|
| 8 |
|
| 9 |
-
# NOTE: store_model_in_db is intentionally disabled.
|
| 10 |
-
# LiteLLM >= 1.x requires PostgreSQL for this feature; SQLite is NOT supported.
|
| 11 |
-
# AI Gateway Hub's own backend (Node.js + SQLite) persists model configs and
|
| 12 |
-
# re-registers them with LiteLLM on startup via POST /model/new.
|
| 13 |
-
# store_model_in_db: true ← requires postgres, keep commented out
|
| 14 |
-
|
| 15 |
-
# ─── BUG FIX #14: Removed `allow_model_access_groups_on_request: true` ───
|
| 16 |
-
#
|
| 17 |
-
# That key is NOT a valid LiteLLM general_settings field. It appears in no
|
| 18 |
-
# version of the official LiteLLM docs or source code under general_settings.
|
| 19 |
-
# LiteLLM silently ignores unknown keys in this block (Pydantic extra="ignore"),
|
| 20 |
-
# so the setting had zero effect — it was pure dead config that could mislead
|
| 21 |
-
# operators into believing access-group enforcement was active when it was not.
|
| 22 |
-
#
|
| 23 |
-
# If you need to restrict which models a virtual key can access, use
|
| 24 |
-
# LiteLLM's Virtual Keys + model access groups feature instead:
|
| 25 |
-
# https://docs.litellm.ai/docs/proxy/virtual_keys
|
| 26 |
-
# ─────────────────────────────────────────────────────────────────────────
|
| 27 |
-
|
| 28 |
litellm_settings:
|
| 29 |
-
# Drop unsupported parameters instead of raising errors
|
| 30 |
drop_params: true
|
| 31 |
-
# Return original response on errors
|
| 32 |
set_verbose: false
|
| 33 |
-
# Request timeout in seconds
|
| 34 |
request_timeout: 120
|
| 35 |
-
# Retry configuration
|
| 36 |
num_retries: 2
|
| 37 |
-
# NOTE: max_budget: 0 is intentionally absent — it would block all paid requests.
|
| 38 |
-
# NOTE: proxy_server_settings block is intentionally absent — it is not a valid
|
| 39 |
-
# top-level LiteLLM config key and is silently ignored.
|
| 40 |
-
# Callbacks belong here under litellm_settings, e.g.:
|
| 41 |
-
# success_callback: ["langfuse"]
|
| 42 |
-
# failure_callback: ["langfuse"]
|
| 43 |
|
| 44 |
router_settings:
|
| 45 |
-
# "simple-shuffle" is the correct default for a single-instance deployment.
|
| 46 |
-
# "usage-based-routing" requires a Redis backend for cross-process TPM/RPM
|
| 47 |
-
# tracking; this project has no Redis service in docker-compose.yml so that
|
| 48 |
-
# strategy would fail a Redis connection on every request.
|
| 49 |
routing_strategy: "simple-shuffle"
|
| 50 |
num_retries: 2
|
| 51 |
timeout: 120
|
| 52 |
retry_after: 5
|
| 53 |
|
| 54 |
-
# ─── Pre-configured model examples (users can add more via the UI) ───────────
|
| 55 |
model_list:
|
| 56 |
-
# ── Example: Ollama local models (no API key needed) ──────────────────────
|
| 57 |
- model_name: ollama/llama3
|
| 58 |
litellm_params:
|
| 59 |
model: ollama/llama3
|
| 60 |
api_base: "http://host.docker.internal:11434"
|
| 61 |
model_info:
|
| 62 |
description: "Llama 3 via local Ollama (no API key required)"
|
| 63 |
-
supports_function_calling: true
|
| 64 |
|
| 65 |
-
# ── Example: OpenAI-compatible custom endpoint ────────────────────────────
|
| 66 |
- model_name: custom/my-openai-compatible
|
| 67 |
litellm_params:
|
| 68 |
model: openai/gpt-3.5-turbo
|
|
@@ -70,4 +33,3 @@ model_list:
|
|
| 70 |
api_key: "optional-key-or-empty"
|
| 71 |
model_info:
|
| 72 |
description: "Custom OpenAI-compatible endpoint example"
|
| 73 |
-
supports_function_calling: true
|
|
|
|
|
|
|
| 1 |
# LiteLLM Gateway Configuration
|
| 2 |
+
# database_url is injected by huggingface/entrypoint.sh at runtime
|
| 3 |
+
# when DATABASE_URL environment variable is set.
|
| 4 |
+
# For docker-compose, DATABASE_URL is passed via environment block in compose file.
|
| 5 |
|
| 6 |
general_settings:
|
| 7 |
master_key: os.environ/LITELLM_MASTER_KEY
|
| 8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
litellm_settings:
|
|
|
|
| 10 |
drop_params: true
|
|
|
|
| 11 |
set_verbose: false
|
|
|
|
| 12 |
request_timeout: 120
|
|
|
|
| 13 |
num_retries: 2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
router_settings:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
routing_strategy: "simple-shuffle"
|
| 17 |
num_retries: 2
|
| 18 |
timeout: 120
|
| 19 |
retry_after: 5
|
| 20 |
|
|
|
|
| 21 |
model_list:
|
|
|
|
| 22 |
- model_name: ollama/llama3
|
| 23 |
litellm_params:
|
| 24 |
model: ollama/llama3
|
| 25 |
api_base: "http://host.docker.internal:11434"
|
| 26 |
model_info:
|
| 27 |
description: "Llama 3 via local Ollama (no API key required)"
|
|
|
|
| 28 |
|
|
|
|
| 29 |
- model_name: custom/my-openai-compatible
|
| 30 |
litellm_params:
|
| 31 |
model: openai/gpt-3.5-turbo
|
|
|
|
| 33 |
api_key: "optional-key-or-empty"
|
| 34 |
model_info:
|
| 35 |
description: "Custom OpenAI-compatible endpoint example"
|
|
|