Skip to content

fix: preserve full input context in span attributes for multi-message…#152

Open
rite7sh wants to merge 1 commit intofuture-agi:mainfrom
rite7sh:fix/input-context-preservation
Open

fix: preserve full input context in span attributes for multi-message…#152
rite7sh wants to merge 1 commit intofuture-agi:mainfrom
rite7sh:fix/input-context-preservation

Conversation

@rite7sh
Copy link
Copy Markdown

@rite7sh rite7sh commented Apr 7, 2026

Fixes #151

Summary

Fixes an issue where SpanAttributes.INPUT_VALUE was overwritten multiple times in _process_input_data, with the final assignment reducing it to only the first message.

Changes

  • Set INPUT_VALUE only once using full joined input
  • Removed overwrite with eval_input[0]
  • Added tests for multi-message, single-message, and non-list inputs

Impact

Preserves full input context for multi-message traces, improving trace correctness and observability.

Testing

  • Ran: PYTHONPATH=frameworks/openai poetry run pytest tests/test_framework_openai.py -v
  • All tests passed (including new test cases)

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.

INPUT_VALUE overwritten in _process_input_data leading to loss of multi-message context

1 participant