conductor-remote 1.113.0 → 1.114.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/dist/index.html CHANGED
@@ -25,7 +25,7 @@
25
25
  <title>Conductor Remote</title>
26
26
  <!-- Runs before the module bundle so it can catch a stale shell that fails to boot. -->
27
27
  <script src="/self-heal.js"></script>
28
- <script type="module" crossorigin src="/assets/index-DDm_FLf-.js"></script>
28
+ <script type="module" crossorigin src="/assets/index-6mx-rmpo.js"></script>
29
29
  <link rel="stylesheet" crossorigin href="/assets/index-MmdttBBU.css">
30
30
  <link rel="manifest" href="/manifest.webmanifest"></head>
31
31
  <body>
package/dist/sw.js CHANGED
@@ -1 +1 @@
1
- if(!self.define){let e,s={};const i=(i,n)=>(i=new URL(i+".js",n).href,s[i]||new Promise(s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()}).then(()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e}));self.define=(n,r)=>{const l=e||("document"in self?document.currentScript.src:"")||location.href;if(s[l])return;let o={};const t=e=>i(e,l),a={module:{uri:l},exports:o,require:t};s[l]=Promise.all(n.map(e=>a[e]||t(e))).then(e=>(r(...e),o))}}define(["./workbox-dcde9eb3"],function(e){"use strict";importScripts("/push-sw.js"),self.addEventListener("message",e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()}),e.clientsClaim(),e.precacheAndRoute([{url:"self-heal.js",revision:"49bd63adb25a09341f8d2610e8bd3c76"},{url:"push-sw.js",revision:"e7ef44deca46c0539e6ff7bba5eb815e"},{url:"index.html",revision:"ea31ef7e6fc1c359645d9ce940db4e03"},{url:"assets/workbox-window.prod.es5-BBnX5xw4.js",revision:null},{url:"assets/pierre-shiki-wasm-C8ETeZem.js",revision:null},{url:"assets/pierre-light-480U9XYS.js",revision:null},{url:"assets/pierre-dark-CyvmCCZW.js",revision:null},{url:"assets/index-MmdttBBU.css",revision:null},{url:"assets/index-DDm_FLf-.js",revision:null},{url:"assets/PierrePatch-awVutyVW.js",revision:null},{url:"apple-touch-icon.png",revision:"1127bb396b4648add53dce3f22c92aee"},{url:"icon-192.png",revision:"c5e01ac58768627e18ee7b8b6a9239ef"},{url:"icon-512.png",revision:"a40638c55e310312457a621c9a0002c8"},{url:"icon-maskable-512.png",revision:"a9b0d962686287452216492cd2247499"},{url:"icon.svg",revision:"c1aee186821798733dd477e69a0ef243"},{url:"manifest.webmanifest",revision:"cf88fbc5755108a7fe0616fa160a8a15"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("/index.html"),{denylist:[/^\/api\//]})),e.registerRoute(({url:e})=>e.pathname.startsWith("/assets/diff-syntax/"),new e.CacheFirst({cacheName:"diff-syntax",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:31536e3})]}),"GET")});
1
+ if(!self.define){let e,s={};const i=(i,n)=>(i=new URL(i+".js",n).href,s[i]||new Promise(s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()}).then(()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e}));self.define=(n,r)=>{const l=e||("document"in self?document.currentScript.src:"")||location.href;if(s[l])return;let o={};const t=e=>i(e,l),a={module:{uri:l},exports:o,require:t};s[l]=Promise.all(n.map(e=>a[e]||t(e))).then(e=>(r(...e),o))}}define(["./workbox-dcde9eb3"],function(e){"use strict";importScripts("/push-sw.js"),self.addEventListener("message",e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()}),e.clientsClaim(),e.precacheAndRoute([{url:"self-heal.js",revision:"49bd63adb25a09341f8d2610e8bd3c76"},{url:"push-sw.js",revision:"e7ef44deca46c0539e6ff7bba5eb815e"},{url:"index.html",revision:"33ec766840b9ba6b36da40b0906cc885"},{url:"assets/workbox-window.prod.es5-BBnX5xw4.js",revision:null},{url:"assets/pierre-shiki-wasm-C8ETeZem.js",revision:null},{url:"assets/pierre-light-480U9XYS.js",revision:null},{url:"assets/pierre-dark-CyvmCCZW.js",revision:null},{url:"assets/index-MmdttBBU.css",revision:null},{url:"assets/index-6mx-rmpo.js",revision:null},{url:"assets/PierrePatch-BZ_MYB7X.js",revision:null},{url:"apple-touch-icon.png",revision:"1127bb396b4648add53dce3f22c92aee"},{url:"icon-192.png",revision:"c5e01ac58768627e18ee7b8b6a9239ef"},{url:"icon-512.png",revision:"a40638c55e310312457a621c9a0002c8"},{url:"icon-maskable-512.png",revision:"a9b0d962686287452216492cd2247499"},{url:"icon.svg",revision:"c1aee186821798733dd477e69a0ef243"},{url:"manifest.webmanifest",revision:"cf88fbc5755108a7fe0616fa160a8a15"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("/index.html"),{denylist:[/^\/api\//]})),e.registerRoute(({url:e})=>e.pathname.startsWith("/assets/diff-syntax/"),new e.CacheFirst({cacheName:"diff-syntax",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:31536e3})]}),"GET")});
@@ -28,9 +28,28 @@ export function buildAcceptBody(input) {
28
28
  ]
29
29
  };
30
30
  }
31
- /** USD estimate for the model whose rates are pinned in the design and documentation. */
31
+ // USD per million tokens: https://developers.openai.com/api/docs/models/gpt-realtime-2.1
32
+ // Mini remains configurable: https://developers.openai.com/api/docs/models/gpt-realtime-2.1-mini
33
+ const REALTIME_RATES = new Map([
34
+ [
35
+ 'gpt-realtime-2.1',
36
+ {
37
+ text: { input: 4, cached: 0.4, output: 24 },
38
+ audio: { input: 32, cached: 0.4, output: 64 }
39
+ }
40
+ ],
41
+ [
42
+ 'gpt-realtime-2.1-mini',
43
+ {
44
+ text: { input: 0.6, cached: 0.06, output: 2.4 },
45
+ audio: { input: 10, cached: 0.3, output: 20 }
46
+ }
47
+ ]
48
+ ]);
49
+ /** USD estimate from the configured model's published text and audio rates. */
32
50
  export function estimateRealtimeCost(model, usage) {
33
- if (model !== 'gpt-realtime-2.1-mini')
51
+ const rates = REALTIME_RATES.get(model);
52
+ if (!rates)
34
53
  return null;
35
54
  const input = usage.input_token_details ?? {};
36
55
  const output = usage.output_token_details ?? {};
@@ -38,12 +57,12 @@ export function estimateRealtimeCost(model, usage) {
38
57
  const cachedAudio = input.cached_tokens_details?.audio_tokens ?? 0;
39
58
  const uncachedText = Math.max(0, (input.text_tokens ?? 0) - cachedText);
40
59
  const uncachedAudio = Math.max(0, (input.audio_tokens ?? 0) - cachedAudio);
41
- return ((uncachedText * 0.6 +
42
- cachedText * 0.06 +
43
- uncachedAudio * 10 +
44
- cachedAudio * 0.3 +
45
- (output.text_tokens ?? 0) * 2.4 +
46
- (output.audio_tokens ?? 0) * 20) /
60
+ return ((uncachedText * rates.text.input +
61
+ cachedText * rates.text.cached +
62
+ uncachedAudio * rates.audio.input +
63
+ cachedAudio * rates.audio.cached +
64
+ (output.text_tokens ?? 0) * rates.text.output +
65
+ (output.audio_tokens ?? 0) * rates.audio.output) /
47
66
  1_000_000);
48
67
  }
49
68
  function defaultSocket(url, headers) {
@@ -29,7 +29,7 @@ const EMPTY = {
29
29
  pin: null,
30
30
  projectId: null,
31
31
  publicBaseUrl: null,
32
- model: 'gpt-realtime-2.1-mini',
32
+ model: 'gpt-realtime-2.1',
33
33
  voice: 'marin',
34
34
  sipHost: 'sip.api.openai.com'
35
35
  };
@@ -235,14 +235,20 @@ Search uses `GET /api/voice/search?q=…&limit=12&offset=0`, optionally with `ca
235
235
 
236
236
  ### Cost
237
237
 
238
- The default is `gpt-realtime-2.1-mini`. OpenAI currently publishes these per-million-token prices:
238
+ The default is `gpt-realtime-2.1`. Existing installations keep their saved model; switch them with:
239
+
240
+ ```bash
241
+ conductor-remote config set voice.model gpt-realtime-2.1
242
+ ```
243
+
244
+ This restarts the relay; start a new call to use the new model. OpenAI currently publishes these per-million-token prices for GPT-Realtime-2.1:
239
245
 
240
246
  | Modality | Input | Cached input | Output |
241
247
  | --- | ---: | ---: | ---: |
242
- | Text | $0.60 | $0.06 | $2.40 |
243
- | Audio | $10.00 | $0.30 | $20.00 |
248
+ | Text | $4.00 | $0.40 | $24.00 |
249
+ | Audio | $32.00 | $0.40 | $64.00 |
244
250
 
245
- The broker logs actual token usage and an estimate for every completed response. Use those lines for this workflow's real per-call cost; Twilio phone-number and PSTN charges are separate and depend on the account/country. The rate source is the [GPT-Realtime-2.1 Mini model page](https://developers.openai.com/api/docs/models/gpt-realtime-2.1-mini).
251
+ The broker logs actual token usage and an estimate for every completed response. Use those lines for this workflow's real per-call cost; Twilio phone-number and PSTN charges are separate and depend on the account/country. The rate source is the [GPT-Realtime-2.1 model page](https://developers.openai.com/api/docs/models/gpt-realtime-2.1). `gpt-realtime-2.1-mini` remains available through `voice.model`, with its own cost estimates using the [Mini model rates](https://developers.openai.com/api/docs/models/gpt-realtime-2.1-mini).
246
252
 
247
253
  ### Disable or rotate
248
254
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conductor-remote",
3
- "version": "1.113.0",
3
+ "version": "1.114.0",
4
4
  "type": "module",
5
5
  "packageManager": "yarn@4.15.0",
6
6
  "description": "Phone control panel for local Conductor agents. Reads ride SQLite + git; prompts ride Conductor's own dispatch path.",