test: Use CI environment for examples API key by jbeckwith-oai · Pull Request #3394 · openai/openai-python · GitHub
Skip to content

test: Use CI environment for examples API key#3394

Merged
jbeckwith-oai merged 1 commit into
mainfrom
codex/use-ci-environment-for-openai-api-key
Jun 11, 2026
Merged

test: Use CI environment for examples API key#3394
jbeckwith-oai merged 1 commit into
mainfrom
codex/use-ci-environment-for-openai-api-key

Conversation

@jbeckwith-oai

@jbeckwith-oai jbeckwith-oai commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add the ci environment to the examples job that consumes secrets.OPENAI_API_KEY
  • keep the environment scoped to the only workflow job that needs OPENAI_API_KEY
  • update the runnable sync/async examples to use the current README chat model path so the CI key can exercise them

Validation

  • ruby -r psych -e 'Psych.load_file(".github/workflows/ci.yml"); puts "ci.yml parsed"'
  • python -m py_compile examples/demo.py examples/async_demo.py
  • git diff --check

Notes

  • A fork-based PR could not access secrets (Secret source: None), so this PR uses an in-repo branch for the environment-backed secret check.
  • After adding the ci environment, the examples job received OPENAI_API_KEY and then exposed the legacy gpt-4 access failure; the examples now match the README model.

@jbeckwith-oai jbeckwith-oai force-pushed the codex/use-ci-environment-for-openai-api-key branch from 59bc0fd to bd369c5 Compare June 11, 2026 04:49
@jbeckwith-oai jbeckwith-oai changed the title [codex] Use CI environment for examples API key test: Use CI environment for examples API key Jun 11, 2026
@jbeckwith-oai jbeckwith-oai marked this pull request as ready for review June 11, 2026 05:02
@jbeckwith-oai jbeckwith-oai requested a review from a team as a code owner June 11, 2026 05:02
@jbeckwith-oai jbeckwith-oai merged commit d64d811 into main Jun 11, 2026
13 of 14 checks passed
@jbeckwith-oai jbeckwith-oai deleted the codex/use-ci-environment-for-openai-api-key branch June 11, 2026 19:52
@stainless-app stainless-app Bot mentioned this pull request Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants