Skip to content

fix(auth): honor an explicit zero GCP metadata timeout - #2481

Merged
HAYDEN-OAI merged 1 commit into
openai:mainfrom
morgan-coded:fix/gcp-metadata-zero-timeout
Aug 26, 2026
Merged

HAYDEN-OAI merged 1 commit into
openai:mainfrom
morgan-coded:fix/gcp-metadata-zero-timeout

Conversation

@morgan-coded

Copy link
Copy Markdown
Contributor
  • I understand that this repository is auto-generated and my pull request may not be merged

Changes being requested

gcpIDTokenProvider computes its metadata request timeout with config?.timeout || 10_000, so an explicit timeout: 0 is silently replaced with 10,000 ms. The Azure IMDS provider in the same file uses config?.timeout ?? 10_000 for the identically documented option, so the two providers currently behave differently for the same configuration.

This change switches the GCP provider to the nullish coalescing the file already uses for Azure, and adds explicit-zero regression tests for both providers in tests/auth/subject-token-providers.test.ts (mocked fetch, no live network; the Azure test is a parity control pinning the already-correct behavior).

Verified locally (Node 24.18.0): the GCP regression fails on main (the single setTimeout call receives 10000 instead of 0) and passes with this change; the provider test file passes 14/14; lint, build, and the full test suite pass apart from the two pre-existing macOS-only failures addressed in #2480.

Additional context & links

One-line production change; the only other config?.timeout default in the file already used ??.

@morgan-coded
morgan-coded requested a review from a team as a code owner August 26, 2026 14:51

@HAYDEN-OAI HAYDEN-OAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed the GCP metadata timeout handling. Explicit timeout: 0 is now preserved, the 10-second default remains unchanged, and the behavior matches the existing Azure provider. No actionable concerns.

@HAYDEN-OAI
HAYDEN-OAI enabled auto-merge August 26, 2026 17:36
@github-actions

Copy link
Copy Markdown
Contributor

Castiron custom code

✅ No new custom-code files detected.

32 mixed files remain; 0 existing customizations changed.

Compared 6992683aaf20 → 2b85e42b41de. Generated baselines verified.

32 existing customizations unchanged
  • api.md
  • scripts/castiron/README.md
  • scripts/castiron/custom_code_report.py
  • scripts/castiron/test_custom_code_report.py
  • src/client.ts
  • src/resources/audio/transcriptions.ts
  • src/resources/audio/translations.ts
  • src/resources/beta/assistants.ts
  • src/resources/beta/beta.ts
  • src/resources/beta/index.ts
  • src/resources/beta/responses/internal-base.ts
  • src/resources/beta/responses/responses.ts
  • src/resources/beta/threads/index.ts
  • src/resources/beta/threads/runs/index.ts
  • src/resources/beta/threads/runs/runs.ts
  • src/resources/beta/threads/threads.ts
  • src/resources/chat/completions/completions.ts
  • src/resources/chat/completions/index.ts
  • src/resources/conversations/index.ts
  • src/resources/embeddings.ts
  • src/resources/files.ts
  • src/resources/fine-tuning/checkpoints/permissions.ts
  • src/resources/images.ts
  • src/resources/responses/internal-base.ts
  • src/resources/responses/responses.ts
  • src/resources/skills/skills.ts
  • src/resources/skills/versions/versions.ts
  • src/resources/vector-stores/file-batches.ts
  • src/resources/vector-stores/files.ts
  • src/resources/webhooks/index.ts
  • src/resources/webhooks/webhooks.ts
  • tests/lib/data-residency.test.ts

A changed generated baseline means this report cannot reliably identify which handwritten lines changed.

Inspect the custom-code diff

Download the exact patch produced by this run (requires repository access):

gh run download 32995225292 --repo openai/openai-node \
  --name castiron-custom-code-32995225292-1 --dir /tmp/castiron-custom-code-32995225292-1
git apply --stat /tmp/castiron-custom-code-32995225292-1/custom-code.patch
cat /tmp/castiron-custom-code-32995225292-1/custom-code.patch

Or reproduce it from an SDK checkout containing the vendored reporter:

git fetch --no-tags origin 6992683aaf2014d5e625e8eeebb3906bd8651ff0 2b85e42b41de07129a795e6e7e41b91b8a9a6968
python3 scripts/castiron/custom_code_report.py report \
  --base 6992683aaf2014d5e625e8eeebb3906bd8651ff0 \
  --head 2b85e42b41de07129a795e6e7e41b91b8a9a6968 --fetch --require-head-hash --public \
  --out /tmp/castiron-custom-code-2b85e42b41de
cat /tmp/castiron-custom-code-2b85e42b41de/custom-code.patch

This is the current full custom patch for mixed files, not an attribution of only the handwritten lines changed by this PR.

Full report and patch

@HAYDEN-OAI
HAYDEN-OAI disabled auto-merge August 26, 2026 17:44
@HAYDEN-OAI
HAYDEN-OAI added this pull request to the merge queue Aug 26, 2026
Merged via the queue into openai:main with commit 7a9dec8 Aug 26, 2026
21 checks passed
@openai-sdks openai-sdks Bot mentioned this pull request Aug 26, 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