Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,18 @@ class SpanAttributes:

# Watson/genai LLM
GEN_AI_WATSONX_DECODING_METHOD = "llm.watsonx.decoding_method"

GEN_AI_WATSONX_RANDOM_SEED = "llm.watsonx.random_seed"
GEN_AI_WATSONX_MAX_NEW_TOKENS = "llm.watsonx.max_new_tokens"
GEN_AI_WATSONX_MIN_NEW_TOKENS = "llm.watsonx.min_new_tokens"
GEN_AI_WATSONX_REPETITION_PENALTY = "llm.watsonx.repetition_penalty"

# External work receipt references (opt-in) - see issue 4340
AIPOU_WORK_RECEIPT_ID = "aipou.work_receipt_id"
AIPOU_EVIDENCE_CLASS = "aipou.evidence_class"
AIPOU_SCHEME = "aipou.scheme"
AIPOU_VALIDATION_STATUS = "aipou.validation_status"

# -----------------------------------------------------------------------
# Legacy LLM_* aliases (old names with original string values)
# These constants were removed or renamed in v0.5.0.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -439,3 +439,27 @@ def test_watsonx_metrics_kept(self):
assert Meters.LLM_WATSONX_COMPLETIONS_EXCEPTIONS == "llm.watsonx.completions.exceptions"
assert Meters.LLM_WATSONX_COMPLETIONS_RESPONSES == "llm.watsonx.completions.responses"
assert Meters.LLM_WATSONX_COMPLETIONS_TOKENS == "llm.watsonx.completions.tokens"
# ---------------------------------------------------------------------------
# SpanAttributes — AIPOU external work-receipt reference (opt-in, issue #4340)
# ---------------------------------------------------------------------------


class TestSpanAttributesAIPOU:
"""
AIPOU (AI Proof of Us) work-receipt reference attributes. These are opt-in:
traces may carry a reference to an externally-issued, externally-validated
work receipt, but tracing must never derive or validate the receipt itself.
"""

def test_aipou_work_receipt_id(self):
assert SpanAttributes.AIPOU_WORK_RECEIPT_ID == "aipou.work_receipt_id"

def test_aipou_evidence_class(self):
assert SpanAttributes.AIPOU_EVIDENCE_CLASS == "aipou.evidence_class"

def test_aipou_scheme(self):
assert SpanAttributes.AIPOU_SCHEME == "aipou.scheme"

def test_aipou_validation_status(self):
assert SpanAttributes.AIPOU_VALIDATION_STATUS == "aipou.validation_status"