Skip to content

refactor(inference): remove managed inference routes - #3195

Open
johntmyers wants to merge 2 commits into
mainfrom
refactor/3172-remove-managed-inference/johntmyers
Open

refactor(inference): remove managed inference routes#3195
johntmyers wants to merge 2 commits into
mainfrom
refactor/3172-remove-managed-inference/johntmyers

Conversation

@johntmyers

Copy link
Copy Markdown
Collaborator

🏗️ build-from-issue-agent

Summary

Remove OpenShell's managed inference routing control plane and inference.local data path. Inference workloads now use explicitly imported, use-case-specific provider profiles attached to sandboxes and call provider-native endpoints directly; inference_capable remains informational for future observability hooks.

Related Issue

Closes #3172

Changes

  • proto/, crates/openshell-core/, crates/openshell-server/, and SDKs: remove inference-route APIs, commands, generated clients, auth scopes, and persisted route behavior.
  • crates/openshell-supervisor-network/ and crates/openshell-sandbox/: remove inference.local, request-shape matching, route refresh/caching, and inference-route supervisor configuration.
  • crates/openshell-router/: remove the built-in privacy router crate and its packaging/dependency surface.
  • crates/openshell-server/migrations/: delete legacy inference_route objects during SQLite and PostgreSQL upgrades.
  • crates/openshell-providers/: retain provider aliases and Vertex constants, keep inference_capable informational, and preserve endpoint credential-binding guards.
  • e2e/: replace managed-route tests with explicitly imported OpenAI-style and Anthropic-style profile fixtures against native endpoints, including a negative inference.local assertion.
  • docs/, architecture/, examples/local-inference/, and agent skills: document the breaking migration and provide human-readable Now/After workflows.

Deviations from Plan

None — implemented as planned in the approved issue comment and follow-up decisions.

Testing

  • mise run pre-commit passes
  • mise run test passes
  • mise run ci passes
  • mise run e2e:docker passes
  • mise run e2e:python passes (86 passed, 81 OIDC-only skipped)
  • Unit tests added/updated
  • E2E tests added/updated

Tests added:

  • Unit: SQLite migration behavior, embedded SQLite/PostgreSQL migration coverage, and provider endpoint activation guard coverage.
  • Integration: regenerated SDK/API coverage and Rust host-gateway provider credential binding.
  • E2E: explicit imported OpenAI-style bearer and Anthropic x-api-key profiles calling native endpoints, secret substitution/model body assertions, and negative inference.local behavior.

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)

Documentation updated:

  • docs/sandboxes/inference-routing.mdx: provider-backed inference workflow, breaking migration, and Now/After UX.
  • docs/get-started/tutorials/ and examples/local-inference/: native endpoint examples using explicitly imported profiles.
  • architecture/, provider/security/observability/reference docs, and agent skills: remove managed-route assumptions and align troubleshooting/workflows.

@copy-pr-bot

copy-pr-bot Bot commented Sep 4, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

@johntmyers

johntmyers commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator Author

🏗️ build-from-issue-agent

Docker E2E Test Attestation

Local Docker E2E tests passed. CI does not currently run this lane, so this comment serves as the verification record.

Field Value
Commit 36b3abdf4b313699c01f226b46836bfe2f6ec449
Command mise run e2e:docker
Gateway mode Docker
Result ✅ All passed

Test Summary

CLI conformance smoke: passed
Rust E2E: all executed tests passed

The ws_tunnel_status_through_edge_proxy test passed after its environment-dependent inner tunnel check reported that no edge endpoint was configured.

Tests Executed

  • cli-conformance/smoke — PASSED
  • harness::binary::tests::workspace_root_resolves — PASSED
  • harness::container::tests::defaults_to_auto_detected_podman_first — PASSED
  • harness::container::tests::defaults_to_docker_when_podman_is_unavailable — PASSED
  • harness::container::tests::defaults_to_logical_podman_when_docker_is_a_podman_shim — PASSED
  • harness::container::tests::driver_selects_container_engine_without_explicit_engine — PASSED
  • harness::container::tests::explicit_container_engine_wins_over_auto_detection — PASSED
  • harness::container::tests::explicit_docker_rejects_podman_compatibility_shim — PASSED
  • harness::container::tests::explicit_podman_can_use_docker_compatibility_shim — PASSED
  • harness::container::tests::fails_when_no_container_engine_is_available — PASSED
  • harness::container::tests::ignores_non_container_drivers_and_auto_detects — PASSED
  • harness::container::tests::rejects_explicit_driver_conflict — PASSED
  • harness::container::tests::rejects_invalid_explicit_engine — PASSED
  • harness::container::tests::rejects_removed_selector — PASSED
  • harness::output::tests::extract_field_finds_value — PASSED
  • harness::output::tests::extract_field_missing_returns_none — PASSED
  • harness::output::tests::extract_field_with_ansi — PASSED
  • harness::output::tests::strip_ansi_passthrough_plain_text — PASSED
  • harness::output::tests::strip_ansi_removes_color_codes — PASSED
  • harness::port::tests::find_free_port_returns_nonzero — PASSED
  • harness::port::tests::wait_for_port_succeeds_when_listening — PASSED
  • harness::port::tests::wait_for_port_times_out_when_nothing_listens — PASSED
  • gateway_add_creates_cf_metadata — PASSED
  • gateway_add_derives_name_from_hostname — PASSED
  • gateway_add_help_shows_flags — PASSED
  • gateway_add_rejects_duplicate_name — PASSED
  • gateway_add_rejects_removed_ssh_key_flag — PASSED
  • gateway_add_remote_and_local_conflict — PASSED
  • gateway_add_ssh_url_conflicts_with_local — PASSED
  • gateway_add_ssh_url_conflicts_with_remote — PASSED
  • gateway_add_ssh_url_requires_port — PASSED
  • gateway_help_omits_lifecycle_commands — PASSED
  • gateway_help_shows_add_and_login — PASSED
  • gateway_login_help_is_recognized — PASSED
  • gateway_add_can_shadow_system_gateway_with_user_registration — PASSED
  • gateway_help_shows_subcommands — PASSED
  • gateway_lifecycle_subcommands_are_removed — PASSED
  • gateway_list_json_includes_user_and_system_sources — PASSED
  • gateway_list_table_shows_user_and_system_sources — PASSED
  • gateway_remove_rejects_system_only_registration_and_preserves_entry — PASSED
  • help_shows_restructured_commands — PASSED
  • sandbox_connect_help_shows_editor_flag — PASSED
  • sandbox_create_help_shows_new_flags — PASSED
  • sandbox_help_shows_upload_download — PASSED
  • status_without_gateway_prints_friendly_message — PASSED
  • sandbox_labels_are_stored_and_filterable — PASSED

@johntmyers

johntmyers commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator Author

🏗️ build-from-issue-agent

Python E2E Test Attestation

Local Python E2E tests passed against a Docker-backed gateway. CI does not currently run this lane, so this comment serves as the verification record.

Field Value
Commit 36b3abdf4b313699c01f226b46836bfe2f6ec449
Command mise run e2e:python
Gateway mode Docker
Result ✅ 86 passed, 81 skipped

Test Summary

86 passed, 81 skipped in 55.97s

The 81 tests under e2e/python/oidc/ were skipped because this non-OIDC lane does not launch Keycloak. They remain covered by the dedicated OIDC E2E tasks.

Tests Executed

Closes #3172

Remove the inference route control plane, inference.local data path, built-in router crate, and SDK surface. Move inference workloads to explicitly imported provider profiles and native endpoints, with migration cleanup and updated tests and documentation.

Signed-off-by: John Myers <9696606+johntmyers@users.noreply.github.com>
@johntmyers
johntmyers force-pushed the refactor/3172-remove-managed-inference/johntmyers branch from 6599bfe to 36b3abd Compare September 4, 2026 21:12
pimlock
pimlock previously approved these changes Sep 4, 2026

@pimlock pimlock 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.

💥

@johntmyers johntmyers left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

gator-agent

PR Review Status

The accepted issue and migration plan make this project-valid, and the broad removal is accompanied by updated SDKs, Fern docs, migrations, and replacement provider E2E coverage. One policy regression must be fixed before test dispatch: alternate-upstream legacy providers now grant access to the built-in public vendor endpoint even though their credential binding is withheld.

Action required: restore the endpoint-activation guard in provider policy composition and its OpenAI/Anthropic regression test.

Blocking findings:

  • GATOR-36b3abdf-01: alternate-upstream providers widen sandbox egress to the built-in public vendor endpoint

Carried findings:

  • None

Non-blocking suggestions:

  • None
Gator metadata
  • Validation: linked accepted issue #3172 explicitly authorizes this cross-cutting managed-inference removal
  • Docs: Fern docs and migration guidance updated
  • Checks: current branch and Helm gates are green; required E2E has not yet been dispatched
  • E2E: test:e2e required after review feedback is resolved
  • Head SHA: 36b3abdf4b313699c01f226b46836bfe2f6ec449
  • Base SHA: c96b9bff47f719e6f6bec21edd9ed1c33e3ba3ca
  • Merge base SHA: 8605943a2d5fec5707251fc67bba718cb9dcacb2
  • Patch ID: c581a82c7882eb073fa155abb32823afbce1deea
  • Gator payload: 8
  • Review mode: initial
  • Previous reviewed SHA: none
  • Review budget exhausted: no
  • Maintainer decision required: no
  • Next state: gator:in-review

Comment thread crates/openshell-server/src/grpc/policy.rs
@johntmyers johntmyers added the gator:in-review Gator is reviewing or awaiting PR review feedback label Sep 5, 2026
Restore the provider policy activation guard so legacy OpenAI and Anthropic providers configured for alternate base URLs do not grant egress to the built-in public vendor endpoints.

Signed-off-by: John Myers <9696606+johntmyers@users.noreply.github.com>
@johntmyers johntmyers added the test:e2e Requires end-to-end coverage label Sep 5, 2026
@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown

Label test:e2e applied for 3045866. Open the existing run and click Re-run all jobs to execute with the label set. The run will execute the standard E2E suite after building the required gateway and supervisor images once. The matching required CI gate status on this PR will flip green automatically once the run finishes.

@johntmyers johntmyers left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

gator-agent

PR Review Status

Thanks @johntmyers. I checked your update restoring provider_profile_endpoints_are_active at the shared provider-policy composition point and the OpenAI/Anthropic alternate-upstream regression coverage. The prior vendor-egress finding is resolved, its review thread is closed, and the bounded follow-up review found no new blockers. Required E2E has been dispatched for this head.

Blocking findings:

  • No blocking findings remain

Carried findings:

  • None; GATOR-36b3abdf-01 is resolved by this head
Gator metadata
  • Validation: linked accepted issue #3172 explicitly authorizes this cross-cutting managed-inference removal
  • Docs: Fern docs and migration guidance updated in the reviewed PR
  • Checks: branch and Helm gates are green; required current-head E2E attempt is queued
  • E2E: test:e2e applied; E2E Label Help requested re-run all jobs; run 33984167072 was rerun and is queued
  • Head SHA: 3045866bde58a3402792ba3762ff5d4cd1dbe183
  • Base SHA: c96b9bff47f719e6f6bec21edd9ed1c33e3ba3ca
  • Merge base SHA: 8605943a2d5fec5707251fc67bba718cb9dcacb2
  • Patch ID: c139a1f471d12a710f86968cf8a5b05b9eb92ebb
  • Gator payload: 8
  • Review mode: follow_up
  • Previous reviewed SHA: 36b3abdf4b313699c01f226b46836bfe2f6ec449
  • Review budget exhausted: no
  • Maintainer decision required: no
  • Next state: gator:watch-pipeline

@johntmyers johntmyers added gator:watch-pipeline Gator is monitoring PR CI/CD status gator:approval-needed Gator completed review; maintainer approval needed and removed gator:in-review Gator is reviewing or awaiting PR review feedback gator:watch-pipeline Gator is monitoring PR CI/CD status labels Sep 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gator:approval-needed Gator completed review; maintainer approval needed test:e2e Requires end-to-end coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: remove managed inference routes in favor of providers v2

2 participants