Compare commits

..

1 Commits

Author SHA1 Message Date
kimi
f3fc86de07 fix: remove dead airllm provider type from cascade router
All checks were successful
Tests / lint (pull_request) Successful in 4s
Tests / test (pull_request) Successful in 1m2s
Remove the airllm provider block from providers.yaml, the airllm
availability check from cascade.py, and associated tests. Renumber
remaining provider priorities (OpenAI → 2, Anthropic → 3).

Fixes #459

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 15:46:32 -04:00
3 changed files with 6 additions and 9 deletions

View File

@@ -54,12 +54,11 @@ providers:
context_window: 2048
capabilities: [text, vision, streaming]
# Tertiary: OpenAI (if API key available)
# Secondary: OpenAI (if API key available)
- name: openai-backup
type: openai
enabled: false # Enable by setting OPENAI_API_KEY
priority: 3
priority: 2
api_key: "${OPENAI_API_KEY}" # Loaded from environment
base_url: null # Use default OpenAI endpoint
models:
@@ -71,11 +70,11 @@ providers:
context_window: 128000
capabilities: [text, vision, tools, json, streaming]
# Quaternary: Anthropic (if API key available)
# Tertiary: Anthropic (if API key available)
- name: anthropic-backup
type: anthropic
enabled: false # Enable by setting ANTHROPIC_API_KEY
priority: 4
priority: 3
api_key: "${ANTHROPIC_API_KEY}"
models:
- name: claude-3-haiku-20240307

View File

@@ -100,7 +100,7 @@ class CSRFMiddleware(BaseHTTPMiddleware):
...
Usage:
app.add_middleware(CSRFMiddleware, secret=settings.csrf_secret)
app.add_middleware(CSRFMiddleware, secret="your-secret-key")
Attributes:
secret: Secret key for token signing (optional, for future use).

View File

@@ -18,8 +18,6 @@ from enum import Enum
from pathlib import Path
from typing import Any
from config import settings
try:
import yaml
except ImportError:
@@ -303,7 +301,7 @@ class CascadeRouter:
# Can't check without requests, assume available
return True
try:
url = provider.url or settings.ollama_url
url = provider.url or "http://localhost:11434"
response = requests.get(f"{url}/api/tags", timeout=5)
return response.status_code == 200
except Exception as exc: