diff --git a/README.md b/README.md index 94ce91b2..56eb8674 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,7 @@ kubectl -n keycloak get secret platform-bootstrap-admin -o jsonpath='{.data.valu export KUBECONFIG=$(pwd)/env/local/kubeconfig.yaml ./model-manager deploy qwen3-0-6b --wait # ◀── first start downloads the weights, a few minutes -source ./ext/enterprise.ai-inference/model_manager/scripts/get-keycloak-token.sh # sets TOKEN, GATEWAY_IP, GATEWAY_DOMAIN, GATEWAY_URL +source ./ext/inference-toolkit/model_manager/scripts/get-keycloak-token.sh # sets TOKEN, GATEWAY_IP, GATEWAY_DOMAIN, GATEWAY_URL curl -s --noproxy '*' --cacert env/local/logs/toolkit-manager-ca.crt \ --resolve "${GATEWAY_DOMAIN}:443:${GATEWAY_IP}" \ -H "Authorization: Bearer ${TOKEN}" -H "Content-Type: application/json" \ diff --git a/configs/repos/repos.agent-toolkit.yaml b/configs/repos/repos.agent-toolkit.yaml index 763b3502..4d1096f9 100644 --- a/configs/repos/repos.agent-toolkit.yaml +++ b/configs/repos/repos.agent-toolkit.yaml @@ -8,7 +8,7 @@ repos: - layer: "inference" url: "https://github.com/intel/inference-toolkit" - dest: "enterprise.ai-inference" + dest: "inference-toolkit" rev: "8389f47f94403fd682dcd90e02ed5cc25e6eef18" # v1.2.0-rc.1 deployment_subdir: "" config_dir: "" @@ -16,8 +16,8 @@ repos: model_catalog: "model_manager/models.yaml" - layer: "agent-toolkit" - url: "https://github.com/intel/enterprise-agent-toolkit" - dest: "enterprise.agent-toolkit" + url: "https://github.com/intel/agent-toolkit" + dest: "agent-toolkit" rev: "b3a29592ff6cb0dbc3adce0de8b334964db38e27" deployment_subdir: "" config_dir: "" diff --git a/configs/repos/repos.erag.yaml b/configs/repos/repos.erag.yaml index 29142060..322e0ed9 100644 --- a/configs/repos/repos.erag.yaml +++ b/configs/repos/repos.erag.yaml @@ -12,7 +12,7 @@ repos: - layer: "inference" url: "https://github.com/intel/inference-toolkit" - dest: "enterprise.ai-inference" + dest: "inference-toolkit" rev: "8389f47f94403fd682dcd90e02ed5cc25e6eef18" # v1.2.0-rc.1 deployment_subdir: "" config_dir: "" @@ -21,7 +21,7 @@ repos: - layer: "erag" url: "https://github.com/intel/chatbot-toolkit" - dest: "enterprise.ai-erag" + dest: "chatbot-toolkit" rev: "6fa81aa0a9852cbf195317d45bfe8648ebc7a955" # v3.1.0-rc.1 deployment_subdir: "deployment" config_dir: "pipelines" diff --git a/configs/repos/repos.inference.yaml b/configs/repos/repos.inference.yaml index 8eea0274..18cfdd05 100644 --- a/configs/repos/repos.inference.yaml +++ b/configs/repos/repos.inference.yaml @@ -13,7 +13,7 @@ repos: - layer: "inference" url: "https://github.com/intel/inference-toolkit" - dest: "enterprise.ai-inference" + dest: "inference-toolkit" rev: "8389f47f94403fd682dcd90e02ed5cc25e6eef18" # v1.2.0-rc.1 deployment_subdir: "" config_dir: "" diff --git a/docs/deployment/install-platform.md b/docs/deployment/install-platform.md index 226548be..5207285c 100644 --- a/docs/deployment/install-platform.md +++ b/docs/deployment/install-platform.md @@ -660,7 +660,7 @@ When `auth_type=jwt` (the default), API clients authenticate with Keycloak token **Quick method — use the helper script:** ```bash -source ./ext/enterprise.ai-inference/model_manager/scripts/get-keycloak-token.sh +source ./ext/inference-toolkit/model_manager/scripts/get-keycloak-token.sh # Exports: TOKEN, GATEWAY_IP, GATEWAY_DOMAIN, GATEWAY_URL # Finds the gateway IP, Keycloak domain, and client credentials in the cluster ``` @@ -826,7 +826,7 @@ curl -s --cacert "$CA" --noproxy '*' \ **Or use the built-in helper to get token + gateway details in one step:** ```bash -source ./ext/enterprise.ai-inference/model_manager/scripts/get-keycloak-token.sh +source ./ext/inference-toolkit/model_manager/scripts/get-keycloak-token.sh # Exports: TOKEN, GATEWAY_IP, GATEWAY_DOMAIN, GATEWAY_URL ``` @@ -877,7 +877,7 @@ import os from openai import OpenAI # GATEWAY_URL and TOKEN are set by the helper script -# source ./ext/enterprise.ai-inference/model_manager/scripts/get-keycloak-token.sh +# source ./ext/inference-toolkit/model_manager/scripts/get-keycloak-token.sh client = OpenAI( base_url=os.environ["GATEWAY_URL"] + "/v1", # https://inference./v1 api_key=os.environ["TOKEN"], @@ -925,13 +925,13 @@ print(response.choices[0].message.content) **Keycloak — re-source the helper to get a fresh token:** ```bash -source ./ext/enterprise.ai-inference/model_manager/scripts/get-keycloak-token.sh +source ./ext/inference-toolkit/model_manager/scripts/get-keycloak-token.sh ``` **For longer sessions** (e.g. 1 hour): ```bash -source ./ext/enterprise.ai-inference/model_manager/scripts/get-keycloak-token.sh --lifespan 3600 +source ./ext/inference-toolkit/model_manager/scripts/get-keycloak-token.sh --lifespan 3600 ``` --- diff --git a/docs/deployment/netapp-ontap.md b/docs/deployment/netapp-ontap.md index 41f720d7..0efb23b9 100644 --- a/docs/deployment/netapp-ontap.md +++ b/docs/deployment/netapp-ontap.md @@ -151,7 +151,7 @@ either can be used without the other: the in-cluster SeaweedFS. Because the object-store data LIF sits on the storage network and browsers upload straight to the presigned URL they are handed, the endpoint is published through the platform Envoy Gateway as a reverse proxy. The - proxy objects are owned by Intel® Chatbot Toolkit (`ext/enterprise.ai-erag`, role `app_edp`); + proxy objects are owned by Intel® Chatbot Toolkit (`ext/chatbot-toolkit`, role `app_edp`); the dedicated gateway listener (`https-s3`, host `s3.`) that makes SigV4 signatures survive the hop is owned by `roles/gateway`. @@ -226,7 +226,7 @@ preflight runs `getent hosts` from each node and reports every unresolvable pair The array topology is the installer's concern; the credentials belong to the layer that consumes them. For the RAG side, see `docs/customize/object_store.md` in the Intel® Chatbot -Toolkit repository (cloned to `ext/enterprise.ai-erag/` by `init erag`). +Toolkit repository (cloned to `ext/chatbot-toolkit/` by `init erag`). `ontap_s3_data_lif` is what activates the gateway's dedicated S3 listener and, together with the credentials, the reverse proxy in Intel® Chatbot Toolkit. `edp_rbac_enabled` must stay diff --git a/docs/deployment/upgrade.md b/docs/deployment/upgrade.md index dc74bf7f..8621aeae 100644 --- a/docs/deployment/upgrade.md +++ b/docs/deployment/upgrade.md @@ -7,6 +7,12 @@ already deployed **is** the upgrade. Before anything changes, the installer read records about each layer, compares it with the release you are installing, runs the upgrade checks, and either goes ahead or refuses with the command that fixes the problem. +> [!NOTE] +> From Toolkit Manager 2.0 the `ext/` folders carry the repository names: `ext/inference-toolkit`, +> `ext/chatbot-toolkit`, `ext/agent-toolkit`. Clones under the old names (`ext/enterprise.ai-inference`, +> `ext/enterprise.ai-erag`, `ext/enterprise.agent-toolkit`) are not moved, and the installer refuses to +> run while one exists. Delete them (keep anything unpushed first) before `init --upgrade`. + In short, to upgrade a solution layer such as the Intel® Chatbot Toolkit (`erag`): 1. **Back up** the layer with the release that is installed now: `./run_backup.sh backup erag --env prod` diff --git a/docs/faq-and-troubleshooting/troubleshooting.md b/docs/faq-and-troubleshooting/troubleshooting.md index b3f11d62..473cb444 100644 --- a/docs/faq-and-troubleshooting/troubleshooting.md +++ b/docs/faq-and-troubleshooting/troubleshooting.md @@ -80,7 +80,7 @@ Cluster-side logs are in Loki, browsable from Grafana. |---------|--------------------| | No models after `install inference` | Expected unless you asked for them: set `llm_services_deploy_models: true` in `env//config.inference.yaml` **and** `autodeploy: true` on the model in `env//models.yaml`. Or run `./model-manager deploy --wait`. | | `404` "No matching route found" | The `model` field is not a deployed model's name. `./model-manager list --deployed` shows them. | -| `401` "Jwt is expired" or "Jwt is missing" (`auth_type: jwt`) | Keycloak tokens last 15 minutes. Get a new one: `source ./ext/enterprise.ai-inference/model_manager/scripts/get-keycloak-token.sh`. | +| `401` "Jwt is expired" or "Jwt is missing" (`auth_type: jwt`) | Keycloak tokens last 15 minutes. Get a new one: `source ./ext/inference-toolkit/model_manager/scripts/get-keycloak-token.sh`. | | `401` "Authentication Error" (`auth_type: litellm_vkey`) | Wrong, expired or revoked virtual key. | | Model pod stays `Pending` | Not enough free CPU or memory on any node: `kubectl describe pod -n llm-inference -l app.kubernetes.io/name=`. | diff --git a/docs/getting-started/chatbot-toolkit.md b/docs/getting-started/chatbot-toolkit.md index ba3f9161..3071bf9e 100644 --- a/docs/getting-started/chatbot-toolkit.md +++ b/docs/getting-started/chatbot-toolkit.md @@ -85,7 +85,7 @@ The installer deploys in layers, each building on the previous: | **inference** | KServe, Envoy AI Gateway, LLM services (model serving) | Model serving | | **erag** | models, APISIX, vector DBs, NATS, fingerprint, HPA, pipelines, EDP (document ingestion), MCP gateway, chat history, UI | RAG application | -The **erag** layer is opt-in — it lives in `ext/enterprise.ai-erag/deployment/components.yaml` and only appears in the +The **erag** layer is opt-in — it lives in `ext/chatbot-toolkit/deployment/components.yaml` and only appears in the registry once the env was initialized with `init erag`. ### Layer-Level Install and Teardown @@ -127,7 +127,7 @@ You can also target individual components directly — component resolving trave ### Pipeline Flavours (`init --flavour`) A flavour is the preset `init` seeds `config..yaml` from. For `erag` they are the -directories under `ext/enterprise.ai-erag/deployment/pipelines/` — `chatqna` (the default), +directories under `ext/chatbot-toolkit/deployment/pipelines/` — `chatqna` (the default), `chatqna_intel_gpu`, `docsum`, `translation`, `audioqna`, `pl_chatqna`: ```bash @@ -214,7 +214,7 @@ The `env//` directory is the single source of truth for an environment. Ev | `global_config.yaml` | Domain, TLS, proxy, component toggles | | `config.erag.yaml` | RAG-specific: registry, models, feature flags, pipeline config (seeded from a flavour) | | `config.inference.yaml` | Inference: KServe, CPU policy, model serving, API auth (`auth_type`), LiteLLM/Langfuse | -| `models.yaml` | Model catalog, seeded from `ext/enterprise.ai-inference/model_manager/models.yaml` | +| `models.yaml` | Model catalog, seeded from `ext/inference-toolkit/model_manager/models.yaml` | | `nodes.yaml` | Node definitions for remote deployments | | `inventory/hosts.yaml` | Kubespray-compatible inventory (auto-generated or manual) | | `kubeconfig.yaml` | Cluster kubeconfig written after k8s install — point `KUBECONFIG` here | diff --git a/docs/getting-started/deploy-models.md b/docs/getting-started/deploy-models.md index 6feaad26..54960ab1 100644 --- a/docs/getting-started/deploy-models.md +++ b/docs/getting-started/deploy-models.md @@ -176,7 +176,7 @@ for minting, listing, and revoking keys. Uses the inference gateway: one host, `inference.`, for every model. The helper script gets a token (client credentials flow) and finds the gateway for you: ```bash -source ./ext/enterprise.ai-inference/model_manager/scripts/get-keycloak-token.sh +source ./ext/inference-toolkit/model_manager/scripts/get-keycloak-token.sh # Exports: TOKEN, GATEWAY_IP, GATEWAY_DOMAIN, GATEWAY_URL # Call the model (the "model" field picks the model) diff --git a/docs/getting-started/quickstart.md b/docs/getting-started/quickstart.md index 235de65b..1abbb849 100644 --- a/docs/getting-started/quickstart.md +++ b/docs/getting-started/quickstart.md @@ -36,7 +36,7 @@ Every deployment lives in a named environment under `env//`. The name is a ./toolkit_manager.sh init inference ``` -It clones the Intel® Inference Toolkit into `ext/enterprise.ai-inference/` and creates `env/local/` with: +It clones the Intel® Inference Toolkit into `ext/inference-toolkit/` and creates `env/local/` with: - `global_config.yaml` — platform-wide settings - `config.inference.yaml` — the inference layer's settings, including the API auth type (`auth_type`) - `nodes.yaml` — the machines to install on (leave it as it is for a single node) diff --git a/docs/overview/meet.md b/docs/overview/meet.md index 6fb23385..ee0c2419 100644 --- a/docs/overview/meet.md +++ b/docs/overview/meet.md @@ -99,9 +99,9 @@ github.com/intel/toolkit-manager <- start here; run all commands from |-- model-manager deploy and manage models |-- env// your configuration, inventory, kubeconfig, and logs `-- ext/ cloned automatically by `init` - |-- enterprise.ai-inference Intel® Inference Toolkit: KServe, vLLM, OpenVINO Model Server - |-- enterprise.ai-erag Intel® Chatbot Toolkit: pipelines, ingestion, UI - `-- enterprise.agent-toolkit Intel® Agent Toolkit: agent memory, sandboxes + |-- inference-toolkit Intel® Inference Toolkit: KServe, vLLM, OpenVINO Model Server + |-- chatbot-toolkit Intel® Chatbot Toolkit: pipelines, ingestion, UI + `-- agent-toolkit Intel® Agent Toolkit: agent memory, sandboxes ``` > [!IMPORTANT] diff --git a/docs/reference/adding-solutions.md b/docs/reference/adding-solutions.md index 8c58c50e..8d6d030e 100644 --- a/docs/reference/adding-solutions.md +++ b/docs/reference/adding-solutions.md @@ -57,7 +57,7 @@ repos: # Dependencies first: repos are cloned and configs seeded in file order. - layer: "inference" url: "https://github.com//" - dest: "enterprise.ai-inference" + dest: "inference-toolkit" rev: "main" deployment_subdir: "" config_dir: "" @@ -518,7 +518,7 @@ Reuse what the platform runs instead of rebuilding it. The points that bite: - **Deploy a model you need** with `{{ playbook_dir }}/../model-manager deploy --label `, setting `TKM_ENV: "{{ env_dir | basename }}"` (the wrapper otherwise prompts, and there is no tty). Skip it when the model is already served, and in teardown undeploy only what - carries your label. Example: `deployment/roles/app_inference_models` in enterprise-rag. + carries your label. Example: `deployment/roles/app_inference_models` in chatbot-toolkit. --- diff --git a/docs/reference/architecture.md b/docs/reference/architecture.md index 8ec05d21..9295637a 100644 --- a/docs/reference/architecture.md +++ b/docs/reference/architecture.md @@ -37,8 +37,8 @@ infrastructure → platform → inference → erag / agent-toolkit (opt-in | `infrastructure` | `kubernetes`, `storage`; `kata_containers` (`kata_containers_enabled`); rack-scale only (`rack_scale_enabled`): `fabric_inventory`, `fabric_netplan`, `fabric_sysctl`, `fabric_bgp`, `fabric_validate` | `install` of any layer | | `platform` | `node_feature_discovery`, `nri_cpu_balloons`, `intel_gpu_plugin`, `cert_manager`, `istio`, `metallb`, `metrics_server`, `gateway` (alias `envoy_gateway`), `postgresql`, `keycloak`, `object_store`, `seaweedfs`, `observability`, `headlamp`; opt-in: `keda`, `velero`; rack-scale: `nvidia_gpu_operator`, `gpu_observability` | `install` of `platform` or any layer above | | `inference` | from inference-toolkit's `components.yaml`: `keycloak_config`, `envoy_ai_gateway`, `kserve`, `litellm`, `langfuse`, `llm_services`, `vllm_sr` (opt-in) | `install inference`, or a layer above it | -| `erag` | from enterprise-rag's `components.yaml` (the `app_*` roles) | `install erag`, after `init erag` | -| `agent-toolkit` | from enterprise-agent-toolkit's `components.yaml` | `install agent-toolkit`, after `init agent-toolkit` | +| `erag` | from chatbot-toolkit's `components.yaml` (the `app_*` roles) | `install erag`, after `init erag` | +| `agent-toolkit` | from agent-toolkit's `components.yaml` | `install agent-toolkit`, after `init agent-toolkit` | - **`install inference`** installs infrastructure + platform + inference (dependencies auto-pull) - **`install erag`** and **`install agent-toolkit`** must be explicitly targeted, after `init` of that layer @@ -187,7 +187,7 @@ toolkit-manager/ ### inference-toolkit (external repo) -Cloned to `ext/enterprise.ai-inference/` by `init inference`. +Cloned to `ext/inference-toolkit/` by `init inference`. ``` inference-toolkit/ @@ -230,12 +230,12 @@ External repos are declared in per-layer manifests at `configs/repos/repos.`, `show`, `install`, `teardown`, `validate`, `status`, `add-node`, `remove-node`. Flags: `--env `, `--flavour ` and `--upgrade` (init only), `--only` (skip dep auto-inclusion), `--skip ` (comma-separated layers/components to exclude), `--force` (skip confirmation; on `install`, run past a refusing upgrade check), `--dry-run` (add-node, remove-node), `--health` (status), `--node-lost` (remove-node), `--` (pass remaining args to ansible-playbook). See the [CLI Reference](cli.md). | | `es_auto_installer.sh` | The CLI's former name. Runs `toolkit_manager.sh` with the same arguments and prints a notice. | | `run_backup.sh` | Back up, restore or list one layer's backups with Velero: actions `backup`, `restore`, `list`, each with a ``; flags `--env `, `--from ` (restore), `--force`, `--`. Sources `toolkit_manager.sh` for its playbook arguments and runs `playbooks/backup.yaml`. See [Upgrade a Layer](../deployment/upgrade.md). | -| `model-manager` | Runs `ext/enterprise.ai-inference/model_manager/model-manager` against `env//` (`TKM_ENV` picks the env). | +| `model-manager` | Runs `ext/inference-toolkit/model_manager/model-manager` against `env//` (`TKM_ENV` picks the env). | | `ansible.cfg` | Ansible configuration: `any_errors_fatal`, default stdout callback with yaml result format, `timer` + `profile_tasks` callbacks. `roles_path` is overridden at runtime by the composed `ANSIBLE_ROLES_PATH`. | | `configs/components.yaml` | This repo's layers and components. | | `configs/defaults/*.yaml` | Seeds `init` copies into a new env: `global_config.yaml`, `nodes.yaml`. | diff --git a/docs/reference/integration.md b/docs/reference/integration.md index 43b08c03..6b3cfc3c 100644 --- a/docs/reference/integration.md +++ b/docs/reference/integration.md @@ -65,7 +65,7 @@ To create a scoped virtual key (its own models, budget and expiry), see [Virtual The inference repo ships a helper that finds the gateway, reads the Keycloak client credentials from the cluster, and fetches a token: ```bash -source ./ext/enterprise.ai-inference/model_manager/scripts/get-keycloak-token.sh +source ./ext/inference-toolkit/model_manager/scripts/get-keycloak-token.sh # Sets: TOKEN, GATEWAY_IP, GATEWAY_DOMAIN, GATEWAY_URL (already right for subdomain or path mode) ``` @@ -721,4 +721,4 @@ The rare cases: Files behind the auth flow above: - Envoy Gateway `SecurityPolicy`: `roles/envoy_gateway/templates/security-policy.yaml.j2` -- Keycloak realm and client: `ext/enterprise.ai-inference/roles/keycloak_config/` +- Keycloak realm and client: `ext/inference-toolkit/roles/keycloak_config/` diff --git a/docs/reference/labels.md b/docs/reference/labels.md index a75890e0..80b50df8 100644 --- a/docs/reference/labels.md +++ b/docs/reference/labels.md @@ -80,7 +80,7 @@ The NRI CPU balloons and Kata Containers components install into `kube-system`, --- -## Intel® Chatbot Toolkit (`enterprise-rag`) +## Intel® Chatbot Toolkit (`chatbot-toolkit`) These namespaces only exist once `install erag` has run; `install inference` does not create them. The eRAG repo sets their labels, so check that repo for the current values. diff --git a/model-manager b/model-manager index 156dd1aa..5cc43e59 100755 --- a/model-manager +++ b/model-manager @@ -2,7 +2,7 @@ set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" && pwd)" -MM_REAL="${SCRIPT_DIR}/ext/enterprise.ai-inference/model_manager/model-manager" +MM_REAL="${SCRIPT_DIR}/ext/inference-toolkit/model_manager/model-manager" if [[ ! -f "$MM_REAL" ]]; then echo "[ERROR] model-manager not found at: $MM_REAL" >&2 echo " Run: ./toolkit_manager.sh init local for initial Inference repository clone" >&2 diff --git a/playbooks/includes/agent_toolkit_preflight.yaml b/playbooks/includes/agent_toolkit_preflight.yaml index f98687ef..4cb42adf 100644 --- a/playbooks/includes/agent_toolkit_preflight.yaml +++ b/playbooks/includes/agent_toolkit_preflight.yaml @@ -3,7 +3,7 @@ - name: "Preflight - Toolkit nodes: locate the checks" ansible.builtin.stat: - path: "{{ playbook_dir }}/../ext/enterprise.agent-toolkit/playbooks/preflight-check.yml" + path: "{{ playbook_dir }}/../ext/agent-toolkit/playbooks/preflight-check.yml" register: _tk_preflight_pb - name: "Preflight - Toolkit nodes" diff --git a/roles/envoy_gateway/tasks/controller.yaml b/roles/envoy_gateway/tasks/controller.yaml index 9b2edd35..c5f16c19 100644 --- a/roles/envoy_gateway/tasks/controller.yaml +++ b/roles/envoy_gateway/tasks/controller.yaml @@ -72,7 +72,7 @@ # off by default. It is how a route reaches an endpoint outside the # cluster with upstream TLS settings of its own - the ONTAP S3 reverse # proxy uses one. The inference layer later helm-upgrades this release - # with the same flag (ext/enterprise.ai-inference/roles/kserve/ + # with the same flag (ext/inference-toolkit/roles/kserve/ # templates/envoy-gateway-ai-values.yaml.j2), so enabling it here only # means a platform-only install already has it, instead of leaving # every Backend-backed HTTPRoute at ResolvedRefs=False. diff --git a/roles/headlamp/files/plugins/enterprise-ai/main.js b/roles/headlamp/files/plugins/enterprise-ai/main.js index e0d05bb9..4ada4f8a 100644 --- a/roles/headlamp/files/plugins/enterprise-ai/main.js +++ b/roles/headlamp/files/plugins/enterprise-ai/main.js @@ -1,2 +1,2 @@ (function(d,t){typeof exports=="object"&&typeof module<"u"?t(require("@kinvolk/headlamp-plugin/lib"),require("react/jsx-runtime"),require("@mui/material"),require("@kinvolk/headlamp-plugin/lib/CommonComponents"),require("react"),require("@iconify/react"),require("@kinvolk/headlamp-plugin/lib/k8s/cluster"),require("react-router-dom")):typeof define=="function"&&define.amd?define(["@kinvolk/headlamp-plugin/lib","react/jsx-runtime","@mui/material","@kinvolk/headlamp-plugin/lib/CommonComponents","react","@iconify/react","@kinvolk/headlamp-plugin/lib/k8s/cluster","react-router-dom"],t):(d=typeof globalThis<"u"?globalThis:d||self,t(d.pluginLib,d.pluginLib.ReactJSX,d.pluginLib.MuiMaterial,d.pluginLib.CommonComponents,d.pluginLib.React,d.pluginLib.Iconify,d.pluginLib.K8s.cluster,d.pluginLib.ReactRouter))})(this,(function(d,t,s,b,f,D,P,be){"use strict";const J="Toolkit Manager Cluster Dashboard";function me(e){return t.jsx(s.Typography,{component:"span",variant:"h6",noWrap:!0,sx:{fontWeight:600,color:"inherit",letterSpacing:.2},children:e.logoType==="small"?"TKM":J})}const H={name:"platform-portal",namespace:"envoy-gateway-system"},y={name:"model-catalog",namespace:"llm-inference"},ve={cuda:["nvidia.com/gpu"],rocm:["amd.com/gpu"],xpu:["gpu.intel.com/xe","gpu.intel.com/i915"]};function xe(e){var o;const n=(o=/-(cuda|rocm|xpu)$/.exec(e.default_server??e.runtime??""))==null?void 0:o[1];return n?ve[n]:[]}function Ce(e){var o;const n=new Set;for(const a of e??[])for(const[l,i]of Object.entries(((o=a.status)==null?void 0:o.allocatable)??{}))l.includes("/")&&parseInt(i,10)>0&&n.add(l);return n}const V=e=>e.split("/")[0];function ke(e,n,o,a){return e.filter(l=>{const i=xe(l);return i.length===0||o.has(l.name)?!0:a===void 0?i.some(c=>n.has(c)):!!a&&n.has(a)&&i.some(c=>V(c)===V(a))})}function we(e){var a,l,i,c,u;const n=(u=(c=(i=(l=(a=e==null?void 0:e.spec)==null?void 0:a.template)==null?void 0:l.spec)==null?void 0:i.containers)==null?void 0:c[0])==null?void 0:u.env;if(!Array.isArray(n))return;const o=n.find(p=>(p==null?void 0:p.name)==="MM_ACCEL_RESOURCE");return o?String(o.value??""):void 0}function w(e){if(e)try{return JSON.parse(e)}catch{return}}function Y(e){if(typeof e!="string")return null;try{const n=new URL(e);return n.protocol==="https:"?n.toString():null}catch{return null}}const X="models",Q=["keycloak",X,"grafana","litellm-ui","langfuse"];function k(e){const n=Q.indexOf(e);return n<0?Q.length:n}function Te(e){return Object.entries(e??{}).map(([n,o])=>{const a=w(o),l=Y(a==null?void 0:a.url);return!a||!l||typeof a.title!="string"?null:{key:n,title:a.title,description:typeof a.description=="string"?a.description:"",url:l}}).filter(n=>n!==null).sort((n,o)=>k(n.key)-k(o.key)||n.title.localeCompare(o.title))}function Le(e){const n=k(X);return[e.filter(o=>k(o.key)<=n),e.filter(o=>k(o.key)>n)]}function Z(e){const n=w(e==null?void 0:e["models.json"]);return Array.isArray(n)?n.filter(o=>typeof(o==null?void 0:o.name)=="string"):[]}function Ae(e){const n=w(e==null?void 0:e["access.json"]),o=Y(n==null?void 0:n.base_url);return!o||n.auth_type!=="jwt"&&n.auth_type!=="litellm_vkey"?null:{baseURL:o.replace(/\/+$/,""),authType:n.auth_type}}function Me(e,n,o){const a=o==="embed"?"embeddings":o==="rerank"?"score":"chat/completions",l=o==="embed"?{model:n,input:["Hello world"]}:o==="rerank"?{model:n,text_1:"query",text_2:["doc1","doc2"]}:{model:n,messages:[{role:"user",content:"Hello"}],max_tokens:16};return{endpoint:`${e.baseURL}/${a}`,body:JSON.stringify(l)}}const T={namespace:"model-manager",template:"model-manager-job"},R="ai.intel.com/model",ee="ai.intel.com/action",O=8,Se=/^[a-z0-9]([-a-z0-9]{0,61}[a-z0-9])?$/,De=e=>e===void 0||Number.isInteger(e)&&e>=1&&e<=O;function Oe(e,n,o={}){if(!Se.test(n))throw new Error(`Invalid model name: ${n}`);if(!De(o.replicas))throw new Error(`Replicas must be 1-${O}`);const a=[e,n,"--wait"];return e==="deploy"&&o.replicas&&o.replicas>1&&a.push("--replicas",String(o.replicas)),a}function Be(e){var o,a,l;const n=w(e==null?void 0:e["job.json"]);return(n==null?void 0:n.kind)==="Job"&&Array.isArray((l=(a=(o=n==null?void 0:n.spec)==null?void 0:o.template)==null?void 0:a.spec)==null?void 0:l.containers)?n:null}function Ee(e,n,o,a={}){var u,p;const l=JSON.parse(JSON.stringify(e)),i={[R]:o,[ee]:n};l.metadata={...l.metadata,generateName:`${n}-${o}`.slice(0,57)+"-",labels:{...(u=l.metadata)==null?void 0:u.labels,...i}};const c=l.spec.template;return c.metadata={...c.metadata,labels:{...(p=c.metadata)==null?void 0:p.labels,...i}},c.spec.containers[0].args=Oe(n,o,a),l}function Ie(e){var o;const n=e.status??{};return n.succeeded?"Succeeded":n.failed||(o=n.conditions)!=null&&o.some(a=>a.type==="Failed"&&a.status==="True")?"Failed":"Running"}function $e(e){var a,l;const n=new Map,o=new Map;for(const i of e){const c=(a=i.metadata.labels)==null?void 0:a[R],u=(l=i.metadata.labels)==null?void 0:l[ee];if(!c||u!=="deploy"&&u!=="undeploy")continue;const p=i.metadata.creationTimestamp??"";n.has(c)&&p<=(o.get(c)??"")||(o.set(c,p),n.set(c,{name:i.metadata.name,action:u,state:Ie(i)}))}return n}const Ne=["Ready","Deploying","Undeploying","Failed","Available"],je={Ready:"success",Deploying:"warning",Undeploying:"warning",Failed:"error",Available:""};function Ue(e,n){const o=(n.query??"").trim().toLowerCase();return e.filter(a=>(!o||a.name.toLowerCase().includes(o)||(a.model_id??"").toLowerCase().includes(o))&&(!n.state||a.state===n.state)&&(!n.category||a.category===n.category))}function _e(e){return[...new Set(e.map(n=>n.category).filter(n=>!!n))].sort()}const Fe="app.kubernetes.io/managed-by=model-manager";function Ge(e){var i,c,u,p,g,A,M;const n=(u=(c=(i=e.spec)==null?void 0:i.template)==null?void 0:c.containers)==null?void 0:u[0],o=(g=(p=e.spec)==null?void 0:p.predictor)==null?void 0:g.model,a=n??o??{},l=((A=a.resources)==null?void 0:A.requests)??{};return{runtime:((M=a.image)==null?void 0:M.split("/").pop())||(o==null?void 0:o.runtime)||void 0,cpu:l.cpu,memory:l.memory}}function qe(e,n){var o;return!n||!e.inCatalogue||((o=e.job)==null?void 0:o.state)==="Running"?[]:[e.deployed?"undeploy":"deploy"]}const ne="app.kubernetes.io/component";function Ke(e,n){var l;const o={},a={};for(const i of e){const c=i.metadata.labels??{},u=c["app.kubernetes.io/name"]===n&&c[ne]==="llminferenceservice-workload"||c["serving.kserve.io/inferenceservice"]===n&&c.component==="predictor",p=c["app.kubernetes.io/name"]===n&&c[ne]==="llminferenceservice-router-scheduler",g=u?"server":p?"router":null;g&&(o[g]??(o[g]=i.metadata.name),((l=i.status)==null?void 0:l.phase)==="Running"&&(a[g]??(a[g]=i.metadata.name)))}return{...o,...a}}const ze={jwt:{label:"Keycloak JWT",variable:"TOKEN"},litellm_vkey:{label:"LiteLLM virtual key",variable:"LITELLM_VIRTUAL_KEY"}};function te(e){return t.jsx(s.Tooltip,{title:`Copy ${e.what}`,children:t.jsx(s.IconButton,{size:"small","aria-label":`Copy ${e.what}`,onClick:()=>{var n;return(n=navigator.clipboard)==null?void 0:n.writeText(e.text)},children:t.jsx(D.Icon,{icon:"mdi:content-copy",width:16})})})}function B(e){return t.jsxs(s.Stack,{direction:"row",alignItems:"flex-start",spacing:.5,sx:{mt:.5},children:[t.jsx(s.Box,{component:"pre",sx:{m:0,p:1,flexGrow:1,overflowX:"auto",fontSize:"0.8rem",bgcolor:"action.hover",borderRadius:1},children:e.text}),t.jsx(te,{text:e.text,what:e.what})]})}function oe(e){return t.jsxs(s.Stack,{direction:"row",alignItems:"center",spacing:1,children:[t.jsx(s.Typography,{variant:"body2",sx:{minWidth:72,fontWeight:600},children:e.label}),t.jsx(s.Typography,{variant:"body2",sx:{fontFamily:"monospace",wordBreak:"break-all"},children:e.value}),t.jsx(te,{text:e.value,what:e.label.toLowerCase()})]})}function We(e){const{endpoint:n,body:o}=Me(e.access,e.model.name,e.model.category),a=ze[e.access.authType],l=[`curl -H "Authorization: Bearer $${a.variable}" \\`,' -H "Content-Type: application/json" \\',` -d '${o}' \\`,` ${n}`].join(` -`);return t.jsxs(s.Dialog,{open:!0,onClose:e.onClose,"aria-labelledby":"access-title",maxWidth:"md",fullWidth:!0,children:[t.jsxs(s.DialogTitle,{id:"access-title",children:["Access ",e.model.name]}),t.jsxs(s.DialogContent,{children:[!e.ready&&t.jsxs(s.Alert,{severity:"info",sx:{mb:2},children:[e.model.name," is not ready yet; requests fail until it is."]}),t.jsxs(s.Stack,{spacing:.5,sx:{mb:2},children:[t.jsx(oe,{label:"Base URL",value:e.access.baseURL}),t.jsx(oe,{label:"Model",value:e.model.name}),t.jsxs(s.Stack,{direction:"row",spacing:1,children:[t.jsx(s.Typography,{variant:"body2",sx:{minWidth:72,fontWeight:600},children:"Auth"}),t.jsxs(s.Typography,{variant:"body2",children:[a.label," (Authorization: Bearer <",a.variable.toLowerCase(),">)"]})]})]}),e.access.authType==="jwt"?t.jsxs(t.Fragment,{children:[t.jsx(s.Typography,{variant:"subtitle2",children:"1. Get a token (valid 15 minutes), in the solutions checkout:"}),t.jsx(B,{text:"source ext/enterprise.ai-inference/model_manager/scripts/get-keycloak-token.sh",what:"token command"})]}):t.jsxs(t.Fragment,{children:[t.jsx(s.Typography,{variant:"subtitle2",children:"1. Use a LiteLLM virtual key from your administrator:"}),t.jsx(B,{text:"export LITELLM_VIRTUAL_KEY=",what:"key command"})]}),t.jsx(s.Typography,{variant:"subtitle2",sx:{mt:2},children:"2. Call the model:"}),t.jsx(B,{text:l,what:"request"}),t.jsx(s.Typography,{variant:"body2",color:"text.secondary",sx:{mt:1},children:"The gateway certificate is issued by the platform CA: add --cacert with that CA, or -k for a quick test."})]}),t.jsx(s.DialogActions,{children:t.jsx(s.Button,{onClick:e.onClose,children:"Close"})})]})}function Pe(e,n){const o=Number(e.cpu),a=/^(\d+(?:\.\d+)?)(\D*)$/.exec(e.memory??"");return[Number.isFinite(o)&&o>0?`${o*n} CPU`:"",a?`${Number(a[1])*n}${a[2]} memory`:""].filter(Boolean).join(" and ")}function Je(e){const[n,o]=f.useState(1),a=Array.from({length:O},(i,c)=>c+1),l=Pe(e.model,n);return t.jsxs(s.Dialog,{open:!0,onClose:e.onClose,"aria-labelledby":"deploy-title",children:[t.jsxs(s.DialogTitle,{id:"deploy-title",children:["Deploy ",e.model.name,"?"]}),t.jsxs(s.DialogContent,{children:[t.jsxs(s.DialogContentText,{children:["This downloads ",e.model.model_id??"the model"," if needed and starts serving it",l?`, using ${l}`:"",". It is published on the gateway once ready."]}),t.jsx(s.TextField,{select:!0,label:"Replicas",value:n,onChange:i=>o(Number(i.target.value)),sx:{mt:2,minWidth:120},children:a.map(i=>t.jsx(s.MenuItem,{value:i,children:i},i))})]}),t.jsxs(s.DialogActions,{children:[t.jsx(s.Button,{onClick:e.onClose,children:"No"}),t.jsx(s.Button,{variant:"contained",onClick:()=>e.onDeploy({replicas:n}),children:"Yes, deploy"})]})]})}function He(e){return t.jsxs(s.Dialog,{open:!0,onClose:e.onClose,"aria-labelledby":"undeploy-title",children:[t.jsxs(s.DialogTitle,{id:"undeploy-title",children:["Undeploy ",e.model.name,"?"]}),t.jsx(s.DialogContent,{children:t.jsxs(s.DialogContentText,{children:[e.model.name," stops serving and is removed from the gateway, so requests to it will fail. Its downloaded weights stay, so deploying it again is quicker."]})}),t.jsxs(s.DialogActions,{children:[t.jsx(s.Button,{onClick:e.onClose,children:"No"}),t.jsx(s.Button,{variant:"contained",color:"error",onClick:e.onUndeploy,children:"Yes, undeploy"})]})]})}function Ve(e){return e.actions.includes("deploy")?t.jsx(s.Button,{size:"small",variant:"contained",onClick:()=>e.onSelect("deploy",e.row),children:"Deploy"}):e.actions.includes("undeploy")?t.jsx(s.Button,{size:"small",variant:"outlined",color:"error",onClick:()=>e.onSelect("undeploy",e.row),children:"Undeploy"}):null}function Ye(e){const[n,o]=f.useState(null);return e.items.length===0?null:t.jsxs(t.Fragment,{children:[t.jsx(s.IconButton,{size:"small","aria-label":`More for ${e.name}`,onClick:a=>o(a.currentTarget),children:t.jsx(D.Icon,{icon:"mdi:dots-vertical"})}),t.jsx(s.Menu,{anchorEl:n,open:!!n,onClose:()=>o(null),onClick:()=>o(null),children:e.items})]})}function Xe(e){return e.rows.length===0?t.jsx(s.Typography,{color:"text.secondary",children:e.empty}):t.jsx(s.Box,{sx:{display:"grid",gap:2,gridTemplateColumns:"repeat(auto-fill, minmax(280px, 1fr))"},children:e.rows.map(n=>{const o=[n.category,n.default_server??n.runtime,n.cpu&&`${n.cpu} CPU`,n.memory].filter(Boolean);return t.jsxs(s.Card,{variant:"outlined",sx:{display:"flex",flexDirection:"column"},children:[t.jsxs(s.CardContent,{sx:{flexGrow:1,display:"flex",flexDirection:"column"},children:[t.jsxs(s.Stack,{direction:"row",justifyContent:"space-between",alignItems:"flex-start",spacing:1,children:[t.jsx(s.Typography,{variant:"h6",component:"h2",sx:{wordBreak:"break-word"},children:n.name}),t.jsx(b.StatusLabel,{status:je[n.state],title:n.reason,children:n.state})]}),n.model_id&&t.jsx(s.Typography,{variant:"body2",color:"text.secondary",sx:{wordBreak:"break-all"},children:n.model_id}),t.jsxs(s.Stack,{direction:"row",spacing:.5,useFlexGap:!0,flexWrap:"wrap",sx:{mt:1},children:[o.map(a=>t.jsx(s.Chip,{label:a,size:"small",variant:"outlined"},a)),!n.inCatalogue&&t.jsx(s.Chip,{label:"outside the catalogue",size:"small"})]}),t.jsx(s.Typography,{variant:"body2",sx:{mt:1},component:"div",children:e.lastAction(n)}),n.inCatalogue&&t.jsx(s.Box,{sx:{mt:"auto",pt:1},children:t.jsx(s.Tooltip,{title:"In the catalogue",children:t.jsx(s.Chip,{label:"C","aria-label":"In the catalogue",size:"small",variant:"outlined",color:"info",sx:{height:20,fontSize:"0.7rem",fontWeight:600}})})})]}),t.jsx(s.CardActions,{children:e.action(n)})]},n.name)})})}function Qe(e){const{filter:n,onFilter:o}=e;return t.jsxs(s.Stack,{direction:"row",spacing:1.5,useFlexGap:!0,flexWrap:"wrap",alignItems:"center",sx:{mb:2},children:[t.jsx(s.TextField,{size:"small",label:"Search models",value:n.query??"",onChange:a=>o({...n,query:a.target.value}),sx:{minWidth:220}}),t.jsxs(s.TextField,{select:!0,size:"small",label:"Status",value:n.state??"",onChange:a=>o({...n,state:a.target.value}),sx:{minWidth:140},children:[t.jsx(s.MenuItem,{value:"",children:"All"}),Ne.map(a=>t.jsx(s.MenuItem,{value:a,children:a},a))]}),t.jsxs(s.TextField,{select:!0,size:"small",label:"Type",value:n.category??"",onChange:a=>o({...n,category:a.target.value}),sx:{minWidth:120},children:[t.jsx(s.MenuItem,{value:"",children:"All"}),e.categories.map(a=>t.jsx(s.MenuItem,{value:a,children:a},a))]})]})}const v=class v extends P.KubeObject{};v.apiVersion=["serving.kserve.io/v1alpha2","serving.kserve.io/v1alpha1"],v.kind="LLMInferenceService",v.apiName="llminferenceservices",v.isNamespaced=!0;let L=v;const x=class x extends P.KubeObject{};x.apiVersion="serving.kserve.io/v1beta1",x.kind="InferenceService",x.apiName="inferenceservices",x.isNamespaced=!0;let E=x;function se(e){var n,o;return(o=(n=e.jsonData.status)==null?void 0:n.conditions)==null?void 0:o.find(a=>a.type==="Ready")}function ae(e,n){const[o,a]=d.K8s.ResourceClasses.Node.useList(),[l,i]=d.K8s.ResourceClasses.ConfigMap.useGet(T.template,T.namespace),c=Be(l==null?void 0:l.data);return!o&&!a||!l&&!i?{offered:null,template:c}:{offered:ke(e,Ce(o==null?void 0:o.map(p=>p.jsonData)),n,we(c)),template:c}}function Ze(e,n){if((n==null?void 0:n.state)==="Running")return{state:n.action==="deploy"?"Deploying":"Undeploying",reason:"model-manager is running"};if((n==null?void 0:n.state)==="Failed")return{state:"Failed",reason:`Last ${n.action} failed; see its log`};if(!e)return{state:"Available",reason:"In the catalogue, not deployed"};const o=se(e);return(o==null?void 0:o.status)==="True"?{state:"Ready",reason:""}:{state:"Deploying",reason:(o==null?void 0:o.reason)??""}}function Re(){const[e,n]=d.K8s.ResourceClasses.ConfigMap.useGet(y.name,y.namespace),o={namespace:y.namespace,labelSelector:Fe},[a,l]=L.useList(o),[i,c]=E.useList(o),[u]=d.K8s.ResourceClasses.Pod.useList({namespace:y.namespace}),[p]=d.K8s.ResourceClasses.Job.useList({namespace:T.namespace,labelSelector:"app.kubernetes.io/name=model-manager"}),[g,A]=f.useState({}),[M,ln]=f.useState(!1),[$,N]=f.useState(null),[j,U]=f.useState(null),[_,de]=f.useState(null),[ue,F]=f.useState(""),{offered:G,template:pe}=ae(Z(e==null?void 0:e.data),new Set([...a??[],...i??[]].map(r=>r.metadata.name)));if(!e&&!n||!a&&!l||!i&&!c||!G)return t.jsx(b.Loader,{title:"Loading models"});const cn=[...a??[],...i??[]],dn=$e((p??[]).map(r=>r.jsonData)),q=new Map((p??[]).map(r=>[r.metadata.name,r])),K=new Map(cn.map(r=>[r.metadata.name,r])),z=Ae(e==null?void 0:e.data),he=(r,h)=>{const m=dn.get(r.name);return{...r,...Ze(K.get(r.name),m),deployed:K.has(r.name),inCatalogue:h,job:m}},C=[...G.map(r=>he(r,!0)),...[...K.entries()].filter(([r])=>!G.some(h=>h.name===r)).map(([r,h])=>he({name:r,...Ge(h.jsonData)},!1))],W=Ue(C,g),un=n?`Cannot read ${y.namespace}/${y.name}: ${n.message}`:C.length?"No models match the filters.":"No models in the catalogue.";async function ge(r,h,m){F("");try{await d.K8s.ResourceClasses.Job.apiEndpoint.post(Ee(pe,r,h,m))}catch(S){F(`Could not start ${r} of ${h}: ${S.message}`)}}const pn=r=>qe(r,M&&!!pe),hn=(r,h)=>r==="deploy"?N(h):U(h),gn=r=>r.job&&q.get(r.job.name)?t.jsx(b.Link,{kubeObject:q.get(r.job.name),tooltip:"Job and its log",children:`${r.job.action}: ${r.job.state}`}):null,yn=(u??[]).map(r=>r.jsonData),fn=r=>{const{server:h,router:m}=Ke(yn,r.name),S=r.job&&q.get(r.job.name),ye=(bn,fe)=>t.jsx(s.MenuItem,{children:t.jsx(b.Link,{routeName:"pod",params:{namespace:y.namespace,name:bn},children:fe})},fe);return[...z&&r.deployed?[t.jsx(s.MenuItem,{onClick:()=>de(r),children:"Access details"},"access")]:[],...h?[ye(h,"Server logs")]:[],...m?[ye(m,"Router logs")]:[],...S?[t.jsx(s.MenuItem,{children:t.jsx(b.Link,{kubeObject:S,children:`Last ${r.job.action} log`})},"run")]:[]]};return t.jsxs(b.SectionBox,{title:"AI Models",children:[t.jsx(b.AuthVisible,{item:d.K8s.ResourceClasses.Job,authVerb:"create",namespace:T.namespace,onAuthResult:r=>ln(r.allowed)}),ue&&t.jsx(s.Alert,{severity:"error",onClose:()=>F(""),sx:{mb:2},children:ue}),t.jsx(Qe,{filter:g,categories:_e(C),onFilter:A}),t.jsx(s.Typography,{variant:"body2",color:"text.secondary",sx:{mb:1},children:W.length===C.length?`${C.length} models`:`${W.length} of ${C.length} models`}),t.jsx(Xe,{rows:W,empty:un,lastAction:gn,action:r=>t.jsxs(t.Fragment,{children:[t.jsx(Ve,{row:r,actions:pn(r),onSelect:hn}),t.jsx(s.Box,{sx:{flexGrow:1}}),t.jsx(Ye,{name:r.name,items:fn(r)})]})}),$&&t.jsx(Je,{model:$,onClose:()=>N(null),onDeploy:r=>{N(null),ge("deploy",$.name,r)}}),_&&z&&t.jsx(We,{model:_,access:z,ready:_.state==="Ready",onClose:()=>de(null)}),j&&t.jsx(He,{model:j,onClose:()=>U(null),onUndeploy:()=>{U(null),ge("undeploy",j.name)}})]})}const re={summary:"An on-premises AI platform on Kubernetes: serve open models on Intel® Xeon® processors, expose them through one secure gateway, and run the platform from a single console.",features:[{icon:"mdi:brain",title:"Model serving",text:"vLLM and OpenVINO on KServe, CPU-pinned with NRI balloons; deploy from the catalogue in one click."},{icon:"mdi:api",title:"OpenAI-compatible API",text:"One endpoint for every model through the Envoy AI Gateway; optional LiteLLM adds virtual keys, rate limits and spend tracking."},{icon:"mdi:shield-lock-outline",title:"Single sign-on",text:"Keycloak signs people in once for Headlamp, Grafana, Langfuse and LiteLLM, with group-based roles."},{icon:"mdi:lan",title:"Secure gateway",text:"Envoy Gateway with TLS on every host, path or subdomain routing, and Istio ambient mTLS inside."},{icon:"mdi:chart-line",title:"Observability",text:"Prometheus, Grafana, Loki and Tempo for metrics, logs and traces; Langfuse for LLM tracing."},{icon:"mdi:console",title:"One console",text:"This Headlamp console: cluster resources with per-person RBAC, platform services and models."}]};function en(e){return t.jsx(s.Box,{sx:{display:"grid",gap:2,gridTemplateColumns:"repeat(auto-fill, minmax(220px, 1fr))"},children:e.children})}function le(e){return t.jsxs(s.Card,{variant:"outlined",sx:{display:"flex",flexDirection:"column"},children:[t.jsxs(s.CardContent,{sx:{flexGrow:1,pb:1},children:[t.jsx(s.Typography,{variant:"h6",component:"h3",children:e.title}),t.jsx(s.Typography,{variant:"body2",color:"text.secondary",component:"div",children:e.description})]}),t.jsx(s.CardActions,{sx:{px:2,pb:2},children:e.action})]})}function ie({entries:e}){return t.jsx(t.Fragment,{children:e.map(n=>t.jsx(le,{title:n.title,description:n.description,action:t.jsx(s.Button,{variant:"contained",size:"small",href:n.url,target:"_blank",rel:"noopener noreferrer","aria-label":`Open ${n.title}`,children:"Open"})},n.key))})}const I="data-enterprise-ai-row",ce={[`.MuiGrid-item:has(> [${I}])`]:{maxWidth:"100% !important",flexBasis:"100% !important"}};function nn(){return t.jsxs(s.Paper,{variant:"outlined",sx:{p:2.5},[I]:"",children:[t.jsx(s.GlobalStyles,{styles:ce}),t.jsx(s.Typography,{variant:"h5",component:"h2",children:J}),t.jsx(s.Typography,{variant:"body1",color:"text.secondary",sx:{mt:.5,mb:2},children:re.summary}),t.jsx(s.Box,{sx:{display:"grid",gap:2,gridTemplateColumns:"repeat(auto-fill, minmax(260px, 1fr))"},children:re.features.map(e=>t.jsxs(s.Stack,{direction:"row",spacing:1.5,alignItems:"flex-start",children:[t.jsx(s.Box,{sx:{color:"primary.main",pt:.25},children:t.jsx(D.Icon,{icon:e.icon,width:24})}),t.jsxs(s.Box,{children:[t.jsx(s.Typography,{variant:"subtitle2",component:"h3",children:e.title}),t.jsx(s.Typography,{variant:"body2",color:"text.secondary",children:e.text})]})]},e.title))})]})}function tn(){const[e]=d.K8s.ResourceClasses.ConfigMap.useGet(y.name,y.namespace),[n]=L.useList({namespace:y.namespace}),o=n??[],{offered:a}=ae(Z(e==null?void 0:e.data),new Set(o.map(c=>c.metadata.name))),l=o.filter(c=>{var u;return((u=se(c))==null?void 0:u.status)==="True"}).length,i=o.length-l;return t.jsx(le,{title:"Models",description:a&&n?`${l} of ${a.length} ready${i?`, ${i} starting`:""}`:"Loading",action:t.jsx(s.Button,{variant:"contained",size:"small",component:be.Link,to:d.Router.createRouteURL("ea-models"),"aria-label":"Open Models",children:"Open"})})}function on(){const[e,n]=d.K8s.ResourceClasses.ConfigMap.useGet(H.name,H.namespace),o=Te(e==null?void 0:e.data),[a,l]=Le(o);return t.jsxs(s.Box,{[I]:"",children:[t.jsx(s.GlobalStyles,{styles:ce}),t.jsx(s.Typography,{variant:"h6",component:"h2",sx:{mb:1.5},children:"Platform services"}),n&&o.length===0&&t.jsx(s.Typography,{variant:"body2",color:"text.secondary",sx:{mb:1},children:"Cannot read the service list."}),t.jsxs(en,{children:[t.jsx(ie,{entries:a}),t.jsx(tn,{}),t.jsx(ie,{entries:l})]})]})}const sn={id:"enterprise-ai-about",component:()=>t.jsx(nn,{})},an={id:"enterprise-ai-platform",component:()=>t.jsx(on,{})},rn=[{name:"ea-models",label:"Models",url:"/enterprise-ai/models",icon:"mdi:brain",component:Re}];for(const e of rn)d.registerSidebarEntry({parent:null,name:e.name,label:e.label,url:e.url,icon:e.icon}),d.registerRoute({path:e.url,sidebar:e.name,name:e.name,exact:!0,component:e.component});d.registerAppLogo(me),d.registerOverviewChartsProcessor({id:"enterprise-ai",processor:e=>[sn,...e,an]})})); +`);return t.jsxs(s.Dialog,{open:!0,onClose:e.onClose,"aria-labelledby":"access-title",maxWidth:"md",fullWidth:!0,children:[t.jsxs(s.DialogTitle,{id:"access-title",children:["Access ",e.model.name]}),t.jsxs(s.DialogContent,{children:[!e.ready&&t.jsxs(s.Alert,{severity:"info",sx:{mb:2},children:[e.model.name," is not ready yet; requests fail until it is."]}),t.jsxs(s.Stack,{spacing:.5,sx:{mb:2},children:[t.jsx(oe,{label:"Base URL",value:e.access.baseURL}),t.jsx(oe,{label:"Model",value:e.model.name}),t.jsxs(s.Stack,{direction:"row",spacing:1,children:[t.jsx(s.Typography,{variant:"body2",sx:{minWidth:72,fontWeight:600},children:"Auth"}),t.jsxs(s.Typography,{variant:"body2",children:[a.label," (Authorization: Bearer <",a.variable.toLowerCase(),">)"]})]})]}),e.access.authType==="jwt"?t.jsxs(t.Fragment,{children:[t.jsx(s.Typography,{variant:"subtitle2",children:"1. Get a token (valid 15 minutes), in the solutions checkout:"}),t.jsx(B,{text:"source ext/inference-toolkit/model_manager/scripts/get-keycloak-token.sh",what:"token command"})]}):t.jsxs(t.Fragment,{children:[t.jsx(s.Typography,{variant:"subtitle2",children:"1. Use a LiteLLM virtual key from your administrator:"}),t.jsx(B,{text:"export LITELLM_VIRTUAL_KEY=",what:"key command"})]}),t.jsx(s.Typography,{variant:"subtitle2",sx:{mt:2},children:"2. Call the model:"}),t.jsx(B,{text:l,what:"request"}),t.jsx(s.Typography,{variant:"body2",color:"text.secondary",sx:{mt:1},children:"The gateway certificate is issued by the platform CA: add --cacert with that CA, or -k for a quick test."})]}),t.jsx(s.DialogActions,{children:t.jsx(s.Button,{onClick:e.onClose,children:"Close"})})]})}function Pe(e,n){const o=Number(e.cpu),a=/^(\d+(?:\.\d+)?)(\D*)$/.exec(e.memory??"");return[Number.isFinite(o)&&o>0?`${o*n} CPU`:"",a?`${Number(a[1])*n}${a[2]} memory`:""].filter(Boolean).join(" and ")}function Je(e){const[n,o]=f.useState(1),a=Array.from({length:O},(i,c)=>c+1),l=Pe(e.model,n);return t.jsxs(s.Dialog,{open:!0,onClose:e.onClose,"aria-labelledby":"deploy-title",children:[t.jsxs(s.DialogTitle,{id:"deploy-title",children:["Deploy ",e.model.name,"?"]}),t.jsxs(s.DialogContent,{children:[t.jsxs(s.DialogContentText,{children:["This downloads ",e.model.model_id??"the model"," if needed and starts serving it",l?`, using ${l}`:"",". It is published on the gateway once ready."]}),t.jsx(s.TextField,{select:!0,label:"Replicas",value:n,onChange:i=>o(Number(i.target.value)),sx:{mt:2,minWidth:120},children:a.map(i=>t.jsx(s.MenuItem,{value:i,children:i},i))})]}),t.jsxs(s.DialogActions,{children:[t.jsx(s.Button,{onClick:e.onClose,children:"No"}),t.jsx(s.Button,{variant:"contained",onClick:()=>e.onDeploy({replicas:n}),children:"Yes, deploy"})]})]})}function He(e){return t.jsxs(s.Dialog,{open:!0,onClose:e.onClose,"aria-labelledby":"undeploy-title",children:[t.jsxs(s.DialogTitle,{id:"undeploy-title",children:["Undeploy ",e.model.name,"?"]}),t.jsx(s.DialogContent,{children:t.jsxs(s.DialogContentText,{children:[e.model.name," stops serving and is removed from the gateway, so requests to it will fail. Its downloaded weights stay, so deploying it again is quicker."]})}),t.jsxs(s.DialogActions,{children:[t.jsx(s.Button,{onClick:e.onClose,children:"No"}),t.jsx(s.Button,{variant:"contained",color:"error",onClick:e.onUndeploy,children:"Yes, undeploy"})]})]})}function Ve(e){return e.actions.includes("deploy")?t.jsx(s.Button,{size:"small",variant:"contained",onClick:()=>e.onSelect("deploy",e.row),children:"Deploy"}):e.actions.includes("undeploy")?t.jsx(s.Button,{size:"small",variant:"outlined",color:"error",onClick:()=>e.onSelect("undeploy",e.row),children:"Undeploy"}):null}function Ye(e){const[n,o]=f.useState(null);return e.items.length===0?null:t.jsxs(t.Fragment,{children:[t.jsx(s.IconButton,{size:"small","aria-label":`More for ${e.name}`,onClick:a=>o(a.currentTarget),children:t.jsx(D.Icon,{icon:"mdi:dots-vertical"})}),t.jsx(s.Menu,{anchorEl:n,open:!!n,onClose:()=>o(null),onClick:()=>o(null),children:e.items})]})}function Xe(e){return e.rows.length===0?t.jsx(s.Typography,{color:"text.secondary",children:e.empty}):t.jsx(s.Box,{sx:{display:"grid",gap:2,gridTemplateColumns:"repeat(auto-fill, minmax(280px, 1fr))"},children:e.rows.map(n=>{const o=[n.category,n.default_server??n.runtime,n.cpu&&`${n.cpu} CPU`,n.memory].filter(Boolean);return t.jsxs(s.Card,{variant:"outlined",sx:{display:"flex",flexDirection:"column"},children:[t.jsxs(s.CardContent,{sx:{flexGrow:1,display:"flex",flexDirection:"column"},children:[t.jsxs(s.Stack,{direction:"row",justifyContent:"space-between",alignItems:"flex-start",spacing:1,children:[t.jsx(s.Typography,{variant:"h6",component:"h2",sx:{wordBreak:"break-word"},children:n.name}),t.jsx(b.StatusLabel,{status:je[n.state],title:n.reason,children:n.state})]}),n.model_id&&t.jsx(s.Typography,{variant:"body2",color:"text.secondary",sx:{wordBreak:"break-all"},children:n.model_id}),t.jsxs(s.Stack,{direction:"row",spacing:.5,useFlexGap:!0,flexWrap:"wrap",sx:{mt:1},children:[o.map(a=>t.jsx(s.Chip,{label:a,size:"small",variant:"outlined"},a)),!n.inCatalogue&&t.jsx(s.Chip,{label:"outside the catalogue",size:"small"})]}),t.jsx(s.Typography,{variant:"body2",sx:{mt:1},component:"div",children:e.lastAction(n)}),n.inCatalogue&&t.jsx(s.Box,{sx:{mt:"auto",pt:1},children:t.jsx(s.Tooltip,{title:"In the catalogue",children:t.jsx(s.Chip,{label:"C","aria-label":"In the catalogue",size:"small",variant:"outlined",color:"info",sx:{height:20,fontSize:"0.7rem",fontWeight:600}})})})]}),t.jsx(s.CardActions,{children:e.action(n)})]},n.name)})})}function Qe(e){const{filter:n,onFilter:o}=e;return t.jsxs(s.Stack,{direction:"row",spacing:1.5,useFlexGap:!0,flexWrap:"wrap",alignItems:"center",sx:{mb:2},children:[t.jsx(s.TextField,{size:"small",label:"Search models",value:n.query??"",onChange:a=>o({...n,query:a.target.value}),sx:{minWidth:220}}),t.jsxs(s.TextField,{select:!0,size:"small",label:"Status",value:n.state??"",onChange:a=>o({...n,state:a.target.value}),sx:{minWidth:140},children:[t.jsx(s.MenuItem,{value:"",children:"All"}),Ne.map(a=>t.jsx(s.MenuItem,{value:a,children:a},a))]}),t.jsxs(s.TextField,{select:!0,size:"small",label:"Type",value:n.category??"",onChange:a=>o({...n,category:a.target.value}),sx:{minWidth:120},children:[t.jsx(s.MenuItem,{value:"",children:"All"}),e.categories.map(a=>t.jsx(s.MenuItem,{value:a,children:a},a))]})]})}const v=class v extends P.KubeObject{};v.apiVersion=["serving.kserve.io/v1alpha2","serving.kserve.io/v1alpha1"],v.kind="LLMInferenceService",v.apiName="llminferenceservices",v.isNamespaced=!0;let L=v;const x=class x extends P.KubeObject{};x.apiVersion="serving.kserve.io/v1beta1",x.kind="InferenceService",x.apiName="inferenceservices",x.isNamespaced=!0;let E=x;function se(e){var n,o;return(o=(n=e.jsonData.status)==null?void 0:n.conditions)==null?void 0:o.find(a=>a.type==="Ready")}function ae(e,n){const[o,a]=d.K8s.ResourceClasses.Node.useList(),[l,i]=d.K8s.ResourceClasses.ConfigMap.useGet(T.template,T.namespace),c=Be(l==null?void 0:l.data);return!o&&!a||!l&&!i?{offered:null,template:c}:{offered:ke(e,Ce(o==null?void 0:o.map(p=>p.jsonData)),n,we(c)),template:c}}function Ze(e,n){if((n==null?void 0:n.state)==="Running")return{state:n.action==="deploy"?"Deploying":"Undeploying",reason:"model-manager is running"};if((n==null?void 0:n.state)==="Failed")return{state:"Failed",reason:`Last ${n.action} failed; see its log`};if(!e)return{state:"Available",reason:"In the catalogue, not deployed"};const o=se(e);return(o==null?void 0:o.status)==="True"?{state:"Ready",reason:""}:{state:"Deploying",reason:(o==null?void 0:o.reason)??""}}function Re(){const[e,n]=d.K8s.ResourceClasses.ConfigMap.useGet(y.name,y.namespace),o={namespace:y.namespace,labelSelector:Fe},[a,l]=L.useList(o),[i,c]=E.useList(o),[u]=d.K8s.ResourceClasses.Pod.useList({namespace:y.namespace}),[p]=d.K8s.ResourceClasses.Job.useList({namespace:T.namespace,labelSelector:"app.kubernetes.io/name=model-manager"}),[g,A]=f.useState({}),[M,ln]=f.useState(!1),[$,N]=f.useState(null),[j,U]=f.useState(null),[_,de]=f.useState(null),[ue,F]=f.useState(""),{offered:G,template:pe}=ae(Z(e==null?void 0:e.data),new Set([...a??[],...i??[]].map(r=>r.metadata.name)));if(!e&&!n||!a&&!l||!i&&!c||!G)return t.jsx(b.Loader,{title:"Loading models"});const cn=[...a??[],...i??[]],dn=$e((p??[]).map(r=>r.jsonData)),q=new Map((p??[]).map(r=>[r.metadata.name,r])),K=new Map(cn.map(r=>[r.metadata.name,r])),z=Ae(e==null?void 0:e.data),he=(r,h)=>{const m=dn.get(r.name);return{...r,...Ze(K.get(r.name),m),deployed:K.has(r.name),inCatalogue:h,job:m}},C=[...G.map(r=>he(r,!0)),...[...K.entries()].filter(([r])=>!G.some(h=>h.name===r)).map(([r,h])=>he({name:r,...Ge(h.jsonData)},!1))],W=Ue(C,g),un=n?`Cannot read ${y.namespace}/${y.name}: ${n.message}`:C.length?"No models match the filters.":"No models in the catalogue.";async function ge(r,h,m){F("");try{await d.K8s.ResourceClasses.Job.apiEndpoint.post(Ee(pe,r,h,m))}catch(S){F(`Could not start ${r} of ${h}: ${S.message}`)}}const pn=r=>qe(r,M&&!!pe),hn=(r,h)=>r==="deploy"?N(h):U(h),gn=r=>r.job&&q.get(r.job.name)?t.jsx(b.Link,{kubeObject:q.get(r.job.name),tooltip:"Job and its log",children:`${r.job.action}: ${r.job.state}`}):null,yn=(u??[]).map(r=>r.jsonData),fn=r=>{const{server:h,router:m}=Ke(yn,r.name),S=r.job&&q.get(r.job.name),ye=(bn,fe)=>t.jsx(s.MenuItem,{children:t.jsx(b.Link,{routeName:"pod",params:{namespace:y.namespace,name:bn},children:fe})},fe);return[...z&&r.deployed?[t.jsx(s.MenuItem,{onClick:()=>de(r),children:"Access details"},"access")]:[],...h?[ye(h,"Server logs")]:[],...m?[ye(m,"Router logs")]:[],...S?[t.jsx(s.MenuItem,{children:t.jsx(b.Link,{kubeObject:S,children:`Last ${r.job.action} log`})},"run")]:[]]};return t.jsxs(b.SectionBox,{title:"AI Models",children:[t.jsx(b.AuthVisible,{item:d.K8s.ResourceClasses.Job,authVerb:"create",namespace:T.namespace,onAuthResult:r=>ln(r.allowed)}),ue&&t.jsx(s.Alert,{severity:"error",onClose:()=>F(""),sx:{mb:2},children:ue}),t.jsx(Qe,{filter:g,categories:_e(C),onFilter:A}),t.jsx(s.Typography,{variant:"body2",color:"text.secondary",sx:{mb:1},children:W.length===C.length?`${C.length} models`:`${W.length} of ${C.length} models`}),t.jsx(Xe,{rows:W,empty:un,lastAction:gn,action:r=>t.jsxs(t.Fragment,{children:[t.jsx(Ve,{row:r,actions:pn(r),onSelect:hn}),t.jsx(s.Box,{sx:{flexGrow:1}}),t.jsx(Ye,{name:r.name,items:fn(r)})]})}),$&&t.jsx(Je,{model:$,onClose:()=>N(null),onDeploy:r=>{N(null),ge("deploy",$.name,r)}}),_&&z&&t.jsx(We,{model:_,access:z,ready:_.state==="Ready",onClose:()=>de(null)}),j&&t.jsx(He,{model:j,onClose:()=>U(null),onUndeploy:()=>{U(null),ge("undeploy",j.name)}})]})}const re={summary:"An on-premises AI platform on Kubernetes: serve open models on Intel® Xeon® processors, expose them through one secure gateway, and run the platform from a single console.",features:[{icon:"mdi:brain",title:"Model serving",text:"vLLM and OpenVINO on KServe, CPU-pinned with NRI balloons; deploy from the catalogue in one click."},{icon:"mdi:api",title:"OpenAI-compatible API",text:"One endpoint for every model through the Envoy AI Gateway; optional LiteLLM adds virtual keys, rate limits and spend tracking."},{icon:"mdi:shield-lock-outline",title:"Single sign-on",text:"Keycloak signs people in once for Headlamp, Grafana, Langfuse and LiteLLM, with group-based roles."},{icon:"mdi:lan",title:"Secure gateway",text:"Envoy Gateway with TLS on every host, path or subdomain routing, and Istio ambient mTLS inside."},{icon:"mdi:chart-line",title:"Observability",text:"Prometheus, Grafana, Loki and Tempo for metrics, logs and traces; Langfuse for LLM tracing."},{icon:"mdi:console",title:"One console",text:"This Headlamp console: cluster resources with per-person RBAC, platform services and models."}]};function en(e){return t.jsx(s.Box,{sx:{display:"grid",gap:2,gridTemplateColumns:"repeat(auto-fill, minmax(220px, 1fr))"},children:e.children})}function le(e){return t.jsxs(s.Card,{variant:"outlined",sx:{display:"flex",flexDirection:"column"},children:[t.jsxs(s.CardContent,{sx:{flexGrow:1,pb:1},children:[t.jsx(s.Typography,{variant:"h6",component:"h3",children:e.title}),t.jsx(s.Typography,{variant:"body2",color:"text.secondary",component:"div",children:e.description})]}),t.jsx(s.CardActions,{sx:{px:2,pb:2},children:e.action})]})}function ie({entries:e}){return t.jsx(t.Fragment,{children:e.map(n=>t.jsx(le,{title:n.title,description:n.description,action:t.jsx(s.Button,{variant:"contained",size:"small",href:n.url,target:"_blank",rel:"noopener noreferrer","aria-label":`Open ${n.title}`,children:"Open"})},n.key))})}const I="data-enterprise-ai-row",ce={[`.MuiGrid-item:has(> [${I}])`]:{maxWidth:"100% !important",flexBasis:"100% !important"}};function nn(){return t.jsxs(s.Paper,{variant:"outlined",sx:{p:2.5},[I]:"",children:[t.jsx(s.GlobalStyles,{styles:ce}),t.jsx(s.Typography,{variant:"h5",component:"h2",children:J}),t.jsx(s.Typography,{variant:"body1",color:"text.secondary",sx:{mt:.5,mb:2},children:re.summary}),t.jsx(s.Box,{sx:{display:"grid",gap:2,gridTemplateColumns:"repeat(auto-fill, minmax(260px, 1fr))"},children:re.features.map(e=>t.jsxs(s.Stack,{direction:"row",spacing:1.5,alignItems:"flex-start",children:[t.jsx(s.Box,{sx:{color:"primary.main",pt:.25},children:t.jsx(D.Icon,{icon:e.icon,width:24})}),t.jsxs(s.Box,{children:[t.jsx(s.Typography,{variant:"subtitle2",component:"h3",children:e.title}),t.jsx(s.Typography,{variant:"body2",color:"text.secondary",children:e.text})]})]},e.title))})]})}function tn(){const[e]=d.K8s.ResourceClasses.ConfigMap.useGet(y.name,y.namespace),[n]=L.useList({namespace:y.namespace}),o=n??[],{offered:a}=ae(Z(e==null?void 0:e.data),new Set(o.map(c=>c.metadata.name))),l=o.filter(c=>{var u;return((u=se(c))==null?void 0:u.status)==="True"}).length,i=o.length-l;return t.jsx(le,{title:"Models",description:a&&n?`${l} of ${a.length} ready${i?`, ${i} starting`:""}`:"Loading",action:t.jsx(s.Button,{variant:"contained",size:"small",component:be.Link,to:d.Router.createRouteURL("ea-models"),"aria-label":"Open Models",children:"Open"})})}function on(){const[e,n]=d.K8s.ResourceClasses.ConfigMap.useGet(H.name,H.namespace),o=Te(e==null?void 0:e.data),[a,l]=Le(o);return t.jsxs(s.Box,{[I]:"",children:[t.jsx(s.GlobalStyles,{styles:ce}),t.jsx(s.Typography,{variant:"h6",component:"h2",sx:{mb:1.5},children:"Platform services"}),n&&o.length===0&&t.jsx(s.Typography,{variant:"body2",color:"text.secondary",sx:{mb:1},children:"Cannot read the service list."}),t.jsxs(en,{children:[t.jsx(ie,{entries:a}),t.jsx(tn,{}),t.jsx(ie,{entries:l})]})]})}const sn={id:"enterprise-ai-about",component:()=>t.jsx(nn,{})},an={id:"enterprise-ai-platform",component:()=>t.jsx(on,{})},rn=[{name:"ea-models",label:"Models",url:"/enterprise-ai/models",icon:"mdi:brain",component:Re}];for(const e of rn)d.registerSidebarEntry({parent:null,name:e.name,label:e.label,url:e.url,icon:e.icon}),d.registerRoute({path:e.url,sidebar:e.name,name:e.name,exact:!0,component:e.component});d.registerAppLogo(me),d.registerOverviewChartsProcessor({id:"enterprise-ai",processor:e=>[sn,...e,an]})})); diff --git a/roles/nri_cpu_balloons/tasks/generate_balloon_types.yaml b/roles/nri_cpu_balloons/tasks/generate_balloon_types.yaml index 7f81f4e2..11fa9db5 100644 --- a/roles/nri_cpu_balloons/tasks/generate_balloon_types.yaml +++ b/roles/nri_cpu_balloons/tasks/generate_balloon_types.yaml @@ -480,7 +480,7 @@ nri.intel.com/max-tp: "{{ item.value.max_tp | string }}" nri.intel.com/numa-nodes: "{{ item.value.numa | string }}" nri.intel.com/physical-cpus: "{{ item.value.physical_cpus | string }}" - # Read by model-manager (intel/enterprise-inference): keep {"": ""}. + # Read by model-manager (intel/inference-toolkit): keep {"": ""}. annotations: nri.intel.com/numa-cpus: "{{ item.value.node_cpus | to_json(sort_keys=True) }}" loop: "{{ _nri_per_node_topology | dict2items }}" diff --git a/roles/postgresql/defaults/main.yaml b/roles/postgresql/defaults/main.yaml index 21ccd52d..a3ea9927 100644 --- a/roles/postgresql/defaults/main.yaml +++ b/roles/postgresql/defaults/main.yaml @@ -31,7 +31,7 @@ postgresql_databases: - name: keycloak user: keycloak # Inference add-ons, created only when enabled. Foreign vars (canonical owner: - # enterprise-inference config.inference.yaml): auth_type, litellm_enabled, + # inference-toolkit config.inference.yaml): auth_type, litellm_enabled, # langfuse_enabled. Keep in step with the litellm/langfuse gates in its components.yaml. - name: litellm user: litellm diff --git a/src/plugin/headlamp/src/AccessDialog.tsx b/src/plugin/headlamp/src/AccessDialog.tsx index 6ef87978..d5dfb81b 100644 --- a/src/plugin/headlamp/src/AccessDialog.tsx +++ b/src/plugin/headlamp/src/AccessDialog.tsx @@ -114,7 +114,7 @@ export function AccessDialog(props: { 1. Get a token (valid 15 minutes), in the solutions checkout: diff --git a/src/tests/unit/test_backup_layer.py b/src/tests/unit/test_backup_layer.py index 939ba10b..f6cb7101 100644 --- a/src/tests/unit/test_backup_layer.py +++ b/src/tests/unit/test_backup_layer.py @@ -20,14 +20,14 @@ LAYERS = ["infrastructure", "platform", "inference", "erag"] LAYER_DIRS = { - "inference": "/repo/ext/enterprise.ai-inference", - "erag": "/repo/ext/enterprise.ai-erag/deployment", + "inference": "/repo/ext/inference-toolkit", + "erag": "/repo/ext/chatbot-toolkit/deployment", } def test_profile_sits_beside_the_layers_components_yaml(): - assert backup_profile_path("erag", LAYER_DIRS) == "/repo/ext/enterprise.ai-erag/deployment/backup_profile.yaml" - assert backup_profile_path("inference", LAYER_DIRS) == "/repo/ext/enterprise.ai-inference/backup_profile.yaml" + assert backup_profile_path("erag", LAYER_DIRS) == "/repo/ext/chatbot-toolkit/deployment/backup_profile.yaml" + assert backup_profile_path("inference", LAYER_DIRS) == "/repo/ext/inference-toolkit/backup_profile.yaml" @pytest.mark.parametrize("layer", ["platform", "infrastructure", "nosuch"]) diff --git a/src/tests/unit/test_env_var_names.py b/src/tests/unit/test_env_var_names.py index ec021ea4..ce525a3b 100644 --- a/src/tests/unit/test_env_var_names.py +++ b/src/tests/unit/test_env_var_names.py @@ -37,7 +37,7 @@ def test_new_log_level_name_wins(): def repo(tmp_path): """A repo root with model-manager, two envs and a stub that prints what it got.""" shutil.copy(ROOT / "model-manager", tmp_path / "model-manager") - stub = tmp_path / "ext/enterprise.ai-inference/model_manager/model-manager" + stub = tmp_path / "ext/inference-toolkit/model_manager/model-manager" stub.parent.mkdir(parents=True) stub.write_text('#!/bin/bash\necho "$TKM_ENV $ES_ENV $MM_GLOBAL_CONFIG"\n') stub.chmod(0o755) diff --git a/src/tests/unit/test_legacy_ext_dirs.py b/src/tests/unit/test_legacy_ext_dirs.py new file mode 100644 index 00000000..13df3d9d --- /dev/null +++ b/src/tests/unit/test_legacy_ext_dirs.py @@ -0,0 +1,32 @@ +# Copyright (C) 2026 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +# A pre-2.0 ext/ clone left beside the renamed one must stop every action, not load twice. + +import pathlib +import subprocess + +import pytest + +ROOT = pathlib.Path(__file__).resolve().parents[3] + + +def ensure_repos(ext_dir): + script = f'source "{ROOT}/toolkit_manager.sh"; EXT_DIR="{ext_dir}"; ENV_NAME=nosuchenv; ensure_repos; echo DONE' + return subprocess.run(["bash", "-c", script], capture_output=True, text=True, check=False) + + +@pytest.mark.parametrize("old", ["enterprise.ai-inference", "enterprise.ai-erag", "enterprise.agent-toolkit"]) +def test_legacy_clone_fails_fast(tmp_path, old): + (tmp_path / old).mkdir() + (tmp_path / "inference-toolkit").mkdir() + r = ensure_repos(tmp_path) + assert r.returncode == 1 and "DONE" not in r.stdout + assert f"Delete ext/{old}" in r.stderr + + +def test_renamed_clones_pass(tmp_path): + for new in ("inference-toolkit", "chatbot-toolkit", "agent-toolkit"): + (tmp_path / new).mkdir() + r = ensure_repos(tmp_path) + assert r.returncode == 0 and "DONE" in r.stdout, r.stderr diff --git a/toolkit_manager.sh b/toolkit_manager.sh index 6df7803f..d767945a 100755 --- a/toolkit_manager.sh +++ b/toolkit_manager.sh @@ -811,7 +811,12 @@ report_config_delta() { # target that owns a manifest, a warning otherwise. ensure_repos() { local target="${1:-}" mode="${2:-}" - local roles="${SCRIPT_DIR}/roles" + local roles="${SCRIPT_DIR}/roles" old + # Pre-2.0 ext/ names: a clone left there loads beside the new one and its roles shadow the new roles. + for old in enterprise.ai-inference enterprise.ai-erag enterprise.agent-toolkit; do + [[ -d "${EXT_DIR}/${old}" ]] \ + && err "ext/${old} is a pre-2.0 clone; its toolkit now lives under a new ext/ name. Delete ext/${old} (keep anything unpushed first), then re-run: ${INSTALLER_CMD} init " + done command -v yq &>/dev/null || { export ANSIBLE_ROLES_PATH="$roles"; return 0; } local layer_name url dest rev subdir _cfgdir _flav _catalog repo roles_dir