tensorfeed 2.2.0__tar.gz → 2.2.1__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tensorfeed
3
- Version: 2.2.0
3
+ Version: 2.2.1
4
4
  Summary: Python SDK for the TensorFeed.ai API: AI news, status, model pricing, premium routing + history series + webhook watches, LangChain/CrewAI tool factories, agent payments via USDC on Base (optional web3 auto-send)
5
5
  Author-email: "TensorFeed.ai" <feedback@tensorfeed.ai>
6
6
  License-Expression: MIT
@@ -141,8 +141,9 @@ from tensorfeed import TensorFeed, PaymentRequired
141
141
 
142
142
  tf = TensorFeed()
143
143
 
144
- # Step 1: get a 30-minute quote
145
- quote = tf.buy_credits(amount_usd=1.00)
144
+ # Step 1: get a 30-minute quote. sender_wallet is the Base wallet you will
145
+ # send the USDC from (required); quote['wallet'] below is where you send it.
146
+ quote = tf.buy_credits(amount_usd=1.00, sender_wallet="0xYourBaseWallet")
146
147
  print(f"Send {quote['amount_usd']} USDC on Base to {quote['wallet']}")
147
148
  print(f"Memo: {quote['memo']} (expires in {quote['ttl_seconds']}s)")
148
149
  print(f"Will get: {quote['credits']} credits")
@@ -176,11 +177,6 @@ print(f'SWE-bench moved {scores["summary"]["delta_pp"]} pp')
176
177
  uptime = tf.status_uptime(provider="anthropic")
177
178
  print(f'Anthropic uptime: {uptime["uptime_pct"]}% over {uptime["days_with_data"]} days')
178
179
 
179
- diff = tf.history_compare(
180
- from_date="2026-04-01", to_date="2026-04-27", snapshot_type="pricing",
181
- )
182
- print(f'{len(diff["changed"])} price changes, {len(diff["added"])} new models')
183
-
184
180
  # Premium webhook watches (1 credit per registration, free reads)
185
181
  created = tf.create_watch(
186
182
  spec={
@@ -321,7 +317,7 @@ except TensorFeedError as e:
321
317
  | `tf.routing_preview(task=)` | Top-1 routing recommendation (5/day/IP) |
322
318
  | `tf.health()` | API health check |
323
319
  | `tf.payment_info()` | Wallet, pricing, supported payment flows |
324
- | `tf.buy_credits(amount_usd=)` | Generate a 30-min payment quote |
320
+ | `tf.buy_credits(amount_usd=, sender_wallet=)` | Generate a 30-min payment quote |
325
321
  | `tf.confirm(tx_hash=, nonce=)` | Verify USDC tx, mint credit token |
326
322
 
327
323
  ### Token-required
@@ -334,7 +330,6 @@ except TensorFeedError as e:
334
330
  | `tf.pricing_series(model=, from_date=, to_date=)` | 1 credit | Daily price points for one model with min/max/delta summary |
335
331
  | `tf.benchmark_series(model=, benchmark=, from_date=, to_date=)` | 1 credit | Score evolution for a benchmark on one model, returns delta_pp |
336
332
  | `tf.status_uptime(provider=, from_date=, to_date=)` | 1 credit | Uptime % per provider with incident days (degraded = half) |
337
- | `tf.history_compare(from_date=, to_date=, snapshot_type=)` | 1 credit | Diff two snapshots: added, removed, changed entries with deltas |
338
333
  | `tf.create_watch(spec=, callback_url=, secret=, fire_cap=)` | 1 credit | Register a webhook watch (price / status / digest) |
339
334
  | `tf.create_digest_watch(cadence=, callback_url=, secret=, fire_cap=)` | 1 credit | Convenience: scheduled daily/weekly digest of pricing changes |
340
335
  | `tf.list_watches()` | Free | List all active watches owned by the current token |
@@ -343,8 +338,7 @@ except TensorFeedError as e:
343
338
  | `tf.premium_agents_directory(category=, status=, sort=, limit=, ...)` | 1 credit | Enriched directory: status, news, traffic, pricing, trending_score per agent |
344
339
  | `tf.news_search(q=, from_date=, to_date=, provider=, category=, limit=)` | 1 credit | Full-text news search with date/provider filters, relevance scoring, recency boost |
345
340
  | `tf.cost_projection(models=, input_tokens_per_day=, output_tokens_per_day=, horizon=)` | 1 credit | Project workload cost across 1-10 models, 4 horizons, cheapest-monthly ranking |
346
- | `tf.forecast(target=, model=, field=, benchmark=, lookback=, horizon=)` | 1 credit | Linear-regression forecast for a price or benchmark series with 95% CI and confidence label |
347
- | `tf.provider_deepdive(provider)` | 1 credit | One provider's full profile: status + all models + benchmarks joined + news + traffic |
341
+ | `tf.provider_deepdive(provider)` | 5 credits | One provider's full profile: status + all models + benchmarks joined + news + traffic |
348
342
  | `tf.compare_models(ids=)` | 1 credit | Side-by-side compare of 2-5 models with normalized benchmarks + rankings |
349
343
  | `tf.whats_new(days=, news_limit=)` | 1 credit | Agent morning brief: pricing changes + incidents + top news from last 1-7 days |
350
344
 
@@ -108,8 +108,9 @@ from tensorfeed import TensorFeed, PaymentRequired
108
108
 
109
109
  tf = TensorFeed()
110
110
 
111
- # Step 1: get a 30-minute quote
112
- quote = tf.buy_credits(amount_usd=1.00)
111
+ # Step 1: get a 30-minute quote. sender_wallet is the Base wallet you will
112
+ # send the USDC from (required); quote['wallet'] below is where you send it.
113
+ quote = tf.buy_credits(amount_usd=1.00, sender_wallet="0xYourBaseWallet")
113
114
  print(f"Send {quote['amount_usd']} USDC on Base to {quote['wallet']}")
114
115
  print(f"Memo: {quote['memo']} (expires in {quote['ttl_seconds']}s)")
115
116
  print(f"Will get: {quote['credits']} credits")
@@ -143,11 +144,6 @@ print(f'SWE-bench moved {scores["summary"]["delta_pp"]} pp')
143
144
  uptime = tf.status_uptime(provider="anthropic")
144
145
  print(f'Anthropic uptime: {uptime["uptime_pct"]}% over {uptime["days_with_data"]} days')
145
146
 
146
- diff = tf.history_compare(
147
- from_date="2026-04-01", to_date="2026-04-27", snapshot_type="pricing",
148
- )
149
- print(f'{len(diff["changed"])} price changes, {len(diff["added"])} new models')
150
-
151
147
  # Premium webhook watches (1 credit per registration, free reads)
152
148
  created = tf.create_watch(
153
149
  spec={
@@ -288,7 +284,7 @@ except TensorFeedError as e:
288
284
  | `tf.routing_preview(task=)` | Top-1 routing recommendation (5/day/IP) |
289
285
  | `tf.health()` | API health check |
290
286
  | `tf.payment_info()` | Wallet, pricing, supported payment flows |
291
- | `tf.buy_credits(amount_usd=)` | Generate a 30-min payment quote |
287
+ | `tf.buy_credits(amount_usd=, sender_wallet=)` | Generate a 30-min payment quote |
292
288
  | `tf.confirm(tx_hash=, nonce=)` | Verify USDC tx, mint credit token |
293
289
 
294
290
  ### Token-required
@@ -301,7 +297,6 @@ except TensorFeedError as e:
301
297
  | `tf.pricing_series(model=, from_date=, to_date=)` | 1 credit | Daily price points for one model with min/max/delta summary |
302
298
  | `tf.benchmark_series(model=, benchmark=, from_date=, to_date=)` | 1 credit | Score evolution for a benchmark on one model, returns delta_pp |
303
299
  | `tf.status_uptime(provider=, from_date=, to_date=)` | 1 credit | Uptime % per provider with incident days (degraded = half) |
304
- | `tf.history_compare(from_date=, to_date=, snapshot_type=)` | 1 credit | Diff two snapshots: added, removed, changed entries with deltas |
305
300
  | `tf.create_watch(spec=, callback_url=, secret=, fire_cap=)` | 1 credit | Register a webhook watch (price / status / digest) |
306
301
  | `tf.create_digest_watch(cadence=, callback_url=, secret=, fire_cap=)` | 1 credit | Convenience: scheduled daily/weekly digest of pricing changes |
307
302
  | `tf.list_watches()` | Free | List all active watches owned by the current token |
@@ -310,8 +305,7 @@ except TensorFeedError as e:
310
305
  | `tf.premium_agents_directory(category=, status=, sort=, limit=, ...)` | 1 credit | Enriched directory: status, news, traffic, pricing, trending_score per agent |
311
306
  | `tf.news_search(q=, from_date=, to_date=, provider=, category=, limit=)` | 1 credit | Full-text news search with date/provider filters, relevance scoring, recency boost |
312
307
  | `tf.cost_projection(models=, input_tokens_per_day=, output_tokens_per_day=, horizon=)` | 1 credit | Project workload cost across 1-10 models, 4 horizons, cheapest-monthly ranking |
313
- | `tf.forecast(target=, model=, field=, benchmark=, lookback=, horizon=)` | 1 credit | Linear-regression forecast for a price or benchmark series with 95% CI and confidence label |
314
- | `tf.provider_deepdive(provider)` | 1 credit | One provider's full profile: status + all models + benchmarks joined + news + traffic |
308
+ | `tf.provider_deepdive(provider)` | 5 credits | One provider's full profile: status + all models + benchmarks joined + news + traffic |
315
309
  | `tf.compare_models(ids=)` | 1 credit | Side-by-side compare of 2-5 models with normalized benchmarks + rankings |
316
310
  | `tf.whats_new(days=, news_limit=)` | 1 credit | Agent morning brief: pricing changes + incidents + top news from last 1-7 days |
317
311
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "tensorfeed"
7
- version = "2.2.0"
7
+ version = "2.2.1"
8
8
  description = "Python SDK for the TensorFeed.ai API: AI news, status, model pricing, premium routing + history series + webhook watches, LangChain/CrewAI tool factories, agent payments via USDC on Base (optional web3 auto-send)"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -21,4 +21,4 @@ __all__ = [
21
21
  "PaymentRequired",
22
22
  "RateLimited",
23
23
  ]
24
- __version__ = "2.1.0"
24
+ __version__ = "2.2.0"
@@ -158,14 +158,14 @@ DESCRIPTIONS: dict[str, str] = {
158
158
  "limit (1-100, default 25)."
159
159
  ),
160
160
  "tensorfeed_provider_deepdive": (
161
- "PAID, 1 credit. One AI provider's full profile in a single "
161
+ "PAID, 5 credits. One AI provider's full profile in a single "
162
162
  "call: live status, every model with pricing and benchmarks "
163
163
  "joined in, recent news, and agent-traffic attribution. Doing "
164
164
  "this from free endpoints takes several round-trips and a "
165
165
  "non-trivial join. Input: provider (id or display name)."
166
166
  ),
167
167
  "tensorfeed_status_leaderboard": (
168
- "PAID, 1 credit. Cross-provider AI uptime leaderboard over the "
168
+ "PAID, 5 credits. Cross-provider AI uptime leaderboard over the "
169
169
  "full 90-day retention window, with incident_count and "
170
170
  "mttr_minutes per provider. Built for vendor selection and "
171
171
  "post-incident review. Inputs: from_date, to_date (optional, "
@@ -976,7 +976,7 @@ class TensorFeed:
976
976
  from_date: str | None = None,
977
977
  to_date: str | None = None,
978
978
  ) -> dict[str, Any]:
979
- """Cross-provider uptime leaderboard. Costs 1 credit.
979
+ """Cross-provider uptime leaderboard. Costs 5 credits.
980
980
 
981
981
  Same minute-resolution counter source as the free
982
982
  ``status_leaderboard_free()`` but extends the window to the full
@@ -1184,12 +1184,12 @@ class TensorFeed:
1184
1184
  fire_cap=fire_cap,
1185
1185
  )
1186
1186
 
1187
- # ── Paid: provider deep-dive (Tier 1, 1 credit) ────────────────
1187
+ # ── Paid: provider deep-dive (Tier 3, 5 credits) ────────────────
1188
1188
 
1189
1189
  def provider_deepdive(self, provider: str) -> dict[str, Any]:
1190
1190
  """Everything about a provider in one paid call.
1191
1191
 
1192
- Costs 1 credit. Returns the live status + status_page_url +
1192
+ Costs 5 credits. Returns the live status + status_page_url +
1193
1193
  components, all of the provider's models with pricing, tier,
1194
1194
  context window, capabilities, and benchmark scores joined in,
1195
1195
  recent news mentions, and agent-traffic attribution.
@@ -1520,7 +1520,7 @@ class TensorFeed:
1520
1520
  """
1521
1521
  return self._request("GET", "/probe/latest")
1522
1522
 
1523
- # ── Paid: LLM probe time series (Tier 1, 1 credit) ─────────────
1523
+ # ── Paid: LLM probe time series (Tier 3, 5 credits) ─────────────
1524
1524
 
1525
1525
  def get_probe_series(
1526
1526
  self,
@@ -1531,7 +1531,7 @@ class TensorFeed:
1531
1531
  ) -> dict[str, Any]:
1532
1532
  """Daily SLA series for one LLM provider, measured by TensorFeed.
1533
1533
 
1534
- Costs 1 credit. Returns per-day count, success rate, ttfb
1534
+ Costs 5 credits. Returns per-day count, success rate, ttfb
1535
1535
  p50/p95/p99, total p50/p95/p99, incident-hour count for each
1536
1536
  day in the requested window. Provider status pages are
1537
1537
  politically managed; this is the measured truth.
@@ -172,7 +172,7 @@ def auto_purchase_credits(
172
172
  if not result.get("ok"):
173
173
  raise RuntimeError(
174
174
  f"Tx {tx_hash} mined but TensorFeed rejected confirm: {result}. "
175
- f"Email evan@tensorfeed.ai with the tx hash for a manual reconciliation."
175
+ f"Email contact@tensorfeed.ai with the tx hash for a manual reconciliation."
176
176
  )
177
177
 
178
178
  return {
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tensorfeed
3
- Version: 2.2.0
3
+ Version: 2.2.1
4
4
  Summary: Python SDK for the TensorFeed.ai API: AI news, status, model pricing, premium routing + history series + webhook watches, LangChain/CrewAI tool factories, agent payments via USDC on Base (optional web3 auto-send)
5
5
  Author-email: "TensorFeed.ai" <feedback@tensorfeed.ai>
6
6
  License-Expression: MIT
@@ -141,8 +141,9 @@ from tensorfeed import TensorFeed, PaymentRequired
141
141
 
142
142
  tf = TensorFeed()
143
143
 
144
- # Step 1: get a 30-minute quote
145
- quote = tf.buy_credits(amount_usd=1.00)
144
+ # Step 1: get a 30-minute quote. sender_wallet is the Base wallet you will
145
+ # send the USDC from (required); quote['wallet'] below is where you send it.
146
+ quote = tf.buy_credits(amount_usd=1.00, sender_wallet="0xYourBaseWallet")
146
147
  print(f"Send {quote['amount_usd']} USDC on Base to {quote['wallet']}")
147
148
  print(f"Memo: {quote['memo']} (expires in {quote['ttl_seconds']}s)")
148
149
  print(f"Will get: {quote['credits']} credits")
@@ -176,11 +177,6 @@ print(f'SWE-bench moved {scores["summary"]["delta_pp"]} pp')
176
177
  uptime = tf.status_uptime(provider="anthropic")
177
178
  print(f'Anthropic uptime: {uptime["uptime_pct"]}% over {uptime["days_with_data"]} days')
178
179
 
179
- diff = tf.history_compare(
180
- from_date="2026-04-01", to_date="2026-04-27", snapshot_type="pricing",
181
- )
182
- print(f'{len(diff["changed"])} price changes, {len(diff["added"])} new models')
183
-
184
180
  # Premium webhook watches (1 credit per registration, free reads)
185
181
  created = tf.create_watch(
186
182
  spec={
@@ -321,7 +317,7 @@ except TensorFeedError as e:
321
317
  | `tf.routing_preview(task=)` | Top-1 routing recommendation (5/day/IP) |
322
318
  | `tf.health()` | API health check |
323
319
  | `tf.payment_info()` | Wallet, pricing, supported payment flows |
324
- | `tf.buy_credits(amount_usd=)` | Generate a 30-min payment quote |
320
+ | `tf.buy_credits(amount_usd=, sender_wallet=)` | Generate a 30-min payment quote |
325
321
  | `tf.confirm(tx_hash=, nonce=)` | Verify USDC tx, mint credit token |
326
322
 
327
323
  ### Token-required
@@ -334,7 +330,6 @@ except TensorFeedError as e:
334
330
  | `tf.pricing_series(model=, from_date=, to_date=)` | 1 credit | Daily price points for one model with min/max/delta summary |
335
331
  | `tf.benchmark_series(model=, benchmark=, from_date=, to_date=)` | 1 credit | Score evolution for a benchmark on one model, returns delta_pp |
336
332
  | `tf.status_uptime(provider=, from_date=, to_date=)` | 1 credit | Uptime % per provider with incident days (degraded = half) |
337
- | `tf.history_compare(from_date=, to_date=, snapshot_type=)` | 1 credit | Diff two snapshots: added, removed, changed entries with deltas |
338
333
  | `tf.create_watch(spec=, callback_url=, secret=, fire_cap=)` | 1 credit | Register a webhook watch (price / status / digest) |
339
334
  | `tf.create_digest_watch(cadence=, callback_url=, secret=, fire_cap=)` | 1 credit | Convenience: scheduled daily/weekly digest of pricing changes |
340
335
  | `tf.list_watches()` | Free | List all active watches owned by the current token |
@@ -343,8 +338,7 @@ except TensorFeedError as e:
343
338
  | `tf.premium_agents_directory(category=, status=, sort=, limit=, ...)` | 1 credit | Enriched directory: status, news, traffic, pricing, trending_score per agent |
344
339
  | `tf.news_search(q=, from_date=, to_date=, provider=, category=, limit=)` | 1 credit | Full-text news search with date/provider filters, relevance scoring, recency boost |
345
340
  | `tf.cost_projection(models=, input_tokens_per_day=, output_tokens_per_day=, horizon=)` | 1 credit | Project workload cost across 1-10 models, 4 horizons, cheapest-monthly ranking |
346
- | `tf.forecast(target=, model=, field=, benchmark=, lookback=, horizon=)` | 1 credit | Linear-regression forecast for a price or benchmark series with 95% CI and confidence label |
347
- | `tf.provider_deepdive(provider)` | 1 credit | One provider's full profile: status + all models + benchmarks joined + news + traffic |
341
+ | `tf.provider_deepdive(provider)` | 5 credits | One provider's full profile: status + all models + benchmarks joined + news + traffic |
348
342
  | `tf.compare_models(ids=)` | 1 credit | Side-by-side compare of 2-5 models with normalized benchmarks + rankings |
349
343
  | `tf.whats_new(days=, news_limit=)` | 1 credit | Agent morning brief: pricing changes + incidents + top news from last 1-7 days |
350
344
 
@@ -182,7 +182,13 @@ class Formatters(unittest.TestCase):
182
182
  self.assertEqual(set(pt.DESCRIPTIONS), set(pt.FORMATTERS))
183
183
  self.assertEqual(set(pt.PREMIUM_TOOL_NAMES), set(pt.DESCRIPTIONS))
184
184
  for name, desc in pt.DESCRIPTIONS.items():
185
- self.assertIn("1 credit", desc, msg=name)
185
+ # Every tool description must state its real credit cost. Most are
186
+ # 1 credit; the Tier 3 endpoints (provider deep-dive, status
187
+ # leaderboard) are 5 credits.
188
+ self.assertTrue(
189
+ "1 credit" in desc or "5 credits" in desc,
190
+ msg=f"{name} description must state its credit cost (1 or 5)",
191
+ )
186
192
 
187
193
 
188
194
  class ClientIntegrationOffline(unittest.TestCase):
File without changes