"""Auto-generated stub for module: framework_router."""
from typing import Any, Callable

from .contracts import ModelBundle, RouteRegistry, RuntimeRoute
from .runtime_resolver import normalize_runtime, resolve_runtime_framework

# Functions
def build_router_functions(router: Any) -> tuple[Callable[[Any], Any], Callable[[Any, Any], Any]]:
    """
    Build `(load_model, predict)` callables compatible with deploy servers.
    
        The returned callables can be passed directly to `MatriceDeploy`.
    """
    ...
def make_routes(route_map: Any[str, tuple[Callable[[Any], Any], Callable[[Any, Any], Any]]]) -> dict[str, Any]:
    """
    Convenience helper to build `RuntimeRoute` objects from tuple map.
    """
    ...

# Classes
class FrameworkRouter:
    # Router that dispatches load/predict handlers by runtime key.

    def __init__(self: Any, routes: Any) -> None:
        """
        Initialize the router with runtime handlers and fallback behavior.
        """
        ...

    def load_model(self: Any, action_tracker: Any, runtime_framework: str | None = None) -> Any:
        """
        Load model using runtime route with optional fallback on load failure.
        """
        ...

    def predict(self: Any, bundle: Any, input_bytes: Any) -> Any:
        """
        Run runtime-specific predict handler for a loaded bundle.
        """
        ...

    def supported_runtimes(self: Any) -> tuple[str, ...]:
        """
        Return registered runtime keys.
        """
        ...

