Skip to content

Add a codex.rate_limits event for websockets#10324

Merged
rasmusrygaard merged 7 commits intomainfrom
dev/rasmus/metadata_event
Feb 4, 2026
Merged

Add a codex.rate_limits event for websockets#10324
rasmusrygaard merged 7 commits intomainfrom
dev/rasmus/metadata_event

Conversation

@rasmusrygaard
Copy link
Contributor

@rasmusrygaard rasmusrygaard commented Feb 1, 2026

When communicating over websockets, we can't rely on headers to deliver rate limit information. This PR adds a codex.rate_limits event that the server can pass to the client to inform them about rate limit usage. The client parses this data the same way we parse rate limit headers in HTTP mode.

This PR also wires up the etag and reasoning headers for websockets

Copy link
Collaborator

@pakrym-oai pakrym-oai left a comment

Choose a reason for hiding this comment

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

few comments.

I think it might be cleaner to add separate event for rate limit than we don't have to cram everything in metadata.

Also some of this information doesn't change during the connection and can be returned on websocket headers.

@etraut-openai etraut-openai added the oai PRs contributed by OpenAI employees label Feb 2, 2026
@rasmusrygaard rasmusrygaard changed the title Add a codex.metadata event for websockets Add a codex.rate_limits event for websockets Feb 3, 2026
@rasmusrygaard rasmusrygaard force-pushed the dev/rasmus/metadata_event branch from 5d7b2c7 to 7730170 Compare February 3, 2026 23:16
@rasmusrygaard rasmusrygaard merged commit df000da into main Feb 4, 2026
36 of 38 checks passed
@rasmusrygaard rasmusrygaard deleted the dev/rasmus/metadata_event branch February 4, 2026 14:01
@github-actions github-actions bot locked and limited conversation to collaborators Feb 4, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

oai PRs contributed by OpenAI employees

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants