Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/mistralai/extra/observability/redaction_policies.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ def redact_status_description(self, description: str | None) -> str | None:
"password",
"payload",
"prompt",
"result",
"secret",
"set_cookie",
"token",
Expand Down
11 changes: 11 additions & 0 deletions src/mistralai/extra/tests/test_redaction_policies.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,17 @@ def test_fragment_match_redacted(self, attribute_policy: AttributeRedactionPolic
)
assert out["custom.prompt.text"] == DEFAULT_REDACTED_VALUE

def test_workflow_arguments_and_result_redacted(
self, attribute_policy: AttributeRedactionPolicy
):
out = attribute_policy.redact_attributes(
{"wf.arguments": "x", "wf.result": "x"}
)
assert out == {
"wf.arguments": DEFAULT_REDACTED_VALUE,
"wf.result": DEFAULT_REDACTED_VALUE,
}

def test_token_pattern_on_kept_string(
self, attribute_policy: AttributeRedactionPolicy
):
Expand Down
Loading