@crossworks/voice-client 0.232.228 → 0.232.230
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/package.json +1 -1
- package/src/adapters/types.ts +11 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crossworks/voice-client",
|
|
3
|
-
"version": "0.232.
|
|
3
|
+
"version": "0.232.230",
|
|
4
4
|
"description": "Browser-safe surface of the voice/model layer — provider catalogue, model catalogs, audio tags, and the adapter type/metadata contract. Zero deps by design: nothing here may reach the network adapters or node builtins (the jackdaw-repo-split P0 boundary).",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./src/index.ts",
|
package/src/adapters/types.ts
CHANGED
|
@@ -203,6 +203,11 @@ export interface ChatResult {
|
|
|
203
203
|
* providers return `undefined` here; the trace falls back to
|
|
204
204
|
* `fallbackCostMicroUsd(model, ...)`. */
|
|
205
205
|
reportedCostUsd?: number;
|
|
206
|
+
/** The upstream provider that actually served the call, when a router
|
|
207
|
+
* reports it (OpenRouter: "Anthropic", "Amazon Bedrock", "Google", …).
|
|
208
|
+
* Each upstream keeps its own prompt cache, so a switch between them is a
|
|
209
|
+
* cache miss that no prompt change explains. Undefined when unknown. */
|
|
210
|
+
servedBy?: string;
|
|
206
211
|
/** Provider reasoning blocks from this turn (OpenRouter `reasoning_details`).
|
|
207
212
|
* When the model thought before answering, the tool-loop stores these on the
|
|
208
213
|
* assistant message it appends so the NEXT request can echo them back —
|
|
@@ -463,6 +468,12 @@ export interface ChatOptions {
|
|
|
463
468
|
/** Provider-neutral prompt-cache hints. See {@link ChatCacheControl}.
|
|
464
469
|
* Adapters that don't talk to a cache-aware provider ignore this. */
|
|
465
470
|
cacheControl?: ChatCacheControl;
|
|
471
|
+
/** A stable id for the conversation this call belongs to (≤256 chars).
|
|
472
|
+
* Routers use it as the cache-affinity key: OpenRouter's `session_id`
|
|
473
|
+
* (sticky routing: follow-up calls go back to the upstream holding the
|
|
474
|
+
* warm cache) and xAI's `x-grok-conv-id` (the same server). Adapters that
|
|
475
|
+
* have no such key ignore it. Never per-call: a new id per call defeats it. */
|
|
476
|
+
sessionId?: string;
|
|
466
477
|
/** Optional provider-specific overrides — adapter chooses what to honour.
|
|
467
478
|
* Used for things like xAI's `reasoning_effort` or HF's `:fastest`
|
|
468
479
|
* routing suffix. */
|