notdiamond 2.0.0-rc1 → 2.0.0-rc2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.0.0-rc2 (2025-10-31)
4
+
5
+ Full Changelog: [v2.0.0-rc1...v2.0.0-rc2](https://github.com/Not-Diamond/not-diamond-typescript/compare/v2.0.0-rc1...v2.0.0-rc2)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([137fd6a](https://github.com/Not-Diamond/not-diamond-typescript/commit/137fd6ae915e6394e13e8d4416bf8d7441246606))
10
+
3
11
  ## 2.0.0-rc1 (2025-10-31)
4
12
 
5
13
  Full Changelog: [v0.3.0...v2.0.0-rc1](https://github.com/Not-Diamond/not-diamond-typescript/compare/v0.3.0...v2.0.0-rc1)
package/README.md CHANGED
@@ -30,7 +30,7 @@ const client = new NotDiamond({
30
30
  const response = await client.routing.selectModel({
31
31
  llm_providers: [
32
32
  { model: 'gpt-4o', provider: 'openai' },
33
- { model: 'claude-3-5-sonnet-20241022', provider: 'anthropic' },
33
+ { model: 'claude-sonnet-4-5-20250929', provider: 'anthropic' },
34
34
  { model: 'gemini-1.5-pro', provider: 'google' },
35
35
  ],
36
36
  messages: [
@@ -58,7 +58,7 @@ const client = new NotDiamond({
58
58
  const params: NotDiamond.RoutingSelectModelParams = {
59
59
  llm_providers: [
60
60
  { model: 'gpt-4o', provider: 'openai' },
61
- { model: 'claude-3-5-sonnet-20241022', provider: 'anthropic' },
61
+ { model: 'claude-sonnet-4-5-20250929', provider: 'anthropic' },
62
62
  { model: 'gemini-1.5-pro', provider: 'google' },
63
63
  ],
64
64
  messages: [
@@ -152,7 +152,7 @@ const response = await client.routing
152
152
  .selectModel({
153
153
  llm_providers: [
154
154
  { model: 'gpt-4o', provider: 'openai' },
155
- { model: 'claude-3-5-sonnet-20241022', provider: 'anthropic' },
155
+ { model: 'claude-sonnet-4-5-20250929', provider: 'anthropic' },
156
156
  { model: 'gemini-1.5-pro', provider: 'google' },
157
157
  ],
158
158
  messages: [
@@ -200,7 +200,7 @@ const client = new NotDiamond({
200
200
  });
201
201
 
202
202
  // Or, configure per-request:
203
- await client.routing.selectModel({ llm_providers: [{ model: 'gpt-4o', provider: 'openai' }, { model: 'claude-3-5-sonnet-20241022', provider: 'anthropic' }, { model: 'gemini-1.5-pro', provider: 'google' }], messages: [{ role: 'system', content: 'You are a helpful assistant.' }, { role: 'user', content: 'Explain quantum computing in simple terms' }] }, {
203
+ await client.routing.selectModel({ llm_providers: [{ model: 'gpt-4o', provider: 'openai' }, { model: 'claude-sonnet-4-5-20250929', provider: 'anthropic' }, { model: 'gemini-1.5-pro', provider: 'google' }], messages: [{ role: 'system', content: 'You are a helpful assistant.' }, { role: 'user', content: 'Explain quantum computing in simple terms' }] }, {
204
204
  maxRetries: 5,
205
205
  });
206
206
  ```
@@ -217,7 +217,7 @@ const client = new NotDiamond({
217
217
  });
218
218
 
219
219
  // Override per-request:
220
- await client.routing.selectModel({ llm_providers: [{ model: 'gpt-4o', provider: 'openai' }, { model: 'claude-3-5-sonnet-20241022', provider: 'anthropic' }, { model: 'gemini-1.5-pro', provider: 'google' }], messages: [{ role: 'system', content: 'You are a helpful assistant.' }, { role: 'user', content: 'Explain quantum computing in simple terms' }] }, {
220
+ await client.routing.selectModel({ llm_providers: [{ model: 'gpt-4o', provider: 'openai' }, { model: 'claude-sonnet-4-5-20250929', provider: 'anthropic' }, { model: 'gemini-1.5-pro', provider: 'google' }], messages: [{ role: 'system', content: 'You are a helpful assistant.' }, { role: 'user', content: 'Explain quantum computing in simple terms' }] }, {
221
221
  timeout: 5 * 1000,
222
222
  });
223
223
  ```
@@ -244,7 +244,7 @@ const response = await client.routing
244
244
  .selectModel({
245
245
  llm_providers: [
246
246
  { model: 'gpt-4o', provider: 'openai' },
247
- { model: 'claude-3-5-sonnet-20241022', provider: 'anthropic' },
247
+ { model: 'claude-sonnet-4-5-20250929', provider: 'anthropic' },
248
248
  { model: 'gemini-1.5-pro', provider: 'google' },
249
249
  ],
250
250
  messages: [
@@ -260,7 +260,7 @@ const { data: response, response: raw } = await client.routing
260
260
  .selectModel({
261
261
  llm_providers: [
262
262
  { model: 'gpt-4o', provider: 'openai' },
263
- { model: 'claude-3-5-sonnet-20241022', provider: 'anthropic' },
263
+ { model: 'claude-sonnet-4-5-20250929', provider: 'anthropic' },
264
264
  { model: 'gemini-1.5-pro', provider: 'google' },
265
265
  ],
266
266
  messages: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "notdiamond",
3
- "version": "2.0.0-rc1",
3
+ "version": "2.0.0-rc2",
4
4
  "description": "The official TypeScript library for the Not Diamond API",
5
5
  "author": "Not Diamond <d6@notdiamond.ai>",
6
6
  "types": "./index.d.ts",
@@ -72,14 +72,14 @@ export declare class PromptAdaptation extends APIResource {
72
72
  * ```ts
73
73
  * const response = await client.promptAdaptation.adapt({
74
74
  * fields: ['question'],
75
- * origin_model: { provider: 'openai', model: 'gpt-4o' },
76
75
  * system_prompt: 'You are a helpful assistant that answers questions accurately.',
77
76
  * target_models: [
78
- * { provider: 'anthropic', model: 'claude-3-5-sonnet-20241022' },
77
+ * { provider: 'anthropic', model: 'claude-sonnet-4-5-20250929' },
79
78
  * { provider: 'google', model: 'gemini-1.5-pro' },
80
79
  * ],
81
80
  * template: 'Question: {question}\nAnswer:',
82
81
  * evaluation_metric: 'LLMaaJ:Sem_Sim_3',
82
+ * origin_model: { provider: 'openai', model: 'gpt-4o' },
83
83
  * test_goldens: [
84
84
  * {
85
85
  * fields: { ... },
@@ -278,10 +278,6 @@ export interface AdaptationRunResults {
278
278
  * Overall status of the adaptation run
279
279
  */
280
280
  job_status: JobStatus;
281
- /**
282
- * Results for the origin model (baseline performance)
283
- */
284
- origin_model: AdaptationRunResults.OriginModel;
285
281
  /**
286
282
  * Results for each target model with optimized prompts
287
283
  */
@@ -292,22 +288,18 @@ export interface AdaptationRunResults {
292
288
  updated_at: string | null;
293
289
  evaluation_config?: string | null;
294
290
  evaluation_metric?: string | null;
295
- }
296
- export declare namespace AdaptationRunResults {
291
+ /**
292
+ * Metrics for the LLM requests made during the adaptation run
293
+ */
294
+ llm_request_metrics?: {
295
+ [key: string]: number;
296
+ };
297
297
  /**
298
298
  * Results for the origin model (baseline performance)
299
299
  */
300
- interface OriginModel {
301
- cost: number | null;
302
- evals: {
303
- [key: string]: unknown;
304
- } | null;
305
- model_name: string;
306
- result_status: PromptAdaptationAPI.JobStatus | null;
307
- score: number | null;
308
- system_prompt: string | null;
309
- user_message_template: string | null;
310
- }
300
+ origin_model?: AdaptationRunResults.OriginModel | null;
301
+ }
302
+ export declare namespace AdaptationRunResults {
311
303
  /**
312
304
  * Results for a single target model adaptation.
313
305
  */
@@ -330,6 +322,7 @@ export declare namespace AdaptationRunResults {
330
322
  * Optimized system prompt for this target model
331
323
  */
332
324
  system_prompt: string | null;
325
+ task_type: string | null;
333
326
  /**
334
327
  * Optimized user message template for this target model
335
328
  */
@@ -339,6 +332,20 @@ export declare namespace AdaptationRunResults {
339
332
  */
340
333
  user_message_template_fields: Array<string> | null;
341
334
  }
335
+ /**
336
+ * Results for the origin model (baseline performance)
337
+ */
338
+ interface OriginModel {
339
+ cost: number | null;
340
+ evals: {
341
+ [key: string]: unknown;
342
+ } | null;
343
+ model_name: string | null;
344
+ result_status: PromptAdaptationAPI.JobStatus | null;
345
+ score: number | null;
346
+ system_prompt: string | null;
347
+ user_message_template: string | null;
348
+ }
342
349
  }
343
350
  export type JobStatus = 'created' | 'queued' | 'processing' | 'completed' | 'failed';
344
351
  /**
@@ -397,10 +404,6 @@ export interface PromptAdaptationAdaptParams {
397
404
  * in golden records
398
405
  */
399
406
  fields: Array<string>;
400
- /**
401
- * The model your current prompt is optimized for
402
- */
403
- origin_model: PromptAdaptationAdaptParams.OriginModel;
404
407
  /**
405
408
  * System prompt to use with the origin model. This sets the context and role for
406
409
  * the LLM
@@ -423,6 +426,10 @@ export interface PromptAdaptationAdaptParams {
423
426
  * better control
424
427
  */
425
428
  goldens?: Array<PromptAdaptationAdaptParams.Golden> | null;
429
+ /**
430
+ * Model for specifying an LLM provider in API requests.
431
+ */
432
+ origin_model?: PromptAdaptationAdaptParams.OriginModel | null;
426
433
  /**
427
434
  * Optional baseline score for the origin model
428
435
  */
@@ -438,11 +445,11 @@ export interface PromptAdaptationAdaptParams {
438
445
  }
439
446
  export declare namespace PromptAdaptationAdaptParams {
440
447
  /**
441
- * The model your current prompt is optimized for
448
+ * Model for specifying an LLM provider in API requests.
442
449
  */
443
- interface OriginModel {
450
+ interface TargetModel {
444
451
  /**
445
- * Model name (e.g., 'gpt-4o', 'claude-3-5-sonnet-20241022')
452
+ * Model name (e.g., 'gpt-4o', 'claude-sonnet-4-5-20250929')
446
453
  */
447
454
  model: string;
448
455
  /**
@@ -470,12 +477,29 @@ export declare namespace PromptAdaptationAdaptParams {
470
477
  */
471
478
  output_price?: number | null;
472
479
  }
480
+ /**
481
+ * A training or test example for prompt adaptation.
482
+ */
483
+ interface Golden {
484
+ /**
485
+ * Dictionary mapping field names to their values. Keys must match the fields
486
+ * specified in the template
487
+ */
488
+ fields: {
489
+ [key: string]: string;
490
+ };
491
+ /**
492
+ * Expected answer for supervised evaluation. Required for supervised metrics,
493
+ * optional for unsupervised
494
+ */
495
+ answer?: string | null;
496
+ }
473
497
  /**
474
498
  * Model for specifying an LLM provider in API requests.
475
499
  */
476
- interface TargetModel {
500
+ interface OriginModel {
477
501
  /**
478
- * Model name (e.g., 'gpt-4o', 'claude-3-5-sonnet-20241022')
502
+ * Model name (e.g., 'gpt-4o', 'claude-sonnet-4-5-20250929')
479
503
  */
480
504
  model: string;
481
505
  /**
@@ -503,23 +527,6 @@ export declare namespace PromptAdaptationAdaptParams {
503
527
  */
504
528
  output_price?: number | null;
505
529
  }
506
- /**
507
- * A training or test example for prompt adaptation.
508
- */
509
- interface Golden {
510
- /**
511
- * Dictionary mapping field names to their values. Keys must match the fields
512
- * specified in the template
513
- */
514
- fields: {
515
- [key: string]: string;
516
- };
517
- /**
518
- * Expected answer for supervised evaluation. Required for supervised metrics,
519
- * optional for unsupervised
520
- */
521
- answer?: string | null;
522
- }
523
530
  /**
524
531
  * A training or test example for prompt adaptation.
525
532
  */
@@ -1 +1 @@
1
- {"version":3,"file":"prompt-adaptation.d.mts","sourceRoot":"","sources":["../src/resources/prompt-adaptation.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,mBAAmB;OACxB,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+GG;IACH,KAAK,CACH,IAAI,EAAE,2BAA2B,EACjC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,6BAA6B,CAAC;IAI5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiEG;IACH,eAAe,CAAC,eAAe,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,oBAAoB,CAAC;IAIpG;;;;;;;;;;;OAWG;IACH,kBAAkB,CAChB,eAAe,EAAE,MAAM,EACvB,MAAM,EAAE,wCAAwC,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,oBAAoB,CAAC;IAQnC;;;;;;;;;;OAUG;IACH,YAAY,CACV,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,kCAAkC,EAC1C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,oCAAoC,CAAC;IAQnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuCG;IACH,cAA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,kCAAkC,IAAI,kCAAkC,GAC9E,CAAC;CACH"}
@@ -72,14 +72,14 @@ export declare class PromptAdaptation extends APIResource {
72
72
  * ```ts
73
73
  * const response = await client.promptAdaptation.adapt({
74
74
  * fields: ['question'],
75
- * origin_model: { provider: 'openai', model: 'gpt-4o' },
76
75
  * system_prompt: 'You are a helpful assistant that answers questions accurately.',
77
76
  * target_models: [
78
- * { provider: 'anthropic', model: 'claude-3-5-sonnet-20241022' },
77
+ * { provider: 'anthropic', model: 'claude-sonnet-4-5-20250929' },
79
78
  * { provider: 'google', model: 'gemini-1.5-pro' },
80
79
  * ],
81
80
  * template: 'Question: {question}\nAnswer:',
82
81
  * evaluation_metric: 'LLMaaJ:Sem_Sim_3',
82
+ * origin_model: { provider: 'openai', model: 'gpt-4o' },
83
83
  * test_goldens: [
84
84
  * {
85
85
  * fields: { ... },
@@ -278,10 +278,6 @@ export interface AdaptationRunResults {
278
278
  * Overall status of the adaptation run
279
279
  */
280
280
  job_status: JobStatus;
281
- /**
282
- * Results for the origin model (baseline performance)
283
- */
284
- origin_model: AdaptationRunResults.OriginModel;
285
281
  /**
286
282
  * Results for each target model with optimized prompts
287
283
  */
@@ -292,22 +288,18 @@ export interface AdaptationRunResults {
292
288
  updated_at: string | null;
293
289
  evaluation_config?: string | null;
294
290
  evaluation_metric?: string | null;
295
- }
296
- export declare namespace AdaptationRunResults {
291
+ /**
292
+ * Metrics for the LLM requests made during the adaptation run
293
+ */
294
+ llm_request_metrics?: {
295
+ [key: string]: number;
296
+ };
297
297
  /**
298
298
  * Results for the origin model (baseline performance)
299
299
  */
300
- interface OriginModel {
301
- cost: number | null;
302
- evals: {
303
- [key: string]: unknown;
304
- } | null;
305
- model_name: string;
306
- result_status: PromptAdaptationAPI.JobStatus | null;
307
- score: number | null;
308
- system_prompt: string | null;
309
- user_message_template: string | null;
310
- }
300
+ origin_model?: AdaptationRunResults.OriginModel | null;
301
+ }
302
+ export declare namespace AdaptationRunResults {
311
303
  /**
312
304
  * Results for a single target model adaptation.
313
305
  */
@@ -330,6 +322,7 @@ export declare namespace AdaptationRunResults {
330
322
  * Optimized system prompt for this target model
331
323
  */
332
324
  system_prompt: string | null;
325
+ task_type: string | null;
333
326
  /**
334
327
  * Optimized user message template for this target model
335
328
  */
@@ -339,6 +332,20 @@ export declare namespace AdaptationRunResults {
339
332
  */
340
333
  user_message_template_fields: Array<string> | null;
341
334
  }
335
+ /**
336
+ * Results for the origin model (baseline performance)
337
+ */
338
+ interface OriginModel {
339
+ cost: number | null;
340
+ evals: {
341
+ [key: string]: unknown;
342
+ } | null;
343
+ model_name: string | null;
344
+ result_status: PromptAdaptationAPI.JobStatus | null;
345
+ score: number | null;
346
+ system_prompt: string | null;
347
+ user_message_template: string | null;
348
+ }
342
349
  }
343
350
  export type JobStatus = 'created' | 'queued' | 'processing' | 'completed' | 'failed';
344
351
  /**
@@ -397,10 +404,6 @@ export interface PromptAdaptationAdaptParams {
397
404
  * in golden records
398
405
  */
399
406
  fields: Array<string>;
400
- /**
401
- * The model your current prompt is optimized for
402
- */
403
- origin_model: PromptAdaptationAdaptParams.OriginModel;
404
407
  /**
405
408
  * System prompt to use with the origin model. This sets the context and role for
406
409
  * the LLM
@@ -423,6 +426,10 @@ export interface PromptAdaptationAdaptParams {
423
426
  * better control
424
427
  */
425
428
  goldens?: Array<PromptAdaptationAdaptParams.Golden> | null;
429
+ /**
430
+ * Model for specifying an LLM provider in API requests.
431
+ */
432
+ origin_model?: PromptAdaptationAdaptParams.OriginModel | null;
426
433
  /**
427
434
  * Optional baseline score for the origin model
428
435
  */
@@ -438,11 +445,11 @@ export interface PromptAdaptationAdaptParams {
438
445
  }
439
446
  export declare namespace PromptAdaptationAdaptParams {
440
447
  /**
441
- * The model your current prompt is optimized for
448
+ * Model for specifying an LLM provider in API requests.
442
449
  */
443
- interface OriginModel {
450
+ interface TargetModel {
444
451
  /**
445
- * Model name (e.g., 'gpt-4o', 'claude-3-5-sonnet-20241022')
452
+ * Model name (e.g., 'gpt-4o', 'claude-sonnet-4-5-20250929')
446
453
  */
447
454
  model: string;
448
455
  /**
@@ -470,12 +477,29 @@ export declare namespace PromptAdaptationAdaptParams {
470
477
  */
471
478
  output_price?: number | null;
472
479
  }
480
+ /**
481
+ * A training or test example for prompt adaptation.
482
+ */
483
+ interface Golden {
484
+ /**
485
+ * Dictionary mapping field names to their values. Keys must match the fields
486
+ * specified in the template
487
+ */
488
+ fields: {
489
+ [key: string]: string;
490
+ };
491
+ /**
492
+ * Expected answer for supervised evaluation. Required for supervised metrics,
493
+ * optional for unsupervised
494
+ */
495
+ answer?: string | null;
496
+ }
473
497
  /**
474
498
  * Model for specifying an LLM provider in API requests.
475
499
  */
476
- interface TargetModel {
500
+ interface OriginModel {
477
501
  /**
478
- * Model name (e.g., 'gpt-4o', 'claude-3-5-sonnet-20241022')
502
+ * Model name (e.g., 'gpt-4o', 'claude-sonnet-4-5-20250929')
479
503
  */
480
504
  model: string;
481
505
  /**
@@ -503,23 +527,6 @@ export declare namespace PromptAdaptationAdaptParams {
503
527
  */
504
528
  output_price?: number | null;
505
529
  }
506
- /**
507
- * A training or test example for prompt adaptation.
508
- */
509
- interface Golden {
510
- /**
511
- * Dictionary mapping field names to their values. Keys must match the fields
512
- * specified in the template
513
- */
514
- fields: {
515
- [key: string]: string;
516
- };
517
- /**
518
- * Expected answer for supervised evaluation. Required for supervised metrics,
519
- * optional for unsupervised
520
- */
521
- answer?: string | null;
522
- }
523
530
  /**
524
531
  * A training or test example for prompt adaptation.
525
532
  */
@@ -1 +1 @@
1
- {"version":3,"file":"prompt-adaptation.d.ts","sourceRoot":"","sources":["../src/resources/prompt-adaptation.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,mBAAmB;OACxB,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AG,IAAI,CAAC;KACxB;IAED;;OAEG;IACH,UAAiB,WAAW;QAC1B;;;WAGG;QACH,MAAM,EAAE;YAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;SAAE,CAAC;QAElC;;;WAGG;QACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KACxB;CACF;AAED,MAAM,WAAW,wCAAwC;IACvD;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,kCAAkC;IACjD,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,CAAC,OAAO,WAAW,gBAAgB,CAAC;IACxC,OAAO,EACL,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,SAAS,IAAI,SAAS,EAC3B,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,oCAAoC,IAAI,oCAAoC,EACjF,KAAK,sCAAsC,IAAI,sCAAsC,EACrF,KAAK,qCAAqC,IAAI,qCAAqC,EACnF,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,wCAAwC,IAAI,wCAAwC,EACzF,KAAK,kCAAkC,IAAI,kCAAkC,GAC9E,CAAC;CACH"}
@@ -75,14 +75,14 @@ class PromptAdaptation extends resource_1.APIResource {
75
75
  * ```ts
76
76
  * const response = await client.promptAdaptation.adapt({
77
77
  * fields: ['question'],
78
- * origin_model: { provider: 'openai', model: 'gpt-4o' },
79
78
  * system_prompt: 'You are a helpful assistant that answers questions accurately.',
80
79
  * target_models: [
81
- * { provider: 'anthropic', model: 'claude-3-5-sonnet-20241022' },
80
+ * { provider: 'anthropic', model: 'claude-sonnet-4-5-20250929' },
82
81
  * { provider: 'google', model: 'gemini-1.5-pro' },
83
82
  * ],
84
83
  * template: 'Question: {question}\nAnswer:',
85
84
  * evaluation_metric: 'LLMaaJ:Sem_Sim_3',
85
+ * origin_model: { provider: 'openai', model: 'gpt-4o' },
86
86
  * test_goldens: [
87
87
  * {
88
88
  * fields: { ... },
@@ -72,14 +72,14 @@ export class PromptAdaptation extends APIResource {
72
72
  * ```ts
73
73
  * const response = await client.promptAdaptation.adapt({
74
74
  * fields: ['question'],
75
- * origin_model: { provider: 'openai', model: 'gpt-4o' },
76
75
  * system_prompt: 'You are a helpful assistant that answers questions accurately.',
77
76
  * target_models: [
78
- * { provider: 'anthropic', model: 'claude-3-5-sonnet-20241022' },
77
+ * { provider: 'anthropic', model: 'claude-sonnet-4-5-20250929' },
79
78
  * { provider: 'google', model: 'gemini-1.5-pro' },
80
79
  * ],
81
80
  * template: 'Question: {question}\nAnswer:',
82
81
  * evaluation_metric: 'LLMaaJ:Sem_Sim_3',
82
+ * origin_model: { provider: 'openai', model: 'gpt-4o' },
83
83
  * test_goldens: [
84
84
  * {
85
85
  * fields: { ... },
@@ -108,7 +108,7 @@ export declare namespace ReportEvaluateHallucinationParams {
108
108
  */
109
109
  interface Provider {
110
110
  /**
111
- * Model name (e.g., 'gpt-4o', 'claude-3-5-sonnet-20241022')
111
+ * Model name (e.g., 'gpt-4o', 'claude-sonnet-4-5-20250929')
112
112
  */
113
113
  model: string;
114
114
  /**
@@ -159,7 +159,7 @@ export declare namespace ReportLatencyParams {
159
159
  */
160
160
  interface Provider {
161
161
  /**
162
- * Model name (e.g., 'gpt-4o', 'claude-3-5-sonnet-20241022')
162
+ * Model name (e.g., 'gpt-4o', 'claude-sonnet-4-5-20250929')
163
163
  */
164
164
  model: string;
165
165
  /**
@@ -210,7 +210,7 @@ export declare namespace ReportSubmitFeedbackParams {
210
210
  */
211
211
  interface Provider {
212
212
  /**
213
- * Model name (e.g., 'gpt-4o', 'claude-3-5-sonnet-20241022')
213
+ * Model name (e.g., 'gpt-4o', 'claude-sonnet-4-5-20250929')
214
214
  */
215
215
  model: string;
216
216
  /**
@@ -108,7 +108,7 @@ export declare namespace ReportEvaluateHallucinationParams {
108
108
  */
109
109
  interface Provider {
110
110
  /**
111
- * Model name (e.g., 'gpt-4o', 'claude-3-5-sonnet-20241022')
111
+ * Model name (e.g., 'gpt-4o', 'claude-sonnet-4-5-20250929')
112
112
  */
113
113
  model: string;
114
114
  /**
@@ -159,7 +159,7 @@ export declare namespace ReportLatencyParams {
159
159
  */
160
160
  interface Provider {
161
161
  /**
162
- * Model name (e.g., 'gpt-4o', 'claude-3-5-sonnet-20241022')
162
+ * Model name (e.g., 'gpt-4o', 'claude-sonnet-4-5-20250929')
163
163
  */
164
164
  model: string;
165
165
  /**
@@ -210,7 +210,7 @@ export declare namespace ReportSubmitFeedbackParams {
210
210
  */
211
211
  interface Provider {
212
212
  /**
213
- * Model name (e.g., 'gpt-4o', 'claude-3-5-sonnet-20241022')
213
+ * Model name (e.g., 'gpt-4o', 'claude-sonnet-4-5-20250929')
214
214
  */
215
215
  model: string;
216
216
  /**
@@ -59,7 +59,7 @@ export declare class Routing extends APIResource {
59
59
  * { provider: 'openai', model: 'gpt-4o' },
60
60
  * {
61
61
  * provider: 'anthropic',
62
- * model: 'claude-3-5-sonnet-20241022',
62
+ * model: 'claude-sonnet-4-5-20250929',
63
63
  * },
64
64
  * { provider: 'google', model: 'gemini-1.5-pro' },
65
65
  * ],
@@ -105,7 +105,7 @@ export declare class Routing extends APIResource {
105
105
  * **Example CSV structure:**
106
106
  *
107
107
  * ```
108
- * prompt,openai/gpt-4o/score,openai/gpt-4o/response,anthropic/claude-3-5-sonnet-20241022/score,anthropic/claude-3-5-sonnet-20241022/response
108
+ * prompt,openai/gpt-4o/score,openai/gpt-4o/response,anthropic/claude-sonnet-4-5-20250929/score,anthropic/claude-sonnet-4-5-20250929/response
109
109
  * "Explain quantum computing",0.95,"Quantum computing uses...",0.87,"Quantum computers leverage..."
110
110
  * "Write a Python function",0.82,"def my_function()...",0.91,"Here's a Python function..."
111
111
  * ```
@@ -140,7 +140,7 @@ export declare class Routing extends APIResource {
140
140
  * dataset_file: fs.createReadStream('path/to/file'),
141
141
  * language: 'english',
142
142
  * llm_providers:
143
- * '[{"provider": "openai", "model": "gpt-4o"}, {"provider": "anthropic", "model": "claude-3-5-sonnet-20241022"}]',
143
+ * '[{"provider": "openai", "model": "gpt-4o"}, {"provider": "anthropic", "model": "claude-sonnet-4-5-20250929"}]',
144
144
  * maximize: true,
145
145
  * prompt_column: 'prompt',
146
146
  * });
@@ -291,7 +291,7 @@ export declare namespace RoutingSelectModelParams {
291
291
  */
292
292
  interface RequestProvider {
293
293
  /**
294
- * Model name (e.g., 'gpt-4o', 'claude-3-5-sonnet-20241022')
294
+ * Model name (e.g., 'gpt-4o', 'claude-sonnet-4-5-20250929')
295
295
  */
296
296
  model: string;
297
297
  /**
@@ -363,7 +363,7 @@ export interface RoutingTrainCustomRouterParams {
363
363
  /**
364
364
  * JSON string array of LLM providers to train the router on. Format:
365
365
  * '[{"provider": "openai", "model": "gpt-4o"}, {"provider": "anthropic", "model":
366
- * "claude-3-5-sonnet-20241022"}]'
366
+ * "claude-sonnet-4-5-20250929"}]'
367
367
  */
368
368
  llm_providers: string;
369
369
  /**
@@ -59,7 +59,7 @@ export declare class Routing extends APIResource {
59
59
  * { provider: 'openai', model: 'gpt-4o' },
60
60
  * {
61
61
  * provider: 'anthropic',
62
- * model: 'claude-3-5-sonnet-20241022',
62
+ * model: 'claude-sonnet-4-5-20250929',
63
63
  * },
64
64
  * { provider: 'google', model: 'gemini-1.5-pro' },
65
65
  * ],
@@ -105,7 +105,7 @@ export declare class Routing extends APIResource {
105
105
  * **Example CSV structure:**
106
106
  *
107
107
  * ```
108
- * prompt,openai/gpt-4o/score,openai/gpt-4o/response,anthropic/claude-3-5-sonnet-20241022/score,anthropic/claude-3-5-sonnet-20241022/response
108
+ * prompt,openai/gpt-4o/score,openai/gpt-4o/response,anthropic/claude-sonnet-4-5-20250929/score,anthropic/claude-sonnet-4-5-20250929/response
109
109
  * "Explain quantum computing",0.95,"Quantum computing uses...",0.87,"Quantum computers leverage..."
110
110
  * "Write a Python function",0.82,"def my_function()...",0.91,"Here's a Python function..."
111
111
  * ```
@@ -140,7 +140,7 @@ export declare class Routing extends APIResource {
140
140
  * dataset_file: fs.createReadStream('path/to/file'),
141
141
  * language: 'english',
142
142
  * llm_providers:
143
- * '[{"provider": "openai", "model": "gpt-4o"}, {"provider": "anthropic", "model": "claude-3-5-sonnet-20241022"}]',
143
+ * '[{"provider": "openai", "model": "gpt-4o"}, {"provider": "anthropic", "model": "claude-sonnet-4-5-20250929"}]',
144
144
  * maximize: true,
145
145
  * prompt_column: 'prompt',
146
146
  * });
@@ -291,7 +291,7 @@ export declare namespace RoutingSelectModelParams {
291
291
  */
292
292
  interface RequestProvider {
293
293
  /**
294
- * Model name (e.g., 'gpt-4o', 'claude-3-5-sonnet-20241022')
294
+ * Model name (e.g., 'gpt-4o', 'claude-sonnet-4-5-20250929')
295
295
  */
296
296
  model: string;
297
297
  /**
@@ -363,7 +363,7 @@ export interface RoutingTrainCustomRouterParams {
363
363
  /**
364
364
  * JSON string array of LLM providers to train the router on. Format:
365
365
  * '[{"provider": "openai", "model": "gpt-4o"}, {"provider": "anthropic", "model":
366
- * "claude-3-5-sonnet-20241022"}]'
366
+ * "claude-sonnet-4-5-20250929"}]'
367
367
  */
368
368
  llm_providers: string;
369
369
  /**
@@ -65,7 +65,7 @@ class Routing extends resource_1.APIResource {
65
65
  * { provider: 'openai', model: 'gpt-4o' },
66
66
  * {
67
67
  * provider: 'anthropic',
68
- * model: 'claude-3-5-sonnet-20241022',
68
+ * model: 'claude-sonnet-4-5-20250929',
69
69
  * },
70
70
  * { provider: 'google', model: 'gemini-1.5-pro' },
71
71
  * ],
@@ -114,7 +114,7 @@ class Routing extends resource_1.APIResource {
114
114
  * **Example CSV structure:**
115
115
  *
116
116
  * ```
117
- * prompt,openai/gpt-4o/score,openai/gpt-4o/response,anthropic/claude-3-5-sonnet-20241022/score,anthropic/claude-3-5-sonnet-20241022/response
117
+ * prompt,openai/gpt-4o/score,openai/gpt-4o/response,anthropic/claude-sonnet-4-5-20250929/score,anthropic/claude-sonnet-4-5-20250929/response
118
118
  * "Explain quantum computing",0.95,"Quantum computing uses...",0.87,"Quantum computers leverage..."
119
119
  * "Write a Python function",0.82,"def my_function()...",0.91,"Here's a Python function..."
120
120
  * ```
@@ -149,7 +149,7 @@ class Routing extends resource_1.APIResource {
149
149
  * dataset_file: fs.createReadStream('path/to/file'),
150
150
  * language: 'english',
151
151
  * llm_providers:
152
- * '[{"provider": "openai", "model": "gpt-4o"}, {"provider": "anthropic", "model": "claude-3-5-sonnet-20241022"}]',
152
+ * '[{"provider": "openai", "model": "gpt-4o"}, {"provider": "anthropic", "model": "claude-sonnet-4-5-20250929"}]',
153
153
  * maximize: true,
154
154
  * prompt_column: 'prompt',
155
155
  * });
@@ -62,7 +62,7 @@ export class Routing extends APIResource {
62
62
  * { provider: 'openai', model: 'gpt-4o' },
63
63
  * {
64
64
  * provider: 'anthropic',
65
- * model: 'claude-3-5-sonnet-20241022',
65
+ * model: 'claude-sonnet-4-5-20250929',
66
66
  * },
67
67
  * { provider: 'google', model: 'gemini-1.5-pro' },
68
68
  * ],
@@ -111,7 +111,7 @@ export class Routing extends APIResource {
111
111
  * **Example CSV structure:**
112
112
  *
113
113
  * ```
114
- * prompt,openai/gpt-4o/score,openai/gpt-4o/response,anthropic/claude-3-5-sonnet-20241022/score,anthropic/claude-3-5-sonnet-20241022/response
114
+ * prompt,openai/gpt-4o/score,openai/gpt-4o/response,anthropic/claude-sonnet-4-5-20250929/score,anthropic/claude-sonnet-4-5-20250929/response
115
115
  * "Explain quantum computing",0.95,"Quantum computing uses...",0.87,"Quantum computers leverage..."
116
116
  * "Write a Python function",0.82,"def my_function()...",0.91,"Here's a Python function..."
117
117
  * ```
@@ -146,7 +146,7 @@ export class Routing extends APIResource {
146
146
  * dataset_file: fs.createReadStream('path/to/file'),
147
147
  * language: 'english',
148
148
  * llm_providers:
149
- * '[{"provider": "openai", "model": "gpt-4o"}, {"provider": "anthropic", "model": "claude-3-5-sonnet-20241022"}]',
149
+ * '[{"provider": "openai", "model": "gpt-4o"}, {"provider": "anthropic", "model": "claude-sonnet-4-5-20250929"}]',
150
150
  * maximize: true,
151
151
  * prompt_column: 'prompt',
152
152
  * });
@@ -77,14 +77,14 @@ export class PromptAdaptation extends APIResource {
77
77
  * ```ts
78
78
  * const response = await client.promptAdaptation.adapt({
79
79
  * fields: ['question'],
80
- * origin_model: { provider: 'openai', model: 'gpt-4o' },
81
80
  * system_prompt: 'You are a helpful assistant that answers questions accurately.',
82
81
  * target_models: [
83
- * { provider: 'anthropic', model: 'claude-3-5-sonnet-20241022' },
82
+ * { provider: 'anthropic', model: 'claude-sonnet-4-5-20250929' },
84
83
  * { provider: 'google', model: 'gemini-1.5-pro' },
85
84
  * ],
86
85
  * template: 'Question: {question}\nAnswer:',
87
86
  * evaluation_metric: 'LLMaaJ:Sem_Sim_3',
87
+ * origin_model: { provider: 'openai', model: 'gpt-4o' },
88
88
  * test_goldens: [
89
89
  * {
90
90
  * fields: { ... },
@@ -329,11 +329,6 @@ export interface AdaptationRunResults {
329
329
  */
330
330
  job_status: JobStatus;
331
331
 
332
- /**
333
- * Results for the origin model (baseline performance)
334
- */
335
- origin_model: AdaptationRunResults.OriginModel;
336
-
337
332
  /**
338
333
  * Results for each target model with optimized prompts
339
334
  */
@@ -347,28 +342,19 @@ export interface AdaptationRunResults {
347
342
  evaluation_config?: string | null;
348
343
 
349
344
  evaluation_metric?: string | null;
350
- }
351
345
 
352
- export namespace AdaptationRunResults {
353
346
  /**
354
- * Results for the origin model (baseline performance)
347
+ * Metrics for the LLM requests made during the adaptation run
355
348
  */
356
- export interface OriginModel {
357
- cost: number | null;
358
-
359
- evals: { [key: string]: unknown } | null;
360
-
361
- model_name: string;
362
-
363
- result_status: PromptAdaptationAPI.JobStatus | null;
364
-
365
- score: number | null;
366
-
367
- system_prompt: string | null;
349
+ llm_request_metrics?: { [key: string]: number };
368
350
 
369
- user_message_template: string | null;
370
- }
351
+ /**
352
+ * Results for the origin model (baseline performance)
353
+ */
354
+ origin_model?: AdaptationRunResults.OriginModel | null;
355
+ }
371
356
 
357
+ export namespace AdaptationRunResults {
372
358
  /**
373
359
  * Results for a single target model adaptation.
374
360
  */
@@ -395,6 +381,8 @@ export namespace AdaptationRunResults {
395
381
  */
396
382
  system_prompt: string | null;
397
383
 
384
+ task_type: string | null;
385
+
398
386
  /**
399
387
  * Optimized user message template for this target model
400
388
  */
@@ -405,6 +393,25 @@ export namespace AdaptationRunResults {
405
393
  */
406
394
  user_message_template_fields: Array<string> | null;
407
395
  }
396
+
397
+ /**
398
+ * Results for the origin model (baseline performance)
399
+ */
400
+ export interface OriginModel {
401
+ cost: number | null;
402
+
403
+ evals: { [key: string]: unknown } | null;
404
+
405
+ model_name: string | null;
406
+
407
+ result_status: PromptAdaptationAPI.JobStatus | null;
408
+
409
+ score: number | null;
410
+
411
+ system_prompt: string | null;
412
+
413
+ user_message_template: string | null;
414
+ }
408
415
  }
409
416
 
410
417
  export type JobStatus = 'created' | 'queued' | 'processing' | 'completed' | 'failed';
@@ -487,11 +494,6 @@ export interface PromptAdaptationAdaptParams {
487
494
  */
488
495
  fields: Array<string>;
489
496
 
490
- /**
491
- * The model your current prompt is optimized for
492
- */
493
- origin_model: PromptAdaptationAdaptParams.OriginModel;
494
-
495
497
  /**
496
498
  * System prompt to use with the origin model. This sets the context and role for
497
499
  * the LLM
@@ -520,6 +522,11 @@ export interface PromptAdaptationAdaptParams {
520
522
  */
521
523
  goldens?: Array<PromptAdaptationAdaptParams.Golden> | null;
522
524
 
525
+ /**
526
+ * Model for specifying an LLM provider in API requests.
527
+ */
528
+ origin_model?: PromptAdaptationAdaptParams.OriginModel | null;
529
+
523
530
  /**
524
531
  * Optional baseline score for the origin model
525
532
  */
@@ -538,11 +545,11 @@ export interface PromptAdaptationAdaptParams {
538
545
 
539
546
  export namespace PromptAdaptationAdaptParams {
540
547
  /**
541
- * The model your current prompt is optimized for
548
+ * Model for specifying an LLM provider in API requests.
542
549
  */
543
- export interface OriginModel {
550
+ export interface TargetModel {
544
551
  /**
545
- * Model name (e.g., 'gpt-4o', 'claude-3-5-sonnet-20241022')
552
+ * Model name (e.g., 'gpt-4o', 'claude-sonnet-4-5-20250929')
546
553
  */
547
554
  model: string;
548
555
 
@@ -577,12 +584,29 @@ export namespace PromptAdaptationAdaptParams {
577
584
  output_price?: number | null;
578
585
  }
579
586
 
587
+ /**
588
+ * A training or test example for prompt adaptation.
589
+ */
590
+ export interface Golden {
591
+ /**
592
+ * Dictionary mapping field names to their values. Keys must match the fields
593
+ * specified in the template
594
+ */
595
+ fields: { [key: string]: string };
596
+
597
+ /**
598
+ * Expected answer for supervised evaluation. Required for supervised metrics,
599
+ * optional for unsupervised
600
+ */
601
+ answer?: string | null;
602
+ }
603
+
580
604
  /**
581
605
  * Model for specifying an LLM provider in API requests.
582
606
  */
583
- export interface TargetModel {
607
+ export interface OriginModel {
584
608
  /**
585
- * Model name (e.g., 'gpt-4o', 'claude-3-5-sonnet-20241022')
609
+ * Model name (e.g., 'gpt-4o', 'claude-sonnet-4-5-20250929')
586
610
  */
587
611
  model: string;
588
612
 
@@ -617,23 +641,6 @@ export namespace PromptAdaptationAdaptParams {
617
641
  output_price?: number | null;
618
642
  }
619
643
 
620
- /**
621
- * A training or test example for prompt adaptation.
622
- */
623
- export interface Golden {
624
- /**
625
- * Dictionary mapping field names to their values. Keys must match the fields
626
- * specified in the template
627
- */
628
- fields: { [key: string]: string };
629
-
630
- /**
631
- * Expected answer for supervised evaluation. Required for supervised metrics,
632
- * optional for unsupervised
633
- */
634
- answer?: string | null;
635
- }
636
-
637
644
  /**
638
645
  * A training or test example for prompt adaptation.
639
646
  */
@@ -134,7 +134,7 @@ export namespace ReportEvaluateHallucinationParams {
134
134
  */
135
135
  export interface Provider {
136
136
  /**
137
- * Model name (e.g., 'gpt-4o', 'claude-3-5-sonnet-20241022')
137
+ * Model name (e.g., 'gpt-4o', 'claude-sonnet-4-5-20250929')
138
138
  */
139
139
  model: string;
140
140
 
@@ -193,7 +193,7 @@ export namespace ReportLatencyParams {
193
193
  */
194
194
  export interface Provider {
195
195
  /**
196
- * Model name (e.g., 'gpt-4o', 'claude-3-5-sonnet-20241022')
196
+ * Model name (e.g., 'gpt-4o', 'claude-sonnet-4-5-20250929')
197
197
  */
198
198
  model: string;
199
199
 
@@ -252,7 +252,7 @@ export namespace ReportSubmitFeedbackParams {
252
252
  */
253
253
  export interface Provider {
254
254
  /**
255
- * Model name (e.g., 'gpt-4o', 'claude-3-5-sonnet-20241022')
255
+ * Model name (e.g., 'gpt-4o', 'claude-sonnet-4-5-20250929')
256
256
  */
257
257
  model: string;
258
258
 
@@ -77,7 +77,7 @@ export class Routing extends APIResource {
77
77
  * { provider: 'openai', model: 'gpt-4o' },
78
78
  * {
79
79
  * provider: 'anthropic',
80
- * model: 'claude-3-5-sonnet-20241022',
80
+ * model: 'claude-sonnet-4-5-20250929',
81
81
  * },
82
82
  * { provider: 'google', model: 'gemini-1.5-pro' },
83
83
  * ],
@@ -130,7 +130,7 @@ export class Routing extends APIResource {
130
130
  * **Example CSV structure:**
131
131
  *
132
132
  * ```
133
- * prompt,openai/gpt-4o/score,openai/gpt-4o/response,anthropic/claude-3-5-sonnet-20241022/score,anthropic/claude-3-5-sonnet-20241022/response
133
+ * prompt,openai/gpt-4o/score,openai/gpt-4o/response,anthropic/claude-sonnet-4-5-20250929/score,anthropic/claude-sonnet-4-5-20250929/response
134
134
  * "Explain quantum computing",0.95,"Quantum computing uses...",0.87,"Quantum computers leverage..."
135
135
  * "Write a Python function",0.82,"def my_function()...",0.91,"Here's a Python function..."
136
136
  * ```
@@ -165,7 +165,7 @@ export class Routing extends APIResource {
165
165
  * dataset_file: fs.createReadStream('path/to/file'),
166
166
  * language: 'english',
167
167
  * llm_providers:
168
- * '[{"provider": "openai", "model": "gpt-4o"}, {"provider": "anthropic", "model": "claude-3-5-sonnet-20241022"}]',
168
+ * '[{"provider": "openai", "model": "gpt-4o"}, {"provider": "anthropic", "model": "claude-sonnet-4-5-20250929"}]',
169
169
  * maximize: true,
170
170
  * prompt_column: 'prompt',
171
171
  * });
@@ -350,7 +350,7 @@ export namespace RoutingSelectModelParams {
350
350
  */
351
351
  export interface RequestProvider {
352
352
  /**
353
- * Model name (e.g., 'gpt-4o', 'claude-3-5-sonnet-20241022')
353
+ * Model name (e.g., 'gpt-4o', 'claude-sonnet-4-5-20250929')
354
354
  */
355
355
  model: string;
356
356
 
@@ -437,7 +437,7 @@ export interface RoutingTrainCustomRouterParams {
437
437
  /**
438
438
  * JSON string array of LLM providers to train the router on. Format:
439
439
  * '[{"provider": "openai", "model": "gpt-4o"}, {"provider": "anthropic", "model":
440
- * "claude-3-5-sonnet-20241022"}]'
440
+ * "claude-sonnet-4-5-20250929"}]'
441
441
  */
442
442
  llm_providers: string;
443
443
 
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '2.0.0-rc1'; // x-release-please-version
1
+ export const VERSION = '2.0.0-rc2'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "2.0.0-rc1";
1
+ export declare const VERSION = "2.0.0-rc2";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "2.0.0-rc1";
1
+ export declare const VERSION = "2.0.0-rc2";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '2.0.0-rc1'; // x-release-please-version
4
+ exports.VERSION = '2.0.0-rc2'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '2.0.0-rc1'; // x-release-please-version
1
+ export const VERSION = '2.0.0-rc2'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map