@simonpeacocks/peacockery-voice-client 0.1.0 → 0.1.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/README.md CHANGED
@@ -2,14 +2,14 @@
2
2
 
3
3
  The request and response types in `src/schema.ts` are generated from the service's checked-in `openapi.json`. The small runtime wrapper uses `openapi-fetch` and accepts either the `lab` or `production` environment.
4
4
 
5
- Install it from the private repository:
5
+ Install it from npm:
6
6
 
7
7
  ```bash
8
- pnpm add '@chikingsley/peacockery-voice-client@github:chikingsley/peacockery-voice#main&path:/clients/typescript'
8
+ pnpm add @simonpeacocks/peacockery-voice-client
9
9
  ```
10
10
 
11
11
  ```ts
12
- import { createPeacockeryVoiceClient } from "@chikingsley/peacockery-voice-client";
12
+ import { createPeacockeryVoiceClient } from "@simonpeacocks/peacockery-voice-client";
13
13
 
14
14
  const voice = createPeacockeryVoiceClient({
15
15
  apiKey: process.env.PEACOCKERY_VOICE_API_KEY!,
package/dist/schema.d.ts CHANGED
@@ -1977,8 +1977,7 @@ export interface components {
1977
1977
  /** @enum {string} */
1978
1978
  kind: "language" | "transcription";
1979
1979
  provider: string;
1980
- /** @enum {string} */
1981
- reasoning_profile?: "low" | "medium" | "minimal" | "none";
1980
+ reasoning?: components["schemas"]["LanguageModelReasoningSpec"];
1982
1981
  routes?: {
1983
1982
  batch?: components["schemas"]["AsrRouteSpec"];
1984
1983
  realtime?: components["schemas"]["AsrRouteSpec"];
@@ -2003,6 +2002,11 @@ export interface components {
2003
2002
  source: "artificial-analysis";
2004
2003
  source_version: string;
2005
2004
  };
2005
+ LanguageModelReasoningSpec: {
2006
+ /** @enum {string} */
2007
+ default_effort: "none" | "minimal" | "low" | "medium" | "high" | "xhigh";
2008
+ supported_efforts: ("none" | "minimal" | "low" | "medium" | "high" | "xhigh")[];
2009
+ };
2006
2010
  AsrRouteSpec: {
2007
2011
  model: string;
2008
2012
  provider: string;
@@ -2193,17 +2197,28 @@ export interface components {
2193
2197
  [key: string]: unknown;
2194
2198
  };
2195
2199
  };
2200
+ /**
2201
+ * @deprecated
2202
+ * @description Accepted for client compatibility. Transcription jobs are always queued and returned immediately.
2203
+ */
2196
2204
  sync?: boolean;
2197
2205
  };
2198
2206
  TextResponse: {
2207
+ cache: components["schemas"]["TextCacheStatuses"];
2208
+ context: components["schemas"]["TextExecutionContext"];
2199
2209
  finishReason: string;
2200
2210
  model: string;
2201
2211
  provider: string;
2202
2212
  providerLatencyMs: number;
2203
2213
  upstreamModel: string;
2204
2214
  usage: {
2215
+ cacheReadTokens?: number;
2216
+ cacheWriteTokens?: number;
2205
2217
  inputTokens?: number;
2206
2218
  outputTokens?: number;
2219
+ providerCostUsd?: number;
2220
+ reasoningTokens?: number;
2221
+ textTokens?: number;
2207
2222
  totalTokens?: number;
2208
2223
  };
2209
2224
  warnings?: unknown[];
@@ -2213,14 +2228,21 @@ export interface components {
2213
2228
  /** @enum {string} */
2214
2229
  outputType: "object";
2215
2230
  } | {
2231
+ cache: components["schemas"]["TextCacheStatuses"];
2232
+ context: components["schemas"]["TextExecutionContext"];
2216
2233
  finishReason: string;
2217
2234
  model: string;
2218
2235
  provider: string;
2219
2236
  providerLatencyMs: number;
2220
2237
  upstreamModel: string;
2221
2238
  usage: {
2239
+ cacheReadTokens?: number;
2240
+ cacheWriteTokens?: number;
2222
2241
  inputTokens?: number;
2223
2242
  outputTokens?: number;
2243
+ providerCostUsd?: number;
2244
+ reasoningTokens?: number;
2245
+ textTokens?: number;
2224
2246
  totalTokens?: number;
2225
2247
  };
2226
2248
  warnings?: unknown[];
@@ -2228,7 +2250,17 @@ export interface components {
2228
2250
  outputType: "text";
2229
2251
  text: string;
2230
2252
  };
2253
+ TextCacheStatuses: {
2254
+ cloudflare?: string;
2255
+ openRouter?: string;
2256
+ };
2257
+ TextExecutionContext: {
2258
+ conversationId?: string;
2259
+ requestId: string;
2260
+ turnId: string;
2261
+ };
2231
2262
  TextRequest: {
2263
+ context?: components["schemas"]["TextRequestContext"];
2232
2264
  maxOutputTokens?: number;
2233
2265
  messages: components["schemas"]["TextMessage"][];
2234
2266
  model: string;
@@ -2244,20 +2276,39 @@ export interface components {
2244
2276
  providerOptions?: {
2245
2277
  [key: string]: unknown;
2246
2278
  };
2279
+ reasoning?: components["schemas"]["TextReasoningRequest"];
2280
+ routing?: components["schemas"]["TextRoutingRequest"];
2247
2281
  temperature?: number;
2248
2282
  };
2283
+ TextRequestContext: {
2284
+ conversationId?: string;
2285
+ turnId?: string;
2286
+ };
2249
2287
  TextMessage: {
2250
2288
  content: string;
2251
2289
  /** @enum {string} */
2252
2290
  role: "assistant" | "system" | "user";
2253
2291
  };
2292
+ TextReasoningRequest: {
2293
+ /** @enum {string} */
2294
+ effort: "none" | "minimal" | "low" | "medium" | "high" | "xhigh";
2295
+ };
2296
+ TextRoutingRequest: {
2297
+ attemptTimeoutMs?: number;
2298
+ fallbackModels?: string[];
2299
+ /** @enum {string} */
2300
+ transport?: "gateway" | "direct";
2301
+ };
2254
2302
  TextStreamRequest: {
2303
+ context?: components["schemas"]["TextRequestContext"];
2255
2304
  maxOutputTokens?: number;
2256
2305
  messages: components["schemas"]["TextMessage"][];
2257
2306
  model: string;
2258
2307
  providerOptions?: {
2259
2308
  [key: string]: unknown;
2260
2309
  };
2310
+ reasoning?: components["schemas"]["TextReasoningRequest"];
2311
+ routing?: components["schemas"]["TextRoutingRequest"];
2261
2312
  temperature?: number;
2262
2313
  };
2263
2314
  RealtimeSessionResult: {
@@ -2294,6 +2345,8 @@ export interface components {
2294
2345
  UsageDailyRow: {
2295
2346
  account_key: string;
2296
2347
  asr_seconds: number;
2348
+ cache_read_tokens: number;
2349
+ cache_write_tokens: number;
2297
2350
  day: string;
2298
2351
  estimated_cost_complete: boolean;
2299
2352
  /** @description Estimated provider cost in millionths of one US dollar. This is not an invoice amount. */
@@ -2306,6 +2359,9 @@ export interface components {
2306
2359
  model: string;
2307
2360
  output_tokens: number;
2308
2361
  provider: string;
2362
+ provider_cost_micro_usd: number;
2363
+ provider_cost_request_count: number;
2364
+ provider_cost_usd: number;
2309
2365
  provider_latency_ms: number;
2310
2366
  request_count: number;
2311
2367
  total_tokens: number;
@@ -2315,6 +2371,8 @@ export interface components {
2315
2371
  };
2316
2372
  UsageTotals: {
2317
2373
  asr_seconds: number;
2374
+ cache_read_tokens: number;
2375
+ cache_write_tokens: number;
2318
2376
  /** @description True only when every included request has both measured usage and a matching price. */
2319
2377
  estimated_cost_complete: boolean;
2320
2378
  /** @description Estimated provider cost in millionths of one US dollar. This is not an invoice amount. */
@@ -2324,6 +2382,9 @@ export interface components {
2324
2382
  estimated_cost_usd: number;
2325
2383
  input_tokens: number;
2326
2384
  output_tokens: number;
2385
+ provider_cost_micro_usd: number;
2386
+ provider_cost_request_count: number;
2387
+ provider_cost_usd: number;
2327
2388
  provider_latency_ms: number;
2328
2389
  request_count: number;
2329
2390
  total_tokens: number;
@@ -2334,6 +2395,10 @@ export interface components {
2334
2395
  recent_request_logs: {
2335
2396
  account_key: string;
2336
2397
  asr_seconds: number | null;
2398
+ cache_read_tokens: number | null;
2399
+ cache_write_tokens: number | null;
2400
+ cloudflare_cache_status: string | null;
2401
+ conversation_id: string | null;
2337
2402
  created_at: string;
2338
2403
  error: string | null;
2339
2404
  /** @description Estimated provider cost in millionths of one US dollar. This is not an invoice amount. */
@@ -2347,6 +2412,7 @@ export interface components {
2347
2412
  /** @enum {string} */
2348
2413
  kind: "asr" | "llm" | "realtime_asr";
2349
2414
  model: string;
2415
+ openrouter_cache_status: string | null;
2350
2416
  output_tokens: number | null;
2351
2417
  price_basis: string | null;
2352
2418
  price_effective_at: string | null;
@@ -2356,10 +2422,13 @@ export interface components {
2356
2422
  /** @enum {string|null} */
2357
2423
  price_unit: "audio_second" | "token" | null;
2358
2424
  provider: string;
2425
+ provider_cost_micro_usd: number | null;
2426
+ provider_cost_usd: number | null;
2359
2427
  provider_latency_ms: number | null;
2360
2428
  route: string | null;
2361
2429
  status: number | null;
2362
2430
  total_tokens: number | null;
2431
+ turn_id: string | null;
2363
2432
  upstream_model: string | null;
2364
2433
  }[];
2365
2434
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simonpeacocks/peacockery-voice-client",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Generated TypeScript client for the Peacockery Voice API",
5
5
  "type": "module",
6
6
  "license": "MIT",