# Add OpenAI Responses API support with chat_completions capability flag \(\#39989\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/84017bca89dd20ab68b4440ebb3c521f27fe1355)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 84017bca89dd20ab68b4440ebb3c521f27fe1355

Requested commit: 84017bca89dd20ab68b4440ebb3c521f27fe1355

Commit: 84017bca89dd20ab68b4440ebb3c521f27fe1355

Tree: 42d4990fe6f0c7310d0ca5a39a5f6e17207ef85d

Author: Matt Stallone

Committer: GitHub

## Message

```
Add OpenAI Responses API support with chat_completions capability flag (#39989)

Add support for OpenAI's /responses endpoint for models that don't
support /chat/completions API. This enables compatibility with newer
model variants (`gpt-5-codex`, `gpt-5-pro`, `o3-pro`, etc) while
maintaining compatibility with existing configs

Changes:
- Add `supports_chat_completions` flag to model capabilities that
defaults to true for existing behavior
- Implement responses API client with streaming support as per [OpenAI
documentation](https://app.stainless.com/api/spec/documented/openai/openapi.documented.yml).
- Add `ResponseEventMapper` to convert responses events to completion
events for maintainer simplicity
- Update UI to allow toggling `chat_completions` capability
- Add `gpt-5-codex` model

Closes #38858

Release Notes:
- Added support for `gpt-5-codex` model

---------

Co-authored-by: Bennet Bo Fenner <bennet@zed.dev>
```

## Parents

- [e70d2524b32cac25c71d2aa3172b0e6767beab87](https://git.cafe/gitcafe/zed/commit/e70d2524b32cac25c71d2aa3172b0e6767beab87?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/84017bca89dd20ab68b4440ebb3c521f27fe1355?format=markdown)
