Make an inference call using system routes (supervisor-only). This is the in-process API for platform functions. It bypasses the CONNECT proxy entirely — the supervisor calls the router directly from the host network namespace.
(
&self,
protocol: &str,
method: &str,
path: &str,
headers: Vec<(String, String)>,
body: bytes::Bytes,
)
| 158 | /// CONNECT proxy entirely — the supervisor calls the router directly |
| 159 | /// from the host network namespace. |
| 160 | pub async fn system_inference( |
| 161 | &self, |
| 162 | protocol: &str, |
| 163 | method: &str, |
| 164 | path: &str, |
| 165 | headers: Vec<(String, String)>, |
| 166 | body: bytes::Bytes, |
| 167 | ) -> Result<openshell_router::ProxyResponse, openshell_router::RouterError> { |
| 168 | let routes = self.system_routes.read().await; |
| 169 | self.router |
| 170 | .proxy_with_candidates(protocol, method, path, headers, body, &routes) |
| 171 | .await |
| 172 | } |
| 173 | } |
| 174 | |
| 175 | #[derive(Debug)] |