@bivelio/savings-layer 0.4.17 → 0.4.20

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.
@@ -14,7 +14,10 @@ convierte en coste. Tus prompts jamás salen de tu máquina hacia BiVelio — so
14
14
  cuentas y coste. Nunca corta el tráfico: sin clave o con la ingesta caída,
15
15
  reenvía y avisa.
16
16
 
17
- Hoy **mide**; no optimiza todavía. Y mide **todo el tráfico de inferencia**
17
+ Mide cada petición. Con licencia PRO aplica por defecto **una sola palanca**:
18
+ rebaja el TTL de escritura de caché mientras la sesión sigue caliente — cambia la
19
+ tarifa, nunca el contenido que lee el modelo. Las demás (modelo hermano, esfuerzo
20
+ por turno) van apagadas hasta que las enciendes. Y mide **todo el tráfico de inferencia**
18
21
  que el terminal enruta por el base URL — no «todo el tráfico»: cada guía dice
19
22
  lo que su terminal manda por fuera.
20
23
 
@@ -35,11 +35,21 @@ terminales a la vez):
35
35
 
36
36
  ```bash
37
37
  bvsala gateway # ventana 1: http://127.0.0.1:8402
38
- ANTHROPIC_BASE_URL=http://127.0.0.1:8402 claude # ventana 2 — SIN /v1
38
+ ENABLE_TOOL_SEARCH=true ANTHROPIC_BASE_URL=http://127.0.0.1:8402 claude # ventana 2 — SIN /v1
39
39
  ```
40
40
 
41
41
  Claude Code añade `/v1/messages` por su cuenta. Sin barra final.
42
42
 
43
+ **`ENABLE_TOOL_SEARCH=true` no es opcional.** Al ver un `ANTHROPIC_BASE_URL`
44
+ que no es el oficial, Claude Code apaga por defecto la búsqueda de herramientas
45
+ y mete TODAS las definiciones (las de tus servidores MCP incluidas) en el
46
+ prefijo cacheado de cada petición. Medido el 2026-09-09 en un montaje con 226
47
+ herramientas MCP: 450 KB por petición, el 66 % de los bytes y el 25 % de la
48
+ factura del día. El gateway reenvía la beta y los bloques `tool_reference`
49
+ intactos, así que la búsqueda funciona a través de él. `bvsala claude` la
50
+ activa solo; si ya tienes la variable fijada (`false`, `auto`, `auto:N`), se
51
+ respeta tu valor.
52
+
43
53
  ## Comprobar que funciona
44
54
 
45
55
  **Con `bvsala claude` (el envoltorio), la comprobación es tu dashboard**: el
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bivelio/savings-layer",
3
- "version": "0.4.17",
4
- "description": "BV-SALA — provider-neutral LLM execution optimizer. A decision layer in front of any LLM provider that cuts the cost of every request while preserving required quality, and reports the saving per call with token-level accounting you can check against your bill. Proprietary and confidential — property of BiVelio Inc.",
3
+ "version": "0.4.20",
4
+ "description": "The savings layer for your LLM bill: a library inside your code that lets through only what has to be paid for and returns a SavingsReport per call, measured with your provider's own meter and kept apart from estimates. Commercial license, paid per seat, commission only on measured savings. Your prompts never leave your infrastructure.",
5
5
  "keywords": [
6
6
  "llm",
7
7
  "cost-optimization",
@@ -11,10 +11,6 @@
11
11
  "bivelio"
12
12
  ],
13
13
  "homepage": "https://savings.bivelio.com",
14
- "repository": {
15
- "type": "git",
16
- "url": "https://savings.bivelio.com"
17
- },
18
14
  "bugs": {
19
15
  "email": "support@bivelio.com",
20
16
  "url": "https://savings.bivelio.com"
@@ -76,6 +72,7 @@
76
72
  "web:dev": "node apps/web/serve.mjs",
77
73
  "prepublishOnly": "pnpm run build",
78
74
  "ab:publish": "tsx benchmarks/publish.ts",
75
+ "verja:calibrar": "tsx corpus/calibrar-la-verja.ts",
79
76
  "corpus:arnes": "tsx corpus/arnes/informe.ts",
80
77
  "corpus:auditar": "tsx corpus/auditoria/auditar.ts",
81
78
  "sombra:corpus": "tsx benchmarks/sombra-corpus.ts",
@@ -85,7 +82,10 @@
85
82
  "anillo2:conciliar": "tsx benchmarks/anillo2/conciliar.ts",
86
83
  "anillo2:fugas": "zsh scripts/anillo2-vigia-fugas.zsh",
87
84
  "salida": "tsx --env-file-if-exists=.env.bench benchmarks/salida/arnes.ts",
88
- "salida:anatomia": "tsx benchmarks/salida/anatomia.ts"
85
+ "salida:anatomia": "tsx benchmarks/salida/anatomia.ts",
86
+ "salida:por-clase": "tsx benchmarks/salida/por-clase.ts",
87
+ "luz-verde": "bash scripts/luz-verde.sh",
88
+ "sonda:sdk": "BVSALA_DEV_OPEN=1 tsx --env-file-if-exists=.env.bench benchmarks/sdk/sonda.ts"
89
89
  },
90
90
  "devDependencies": {
91
91
  "@noble/curves": "^2.2.0",