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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Agent Cost Optimizer Configuration
|
| 2 |
+
|
| 3 |
+
project_name: "agent-cost-optimizer"
|
| 4 |
+
trace_storage_path: "./traces"
|
| 5 |
+
|
| 6 |
+
# Model tiers: 1=tiny, 2=cheap, 3=medium, 4=frontier, 5=specialist, 6=verifier
|
| 7 |
+
models:
|
| 8 |
+
tiny_local:
|
| 9 |
+
model_id: "tiny_local"
|
| 10 |
+
provider: "local"
|
| 11 |
+
cost_per_1k_input: 0.0001
|
| 12 |
+
cost_per_1k_output: 0.0002
|
| 13 |
+
cost_per_1k_reasoning: 0.0
|
| 14 |
+
latency_ms_estimate: 200
|
| 15 |
+
strength_tier: 1
|
| 16 |
+
max_context: 32768
|
| 17 |
+
supports_tools: true
|
| 18 |
+
supports_reasoning: false
|
| 19 |
+
cache_discount_rate: 0.5
|
| 20 |
+
|
| 21 |
+
cheap_cloud:
|
| 22 |
+
model_id: "cheap_cloud"
|
| 23 |
+
provider: "cloud"
|
| 24 |
+
cost_per_1k_input: 0.0005
|
| 25 |
+
cost_per_1k_output: 0.001
|
| 26 |
+
cost_per_1k_reasoning: 0.0
|
| 27 |
+
latency_ms_estimate: 500
|
| 28 |
+
strength_tier: 2
|
| 29 |
+
max_context: 128000
|
| 30 |
+
supports_tools: true
|
| 31 |
+
supports_reasoning: false
|
| 32 |
+
cache_discount_rate: 0.5
|
| 33 |
+
|
| 34 |
+
medium:
|
| 35 |
+
model_id: "medium"
|
| 36 |
+
provider: "cloud"
|
| 37 |
+
cost_per_1k_input: 0.003
|
| 38 |
+
cost_per_1k_output: 0.006
|
| 39 |
+
cost_per_1k_reasoning: 0.0
|
| 40 |
+
latency_ms_estimate: 800
|
| 41 |
+
strength_tier: 3
|
| 42 |
+
max_context: 128000
|
| 43 |
+
supports_tools: true
|
| 44 |
+
supports_reasoning: false
|
| 45 |
+
cache_discount_rate: 0.5
|
| 46 |
+
|
| 47 |
+
frontier:
|
| 48 |
+
model_id: "frontier"
|
| 49 |
+
provider: "cloud"
|
| 50 |
+
cost_per_1k_input: 0.01
|
| 51 |
+
cost_per_1k_output: 0.03
|
| 52 |
+
cost_per_1k_reasoning: 0.01
|
| 53 |
+
latency_ms_estimate: 1500
|
| 54 |
+
strength_tier: 4
|
| 55 |
+
max_context: 200000
|
| 56 |
+
supports_tools: true
|
| 57 |
+
supports_reasoning: true
|
| 58 |
+
cache_discount_rate: 0.5
|
| 59 |
+
|
| 60 |
+
specialist:
|
| 61 |
+
model_id: "specialist"
|
| 62 |
+
provider: "cloud"
|
| 63 |
+
cost_per_1k_input: 0.015
|
| 64 |
+
cost_per_1k_output: 0.045
|
| 65 |
+
cost_per_1k_reasoning: 0.015
|
| 66 |
+
latency_ms_estimate: 2000
|
| 67 |
+
strength_tier: 5
|
| 68 |
+
max_context: 128000
|
| 69 |
+
supports_tools: true
|
| 70 |
+
supports_reasoning: true
|
| 71 |
+
cache_discount_rate: 0.5
|
| 72 |
+
|
| 73 |
+
tools:
|
| 74 |
+
search:
|
| 75 |
+
tool_name: "search"
|
| 76 |
+
cost_per_call: 0.002
|
| 77 |
+
latency_ms_estimate: 500
|
| 78 |
+
cacheable: false
|
| 79 |
+
requires_verification: false
|
| 80 |
+
max_retries: 3
|
| 81 |
+
|
| 82 |
+
retrieve:
|
| 83 |
+
tool_name: "retrieve"
|
| 84 |
+
cost_per_call: 0.001
|
| 85 |
+
latency_ms_estimate: 300
|
| 86 |
+
cacheable: true
|
| 87 |
+
requires_verification: false
|
| 88 |
+
max_retries: 3
|
| 89 |
+
|
| 90 |
+
code_execution:
|
| 91 |
+
tool_name: "code_execution"
|
| 92 |
+
cost_per_call: 0.005
|
| 93 |
+
latency_ms_estimate: 1000
|
| 94 |
+
cacheable: false
|
| 95 |
+
requires_verification: true
|
| 96 |
+
max_retries: 2
|
| 97 |
+
|
| 98 |
+
linter:
|
| 99 |
+
tool_name: "linter"
|
| 100 |
+
cost_per_call: 0.001
|
| 101 |
+
latency_ms_estimate: 200
|
| 102 |
+
cacheable: false
|
| 103 |
+
requires_verification: false
|
| 104 |
+
max_retries: 1
|
| 105 |
+
|
| 106 |
+
file_read:
|
| 107 |
+
tool_name: "file_read"
|
| 108 |
+
cost_per_call: 0.0005
|
| 109 |
+
latency_ms_estimate: 100
|
| 110 |
+
cacheable: true
|
| 111 |
+
requires_verification: false
|
| 112 |
+
max_retries: 3
|
| 113 |
+
|
| 114 |
+
compliance_check:
|
| 115 |
+
tool_name: "compliance_check"
|
| 116 |
+
cost_per_call: 0.01
|
| 117 |
+
latency_ms_estimate: 1500
|
| 118 |
+
cacheable: false
|
| 119 |
+
requires_verification: true
|
| 120 |
+
max_retries: 2
|
| 121 |
+
|
| 122 |
+
verifiers:
|
| 123 |
+
verifier_medium:
|
| 124 |
+
verifier_model_id: "verifier_medium"
|
| 125 |
+
cost_per_call: 0.005
|
| 126 |
+
latency_ms_estimate: 800
|
| 127 |
+
confidence_threshold: 0.8
|
| 128 |
+
|
| 129 |
+
# Routing policy
|
| 130 |
+
routing_policy:
|
| 131 |
+
name: "default"
|
| 132 |
+
type: "cascade"
|
| 133 |
+
threshold_confidence: 0.7
|
| 134 |
+
max_cascade_depth: 3
|
| 135 |
+
enable_verifier_fallback: true
|
| 136 |
+
enable_escalation: true
|
| 137 |
+
|
| 138 |
+
# Cost weights
|
| 139 |
+
model_cost_weight: 1.0
|
| 140 |
+
tool_cost_weight: 1.0
|
| 141 |
+
verifier_cost_weight: 1.0
|
| 142 |
+
latency_weight: 0.1
|
| 143 |
+
retry_penalty_weight: 2.0
|
| 144 |
+
false_done_penalty: 10.0
|
| 145 |
+
unsafe_cheap_model_penalty: 20.0
|
| 146 |
+
missed_escalation_penalty: 15.0
|
| 147 |
+
|
| 148 |
+
# Module toggles
|
| 149 |
+
enable_telemetry: true
|
| 150 |
+
enable_classifier: true
|
| 151 |
+
enable_router: true
|
| 152 |
+
enable_context_budgeter: true
|
| 153 |
+
enable_cache_layout: true
|
| 154 |
+
enable_tool_gate: true
|
| 155 |
+
enable_verifier_budgeter: true
|
| 156 |
+
enable_retry_optimizer: true
|
| 157 |
+
enable_meta_tool_miner: true
|
| 158 |
+
enable_early_termination: true
|
| 159 |
+
|
| 160 |
+
# Cache-aware layout
|
| 161 |
+
cache_prefix_stable:
|
| 162 |
+
- system_rules
|
| 163 |
+
- tool_descriptions
|
| 164 |
+
- user_preferences
|
| 165 |
+
cache_suffix_dynamic:
|
| 166 |
+
- user_message
|
| 167 |
+
- retrieved_docs
|
| 168 |
+
- recent_trace
|
| 169 |
+
- artifacts
|
| 170 |
+
|
| 171 |
+
# Early termination
|
| 172 |
+
doom_max_cost_ratio: 3.0
|
| 173 |
+
doom_max_retries: 3
|
| 174 |
+
doom_no_progress_steps: 5
|
| 175 |
+
doom_verifier_disagreement_threshold: 2
|
| 176 |
+
|
| 177 |
+
# Meta-tool mining
|
| 178 |
+
meta_tool_min_frequency: 5
|
| 179 |
+
meta_tool_min_success_rate: 0.8
|