Routing Modes and URLs | Kamiwaza Docs

Documentation for Kamiwaza 0.11.0

This is documentation for Kamiwaza 0.11.0, which is no longer actively maintained. For the current GA release, see 1.0.1.

Version: 0.11.0

Routing Modes

Kamiwaza supports three routing modes for models, apps, and tools:

This affects how OpenAI-compatible base URLs and app/tool URLs are constructed.

Port-based routing

Port-based routing exposes each deployment on its own port.

Example OpenAI-compatible base URL:

https://<host>:<lb_port>/v1

Path-based routing

Path-based routing uses a single host and path prefixes:

Example OpenAI-compatible base URL:

https://<host>/runtime/models/<deployment_id>/v1

App and tool URLs follow the same pattern with their respective prefixes.

Dual routing

In dual mode, both port and path routes are generated. This is useful when migrating existing integrations while standardizing on path-based URLs.

Configuring routing

Routing config can be read or updated via the API:

Or by editing the runtime config file:

$KAMIWAZA_ROOT/runtime/runtime_config.json

Key fields under routing:

{
  "routing": {
    "model_routing_method": "dual",
    "base_host": "https://your-host",
    "service_prefixes": {
      "models": "/runtime/models",
      "apps": "/runtime/apps",
      "tools": "/runtime/tools"
    }
  }
}

Impact on App Garden templates

App Garden templates can reference routing-aware variables such as:

These variables resolve based on the active routing mode so templates remain portable across deployments.