OptionalenableAgenticDocSelection?: booleanOnly read when enableV3PassFailRunner is on — it configures the v3 runner, not v2.
OptionalenableCoverageFacts?: booleanOptionalenableDeadlineResolution?: booleanOnly read when enableV3PassFailRunner is on — it configures the v3 runner, not v2.
OptionalenableDocumentCatalogue?: booleanOnly read when enableV3PassFailRunner is on — it configures the v3 runner, not v2.
OptionalenableEpisodePatientBlock?: booleanOptionalenableExpandedStatuses?: booleanOptionalenableIntentAwarePlanning?: booleanOptionalenableLatestPriorInstances?: booleanOnly read when enableV3PassFailRunner AND enableAgenticDocSelection are on.
OptionalenableMetadataAwareGate?: booleanOptionalenablePassFailRecheck?: booleanOptionalenablePerQuestionInstructions?: booleanOptionalenableQueryHydration?: booleanOptionalenableReviewCriteriaInDocumentSelection?: booleanOptionalenableRunConstantPrefix?: booleanOnly read when enableV3PassFailRunner is on — it configures the v3 runner, not v2.
OptionalenableSegmentInlining?: booleanOnly read when enableSubdocumentCatalogue is on — there are no selected forms without it.
OptionalenableSelectionRetry?: booleanOptionalenableStatusReconciliation?: booleanOptionalenableSubClaimFanOut?: booleanOnly read when enableV3PassFailRunner is on — it configures the v3 runner, not v2.
OptionalenableSubdocumentCatalogue?: booleanOnly read when enableV3PassFailRunner AND enableAgenticDocSelection are on.
OptionalenableSummaryTableShortcut?: booleanOptionalenableThinRetrievalBailout?: booleanOptionalenableTimeFilteringInChartReview?: booleanOptionalenableUnitCitationVerification?: booleanOnly read when enableCitationVerification is on — it narrows that check, it does not add one.
OptionalenableUnlockedRetrieval?: booleanOptionalenableV3PassFailRunner?: booleanOptionalenableV3SummaryRunner?: booleanOptionalopts: { model?: string; promptCacheKey?: string; temperature?: number }
Constructs the
ChatOpenAIinstance that powers a chart-review run.Defaults mirror v1 verbatim (gpt-4.1, temperature 0.1, no streaming, 3 retries).
maxTokensis sourced from the resolvedChartReviewSettingsso LD overrides flow through.model/temperatureexist for experiment harnesses (evals, the superadmin compare bench) that need to swap the model for one run; production leaves them unset. Gateway routing andls_*stamping are shared with V3 via@repo/ai/gateway.Lives here (rather than in the trpc handler) so the
@langchain/openaidependency stays confined to@repo/legacy.promptCacheKeyroutes same-prefix traffic to one machine so the automatic prompt cache is realized at volume. Pass it only from single-purpose call sites: the shared run-wide instance serves several prompts, and one key across different prefixes just dilutes the routing.