openclaw/extensions/openai
huangjianxiong a89fe705b8
fix(openai): bound Codex OAuth token response body reads with readResponseWithLimit (#99479)
* fix(openai): bound Codex OAuth token response body reads with readResponseWithLimit

Replace unbounded response.arrayBuffer() in postTokenForm with
readResponseWithLimit using a 1 MiB cap to prevent OOM from oversized
token endpoint responses. Add real node:http loopback server tests.

* fix(openai): wrap readResponseWithLimit result in Uint8Array for TS BodyInit compat

- Fixes TS2345: Buffer<ArrayBufferLike> not assignable to BodyInit
- Resolves check-prod-types, check-test-types, and
  check-additional-extension-package-boundary CI failures

Ref. https://github.com/openclaw/openclaw/pull/99479

* test(openai): verify OAuth response release

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-07 00:18:20 +01:00
..
test-support docs: document medium extension sources 2026-06-04 21:33:54 -04:00
api.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
auth-choice-copy.ts refactor(core): remove unused helper exports 2026-06-18 10:54:40 +08:00
base-url.test.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
base-url.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
default-models.test.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
default-models.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
embedding-batch.test.ts improve: keep isolated tests under one second (#100019) 2026-07-05 10:57:19 -07:00
embedding-batch.ts fix(openai): bound embedding batch file downloads (#98554) 2026-07-01 07:10:42 -07:00
embedding-provider.test.ts fix(openai-embedding): preserve openai/ prefix for non-native base URLs (#92135) 2026-06-18 14:03:41 -04:00
embedding-provider.ts fix(openai-embedding): preserve openai/ prefix for non-native base URLs (#92135) 2026-06-18 14:03:41 -04:00
image-generation-provider.test.ts fix(openai): image generation unavailable when openai provider set via config apiKey + custom baseUrl (#100745) 2026-07-06 19:54:44 +10:00
image-generation-provider.ts fix(openai): image generation unavailable when openai provider set via config apiKey + custom baseUrl (#100745) 2026-07-06 19:54:44 +10:00
index.test.ts fix(image-gen): bound image generation provider JSON response reads (#96495) 2026-06-26 07:08:30 -04:00
index.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
media-understanding-provider.test.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
media-understanding-provider.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
memory-embedding-adapter.test.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
memory-embedding-adapter.ts fix #88009: [Feature]: batched memory embedding should batch over files (#89138) 2026-06-09 06:38:30 -04:00
native-web-search.ts fix(search): enforce native web search tool policy (#91750) 2026-06-09 16:25:15 -07:00
openai-chatgpt-auth-identity.test.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
openai-chatgpt-auth-identity.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
openai-chatgpt-catalog.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
openai-chatgpt-device-code.test.ts fix(openai): bound device code auth bodies 2026-06-19 20:43:17 +02:00
openai-chatgpt-device-code.ts fix(openai): bound device code auth bodies 2026-06-19 20:43:17 +02:00
openai-chatgpt-oauth-abort.runtime.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
openai-chatgpt-oauth-flow.runtime.test.ts fix(openai): bound Codex OAuth token response body reads with readResponseWithLimit (#99479) 2026-07-07 00:18:20 +01:00
openai-chatgpt-oauth-flow.runtime.ts fix(openai): bound Codex OAuth token response body reads with readResponseWithLimit (#99479) 2026-07-07 00:18:20 +01:00
openai-chatgpt-oauth-page.runtime.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
openai-chatgpt-oauth-types.runtime.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
openai-chatgpt-oauth.runtime.test.ts fix(openai): cancel OAuth preflight bodies 2026-06-19 09:53:35 +02:00
openai-chatgpt-oauth.runtime.ts fix(openai): cancel OAuth preflight bodies 2026-06-19 09:53:35 +02:00
openai-chatgpt-pkce.runtime.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
openai-chatgpt-provider.runtime.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
openai-chatgpt-provider.test.ts feat(openai): add GPT-5.6 series support (#98333) 2026-07-01 06:48:57 +01:00
openai-chatgpt-provider.ts feat: add Anthropic and OpenAI cost history (#100672) 2026-07-06 12:06:55 +01:00
openai-chatgpt-shared.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
openai-provider-missing-auth.test.ts fix(openai): keep missing-auth hint on default model (#100579) 2026-07-06 08:56:20 +01:00
openai-provider.live.test.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
openai-provider.test.ts feat(openai): add GPT-5.6 series support (#98333) 2026-07-01 06:48:57 +01:00
openai-provider.ts fix(openai): keep missing-auth hint on default model (#100579) 2026-07-06 08:56:20 +01:00
openai-tts.live.test.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
openai.live.test.ts test(openai): extend live STT fixture timeout 2026-06-14 19:21:25 +08:00
openclaw.plugin.json feat(macos): load provider catalog during AI onboarding (#101132) 2026-07-06 20:57:56 +01:00
openclaw.plugin.test.ts fix(openai): restore spark oauth routing 2026-06-15 14:17:15 +05:30
package.json chore(release): close out 2026.6.11 on main 2026-06-30 11:31:08 -07:00
prompt-overlay.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
provider-auth.contract.test.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
provider-catalog.contract.test.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
provider-contract-api.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
provider-policy-api.test.ts feat(openai): add GPT-5.6 series support (#98333) 2026-07-01 06:48:57 +01:00
provider-policy-api.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
provider-runtime.contract.test.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
realtime-provider-shared.test.ts fix(openai): bound embedding-batch and realtime session JSON response reads (#97533) 2026-06-28 11:53:50 -07:00
realtime-provider-shared.ts fix(openai): bound embedding-batch and realtime session JSON response reads (#97533) 2026-06-28 11:53:50 -07:00
realtime-transcription-provider.test.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
realtime-transcription-provider.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
realtime-voice-provider.test.ts Fix realtime voice-call barge-in cancellation (#90749) 2026-07-06 23:30:16 +01:00
realtime-voice-provider.ts Fix realtime voice-call barge-in cancellation (#90749) 2026-07-06 23:30:16 +01:00
register.runtime.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
replay-policy.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
setup-api.test.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
setup-api.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
shared.ts refactor: consolidate image data URL formatting (#99715) 2026-07-03 17:09:30 -07:00
speech-provider.test.ts fix(openai): route mp3 tts as voice messages (#100715) 2026-07-06 08:34:08 +01:00
speech-provider.ts fix(openai): route mp3 tts as voice messages (#100715) 2026-07-06 08:34:08 +01:00
test-api.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
thinking-policy.ts feat(openai): add GPT-5.6 series support (#98333) 2026-07-01 06:48:57 +01:00
transport-policy.test.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
transport-policy.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
tsconfig.json
tts.test.ts refactor(proxy): store captures in shared state database 2026-06-19 01:20:06 +08:00
tts.ts docs: document medium extension sources 2026-06-04 21:33:54 -04:00
usage.test.ts feat: add Anthropic and OpenAI cost history (#100672) 2026-07-06 12:06:55 +01:00
usage.ts feat: add Anthropic and OpenAI cost history (#100672) 2026-07-06 12:06:55 +01:00
video-generation-provider.test.ts fix(openai): bound video create-submit response reads 2026-06-28 21:10:55 -07:00
video-generation-provider.ts refactor: consolidate image data URL formatting (#99715) 2026-07-03 17:09:30 -07:00