Skip to content

Conversation

@shekohex
Copy link

@shekohex shekohex commented Jan 26, 2026

Summary

  • add /v1/responses/compact routing and handler
  • route compact requests through openai-compat and codex executors
  • drop stream when forwarding compact requests
  • avoid injecting empty prompt_cache_key for codex requests
  • extend OpenAI usage parsing and add compact tests

Testing

  • mise exec go -- go test ./...

@shekohex shekohex marked this pull request as ready for review January 26, 2026 14:44
@luispater
Copy link
Collaborator

How do I trigger /responses/compact in Codex?

@shekohex
Copy link
Author

How do I trigger /responses/compact in Codex?

Run /compact to compact the of the conversation.

@luispater
Copy link
Collaborator

Can't hit this endpoint with codex-cli 0.91.0. What's your version?

@q2019715
Copy link

Can't hit this endpoint with codex-cli 0.91.0. What's your version?

image v0.91.0

@shekohex
Copy link
Author

@luispater Yes, as @q2019715 showed, you would go into codex and run /compact command.

@luispater
Copy link
Collaborator

@luispater Yes, as @q2019715 showed, you would go into codex and run /compact command.

I executed /compact, but I don't see any API calls hitting the /responses/compact endpoint.

@shekohex
Copy link
Author

@luispater Yes, as @q2019715 showed, you would go into codex and run /compact command.

I executed /compact, but I don't see any API calls hitting the /responses/compact endpoint.

You should start a chat first, ask it some questions then execute the command.

Also pull my latest changes.

@hkfires
Copy link
Collaborator

hkfires commented Jan 28, 2026

@luispater Yes, as @q2019715 showed, you would go into codex and run /compact command.

I executed /compact, but I don't see any API calls hitting the /responses/compact endpoint.

Me too, only request /v1/responses, with codex cli v0.92.0
[2026-01-28 11:57:30] [b0eb5759] [info ] [gin_logger.go:93] 200 | 12.921s | X.X.X.X | POST "/v1/responses"

@shekohex
Copy link
Author

@hkfires @luispater
You have to chat a bit with the model:
CleanShot 2026-01-28 at 12 38 28

Here is a screenshot of the logs:
CleanShot 2026-01-28 at 12 39 26

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.

4 participants