| # Copy to config.yaml and edit. config.yaml is gitignored (may hold secrets). | |
| # | |
| # cp config.yaml.example config.yaml | |
| # cp litellm.yaml.example litellm.yaml | |
| # ./bin/gen-litellm-master-key.sh # paste same sk-… into config.yaml + litellm.yaml | |
| # | |
| # config.yaml and litellm.yaml are required (copy from *.example; secrets). | |
| # models.yaml is committed (no secrets). Do not join the two secret files. | |
| # Do not include models.yaml from litellm.yaml. Production: Puppet/hiera/eyaml | |
| # writes secrets into on-disk YAML. Not environment variables. | |
| server: | |
| # Port for the asfquart process. Behind a reverse proxy in production. | |
| port: 8443 | |
| # PEM files relative to certs/ (see certs/README.md), or absolute paths. | |
| # Leave both blank for plain HTTP (e.g. behind a reverse proxy with TLS). | |
| # Local OAuth needs HTTPS + localhost.apache.org — use mkcert as documented. | |
| certfile: localhost.apache.org+3.pem | |
| keyfile: localhost.apache.org+3-key.pem | |
| litellm: | |
| # Always talks to a real LiteLLM admin API (same shape as production). | |
| # Local: make db && make proxy (system Postgres + litellm.yaml). | |
| base_url: http://127.0.0.1:4000 | |
| # Same value as litellm.yaml → general_settings.master_key (must start with sk-). | |
| # Bearer token for /team/* and /key/* from this process. | |
| master_key: CHANGE_ME_MASTER_KEY | |
| request_timeout_s: 30 | |
| budgets: | |
| default_team_budget_usd: 100 | |
| duration: 30d | |
| # Weekly token allocation a project starts with. Capacity, not money -- | |
| # self-hosted tokens cost the fleet the same whether drawn or idle, so this | |
| # is a share of throughput rather than a spending limit. | |
| # | |
| # Deliberately generous for the pilot. A cap that binds generates support | |
| # requests and teaches us nothing; one that rarely binds measures what | |
| # people actually draw, which is the input to whatever replaces it. | |
| # | |
| # The fleet serves roughly 9.1 billion tokens a month at a 50% planning | |
| # utilisation, so twenty projects at 20M/week is about 7% of capacity. | |
| default_team_token_cap: 20000000 | |
| # Entitlements: what a key may do, as distinct from what it may spend. | |
| # | |
| # A budget is a dollar ceiling and only binds where dollars are real -- | |
| # commercial providers. Self-hosted models have no marginal cost, so LiteLLM | |
| # records their requests at $0.00 and they never exhaust anything. | |
| # Rate limits are therefore the ONLY control on self-hosted capacity, and a | |
| # key minted without them can saturate the fleet with nothing to stop it. | |
| # | |
| # Every value here is applied at key creation. LiteLLM has no usable default: | |
| # absent means unlimited. | |
| entitlements: | |
| # Applies to every key unless a tier below overrides it. | |
| default: | |
| # Requests and tokens per minute. tpm is the one that bites on a | |
| # self-hosted rental -- a single 40k-token audit call is most of a minute's | |
| # budget at 60k. | |
| rpm_limit: 60 | |
| tpm_limit: 60000 | |
| # Concurrent in-flight requests. The binding constraint at peak: the | |
| # weakest rental in the fleet admits about four before queueing, so a single | |
| # key holding eight is already more than its share. | |
| max_parallel_requests: 4 | |
| # Personal keys, no project. Self-hosted models only -- commercial access | |
| # needs an owner who can be asked about the bill, and a PMC is that owner. | |
| free_tier: | |
| rpm_limit: 30 | |
| tpm_limit: 30000 | |
| max_parallel_requests: 2 | |
| # Rolling allowance, kept as daily buckets: sum the last N days, drop the | |
| # rest. No calendar reset, so there is no boundary to straddle and no | |
| # instant where everyone's counter drops at once. | |
| # | |
| # Not a daily entitlement. One allowance, and the daily shape is emergent | |
| # -- a committer can spend the week's share in an hour and then wait, | |
| # which is how people actually work. | |
| # | |
| # These are the two values an RAI admin is most likely to move. They can | |
| # be changed at runtime from the admin page; config is the starting value | |
| # and the fallback when nothing is stored. | |
| token_cap: 1000000 | |
| token_window_days: 7 | |
| # Project keys draw on the project's allocation. PMC distributes. | |
| project: | |
| rpm_limit: 120 | |
| tpm_limit: 120000 | |
| max_parallel_requests: 8 | |
| # Overrides an RAI admin has set at runtime live in LiteLLM team metadata | |
| # for project tiers, and in llmao's own store for the free tier -- not here. | |
| # config.yaml is the default and the fallback, so a fresh deployment has | |
| # working limits before anyone touches the admin page. | |
| # Service keys for pipelines. Higher throughput, and the tier most likely | |
| # to retry in a loop -- which is exactly why it still has a ceiling. | |
| service: | |
| rpm_limit: 240 | |
| tpm_limit: 300000 | |
| max_parallel_requests: 8 | |
| # Capacity planning (docs/capacity-design.md). Both required. | |
| # | |
| # Seconds between readings of every self-hosted rental's /metrics. Never off: | |
| # queue depth exists only while it is happening -- the spend log records | |
| # what RAN, not what WAITED -- so an unsampled stretch is lost for good. | |
| # One HTTP GET per rental per interval. (Formerly contention_interval_s, still | |
| # read with a warning.) | |
| sample_interval_s: 15 | |
| # Days of hourly rows kept in LiteLLM's memory store. 90 days at twenty | |
| # rentals is about 43,000 rows. | |
| capacity_retention_days: 90 | |
| # Days of admin actions kept for /admin's Recent work (restricting a project, | |
| # approving or flagging a rental, adding or dropping a deployment, revoking a | |
| # key). Required. Not an audit trail: pruned daily past this. | |
| action_retention_days: 90 | |
| # How much the portal says. CRITICAL, ERROR, WARNING, INFO or DEBUG; DEBUG | |
| # when absent or unrecognised, which is what this app did before the setting | |
| # existed. Read straight from this file before the app starts, because | |
| # logging is configured first. | |
| # | |
| # DEBUG is loud on a gateway and says more about each request than an | |
| # operator needs day to day, so a settled deployment wants INFO here. | |
| log_level: DEBUG | |
| # The prompt log (docs/prompt-logging-design.md): where the proxy's hook | |
| # writes one file of records per UTC day. Required: the demand rollup reads | |
| # a day's file from here after rolling the day up from LiteLLM. The same | |
| # path is litellm.yaml callback_settings.prompt_log.dir; Puppet renders one | |
| # value into both. The retention is the hook's to act on; its copy is in | |
| # litellm.yaml, and this one says what the terms promise. | |
| prompt_log_dir: ./prompt-log | |
| prompt_log_retention_days: 90 | |
| # The analysis scripts (analysis/README.md). All six required, like | |
| # prompt_log_dir: a script stops on a missing one. Where their store lives; | |
| # how long every row of it is kept (one value for all analysis output; the | |
| # prompt log's retention, since the store holds text from the log); the | |
| # gateway the judge calls, through the front door like any client; the | |
| # judges, a list of self-hosted models that each give a verdict on every | |
| # cluster (several is the normal operation: the store's consensus view | |
| # leans towards "no" on Foundation work and towards the higher tier; a | |
| # model a paid provider also serves is refused); and the judge's key, a | |
| # service key whose purpose is llmao-analysis, under the rai project (the | |
| # judge's own requests are recognised by that purpose and never | |
| # clustered). Without the key the judge stops before its first call; the | |
| # other commands do not need it. | |
| analysis_dir: ./analysis-data | |
| analysis_retention_days: 90 | |
| analysis_gateway: https://llm.apache.org | |
| analysis_models: [qwen3.8-27b-int4] | |
| # analysis_key: sk-... | |
| # Which models serve which of the judge's tiers, for the tier report: the | |
| # first in each list is the one to recommend. | |
| analysis_tiers: | |
| low: [qwen3-8b, qwen3.5-9b] | |
| medium: [qwen3.8-27b-int4] | |
| high: [qwen3.8-27b, gemma4-26b] | |
| # uids that may view any project's activity, and reach /admin and the | |
| # Deployments on /models (plus asfquart isRoot). | |
| site_admins: [] | |
| # Admin model definitions (UX + vLLM recipe + /model/new template). | |
| # Not included by litellm.yaml. Relative to app root. | |
| models_path: models.yaml | |
| # Accounts we pay. vast and runpod are GPU hosts: they rent the machines, and | |
| # take only api_key (llmao reads their APIs for port mappings and prices). | |
| # Any other name is a model provider. Each line under its `models` is one | |
| # deployment: a model_name from models.yaml, and the provider's model as | |
| # LiteLLM names it. The same model can be listed under several providers, and | |
| # can run on our own rentals (fleet.hosts) as well. Our rentals always come first: | |
| # LiteLLM sends a request to a provider only when none of ours can take it. | |
| # | |
| # The keys live here and nowhere else. A developer with no hosting account can | |
| # list a personal one and serve models with no fleet.hosts at all. | |
| # providers: | |
| # vast: | |
| # api_key: CHANGE_ME_VAST_API_KEY | |
| # runpod: | |
| # api_key: CHANGE_ME_RUNPOD_API_KEY | |
| # xai: | |
| # api_key: CHANGE_ME_XAI_API_KEY | |
| # api_base: https://api.x.ai/v1 | |
| # models: | |
| # grok-4: xai/grok-4 | |
| # openrouter: | |
| # api_key: CHANGE_ME_OPENROUTER_API_KEY | |
| # api_base: https://openrouter.ai/api/v1 | |
| # models: | |
| # grok-4: openrouter/x-ai/grok-4 | |
| # gemma4-26b: openrouter/google/gemma-4-26b-a4b-it | |
| # Shared secret GPU rentals present as Authorization: Bearer when fetching | |
| # GET /vllm/config. Bake FLEET_KEY into the Vast template (not instance env). | |
| # Required; a missing or CHANGE_ME value fails the fleet build at startup. | |
| # A rental names itself with X-LLMAO-Host (what its provider's provision.sh | |
| # sets), else the leftmost X-Forwarded-For, else the peer; that name must be | |
| # a fleet.hosts key. The provider listings place a server on its rental by | |
| # address, then by the instance or pod it was on before. | |
| fleet: | |
| key: CHANGE_ME_FLEET_KEY | |
| # HMAC secret for each vLLM --api-key. This file and Puppet eyaml only. | |
| # Never the Vast template. GET /vllm/config returns sk-vllm-… from this | |
| # salt plus host and listen port. A missing attribute fails fleet build. | |
| # Changing it invalidates every rental bearer. See docs/rental-protocol.md. | |
| vllm_api_salt: CHANGE_ME_VLLM_API_SALT | |
| # Shared bearer for LEGACY_SERVERS only. validate_fleet requires a real | |
| # value when one of those hosts is configured. Drop it with the last pair. | |
| selfhost_api_key: CHANGE_ME_SELFHOST_API_KEY | |
| # Optional. A Hugging Face read-only token, handed to every rental in | |
| # GET /vllm/config and put in each vLLM's environment as HF_TOKEN. Lifts | |
| # the rate limit on unauthenticated downloads and opens gated weights; it | |
| # does not make the pull itself faster. This file and Puppet eyaml only. | |
| # hf_token: hf_... | |
| # Seconds between vLLM GET /health probes, on the public port (/health takes | |
| # no key; /v1/models with the rental's key is asked when it passes). | |
| health_interval_s: 45 | |
| # Per-probe HTTP timeout for vLLM /health. | |
| health_timeout_s: 3 | |
| # The loading window: a rental that fetched its config reads Loading this long | |
| # before never-up is Stalled; a rental never reached reads Awaiting this long | |
| # after its first probe before it is Stalled. See docs/rental-lifecycle.md. | |
| health_grace_s: 1800 | |
| # Consecutive failed probes before a previously healthy server is marked down. | |
| health_fail_threshold: 3 | |
| # Seconds between LiteLLM /model/info vs fleet.hosts config-skew checks. | |
| skew_interval_s: 180 | |
| # Seconds between LiteLLM GET /health (real completions; tokens) vs fleet probe state. | |
| litellm_health_interval_s: 14400 | |
| # Host row port is the container listen port (vLLM --port / rental JSON). | |
| # Without providers.vast, the public port equals the listen port (local). | |
| # fleet.hosts is loaded once at process start. Standalone (runx) watches | |
| # config.yaml and reloads. Production: Puppet restart after a change. | |
| # Production: set providers.vast.api_key and providers.runpod.api_key | |
| # (gitignored config.yaml). The lifecycle reads each rental's public ports | |
| # from its provider's listing (Vast HostPorts, RunPod portMappings); never | |
| # send those to the rental. fleet.vast.api_key still works, with a | |
| # deprecation warning at startup. A fourth element on a row, a public | |
| # port by hand, is deprecated: it warns and only seeds the port. | |
| hosts: | |
| 127.0.0.1: | |
| - [gemma4-26b, 8001] | |
| - [qwen3-8b, 8003] |