Skip to content

fix(openai): avoid duplicate responses function calls#6006

Open
nightcityblade wants to merge 1 commit into
livekit:mainfrom
nightcityblade:fix/issue-5136
Open

fix(openai): avoid duplicate responses function calls#6006
nightcityblade wants to merge 1 commit into
livekit:mainfrom
nightcityblade:fix/issue-5136

Conversation

@nightcityblade

Copy link
Copy Markdown
Contributor

Fixes #5136

Summary

  • when using previous_response_id, filter pending function_call items from the delta context while preserving their function_call_output items
  • add a regression test for Responses API context reuse

Tests

  • uv run ruff check livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/responses/llm.py tests/test_openai_responses_llm.py
  • uv run ruff format --check livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/responses/llm.py tests/test_openai_responses_llm.py
  • uv run pytest tests/test_openai_responses_llm.py

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


nightcityblade seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@devin-ai-integration devin-ai-integration Bot left a comment

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.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

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.

Duplicated function_call entries when using openai responses api

2 participants