Skip to content

docs(openai): explain existing safety identifier passthrough - #189686

Merged
roboclaw-bot merged 1 commit into
mainfrom
loop/contributor-pr-138289
Oct 31, 2026
Merged

roboclaw-bot merged 1 commit into
mainfrom
loop/contributor-pr-138289

Conversation

@roboclaw-bot

Copy link
Copy Markdown
Collaborator

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 with api: "openai-completions", including native OpenAI endpoints. Operators supply the hash themselves. A shared static value does not identify individual channel senders. Direct openai-responses configurations 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 in src/agents/openai-completions-payload-policy.ts, composed by applyExtraParamsToAgent. The transport invokes the payload hook before serializing the outgoing request.

Evidence

  • On main base c9405cd (affected owners also verified unchanged on a88fd71), a temporary configuration-to-serialized-HTTP probe passed for both extraBody and extra_body at https://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.
  • Targeted oxfmt, MDX sanity (2 pages), docs index, and git diff --check passed. No runtime, build, or type changes; broad checks belong to PR CI.
  • Local autoreview (Codex; local snapshot against c9405cd; P0–P2): scoped-clean, no actionable findings. The only subsequent edit corrected the official documentation anchor after checking the fetched page.
  • Contributor source was read through gh pr view/gh pr diff only; it was never checked out or executed. Human credit: Leo Rosales / Leonardo Rosales (@lgrosales, [email protected]), credited once using the commit-author spelling Leo Rosales. No agent credit.

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]>
@clawsweeper

clawsweeper Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@roboclaw-bot
roboclaw-bot marked this pull request as ready for review October 31, 2026 19:08
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime size: XS labels Oct 31, 2026
@clawsweeper clawsweeper Bot added the clawsweeper:intake:docs Preliminary submission classification; full source review pending. label Oct 31, 2026
@roboclaw-bot
roboclaw-bot merged commit a6015dd into main Oct 31, 2026
128 of 129 checks passed
@roboclaw-bot
roboclaw-bot deleted the loop/contributor-pr-138289 branch October 31, 2026 19:22
@roboclaw-bot

Copy link
Copy Markdown
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clawsweeper:intake:docs Preliminary submission classification; full source review pending. docs Improvements or additions to documentation gateway Gateway runtime size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant