Extend LlmCompletionEvent with proposal 0057 fields#141
Merged
Conversation
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.
There was a problem hiding this comment.
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
LlmCompletionEventwith proposal-0057 fields (e.g.,input_messages,output_content,request_params,request_extras,active_prompt,active_prompt_group,call_id,response_model) and renamerequest_id→response_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.
This was referenced Jun 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
LlmCompletionEventwith the request-side fields proposal 0057 specifies:input_messages,output_content,request_params,request_extras,active_prompt,active_prompt_group,call_id,response_model.request_idtoresponse_idto match the proposal's response-side naming.input_messagesstay redacted via the existing observability §5.5.5 serializer.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:
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 pyrightclean.uv run ruff checkclean.cat openarmature-spec/VERSIONshows0.51.0.