Skip to content

Extend LlmCompletionEvent with proposal 0057 fields#141

Merged
chris-colinsky merged 1 commit into
mainfrom
feature/0049-pr3a-typed-event-extension
Jun 8, 2026
Merged

Extend LlmCompletionEvent with proposal 0057 fields#141
chris-colinsky merged 1 commit into
mainfrom
feature/0049-pr3a-typed-event-extension

Conversation

@chris-colinsky

@chris-colinsky chris-colinsky commented Jun 8, 2026

Copy link
Copy Markdown
Member

Summary

  • Bump spec pin from v0.46.0 to v0.51.0 to pick up accepted proposal 0057.
  • Extend LlmCompletionEvent with the request-side fields proposal 0057 specifies: input_messages, output_content, request_params, request_extras, active_prompt, active_prompt_group, call_id, response_model.
  • Rename request_id to response_id to match the proposal's response-side naming.
  • OpenAI provider populates every new field at emission; image bytes in input_messages stay redacted via the existing observability §5.5.5 serializer.
  • Mark proposal 0057 implemented in conformance.toml; pick up 0021 (not-yet) and 0022 (not-yet) entries that became visible at v0.51.0.

Scope

This is PR 3a of the proposal 0057 rollout. Follow-up PRs in this cycle:

  • 3b: OTel observer reads the typed event's new fields (currently still reads from sentinel NodeEvent payload).
  • 3c: Langfuse observer reads the typed event's new fields.
  • 3d: Activate conformance fixtures 060-068 once the typed-event harness can assert against the new fields.

The fixtures 060-068 stay on the deferred list for the same reason 050-056 are deferred: typed_event_collector schema needs the harness work in 3d.

Test plan

  • uv run pytest tests/unit/test_llm_provider.py (103 passed including 7 new tests for the proposal 0057 fields).
  • uv run pytest tests/conformance (existing fixtures continue to parse; new 060-068 stay deferred).
  • uv run pyright clean.
  • uv run ruff check clean.
  • Spec pin verify: cat openarmature-spec/VERSION shows 0.51.0.

Bump spec pin to v0.51.0 and extend the typed LLM completion event
with request-side fields per accepted proposal 0057: input_messages,
output_content, request_params, request_extras, active_prompt,
active_prompt_group, call_id, and response_model. Rename request_id
to response_id to align with the proposal's response-side naming.

OpenAI provider now populates the new fields at emission. Image
bytes in input_messages stay redacted via the existing serializer.

Observers (OTel, Langfuse) and fixtures 060-068 land in follow-up
PRs in this cycle; conformance.toml marks 0057 implemented since
the typed event contract is satisfied.
Copilot AI review requested due to automatic review settings June 8, 2026 02:07

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the OpenArmature Python implementation to spec v0.51.0 and implements proposal 0057 by extending LlmCompletionEvent with new request-side fields and aligning response-side naming.

Changes:

  • Bump spec pin/version references from 0.46.0 → 0.51.0 across package metadata and smoke tests.
  • Extend LlmCompletionEvent with proposal-0057 fields (e.g., input_messages, output_content, request_params, request_extras, active_prompt, active_prompt_group, call_id, response_model) and rename request_idresponse_id.
  • Populate new typed-event fields in the OpenAI provider and add unit/conformance harness updates and unit tests covering the new fields and redaction behavior.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/unit/test_llm_provider.py Updates response_id assertions and adds unit tests for proposal-0057 typed-event fields and redaction.
tests/test_smoke.py Updates expected __spec_version__ to 0.51.0.
tests/conformance/test_typed_event_harness.py Updates typed-event factory for new/renamed fields.
tests/conformance/test_fixture_parsing.py Adds descriptions for deferred proposal-0057 conformance fixtures 060–068.
src/openarmature/llm/providers/openai.py Populates new typed-event fields (including call_id, message serialization, params/extras, prompt snapshots, response metadata).
src/openarmature/graph/events.py Extends LlmCompletionEvent dataclass and documentation per proposal 0057.
src/openarmature/AGENTS.md Updates embedded spec version reference to 0.51.0.
src/openarmature/init.py Updates __spec_version__ to 0.51.0.
pyproject.toml Updates [tool.openarmature].spec_version to 0.51.0.
conformance.toml Bumps spec_pin to v0.51.0 and updates proposal status entries (incl. 0021/0022 and 0057).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@chris-colinsky chris-colinsky merged commit cf76c53 into main Jun 8, 2026
7 checks passed
@chris-colinsky chris-colinsky deleted the feature/0049-pr3a-typed-event-extension branch June 8, 2026 02:12
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.

2 participants