@relayplane/proxy 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -94,11 +94,14 @@ RelayPlane doesn't just route — it **learns from every request**:
94
94
  - **Local Intelligence** — All learning happens in your local SQLite DB
95
95
 
96
96
  ```bash
97
- # View your routing stats
97
+ # View your routing stats (last 7 days)
98
98
  npx @relayplane/proxy stats
99
99
 
100
- # Query the raw data
101
- sqlite3 ~/.relayplane/data.db "SELECT model, outcome, COUNT(*) FROM runs GROUP BY model, outcome"
100
+ # View last 30 days
101
+ npx @relayplane/proxy stats --days 30
102
+
103
+ # Query the raw data directly
104
+ sqlite3 ~/.relayplane/data.db "SELECT model, task_type, COUNT(*) FROM runs GROUP BY model, task_type"
102
105
  ```
103
106
 
104
107
  Unlike static routing rules, RelayPlane adapts to **your** usage patterns.
package/dist/cli.js CHANGED
@@ -155,11 +155,13 @@ CREATE TABLE IF NOT EXISTS schema_version (
155
155
  INSERT OR IGNORE INTO schema_version (version) VALUES (1);
156
156
  `;
157
157
  var DEFAULT_ROUTING_RULES = [
158
- { taskType: "code_generation", preferredModel: "anthropic:claude-3-5-haiku-latest" },
159
- { taskType: "code_review", preferredModel: "anthropic:claude-3-5-haiku-latest" },
158
+ // Complex tasks Sonnet (need reasoning & quality)
159
+ { taskType: "code_generation", preferredModel: "anthropic:claude-sonnet-4-20250514" },
160
+ { taskType: "code_review", preferredModel: "anthropic:claude-sonnet-4-20250514" },
161
+ { taskType: "analysis", preferredModel: "anthropic:claude-sonnet-4-20250514" },
162
+ { taskType: "creative_writing", preferredModel: "anthropic:claude-sonnet-4-20250514" },
163
+ // Simple tasks → Haiku (cost efficient)
160
164
  { taskType: "summarization", preferredModel: "anthropic:claude-3-5-haiku-latest" },
161
- { taskType: "analysis", preferredModel: "anthropic:claude-3-5-haiku-latest" },
162
- { taskType: "creative_writing", preferredModel: "anthropic:claude-3-5-haiku-latest" },
163
165
  { taskType: "data_extraction", preferredModel: "anthropic:claude-3-5-haiku-latest" },
164
166
  { taskType: "translation", preferredModel: "anthropic:claude-3-5-haiku-latest" },
165
167
  { taskType: "question_answering", preferredModel: "anthropic:claude-3-5-haiku-latest" },
@@ -1626,11 +1628,14 @@ var MODEL_MAPPING = {
1626
1628
  "gpt-4.1": { provider: "openai", model: "gpt-4.1" }
1627
1629
  };
1628
1630
  var DEFAULT_ROUTING = {
1629
- code_generation: { provider: "anthropic", model: "claude-3-5-haiku-latest" },
1630
- code_review: { provider: "anthropic", model: "claude-3-5-haiku-latest" },
1631
+ // Complex tasks Sonnet (need reasoning & quality)
1632
+ code_review: { provider: "anthropic", model: "claude-sonnet-4-20250514" },
1633
+ analysis: { provider: "anthropic", model: "claude-sonnet-4-20250514" },
1634
+ creative_writing: { provider: "anthropic", model: "claude-sonnet-4-20250514" },
1635
+ // Medium tasks → Sonnet (benefit from better model)
1636
+ code_generation: { provider: "anthropic", model: "claude-sonnet-4-20250514" },
1637
+ // Simple tasks → Haiku (cost efficient)
1631
1638
  summarization: { provider: "anthropic", model: "claude-3-5-haiku-latest" },
1632
- analysis: { provider: "anthropic", model: "claude-3-5-haiku-latest" },
1633
- creative_writing: { provider: "anthropic", model: "claude-3-5-haiku-latest" },
1634
1639
  data_extraction: { provider: "anthropic", model: "claude-3-5-haiku-latest" },
1635
1640
  translation: { provider: "anthropic", model: "claude-3-5-haiku-latest" },
1636
1641
  question_answering: { provider: "anthropic", model: "claude-3-5-haiku-latest" },