[REMOTE-1688] Add Codex auth secret types to CLI#11122
Conversation
836df80 to
bcfa394
Compare
|
I'm starting a first review of this pull request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR adds the oz secret create codex api-key <NAME> provider flow, threads the optional OpenAI base URL into the managed secret value, and adds clap parser coverage for the new command shape.
Concerns
No blocking correctness, security, or error-handling concerns found in the changed lines.
Verdict
Found: 0 critical, 0 important, 0 suggestions
Approve
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
Adds an `oz secret create codex api-key <NAME>` subcommand that mirrors the existing `oz secret create anthropic ...` provider flow. The Codex harness currently only authenticates via an OpenAI API key, optionally with a custom base URL (e.g. a regional endpoint), so the new command supports both: oz secret create codex api-key my-key --value-file key.txt oz secret create codex api-key my-key --base-url https://us.api.openai.com/v1 The API key value is read from --value-file, stdin, or an interactive prompt, matching the existing simple-secret flows. The --base-url flag is optional; an empty value is normalized to None. Tests: - Parser tests for the new `codex api-key` subcommand: minimal form, flags-and-team-scope form, and a regression test that the secret name is still required. Co-Authored-By: Oz <oz-agent@warp.dev>
Previously, the optional base URL for `oz secret create codex api-key` was only settable via the `--base-url` flag; omitting it silently used the OpenAI default endpoint. Surface the option in interactive mode by prompting "OpenAI base URL (optional, press Enter to skip):" when the flag is not provided. Pressing Enter (or submitting whitespace) skips the base URL and we omit the field from the persisted secret, matching the existing behavior of `--base-url ""` and the AWS session token prompt. Non-interactive mode (stdin not a TTY) is unchanged: omitting `--base-url` defaults to no base URL rather than blocking on a prompt. Co-Authored-By: Oz <oz-agent@warp.dev>
liliwilson
left a comment
There was a problem hiding this comment.
nit: it's a little odd to me that it's oz secret create anthropic and oz secret create codex - could we switch the former to be oz secret create claude for consistency?
oh shoot yes I meant to do this here, thanks for calling out |
bcfa394 to
7eabf91
Compare

Description
Adds an
oz secret create codex api-key <NAME>subcommand that mirrors the existingoz secret create anthropic ...provider flow. The Codex harness currently only authenticates via an OpenAI API key (with an optional custom base URL, e.g. for regional endpoints), which matches the single Codex auth secret type the server already supports (openai_api_key).The API key value is read from
--value-file, stdin, or an interactive password prompt — same as the existing simple-secret flows. The--base-urlflag is optional; an empty value is normalized toNoneso we never persist a blank base URL.Closes REMOTE-1688.
Linked Issue
ready-to-specorready-to-implement.Testing
Added clap parser tests in
crates/warp_cli/src/lib_tests.rscovering:oz secret create codex api-key <NAME>form,--value-file,--base-url,--description, and--teamtogether,All 148
warp_clitests pass undercargo nextest run -p warp_cli.cargo fmt --check -p warp_cli -p warpandcargo clippy -p warp_cli -p warp --all-targets --tests -- -D warningsare clean.I have manually tested my changes locally with
./script/runI tested an API key that doesn't require a us endpoint and one that does (the staging one). Creating, deleting and actually using the secrets works.
Agent Mode
Conversation: https://staging.warp.dev/conversation/5d5a73fb-ec89-4c6c-91c0-54d49f9bfc90
Run: https://oz.staging.warp.dev/runs/019e3365-8f0e-70d3-8384-e763989d8229
This PR was generated with Oz.