Conversation
|
@codex please review |
|
Codex Review: Didn't find any major issues. Breezy! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
51da43c to
e326a04
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if total_read == capacity && !saw_newline && !saw_eof { | ||
| buf.zeroize(); | ||
| return Err(anyhow!( | ||
| "OPENAI_API_KEY is too large to fit in the 512-byte buffer" | ||
| "API key is too large to fit in the {BUFFER_SIZE}-byte buffer" | ||
| )); |
There was a problem hiding this comment.
Interpolate BUFFER_SIZE in overflow error
The new overflow branch emits "API key is too large to fit in the {BUFFER_SIZE}-byte buffer" without formatting, so {BUFFER_SIZE} is rendered literally in user-facing errors. The accompanying tests expect the numeric capacity (1024) and will now fail. Format the string via anyhow!("API key is too large to fit in the {}-byte buffer", BUFFER_SIZE) or similar so the constant is substituted.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
I don't believe that is correct. anyhow!() should take a format string.
|
@pakrym-oai I don't feel strongly about the name of the option ( |
For a second I thought base_url but the one you have in this PR includes all parts, upstream SGTM. |
This PR introduces an
--upstream-urloption 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 should support those who use the OpenAI Responses API via Azure. Relevant issues:
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.