Skip to content

openai: declare AI mode and OTEL attributes#7

Open
txase wants to merge 1 commit intomainfrom
openai-ai-mode-otel-attrs
Open

openai: declare AI mode and OTEL attributes#7
txase wants to merge 1 commit intomainfrom
openai-ai-mode-otel-attrs

Conversation

@txase
Copy link
Copy Markdown
Member

@txase txase commented May 1, 2026

Summary

  • mark the OpenAI ruleset as Mode: ai
  • add default OpenAI OTEL semantic convention attributes to the event capture

Rationale

The agent only enables capture rules from rulesets marked with AI mode. The runtime API-key injection tests also expect OpenAI request model/provider/server metadata to come from the published dev ruleset rather than build-time normalization.

Validation

  • Parsed rules/openai@v1.yaml with PyYAML and asserted Mode: ai plus the expected OTEL attributes are present.

The agent only enables capture rules from rulesets marked with AI mode.
Add the missing Mode field to the OpenAI ruleset so dev builds can
consume the published ruleset without local normalization.

The runtime API-key injection tests also assert OpenAI semantic
convention metadata. Add the default request model, operation, provider,
and server address attributes directly to the OpenAI event capture so the
generated dev ruleset carries the metadata expected by the agent.
@txase txase requested a review from ajantrania May 1, 2026 22:34
@txase
Copy link
Copy Markdown
Member Author

txase commented May 1, 2026

Codex was creating integration tests and it needed a ruleset that exercised the full agent capabilities for openai. I had it make a PR of its changes for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant