How should an API key for a custom provider be supplied?

Open
#131 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
github-actions, typescript
Domain
devops

Research direction

Start by reading the action inputs and how review.yml passes them to the Codex process. Trace how codex-config and codex-auth are handled, then check whether the action can expose workflow secrets as environment variables for env_key. Done means the intended credential practice is documented or supported with a clear, secure input path.

Written by the indexing model from the issue text.

Description

Question

The action takes two content inputs, codex-config (a config.toml) and codex-auth (an auth.json). For a custom provider that speaks the Responses API and authenticates with a static API key, neither is an obvious fit:

  • codex-config works, but only by writing the key into [model_providers.<name>].experimental_bearer_token. The Codex config schema says that field is "discouraged in favor of env_key for security reasons, but this may be necessary when using this programmatically".
  • codex-auth is described as "to sign in with ChatGPT instead of an API key", and setting requires_openai_auth = true would make Codex treat the provider as an OpenAI account login rather than a custom endpoint.

env_key looks like the clean answer — the config names a variable, the workflow supplies it from secrets.* — but there is no path to export an environment variable into the action: review.yml exposes no such input, and a caller cannot attach env: to a jobs.<id>.uses: entry.

What I'm asking

Which of these is the intended practice today, and would you consider supporting the standard shape?

  1. Keep writing experimental_bearer_token into codex-config, as the accepted programmatic escape hatch.
  2. Add an input such as codex-env (newline-separated KEY=VALUE pairs exported before Codex runs), so the config can use env_key and the secret never appears in the config text.
  3. Something else entirely — e.g. auth command-backed credentials are meant for this.

Option 2 would let the config.toml live in the repository (or a repository variable, via codex-config-file) while the key stays a workflow secret only.

Dominant language
TypeScript
Stars
0
Forks
0
Avg merge
6h
Merged PRs (30d)
118

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from promplate/code-review

All issues in promplate/code-review

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.