@opengeni/config 0.6.2 → 0.6.9
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.d.ts +376 -8
- package/dist/index.js +742 -65
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/index.ts +1002 -86
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Entitlements, SandboxBackend, StaticUsageLimits, ReasoningEffort } from '@opengeni/contracts';
|
|
1
|
+
import { Entitlements, TurnExecutionModelSourceV1, TurnExecutionReasoningSourceV1, SandboxBackend, StaticUsageLimits, TurnExecutionPolicyV1, ReasoningEffort } from '@opengeni/contracts';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
declare const sandboxPreparationProfiles: Record<string, {
|
|
@@ -107,6 +107,7 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
107
107
|
delegationSecret: z.ZodOptional<z.ZodString>;
|
|
108
108
|
streamTokenSecret: z.ZodOptional<z.ZodString>;
|
|
109
109
|
streamControlEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
110
|
+
sessionTurnToolReplacementEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
110
111
|
toolspaceEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
111
112
|
toolspaceMaxCallsPerTurn: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
112
113
|
ogtoolPackageSpec: z.ZodOptional<z.ZodString>;
|
|
@@ -262,6 +263,7 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
262
263
|
vercelTeamId: z.ZodOptional<z.ZodString>;
|
|
263
264
|
vercelRuntime: z.ZodOptional<z.ZodString>;
|
|
264
265
|
sandboxOwnershipEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
266
|
+
rigVerificationLeaseOwnershipEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
265
267
|
sandboxLazyProvisionEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
266
268
|
sandboxSelfhostedEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
267
269
|
agentOpStreamEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
@@ -353,7 +355,7 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
353
355
|
allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
354
356
|
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
355
357
|
cacheToolsList: z.ZodDefault<z.ZodBoolean>;
|
|
356
|
-
requireApproval: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodArray<z.ZodString
|
|
358
|
+
requireApproval: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>]>>;
|
|
357
359
|
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
358
360
|
connectionRef: z.ZodOptional<z.ZodObject<{
|
|
359
361
|
connectionId: z.ZodOptional<z.ZodString>;
|
|
@@ -399,6 +401,13 @@ type ModelPricing = {
|
|
|
399
401
|
outputMicrosPerMillionTokens: number;
|
|
400
402
|
marginBps?: number | undefined;
|
|
401
403
|
};
|
|
404
|
+
type ModelPricingScheduleV1 = {
|
|
405
|
+
default: ModelPricing;
|
|
406
|
+
inputTokenTiers?: Array<{
|
|
407
|
+
minimumInputTokens: number;
|
|
408
|
+
pricing: ModelPricing;
|
|
409
|
+
}> | undefined;
|
|
410
|
+
};
|
|
402
411
|
type ModelUsageInput = {
|
|
403
412
|
inputTokens?: number | undefined;
|
|
404
413
|
outputTokens?: number | undefined;
|
|
@@ -408,6 +417,165 @@ type ModelUsageInput = {
|
|
|
408
417
|
};
|
|
409
418
|
type StaticUsageLimitsConfig = StaticUsageLimits;
|
|
410
419
|
type EntitlementsConfig = Entitlements;
|
|
420
|
+
declare const CapabilitySupportV1: z.ZodEnum<{
|
|
421
|
+
unknown: "unknown";
|
|
422
|
+
supported: "supported";
|
|
423
|
+
unsupported: "unsupported";
|
|
424
|
+
}>;
|
|
425
|
+
type CapabilitySupportV1 = z.infer<typeof CapabilitySupportV1>;
|
|
426
|
+
declare const CapabilityStateV1Schema: z.ZodObject<{
|
|
427
|
+
upstream: z.ZodEnum<{
|
|
428
|
+
unknown: "unknown";
|
|
429
|
+
supported: "supported";
|
|
430
|
+
unsupported: "unsupported";
|
|
431
|
+
}>;
|
|
432
|
+
runnable: z.ZodBoolean;
|
|
433
|
+
}, z.core.$strip>;
|
|
434
|
+
type CapabilityStateV1 = z.infer<typeof CapabilityStateV1Schema>;
|
|
435
|
+
declare const ModelCapabilitiesV1Schema: z.ZodObject<{
|
|
436
|
+
reasoning: z.ZodObject<{
|
|
437
|
+
upstream: z.ZodEnum<{
|
|
438
|
+
unknown: "unknown";
|
|
439
|
+
supported: "supported";
|
|
440
|
+
unsupported: "unsupported";
|
|
441
|
+
}>;
|
|
442
|
+
runnable: z.ZodBoolean;
|
|
443
|
+
efforts: z.ZodArray<z.ZodEnum<{
|
|
444
|
+
none: "none";
|
|
445
|
+
minimal: "minimal";
|
|
446
|
+
low: "low";
|
|
447
|
+
medium: "medium";
|
|
448
|
+
high: "high";
|
|
449
|
+
xhigh: "xhigh";
|
|
450
|
+
}>>;
|
|
451
|
+
defaultEffort: z.ZodNullable<z.ZodEnum<{
|
|
452
|
+
none: "none";
|
|
453
|
+
minimal: "minimal";
|
|
454
|
+
low: "low";
|
|
455
|
+
medium: "medium";
|
|
456
|
+
high: "high";
|
|
457
|
+
xhigh: "xhigh";
|
|
458
|
+
}>>;
|
|
459
|
+
required: z.ZodBoolean;
|
|
460
|
+
}, z.core.$strip>;
|
|
461
|
+
functionCalling: z.ZodObject<{
|
|
462
|
+
upstream: z.ZodEnum<{
|
|
463
|
+
unknown: "unknown";
|
|
464
|
+
supported: "supported";
|
|
465
|
+
unsupported: "unsupported";
|
|
466
|
+
}>;
|
|
467
|
+
runnable: z.ZodBoolean;
|
|
468
|
+
}, z.core.$strip>;
|
|
469
|
+
structuredOutput: z.ZodObject<{
|
|
470
|
+
upstream: z.ZodEnum<{
|
|
471
|
+
unknown: "unknown";
|
|
472
|
+
supported: "supported";
|
|
473
|
+
unsupported: "unsupported";
|
|
474
|
+
}>;
|
|
475
|
+
runnable: z.ZodBoolean;
|
|
476
|
+
}, z.core.$strip>;
|
|
477
|
+
hostedTools: z.ZodObject<{
|
|
478
|
+
webSearch: z.ZodObject<{
|
|
479
|
+
upstream: z.ZodEnum<{
|
|
480
|
+
unknown: "unknown";
|
|
481
|
+
supported: "supported";
|
|
482
|
+
unsupported: "unsupported";
|
|
483
|
+
}>;
|
|
484
|
+
runnable: z.ZodBoolean;
|
|
485
|
+
}, z.core.$strip>;
|
|
486
|
+
xSearch: z.ZodObject<{
|
|
487
|
+
upstream: z.ZodEnum<{
|
|
488
|
+
unknown: "unknown";
|
|
489
|
+
supported: "supported";
|
|
490
|
+
unsupported: "unsupported";
|
|
491
|
+
}>;
|
|
492
|
+
runnable: z.ZodBoolean;
|
|
493
|
+
}, z.core.$strip>;
|
|
494
|
+
codeExecution: z.ZodObject<{
|
|
495
|
+
upstream: z.ZodEnum<{
|
|
496
|
+
unknown: "unknown";
|
|
497
|
+
supported: "supported";
|
|
498
|
+
unsupported: "unsupported";
|
|
499
|
+
}>;
|
|
500
|
+
runnable: z.ZodBoolean;
|
|
501
|
+
}, z.core.$strip>;
|
|
502
|
+
}, z.core.$strip>;
|
|
503
|
+
inputModalities: z.ZodArray<z.ZodEnum<{
|
|
504
|
+
text: "text";
|
|
505
|
+
image: "image";
|
|
506
|
+
audio: "audio";
|
|
507
|
+
}>>;
|
|
508
|
+
outputModalities: z.ZodArray<z.ZodEnum<{
|
|
509
|
+
text: "text";
|
|
510
|
+
image: "image";
|
|
511
|
+
audio: "audio";
|
|
512
|
+
}>>;
|
|
513
|
+
transports: z.ZodObject<{
|
|
514
|
+
sse: z.ZodObject<{
|
|
515
|
+
upstream: z.ZodEnum<{
|
|
516
|
+
unknown: "unknown";
|
|
517
|
+
supported: "supported";
|
|
518
|
+
unsupported: "unsupported";
|
|
519
|
+
}>;
|
|
520
|
+
runnable: z.ZodBoolean;
|
|
521
|
+
}, z.core.$strip>;
|
|
522
|
+
responsesWebSocket: z.ZodObject<{
|
|
523
|
+
upstream: z.ZodEnum<{
|
|
524
|
+
unknown: "unknown";
|
|
525
|
+
supported: "supported";
|
|
526
|
+
unsupported: "unsupported";
|
|
527
|
+
}>;
|
|
528
|
+
runnable: z.ZodBoolean;
|
|
529
|
+
}, z.core.$strip>;
|
|
530
|
+
realtimeAudio: z.ZodObject<{
|
|
531
|
+
upstream: z.ZodEnum<{
|
|
532
|
+
unknown: "unknown";
|
|
533
|
+
supported: "supported";
|
|
534
|
+
unsupported: "unsupported";
|
|
535
|
+
}>;
|
|
536
|
+
runnable: z.ZodBoolean;
|
|
537
|
+
}, z.core.$strip>;
|
|
538
|
+
}, z.core.$strip>;
|
|
539
|
+
latencyModes: z.ZodArray<z.ZodObject<{
|
|
540
|
+
id: z.ZodEnum<{
|
|
541
|
+
standard: "standard";
|
|
542
|
+
priority: "priority";
|
|
543
|
+
fast: "fast";
|
|
544
|
+
}>;
|
|
545
|
+
upstream: z.ZodEnum<{
|
|
546
|
+
unknown: "unknown";
|
|
547
|
+
supported: "supported";
|
|
548
|
+
unsupported: "unsupported";
|
|
549
|
+
}>;
|
|
550
|
+
runnable: z.ZodBoolean;
|
|
551
|
+
billingMultiplierBps: z.ZodOptional<z.ZodNumber>;
|
|
552
|
+
}, z.core.$strip>>;
|
|
553
|
+
}, z.core.$strip>;
|
|
554
|
+
type ModelCapabilitiesV1 = z.infer<typeof ModelCapabilitiesV1Schema>;
|
|
555
|
+
type ModelDeploymentV1 = {
|
|
556
|
+
upstreamModelId: string;
|
|
557
|
+
wireApi: ModelProviderApi;
|
|
558
|
+
};
|
|
559
|
+
type ModelExecutionLimitsV1 = {
|
|
560
|
+
contextWindowTokens: number | null;
|
|
561
|
+
effectiveContextWindowTokens: number | null;
|
|
562
|
+
autoCompactTokenLimit: number | null;
|
|
563
|
+
toolOutputTruncationTokens: number | null;
|
|
564
|
+
};
|
|
565
|
+
type CredentialSourceV1 = {
|
|
566
|
+
kind: "deployment";
|
|
567
|
+
mechanism: "api_key" | "azure_ad_bearer";
|
|
568
|
+
} | {
|
|
569
|
+
kind: "connected_subscription";
|
|
570
|
+
provider: "codex";
|
|
571
|
+
} | {
|
|
572
|
+
kind: "workspace_connection";
|
|
573
|
+
mechanism: "api_key";
|
|
574
|
+
};
|
|
575
|
+
type BillingAttributionV1 = {
|
|
576
|
+
upstreamPayer: "deployment" | "workspace" | "connected_subscription";
|
|
577
|
+
metering: "opengeni_credits" | "external";
|
|
578
|
+
};
|
|
411
579
|
/**
|
|
412
580
|
* Wire API a provider speaks. The built-in OpenAI/Azure provider always uses
|
|
413
581
|
* "responses" (the OpenAI Responses API). Extra registry providers default to
|
|
@@ -447,8 +615,14 @@ declare const RegistryProviderSchema: z.ZodObject<{
|
|
|
447
615
|
apiKeyEnv: z.ZodOptional<z.ZodString>;
|
|
448
616
|
defaultQuery: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
449
617
|
defaultHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
618
|
+
publicDefaultQueryNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
619
|
+
publicDefaultHeaderNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
620
|
+
credentialSource: z.ZodOptional<z.ZodNever>;
|
|
621
|
+
billing: z.ZodOptional<z.ZodNever>;
|
|
450
622
|
models: z.ZodArray<z.ZodObject<{
|
|
451
623
|
id: z.ZodString;
|
|
624
|
+
upstreamModelId: z.ZodOptional<z.ZodString>;
|
|
625
|
+
aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
452
626
|
label: z.ZodOptional<z.ZodString>;
|
|
453
627
|
contextWindowTokens: z.ZodOptional<z.ZodNumber>;
|
|
454
628
|
effectiveContextWindowTokens: z.ZodOptional<z.ZodNumber>;
|
|
@@ -456,12 +630,149 @@ declare const RegistryProviderSchema: z.ZodObject<{
|
|
|
456
630
|
toolOutputTruncationTokens: z.ZodOptional<z.ZodNumber>;
|
|
457
631
|
reasoningEffort: z.ZodOptional<z.ZodBoolean>;
|
|
458
632
|
hostedWebSearch: z.ZodOptional<z.ZodBoolean>;
|
|
459
|
-
|
|
633
|
+
capabilities: z.ZodOptional<z.ZodObject<{
|
|
634
|
+
reasoning: z.ZodObject<{
|
|
635
|
+
upstream: z.ZodEnum<{
|
|
636
|
+
unknown: "unknown";
|
|
637
|
+
supported: "supported";
|
|
638
|
+
unsupported: "unsupported";
|
|
639
|
+
}>;
|
|
640
|
+
runnable: z.ZodBoolean;
|
|
641
|
+
efforts: z.ZodArray<z.ZodEnum<{
|
|
642
|
+
none: "none";
|
|
643
|
+
minimal: "minimal";
|
|
644
|
+
low: "low";
|
|
645
|
+
medium: "medium";
|
|
646
|
+
high: "high";
|
|
647
|
+
xhigh: "xhigh";
|
|
648
|
+
}>>;
|
|
649
|
+
defaultEffort: z.ZodNullable<z.ZodEnum<{
|
|
650
|
+
none: "none";
|
|
651
|
+
minimal: "minimal";
|
|
652
|
+
low: "low";
|
|
653
|
+
medium: "medium";
|
|
654
|
+
high: "high";
|
|
655
|
+
xhigh: "xhigh";
|
|
656
|
+
}>>;
|
|
657
|
+
required: z.ZodBoolean;
|
|
658
|
+
}, z.core.$strip>;
|
|
659
|
+
functionCalling: z.ZodObject<{
|
|
660
|
+
upstream: z.ZodEnum<{
|
|
661
|
+
unknown: "unknown";
|
|
662
|
+
supported: "supported";
|
|
663
|
+
unsupported: "unsupported";
|
|
664
|
+
}>;
|
|
665
|
+
runnable: z.ZodBoolean;
|
|
666
|
+
}, z.core.$strip>;
|
|
667
|
+
structuredOutput: z.ZodObject<{
|
|
668
|
+
upstream: z.ZodEnum<{
|
|
669
|
+
unknown: "unknown";
|
|
670
|
+
supported: "supported";
|
|
671
|
+
unsupported: "unsupported";
|
|
672
|
+
}>;
|
|
673
|
+
runnable: z.ZodBoolean;
|
|
674
|
+
}, z.core.$strip>;
|
|
675
|
+
hostedTools: z.ZodObject<{
|
|
676
|
+
webSearch: z.ZodObject<{
|
|
677
|
+
upstream: z.ZodEnum<{
|
|
678
|
+
unknown: "unknown";
|
|
679
|
+
supported: "supported";
|
|
680
|
+
unsupported: "unsupported";
|
|
681
|
+
}>;
|
|
682
|
+
runnable: z.ZodBoolean;
|
|
683
|
+
}, z.core.$strip>;
|
|
684
|
+
xSearch: z.ZodObject<{
|
|
685
|
+
upstream: z.ZodEnum<{
|
|
686
|
+
unknown: "unknown";
|
|
687
|
+
supported: "supported";
|
|
688
|
+
unsupported: "unsupported";
|
|
689
|
+
}>;
|
|
690
|
+
runnable: z.ZodBoolean;
|
|
691
|
+
}, z.core.$strip>;
|
|
692
|
+
codeExecution: z.ZodObject<{
|
|
693
|
+
upstream: z.ZodEnum<{
|
|
694
|
+
unknown: "unknown";
|
|
695
|
+
supported: "supported";
|
|
696
|
+
unsupported: "unsupported";
|
|
697
|
+
}>;
|
|
698
|
+
runnable: z.ZodBoolean;
|
|
699
|
+
}, z.core.$strip>;
|
|
700
|
+
}, z.core.$strip>;
|
|
701
|
+
inputModalities: z.ZodArray<z.ZodEnum<{
|
|
702
|
+
text: "text";
|
|
703
|
+
image: "image";
|
|
704
|
+
audio: "audio";
|
|
705
|
+
}>>;
|
|
706
|
+
outputModalities: z.ZodArray<z.ZodEnum<{
|
|
707
|
+
text: "text";
|
|
708
|
+
image: "image";
|
|
709
|
+
audio: "audio";
|
|
710
|
+
}>>;
|
|
711
|
+
transports: z.ZodObject<{
|
|
712
|
+
sse: z.ZodObject<{
|
|
713
|
+
upstream: z.ZodEnum<{
|
|
714
|
+
unknown: "unknown";
|
|
715
|
+
supported: "supported";
|
|
716
|
+
unsupported: "unsupported";
|
|
717
|
+
}>;
|
|
718
|
+
runnable: z.ZodBoolean;
|
|
719
|
+
}, z.core.$strip>;
|
|
720
|
+
responsesWebSocket: z.ZodObject<{
|
|
721
|
+
upstream: z.ZodEnum<{
|
|
722
|
+
unknown: "unknown";
|
|
723
|
+
supported: "supported";
|
|
724
|
+
unsupported: "unsupported";
|
|
725
|
+
}>;
|
|
726
|
+
runnable: z.ZodBoolean;
|
|
727
|
+
}, z.core.$strip>;
|
|
728
|
+
realtimeAudio: z.ZodObject<{
|
|
729
|
+
upstream: z.ZodEnum<{
|
|
730
|
+
unknown: "unknown";
|
|
731
|
+
supported: "supported";
|
|
732
|
+
unsupported: "unsupported";
|
|
733
|
+
}>;
|
|
734
|
+
runnable: z.ZodBoolean;
|
|
735
|
+
}, z.core.$strip>;
|
|
736
|
+
}, z.core.$strip>;
|
|
737
|
+
latencyModes: z.ZodArray<z.ZodObject<{
|
|
738
|
+
id: z.ZodEnum<{
|
|
739
|
+
standard: "standard";
|
|
740
|
+
priority: "priority";
|
|
741
|
+
fast: "fast";
|
|
742
|
+
}>;
|
|
743
|
+
upstream: z.ZodEnum<{
|
|
744
|
+
unknown: "unknown";
|
|
745
|
+
supported: "supported";
|
|
746
|
+
unsupported: "unsupported";
|
|
747
|
+
}>;
|
|
748
|
+
runnable: z.ZodBoolean;
|
|
749
|
+
billingMultiplierBps: z.ZodOptional<z.ZodNumber>;
|
|
750
|
+
}, z.core.$strip>>;
|
|
751
|
+
}, z.core.$strip>>;
|
|
752
|
+
pricing: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
460
753
|
inputMicrosPerMillionTokens: z.ZodNumber;
|
|
461
754
|
cachedInputMicrosPerMillionTokens: z.ZodOptional<z.ZodNumber>;
|
|
462
755
|
outputMicrosPerMillionTokens: z.ZodNumber;
|
|
463
756
|
marginBps: z.ZodOptional<z.ZodNumber>;
|
|
464
|
-
}, z.core.$strip
|
|
757
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
758
|
+
default: z.ZodObject<{
|
|
759
|
+
inputMicrosPerMillionTokens: z.ZodNumber;
|
|
760
|
+
cachedInputMicrosPerMillionTokens: z.ZodOptional<z.ZodNumber>;
|
|
761
|
+
outputMicrosPerMillionTokens: z.ZodNumber;
|
|
762
|
+
marginBps: z.ZodOptional<z.ZodNumber>;
|
|
763
|
+
}, z.core.$strip>;
|
|
764
|
+
inputTokenTiers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
765
|
+
minimumInputTokens: z.ZodNumber;
|
|
766
|
+
pricing: z.ZodObject<{
|
|
767
|
+
inputMicrosPerMillionTokens: z.ZodNumber;
|
|
768
|
+
cachedInputMicrosPerMillionTokens: z.ZodOptional<z.ZodNumber>;
|
|
769
|
+
outputMicrosPerMillionTokens: z.ZodNumber;
|
|
770
|
+
marginBps: z.ZodOptional<z.ZodNumber>;
|
|
771
|
+
}, z.core.$strip>;
|
|
772
|
+
}, z.core.$strip>>>;
|
|
773
|
+
}, z.core.$strip>]>>;
|
|
774
|
+
credentialSource: z.ZodOptional<z.ZodNever>;
|
|
775
|
+
billing: z.ZodOptional<z.ZodNever>;
|
|
465
776
|
}, z.core.$strip>>;
|
|
466
777
|
}, z.core.$strip>;
|
|
467
778
|
type RegistryProvider = z.infer<typeof RegistryProviderSchema>;
|
|
@@ -492,14 +803,28 @@ interface ResolvedModelProvider {
|
|
|
492
803
|
apiKey?: string | undefined;
|
|
493
804
|
defaultQuery?: Record<string, string> | undefined;
|
|
494
805
|
defaultHeaders?: Record<string, string> | undefined;
|
|
806
|
+
publicDefaultQueryNames?: string[] | undefined;
|
|
807
|
+
publicDefaultHeaderNames?: string[] | undefined;
|
|
808
|
+
credentialSource: CredentialSourceV1;
|
|
809
|
+
billing: BillingAttributionV1;
|
|
495
810
|
}
|
|
496
811
|
/** A single exposed model + the provider that serves it. */
|
|
497
812
|
interface ConfiguredModel {
|
|
813
|
+
schemaVersion: 1;
|
|
498
814
|
id: string;
|
|
815
|
+
aliases: string[];
|
|
499
816
|
label: string;
|
|
500
817
|
providerId: string;
|
|
501
818
|
providerLabel: string;
|
|
502
819
|
api: ModelProviderApi;
|
|
820
|
+
upstreamModelId: string;
|
|
821
|
+
deployment: ModelDeploymentV1;
|
|
822
|
+
executionLimits: ModelExecutionLimitsV1;
|
|
823
|
+
credentialSource: CredentialSourceV1;
|
|
824
|
+
billing: BillingAttributionV1;
|
|
825
|
+
capabilities: ModelCapabilitiesV1;
|
|
826
|
+
pricing?: ModelPricingScheduleV1 | undefined;
|
|
827
|
+
definitionVersion: string;
|
|
503
828
|
contextWindowTokens?: number | undefined;
|
|
504
829
|
effectiveContextWindowTokens?: number | undefined;
|
|
505
830
|
autoCompactTokenLimit?: number | undefined;
|
|
@@ -554,6 +879,13 @@ declare function builtinProviderId(settings: Pick<Settings, "openaiProvider">):
|
|
|
554
879
|
* id — validateSettings rejects that at boot.
|
|
555
880
|
*/
|
|
556
881
|
declare function configuredProviders(settings: Settings): ResolvedModelProvider[];
|
|
882
|
+
/**
|
|
883
|
+
* Pure catalog overlay for a workspace whose existing Codex connection seam
|
|
884
|
+
* reports ready. This describes product/provider identity only; it does not
|
|
885
|
+
* select, lease, refresh, or expose a concrete credential; those runtime
|
|
886
|
+
* operations remain owned by the credential allocator.
|
|
887
|
+
*/
|
|
888
|
+
declare function withCodexCatalogProvider(settings: Settings): Settings;
|
|
557
889
|
/**
|
|
558
890
|
* The provider identity a model id resolves to, for workspace model-policy
|
|
559
891
|
* evaluation — MUST agree with the real router (resolveTurnModel /
|
|
@@ -577,6 +909,8 @@ declare function policyProviderIdForModel(settings: Settings, modelId: string):
|
|
|
577
909
|
* first and the built-in allow-list takes precedence over registry entries.
|
|
578
910
|
*/
|
|
579
911
|
declare function configuredModels(settings: Settings): ConfiguredModel[];
|
|
912
|
+
/** Resolve a known canonical id or alias. Unknown strings are returned unchanged. */
|
|
913
|
+
declare function canonicalizeConfiguredModelId(settings: Settings, modelId: string): string;
|
|
580
914
|
/**
|
|
581
915
|
* Allowed model ids in selection order. Reimplemented on top of
|
|
582
916
|
* configuredModels so it is the union of the built-in allow-list and every
|
|
@@ -595,12 +929,46 @@ declare function resolveModelProvider(settings: Settings, modelId: string): {
|
|
|
595
929
|
provider: ResolvedModelProvider;
|
|
596
930
|
model: ConfiguredModel;
|
|
597
931
|
} | undefined;
|
|
932
|
+
type ResolveTurnExecutionPolicyV1Input = {
|
|
933
|
+
/** Effective persisted turn model. Aliases are accepted and canonicalized. */
|
|
934
|
+
modelId: string;
|
|
935
|
+
/** Exact caller-supplied input before canonicalization, only for explicit switches. */
|
|
936
|
+
requestedModelId: string | null;
|
|
937
|
+
modelSource: TurnExecutionModelSourceV1;
|
|
938
|
+
reasoningEffort: Settings["openaiReasoningEffort"];
|
|
939
|
+
reasoningSource: TurnExecutionReasoningSourceV1;
|
|
940
|
+
};
|
|
941
|
+
/**
|
|
942
|
+
* Build a trusted, secret-safe execution policy from the normalized catalog.
|
|
943
|
+
* The Codex overlay here contains static product/provider identity only; it
|
|
944
|
+
* neither proves readiness nor chooses, decrypts, leases, or exposes an account.
|
|
945
|
+
*/
|
|
946
|
+
declare function resolveTurnExecutionPolicyV1(settings: Settings, input: ResolveTurnExecutionPolicyV1Input): TurnExecutionPolicyV1;
|
|
947
|
+
/**
|
|
948
|
+
* Parse-time validation lives in @opengeni/contracts; this verifier binds a
|
|
949
|
+
* present snapshot to the current executable definition and exact turn row.
|
|
950
|
+
* Any deployment/provider drift fails before a provider or compaction call.
|
|
951
|
+
*/
|
|
952
|
+
declare function assertTurnExecutionPolicyMatchesConfigV1(settings: Settings, policy: TurnExecutionPolicyV1, expected: {
|
|
953
|
+
modelId: string;
|
|
954
|
+
reasoningEffort: Settings["openaiReasoningEffort"];
|
|
955
|
+
}): {
|
|
956
|
+
policy: TurnExecutionPolicyV1;
|
|
957
|
+
provider: ResolvedModelProvider;
|
|
958
|
+
model: ConfiguredModel;
|
|
959
|
+
};
|
|
598
960
|
/**
|
|
599
|
-
* Effective per-model pricing. Merge order (later wins):
|
|
600
|
-
*
|
|
601
|
-
*
|
|
961
|
+
* Effective per-model pricing schedules. Merge order (later wins): built-in
|
|
962
|
+
* flat defaults → registry model flat/scheduled pricing → explicit legacy flat
|
|
963
|
+
* OPENGENI_MODEL_PRICING_JSON. The explicit legacy map intentionally replaces
|
|
964
|
+
* a registry schedule with one flat default so its historical precedence stays
|
|
965
|
+
* exact.
|
|
602
966
|
*/
|
|
967
|
+
declare function configuredModelPricingSchedules(settings: Settings): Record<string, ModelPricingScheduleV1>;
|
|
968
|
+
/** Legacy flat projection: returns the default/below-threshold price. */
|
|
603
969
|
declare function configuredModelPricing(settings: Settings): Record<string, ModelPricing>;
|
|
970
|
+
/** Select the per-provider-request price at an exact input-token threshold. */
|
|
971
|
+
declare function selectModelPricing(schedule: ModelPricingScheduleV1, inputTokens: number): ModelPricing;
|
|
604
972
|
/**
|
|
605
973
|
* Usable input-token budget: an explicit model-catalog effective window when
|
|
606
974
|
* available, otherwise the deployment window minus its output reserve.
|
|
@@ -835,4 +1203,4 @@ interface NatsControlPlaneAuth {
|
|
|
835
1203
|
}
|
|
836
1204
|
declare function resolveNatsControlPlaneAuth(settings: Settings): NatsControlPlaneAuth | null;
|
|
837
1205
|
|
|
838
|
-
export { AGENT_INSTRUCTIONS_CORE_PLACEHOLDER, type ConfiguredModel, DEFAULT_AGENT_INSTRUCTIONS, type EntitlementsConfig, type IntegrationOAuthClientConfig, IntegrationOAuthClientConfigSchema, type McpServerConfig, type McpServerConnectionRef, McpServerConnectionRefSchema, type ModelPricing, ModelProviderApi, type ModelUsageInput, type NatsCalloutConfig, type NatsControlPlaneAuth, type RegistryProvider, RegistryProviderKind, type ResolvedModelProvider, SANDBOX_REQUIRED_ENV, type SandboxRequiredEnv, type Settings, type StartupRetryOptions, type StaticUsageLimitsConfig, type TemporalConnectionOptions, type TemporalTlsConnectionConfig, applyGitAuthPointerEnvironment, builtinProviderId, calculateModelUsageCostMicros, collectGitIdentityEnvironment, collectSandboxEnvironment, configuredAllowedModels, configuredAllowedReasoningEfforts, configuredEntitlements, configuredModelPricing, configuredModels, configuredProviders, configuredStaticUsageLimits, contextInputBudgetTokens, dbSearchPath, defaultModelPricing, effectiveModalIdleTimeoutSeconds, environmentsEncryptionKeyBytes, firstPartyMcpBaseUrl, firstPartyMcpWorkspaceUrl, getSettings, hasGitCredentialRepositorySelection, hasGitHubRepositorySelection, parseExposedPorts, parseIntegrationsOauthClientsJson, parseMcpServers, parseModelPricingJson, parseModelProvidersJson, parseSandboxWarmRateJson, parseStaticEntitlementsJson, parseStaticUsageLimitsJson, policyProviderIdForModel, requiredSandboxEnvForBackend, resolveEnrollmentSigningSecret, resolveModelProvider, resolveNatsCalloutConfig, resolveNatsControlPlaneAuth, resolveProviderApiKey, resolveRelayTokenSecret, resolveStreamTokenSecret, retryStartupDependency, sandboxEnvironmentVariableNames, sandboxLifecycleHookIds, sandboxPreparationProfiles, sandboxWarmRateMicrosPerSecond, settingsWithResolvedModelContext, stableSandboxEnvironmentForRun, startupRetryOptions, streamTokenDegraded, temporalConnectionOptions };
|
|
1206
|
+
export { AGENT_INSTRUCTIONS_CORE_PLACEHOLDER, type BillingAttributionV1, type CapabilityStateV1, CapabilityStateV1Schema, CapabilitySupportV1, type ConfiguredModel, type CredentialSourceV1, DEFAULT_AGENT_INSTRUCTIONS, type EntitlementsConfig, type IntegrationOAuthClientConfig, IntegrationOAuthClientConfigSchema, type McpServerConfig, type McpServerConnectionRef, McpServerConnectionRefSchema, type ModelCapabilitiesV1, ModelCapabilitiesV1Schema, type ModelDeploymentV1, type ModelExecutionLimitsV1, type ModelPricing, type ModelPricingScheduleV1, ModelProviderApi, type ModelUsageInput, type NatsCalloutConfig, type NatsControlPlaneAuth, type RegistryProvider, RegistryProviderKind, type ResolveTurnExecutionPolicyV1Input, type ResolvedModelProvider, SANDBOX_REQUIRED_ENV, type SandboxRequiredEnv, type Settings, type StartupRetryOptions, type StaticUsageLimitsConfig, type TemporalConnectionOptions, type TemporalTlsConnectionConfig, applyGitAuthPointerEnvironment, assertTurnExecutionPolicyMatchesConfigV1, builtinProviderId, calculateModelUsageCostMicros, canonicalizeConfiguredModelId, collectGitIdentityEnvironment, collectSandboxEnvironment, configuredAllowedModels, configuredAllowedReasoningEfforts, configuredEntitlements, configuredModelPricing, configuredModelPricingSchedules, configuredModels, configuredProviders, configuredStaticUsageLimits, contextInputBudgetTokens, dbSearchPath, defaultModelPricing, effectiveModalIdleTimeoutSeconds, environmentsEncryptionKeyBytes, firstPartyMcpBaseUrl, firstPartyMcpWorkspaceUrl, getSettings, hasGitCredentialRepositorySelection, hasGitHubRepositorySelection, parseExposedPorts, parseIntegrationsOauthClientsJson, parseMcpServers, parseModelPricingJson, parseModelProvidersJson, parseSandboxWarmRateJson, parseStaticEntitlementsJson, parseStaticUsageLimitsJson, policyProviderIdForModel, requiredSandboxEnvForBackend, resolveEnrollmentSigningSecret, resolveModelProvider, resolveNatsCalloutConfig, resolveNatsControlPlaneAuth, resolveProviderApiKey, resolveRelayTokenSecret, resolveStreamTokenSecret, resolveTurnExecutionPolicyV1, retryStartupDependency, sandboxEnvironmentVariableNames, sandboxLifecycleHookIds, sandboxPreparationProfiles, sandboxWarmRateMicrosPerSecond, selectModelPricing, settingsWithResolvedModelContext, stableSandboxEnvironmentForRun, startupRetryOptions, streamTokenDegraded, temporalConnectionOptions, withCodexCatalogProvider };
|