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