Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
56764d9
⚡ Bolt: Throttle synchronous disk I/O in stats tracking
google-labs-jules[bot] Jun 16, 2026
29dbea7
⚡ Bolt: Throttle synchronous disk I/O in stats tracking
google-labs-jules[bot] Jun 16, 2026
d2f3b06
⚡ Bolt: Throttle synchronous disk I/O in stats tracking
google-labs-jules[bot] Jun 16, 2026
bc052b6
⚡ Bolt: Throttle synchronous disk I/O in stats tracking
google-labs-jules[bot] Jun 17, 2026
808a28d
fix: address CodeRabbit and Gemini review feedback
sheepdestroyer Jun 17, 2026
60da6e1
fix: address CodeRabbit and Gemini round-2 review feedback
sheepdestroyer Jun 17, 2026
418f90c
fix: address Gemini round-3 review — offload sync I/O to thread pool
sheepdestroyer Jun 17, 2026
1fd6d01
feat: dataset visualizer + benchmark script + gap-fill extraction
sheepdestroyer Jun 17, 2026
7fc31cb
fix: restore tier table widget + extract first user msg from Hermes s…
sheepdestroyer Jun 18, 2026
a4fcb01
feat: gemma4 classifier with grammar, combined evals visualizer, dash…
sheepdestroyer Jun 18, 2026
640d2b6
feat: direct classifier + error retry scripts for dataset building
sheepdestroyer Jun 18, 2026
958e6b8
fix: address PR reviews and align test suite for DualCircuitBreaker
sheepdestroyer Jun 18, 2026
43f0eef
fix: prevent file descriptor leaks, deduplicate save stats, and log b…
sheepdestroyer Jun 18, 2026
ef47704
Address code review feedback from pullrequestreview-4523251587
sheepdestroyer Jun 18, 2026
764fe64
Add robustness fixes for reclassify/retry datasets, utf-8, and error …
sheepdestroyer Jun 18, 2026
9bfbdba
Use absolute paths in visualizer fetch requests to prevent trailing s…
sheepdestroyer Jun 18, 2026
9c8f286
Add GitHub Actions testing workflow and correct Dependabot Docker dir…
sheepdestroyer Jun 18, 2026
3b82424
Fix Dependabot schema validation errors by removing invalid prefix-ma…
sheepdestroyer Jun 18, 2026
e37b24b
fix(router): resolve visualizer bugs, dynamic breaker mapping, contai…
sheepdestroyer Jun 18, 2026
219dd8d
fix(router): address PR#3 review feedback (endpoint validation, auto-…
sheepdestroyer Jun 18, 2026
aa9fe10
fix: address PR#3 round-2 review — robustness, a11y, and code style
sheepdestroyer Jun 18, 2026
d20538c
fix: address PR#4 code review comments - workflows, merge logic, vali…
sheepdestroyer Jun 18, 2026
07b59f9
Configure gated Ollama routing and set llm-routing-ollama as free tie…
sheepdestroyer Jun 19, 2026
3beb9d8
Merge branch 'master' into finalize-pr3-fixes-review and resolve conf…
sheepdestroyer Jun 19, 2026
c3f43cb
Address code review comments: Fix annotations race condition and hand…
sheepdestroyer Jun 19, 2026
e35015f
Address new code reviews: Break Ollama fallback loop, use env key, an…
sheepdestroyer Jun 19, 2026
b4862bd
fix: sanitize triage router 429 detail and force immediate LiteLLM co…
sheepdestroyer Jun 19, 2026
23d594c
docs: update fallback diagrams and cooldown behavior for Ollama models
sheepdestroyer Jun 19, 2026
c2d3830
fix: implement router-side Ollama cooldown to prevent crashloop
sheepdestroyer Jun 19, 2026
1035a96
chore: tidy up repository, remove hello world dummies, move and docum…
sheepdestroyer Jun 19, 2026
f083ab7
fix: resolve hardcoded worktree leaks and LiteLLM auth errors
sheepdestroyer Jun 19, 2026
6823b1b
Address PR comments: robust httpx client teardown, dynamic path escap…
sheepdestroyer Jun 19, 2026
a2aea1d
Implement Valkey global cooldown cache sync, standard HTTPX client li…
sheepdestroyer Jun 19, 2026
1552544
Address PR#11 code reviews: multimodal message extraction, concurrent…
sheepdestroyer Jun 19, 2026
3ff83f3
Address PR #12 code review comments
sheepdestroyer Jun 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
159 changes: 117 additions & 42 deletions README.md

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion hello.py

This file was deleted.

55 changes: 31 additions & 24 deletions litellm/config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
general_settings:
master_key: sk-lit...33bf
master_key: os.environ/LITELLM_MASTER_KEY
litellm_settings:
# -------------------------------------------------------------------------
# FALLBACK CHAINS (cascading, in order of escalation)
Expand All @@ -26,35 +26,44 @@ litellm_settings:
- agent-complex-core
- agent-reasoning-core
- agent-advanced-core
- llm-routing-ollama
- openrouter-auto
# - local-qwen-3.6 # DISABLED: 35B model unloaded (23GB GTT saved)
- agent-medium-core:
- agent-complex-core
- agent-reasoning-core
- agent-advanced-core
- llm-routing-ollama
- openrouter-auto
# - local-qwen-3.6 # DISABLED
- agent-complex-core:
- agent-reasoning-core
- agent-advanced-core
- llm-routing-ollama
- openrouter-auto
# - local-qwen-3.6 # DISABLED
- agent-reasoning-core:
- agent-advanced-core
- llm-routing-ollama
- openrouter-auto
# - local-qwen-3.6 # DISABLED
- agent-advanced-core:
- llm-routing-ollama
- openrouter-auto
# - local-qwen-3.6 # DISABLED
- ollama-deepseek-v4-pro:
- agent-advanced-core
- ollama-deepseek-v4-flash:
- agent-reasoning-core

model_list:
- litellm_params:
model: openrouter/openrouter/auto
request_timeout: 120
model_name: openrouter-auto
- litellm_params:
model: openai/llm-routing-ollama
api_base: http://127.0.0.1:5000/v1
api_key: os.environ/LITELLM_MASTER_KEY
request_timeout: 120
model_name: llm-routing-ollama

# DISABLED 2026-06-08 — 20GB on disk, 23GB GTT (system RAM as GPU buffer).
# Uncomment to re-enable once a lighter model replaces it.
#- litellm_params:
Expand All @@ -73,7 +82,10 @@ model_list:
# ================================================================================
# OLLAMA PAID TIER — ollama.com via LiteLLM's native ollama_chat provider.
# LiteLLM calls https://api.ollama.com/api/chat with Bearer auth (OLLAMA_API_KEY).
# Fallback: ollama-deepseek-v4-pro → agent-advanced-core → openrouter-auto.
# No LiteLLM-level fallbacks: failures propagate back to the triage router
# (router/main.py) which manages Ollama cooldowns internally. When Ollama fails,
# the router activates a 5-minute cooldown and skips Ollama on subsequent
# requests, returning 429 so LiteLLM falls through to openrouter-auto.
# ================================================================================
- model_name: ollama-deepseek-v4-pro
litellm_params:
Expand All @@ -84,7 +96,7 @@ model_list:

# ================================================================================
# OLLAMA FLASH TIER — lighter/faster model for reasoning-tier requests.
# Fallback: ollama-deepseek-v4-flash → agent-reasoning-core → openrouter-auto.
# Same cooldown architecture as the pro tier above.
# ================================================================================
- model_name: ollama-deepseek-v4-flash
litellm_params:
Expand Down Expand Up @@ -119,43 +131,38 @@ model_list:

- model_name: agent-advanced-core
litellm_params:
model: openrouter/minimax/minimax-m2.5:free
request_timeout: 120
model: openrouter/google/gemma-4-31b-it:free
request_timeout: 20
- model_name: agent-reasoning-core
litellm_params:
model: openrouter/moonshotai/kimi-k2.6:free
request_timeout: 120
model: openrouter/google/gemma-4-26b-a4b-it:free
request_timeout: 20
- model_name: agent-complex-core
litellm_params:
model: openrouter/nvidia/nemotron-3-ultra-550b-a55b:free
request_timeout: 120
request_timeout: 20
- model_name: agent-medium-core
litellm_params:
model: openrouter/google/gemma-4-26b-a4b-it:free
request_timeout: 120
request_timeout: 20
- model_name: agent-simple-core
litellm_params:
model: openrouter/nvidia/nemotron-3-nano-30b-a3b:free
request_timeout: 120
request_timeout: 20

redis_settings:
redis_host: 127.0.0.1
redis_port: 6379
router_settings:
allowed_fails: 2
allowed_fails: 0
cooldown_time: 300
enable_pre_call_checks: false
num_retries: 1
routing_strategy: latency-based-routing
# Per-error-type cooldown thresholds (overrides allowed_fails for specific errors).
# Upstream rate limits ("temporarily rate-limited upstream") can last minutes —
# a 30s cooldown just wastes retries. 300s gives providers time to clear the limit.
# RateLimitError: cooldown on FIRST 429 (upstream rate limits persist for minutes —
# allowing even 1 retry wastes a request against a provider that's still throttling)
allowed_fails_policy:
RateLimitErrorAllowedFails: 0
TimeoutErrorAllowedFails: 3
BadRequestErrorAllowedFails: 1
enable_health_check_routing: false
# NOTE: allowed_fails_policy is an enterprise-only feature in LiteLLM.
# Ollama cooldowns are handled by the triage router itself (router/main.py),
# not by LiteLLM's deployment cooldown mechanism.
vector_store_settings:
collection_name: litellm_semantic_cache
connection_string: postgresql://postgres:***@127.0.0.1:5432/postgres
Expand Down
2 changes: 1 addition & 1 deletion router/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM python:3.14-slim
WORKDIR /app

# Install deps in a single layer (no pip cache, no extra files)
RUN pip install --no-cache-dir fastapi uvicorn httpx pyyaml python-multipart asyncpg langfuse
RUN pip install --no-cache-dir fastapi uvicorn httpx pyyaml python-multipart asyncpg langfuse redis

# Copy all source in one layer — removes dead config COPY (volume-mounted at runtime)
COPY main.py agy_proxy.py circuit_breaker.py aa_scores.json free_models_roster.json /app/
Expand Down
Loading
Loading