nx_llm_route_gate.nx
buildroot/runtime/nx_llm_route_gate.nx
about
nx_llm_route_gate.nx -- the REFEREE for companionchat CC6 (go_llm_route in nx_llm_route.nx): a route row selects a backend
by trigger, first row wins, case-insensitive, `*` is a default; no conf / no match / malformed target = NO ROUTE; the
prepend puts the routed backend first without losing the local candidates; the provenance label names what answered.
GPU-free, in-process, fixture confs under /tmp/<gate>/ written at run time (never a checked-in fixture).
license_tier: ORIGINAL expect_exit: 0
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.nxnx_llm_route.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 10 | const LG_DIR: *u8 = "/tmp/nx_llm_route_gate" as *u8 |
| 11 | const LG_CONF: *u8 = "/tmp/nx_llm_route_gate/routes.conf" as *u8 |
| 12 | const LG_CONF_DEFAULT: *u8 = "/tmp/nx_llm_route_gate/routes_default.conf" as *u8 |
| 13 | const LG_CONF_BAD: *u8 = "/tmp/nx_llm_route_gate/routes_bad.conf" as *u8 |
| 14 | const LG_CONF_ABSENT: *u8 = "/tmp/nx_llm_route_gate/does_not_exist.conf" as *u8 |
| 15 | const LG_MODE_DIR: i64 = 511 |
| 16 | const LG_MODE_FILE: i64 = 420 |
| 17 | const LG_ROWS: *u8 = "# fixture routes\ndeep|think hard|10.9.8.7|5000\nfast|quick|10.9.8.6|5001\n" as *u8 |
| 18 | const LG_ROWS_DEFAULT: *u8 = "every|*|10.9.8.5|5002\n" as *u8 |
| 19 | const LG_ROWS_BAD: *u8 = "broken|think hard|10.9.8.999|5000\n" as *u8 |
functions
| 21 | func lg_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 22 | func lg_eq(a: *u8, b: *u8) -> i64 { var i: i64 = 0; while a[i] == b[i] { if a[i] == (0 as u8) { return 1 } i = i + 1 } return 0 } called by 1: main |
| 23 | func lg_write(path: *u8, body: *u8) -> i64 |
| 31 | func main() -> i64 |