Skip to content

docs(gateway): clarify independent HTTP endpoint switches - #130690

Merged
steipete merged 1 commit into
mainfrom
codex/sweep-http-endpoint-docs-20260826
Aug 27, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/sweep-http-endpoint-docs-20260826

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where operators following either HTTP API setup page would expect both generation endpoints to work after enabling only one. The other endpoint correctly returns 404, contrary to the old documentation.

Why This Change Was Made

The Gateway intentionally resolves chatCompletions.enabled and responses.enabled independently. Both can enable the shared model-discovery and embeddings routes, but neither enables the other generation endpoint. Each page now names the existing independent switch and links to the other setup page.

This corrects the documented contract without changing runtime behavior, authentication, defaults, configuration schema, or protocol. Production LOC: +0/-0. Tests: +0/-0. Documentation: +5/-2 across two files. No changelog change.

User Impact

Operators can enable the generation endpoint their client actually uses without being misled about the other endpoint. Model discovery and embeddings remain shared as documented.

Evidence

  • Read the configuration resolver, runtime preparation, HTTP router, both generation handlers, and the existing configuration reference. The independent flags originate in src/gateway/server-runtime-config.ts; src/gateway/server-http.ts gates generation separately and shares only models/embeddings.
  • Ran 40 real loopback HTTP assertions against the source config resolver, router, and handlers: all four flag combinations, five routes, and correct/wrong HTTP methods. Enabled generation/embedding handlers returned visible JSON 400 responses for deliberately malformed bodies; enabled model routes returned 200; disabled routes returned 404; wrong methods returned 405 only when enabled. An independent replay also passed all 40 assertions and verified listener/fixture cleanup.
  • Passed the changed-file gate and all six docs-check components: formatting, Markdown lint, MDX validation, i18n glossary, internal links, and configuration examples. The link audit checked 6,664 internal links with no broken links; config validation checked 1,206 fences.
  • Structured Codex autoreview completed with no P0 findings.

The HTTP proof used isolated temporary configuration, loopback listeners, authentication mode none, and hooks disabled. It did not start the full Gateway kernel, invoke a provider, or validate generated model output. No operator state or external messages were used. The documentation-only change does not alter any of those boundaries.

Provenance: the incorrect cross-enablement statements predate the available shallow history; no introduction is attributed to the history boundary.

@clawsweeper

clawsweeper Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime size: XS maintainer Maintainer-authored PR labels Aug 27, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 27, 2026
@clawsweeper

clawsweeper Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 27, 2026, 12:37 AM ET / 04:37 UTC.

ClawSweeper review

What this changes

The PR updates the two Gateway HTTP API pages to state that Chat Completions and Responses generation endpoints have independent enablement switches.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep open: this is an accurate, narrowly scoped correction to current Gateway documentation; current main still contains the misleading cross-enablement statements.

Priority: P2
Reviewed head: b27a8facce411782117e0d854c41cbca3539f679

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A small, source-aligned documentation repair with no actionable patch defect found.
Proof confidence 🌊 off-meta tidepool Not applicable: Real behavior proof is not required because this PR only changes files under docs/.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Real behavior proof is not required because this PR only changes files under docs/.
Evidence reviewed 7 items Independent configuration: Current main resolves chatCompletions and responses as separate flags, each defaulting to false.
Router contract: Current main exposes models and embeddings when either flag is enabled, but separately guards each generation route with its corresponding flag.
Existing route coverage: The existing test proves both generation routes return 404 while disabled and verifies model discovery with either endpoint flag enabled.
Findings None None.
Security None None.

How this fits together

Gateway startup resolves two HTTP endpoint flags and passes them to the HTTP router. The router shares model discovery and embeddings when either API is enabled, while each generation endpoint remains separately gated.

flowchart LR
  A[Operator configuration] --> B[Gateway startup]
  B --> C[Endpoint flag resolution]
  C --> D[HTTP route router]
  D --> E[Shared models and embeddings]
  D --> F[Chat Completions endpoint]
  D --> G[Responses endpoint]
Loading

Before merge

  • Resolve merge risk (P1) - The supplied exact-head check-docs job was still in progress; a local rerun was unavailable because Corepack cache setup failed on the read-only filesystem.
  • Complete next step (P2) - This maintainer-authored, maintainer-labeled documentation PR needs normal review and completion of its exact-head docs check, not an automated repair.
Agent review details

Security

None.

PR surface

Docs +3. Total +3 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 2 5 2 +3
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 5 2 +3

Review metrics

None.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Retain this two-page documentation correction and merge it after the exact-head documentation check completes successfully.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Retain this two-page documentation correction and merge it after the exact-head documentation check completes successfully.

Do we have a high-confidence way to reproduce the issue?

Yes—source inspection reproduces the documentation defect: the current pages promise cross-enablement that the independent router gates do not provide.

Is this the best way to solve the issue?

Yes—the smallest maintainable fix is to correct both reciprocal setup pages; changing runtime behavior would contradict the existing separate configuration contract.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against f9dd6ed63edb.

Labels

Label changes:

  • add P2: The correction prevents a limited but concrete operator setup misunderstanding that otherwise produces an unexpected 404 for the other generation API.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🌊 off-meta tidepool and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Real behavior proof is not required because this PR only changes files under docs/.

Label justifications:

  • P2: The correction prevents a limited but concrete operator setup misunderstanding that otherwise produces an unexpected 404 for the other generation API.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🌊 off-meta tidepool and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Real behavior proof is not required because this PR only changes files under docs/.

Evidence

What I checked:

Likely related people:

  • steipete: Current-main blame attributes the affected documentation to Peter Steinberger's c64a640 commit, and the proposed correction is his b27a8fa commit. (role: recent Gateway and documentation contributor; confidence: high; commits: c64a640f5df5, b27a8facce41; files: docs/gateway/openai-http-api.md, docs/gateway/openresponses-http-api.md, src/gateway/server-runtime-config.ts)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete

Copy link
Copy Markdown
Contributor Author

Maintainer review is complete. Both reciprocal setup claims now match the independent runtime route flags; no runtime or configuration change is needed. I independently replayed all40 real loopback HTTP routing cases and verified fixture/listener cleanup.

The latest ClawSweeper review had no source findings. Its outstanding exact-head docs check is now green: CI33039711480 and Workflow Sanity33039711455 both succeeded at b27a8facce411782117e0d854c41cbca3539f679. Proceeding through the native preparation and merge gates.

@steipete
steipete merged commit 9512154 into main Aug 27, 2026
73 checks passed
@steipete
steipete deleted the codex/sweep-http-endpoint-docs-20260826 branch August 27, 2026 04:49
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Aug 27, 2026
…-retirement-v13

* origin/main: (243 commits)
  fix: preserve Gateway error reasons in text logs (#130645)
  refactor(video): deduplicate generation contracts (#130635)
  fix(agents): preserve direct-message sender identity (#124548)
  fix(agents): preserve silent reply after settled tools (#130675)
  fix(talk): preserve replacement speech when an old utterance is canceled (#130687)
  fix(browser): preserve literal names and formatter-owned snapshot refs (#130599)
  fix(auth): reset only the profile replaced by a successful login (#124014)
  fix: bind session creation to admitted Gateway (#130686)
  refactor(qa-lab): reuse model reference splitter (#130317)
  docs(gateway): clarify independent HTTP endpoint switches (#130690)
  fix(ui): Control UI smooth scrolling ignores the reduced-motion preference (#130428)
  refactor(lmstudio): remove unreachable catalog merge (#130689)
  fix(crabbox): restore cloud machine CPU and RAM (#130684)
  fix(secrets): compare proxy bearer tokens directly (#127054)
  fix(matrix): show recovery key availability in text status (#128051)
  fix(ios): restore approval settings navigation and remove duplicate shell state (#130651)
  refactor(agents): use fixed tool-loop defaults directly (#130681)
  refactor(qa-lab): share process tree metric reader (#130419)
  refactor(models): simplify prepared owner access (#130683)
  fix(parallels): main install and update smoke cannot complete (#130658)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant