MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / effective_route_name

Function effective_route_name

crates/openshell-server/src/inference.rs:47–55  ·  view source on GitHub ↗

Map a request `route_name` to the canonical store key. Empty string defaults to `CLUSTER_INFERENCE_ROUTE_NAME` for backward compat.

(name: &str)

Source from the content-addressed store, hash-verified

45///
46/// Empty string defaults to `CLUSTER_INFERENCE_ROUTE_NAME` for backward compat.
47fn effective_route_name(name: &str) -> Result<&str, Status> {
48 match name.trim() {
49 "" | "inference.local" => Ok(CLUSTER_INFERENCE_ROUTE_NAME),
50 "sandbox-system" => Ok(SANDBOX_SYSTEM_ROUTE_NAME),
51 other => Err(Status::invalid_argument(format!(
52 "unknown route_name '{other}'; expected 'inference.local' or 'sandbox-system'"
53 ))),
54 }
55}
56
57impl ObjectType for InferenceRoute {
58 fn object_type() -> &'static str {

Calls

no outgoing calls