Skip to content

Comments

feat: support using the action with Azure-hosted OpenAI models#47

Merged
pakrym-oai merged 1 commit intomainfrom
pr47
Nov 5, 2025
Merged

feat: support using the action with Azure-hosted OpenAI models#47
pakrym-oai merged 1 commit intomainfrom
pr47

Conversation

@bolinfest
Copy link
Collaborator

@bolinfest bolinfest commented Nov 2, 2025

This PR introduces a new, optional input to the GitHub Action, responses-api-endpoint, which makes it possible to use this Action with Azure. As explained in the updated README.md, if responses-api-endpoint is specified, it will be the URL that Codex hits to make Responses API requests. In practice, we expect this to be used mostly by Azure users.

With the Azure account I just created, I got this working with the following configuration:

jobs:
  codex:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5

      - name: Start Codex proxy
        uses: openai/codex-action@71690bb0c5f5196713197e9877f0b28950c7b415
        with:
          openai-api-key: ${{ secrets.AZURE_OPENAI_API_KEY }}
          responses-api-endpoint: "https://bolinfest-7804-resource.cognitiveservices.azure.com/openai/v1/responses"

Under the hood, if responses-api-endpoint is non-empty, it simply becomes the --upstream-url argument to codex-responses-api-proxy.

TO DISCUSS: Better/shorter name than responses-api-endpoint?

This PR builds on the work of openai/codex#6129.

@bolinfest bolinfest force-pushed the pr47 branch 4 times, most recently from dbf8065 to c9cc493 Compare November 3, 2025 01:00
@bolinfest bolinfest marked this pull request as ready for review November 3, 2025 01:09
@bolinfest bolinfest requested a review from pakrym-oai November 3, 2025 01:09
bolinfest added a commit to openai/codex that referenced this pull request Nov 3, 2025
This PR introduces an `--upstream-url` option to the proxy CLI that
determines the URL that Responses API requests should be forwarded to.
To preserve existing behavior, the default value is
`"https://api.openai.com/v1/responses"`.

The motivation for this change is that the [Codex GitHub
Action](https://github.com/openai/codex-action) should support those who
use the OpenAI Responses API via Azure. Relevant issues:

- openai/codex-action#28
- openai/codex-action#38
- openai/codex-action#44

Though rather than introduce a bunch of new Azure-specific logic in the
action as openai/codex-action#44 proposes, we
should leverage our Responses API proxy to get the _hardening_ benefits
it provides:


https://github.com/openai/codex/blob/d5853d9c47b1badad183f62622745cf47e6ff0f4/codex-rs/responses-api-proxy/README.md#hardening-details

This PR should make this straightforward to incorporate in the action.
To see how the updated version of the action would consume these new
options, see openai/codex-action#47.
@bolinfest bolinfest force-pushed the pr47 branch 5 times, most recently from 6d89768 to 7de6611 Compare November 5, 2025 06:51
required: false
default: ""
responses-api-endpoint:
description: "Optional Responses API endpoint override, e.g. https://example.openai.azure.com/openai/v1/responses. Defaults to the proxy's built-in endpoint when empty."
Copy link
Collaborator

Choose a reason for hiding this comment

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

Defaults to Responses API when empty?


To configure the Action to use OpenAI models hosted on Azure, pay close attention to the following:

- The `responses-api-endpoint` must be set to the full URL (including any required query parameters) that Codex will `POST` to for a Responses API request. For Azure, this might look like `https://YOUR_PROJECT_NAME.openai.azure.com/openai/v1/responses`. Note that [unlike when customizing a model provider in Codex](https://github.com/openai/codex/blob/main/docs/config.md#azure-model-provider-example), you must include the `v1/responses` suffix to the URL yourself, if appropriate.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we mention api-version query parameter?

@pakrym-oai pakrym-oai merged commit f7bae02 into main Nov 5, 2025
4 checks passed
@pakrym-oai
Copy link
Collaborator

Thank you!

@github-actions github-actions bot locked and limited conversation to collaborators Nov 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants