agentleFS
NVIDIAKnown publisherNVIDIA/Personal-AI-Router/.cursor/rules/proxy-inference-routing.mdc

Personal-AI-Router / rules

Cursor rule1.5k starsChanged 2 months agoApache-2.0View on GitHub

Backend-owned proxy routing and inference logging rules

Trending

Quiet since September.thin dataabout the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 10 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the NVIDIA/Personal-AI-Router repository that our weekly crawl found: only 10 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

Who's talking about NVIDIA/Personal-AI-Router

The biggest 5 of 10 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 10

Talked about on GitHub, Hacker News and Bluesky (10 times).

On GitHub · 6

1 more on GitHub

On Hacker News · 2

The file

We split this proxy-inference-routing.mdc into the rules it gives an agent

9 rules. About 0 are common, 7 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Keep proxies in automatic routing mode.

    line 57
  2. Distinctive:

    Treat model Load as an engine model action, never a route selection.

    line 58
  3. Very specific:

    Do not call node/select.

    line 62
  4. Distinctive:

    Do not implement a TypeScript scheduler or load balancer.

    line 63
  5. Distinctive:

    Do not derive routing decisions from renderer telemetry.

    line 64
  6. Distinctive:

    Do not emit a separate proxy-node-switch log.

    line 65
  7. Distinctive:

    Do not treat GPU pressure as GPU capability, VRAM capacity, or device affinity.

    line 66
  8. Distinctive:

    Do not mirror scheduler smoothing or proxy load/reservation accounting in TypeScript.

    line 67
  9. Very specific:

    Use getErrorString or the relevant normalized backend error helper instead of serializing raw errors.

    line 85

≈ “Common” is an estimate: at least 1 in 5 of the 3,030 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
proxy-inference-routing.mdc
---
description: Backend-owned proxy routing and inference logging rules
alwaysApply: true
---
<!--
SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: Apache-2.0
-->

# Proxy and Inference Routing

Routing is owned by `nvpair-proxy` (one process hosting a facade per engine,
addressed by clients as `ollama-proxy:` / `lmstudio-proxy:`),
`nvpair-job-scheduler`, and `nvpair-ui-broker`.

For model-bearing inference, each facade first filters a request-local discovery
snapshot to nodes whose per-engine inventory advertises the requested model.
Empty and non-matching inventories are ineligible; an empty owner set returns a
local `502` without contacting an engine. Ollama normalizes the implicit
`:latest` tag; LM Studio IDs match exactly.

Within that eligible owner set, proxy target precedence is:

1. explicit manual selection;
2. the scheduler priority list;
3. deterministic proxy default ordering.

An ineligible manual selection cannot override the capability gate. Retryable
failover, including an upstream model `404` caused by stale positive inventory,
continues only through other advertised owners and never broadens to excluded
nodes.

The scanner and manual-node worker feed compact maximum-GPU telemetry into the
broker's source-aware cache; scanner observations take precedence. The broker
ages and relays this feed to `nvpair-job-scheduler`.

The scheduler smooths fresh utilization into pressure 0–3, treats invalid,
missing, or older-than-10-second telemetry as neutral pressure 1, and ranks by
`pending + gpuPressure`, then pressure, then stable UUID. It emits
`schedule:priority` snapshots containing order, pending counts, and pressure.
Each facade chooses with `pending + gpuPressure + localReservations`, so
concurrent bursts do not wait for workload feedback.

Those reservations are **process-wide, shared by every facade**. Two facades
bursting at once compete for the same node's GPU, so a dispatch through either
must be visible to the other; this is the reason the engines share one process.
A reservation is stamped with the snapshot generation it was counted against,
released when its request ends, and moved to the node a failover actually
lands on. A snapshot supersedes the reservations taken before it, so a release
arriving after one is ignored rather than double-counted.

## PAIR responsibilities

- Register and pass the scheduler path through the canonical modular binary
  inventory.
- Consume proxy readiness, node presence, workload, and error effects.
- Keep proxies in automatic routing mode.
- Treat model **Load** as an engine model action, never a route selection.

## Prohibited PAIR behavior

- Do not call `node/select`.
- Do not implement a TypeScript scheduler or load balancer.
- Do not derive routing decisions from renderer telemetry.
- Do not emit a separate proxy-node-switch log.
- Do not treat GPU pressure as GPU capability, VRAM capacity, or device affinity.
- Do not mirror scheduler smoothing or proxy load/reservation accounting in
  TypeScript.

The GPU chart's `inferenceHardwareIds` filter is display-only.

## Inference logging

Never log:

- prompts or chat messages;
- request bodies;
- stream chunks;
- full inference responses;
- credentials or pairing data.

Log only operational metadata such as engine, model, job ID, node ID, path,
stream flag, and normalized error text.

Use `getErrorString` or the relevant normalized backend error helper instead of
serializing raw errors. Keep high-frequency request and routing details below
the default info level.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.