feat(ai): add guarded Claude fallback route
This commit is contained in:
@@ -2,18 +2,18 @@
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"name": "OpenClaw AI Router Configuration",
|
||||
"version": "2.0.0",
|
||||
"description": "Global production route: GCP-A Ollama -> GCP-B Ollama -> host111 Ollama -> Gemini API; legacy providers are non-executable shadow metadata only",
|
||||
"updated_at": "2026-07-14",
|
||||
"description": "Global production route: GCP-A Ollama -> GCP-B Ollama -> host111 Ollama -> Anthropic Claude API -> Gemini API; paid providers require durable cost and runtime gates",
|
||||
"updated_at": "2026-07-15",
|
||||
|
||||
"default_provider": "ollama",
|
||||
"fallback_order": ["ollama_gcp_a", "ollama_gcp_b", "ollama_local", "gemini"],
|
||||
"tool_calling_fallback_order": ["ollama_gcp_a", "ollama_gcp_b", "ollama_local", "gemini"],
|
||||
"fallback_order": ["ollama_gcp_a", "ollama_gcp_b", "ollama_local", "claude", "gemini"],
|
||||
"tool_calling_fallback_order": ["ollama_gcp_a", "ollama_gcp_b", "ollama_local", "claude", "gemini"],
|
||||
"production_route": {
|
||||
"schema_version": "ai_provider_production_route_v1",
|
||||
"provider_order": ["ollama_gcp_a", "ollama_gcp_b", "ollama_local", "gemini"],
|
||||
"route_label": "GCP-A -> GCP-B -> host111 Ollama -> Gemini API",
|
||||
"provider_order": ["ollama_gcp_a", "ollama_gcp_b", "ollama_local", "claude", "gemini"],
|
||||
"route_label": "GCP-A -> GCP-B -> host111 Ollama -> Anthropic Claude API -> Gemini API",
|
||||
"applies_to": ["all_risk_levels", "all_complexity_levels", "tool_calling", "background_jobs", "code_review", "runbook_generation"],
|
||||
"paid_provider_policy": "gemini_final_only_with_atomic_cost_guard",
|
||||
"paid_provider_policy": "claude_then_gemini_with_independent_atomic_cost_guards",
|
||||
"disabled_provider_policy": "never_reinsert"
|
||||
},
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
"gemini": {
|
||||
"name": "Google Gemini",
|
||||
"enabled": true,
|
||||
"priority": 4,
|
||||
"priority": 5,
|
||||
"production_executable": true,
|
||||
"execution_gate": "configured_and_enabled_and_atomic_cost_guard_reserved",
|
||||
"endpoint": "https://generativelanguage.googleapis.com/v1beta",
|
||||
@@ -107,23 +107,29 @@
|
||||
"claude": {
|
||||
"name": "Anthropic Claude",
|
||||
"enabled": false,
|
||||
"priority": null,
|
||||
"production_executable": false,
|
||||
"mode": "non_executable_shadow_metadata_only",
|
||||
"priority": 4,
|
||||
"production_executable": true,
|
||||
"mode": "paid_fallback_shadow_by_default",
|
||||
"execution_gate": "configured_and_enabled_and_mode_selected_and_atomic_cost_guard_reserved",
|
||||
"endpoint": "https://api.anthropic.com/v1",
|
||||
"api_path": "/messages",
|
||||
"models": {
|
||||
"default": "claude-haiku-4-5-20251001",
|
||||
"rca": "claude-haiku-4-5-20251001",
|
||||
"summary": "claude-haiku-4-5-20251001"
|
||||
"default": "claude-sonnet-5",
|
||||
"rca": "claude-sonnet-5",
|
||||
"summary": "claude-sonnet-5"
|
||||
},
|
||||
"options": {
|
||||
"max_tokens": 2048
|
||||
"max_tokens": 4096
|
||||
},
|
||||
"timeout_seconds": 30,
|
||||
"cost": {
|
||||
"per_1k_tokens": 0.005,
|
||||
"currency": "USD"
|
||||
"input_usd_per_million": 3.0,
|
||||
"output_usd_per_million": 15.0,
|
||||
"currency": "USD",
|
||||
"pricing_basis": "conservative_standard_ceiling_even_during_introductory_discount",
|
||||
"pricing_source": "https://platform.claude.com/docs/en/about-claude/models/overview",
|
||||
"pricing_version": "anthropic-standard-ceiling-2026-07-15",
|
||||
"pricing_checked_at": "2026-07-15"
|
||||
},
|
||||
"auth": {
|
||||
"type": "header",
|
||||
@@ -131,8 +137,12 @@
|
||||
"header_name": "x-api-key"
|
||||
},
|
||||
"rate_limits": {
|
||||
"daily_tokens": 35000,
|
||||
"requests_per_minute": 50
|
||||
"daily_requests": 50,
|
||||
"daily_tokens": 100000,
|
||||
"requests_per_minute": 2,
|
||||
"daily_cost_limit_usd": 1.0,
|
||||
"total_cost_limit_usd": 5.0,
|
||||
"cost_alert_threshold_usd": 4.0
|
||||
},
|
||||
"features": {
|
||||
"tool_use": true,
|
||||
@@ -231,14 +241,14 @@
|
||||
"description": "Root Cause Analysis for alerts",
|
||||
"preferred_provider": "ollama_gcp_a",
|
||||
"fallback_enabled": true,
|
||||
"fallback_order": ["ollama_gcp_b", "ollama_local", "gemini"],
|
||||
"fallback_order": ["ollama_gcp_b", "ollama_local", "claude", "gemini"],
|
||||
"required_features": ["json_output"]
|
||||
},
|
||||
"log_summary": {
|
||||
"description": "Summarize K8s logs for context gathering",
|
||||
"preferred_provider": "ollama_gcp_a",
|
||||
"fallback_enabled": true,
|
||||
"fallback_order": ["ollama_gcp_b", "ollama_local", "gemini"],
|
||||
"fallback_order": ["ollama_gcp_b", "ollama_local", "claude", "gemini"],
|
||||
"max_input_tokens": 4096
|
||||
},
|
||||
"telegram_compose": {
|
||||
@@ -251,7 +261,7 @@
|
||||
"description": "K8s Tool Calling operations on the global production route",
|
||||
"preferred_provider": "ollama_gcp_a",
|
||||
"fallback_enabled": true,
|
||||
"fallback_order": ["ollama_gcp_b", "ollama_local", "gemini"],
|
||||
"fallback_order": ["ollama_gcp_b", "ollama_local", "claude", "gemini"],
|
||||
"required_features": ["tool_use"],
|
||||
"notes": "NVIDIA/Nemotron is non-executable shadow metadata only"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user