Skip to content

Instantly share code, notes, and snippets.

Option Default What it does
proxy-port 4000 Port the LiteLLM proxy listens on.
default-alias default Virtual model name that routes across every backend.
routing-strategy simple-shuffle LiteLLM strategy for the alias/fallback: `simple-shuffle` `least-busy` `latency-based-routing` `usage-based-routing`.
routing-mode shuffle shuffle` (round-robin) or `llm` (smart routing — Part 3).
num-retries 2 Retries against other deployments in the same group.
litellm-version `` Optional pip pin e.g. `1.55.0`.
Option Default What it does
routing-mode shuffle Set to `llm` to enable classifier routing.
classifier-model `` Pin which backend classifies. Empty: auto-select a small/fast one.
classifier-timeout 10 Seconds to wait before falling back to shuffle for that request.
classifier-prompt `` Override the system-prompt template. The catalogue is always appended.
Option Type Default What it does
`inference-snap` string `gemma3` Which snap to run. Must be a known snap or the unit blocks.
`snap-channel` string `latest/stable` Snap channel to install from e.g. `latest/beta`.
`api-port` int `8080` Port the OpenAI API binds to (the snap's `http.port`).
`api-bind-all` boolean `true` If `true` bind `0.0.0.0` (network-reachable) otherwise bind to `127.0.0.1` (local only).
| Option | Type | Default | What it does |
| --- | --- | --- | --- |
| `inference-snap` | string | `gemma3` | Which snap to run. Must be a known snap or the unit blocks. |
| `snap-channel` | string | `latest/stable` | Snap channel to install from, e.g. `latest/beta`. |
| `api-port` | int | `8080` | Port the OpenAI API binds to (the snap's `http.port`). |
| `api-bind-all` | boolean | `true` | If `true` bind `0.0.0.0` (network-reachable) otherwise bind to `127.0.0.1` (local only). |
sudo microk8s addons repo add community https://github.com/canonical/microk8s-addons.git
cd /var/snap/microk8s/common/addons/
git clone https://github.com/myorg/myrepo
@ktsakalozos
ktsakalozos / gist:6a665d7253bf41ce74ceb4185d2563ce
Last active April 4, 2022 09:26
Tree structure of the addons repository
$ tree /var/snap/microk8s/common/addons/core
/var/snap/microk8s/common/addons/core
├── addons
│   ├── community
│   │   ├── disable
│   │   └── enable
│   ├── dashboard
│   │   ├── dashboard.yaml
│   │   ├── disable
│   │   └── enable
$ sudo microk8s.enable community
Infer repository core for addon community
Cloning into '/var/snap/microk8s/common/addons/community'...
done.
Community repository is now enabled
$ sudo microk8s.status
microk8s is running
high-availability: no
datastore master nodes: 127.0.0.1:19001
datastore standby nodes: none
@ktsakalozos
ktsakalozos / gist:0791a68baec91970cb32fb90422599d1
Created April 4, 2022 08:43
MicroK8s status with core addons
$ sudo microk8s.status --wait-ready
microk8s is running
high-availability: no
datastore master nodes: 127.0.0.1:19001
datastore standby nodes: none
addons:
enabled:
ha-cluster # (core) Configure high availability on the current node
disabled:
community # (core) The community addons repository
@ktsakalozos
ktsakalozos / refresh-certs.sh
Last active October 9, 2023 01:47
Refresh MicroK8s Certs
#!/bin/bash
set -eu
export SNAP_NAME="microk8s"
export SNAP_DATA="/var/snap/microk8s/current/"
export SNAP="/snap/microk8s/current/"
export PATH="$SNAP/usr/sbin:$SNAP/usr/bin:$SNAP/sbin:$SNAP/bin:$PATH"
source $SNAP/actions/common/utils.sh