Skip to content

feat(models): allow private network via models.providers.*.request - #63671

Merged
obviyus merged 6 commits into
openclaw:mainfrom
qas:main
Apr 10, 2026
Merged

obviyus merged 6 commits into
openclaw:mainfrom
qas:main

Conversation

@qas

@qas qas commented Apr 9, 2026 •

Copy link
Copy Markdown
Contributor

Add optional request.allowPrivateNetwork for operator-controlled self-hosted OpenAI-compatible bases (LAN/overlay/split DNS). Plumbs the flag into resolveProviderRequestPolicyConfig for streaming provider HTTP so fetchWithSsrFGuard can allow private-resolved model URLs when explicitly enabled. Embedded OpenAI Responses WebSocket uses the same request object (headers/TLS); it does not use the HTTP fetch SSRF stack.

Updates zod schema, config help/labels, unit tests for sanitize/merge, and threads provider request into the embedded WebSocket stream path (stream-resolution.ts).

Summary

Describe the problem and fix in 2–5 bullets:

If this PR fixes a plugin beta-release blocker, title it fix(<plugin-id>): beta blocker - <summary> and link the matching Beta blocker: <plugin-name> - <summary> issue labeled beta-blocker. Contributors cannot label PRs, so the title is the PR-side signal for maintainers and automation.

  • Problem: Operators using self-hosted OpenAI-compatible APIs whose baseUrl resolves to private/CGNAT addresses were blocked by default SSRF-style protections, with no config-level way to opt in per provider.
  • Why it matters: Legitimate LAN, split DNS, and overlay setups need an explicit, auditable switch; disabling SSRF globally is unsafe.
  • What changed: New optional models.providers.<id>.request.allowPrivateNetwork (sanitized/merged like other request fields), wired through resolveProviderRequestPolicyConfig into provider HTTP fetch so fetchWithSsrFGuard respects the flag when true. Embedded OpenAI Responses WebSocket receives the model’s request via managerOptions for headers/TLS continuity (not the same SSRF gate as HTTP). Shared ConfiguredProviderRequest still exposes this field on some non-model surfaces that do not forward request.allowPrivateNetwork yet — acknowledged in review; follow-up to narrow schema or wire those paths separately.
  • What did NOT change (scope boundary): Default behavior remains deny-private unless explicitly enabled; no broad SSRF relaxation beyond the provider request path described; unrelated providers/channels unchanged.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor required for the fix
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

Root Cause (if applicable)

For bug fixes or regressions, explain why this happened, not just what changed. Otherwise write N/A. If the cause is unclear, write Unknown.

  • Root cause: N/A (feature addition, not a regression fix).
  • Missing detection / guardrail: N/A
  • Contributing context (if known): N/A

Regression Test Plan (if applicable)

For bug fixes or regressions, name the smallest reliable test coverage that should catch this. Otherwise write N/A.

  • Coverage level that should have caught this:
    • Unit test
    • Seam / integration test
    • End-to-end test
    • Existing coverage already sufficient
  • Target test or file: src/agents/provider-request-config.test.ts (sanitize + merge behavior for allowPrivateNetwork).
  • Scenario the test should lock in: Config values normalize to boolean; merge precedence matches other request fields; invalid values do not silently enable private network access.
  • Why this is the smallest reliable guardrail: Logic is centralized in provider request resolution; unit tests catch mis-merge/sanitize without needing live private endpoints.
  • Existing test that already covers this (if any): New/updated tests in provider-request-config.test.ts as listed above.
  • If no new test is added, why not: N/A — tests added/updated for sanitize/merge.

User-visible / Behavior Changes

List user-visible changes (including defaults/config).
If none, write None.

  • New optional config: models.providers.<providerId>.request.allowPrivateNetwork (boolean). When omitted or false, behavior matches prior defaults (private-resolved model URLs remain blocked by the HTTP fetch SSRF policy). When true, provider HTTP streaming can reach private-resolved model baseUrls via fetchWithSsrFGuard (operator opt-in). OpenAI Responses WebSocket uses the same request for handshake headers/TLS; it does not use that HTTP fetch SSRF path.

Diagram (if applicable)

For UI changes or non-trivial logic flows, include a small ASCII diagram reviewers can scan quickly. Otherwise write N/A.

N/A

Security Impact (required)

  • New permissions/capabilities? Yes — per-provider opt-in to relax SSRF policy for model baseUrl resolution to private addresses when explicitly set (HTTP fetch path).
  • Secrets/tokens handling changed? No
  • New/changed network calls? No new endpoints; same calls may be allowed to targets that were previously blocked when the flag is true.
  • Command/tool execution surface changed? No
  • Data access scope changed? No
  • If any Yes, explain risk + mitigation: Risk: misconfiguration could expose traffic to unintended private hosts. Mitigation: default remains off; flag is per-provider and must be set deliberately; operators should only enable for trusted self-hosted bases.

Repro + Verification

Environment

  • OS: (your OS)
  • Runtime/container: (e.g. devcontainer / local Node version matching engines)
  • Model/provider: Self-hosted OpenAI-compatible with baseUrl resolving to RFC1918/CGNAT (or your test harness).
  • Integration/channel (if any): N/A
  • Relevant config (redacted): models.providers.<id>.baseUrl + models.providers.<id>.request.allowPrivateNetwork: true

Steps

  1. Configure a provider with a private-resolved baseUrl and request.allowPrivateNetwork: true.
  2. Exercise model usage over provider HTTP streaming (the path that uses buildGuardedModelFetch / fetchWithSsrFGuard). Optionally exercise OpenAI Responses WebSocket; headers/TLS come from request, not the HTTP SSRF gate.
  3. Confirm HTTP traffic succeeds where it previously failed under default SSRF policy; with flag absent/false, behavior should match pre-change.

Expected

  • With flag true: model HTTP calls to a trusted private baseUrl succeed when DNS resolves privately (subject to the fetch guard).
  • With flag false/omitted: behavior unchanged from before this PR (private resolution still blocked by policy on HTTP fetch).

Actual

  • (Fill after you verify locally or rely on CI.)

Evidence

Attach at least one:

  • Failing test/log before + passing after
  • Trace/log snippets
  • Screenshot/recording
  • Perf numbers (if relevant)

(Adjust checkboxes to what you attach.)

Human Verification (required)

What you personally verified (not just CI), and how:

  • Verified scenarios: Config parses; sanitize/merge unit tests; (add manual run if you did one).
  • Edge cases checked: Omitted flag, false, true; invalid inputs rejected or normalized per tests.
  • What you did not verify: Full E2E against a real private baseUrl in production-like network (if applicable).

Review Conversations

  • I replied to or resolved every bot review conversation I addressed in this PR.
  • I left unresolved only the conversations that still need reviewer or maintainer judgment.

If a bot review conversation is addressed by this PR, resolve that conversation yourself. Do not leave bot review conversation cleanup for maintainers.

Compatibility / Migration

  • Backward compatible? Yes — default unchanged when the new field is omitted.
  • Config/env changes? Yes — optional new field under models.providers.*.request.
  • Migration needed? No
  • If yes, exact upgrade steps: N/A

Risks and Mitigations

List only real risks for this PR. Add/remove entries as needed. If none, write None.

  • Risk: Operator sets allowPrivateNetwork on a provider whose baseUrl is not fully trusted, widening SSRF exposure to internal networks.
    • Mitigation: Document as operator-only; default off; pair with network controls and trusted baseUrl where possible.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime agents Agent runtime and tooling size: S labels Apr 9, 2026
@greptile-apps

greptile-apps Bot commented Apr 9, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds models.providers.*.request.allowPrivateNetwork as an operator-level opt-in boolean that allows provider HTTP requests to reach private/CGNAT-resolved baseUrl endpoints normally blocked by SSRF policy. The sanitize/merge logic, zod schema, config help/labels, and unit tests are all coherent and the HTTP fetch path (provider-transport-fetch.ts) is correctly wired through fetchWithSsrFGuard.

  • The WebSocket path (openai-ws-connection.ts) computes allowPrivateNetwork from resolveProviderRequestPolicyConfig but the resulting value is never consumed when constructing the ws socket — since the ws library does not route through fetchWithSsrFGuard, the flag is inert for WebSocket connections. This is not a security regression (no guard existed there before), but the PR description's claim that the flag is wired into the WebSocket transport is not currently accurate.

Confidence Score: 5/5

Safe to merge; the HTTP SSRF guard integration is correct and the WebSocket gap is a no-op, not a regression.

All findings are P2. The core sanitize/merge/type/schema changes are correct and well-tested. The WebSocket path gap is inert (no existing guard to break) and does not affect security or correctness of the primary HTTP use case.

src/agents/openai-ws-connection.ts — requestConfig.allowPrivateNetwork is computed but never consumed.

Vulnerabilities

No security concerns identified. allowPrivateNetwork is a config-level-only operator opt-in (stripped from runtime overrides in sanitizeRuntimeProviderRequestOverrides), defaults to false, and is scoped per-provider. The HTTP fetch path correctly passes the flag to the existing fetchWithSsrFGuard mechanism rather than bypassing it. The WebSocket path gap is a completeness issue, not a security regression.

Comments Outside Diff (1)

  1. src/agents/openai-ws-connection.ts, line 457-474 (link)

    P2 allowPrivateNetwork computed but unused on the WebSocket path

    resolveProviderRequestPolicyConfig is called with allowPrivateNetwork: this.request?.allowPrivateNetwork === true, which sets requestConfig.allowPrivateNetwork, but that value is never actually read below — the socket is constructed with only headers and TLS options. Because the ws library makes direct net/tls connections and does not route through fetchWithSsrFGuard, there is no underlying SSRF gate to relax here, so the flag is inert for this path.

    This means the PR description's claim that allowPrivateNetwork is "wired through… OpenAI responses WebSocket" is not yet true in practice. Self-hosted private-endpoint WebSocket URLs would be reachable regardless of the flag (no guard existed before), but setting the flag in a future scenario where a WebSocket SSRF guard is added would require explicitly consuming requestConfig.allowPrivateNetwork in the socket factory call. Consider either (a) noting this in a code comment so the next person adding a WebSocket guard knows to wire it in, or (b) consuming the value via a guarded socket factory now.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: src/agents/openai-ws-connection.ts
    Line: 457-474
    
    Comment:
    **`allowPrivateNetwork` computed but unused on the WebSocket path**
    
    `resolveProviderRequestPolicyConfig` is called with `allowPrivateNetwork: this.request?.allowPrivateNetwork === true`, which sets `requestConfig.allowPrivateNetwork`, but that value is never actually read below — the socket is constructed with only `headers` and TLS options. Because the `ws` library makes direct `net`/`tls` connections and does not route through `fetchWithSsrFGuard`, there is no underlying SSRF gate to relax here, so the flag is inert for this path.
    
    This means the PR description's claim that `allowPrivateNetwork` is "wired through… OpenAI responses WebSocket" is not yet true in practice. Self-hosted private-endpoint WebSocket URLs would be reachable regardless of the flag (no guard existed before), but setting the flag in a future scenario where a WebSocket SSRF guard is added would require explicitly consuming `requestConfig.allowPrivateNetwork` in the socket factory call. Consider either (a) noting this in a code comment so the next person adding a WebSocket guard knows to wire it in, or (b) consuming the value via a guarded socket factory now.
    
    How can I resolve this? If you propose a fix, please make it concise.
Prompt To Fix All With AI
This is a comment left during a code review.
Path: src/agents/openai-ws-connection.ts
Line: 457-474

Comment:
**`allowPrivateNetwork` computed but unused on the WebSocket path**

`resolveProviderRequestPolicyConfig` is called with `allowPrivateNetwork: this.request?.allowPrivateNetwork === true`, which sets `requestConfig.allowPrivateNetwork`, but that value is never actually read below — the socket is constructed with only `headers` and TLS options. Because the `ws` library makes direct `net`/`tls` connections and does not route through `fetchWithSsrFGuard`, there is no underlying SSRF gate to relax here, so the flag is inert for this path.

This means the PR description's claim that `allowPrivateNetwork` is "wired through… OpenAI responses WebSocket" is not yet true in practice. Self-hosted private-endpoint WebSocket URLs would be reachable regardless of the flag (no guard existed before), but setting the flag in a future scenario where a WebSocket SSRF guard is added would require explicitly consuming `requestConfig.allowPrivateNetwork` in the socket factory call. Consider either (a) noting this in a code comment so the next person adding a WebSocket guard knows to wire it in, or (b) consuming the value via a guarded socket factory now.

How can I resolve this? If you propose a fix, please make it concise.

Reviews (1): Last reviewed commit: "feat(models): allow private network via ..." | Re-trigger Greptile

@chatgpt-codex-connector chatgpt-codex-connector Bot 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

Here are some automated review suggestions for this pull request.

Reviewed commit: e14ee9d5fb

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/config/types.provider-request.ts Resolved
Comment thread src/agents/openai-ws-connection.ts Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot 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

Here are some automated review suggestions for this pull request.

Reviewed commit: 49fedcf5b0

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/config/zod-schema.core.ts Resolved
@obviyus

obviyus commented Apr 10, 2026

Copy link
Copy Markdown
Collaborator

Patched the PR head with a scoped fix for the review feedback.

What changed:

  • kept models.providers.*.request.allowPrivateNetwork on the model-provider request surface only
  • removed the accidental shared/non-model schema exposure
  • added a regression test proving media-understanding request config rejects allowPrivateNetwork

Verification run:

  • pnpm test src/agents/provider-request-config.test.ts src/config/schema.test.ts

Note: the default commit hook on this branch also hits an unrelated existing branch-wide failure in extensions/feishu/src/monitor.transport.ts:193 via pnpm lint:webhook:no-low-level-body-read; I did not expand this patch into that unrelated cleanup.

New head: f04bb2cdb1.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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

Here are some automated review suggestions for this pull request.

Reviewed commit: f04bb2cdb1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector chatgpt-codex-connector Bot 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

Here are some automated review suggestions for this pull request.

Reviewed commit: 285d9f97f9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/agents/provider-request-config.ts Resolved
@obviyus obviyus self-assigned this Apr 10, 2026
qas and others added 6 commits April 10, 2026 11:08
Add optional request.allowPrivateNetwork for operator-controlled self-hosted
OpenAI-compatible bases (LAN/overlay/split DNS). Plumbs the flag into
resolveProviderRequestPolicyConfig for streaming provider HTTP and OpenAI
responses WebSocket so SSRF policy can allow private-resolved model URLs
when explicitly enabled.
Updates zod schema, config help/labels, and unit tests for sanitize/merge.

@obviyus obviyus left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed latest landing head cc2ce81.

@obviyus
obviyus merged commit 71617ef into openclaw:main Apr 10, 2026
21 of 26 checks passed
@obviyus

obviyus commented Apr 10, 2026

Copy link
Copy Markdown
Collaborator

Landed.

Commits:

Thanks @qas.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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

Here are some automated review suggestions for this pull request.

Reviewed commit: cc2ce816ac

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/plugins/types.ts
apiKey: string;
baseUrl?: string;
request?: ProviderRequestTransportOverrides;
request?: ModelProviderRequestTransportOverrides;

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.

P2 Badge Keep runtime-auth request contract to honored transport fields

This change widens ProviderPreparedRuntimeAuth.request to ModelProviderRequestTransportOverrides, which now includes allowPrivateNetwork, but the runtime-auth application path still strips that field (sanitizeRuntimeProviderRequestOverrides keeps only headers/auth in src/agents/provider-request-config.ts) and never reattaches it to the runtime model in applyPreparedRuntimeRequestOverrides (src/agents/pi-embedded-runner/run/auth-controller.ts). In practice, a provider plugin can now return request.allowPrivateNetwork: true (and type-check), yet private baseUrl traffic remains blocked because the flag is silently ignored; the contract should either stay narrow here or this field should be plumbed through the runtime-auth path.

Useful? React with 👍 / 👎.

steipete pushed a commit that referenced this pull request Apr 10, 2026
* feat(models): allow private network via models.providers.*.request
Add optional request.allowPrivateNetwork for operator-controlled self-hosted
OpenAI-compatible bases (LAN/overlay/split DNS). Plumbs the flag into
resolveProviderRequestPolicyConfig for streaming provider HTTP and OpenAI
responses WebSocket so SSRF policy can allow private-resolved model URLs
when explicitly enabled.
Updates zod schema, config help/labels, and unit tests for sanitize/merge.

* agents thread provider request into websocket stream

* fix(config): scope allowPrivateNetwork to model requests

* fix(agents): refresh websocket manager on request changes

* fix(agents): scope runtime private-network overrides to models

* fix: allow private network provider request opt-in (#63671) (thanks @qas)

---------

Co-authored-by: Ayaan Zaidi <[email protected]>
steipete pushed a commit that referenced this pull request Apr 10, 2026
* feat(models): allow private network via models.providers.*.request
Add optional request.allowPrivateNetwork for operator-controlled self-hosted
OpenAI-compatible bases (LAN/overlay/split DNS). Plumbs the flag into
resolveProviderRequestPolicyConfig for streaming provider HTTP and OpenAI
responses WebSocket so SSRF policy can allow private-resolved model URLs
when explicitly enabled.
Updates zod schema, config help/labels, and unit tests for sanitize/merge.

* agents thread provider request into websocket stream

* fix(config): scope allowPrivateNetwork to model requests

* fix(agents): refresh websocket manager on request changes

* fix(agents): scope runtime private-network overrides to models

* fix: allow private network provider request opt-in (#63671) (thanks @qas)

---------

Co-authored-by: Ayaan Zaidi <[email protected]>
lovewanwan pushed a commit to lovewanwan/openclaw that referenced this pull request Apr 28, 2026
* feat(models): allow private network via models.providers.*.request
Add optional request.allowPrivateNetwork for operator-controlled self-hosted
OpenAI-compatible bases (LAN/overlay/split DNS). Plumbs the flag into
resolveProviderRequestPolicyConfig for streaming provider HTTP and OpenAI
responses WebSocket so SSRF policy can allow private-resolved model URLs
when explicitly enabled.
Updates zod schema, config help/labels, and unit tests for sanitize/merge.

* agents thread provider request into websocket stream

* fix(config): scope allowPrivateNetwork to model requests

* fix(agents): refresh websocket manager on request changes

* fix(agents): scope runtime private-network overrides to models

* fix: allow private network provider request opt-in (openclaw#63671) (thanks @qas)

---------

Co-authored-by: Ayaan Zaidi <[email protected]>
ogt-redknie pushed a commit to ogt-redknie/OPENX that referenced this pull request May 2, 2026
* feat(models): allow private network via models.providers.*.request
Add optional request.allowPrivateNetwork for operator-controlled self-hosted
OpenAI-compatible bases (LAN/overlay/split DNS). Plumbs the flag into
resolveProviderRequestPolicyConfig for streaming provider HTTP and OpenAI
responses WebSocket so SSRF policy can allow private-resolved model URLs
when explicitly enabled.
Updates zod schema, config help/labels, and unit tests for sanitize/merge.

* agents thread provider request into websocket stream

* fix(config): scope allowPrivateNetwork to model requests

* fix(agents): refresh websocket manager on request changes

* fix(agents): scope runtime private-network overrides to models

* fix: allow private network provider request opt-in (openclaw#63671) (thanks @qas)

---------

Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 24, 2026
* feat(models): allow private network via models.providers.*.request
Add optional request.allowPrivateNetwork for operator-controlled self-hosted
OpenAI-compatible bases (LAN/overlay/split DNS). Plumbs the flag into
resolveProviderRequestPolicyConfig for streaming provider HTTP and OpenAI
responses WebSocket so SSRF policy can allow private-resolved model URLs
when explicitly enabled.
Updates zod schema, config help/labels, and unit tests for sanitize/merge.

* agents thread provider request into websocket stream

* fix(config): scope allowPrivateNetwork to model requests

* fix(agents): refresh websocket manager on request changes

* fix(agents): scope runtime private-network overrides to models

* fix: allow private network provider request opt-in (openclaw#63671) (thanks @qas)

---------

Co-authored-by: Ayaan Zaidi <[email protected]>
jameslcowan pushed a commit to jameslcowan/openclaw that referenced this pull request Jun 2, 2026
* feat(models): allow private network via models.providers.*.request
Add optional request.allowPrivateNetwork for operator-controlled self-hosted
OpenAI-compatible bases (LAN/overlay/split DNS). Plumbs the flag into
resolveProviderRequestPolicyConfig for streaming provider HTTP and OpenAI
responses WebSocket so SSRF policy can allow private-resolved model URLs
when explicitly enabled.
Updates zod schema, config help/labels, and unit tests for sanitize/merge.

* agents thread provider request into websocket stream

* fix(config): scope allowPrivateNetwork to model requests

* fix(agents): refresh websocket manager on request changes

* fix(agents): scope runtime private-network overrides to models

* fix: allow private network provider request opt-in (openclaw#63671) (thanks @qas)

---------

Co-authored-by: Ayaan Zaidi <[email protected]>
vixco pushed a commit to vixco/openclaw that referenced this pull request Aug 16, 2026
* feat(models): allow private network via models.providers.*.request
Add optional request.allowPrivateNetwork for operator-controlled self-hosted
OpenAI-compatible bases (LAN/overlay/split DNS). Plumbs the flag into
resolveProviderRequestPolicyConfig for streaming provider HTTP and OpenAI
responses WebSocket so SSRF policy can allow private-resolved model URLs
when explicitly enabled.
Updates zod schema, config help/labels, and unit tests for sanitize/merge.

* agents thread provider request into websocket stream

* fix(config): scope allowPrivateNetwork to model requests

* fix(agents): refresh websocket manager on request changes

* fix(agents): scope runtime private-network overrides to models

* fix: allow private network provider request opt-in (openclaw#63671) (thanks @qas)

---------

Co-authored-by: Ayaan Zaidi <[email protected]>
zooqueen pushed a commit to zooqueen/openclaw that referenced this pull request Sep 11, 2026
* feat(models): allow private network via models.providers.*.request
Add optional request.allowPrivateNetwork for operator-controlled self-hosted
OpenAI-compatible bases (LAN/overlay/split DNS). Plumbs the flag into
resolveProviderRequestPolicyConfig for streaming provider HTTP and OpenAI
responses WebSocket so SSRF policy can allow private-resolved model URLs
when explicitly enabled.
Updates zod schema, config help/labels, and unit tests for sanitize/merge.

* agents thread provider request into websocket stream

* fix(config): scope allowPrivateNetwork to model requests

* fix(agents): refresh websocket manager on request changes

* fix(agents): scope runtime private-network overrides to models

* fix: allow private network provider request opt-in (openclaw#63671) (thanks @qas)

---------

Co-authored-by: Ayaan Zaidi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling docs Improvements or additions to documentation gateway Gateway runtime size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Support allowPrivateNetwork for models.providers[].request configuration

2 participants