Skip to content

Commit b7a932a

Browse files
authored
docs(inference): remove stale managed endpoint references (#3428)
Signed-off-by: John Myers <9696606+johntmyers@users.noreply.github.com>
1 parent a72351d commit b7a932a

14 files changed

Lines changed: 30 additions & 78 deletions

File tree

.agents/skills/sync-agent-infra/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Use this map when product behavior, commands, or development workflows change. I
4545
| Sandbox policy schema, presets, or enforcement behavior | `generate-sandbox-policy`, `openshell-cli` |
4646
| Supervisor middleware policy, registrations, runtime, or failure behavior | `generate-sandbox-policy`, `openshell-cli`, `debug-openshell-cluster` |
4747
| Gateway deployment, Helm, runtime drivers, or health checks | `debug-openshell-cluster`, `helm-dev-environment` |
48-
| Inference providers, native model endpoints, or migration from `inference.local` | `debug-inference`, `openshell-cli`, `generate-sandbox-policy` |
48+
| Inference providers, native model endpoints, or migration from the retired managed endpoint | `debug-inference`, `openshell-cli`, `generate-sandbox-policy` |
4949
| TUI architecture, navigation, data fetching, or UX | `tui-development` |
5050
| Release artifacts or post-publish smoke coverage | `test-release-canary` |
5151
| GitHub Actions workflows, required checks, or CI diagnostics | `watch-github-actions`; also `test-release-canary` for release smoke coverage |

.claude/agent-memory/arch-doc-writer/MEMORY.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@
117117
- Proto message field `filesystem` maps to YAML key `filesystem_policy` (different names!)
118118
- IMPORTANT: Sandbox always runs in Proxy mode. NetworkMode::Block exists as enum variant but is NEVER set.
119119
- Both file mode and gRPC mode set NetworkMode::Proxy unconditionally (see load_policy() in lib.rs and TryFrom in policy.rs)
120-
- Reason: proxy always needed so inference.local is addressable + all egress evaluated by OPA
120+
- Reason: proxy always needed so all egress is evaluated by OPA
121121
- OPA two-action model: Allow, Deny (NetworkAction in opa.rs). InspectForInference was REMOVED.
122122
- Rego network_action rule: "allow" or "deny" only (no "inspect_for_inference")
123123
- Behavioral trigger: endpoint `protocol` field -> L7 inspection; absent -> L4 raw copy_bidirectional
@@ -152,9 +152,9 @@
152152
- Route sources: `--inference-routes` YAML file (standalone) > cluster bundle via gRPC; empty routes gracefully disable
153153
- Cluster bundle refreshed every ROUTE_REFRESH_INTERVAL_SECS (30s)
154154
- Patterns: POST /v1/chat/completions, /v1/completions, /v1/responses, /v1/messages; GET /v1/models, /v1/models/*
155-
- inference.local CONNECT intercepted BEFORE OPA evaluation in proxy
155+
- Managed inference CONNECT traffic was intercepted before OPA evaluation in the proxy
156156
- InferenceProviderProfile in openshell-core/src/inference.rs: centralized provider metadata
157-
- proxy.rs: ONLY CONNECT to inference.local is handled; non-CONNECT requests get 403 for ALL hosts
157+
- proxy.rs: only managed inference CONNECT traffic was handled; non-CONNECT requests received 403 for all hosts
158158
- Buffer: INITIAL_INFERENCE_BUF=64KiB, MAX_INFERENCE_BUF=10MiB; grows by doubling
159159
- Dev sandbox: `mise run sandbox -e VAR_NAME` forwards host env vars; NVIDIA_API_KEY always passed
160160

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ Public skills live in `skills/` and work without an OpenShell source checkout. I
8080
| --- | --- |
8181
| `openshell-cli` | CLI usage, sandbox lifecycle, provider management, and BYOC workflows |
8282
| `debug-openshell-cluster` | Diagnose gateway deployment and health issues |
83-
| `debug-inference` | Diagnose attached-provider inference, native endpoints, and migration from `inference.local` |
83+
| `debug-inference` | Diagnose attached-provider inference, native endpoints, and migration from the retired managed endpoint |
8484
| `generate-sandbox-policy` | Generate YAML sandbox policies from requirements or API documentation |
8585

8686
Public skills use `openshell --help` for installed command syntax and published OpenShell documentation for product concepts and configuration. They must not depend on repository-relative source or documentation files.

architecture/sandbox.md

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -351,17 +351,11 @@ security logs. See
351351
[Supervisor Middleware](../docs/extensibility/supervisor-middleware.mdx) for
352352
configuration and protocol details.
353353

354-
`https://inference.local` is special. It bypasses OPA network policy and is
355-
handled by the inference interception path:
356-
357-
1. The proxy terminates the local TLS connection with the sandbox CA.
358-
2. It detects known OpenAI, Anthropic, and compatible inference request shapes.
359-
3. It strips caller-supplied credentials and disallowed headers.
360-
4. It forwards through `openshell-router` using the route bundle fetched from
361-
the gateway.
362-
363-
External inference endpoints that do not use `inference.local` are treated like
364-
ordinary network traffic and must be allowed by policy.
354+
Inference providers use the same egress path as other external services. An
355+
attached provider profile contributes endpoint and binary policy. The proxy
356+
then resolves the provider's credential placeholder only when both policy and
357+
the profile's endpoint binding authorize the native request. Model selection,
358+
request shape, headers, streaming, and timeouts remain client concerns.
365359

366360
In proxy-required networks, the supervisor chains upstream TLS tunnels through
367361
a corporate forward proxy with HTTP CONNECT instead of connecting directly,

crates/openshell-supervisor/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4754,8 +4754,8 @@ filesystem_policy:
47544754

47554755
#[test]
47564756
fn discover_policy_restrictive_default_blocks_network() {
4757-
// In cluster mode we keep proxy mode enabled so `inference.local`
4758-
// can always be routed through proxy/OPA controls.
4757+
// In cluster mode we keep proxy mode enabled so all egress passes
4758+
// through proxy/OPA controls.
47594759
let proto = openshell_policy::restrictive_default_policy();
47604760
let local_policy = SandboxPolicy::try_from(proto).expect("conversion should succeed");
47614761
assert!(matches!(local_policy.network.mode, NetworkMode::Proxy));

docs/sandboxes/inference-routing.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,8 @@ openshell inference set \
232232
--timeout 300
233233
```
234234

235-
Clients called `https://inference.local`, supplied a placeholder key and model,
236-
and relied on OpenShell to rewrite the request.
235+
Clients called a managed virtual endpoint, supplied a placeholder key and
236+
model, and relied on OpenShell to rewrite the request.
237237

238238
### After
239239

@@ -266,9 +266,9 @@ Update each workload to:
266266
5. Use the provider's native request format.
267267

268268
Launch a new process after attachment and verify a native request before
269-
upgrading production workloads. Code that still calls `inference.local` fails
270-
DNS resolution because OpenShell no longer resolves or trusts that virtual
271-
host.
269+
upgrading production workloads. Code that still calls the retired managed
270+
virtual endpoint fails DNS resolution because OpenShell no longer resolves or
271+
trusts that host.
272272

273273
### Migration Checklist
274274

e2e/python/test_sandbox_providers.py

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -284,21 +284,6 @@ def log_message(self, fmt, *args):
284284
proc.communicate(timeout=5)
285285

286286

287-
def _tcp_connect_errno():
288-
"""Return a closure that reports the errno from a normal TCP connection."""
289-
290-
def fn(host, port):
291-
import socket
292-
293-
try:
294-
with socket.create_connection((host, port), timeout=10):
295-
return 0
296-
except OSError as error:
297-
return error.errno or -1
298-
299-
return fn
300-
301-
302287
# ===========================================================================
303288
# Tests: placeholder visibility
304289
# ===========================================================================
@@ -625,11 +610,10 @@ def call_native_openai(host: str, port: int) -> str:
625610
assert body["model"] == "fixture-openai-model"
626611

627612

628-
def test_imported_anthropic_profile_uses_native_endpoint_and_inference_local_is_not_privileged(
613+
def test_imported_anthropic_profile_allows_native_endpoint_with_attached_provider(
629614
sandbox: Callable[..., Sandbox],
630615
sandbox_client: SandboxClient,
631616
) -> None:
632-
"""Attached imported profiles should not resurrect `inference.local` routing."""
633617
stub = sandbox_client._stub
634618
profile_id = f"e2e-native-anthropic-{int(time.time() * 1000)}"
635619
provider_name = f"{profile_id}-provider"
@@ -714,15 +698,6 @@ def call_native_anthropic(host: str, port: int) -> str:
714698
assert payload["x_api_key"] == secret
715699
assert body["model"] == "fixture-anthropic-model"
716700

717-
denied = sb.exec_python(
718-
_tcp_connect_errno(),
719-
args=("inference.local", 443),
720-
timeout_seconds=30,
721-
)
722-
assert denied.exit_code == 0, denied.stderr
723-
assert int(denied.stdout.strip()) != 0
724-
725-
726701
# ===========================================================================
727702
# Tests: security & edge cases
728703
# ===========================================================================

rfc/0005-sandbox-proxy-egress-adapter/README.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ See rfc/README.md for the full RFC process and state definitions.
2525

2626
Refactor sandbox egress around shared authorization, destination-validation,
2727
and relay boundaries. CONNECT, forward HTTP, native TCP capture, policy DNS,
28-
`inference.local`, `policy.local`, and metadata loopback become narrow adapters
28+
`policy.local`, and metadata loopback become narrow adapters
2929
that translate userland entry points into common runtime intents. Policy
3030
evaluation, destination validation, supervisor middleware, credential
3131
injection, request-body rewrite, WebSocket handling, protocol processing, and
@@ -101,7 +101,7 @@ authorization or relay logic.
101101
### Migration Big Rocks
102102

103103
1. **Transport and local-service adapters.** CONNECT, forward HTTP,
104-
transparent TCP, policy DNS, `inference.local`, `policy.local`, and metadata
104+
transparent TCP, policy DNS, `policy.local`, and metadata
105105
loopback become small adapters. They parse their surface and produce either
106106
an egress intent, a local response, or a DNS answer. They do not duplicate
107107
policy evaluation.
@@ -160,13 +160,10 @@ flowchart TD
160160
end
161161
162162
subgraph LocalApis["Sandbox-local services"]
163-
InferenceReq["Request to inference.local"]
164163
PolicyReq["Request to policy.local"]
165164
MetadataReq["Request to metadata loopback"]
166-
InferenceAdapter["Inference local adapter"]
167165
PolicyAdapter["Policy local adapter"]
168166
MetadataAdapter["Metadata loopback adapter"]
169-
InferenceReq --> InferenceAdapter
170167
PolicyReq --> PolicyAdapter
171168
MetadataReq --> MetadataAdapter
172169
end
@@ -189,14 +186,12 @@ flowchart TD
189186
User --> ProxyBytes
190187
User --> NameLookup
191188
User --> NativeConnect
192-
User --> InferenceReq
193189
User --> PolicyReq
194190
User --> MetadataReq
195191
196192
Connect --> Intent
197193
Forward --> Intent
198194
TcpAdapter --> Intent
199-
InferenceAdapter --> InferenceResp["Local inference response"]
200195
PolicyAdapter --> PolicyResp["Local policy response"]
201196
MetadataAdapter --> MetadataResp["Local metadata credential response"]
202197
```
@@ -362,8 +357,6 @@ authorization evidence evaluated at connect time, not the mechanism that joins
362357
the DNS request to the TCP connection.
363358

364359
Local service adapters stay outside the normal external egress relay:
365-
`inference.local` routes chat, completion, model discovery, embeddings, and
366-
provider-specific inference traffic through the router with local limits;
367360
`policy.local` exposes current policy, denial summaries, proposal submission,
368361
and proposal wait routes; metadata loopback serves provider metadata
369362
credentials to SDKs that bypass HTTP proxy variables.

rfc/0005-sandbox-proxy-egress-adapter/current-shape.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ The networking surface currently includes:
5252

5353
- CONNECT proxy traffic for HTTPS and generic TCP tunnels.
5454
- Forward HTTP proxy traffic for absolute-form HTTP requests.
55-
- `inference.local` for local inference routing.
5655
- `policy.local` for current policy, denial summaries, proposal submission,
5756
and proposal wait routes.
5857
- GCE metadata loopback for SDKs that bypass HTTP proxy variables.
@@ -123,7 +122,6 @@ copy, but it is still orchestrated separately from the CONNECT relay path.
123122
```mermaid
124123
flowchart TD
125124
Request["Request to local name"] --> Match{"Known local route?"}
126-
Match -- "inference.local" --> Inference["Inference route adapter"]
127125
Match -- "policy.local" --> Policy["Policy local adapter"]
128126
Match -- "metadata loopback" --> Metadata["Metadata credential server"]
129127
Match -- No --> External["Normal egress path"]
@@ -132,9 +130,7 @@ flowchart TD
132130
Metadata --> MetadataResp["Metadata response"]
133131
```
134132

135-
`inference.local` now covers buffered and streaming inference shapes including
136-
chat/completion routes, model discovery, embeddings, and provider-specific
137-
routes. `policy.local` supports the agentic approval loop: agents can submit
133+
`policy.local` supports the agentic approval loop: agents can submit
138134
narrow proposals and wait on approval/reload before retrying. Metadata
139135
loopback exists for provider credentials consumed by SDKs that do not honor
140136
HTTP proxy variables.
@@ -274,7 +270,6 @@ The refactor should preserve:
274270
- MCP Streamable HTTP method and tool policy.
275271
- WebSocket transport and GraphQL-over-WebSocket policy.
276272
- h2c rejection on inspected HTTP routes.
277-
- Inference routing through `inference.local`, including embeddings.
278273
- Agent-facing policy advisor routes through `policy.local`.
279274
- GCE metadata loopback for supported provider credentials.
280275
- Timeout and resource tracking for client, upstream, and local service work.

rfc/0005-sandbox-proxy-egress-adapter/implementation-plan.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ after the shared contracts are authoritative.
2727
`exec.path` cannot satisfy binary-scoped policy while identity is required.
2828
- Cover static credential injection, token grants, REST body rewrite,
2929
WebSocket text-frame rewrite and policy, GraphQL, JSON-RPC, and MCP behavior.
30-
- Cover `inference.local`, `policy.local`, metadata loopback, and unchanged
31-
nftables bypass reject/log behavior.
30+
- Cover `policy.local`, metadata loopback, and unchanged nftables bypass
31+
reject/log behavior.
3232
- Capture stable OCSF event class, activity/action/disposition, severity,
3333
status, destination, actor, firewall rule, message, and status detail for
3434
representative allow and deny paths.
@@ -154,8 +154,6 @@ single flag-day cutover.
154154

155155
## Phase 7 - Existing Local Services And Cleanup
156156

157-
- Keep `inference.local` as a local adapter with its existing TLS, route,
158-
provider-auth, streaming/buffered limit, and OCSF behavior.
159157
- Keep `policy.local` as a local adapter for current policy, bounded denial
160158
summaries, proposals, and proposal wait.
161159
- Decide whether metadata loopback remains orchestrated by `openshell-sandbox`
@@ -249,8 +247,8 @@ series.
249247
then reuse the same suite for transparent TCP when Phase 8 lands.
250248
- Integration-test HTTP keep-alive/pipelining, REST, GraphQL, JSON-RPC, MCP,
251249
WebSocket, credentials, token grants, middleware, and TLS/raw-TCP selection.
252-
- Integration-test `inference.local`, `policy.local`, and metadata loopback body
253-
limits, timeouts, redaction, and local denial responses.
250+
- Integration-test `policy.local` and metadata loopback body limits, timeouts,
251+
redaction, and local denial responses.
254252
- Compare OCSF fixtures before and after each migration subphase.
255253
- Exercise policy reload between L4 decision, endpoint materialization, relay
256254
startup, and long-lived per-request evaluation.

0 commit comments

Comments
 (0)