Skip to content

Set Cache-Control no-cache when polling assistant runs#3051

Open
anurag9099 wants to merge 1 commit intoopenai:mainfrom
anurag9099:codex/fix-poll-cache-control
Open

Set Cache-Control no-cache when polling assistant runs#3051
anurag9099 wants to merge 1 commit intoopenai:mainfrom
anurag9099:codex/fix-poll-cache-control

Conversation

@anurag9099
Copy link
Copy Markdown

Summary

  • add Cache-Control: no-cache to assistant run polling requests
  • keep extra_headers precedence so callers can still override the header if needed
  • add sync and async tests for the poll helper

Why

client.beta.threads.runs.create_and_poll() eventually polls the same run status URL until it reaches a terminal state. Without a Cache-Control: no-cache header, caching proxies can keep serving the same status response and the helper may never observe completion.

Fixes #1673.

@anurag9099 anurag9099 requested a review from a team as a code owner April 2, 2026 19:38
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.

Cache-control headers are not set when polling agent status

1 participant