inspect_ai.viewer
Viewer
ViewerConfig
Top-level viewer configuration.
scanner_result_view keys are fnmatch-style glob patterns ("*", "audit_*", exact names). Pass a ScannerResultView to apply a single configuration to every scanner.
class ViewerConfig(BaseModel)Attributes
scanner_result_viewScannerResultView | dict[str, ScannerResultView]-
Glob-keyed map from scanner name pattern to its sidebar config. May also be a bare ScannerResultView.
Scanner Results
ScannerResultView
How the scann results should render the results.
class ScannerResultView(BaseModel)Attributes
fieldslist[ScannerResultField | MetadataField | str] | None-
Ordered list of sections to render. List order is render order;
Nonemeans fall back to the built-in default order. exclude_fieldslist[ScannerResultField | MetadataField | str]-
Fields to suppress. For a ScannerResultField entry, the matching section is removed from the resolved
fieldslist (useful to subtract from the default order). For a MetadataField entry, the key is additionally removed from the genericmetadatasection’s dump.
Fields
MetadataField
A metadata key promoted out of metadata into a top level value.
class MetadataField(BaseModel)Attributes
keystr-
The
metadata[key]entry to promote into its own section. labelstr | None-
Override the section header text. Defaults to
keywhen unset. collapsedbool-
Whether the field should be collapsed by default.
ScannerResultField
A built-in scanner-result section (e.g. value, explanation).
class ScannerResultField(BaseModel)Attributes
nameLiteral['explanation', 'label', 'value', 'validation', 'answer', 'metadata']-
Which built-in section to render.
labelstr | None-
Override the section header text (e.g.
"Explanation" → "Rationale"). collapsedbool-
Whether the field should be collapsed by default.