@askalf/dario 6.10.3 → 6.10.4

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.
@@ -243,6 +243,10 @@ export declare function providerOfModel(model: string): PricingProvider;
243
243
  * at the sonnet fallback until the ledger's first live run caught it).
244
244
  * Unknown Claude models fall back to the sonnet-4-6 rate, unknown OpenAI
245
245
  * models to gpt-5.6-terra's. Exported for tests.
246
+ *
247
+ * The tag's body excludes `[` as well as `]`: `model` is the client's raw
248
+ * body.model on the key-budget reservation path, and `[^\]]*` let a string of
249
+ * repeated `[` backtrack quadratically (200k of them held the event loop ~25s).
246
250
  */
247
251
  export declare function pricingRateFor(model: string, atMs: number): Rate;
248
252
  /**
package/dist/analytics.js CHANGED
@@ -277,9 +277,13 @@ export function providerOfModel(model) {
277
277
  * at the sonnet fallback until the ledger's first live run caught it).
278
278
  * Unknown Claude models fall back to the sonnet-4-6 rate, unknown OpenAI
279
279
  * models to gpt-5.6-terra's. Exported for tests.
280
+ *
281
+ * The tag's body excludes `[` as well as `]`: `model` is the client's raw
282
+ * body.model on the key-budget reservation path, and `[^\]]*` let a string of
283
+ * repeated `[` backtrack quadratically (200k of them held the event loop ~25s).
280
284
  */
281
285
  export function pricingRateFor(model, atMs) {
282
- const baseModel = model.replace(/\[[^\]]*\]$/, '').replace(/:[a-z]+$/i, '').replace(/-\d{8}$/, '');
286
+ const baseModel = model.replace(/\[[^[\]]*\]$/, '').replace(/:[a-z]+$/i, '').replace(/-\d{8}$/, '');
283
287
  if (providerOfModel(baseModel) === 'openai') {
284
288
  const rate = OPENAI_PRICING[baseModel] ?? OPENAI_PRICING[OPENAI_FALLBACK_MODEL];
285
289
  return { ...rate };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@askalf/dario",
3
- "version": "6.10.3",
3
+ "version": "6.10.4",
4
4
  "description": "Use your Claude and ChatGPT subscriptions in Cursor, Cline, Aider, Claude Code and the Agent SDK — at subscription pricing, not per-token API bills. One local Anthropic + OpenAI-compatible endpoint: either plan answers either wire shape, with automatic failover when one hits its limit.",
5
5
  "type": "module",
6
6
  "bin": {