Skip to content

RFC-0024: propose OpenAI-compatible model endpoints for Agents - #3050

Open
cooktheryan wants to merge 4 commits into
openclaw:mainfrom
cooktheryan:rfc/0023-openai-compatible-endpoints
Open

cooktheryan wants to merge 4 commits into
openclaw:mainfrom
cooktheryan:rfc/0023-openai-compatible-endpoints

Conversation

@cooktheryan

@cooktheryan cooktheryan commented Oct 20, 2026 •

Copy link
Copy Markdown

Human merge required. Agents must not merge this RFC or enable automatic merging. A human must manually click Merge.

Summary

  • Propose custom Responses API endpoints and manual model IDs for Embedded OpenClaw, Dedicated Codex, and source-owned Dedicated native OpenClaw.
  • Preserve OpenAI defaults and Dedicated Codex's runtime.codexModelBaseUrl fallback.
  • Adopt ClawSweeper's destination-authority recommendation: permission to use a shared model Secret does not authorize sending its key to an arbitrary custom endpoint. Shared keys require an owner-authorized destination; arbitrary custom endpoints require a separately supplied endpoint-specific credential and a backend-enforced credential-to-endpoint binding.
  • Keep Credential Source endpoints immutable and authoritative. The direct Secret path must reject shared-key/custom-endpoint mismatches and is not described as hostname-confined: the Harness receives its key and the current NetworkPolicy permits broad public HTTPS.
  • Defer model discovery and keep Dedicated native OpenClaw dependent on PR Allow custom OpenAI-compatible endpoints for native OpenClaw #2755.

Proposed interface mockup

Proposed Create Agent endpoint and manual model ID fields

Illustrative mockup based on the supplied screenshot; it is not implemented UI. The RFC now describes endpoint-approved shared credentials and separately supplied keys.

Verification

  • pnpm docs:check passed: 512 Markdown files checked against the length limit; 290 docs pages and 4,562 links validated; 98 specifications and 754 local links validated. Three historical external artifact links remain unverified.
  • Prettier, git diff --check, and the repository pre-push formatting hook passed.
  • No product tests or live endpoint turns were run for this documentation-only change. Runtime implementation and qualification remain future work in the linked plan.

Review focus

Review the backend-owned credential-to-endpoint binding, the shared-key restriction, the distinction between endpoint authorization and broad Agent egress, and the Responses API qualification requirements. The RFC remains Proposed. It resolves the previous author decision by requiring owner authorization for shared-key destinations and permitting arbitrary custom endpoints only with separately supplied endpoint-specific credentials.

@clawsweeper

clawsweeper Bot commented Oct 20, 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.

@cooktheryan
cooktheryan marked this pull request as ready for review October 20, 2026 20:07
@cooktheryan
cooktheryan requested a review from a team as a code owner October 20, 2026 20:07
@clawsweeper clawsweeper Bot added clawsweeper:intake:docs Preliminary submission classification; full source review pending. P2 Normal priority bug or improvement with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:docs Preliminary submission classification; full source review pending. labels Oct 20, 2026
@clawsweeper

clawsweeper Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge.

What this changes

This PR adds an RFC and implementation plan for custom Responses API providers, manual model IDs, and credential-authorized endpoints across three Agent execution topologies.

Example: Create an Agent using https://models.example.test/v1 and model provider-model-id.

  • Before: Create Agent offers OpenAI and Anthropic provider choices without the proposed custom-provider endpoint workflow.
  • After: The proposal adds Custom (Responses API), requires a manual model ID, and permits credentials only with a matching authorized endpoint.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A coherent documentation patch with no actionable defects identified; overall readiness remains limited by the unresolved product decision.
Proof confidence 🌊 off-meta tidepool Not applicable: This RFC changes documentation only and explicitly defers implementation; the inspected attachment is an illustrative mockup, not evidence of running UI or endpoint behavior.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Needs a maintainer decision · Fix scope: Complete
User problem: Agent creators lack a clear custom Responses provider workflow that selects a model and authorizes where its credential may be sent.
Reason: The RFC supplies a useful, bounded proposal, but final approval of its contract and credential-binding extension remains a maintainer product decision.

Merge readiness

⛔ Blocked before merge - 2 items remain

Keep this PR open for maintainer consideration: it presents a coherent contract proposal, incorporates the credential-destination restriction, and has no concrete patch defects identified.

Priority: P3
Reviewed head: da18c13d351801a8c0c193f13d7ff6b0819c7d8a
Owner decision: Required. See Decision needed.

Decision needed

  • Question: Should OCE add the proposed custom-provider workflow across all three topologies, including endpoint-authorized direct Secret bindings?
  • Recommendation: Accept the staged proposal: Approve the documented scope, preserving owner-authorized shared credentials and requiring implementation evidence before claiming runtime availability.
  • Why: The final proposal extends Compute and persisted authentication contracts; the discussion shows engagement but no recorded approval of this revised direction.

Before merge

  • Await maintainer action - If accepted, a human must manually merge this RFC as its explicit merge hold requires.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.

Findings

None.

Agent review details

How this fits together

Create Agent produces Configuration and credential references; OCC authorizes and snapshots them, and Compute provisions Harnesses that reach model providers directly or through the Credential Gateway.

flowchart TD
  Creator[Agent creator] --> Console[Create Agent proposed custom provider]
  Console --> OCC[OCC credential and endpoint authorization]
  OCC --> Compute[Compute provisioning]
  Compute --> Direct[Direct credential Harness]
  Compute --> Gateway[Credential Gateway]
  Direct --> Provider[Responses API provider]
  Gateway --> Provider
Loading

Technical review

Best possible solution:

Maintainers should decide the staged contract extension while preserving source-owned endpoints, backend credential-destination authorization, and explicit runtime qualification requirements.

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

This is an architectural proposal rather than a bug report; current source confirms the proposed custom-provider console workflow and capability field are absent.

Is this the best way to solve the issue?

The proposal sensibly reuses existing endpoint validation, credential sources, Configuration, and Compute lifecycle; the merged native prerequisite covers only part of its intended outcome.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against e573b7de03ba.

Provenance checked

  • RFC index and existing endpoint behavior keeps the original intent (7d472f3: The existing RFC-0023 index entry records the separate Credential Proxy proposal; this PR appends RFC-0024 and does not replace that decision or existing runtime behavior.)

Security

None.

Evidence

What I checked:

Labels

Label changes:

  • add P3: This is a proposed capability and delivery plan, with no production behavior change or established urgent regression.
  • remove P2: Current review triage priority is P3, so this older priority label is no longer current.

Label justifications:

  • P3: This is a proposed capability and delivery plan, with no production behavior change or established urgent regression.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: ⏳ waiting on maintainer: Only explicit maintainer approvals or decisions remain; merge is still blocked.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (13 earlier review cycles; latest 8 shown)
  • reviewed 2026-10-22T19:49:20.674Z sha 64feef6 :: blocked before merge. :: none
  • reviewed 2026-10-22T22:30:46.903Z sha 4534b76 :: blocked before merge. :: none
  • reviewed 2026-10-22T23:18:14.168Z sha d6c8801 :: blocked before merge. :: none
  • reviewed 2026-10-23T12:47:35.253Z sha 9111bbf :: blocked before merge. :: none
  • reviewed 2026-10-23T14:16:10.551Z sha 0f2d57e :: blocked before merge. :: [P2] Use the next continuous RFC number on the landing base
  • reviewed 2026-10-23T15:01:34.437Z sha 841fb3b :: blocked before merge. :: none
  • reviewed 2026-10-24T00:14:58.431Z sha a4728d1 :: blocked before merge. :: none
  • reviewed 2026-10-26T21:20:11.330Z sha da18c13 :: blocked before merge. :: none

Reviewed October 26, 2026, 5:25 PM ET / 21:25 UTC (Revision 14).

@cooktheryan

Copy link
Copy Markdown
Author

Addressed the ClawSweeper findings in be70a6809:

  • The RFC and plan now list the exact five CIDRs excluded by the existing Agent TCP/443 policy. They no longer claim all reserved ranges are denied, and the verification scope excludes 198.18.0.0/15.
  • The RFC now records the destination authority decision: an Agent creator with access to a model Secret may choose any compatible HTTPS endpoint, as with OpenAI or Anthropic. The creator is responsible for the URL and destination, and the form discloses that it sends the key to that endpoint.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:docs Preliminary submission classification; full source review pending. and removed clawsweeper:intake:docs Preliminary submission classification; full source review pending. labels Oct 20, 2026
@cooktheryan

Copy link
Copy Markdown
Author

The RFC and plan were updated at f20d7239132b5108fdf048356b0cf2f729b6af31 to address the security attention item.

  • They now state the proposed authority explicitly: an Agent creator with access to a shared model Secret may choose any compatible HTTPS endpoint, and that endpoint receives the key.
  • They explain that HTTPS and URL validation protect transport and input shape; they do not establish trust in the endpoint operator. The form must disclose where the key will be sent.
  • The plan now requires a maintainer to accept or reject this authority boundary before RFC acceptance. The RFC remains Proposed; this records the RFC author's position and does not claim maintainer approval.
  • I also removed the unsupported development-only HTTP loopback exception and identified the existing shared endpoint validator for reuse.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:docs Preliminary submission classification; full source review pending. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. clawsweeper:intake:docs Preliminary submission classification; full source review pending. labels Oct 20, 2026
@freeqaz

freeqaz commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator

Free's clanker here (an AI agent working on Free's behalf). I approved CI for this PR. The one red check is Static Checks: the docs word limit (docs:check) fails because specs/rfcs/0023-openai-compatible-model-endpoints.md is 2545 words, over the 2500-word hard limit. It's the only file over. Its longest sections are "Credential, validation, and egress boundaries" (404 words), "Motivation" (403) and "Endpoint and manual model selection" (303).

Trimming about 50 words, or moving detail into the plan file, should turn it green. You can check locally with pnpm docs:check-length (first run pnpm install in scripts/docs-site). Note that #2755 also proposes RFC-0023 for custom OpenAI-compatible endpoints, so the two may want to be reconciled.

@cooktheryan

Copy link
Copy Markdown
Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:docs Preliminary submission classification; full source review pending. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:docs Preliminary submission classification; full source review pending. labels Oct 21, 2026
@cooktheryan cooktheryan changed the title docs(rfc): propose OpenAI-compatible model endpoints RFC-0024: propose OpenAI-compatible model endpoints for Agents Oct 21, 2026
@cooktheryan

Copy link
Copy Markdown
Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added the clawsweeper:intake:docs Preliminary submission classification; full source review pending. label Oct 21, 2026
@freeqaz

freeqaz commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator

Free's clanker here (an AI agent working on Free's behalf). I approved CI for head 8400239. The word-limit problem is fixed: the RFC is now 2290 words. Static Checks is red for a new reason. scripts/check-specs.mjs requires RFC numbers to be continuous from 0001, and main currently ends at 0022, so the check fails with RFC numbers must be continuous from 0001: expected 0023, found 0024.

Renumbering makes sense, since #2755 claims 0023 (0023-native-compatible-model-endpoints.md). That PR hasn't merged, though, so this check stays red until it does. You could keep 0024 and let this go green once #2755 lands. Or whichever of the two lands first could take 0023, and the other renumbers.

@clawsweeper clawsweeper Bot removed the clawsweeper:intake:docs Preliminary submission classification; full source review pending. label Oct 23, 2026
@cooktheryan
cooktheryan force-pushed the rfc/0023-openai-compatible-endpoints branch from 0f2d57e to 841fb3b Compare October 23, 2026 14:54
@cooktheryan cooktheryan changed the title RFC-0025: propose OpenAI-compatible model endpoints for Agents RFC-0024: propose OpenAI-compatible model endpoints for Agents Oct 23, 2026
@cooktheryan

Copy link
Copy Markdown
Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:docs Preliminary submission classification; full source review pending. and removed clawsweeper:intake:docs Preliminary submission classification; full source review pending. labels Oct 23, 2026

@stevenlee-oai stevenlee-oai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codex review of the provider choice and Dedicated OpenClaw scope.


Model provider
Provider Harness
[OpenAI v] [Codex v]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we make Custom (Responses API) a separate provider choice in the RFC and mockup? The form says OpenAI and OpenAI API key, even though models.example.test serves the model and receives the key. I’d select the custom provider, enter its URL and model ID, and choose Codex as the harness when the endpoint supports streaming Responses and tool calls. If we start with bearer API keys, the form should ask for that provider’s key. ChatGPT OAuth and Codex service-account tokens belong with the OpenAI option.

— Codex

## Goals

- Add an optional endpoint URL for OpenAI API-key Agents. Resolve Dedicated Codex endpoints in this order: per-Agent URL, configured Installation default, then OpenAI.
- Let users enter a model ID for custom endpoints and save the endpoint and model in Embedded OpenClaw or Dedicated Codex Agent Configuration.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we include Dedicated OpenClaw in the RFC’s goals alongside Embedded OpenClaw and Dedicated Codex, and carry all three into the implementation plan? With OpenShell, the Agent creator selects a Credential Source whose bound URL determines where the Gateway can send the key. I’d describe that flow here and mark custom-endpoint support for Dedicated OpenClaw, including a real Agent turn to verify it, as pending the runtime work in #2755.

— Codex

@cooktheryan

Copy link
Copy Markdown
Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:docs Preliminary submission classification; full source review pending. and removed clawsweeper:intake:docs Preliminary submission classification; full source review pending. labels Oct 24, 2026
@freeqaz-openai

Copy link
Copy Markdown
Collaborator

human version of Free here. Taking a look at this now. Thanks for the RFC!

@cooktheryan

Copy link
Copy Markdown
Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:docs Preliminary submission classification; full source review pending. status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. and removed merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. clawsweeper:intake:docs Preliminary submission classification; full source review pending. P2 Normal priority bug or improvement with limited blast radius. labels Oct 26, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants