@boldare/askdare 0.5.0 → 0.5.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @boldare/askdare
2
2
 
3
+ ## 0.5.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 1cbfce3: Token budgets now count input read from the prompt cache as a tenth of a token, close to what it costs. Before, `dailyTokens`, `dailyTokensPerIp` and `globalDailyTokens` charged it at full weight, so a long conversation ran out of the default per-IP budget after about 13 turns while costing cents. Everything else (other input, cache writes, output) still counts as whole tokens, and the estimate reserved before each model call is unchanged. `onUsage` still reports the raw token counts from OpenAI.
8
+
9
+ Budgets now last longer for conversations with a warm cache; the money ceiling in the cost guide still holds when you take 10 × the cached-input price into account. Nothing to change unless you sized your budgets for full-weight cached input.
10
+ - 5dbcb19: Answers no longer show the same citation marker twice in a row: `[1] [1]` and `[1][1]` become `[1]`, while streaming and in reloaded history. A Responses-compatible server that leaves out the optional usage details (`input_tokens_details`, `output_tokens_details`) no longer fails the turn; the missing counts are reported as 0.
11
+
12
+ ## 0.5.1
13
+
14
+ ### Patch Changes
15
+
16
+ - 87d0133: The `jose` dependency, which encrypts the resume token, is updated to 6.2.18.
17
+ - da8f8dc: Answers render more Markdown correctly: the bundled `marked` is updated to 18.2.1, with fixes for block quotes and lists with lazy lines, tabs, link destinations, bracket escapes in code spans, task-list markers and trailing blank lines in fenced code. `@boldare/askdare/react` grows by about 0.5 KB gzipped; its size budget is now 34 KB (ADR-0028).
18
+ - 5b84434: The `openai` dependency is updated to 7.62.0 (from 7.56.0). Nothing changes in how askdare calls the API.
19
+
3
20
  ## 0.5.0
4
21
 
5
22
  ### Minor Changes
package/dist/events.d.ts CHANGED
@@ -354,9 +354,15 @@ interface BotLimits {
354
354
  readonly maxSteps?: number;
355
355
  /** Server-side deadline for a whole turn. Keep it below your route's `maxDuration`. Default 120 s. */
356
356
  readonly turnTimeoutMs?: number;
357
- /** Input plus output tokens per UTC day across all visitors; then `budget_exceeded`. Default 2 000 000. */
357
+ /**
358
+ * Input plus output tokens per UTC day across all visitors; then `budget_exceeded`. Input read
359
+ * from the prompt cache counts as a tenth of a token. Default 2 000 000.
360
+ */
358
361
  readonly dailyTokens?: number;
359
- /** Input plus output tokens per client IP per UTC day. Default 200 000. */
362
+ /**
363
+ * Input plus output tokens per client IP per UTC day, with input read from the prompt cache
364
+ * counted as a tenth of a token. Default 200 000.
365
+ */
360
366
  readonly dailyTokensPerIp?: number;
361
367
  /** New sessions per client IP per hour (renewals by returning visitors count separately). Default 30. */
362
368
  readonly sessionsPerIpPerHour?: number;
package/dist/next.d.ts CHANGED
@@ -214,7 +214,10 @@ interface ChatHandlerLimitsOptions {
214
214
  readonly store?: RateLimitStore;
215
215
  /** How to read the client IP behind your proxy. Default `auto` (Vercel, otherwise one proxy). */
216
216
  readonly trustProxy?: TrustProxy;
217
- /** Input plus output tokens per UTC day across all bots. Unlimited by default. */
217
+ /**
218
+ * Input plus output tokens per UTC day across all bots, with input read from the prompt cache
219
+ * counted as a tenth of a token. Unlimited by default.
220
+ */
218
221
  readonly globalDailyTokens?: number;
219
222
  /**
220
223
  * Refuse to start without a shared `store`, instead of warning in production that limits are