Repository navigation
docs(openai): explain existing safety identifier passthrough - #189686
Merged
Merged
Conversation
Document the existing extraBody path on native OpenAI Chat Completions and its Responses and native Codex limitations. No new runtime setting or identity derivation. Co-authored-by: Leo Rosales <[email protected]>
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
roboclaw-bot
marked this pull request as ready for review
October 31, 2026 19:08
Collaborator
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Nov 1, 2026
…w#189686) Document the existing extraBody path on native OpenAI Chat Completions and its Responses and native Codex limitations. No new runtime setting or identity derivation. Co-authored-by: Leo Rosales <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related: #138287.
Supersedes #138289, thanks @lgrosales.
What Problem This Solves
Operators cannot discover that the existing OpenAI Chat Completions extra-body setting can already send an explicit safety identifier.
User Impact
Documents
params.extraBody: { safety_identifier: "<stable-user-id-hash>" }for models configured withapi: "openai-completions", including native OpenAI endpoints. Operators supply the hash themselves. A shared static value does not identify individual channel senders. Directopenai-responsesconfigurations and the native Codex runtime do not use this passthrough.Why This Change Was Made
The existing payload policy already merges configured fields into the native Chat Completions request. This closes the configuration-discoverability gap without another runtime setting, default identifier, identity derivation, or prompt-cache change. Production LOC delta: 0; test LOC delta: 0. Documentation: +17/-1.
Current-main evidence: #153451 (50324f6) extracted the shared extra-body policy; #159856 consolidated its wrappers. Current main retains the same
Object.assign(payload, extraBody)path insrc/agents/openai-completions-payload-policy.ts, composed byapplyExtraParamsToAgent. The transport invokes the payload hook before serializing the outgoing request.Evidence
extraBodyandextra_bodyathttps://api.openai.com/v1/chat/completions; the configured synthetic identifier reached the request body, and the unconfigured control omitted it. Fetch was intercepted at the transport host port; no paid model call or live API acceptance is claimed. An initial incorrectly intercepted probe sent a synthetic invalid key and received HTTP 401; it was corrected before the passing proof.timeout 90 nice -n 15 pnpm test src/agents/embedded-agent-runner-extraparams.test.ts --maxWorkers=1 -t 'extra_body|keeps store untouched for native': 5 passed, 43 deselected, 53.72 seconds. No red-before/green-after claim: this documents behavior already green on main.git diff --checkpassed. No runtime, build, or type changes; broad checks belong to PR CI.gh pr view/gh pr diffonly; it was never checked out or executed. Human credit: Leo Rosales / Leonardo Rosales (@lgrosales, [email protected]), credited once using the commit-author spellingLeo Rosales. No agent credit.