Skip to content

feat(integrations): pass along the conversation ID for openai responses calls#6199

Merged
constantinius merged 2 commits intomasterfrom
constantinius/feat/integrations/openai-conversation-id
May 5, 2026
Merged

feat(integrations): pass along the conversation ID for openai responses calls#6199
constantinius merged 2 commits intomasterfrom
constantinius/feat/integrations/openai-conversation-id

Conversation

@constantinius
Copy link
Copy Markdown
Contributor

@constantinius constantinius requested a review from a team as a code owner May 5, 2026 09:22
@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 5, 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

Codecov Results 📊

13 passed | Total: 13 | Pass Rate: 100% | Execution Time: 6.67s

📊 Comparison with Base Branch

Metric Change
Total Tests
Passed Tests
Failed Tests
Skipped Tests

✨ No test changes detected

All tests are passing successfully.

❌ Patch coverage is 0.00%. Project has 14955 uncovered lines.
❌ Project coverage is 31.36%. Comparing base (base) to head (head).

Files with missing lines (1)
File Patch % Lines
openai.py 4.13% ⚠️ 673 Missing
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

@constantinius constantinius requested a review from a team May 5, 2026 09:24
Comment on lines +2846 to +2850
pytest.param(
mock.Mock(spec=["id"], id="conv_abc123"),
"conv_abc123",
id="object_with_id_attr",
),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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"),
)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, you're correct, I was confused about the ResponseConversationParam but that's actually a TypedDict

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Resolved with 9f88ee7

@constantinius constantinius merged commit ecc23fa into master May 5, 2026
156 checks passed
@constantinius constantinius deleted the constantinius/feat/integrations/openai-conversation-id branch May 5, 2026 10:57
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