@blockrun/llm 1.7.0 → 1.8.0

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
@@ -227,6 +227,7 @@ The classifier runs in <1ms, 100% locally, and routes to one of four tiers:
227
227
  ### Moonshot Kimi
228
228
  | Model | Input Price | Output Price |
229
229
  |-------|-------------|--------------|
230
+ | `moonshot/kimi-k2.6` | $0.95/M | $4.00/M |
230
231
  | `moonshot/kimi-k2.5` | $0.60/M | $3.00/M |
231
232
 
232
233
  ### MiniMax
@@ -254,7 +255,7 @@ All models below have been tested end-to-end via the TypeScript SDK (Feb 2026):
254
255
  | Google | `google/gemini-2.5-flash` | Passed |
255
256
  | DeepSeek | `deepseek/deepseek-chat` | Passed |
256
257
  | xAI | `xai/grok-3` | Passed |
257
- | Moonshot | `moonshot/kimi-k2.5` | Passed |
258
+ | Moonshot | `moonshot/kimi-k2.6` | Passed |
258
259
 
259
260
  ### Image Generation
260
261
  | Model | Price |
@@ -287,6 +288,70 @@ const r2 = await client.generate('the subject turns and smiles', {
287
288
  });
288
289
  ```
289
290
 
291
+ ### Standalone Search
292
+
293
+ `SearchClient` wraps `POST /v1/search` — standalone Grok Live Search.
294
+ Pricing: `$0.025/source + margin` (10 sources ≈ `$0.26`).
295
+
296
+ ```ts
297
+ import { SearchClient } from '@blockrun/llm';
298
+
299
+ const client = new SearchClient();
300
+ const result = await client.search('Latest news on x402 adoption', {
301
+ sources: ['x', 'web'],
302
+ maxResults: 10,
303
+ });
304
+ console.log(result.summary);
305
+ for (const url of result.citations ?? []) console.log(url);
306
+ ```
307
+
308
+ ### X/Twitter (AttentionVC)
309
+
310
+ `XClient` covers the full `/v1/x/*` endpoint family — previously the `X*`
311
+ types were exported but there was no client to call them with.
312
+
313
+ ```ts
314
+ import { XClient } from '@blockrun/llm';
315
+
316
+ const x = new XClient();
317
+ const info = await x.userInfo('elonmusk');
318
+ const followers = await x.followers('paulg');
319
+ const results = await x.search('x402 micropayments', { queryType: 'Latest' });
320
+ const tweets = await x.userTweets({ username: 'vitalikbuterin', includeReplies: false });
321
+ ```
322
+
323
+ Methods: `userLookup`, `userInfo`, `followers`, `following`, `followings`,
324
+ `verifiedFollowers`, `userTweets`, `mentions`, `tweetLookup`, `tweetReplies`,
325
+ `tweetThread`, `search`, `trending`, `articlesRising`.
326
+
327
+ ### Market Data (Pyth)
328
+
329
+ `PriceClient` wraps the Pyth-backed market-data endpoints. Crypto, FX and
330
+ commodity are fully free (price + history + list); 12 global stock markets
331
+ and the `usstock` legacy alias charge `$0.001` for price + history (list is
332
+ always free). Pass `requireWallet: false` to construct a free-only client.
333
+
334
+ ```ts
335
+ import { PriceClient } from '@blockrun/llm';
336
+
337
+ const p = new PriceClient({ requireWallet: false });
338
+ const btc = await p.price('crypto', 'BTC-USD');
339
+ const eur = await p.price('fx', 'EUR-USD');
340
+
341
+ // Paid — requires a wallet
342
+ const p2 = new PriceClient();
343
+ const aapl = await p2.price('stocks', 'AAPL', { market: 'us' });
344
+ const bars = await p2.history('stocks', 'AAPL', {
345
+ market: 'us',
346
+ resolution: 'D',
347
+ from: 1700000000,
348
+ to: 1710000000,
349
+ });
350
+ const symbols = await p.listSymbols('crypto', { query: 'sol', limit: 20 });
351
+ ```
352
+
353
+ Supported `StockMarket` values: `us, hk, jp, kr, gb, de, fr, nl, ie, lu, cn, ca`.
354
+
290
355
  ### Testnet Models (Base Sepolia)
291
356
  | Model | Price |
292
357
  |-------|-------|