literally-aeo 0.1.1 → 0.2.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/README.md +42 -6
- package/dist/author-tools.js +33 -64
- package/dist/cli.mjs +2723 -1616
- package/dist/lib/agents/author-schema.js +4 -5
- package/dist/lib/agents/author-validation.js +5 -6
- package/dist/lib/agents/copy-validation.js +4 -5
- package/dist/lib/agents/verifier.js +8 -8
- package/dist/lib/analysis/domain-classifier.js +8 -8
- package/dist/lib/analysis/domain-labels.js +3 -4
- package/dist/lib/analysis/progress.js +3 -4
- package/dist/lib/analysis/sentiment.js +8 -8
- package/dist/lib/author/examples.js +5 -6
- package/dist/lib/bundle/contracts.js +5 -6
- package/dist/lib/bundle/export.js +22 -19
- package/dist/lib/bundle/isolation.js +17 -0
- package/dist/lib/bundle/journal.js +6 -7
- package/dist/lib/bundle/project-journal.js +11 -10
- package/dist/lib/bundle/project.js +19 -16
- package/dist/lib/bundle/read.js +23 -20
- package/dist/lib/bundle/recorder.js +9 -8
- package/dist/lib/bundle/redact.js +6 -7
- package/dist/lib/bundle/trace-coverage.js +6 -7
- package/dist/lib/bundle/verify-integrity.js +8 -9
- package/dist/lib/bundle/verify-measurement.js +10 -11
- package/dist/lib/bundle/verify-report.js +11 -12
- package/dist/lib/bundle/verify.js +17 -18
- package/dist/lib/bundle/writer-lock.js +3 -1
- package/dist/lib/capture-manifest.js +3 -4
- package/dist/lib/checks/run-checks.js +10 -9
- package/dist/lib/chunks/chunk-2B5QF6UQ.js +159 -0
- package/dist/lib/chunks/{chunk-ZBDUE3A5.js → chunk-2GU6CNQI.js} +12 -7
- package/dist/lib/chunks/{chunk-CKUTDJAB.js → chunk-2ROXN2EC.js} +42 -7
- package/dist/lib/chunks/{chunk-XHWRSGX3.js → chunk-3JO5TXBA.js} +1 -1
- package/dist/lib/chunks/{chunk-XL4JIQ5X.js → chunk-4PD65FRJ.js} +7 -3
- package/dist/lib/chunks/{chunk-GMKF2FU4.js → chunk-5JPYM4MD.js} +1 -1
- package/dist/lib/chunks/{chunk-5VNYUCLL.js → chunk-622NMXN6.js} +6 -9
- package/dist/lib/chunks/{chunk-XNRSHATN.js → chunk-663HABKP.js} +5 -5
- package/dist/lib/chunks/{chunk-RMFT4KKK.js → chunk-6G25V4CF.js} +1 -1
- package/dist/lib/chunks/{chunk-GVC4LH2N.js → chunk-6GHHNPFJ.js} +1 -1
- package/dist/lib/chunks/{chunk-KMRQSIZW.js → chunk-6GOBBNDU.js} +16 -1
- package/dist/lib/chunks/{chunk-SBAZBOPI.js → chunk-6P7EZJI7.js} +4 -2
- package/dist/lib/chunks/chunk-7XO3SQAX.js +117 -0
- package/dist/lib/chunks/{chunk-SWS3K62X.js → chunk-7Z27HQWL.js} +3 -3
- package/dist/lib/chunks/{chunk-IPNK7FYT.js → chunk-AYY4MYTW.js} +1 -1
- package/dist/lib/chunks/{chunk-WDSCJEDG.js → chunk-BE4ENGUY.js} +10 -10
- package/dist/lib/chunks/{chunk-FKLNEB2P.js → chunk-BGOIPHJZ.js} +39 -11
- package/dist/lib/chunks/{chunk-7GXRDAUY.js → chunk-BLKLPUYR.js} +2 -2
- package/dist/lib/chunks/chunk-BSRKN6FU.js +93 -0
- package/dist/lib/chunks/{chunk-PCYNBDZ7.js → chunk-CO5T6WU5.js} +14 -9
- package/dist/lib/chunks/{chunk-E3OEE5XN.js → chunk-CUYVHXHI.js} +2 -2
- package/dist/lib/chunks/{chunk-2GY42RIJ.js → chunk-D3GE3OCB.js} +1 -1
- package/dist/lib/chunks/chunk-DVFFYY5G.js +74 -0
- package/dist/lib/chunks/{chunk-ZXGATMMH.js → chunk-EBUQPCKB.js} +1 -1
- package/dist/lib/chunks/{chunk-4E4NDGOZ.js → chunk-EE26FNSY.js} +1 -1
- package/dist/lib/chunks/{chunk-AUB5THIS.js → chunk-EJ655TVU.js} +1 -1
- package/dist/lib/chunks/{chunk-S2AM76LT.js → chunk-F4W5YHDZ.js} +2 -2
- package/dist/lib/chunks/chunk-FAUFE7MI.js +31 -0
- package/dist/lib/chunks/{chunk-FNDJUELJ.js → chunk-FOCJ7HPC.js} +7 -7
- package/dist/lib/chunks/{chunk-FPAN3VRW.js → chunk-FUAUPNRO.js} +26 -18
- package/dist/lib/chunks/{chunk-OQVIRYT5.js → chunk-G62E525I.js} +2 -2
- package/dist/lib/chunks/{chunk-2NJEWPCV.js → chunk-GDKGZQ3T.js} +2 -2
- package/dist/lib/chunks/{chunk-HSZ3DM74.js → chunk-GEFKDW7X.js} +15 -2
- package/dist/lib/chunks/{chunk-47IZBMP2.js → chunk-GESHTTSA.js} +2 -2
- package/dist/lib/chunks/chunk-GNMFJ2OK.js +321 -0
- package/dist/lib/chunks/{chunk-NVBMIPXR.js → chunk-HFRAHG5C.js} +44 -26
- package/dist/lib/chunks/{chunk-MHAKYFDF.js → chunk-HQG63ZKO.js} +11 -11
- package/dist/lib/chunks/{chunk-OORO55OM.js → chunk-HTOD4W4E.js} +21 -6
- package/dist/lib/chunks/{chunk-Q2PWES4B.js → chunk-I3XGRGXE.js} +1 -1
- package/dist/lib/chunks/{chunk-WUELMJ22.js → chunk-IE7NAL6B.js} +1 -1
- package/dist/lib/chunks/{chunk-KRFHQQS7.js → chunk-JXMDOAKA.js} +17 -17
- package/dist/lib/chunks/{chunk-S7KJZIUR.js → chunk-KJMU5KH4.js} +2 -2
- package/dist/lib/chunks/{chunk-POUSX3T4.js → chunk-L7MEIRJB.js} +1 -1
- package/dist/lib/chunks/{chunk-CPT2GKKW.js → chunk-LOBXOZ2R.js} +1 -1
- package/dist/lib/chunks/{chunk-IAR6XGEW.js → chunk-ML4W6KC6.js} +1 -1
- package/dist/lib/chunks/{chunk-WKH6BJAZ.js → chunk-MNWO7EHC.js} +4 -4
- package/dist/lib/chunks/{chunk-D2LPQO6Y.js → chunk-MRL5RUP7.js} +1 -1
- package/dist/lib/chunks/{chunk-IEVAFDW7.js → chunk-NCXSNHXX.js} +3 -3
- package/dist/lib/chunks/{chunk-HFOYASRQ.js → chunk-NGHAP2P5.js} +4 -4
- package/dist/lib/chunks/{chunk-ZLOOC46D.js → chunk-OKL7GN2F.js} +3 -3
- package/dist/lib/chunks/{chunk-3DG7GHFA.js → chunk-OQU5IXAJ.js} +5 -5
- package/dist/lib/chunks/{chunk-I7VNIW6Q.js → chunk-OU73OUX4.js} +16 -10
- package/dist/lib/chunks/{chunk-56VOFZ7T.js → chunk-QHUDJVPJ.js} +90 -24
- package/dist/lib/chunks/{chunk-KHU5DRBE.js → chunk-QSJ4IKUF.js} +9 -9
- package/dist/lib/chunks/{chunk-FBFZBLTY.js → chunk-R6XDZWUL.js} +7 -8
- package/dist/lib/chunks/{chunk-CJ5YD3CU.js → chunk-RJ5R6YYA.js} +5 -5
- package/dist/lib/chunks/{chunk-LPND3VNQ.js → chunk-RR46EDDR.js} +33 -25
- package/dist/lib/chunks/chunk-RYCRL3YA.js +106 -0
- package/dist/lib/chunks/{chunk-Z4LMDKBU.js → chunk-SHUMCKCS.js} +2 -2
- package/dist/lib/chunks/{chunk-3EBWDHPK.js → chunk-TJQ5OPLQ.js} +10 -12
- package/dist/lib/chunks/chunk-U64NCRRR.js +97 -0
- package/dist/lib/chunks/chunk-U772TN32.js +67 -0
- package/dist/lib/chunks/{chunk-YR67JG2V.js → chunk-UEMZYHYJ.js} +8 -3
- package/dist/lib/chunks/{chunk-J46W3EMQ.js → chunk-UZJSTJFP.js} +5 -5
- package/dist/lib/chunks/{chunk-XJVXASDD.js → chunk-V7OAPKNF.js} +3 -3
- package/dist/lib/chunks/{chunk-WE2WPNG2.js → chunk-VKM6MMA4.js} +66 -7
- package/dist/lib/chunks/{chunk-YWJPJI3W.js → chunk-VL253W5C.js} +3 -1
- package/dist/lib/chunks/{chunk-MD4AVTK2.js → chunk-VPZQGND4.js} +3 -3
- package/dist/lib/chunks/{chunk-X2Y2ZNG3.js → chunk-W2VGLWTS.js} +3 -3
- package/dist/lib/chunks/{chunk-6AUEDSTU.js → chunk-W5DC23OP.js} +1 -1
- package/dist/lib/chunks/chunk-W5X7WJYL.js +91 -0
- package/dist/lib/chunks/{chunk-QFVRCSJ2.js → chunk-WDOA5JEH.js} +2 -0
- package/dist/lib/chunks/{chunk-I3TMFPK4.js → chunk-WVACVWBL.js} +2 -2
- package/dist/lib/chunks/{chunk-MIF5IYNR.js → chunk-XDG6NPJB.js} +26 -29
- package/dist/lib/chunks/{chunk-X6E44EGV.js → chunk-XR44YSHT.js} +2 -2
- package/dist/lib/chunks/chunk-Y2CZ6FZY.js +61 -0
- package/dist/lib/chunks/{chunk-5KKLUM7M.js → chunk-YAAUWCJ4.js} +1 -1
- package/dist/lib/chunks/{chunk-3KQFLOC7.js → chunk-YRBIC5QH.js} +1 -1
- package/dist/lib/chunks/chunk-ZIGNJAPC.js +11 -0
- package/dist/lib/cli/bundle-commands.js +71 -65
- package/dist/lib/cli/guide-command.js +25 -0
- package/dist/lib/cli/io.js +1 -1
- package/dist/lib/cli/run-commands.js +270 -104
- package/dist/lib/cli/status-command.js +234 -0
- package/dist/lib/codex-workflow/aggregate.js +8 -9
- package/dist/lib/codex-workflow/author-tools.js +6 -7
- package/dist/lib/codex-workflow/author.js +17 -17
- package/dist/lib/codex-workflow/capture.js +10 -9
- package/dist/lib/codex-workflow/checkpoint.js +6 -7
- package/dist/lib/codex-workflow/checks.js +6 -7
- package/dist/lib/codex-workflow/codex-binary.js +13 -0
- package/dist/lib/codex-workflow/codex-home.js +6 -3
- package/dist/lib/codex-workflow/copy-editor.js +14 -14
- package/dist/lib/codex-workflow/copy-recovery.js +3 -4
- package/dist/lib/codex-workflow/copy.js +11 -11
- package/dist/lib/codex-workflow/finish.js +17 -18
- package/dist/lib/codex-workflow/host-models.js +7 -7
- package/dist/lib/codex-workflow/loop.js +42 -38
- package/dist/lib/codex-workflow/quality.js +3 -4
- package/dist/lib/codex-workflow/run-inputs.js +5 -6
- package/dist/lib/codex-workflow/run-source.js +14 -13
- package/dist/lib/codex-workflow/schemas.js +5 -6
- package/dist/lib/codex-workflow/session.js +7 -8
- package/dist/lib/codex-workflow/stage.js +26 -23
- package/dist/lib/codex-workflow/workdir.js +6 -7
- package/dist/lib/engine/audit-file.js +7 -6
- package/dist/lib/engine/author.js +37 -31
- package/dist/lib/engine/budget.js +7 -1
- package/dist/lib/engine/cost-estimate.js +41 -0
- package/dist/lib/engine/local-run.js +48 -42
- package/dist/lib/engine/preflight.js +10 -6
- package/dist/lib/engine/rejudge.js +56 -50
- package/dist/lib/engine/resources.js +1 -1
- package/dist/lib/engine/run-configuration.js +2 -1
- package/dist/lib/engine/run-status.js +151 -0
- package/dist/lib/engine/templates.js +8 -7
- package/dist/lib/grounding/controller.js +7 -7
- package/dist/lib/grounding/extract.js +6 -6
- package/dist/lib/grounding/grounding-runtime.js +18 -17
- package/dist/lib/grounding/model.js +5 -5
- package/dist/lib/grounding/recorded-tools.js +10 -9
- package/dist/lib/harness/report/artifacts.js +4 -5
- package/dist/lib/lib/checkpoint.js +3 -4
- package/dist/lib/models/batching.js +5 -5
- package/dist/lib/models/cost-coefficients.js +20 -0
- package/dist/lib/models/local-profile.js +10 -0
- package/dist/lib/models/pricing.js +6 -0
- package/dist/lib/models/profiles.js +7 -14
- package/dist/lib/models/structured-images.js +1 -1
- package/dist/lib/models/structured.js +4 -4
- package/dist/lib/models/supported-models.js +20 -0
- package/dist/lib/pipeline.js +9 -8
- package/dist/lib/probes/agent-cli-parsers.js +1 -1
- package/dist/lib/probes/agent-clis.js +6 -5
- package/dist/lib/probes/charged-trace.js +10 -0
- package/dist/lib/probes/probes.js +6 -6
- package/dist/lib/runner.js +10 -10
- package/dist/lib/schema.js +3 -4
- package/dist/lib/section-result.js +3 -4
- package/dist/lib/stores/artifacts.js +3 -4
- package/dist/lib/stores/files.js +9 -9
- package/dist/lib/stores/local-versions.js +4 -5
- package/dist/lib/stores/memory.js +6 -7
- package/dist/lib/stores/publication.js +5 -6
- package/dist/lib/viewer/server.js +18 -19
- package/dist/lib/workflow/schema.js +2 -3
- package/dist/types/agents/copy-validation.d.ts +4 -4
- package/dist/types/agents/verifier.d.ts +6 -6
- package/dist/types/bundle/contracts.d.ts +1 -1
- package/dist/types/bundle/isolation.d.ts +37 -0
- package/dist/types/bundle/project-journal.d.ts +2 -0
- package/dist/types/bundle/recorder.d.ts +4 -0
- package/dist/types/bundle/writer-lock.d.ts +9 -0
- package/dist/types/cli/guide-command.d.ts +4 -0
- package/dist/types/cli/status-command.d.ts +2 -0
- package/dist/types/codex-workflow/codex-binary.d.ts +26 -0
- package/dist/types/codex-workflow/codex-home.d.ts +24 -20
- package/dist/types/codex-workflow/copy-editor.d.ts +1 -1
- package/dist/types/codex-workflow/copy.d.ts +3 -4
- package/dist/types/codex-workflow/finish.d.ts +5 -3
- package/dist/types/codex-workflow/host-models.d.ts +7 -3
- package/dist/types/codex-workflow/loop.d.ts +10 -1
- package/dist/types/codex-workflow/run-inputs.d.ts +28 -113
- package/dist/types/codex-workflow/stage.d.ts +16 -5
- package/dist/types/engine/audit-file.d.ts +3 -2
- package/dist/types/engine/author.d.ts +7 -1
- package/dist/types/engine/budget.d.ts +46 -15
- package/dist/types/engine/cost-estimate.d.ts +40 -0
- package/dist/types/engine/local-run.d.ts +6 -0
- package/dist/types/engine/preflight.d.ts +5 -0
- package/dist/types/engine/resources.d.ts +2 -0
- package/dist/types/engine/run-configuration.d.ts +4 -3
- package/dist/types/engine/run-status.d.ts +75 -0
- package/dist/types/engine/templates.d.ts +1 -2
- package/dist/types/models/cost-coefficients.d.ts +106 -0
- package/dist/types/models/local-profile.d.ts +12 -0
- package/dist/types/models/pricing.d.ts +8 -0
- package/dist/types/models/profiles.d.ts +55 -160
- package/dist/types/models/served-model.d.ts +2 -3
- package/dist/types/models/structured.d.ts +3 -3
- package/dist/types/models/supported-models.d.ts +48 -0
- package/dist/types/probes/charged-trace.d.ts +8 -0
- package/dist/types/probes/probe-trace.d.ts +2 -0
- package/dist/types/schema.d.ts +28 -113
- package/dist/types/workflow/schema.d.ts +79 -152
- package/package.json +2 -1
- package/resources/guide/OPERATOR.md +180 -0
- package/src/agents/copy-validation.ts +8 -12
- package/src/agents/verifier.ts +10 -14
- package/src/bundle/contracts.ts +3 -3
- package/src/bundle/isolation.ts +157 -0
- package/src/bundle/project-journal.ts +4 -0
- package/src/bundle/project.ts +20 -7
- package/src/bundle/recorder.ts +5 -0
- package/src/bundle/writer-lock.ts +27 -0
- package/src/cli/guide-command.ts +28 -0
- package/src/cli/io.ts +2 -0
- package/src/cli/literally-aeo.ts +39 -19
- package/src/cli/run-commands.ts +236 -18
- package/src/cli/status-command.ts +113 -0
- package/src/codex-workflow/codex-binary.ts +105 -0
- package/src/codex-workflow/codex-home.ts +50 -40
- package/src/codex-workflow/copy.ts +7 -10
- package/src/codex-workflow/finish.ts +13 -8
- package/src/codex-workflow/host-models.ts +33 -24
- package/src/codex-workflow/loop.ts +36 -9
- package/src/codex-workflow/stage.ts +126 -17
- package/src/engine/audit-file.ts +10 -8
- package/src/engine/author.ts +47 -2
- package/src/engine/budget.ts +138 -43
- package/src/engine/cost-estimate.ts +178 -0
- package/src/engine/guide/OPERATOR.md +180 -0
- package/src/engine/local-run.ts +38 -8
- package/src/engine/preflight.ts +90 -7
- package/src/engine/resources.ts +9 -4
- package/src/engine/run-configuration.ts +19 -1
- package/src/engine/run-status.ts +452 -0
- package/src/engine/templates.ts +5 -2
- package/src/models/cost-coefficients.ts +140 -0
- package/src/models/local-profile.ts +150 -0
- package/src/models/pricing.ts +31 -0
- package/src/models/profiles.ts +58 -419
- package/src/models/served-model.ts +2 -3
- package/src/models/structured-images.ts +5 -4
- package/src/models/structured.ts +20 -7
- package/src/models/supported-models.ts +112 -0
- package/src/probes/agent-clis.ts +24 -2
- package/src/probes/charged-trace.ts +87 -0
- package/src/probes/probe-trace.ts +2 -0
- package/src/probes/probes.ts +48 -2
- package/dist/lib/chunks/chunk-CFFPOTP4.js +0 -356
- package/dist/lib/chunks/chunk-LIZX4N3H.js +0 -110
- package/dist/lib/chunks/chunk-OYKV5NDM.js +0 -28
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import type { AeoSurface } from '../surfaces';
|
|
2
|
+
import type { TokenUsage } from './pricing';
|
|
3
|
+
export declare const costCoefficientsVersion = 1;
|
|
4
|
+
export type TokenRange = {
|
|
5
|
+
input: number;
|
|
6
|
+
output: number;
|
|
7
|
+
};
|
|
8
|
+
export type Range<T> = {
|
|
9
|
+
low: T;
|
|
10
|
+
high: T;
|
|
11
|
+
};
|
|
12
|
+
/** Codex stage tokens. `perAnswer` covers every stage that reads answer
|
|
13
|
+
* files; `perRun` the write stage, which reads the whole report. */
|
|
14
|
+
export declare const stageTokens: {
|
|
15
|
+
readonly perAnswer: {
|
|
16
|
+
readonly low: {
|
|
17
|
+
readonly input: 30000;
|
|
18
|
+
readonly output: 4000;
|
|
19
|
+
};
|
|
20
|
+
readonly high: {
|
|
21
|
+
readonly input: 90000;
|
|
22
|
+
readonly output: 16000;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
readonly perRun: {
|
|
26
|
+
readonly low: {
|
|
27
|
+
readonly input: 250000;
|
|
28
|
+
readonly output: 10000;
|
|
29
|
+
};
|
|
30
|
+
readonly high: {
|
|
31
|
+
readonly input: 900000;
|
|
32
|
+
readonly output: 40000;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
/** The share of stage input served from cache: high is cheap. The
|
|
36
|
+
* supported models reported none through the gateway in the spike. */
|
|
37
|
+
readonly cachedShare: {
|
|
38
|
+
readonly low: 0;
|
|
39
|
+
readonly high: 0.8;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
/** The one author session. */
|
|
43
|
+
export declare const authorTokens: {
|
|
44
|
+
readonly session: {
|
|
45
|
+
readonly low: {
|
|
46
|
+
readonly input: 250000;
|
|
47
|
+
readonly output: 10000;
|
|
48
|
+
};
|
|
49
|
+
readonly high: {
|
|
50
|
+
readonly input: 800000;
|
|
51
|
+
readonly output: 45000;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
/** The author's research searches at the low end; the high end is the
|
|
56
|
+
* research tools' own spend cap (`authorToolCaps.searchSpendUsd`). */
|
|
57
|
+
export declare const authorSearchLowUsd = 0.05;
|
|
58
|
+
/** The host's own model calls per captured answer, by grounding:
|
|
59
|
+
* perception, source labels and the copy verifier always; claim research
|
|
60
|
+
* and adjudication under full grounding. */
|
|
61
|
+
export declare const hostTokensPerAnswer: {
|
|
62
|
+
readonly extraction_only: {
|
|
63
|
+
readonly low: {
|
|
64
|
+
readonly input: 1500;
|
|
65
|
+
readonly output: 3000;
|
|
66
|
+
};
|
|
67
|
+
readonly high: {
|
|
68
|
+
readonly input: 8000;
|
|
69
|
+
readonly output: 12000;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
readonly full: {
|
|
73
|
+
readonly low: {
|
|
74
|
+
readonly input: 6000;
|
|
75
|
+
readonly output: 6000;
|
|
76
|
+
};
|
|
77
|
+
readonly high: {
|
|
78
|
+
readonly input: 24000;
|
|
79
|
+
readonly output: 18000;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
/** Grounding search per captured answer under full grounding. */
|
|
84
|
+
export declare const searchUsdPerAnswer: {
|
|
85
|
+
readonly low: 0.001;
|
|
86
|
+
readonly high: 0.01;
|
|
87
|
+
};
|
|
88
|
+
/** One probe unit, by surface, in USD. The coding-agent surfaces run on
|
|
89
|
+
* the operator's own login and bill nothing to the run. */
|
|
90
|
+
export declare const probeUsd: Record<AeoSurface, Range<number>>;
|
|
91
|
+
/** The calibrated workload a Codex session is: a batch of answer files
|
|
92
|
+
* (analyze, qualify, review), the whole report (write) or a brief
|
|
93
|
+
* (author). Each stage's descriptor names its own. */
|
|
94
|
+
export type SessionCost = 'answers' | 'report' | 'brief';
|
|
95
|
+
/**
|
|
96
|
+
* sessionReservation is what one Codex session is reserved at before it
|
|
97
|
+
* starts: the same high figures, cache share included, that the estimate's
|
|
98
|
+
* high end assumes, so a run under the cap the estimate recommends is never
|
|
99
|
+
* refused for its reservations. The session settles at the tokens it
|
|
100
|
+
* reports; its reservation bounds how far one session can carry the run
|
|
101
|
+
* past its cap.
|
|
102
|
+
*/
|
|
103
|
+
export declare const sessionReservation: ({ cost, answers, }: {
|
|
104
|
+
cost: SessionCost;
|
|
105
|
+
answers: number;
|
|
106
|
+
}) => TokenUsage;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type CodexStageModel, type InternalModelProfile } from './profiles';
|
|
2
|
+
import type { SupportedModel } from './supported-models';
|
|
3
|
+
/** The Codex stages' settings for a supported model. */
|
|
4
|
+
export declare const localStageModel: (model: SupportedModel) => CodexStageModel;
|
|
5
|
+
type LocalModelProfileOptions = {
|
|
6
|
+
/** Full grounding researches through the pinned search provider; it is
|
|
7
|
+
* pinned by the audit, never inferred from which credentials are set. */
|
|
8
|
+
searchProvider: InternalModelProfile['searchProvider'];
|
|
9
|
+
};
|
|
10
|
+
/** localModelProfile builds the profile a local run pins for `model`. */
|
|
11
|
+
export declare const localModelProfile: (model: SupportedModel, { searchProvider }: LocalModelProfileOptions) => InternalModelProfile;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ModelPricing } from './profiles';
|
|
2
|
+
export type TokenUsage = {
|
|
3
|
+
inputTokens: number;
|
|
4
|
+
/** Part of inputTokens, served from the provider's cache. */
|
|
5
|
+
cachedInputTokens: number;
|
|
6
|
+
outputTokens: number;
|
|
7
|
+
};
|
|
8
|
+
export declare const tokenCostUsd: (pricing: ModelPricing, usage: TokenUsage) => number;
|
|
@@ -1,44 +1,22 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
/**
|
|
3
|
-
|
|
4
|
-
* loop; since 2026-09-13 they resolve the same roles as their `-grounding-`
|
|
5
|
-
* siblings (the review roles that set them apart are retired). */
|
|
6
|
-
export declare const internalModelProfileIdSchema: z.ZodEnum<{
|
|
7
|
-
"opus-grounding-v1": "opus-grounding-v1";
|
|
8
|
-
"astra-grounding-v1": "astra-grounding-v1";
|
|
9
|
-
"opus-harness-v1": "opus-harness-v1";
|
|
10
|
-
"astra-harness-v1": "astra-harness-v1";
|
|
11
|
-
"glm-harness-v1": "glm-harness-v1";
|
|
12
|
-
"deepseek-harness-v1": "deepseek-harness-v1";
|
|
13
|
-
"deepseek-harness-v2": "deepseek-harness-v2";
|
|
14
|
-
}>;
|
|
2
|
+
/** A profile's ID: whatever its author named it. */
|
|
3
|
+
export declare const internalModelProfileIdSchema: z.ZodString;
|
|
15
4
|
export type InternalModelProfileId = z.infer<typeof internalModelProfileIdSchema>;
|
|
16
|
-
export declare const defaultInternalModelProfile: InternalModelProfileId;
|
|
17
|
-
/** The profile every admission pins, whatever the request named: every
|
|
18
|
-
* role, the copy premise verifier included, resolves to DeepSeek, so no
|
|
19
|
-
* judgment lands on a premium model (Andrei, 2026-09-13) and the copy
|
|
20
|
-
* receipt matches the role the publication gate re-checks. */
|
|
21
|
-
export declare const codexRunnerProfile: InternalModelProfileId;
|
|
22
|
-
/** The profile an operator configured for the host model steps of the local
|
|
23
|
-
* Codex workflow: `AEO_MODEL_PROFILE` (its older name
|
|
24
|
-
* `AEO_INTERNAL_MODEL_PROFILE` still reads), validated so a typo fails at
|
|
25
|
-
* startup. Pipeline admissions do not read it; they pin codexRunnerProfile. */
|
|
26
|
-
export declare const configuredModelProfileId: (env?: Record<string, string | undefined>) => InternalModelProfileId;
|
|
27
5
|
export declare const generationBackendSchema: z.ZodEnum<{
|
|
28
6
|
claude_code: "claude_code";
|
|
29
7
|
codex: "codex";
|
|
30
8
|
gateway: "gateway";
|
|
31
9
|
}>;
|
|
32
10
|
export type GenerationBackend = z.infer<typeof generationBackendSchema>;
|
|
11
|
+
export declare const modelPricingSchema: z.ZodObject<{
|
|
12
|
+
input: z.ZodNumber;
|
|
13
|
+
output: z.ZodNumber;
|
|
14
|
+
cachedInput: z.ZodNumber;
|
|
15
|
+
}, z.core.$strict>;
|
|
16
|
+
/** List prices, USD per million tokens. */
|
|
17
|
+
export type ModelPricing = z.infer<typeof modelPricingSchema>;
|
|
33
18
|
export declare const internalModelRoleSchema: z.ZodObject<{
|
|
34
|
-
model: z.
|
|
35
|
-
"anthropic/claude-opus-4.6": "anthropic/claude-opus-4.6";
|
|
36
|
-
"openai/gpt-6-astra": "openai/gpt-6-astra";
|
|
37
|
-
"zai/glm-5.3": "zai/glm-5.3";
|
|
38
|
-
"moonshotai/kimi-k3": "moonshotai/kimi-k3";
|
|
39
|
-
"deepseek/deepseek-v4.1-flash": "deepseek/deepseek-v4.1-flash";
|
|
40
|
-
"anthropic/claude-opus-5": "anthropic/claude-opus-5";
|
|
41
|
-
}>;
|
|
19
|
+
model: z.ZodString;
|
|
42
20
|
providerOptions: z.ZodObject<{
|
|
43
21
|
openai: z.ZodOptional<z.ZodObject<{
|
|
44
22
|
reasoningEffort: z.ZodLiteral<"high">;
|
|
@@ -65,20 +43,29 @@ export declare const internalModelRoleSchema: z.ZodObject<{
|
|
|
65
43
|
}, z.core.$strict>;
|
|
66
44
|
}, z.core.$strict>;
|
|
67
45
|
export type InternalModelRoleConfig = z.infer<typeof internalModelRoleSchema>;
|
|
46
|
+
/** The model the Codex stages run on, through the gateway: part of every
|
|
47
|
+
* stage's inputs digest and of the run's method. */
|
|
48
|
+
export declare const codexStageModelSchema: z.ZodObject<{
|
|
49
|
+
model: z.ZodString;
|
|
50
|
+
reasoningEffort: z.ZodEnum<{
|
|
51
|
+
high: "high";
|
|
52
|
+
medium: "medium";
|
|
53
|
+
xhigh: "xhigh";
|
|
54
|
+
}>;
|
|
55
|
+
contextWindow: z.ZodNumber;
|
|
56
|
+
pricingUsdPerMillion: z.ZodObject<{
|
|
57
|
+
input: z.ZodNumber;
|
|
58
|
+
output: z.ZodNumber;
|
|
59
|
+
cachedInput: z.ZodNumber;
|
|
60
|
+
}, z.core.$strict>;
|
|
61
|
+
}, z.core.$strict>;
|
|
62
|
+
export type CodexStageModel = z.infer<typeof codexStageModelSchema>;
|
|
68
63
|
export declare const researchSearchProviderSchema: z.ZodEnum<{
|
|
69
64
|
disabled: "disabled";
|
|
70
65
|
"dataforseo-google-organic-v1": "dataforseo-google-organic-v1";
|
|
71
66
|
}>;
|
|
72
67
|
export declare const internalModelProfileSchema: z.ZodObject<{
|
|
73
|
-
id: z.
|
|
74
|
-
"opus-grounding-v1": "opus-grounding-v1";
|
|
75
|
-
"astra-grounding-v1": "astra-grounding-v1";
|
|
76
|
-
"opus-harness-v1": "opus-harness-v1";
|
|
77
|
-
"astra-harness-v1": "astra-harness-v1";
|
|
78
|
-
"glm-harness-v1": "glm-harness-v1";
|
|
79
|
-
"deepseek-harness-v1": "deepseek-harness-v1";
|
|
80
|
-
"deepseek-harness-v2": "deepseek-harness-v2";
|
|
81
|
-
}>;
|
|
68
|
+
id: z.ZodString;
|
|
82
69
|
version: z.ZodLiteral<1>;
|
|
83
70
|
pricingCheckedAt: z.ZodISODate;
|
|
84
71
|
searchProvider: z.ZodEnum<{
|
|
@@ -87,14 +74,7 @@ export declare const internalModelProfileSchema: z.ZodObject<{
|
|
|
87
74
|
}>;
|
|
88
75
|
roles: z.ZodObject<{
|
|
89
76
|
analyzer: z.ZodObject<{
|
|
90
|
-
model: z.
|
|
91
|
-
"anthropic/claude-opus-4.6": "anthropic/claude-opus-4.6";
|
|
92
|
-
"openai/gpt-6-astra": "openai/gpt-6-astra";
|
|
93
|
-
"zai/glm-5.3": "zai/glm-5.3";
|
|
94
|
-
"moonshotai/kimi-k3": "moonshotai/kimi-k3";
|
|
95
|
-
"deepseek/deepseek-v4.1-flash": "deepseek/deepseek-v4.1-flash";
|
|
96
|
-
"anthropic/claude-opus-5": "anthropic/claude-opus-5";
|
|
97
|
-
}>;
|
|
77
|
+
model: z.ZodString;
|
|
98
78
|
providerOptions: z.ZodObject<{
|
|
99
79
|
openai: z.ZodOptional<z.ZodObject<{
|
|
100
80
|
reasoningEffort: z.ZodLiteral<"high">;
|
|
@@ -121,14 +101,7 @@ export declare const internalModelProfileSchema: z.ZodObject<{
|
|
|
121
101
|
}, z.core.$strict>;
|
|
122
102
|
}, z.core.$strict>;
|
|
123
103
|
perception: z.ZodObject<{
|
|
124
|
-
model: z.
|
|
125
|
-
"anthropic/claude-opus-4.6": "anthropic/claude-opus-4.6";
|
|
126
|
-
"openai/gpt-6-astra": "openai/gpt-6-astra";
|
|
127
|
-
"zai/glm-5.3": "zai/glm-5.3";
|
|
128
|
-
"moonshotai/kimi-k3": "moonshotai/kimi-k3";
|
|
129
|
-
"deepseek/deepseek-v4.1-flash": "deepseek/deepseek-v4.1-flash";
|
|
130
|
-
"anthropic/claude-opus-5": "anthropic/claude-opus-5";
|
|
131
|
-
}>;
|
|
104
|
+
model: z.ZodString;
|
|
132
105
|
providerOptions: z.ZodObject<{
|
|
133
106
|
openai: z.ZodOptional<z.ZodObject<{
|
|
134
107
|
reasoningEffort: z.ZodLiteral<"high">;
|
|
@@ -155,14 +128,7 @@ export declare const internalModelProfileSchema: z.ZodObject<{
|
|
|
155
128
|
}, z.core.$strict>;
|
|
156
129
|
}, z.core.$strict>;
|
|
157
130
|
research: z.ZodObject<{
|
|
158
|
-
model: z.
|
|
159
|
-
"anthropic/claude-opus-4.6": "anthropic/claude-opus-4.6";
|
|
160
|
-
"openai/gpt-6-astra": "openai/gpt-6-astra";
|
|
161
|
-
"zai/glm-5.3": "zai/glm-5.3";
|
|
162
|
-
"moonshotai/kimi-k3": "moonshotai/kimi-k3";
|
|
163
|
-
"deepseek/deepseek-v4.1-flash": "deepseek/deepseek-v4.1-flash";
|
|
164
|
-
"anthropic/claude-opus-5": "anthropic/claude-opus-5";
|
|
165
|
-
}>;
|
|
131
|
+
model: z.ZodString;
|
|
166
132
|
providerOptions: z.ZodObject<{
|
|
167
133
|
openai: z.ZodOptional<z.ZodObject<{
|
|
168
134
|
reasoningEffort: z.ZodLiteral<"high">;
|
|
@@ -189,14 +155,7 @@ export declare const internalModelProfileSchema: z.ZodObject<{
|
|
|
189
155
|
}, z.core.$strict>;
|
|
190
156
|
}, z.core.$strict>;
|
|
191
157
|
adjudication: z.ZodObject<{
|
|
192
|
-
model: z.
|
|
193
|
-
"anthropic/claude-opus-4.6": "anthropic/claude-opus-4.6";
|
|
194
|
-
"openai/gpt-6-astra": "openai/gpt-6-astra";
|
|
195
|
-
"zai/glm-5.3": "zai/glm-5.3";
|
|
196
|
-
"moonshotai/kimi-k3": "moonshotai/kimi-k3";
|
|
197
|
-
"deepseek/deepseek-v4.1-flash": "deepseek/deepseek-v4.1-flash";
|
|
198
|
-
"anthropic/claude-opus-5": "anthropic/claude-opus-5";
|
|
199
|
-
}>;
|
|
158
|
+
model: z.ZodString;
|
|
200
159
|
providerOptions: z.ZodObject<{
|
|
201
160
|
openai: z.ZodOptional<z.ZodObject<{
|
|
202
161
|
reasoningEffort: z.ZodLiteral<"high">;
|
|
@@ -223,14 +182,7 @@ export declare const internalModelProfileSchema: z.ZodObject<{
|
|
|
223
182
|
}, z.core.$strict>;
|
|
224
183
|
}, z.core.$strict>;
|
|
225
184
|
premiseVerifier: z.ZodObject<{
|
|
226
|
-
model: z.
|
|
227
|
-
"anthropic/claude-opus-4.6": "anthropic/claude-opus-4.6";
|
|
228
|
-
"openai/gpt-6-astra": "openai/gpt-6-astra";
|
|
229
|
-
"zai/glm-5.3": "zai/glm-5.3";
|
|
230
|
-
"moonshotai/kimi-k3": "moonshotai/kimi-k3";
|
|
231
|
-
"deepseek/deepseek-v4.1-flash": "deepseek/deepseek-v4.1-flash";
|
|
232
|
-
"anthropic/claude-opus-5": "anthropic/claude-opus-5";
|
|
233
|
-
}>;
|
|
185
|
+
model: z.ZodString;
|
|
234
186
|
providerOptions: z.ZodObject<{
|
|
235
187
|
openai: z.ZodOptional<z.ZodObject<{
|
|
236
188
|
reasoningEffort: z.ZodLiteral<"high">;
|
|
@@ -257,14 +209,7 @@ export declare const internalModelProfileSchema: z.ZodObject<{
|
|
|
257
209
|
}, z.core.$strict>;
|
|
258
210
|
}, z.core.$strict>;
|
|
259
211
|
author: z.ZodObject<{
|
|
260
|
-
model: z.
|
|
261
|
-
"anthropic/claude-opus-4.6": "anthropic/claude-opus-4.6";
|
|
262
|
-
"openai/gpt-6-astra": "openai/gpt-6-astra";
|
|
263
|
-
"zai/glm-5.3": "zai/glm-5.3";
|
|
264
|
-
"moonshotai/kimi-k3": "moonshotai/kimi-k3";
|
|
265
|
-
"deepseek/deepseek-v4.1-flash": "deepseek/deepseek-v4.1-flash";
|
|
266
|
-
"anthropic/claude-opus-5": "anthropic/claude-opus-5";
|
|
267
|
-
}>;
|
|
212
|
+
model: z.ZodString;
|
|
268
213
|
providerOptions: z.ZodObject<{
|
|
269
214
|
openai: z.ZodOptional<z.ZodObject<{
|
|
270
215
|
reasoningEffort: z.ZodLiteral<"high">;
|
|
@@ -291,14 +236,7 @@ export declare const internalModelProfileSchema: z.ZodObject<{
|
|
|
291
236
|
}, z.core.$strict>;
|
|
292
237
|
}, z.core.$strict>;
|
|
293
238
|
copy: z.ZodObject<{
|
|
294
|
-
model: z.
|
|
295
|
-
"anthropic/claude-opus-4.6": "anthropic/claude-opus-4.6";
|
|
296
|
-
"openai/gpt-6-astra": "openai/gpt-6-astra";
|
|
297
|
-
"zai/glm-5.3": "zai/glm-5.3";
|
|
298
|
-
"moonshotai/kimi-k3": "moonshotai/kimi-k3";
|
|
299
|
-
"deepseek/deepseek-v4.1-flash": "deepseek/deepseek-v4.1-flash";
|
|
300
|
-
"anthropic/claude-opus-5": "anthropic/claude-opus-5";
|
|
301
|
-
}>;
|
|
239
|
+
model: z.ZodString;
|
|
302
240
|
providerOptions: z.ZodObject<{
|
|
303
241
|
openai: z.ZodOptional<z.ZodObject<{
|
|
304
242
|
reasoningEffort: z.ZodLiteral<"high">;
|
|
@@ -325,14 +263,7 @@ export declare const internalModelProfileSchema: z.ZodObject<{
|
|
|
325
263
|
}, z.core.$strict>;
|
|
326
264
|
}, z.core.$strict>;
|
|
327
265
|
domainClassifier: z.ZodObject<{
|
|
328
|
-
model: z.
|
|
329
|
-
"anthropic/claude-opus-4.6": "anthropic/claude-opus-4.6";
|
|
330
|
-
"openai/gpt-6-astra": "openai/gpt-6-astra";
|
|
331
|
-
"zai/glm-5.3": "zai/glm-5.3";
|
|
332
|
-
"moonshotai/kimi-k3": "moonshotai/kimi-k3";
|
|
333
|
-
"deepseek/deepseek-v4.1-flash": "deepseek/deepseek-v4.1-flash";
|
|
334
|
-
"anthropic/claude-opus-5": "anthropic/claude-opus-5";
|
|
335
|
-
}>;
|
|
266
|
+
model: z.ZodString;
|
|
336
267
|
providerOptions: z.ZodObject<{
|
|
337
268
|
openai: z.ZodOptional<z.ZodObject<{
|
|
338
269
|
reasoningEffort: z.ZodLiteral<"high">;
|
|
@@ -359,14 +290,7 @@ export declare const internalModelProfileSchema: z.ZodObject<{
|
|
|
359
290
|
}, z.core.$strict>;
|
|
360
291
|
}, z.core.$strict>;
|
|
361
292
|
logoDiscovery: z.ZodOptional<z.ZodObject<{
|
|
362
|
-
model: z.
|
|
363
|
-
"anthropic/claude-opus-4.6": "anthropic/claude-opus-4.6";
|
|
364
|
-
"openai/gpt-6-astra": "openai/gpt-6-astra";
|
|
365
|
-
"zai/glm-5.3": "zai/glm-5.3";
|
|
366
|
-
"moonshotai/kimi-k3": "moonshotai/kimi-k3";
|
|
367
|
-
"deepseek/deepseek-v4.1-flash": "deepseek/deepseek-v4.1-flash";
|
|
368
|
-
"anthropic/claude-opus-5": "anthropic/claude-opus-5";
|
|
369
|
-
}>;
|
|
293
|
+
model: z.ZodString;
|
|
370
294
|
providerOptions: z.ZodObject<{
|
|
371
295
|
openai: z.ZodOptional<z.ZodObject<{
|
|
372
296
|
reasoningEffort: z.ZodLiteral<"high">;
|
|
@@ -393,14 +317,7 @@ export declare const internalModelProfileSchema: z.ZodObject<{
|
|
|
393
317
|
}, z.core.$strict>;
|
|
394
318
|
}, z.core.$strict>>;
|
|
395
319
|
competitorClassifier: z.ZodOptional<z.ZodObject<{
|
|
396
|
-
model: z.
|
|
397
|
-
"anthropic/claude-opus-4.6": "anthropic/claude-opus-4.6";
|
|
398
|
-
"openai/gpt-6-astra": "openai/gpt-6-astra";
|
|
399
|
-
"zai/glm-5.3": "zai/glm-5.3";
|
|
400
|
-
"moonshotai/kimi-k3": "moonshotai/kimi-k3";
|
|
401
|
-
"deepseek/deepseek-v4.1-flash": "deepseek/deepseek-v4.1-flash";
|
|
402
|
-
"anthropic/claude-opus-5": "anthropic/claude-opus-5";
|
|
403
|
-
}>;
|
|
320
|
+
model: z.ZodString;
|
|
404
321
|
providerOptions: z.ZodObject<{
|
|
405
322
|
openai: z.ZodOptional<z.ZodObject<{
|
|
406
323
|
reasoningEffort: z.ZodLiteral<"high">;
|
|
@@ -427,14 +344,7 @@ export declare const internalModelProfileSchema: z.ZodObject<{
|
|
|
427
344
|
}, z.core.$strict>;
|
|
428
345
|
}, z.core.$strict>>;
|
|
429
346
|
scrutiny: z.ZodOptional<z.ZodObject<{
|
|
430
|
-
model: z.
|
|
431
|
-
"anthropic/claude-opus-4.6": "anthropic/claude-opus-4.6";
|
|
432
|
-
"openai/gpt-6-astra": "openai/gpt-6-astra";
|
|
433
|
-
"zai/glm-5.3": "zai/glm-5.3";
|
|
434
|
-
"moonshotai/kimi-k3": "moonshotai/kimi-k3";
|
|
435
|
-
"deepseek/deepseek-v4.1-flash": "deepseek/deepseek-v4.1-flash";
|
|
436
|
-
"anthropic/claude-opus-5": "anthropic/claude-opus-5";
|
|
437
|
-
}>;
|
|
347
|
+
model: z.ZodString;
|
|
438
348
|
providerOptions: z.ZodObject<{
|
|
439
349
|
openai: z.ZodOptional<z.ZodObject<{
|
|
440
350
|
reasoningEffort: z.ZodLiteral<"high">;
|
|
@@ -461,14 +371,7 @@ export declare const internalModelProfileSchema: z.ZodObject<{
|
|
|
461
371
|
}, z.core.$strict>;
|
|
462
372
|
}, z.core.$strict>>;
|
|
463
373
|
repairPlanner: z.ZodOptional<z.ZodObject<{
|
|
464
|
-
model: z.
|
|
465
|
-
"anthropic/claude-opus-4.6": "anthropic/claude-opus-4.6";
|
|
466
|
-
"openai/gpt-6-astra": "openai/gpt-6-astra";
|
|
467
|
-
"zai/glm-5.3": "zai/glm-5.3";
|
|
468
|
-
"moonshotai/kimi-k3": "moonshotai/kimi-k3";
|
|
469
|
-
"deepseek/deepseek-v4.1-flash": "deepseek/deepseek-v4.1-flash";
|
|
470
|
-
"anthropic/claude-opus-5": "anthropic/claude-opus-5";
|
|
471
|
-
}>;
|
|
374
|
+
model: z.ZodString;
|
|
472
375
|
providerOptions: z.ZodObject<{
|
|
473
376
|
openai: z.ZodOptional<z.ZodObject<{
|
|
474
377
|
reasoningEffort: z.ZodLiteral<"high">;
|
|
@@ -495,14 +398,7 @@ export declare const internalModelProfileSchema: z.ZodObject<{
|
|
|
495
398
|
}, z.core.$strict>;
|
|
496
399
|
}, z.core.$strict>>;
|
|
497
400
|
visualReviewer: z.ZodOptional<z.ZodObject<{
|
|
498
|
-
model: z.
|
|
499
|
-
"anthropic/claude-opus-4.6": "anthropic/claude-opus-4.6";
|
|
500
|
-
"openai/gpt-6-astra": "openai/gpt-6-astra";
|
|
501
|
-
"zai/glm-5.3": "zai/glm-5.3";
|
|
502
|
-
"moonshotai/kimi-k3": "moonshotai/kimi-k3";
|
|
503
|
-
"deepseek/deepseek-v4.1-flash": "deepseek/deepseek-v4.1-flash";
|
|
504
|
-
"anthropic/claude-opus-5": "anthropic/claude-opus-5";
|
|
505
|
-
}>;
|
|
401
|
+
model: z.ZodString;
|
|
506
402
|
providerOptions: z.ZodObject<{
|
|
507
403
|
openai: z.ZodOptional<z.ZodObject<{
|
|
508
404
|
reasoningEffort: z.ZodLiteral<"high">;
|
|
@@ -529,23 +425,22 @@ export declare const internalModelProfileSchema: z.ZodObject<{
|
|
|
529
425
|
}, z.core.$strict>;
|
|
530
426
|
}, z.core.$strict>>;
|
|
531
427
|
}, z.core.$strict>;
|
|
428
|
+
stages: z.ZodOptional<z.ZodObject<{
|
|
429
|
+
model: z.ZodString;
|
|
430
|
+
reasoningEffort: z.ZodEnum<{
|
|
431
|
+
high: "high";
|
|
432
|
+
medium: "medium";
|
|
433
|
+
xhigh: "xhigh";
|
|
434
|
+
}>;
|
|
435
|
+
contextWindow: z.ZodNumber;
|
|
436
|
+
pricingUsdPerMillion: z.ZodObject<{
|
|
437
|
+
input: z.ZodNumber;
|
|
438
|
+
output: z.ZodNumber;
|
|
439
|
+
cachedInput: z.ZodNumber;
|
|
440
|
+
}, z.core.$strict>;
|
|
441
|
+
}, z.core.$strict>>;
|
|
532
442
|
}, z.core.$strict>;
|
|
533
443
|
export type InternalModelProfile = z.infer<typeof internalModelProfileSchema>;
|
|
534
444
|
export type InternalModelRole = keyof InternalModelProfile['roles'];
|
|
535
|
-
/** The model family behind a role. A profile picks one family for its text
|
|
536
|
-
* roles, one for the vision role (logo discovery) and one for domain
|
|
537
|
-
* classification. Gateway list prices, USD per million tokens, checked on
|
|
538
|
-
* `pricingCheckedAt`. */
|
|
539
|
-
type ModelFamily = 'opus' | 'astra' | 'glm' | 'kimi' | 'deepseek' | 'opus5';
|
|
540
|
-
export declare const parseInternalModelProfileId: (id: string) => {
|
|
541
|
-
family: ModelFamily;
|
|
542
|
-
version: number;
|
|
543
|
-
};
|
|
544
|
-
/**
|
|
545
|
-
* resolveInternalModelProfile runs once at admission; the complete snapshot is
|
|
546
|
-
* persisted for every retry.
|
|
547
|
-
*/
|
|
548
|
-
export declare const resolveInternalModelProfile: (id?: InternalModelProfileId, env?: Record<string, string | undefined>) => InternalModelProfile;
|
|
549
445
|
export declare const internalModelProfileDigest: (profile: InternalModelProfile) => string;
|
|
550
446
|
export declare const internalModelRoleDigest: (roleConfig: InternalModelRoleConfig) => string;
|
|
551
|
-
export {};
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
* the provider names none, so a value equal to the request proves nothing and
|
|
5
5
|
* is recorded as unknown (specs/aeo-open-source-cli-spec.md §7.1: observed
|
|
6
6
|
* identity is never filled from the requested model). The gateway names the
|
|
7
|
-
* upstream route when it has one
|
|
8
|
-
*
|
|
9
|
-
* `deepseek/deepseek-v4.1-flash`.
|
|
7
|
+
* upstream route when it has one: an upstream provider's own name for the
|
|
8
|
+
* model it served.
|
|
10
9
|
*/
|
|
11
10
|
export declare const servedModelOf: (requestedModel: string, responseModelId: string | undefined) => string | undefined;
|
|
@@ -92,9 +92,9 @@ export type StructuredTransport = {
|
|
|
92
92
|
* A pinned profile names the gateway routes a family may use (`gateway.only`);
|
|
93
93
|
* `AEO_GATEWAY_ROUTE_DENYLIST` (comma-separated route names) removes routes from
|
|
94
94
|
* that list at call time without touching the pin, because route health is
|
|
95
|
-
* operational, not part of what was admitted
|
|
96
|
-
*
|
|
97
|
-
*
|
|
95
|
+
* operational, not part of what was admitted: a route can pass a one-object
|
|
96
|
+
* probe and then refuse a real request with no output, on an execution whose
|
|
97
|
+
* pin already names it. A
|
|
98
98
|
* denylist that would empty the allowlist is ignored rather than dispatching
|
|
99
99
|
* with none.
|
|
100
100
|
*/
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const supportedModelSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
label: z.ZodString;
|
|
5
|
+
pricingUsdPerMillion: z.ZodObject<{
|
|
6
|
+
input: z.ZodNumber;
|
|
7
|
+
output: z.ZodNumber;
|
|
8
|
+
cachedInput: z.ZodNumber;
|
|
9
|
+
}, z.core.$strict>;
|
|
10
|
+
pricingCheckedAt: z.ZodISODate;
|
|
11
|
+
contextWindow: z.ZodNumber;
|
|
12
|
+
maxOutputTokens: z.ZodNumber;
|
|
13
|
+
thinkingInOutput: z.ZodBoolean;
|
|
14
|
+
providerOptions: z.ZodObject<{
|
|
15
|
+
openai: z.ZodOptional<z.ZodObject<{
|
|
16
|
+
reasoningEffort: z.ZodLiteral<"high">;
|
|
17
|
+
}, z.core.$strict>>;
|
|
18
|
+
gateway: z.ZodOptional<z.ZodObject<{
|
|
19
|
+
reasoning: z.ZodUnion<readonly [z.ZodObject<{
|
|
20
|
+
effort: z.ZodLiteral<"high">;
|
|
21
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
22
|
+
max_tokens: z.ZodNumber;
|
|
23
|
+
}, z.core.$strict>]>;
|
|
24
|
+
only: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
25
|
+
}, z.core.$strict>>;
|
|
26
|
+
}, z.core.$strict>;
|
|
27
|
+
stageReasoningEffort: z.ZodEnum<{
|
|
28
|
+
high: "high";
|
|
29
|
+
medium: "medium";
|
|
30
|
+
xhigh: "xhigh";
|
|
31
|
+
}>;
|
|
32
|
+
stageRuntimeVerifiedAt: z.ZodNullable<z.ZodISODate>;
|
|
33
|
+
}, z.core.$strict>;
|
|
34
|
+
export type SupportedModel = z.infer<typeof supportedModelSchema>;
|
|
35
|
+
export declare const supportedModels: readonly SupportedModel[];
|
|
36
|
+
/** The model a run uses when audit.json names none: the strongest the
|
|
37
|
+
* engine supports, because judgment and copy quality are the report. */
|
|
38
|
+
export declare const recommendedModelId = "anthropic/claude-opus-5.5";
|
|
39
|
+
/** The supported models as a list a person or an agent can read. */
|
|
40
|
+
export declare const describeSupportedModels: () => string[];
|
|
41
|
+
/** findSupportedModel returns the list's entry for a gateway model ID. */
|
|
42
|
+
export declare const findSupportedModel: (id: string) => SupportedModel | undefined;
|
|
43
|
+
export declare class UnsupportedModelError extends Error {
|
|
44
|
+
constructor(id: string);
|
|
45
|
+
}
|
|
46
|
+
/** resolveSupportedModel returns the entry a run uses: the named model, or
|
|
47
|
+
* the recommended one when none is named. An unknown ID is refused. */
|
|
48
|
+
export declare const resolveSupportedModel: (id?: string) => SupportedModel;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ModelBudgetError, type ModelCallAccounting } from '../models/accounting';
|
|
2
|
+
import type { ProbeTrace } from './probe-trace';
|
|
3
|
+
export type ChargedTrace = {
|
|
4
|
+
trace: ProbeTrace;
|
|
5
|
+
/** The first refusal of the cap, once an attempt was refused. */
|
|
6
|
+
exhausted: () => ModelBudgetError | undefined;
|
|
7
|
+
};
|
|
8
|
+
export declare const chargedProbeTrace: (trace: ProbeTrace, ledger: ModelCallAccounting) => ChargedTrace;
|
|
@@ -19,6 +19,8 @@ export type ProbeAttemptEnd = {
|
|
|
19
19
|
requestedModel: string | null;
|
|
20
20
|
reportedModel?: string;
|
|
21
21
|
noOverview?: true;
|
|
22
|
+
/** What the provider reported the attempt cost, when it did. */
|
|
23
|
+
costUsd?: number;
|
|
22
24
|
} | {
|
|
23
25
|
outcome: 'failed' | 'cancelled';
|
|
24
26
|
kind: string;
|