@gabrielsmartin/orbit-sdk 0.1.1 → 0.1.2

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.
Files changed (2) hide show
  1. package/README.md +40 -38
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -33,13 +33,13 @@ You're overpaying by 85%. "Write a haiku" does not need GPT-4o. "What is 2+2?" d
33
33
  import orbit from '@gabrielsmartin/orbit-sdk'
34
34
 
35
35
  const decision = orbit.route("write a haiku about recursion")
36
- // → Claude Sonnet | creative_claude | saved 50%
36
+ // → { model: "Claude Sonnet", reason: "High creativity Claude Sonnet for nuanced generation", savings: { reductionPct: 50 } }
37
37
 
38
38
  const decision2 = orbit.route("what is 2+2?")
39
- // → Gemini 2.5 Flash | cost_gemini | saved 98%
39
+ // → { model: "Gemini 2.5 Flash", reason: "Low complexity Gemini Flash at $0.50/1M tokens", savings: { reductionPct: 98 } }
40
40
 
41
41
  const decision3 = orbit.route("I've been feeling really anxious")
42
- // → Claude Sonnet | ethics_first | (never routes sensitive content to cheap models)
42
+ // → { model: "Claude Sonnet", reason: "Emotional weight detected ethics-first routing. Never a cheap model." }
43
43
  ```
44
44
 
45
45
  ---
@@ -59,7 +59,7 @@ Every query is fingerprinted across **8 axes** in under 1ms:
59
59
  | `domain` | Code, legal, medical, creative, general |
60
60
  | `cost_tolerance` | Budget flexibility signal |
61
61
 
62
- Then the SMM (Selective Model Matching) engine routes:
62
+ The SMM (Selective Model Matching) engine then routes:
63
63
 
64
64
  | Signal | → Model | Why |
65
65
  |--------|---------|-----|
@@ -77,24 +77,23 @@ Then the SMM (Selective Model Matching) engine routes:
77
77
  ```javascript
78
78
  import orbit, { OrbitClient, fingerprint } from '@gabrielsmartin/orbit-sdk'
79
79
 
80
- // Route a query
80
+ // Route a query — returns routing decision instantly (<1ms)
81
81
  const result = orbit.route(queryText)
82
82
  // Returns: { model, reason, savings: { reductionPct, estimatedCost, premiumCost } }
83
83
 
84
84
  // Get session stats
85
85
  const stats = orbit.stats()
86
- // Returns: { queries_routed, total_savings, total_savings_formatted, breakdown }
86
+ // Returns: { queries_routed, total_savings_formatted, breakdown }
87
87
 
88
88
  // Custom config
89
89
  const client = new OrbitClient({
90
90
  default_model: 'claude_sonnet',
91
- blocked_models: ['gpt4o'], // never route here
92
- always_log: true,
91
+ blocked_models: ['gpt4o'],
93
92
  })
94
93
 
95
- // Raw fingerprint
94
+ // Raw fingerprint only
96
95
  const fp = fingerprint("write a poem about loss")
97
- // Returns: { complexity, creativity, emotional_weight, recency, context_load, speed, domain, cost_tolerance }
96
+ // Returns all 8 axes as numbers
98
97
  ```
99
98
 
100
99
  ---
@@ -102,58 +101,61 @@ const fp = fingerprint("write a poem about loss")
102
101
  ## Results
103
102
 
104
103
  ```
105
- $ node --input-type=module << 'EOF'
106
- import orbit from '@gabrielsmartin/orbit-sdk'
107
-
108
- orbit.route("write a haiku about recursion")
109
- // [ORBIT] → Claude Sonnet | creative_claude | saved $0.00750 (50% reduction)
110
-
111
- orbit.route("what is 2+2?")
112
- // [ORBIT] → Gemini 2.5 Flash | cost_gemini | saved $0.01475 (98% reduction)
104
+ $ node test.js
113
105
 
114
- orbit.route("architect a distributed cache for 10M users")
115
- // [ORBIT] → Claude Sonnet | default | saved $0.00750 (50% reduction)
106
+ [ORBIT] Claude Sonnet | creative_claude | saved $0.00750 (50% reduction)
107
+ [ORBIT] → Gemini 2.5 Flash | cost_gemini | saved $0.01475 (98% reduction)
108
+ [ORBIT] → Claude Sonnet | default | saved $0.00750 (50% reduction)
116
109
 
117
- console.log(orbit.stats())
118
- // { queries_routed: 3, total_savings_formatted: '$0.0298' }
119
- EOF
110
+ Session stats: { queries_routed: 3, total_savings_formatted: '$0.0298' }
120
111
  ```
121
112
 
122
113
  Validated by **RouteLLM (UC Berkeley / ICLR 2025)**: intelligent routing achieves **85% cost reduction** while maintaining **95% of GPT-4o quality**.
123
114
 
124
115
  ---
125
116
 
126
- ## Hosted API (coming soon)
117
+ ## Hosted API coming soon
127
118
 
128
- The SDK routes decisions client-side (no API key needed, zero latency). A **hosted API with analytics dashboard** is coming for teams that want:
119
+ The SDK routes decisions **client-side** no API key, zero latency, works today.
129
120
 
130
- - Cross-session savings tracking
131
- - Routing policy editor
132
- - Team analytics
133
- - A/B cost testing
134
- - Custom model matrix
121
+ The **hosted API** is coming for teams that need:
135
122
 
136
- **[Join the waitlist →](https://orbit-model-flow.base44.app/#waitlist)**
123
+ - Cross-session savings tracking & audit logs
124
+ - Routing policy editor (block models, set cost caps)
125
+ - Team analytics dashboard
126
+ - A/B cost testing across routing strategies
127
+ - Custom model matrix + private model support
128
+ - Enterprise compliance mode + SLA guarantee
129
+
130
+ **Pricing:**
131
+ | Tier | Price | Queries |
132
+ |------|-------|---------|
133
+ | Free | $0/mo | 100/day |
134
+ | Pro | $19/mo | Unlimited |
135
+ | Team | $99/mo | Unlimited · 5 seats |
136
+ | Enterprise | Custom | Custom + 15% savings-share |
137
137
 
138
- Free tier: 100 queries/day · Pro: $19/mo unlimited · Team: $99/mo
138
+ **[Join the waitlist →](https://orbit-model-flow.base44.app/#waitlist)**
139
+ Early access gets Pro pricing locked at $9/mo. Access code: **777**
139
140
 
140
141
  ---
141
142
 
142
143
  ## Research backing
143
144
 
144
145
  - **RouteLLM** — UC Berkeley / ICLR 2025: *"Routing between weak and strong LLMs reduces costs by 85% while maintaining 95% quality."*
145
- - **OpenRouter** ($500M+ valuation) proves the market exists. ORBIT adds the intelligence layer they're missing.
146
- - **Martian** (Accenture-backed) proves enterprises pay for routing. ORBIT is the frictionless version.
146
+ - **OpenRouter** ($500M+ valuation) proves the market. ORBIT adds the intelligence layer they're missing.
147
+ - **Martian** (Accenture-backed) proves enterprises pay for routing. ORBIT is the frictionless version for everyone else.
147
148
 
148
149
  ---
149
150
 
150
151
  ## Roadmap
151
152
 
152
153
  - [x] v0.1.0 — 8-axis fingerprinting + 6-model routing matrix
153
- - [ ] v0.2.0 — Hosted API with API key auth + rate limiting
154
- - [ ] v0.3.0 — Analytics dashboard
154
+ - [x] v0.1.1 — Hosted API architecture, waitlist, admin dashboard
155
+ - [ ] v0.2.0 — Hosted API with API key auth + rate limiting (100/day free, unlimited Pro)
156
+ - [ ] v0.3.0 — Analytics dashboard + savings tracker
155
157
  - [ ] v0.4.0 — Chrome extension
156
- - [ ] v1.0.0 — Enterprise API + savings-share pricing
158
+ - [ ] v1.0.0 — Enterprise API + savings-share pricing model
157
159
 
158
160
  ---
159
161
 
@@ -161,4 +163,4 @@ Free tier: 100 queries/day · Pro: $19/mo unlimited · Team: $99/mo
161
163
 
162
164
  MIT © [Gabriel Martin](https://www.linkedin.com/in/gabrielsmartin)
163
165
 
164
- **[Live demo](https://orbit-model-flow.base44.app) · [GitHub](https://github.com/gabrielsmartin/orbit) · [npm](https://www.npmjs.com/package/@gabrielsmartin/orbit-sdk) · [LinkedIn](https://www.linkedin.com/in/gabrielsmartin)**
166
+ **[Live demo](https://orbit-model-flow.base44.app/demo) · [GitHub](https://github.com/gabrielsmartin/orbit) · [npm](https://www.npmjs.com/package/@gabrielsmartin/orbit-sdk) · [LinkedIn](https://www.linkedin.com/in/gabrielsmartin)**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gabrielsmartin/orbit-sdk",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Intelligent AI model routing. Drop-in replacement for OpenAI/Anthropic. Routes every query to the optimal model automatically.",
5
5
  "type": "module",
6
6
  "main": "src/index.js",