AISBF Logo AISBF

AI Service Broker Framework — AI Should Be Free

Complex configuration

Advanced AISBF Routing Recipes

Copyable routing patterns for cost tiers, privacy-first workloads, burst GPU routing, model-family separation, and graceful provider degradation.

Routing vocabulary

AISBF routing is easier to reason about when each layer has one job.

Provider

A concrete backend: OpenAI-compatible API, local Ollama, RunPod pod, CoderAI broker, or another service.

Rotation

A reliability set: ordered, weighted, or failover-capable providers that satisfy the same contract.

Autoselect

A policy entry point: decide which rotation/provider to use based on purpose, privacy, cost, or capability.

Recipe 1: privacy-first support route

Send sensitive support prompts to a local model first. Fall back to a hosted model only when the local route is unavailable and your policy permits it.

{
  "providers": ["ollama-local", "hosted-compatible-fallback"],
  "rotation": "support-private-rotation",
  "mode": "failover",
  "autoselect": {
    "name": "support-default",
    "policy": "prefer_private_then_available",
    "allowed_routes": ["support-private-rotation"]
  }
}

Recipe 2: cost-aware coding route

Use a cheap fast model for routine edits, then a stronger model for deep reasoning. Keep both behind a stable app-facing route name.

{
  "rotation": "coding-balanced",
  "candidates": [
    {"provider": "coderai-broker", "weight": 70, "tags": ["code", "low-cost"]},
    {"provider": "frontier-hosted", "weight": 30, "tags": ["code", "deep-reasoning"]}
  ],
  "autoselect": {"name": "coding-default", "prefer_tags": ["code"]}
}

Recipe 3: RunPod burst GPU route

For image or large local-model tasks, keep a normal provider path and a burst path. Make the route explicit so operators know cost can spike.

{
  "provider": "runpod-sdxl-burst",
  "base_url": "https://api.runpod.ai/v2/YOUR_ENDPOINT/openai/v1",
  "models": ["image:sdui", "llm:large-local"],
  "rotation": "gpu-burst-explicit"
}

Recipe 4: model-family separation

Do not mix chat, embeddings, images, and audio in one route unless every candidate can satisfy the same request shape.

WorkloadRoute nameProvider set
Chatautoselect:chat-defaultOpenAI-compatible chat backends
Embeddingsrotation:embed-reliableEmbedding-capable providers only
Imagesprovider:studio-imageStudio/BFInX image endpoint
Privateautoselect:private-defaultLocal/self-hosted first

Verification loop

# List available route names before changing application code
curl -fsS -H "Authorization: Bearer $AISBF_TOKEN"   "$AISBF_BASE/api/u/$AISBF_USER/models"

# Test the exact model string your app will use
curl -fsS -H "Authorization: Bearer $AISBF_TOKEN"   -H "Content-Type: application/json"   "$AISBF_BASE/api/u/$AISBF_USER/chat/completions"   -d '{"model":"autoselect:chat-default","messages":[{"role":"user","content":"route smoke test"}]}'

Try AISBF

AISBF is open source and also available as a hosted service. During the current testing period, hosted Pro is temporarily available as unlimited access for €2/month.