Model Routing & Execution Map

Harvested 2026-08-24 from the failed ~/work/model-router-setup attempt (docs/model-routing-map.md, prompts/01-goals.md, prompts/01-topology.md). Live-state facts here need verification; see TODO.

Architecture

Hardware

Request Flow

  1. Client sends an OpenAI-compatible request to beast.lan:4000/v1.
  2. LiteLLM evaluates the requested model and routing rules.
  3. The request goes to Beast, Athena, or OpenRouter according to the configured route.
  4. The selected llama.cpp server performs local inference when a local backend is used.
  5. LiteLLM returns the response through the common endpoint.

LiteLLM Routing Configuration (sources/config/config.yaml)

LiteLLM Model Name Backend Target Fallback
mi25-llama http://athena.lan:2001/v1 openrouter-gpt-4o
rx5500-llama http://athena.lan:2001/v1 openrouter-gpt-4o
openrouter-gpt-4o openrouter/openai/gpt-4o None

Known discrepancy (see TODO): both mi25-llama and rx5500-llama currently point at athena; the topology says the MI25 lives on beast. Reconcile when the local endpoints are verified.

GPU Execution

llama.cpp uses --gpu-layers for automatic dynamic offload:

Network Layout

Supporting Services

Deployment

Adding a New Model

  1. Ensure the GGUF is downloaded and accessible to llama.cpp on the target host.

  2. Add an entry to sources/config/config.yaml under model_list:

    - model_name: my-new-model
          litellm_params:
            model: openai/<model-repo>:<quant>
            api_base: http://athena.lan:2001/v1
            api_key: dummy
  3. Run sh scripts/router-deploy.sh to push the updated config and restart LiteLLM.