openclaw/extensions/openai
lzyyzznl 6c3a46fb41
fix(openai): use truncateUtf16Safe for image gen log value truncation (#102611)
* fix(openai): use truncateUtf16Safe for image gen log value truncation

One .slice(0, N) truncation site in the OpenAI image generation
provider may cut UTF-16 surrogate pairs in half when the log value
contains multi-byte characters such as emoji. Replace it with
truncateUtf16Safe to keep the truncated output valid Unicode.

* fix(openai): keep image auth logs UTF-16 safe

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-09 12:21:24 +01:00
..
test-support
api.ts
auth-choice-copy.ts refactor(core): remove unused helper exports 2026-06-18 10:54:40 +08:00
base-url.test.ts
base-url.ts
default-models.test.ts
default-models.ts
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): use truncateUtf16Safe for image gen log value truncation (#102611) 2026-07-09 12:21:24 +01:00
image-generation-provider.ts fix(openai): use truncateUtf16Safe for image gen log value truncation (#102611) 2026-07-09 12:21:24 +01: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
media-understanding-provider.test.ts
media-understanding-provider.ts
memory-embedding-adapter.test.ts
memory-embedding-adapter.ts
native-web-search.ts
openai-chatgpt-auth-identity.test.ts
openai-chatgpt-auth-identity.ts
openai-chatgpt-catalog.ts
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
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
openai-chatgpt-oauth-types.runtime.ts
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
openai-chatgpt-provider.runtime.ts
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
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
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
openai.live.test.ts
openclaw.plugin.json feat(macos): load provider catalog during AI onboarding (#101132) 2026-07-06 20:57:56 +01:00
openclaw.plugin.test.ts
package.json chore(release): close out 2026.6.11 on main 2026-06-30 11:31:08 -07:00
prompt-overlay.ts
provider-auth.contract.test.ts
provider-catalog.contract.test.ts
provider-contract-api.ts
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
provider-runtime.contract.test.ts
realtime-provider-shared.test.ts fix(openai): correct Realtime auth and transcription secrets (#102518) 2026-07-09 08:55:31 +01:00
realtime-provider-shared.ts fix(openai): correct Realtime auth and transcription secrets (#102518) 2026-07-09 08:55:31 +01:00
realtime-transcription-provider.test.ts fix(openai): correct Realtime auth and transcription secrets (#102518) 2026-07-09 08:55:31 +01:00
realtime-transcription-provider.ts fix(openai): correct Realtime auth and transcription secrets (#102518) 2026-07-09 08:55:31 +01:00
realtime-voice-provider.test.ts fix(openai): correct Realtime auth and transcription secrets (#102518) 2026-07-09 08:55:31 +01:00
realtime-voice-provider.ts fix(openai): correct Realtime auth and transcription secrets (#102518) 2026-07-09 08:55:31 +01:00
register.runtime.ts
replay-policy.ts
setup-api.test.ts
setup-api.ts
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
thinking-policy.ts feat(openai): add GPT-5.6 series support (#98333) 2026-07-01 06:48:57 +01:00
transport-policy.test.ts
transport-policy.ts
tsconfig.json
tts.test.ts refactor(proxy): store captures in shared state database 2026-06-19 01:20:06 +08:00
tts.ts
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