[Feature]: External / heterogeneous scheduling hooks and richer placement signals
維護者通常 5 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 5/5
- 預估耗時
- 一週以上
- 新手友好度
- 25/100
- Issue 類型
- 功能
- 描述清晰度
- 需要釐清
- 活躍度
- 活躍
- 技術堆疊
- go
研究方向
該 issue 未指出實作檔案或進入點;首先定位 routing 和 scheduling 程式碼以及現有的 integration tests。在進行任何變更之前,將提案拆分為範圍明確的能力。完成要求包括保留 native fallback 行為、隔離並行 request hints、強制執行 trust 和 eligibility 檢查,並透過列出的 heterogeneous-cluster scenarios 驗證 placement 和 telemetry。
由索引模型根據 Issue 內容生成。
描述
Area
Routing and scheduling
User problem
PAIR provides a strong transport, discovery, and inference data plane for distributed local inference, but heterogeneous clusters need richer placement signals than model ownership, queue depth, and coarse GPU utilization alone.
Today, an external scheduler cannot safely influence placement for one request without changing a persistent or proxy-wide pin, which can introduce races under concurrent traffic. Nodes that own the same model can also have very different practical runtime envelopes: characterized context limits, memory requirements, full-GPU versus CPU/offload behavior, model-load time, prompt/generation throughput, and reliability.
Requests themselves vary substantially in cost based on prompt length, requested context, expected output, model size, and modality. PAIR also has useful model-state visibility, but warm-model affinity and host-wide pressure from other compute workloads are not fully represented in routing decisions. Finally, operators need explainable placement metadata without exposing prompt content.
Desired outcome
PAIR should optionally support the following while preserving its native distributed scheduler as the self-contained default and fallback:
- Request-scoped placement hints such as a preferred node or ranked candidate list. PAIR would continue to enforce model ownership, availability, trust, and normal safety checks.
- Per-model/per-node runtime profiles learned empirically, including characterized context sizes, VRAM/RAM requirements, GPU/offload behavior, load time, prompt TPS, generation TPS, and stability history.
- Weighted request-cost estimation using inputs such as prompt tokens, requested context, expected output length, model size, modality, and historical model/node cost.
- Warm-model affinity when a suitable model is already resident and resource pressure does not favor another node.
- An optional external placement-authority hook, with automatic fallback to PAIR's native scheduler if that authority is unavailable.
- Host-wide admission signals so external GPU/CPU/memory pressure can influence placement without PAIR needing to manage those workloads.
- Explainable routing telemetry showing candidates, exclusions, selected node, selection reason, and failovers, without logging prompt content.
- Optional telemetry hardening under the same cluster trust/mTLS model used by other PAIR services.
The observable result would be safer and more predictable scheduling across heterogeneous nodes, lower model load/unload churn and tail latency, and easier integration with higher-level orchestration systems while PAIR remains the inference transport and failover layer.
Guidottavio D’Assisti
[email protected]
Alternatives considered
- Continue using PAIR's native scheduler based primarily on queued/running workload and GPU pressure. This remains a valuable default and fallback, but it cannot distinguish requests or model/node combinations with radically different practical costs.
- Use the existing manual node pin. A persistent or proxy-wide pin is not sufficient for concurrent, per-request placement and may create global-state races.
- Route directly to inference engines from an external orchestrator. This would duplicate PAIR's model eligibility, discovery, mTLS transport, streaming, and failover responsibilities.
- Infer capacity only from hardware specifications. Empirically learned runtime envelopes are more representative of real behavior across models, contexts, backends, and offload modes.
Compatibility and security implications
All proposed capabilities should be optional and backward-compatible. Requests without placement hints should retain current routing behavior, and an unavailable external authority should fall back to PAIR's native scheduler.
Placement hints must remain advisory to PAIR's eligibility, availability, and trust checks; they must not bypass model ownership, pairing, mTLS, or failover safety. Unknown or unauthorized node identifiers should be rejected or ignored according to a documented policy.
Routing telemetry should exclude prompt and response content and avoid exposing unnecessary host details. If telemetry protection is extended, existing trusted-local deployments should have a documented migration path. API extensions should use optional headers or namespaced fields so existing OpenAI- and Ollama-compatible clients continue to work unchanged.
Validation approach
Maintainers could validate the outcome with automated integration tests covering:
- a request-scoped preferred node being selected only when it is reachable, trusted, and owns the requested model;
- deterministic fallback when the preferred node or external authority is unavailable;
- concurrent requests carrying different placement hints without cross-request interference;
- ranking changes driven by distinct model/node runtime profiles, weighted request costs, and warm-model state;
- host-wide admission signals excluding a pressured node and recovering when pressure clears;
- OpenAI- and Ollama-compatible requests without new hints preserving existing behavior;
- routing telemetry explaining candidates, exclusions, selection, and failovers while containing no prompt/response content;
- unauthorized or malformed hints failing safely and telemetry endpoints enforcing the configured trust model.
A small heterogeneous test matrix with the same model available on differently characterized nodes could verify improved placement and reduced cold-load churn compared with the current scheduler.
Confirmations
- I searched existing issues for duplicates.
- I agree to follow the Code of Conduct.
- 主要語言
- Go
- 星號
- 1.6k
- 分支
- 266
- 平均合併
- 3 天 15 小時
- 30 天內合併 PR
- 23
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
NVIDIA/Personal-AI-Router 的其他 Issue
-
enhancement
難度 4/5 一週以上 新手友好度 12/100
NVIDIA/Personal-AI-Router#162 ·
維護者通常 5 天內回覆
-
enhancement
難度 4/5 3-5 天 新手友好度 25/100
NVIDIA/Personal-AI-Router#154 · 1 則留言 ·
維護者通常 5 天內回覆
-
[Feature]: [Ollama] Alert the user about model pull failures可能已有人在做 @ckelseynv 於 2 天前認領。 未關閉enhancement
難度 3/5 1-2 天 新手友好度 56/100
NVIDIA/Personal-AI-Router#152 · 1 則留言 · 已指派 1 人 ·
維護者通常 5 天內回覆
-
[Bug]: /v1/responses bypasses model-owner filtering in the Ollama proxy可能已有人在做 @ilaigold 於 3 天前認領。 未關閉
難度 3/5 半天 新手友好度 84/100
NVIDIA/Personal-AI-Router#146 ·
維護者通常 5 天內回覆
-
Make model download cancellation asynchronous可能已有人在做 @ckelseynv 於 18 天前認領。 未關閉enhancement
NVIDIA/Personal-AI-Router#115 · 已指派 1 人 ·
維護者通常 5 天內回覆
查看 NVIDIA/Personal-AI-Router 的全部 Issue
相似的 Issue
-
raised-by:reviewer
難度 1/5 1-3 小時 新手友好度 84/100
medici-finance/assay#2681 ·
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 82/100
homarr-labs/dashboard-icons#2939 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 66/100
AvengeMedia/DankMaterialShell#3761 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 77/100
維護者通常 1 天內回覆
-
docs: clarify replacement for outdated Terms of Service URL in readme.md可能已有人在做 @mohitjoshi-hey 今天認領。 未關閉
難度 1/5 1-3 小時 新手友好度 66/100