feat(integrations): pass along the conversation ID for openai responses calls#6199
Merged
constantinius merged 2 commits intomasterfrom May 5, 2026
Merged
Conversation
Contributor
Codecov Results 📊✅ 13 passed | Total: 13 | Pass Rate: 100% | Execution Time: 6.67s 📊 Comparison with Base Branch
✨ No test changes detected All tests are passing successfully. ❌ Patch coverage is 0.00%. Project has 14955 uncovered lines. Files with missing lines (1)
Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
- Coverage 31.38% 31.36% -0.02%
==========================================
Files 190 190 —
Lines 21780 21789 +9
Branches 7294 7302 +8
==========================================
+ Hits 6834 6834 —
- Misses 14946 14955 +9
- Partials 578 578 —Generated by Codecov Action |
Comment on lines
+2846
to
+2850
| pytest.param( | ||
| mock.Mock(spec=["id"], id="conv_abc123"), | ||
| "conv_abc123", | ||
| id="object_with_id_attr", | ||
| ), |
Contributor
There was a problem hiding this comment.
When is an object with the id property accepted?
I can only find strings and dictionaries in the accepted type: https://github.com/openai/openai-python/blob/acd0c54d8a68efeedde0e5b4e6c310eef1ce7867/src/openai/types/responses/response_create_params.py#L295
from openai import OpenAI
client = OpenAI(api_key="test")
class MyConversation:
def __init__(self, id):
self.id = id
client.responses.create(
model="gpt-4o",
input="hello",
conversation=MyConversation("conv_abc123"),
)
Contributor
Author
There was a problem hiding this comment.
Yes, you're correct, I was confused about the ResponseConversationParam but that's actually a TypedDict
alexander-alderman-webb
approved these changes
May 5, 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.
Closes https://linear.app/getsentry/issue/TET-2287/see-if-we-can-auto-extract-conversationid-from-openai-python