Metadata-Version: 2.5
Name: qig-routing
Version: 0.1.0
Summary: QIG Routing — Fisher-Rao model dispatch for LLM routing: capability simplex manifolds, P30 exp-free proximity dispatch, P28 geodesic cache, and iterative simplex refinement. Canon 2.60F, single-sourced on qig-core.
Project-URL: Homepage, https://github.com/Arcane-Fly/qig-routing
Author-email: Braden Lang <braden.lang77@gmail.com>
License: MIT
Keywords: born-chart,fisher-rao,llm-routing,model-dispatch,qig,routing,simplex
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.11
Requires-Dist: numpy>=1.24
Requires-Dist: qig-core>=2.24.0
Provides-Extra: dev
Requires-Dist: pytest>=7; extra == 'dev'
Requires-Dist: ruff>=0.4; extra == 'dev'
Description-Content-Type: text/markdown

# qig-routing

Canonical Fisher-Rao model dispatch and iterative simplex refinement for QIG LLM routing (`Canon 2.60F`).

Extracted from `monkey1` (`qig_heart/routing_kernel.py`) and `monkey-coder` (`quantum/trm_router.py`), unified onto `qig-core >= 2.24.0`:
- **Single-source geometry (`P1`, `P2`, `P31`)**: All simplex projections, Fisher-Rao distances, Fréchet means, SLERP interpolations, and rational proximity weights are imported from `qig_core` (zero hand-rolled NumPy geometry).
- **Zero exponential / Boltzmann warping (`P30`, `P33`)**: Replaces legacy `exp(-(d - d_min)/T)` softmin routing with pedestal-subtracted rational proximity weighting (`distance_to_simplex_weights`).
- **Canonical Φ regime gating & Fail-Closed safety (`P15`, `P18`)**: Uses canonical `PHI_LINEAR_MAX` (`0.45`), `PHI_THRESHOLD` (`0.70`), and `PHI_BREAKDOWN_MIN` (`0.80`) from `qig_core.constants.frozen_facts`; `topological_instability` fails closed to deterministic conservative routing.
- **Iterative Simplex Refinement (`SimplexRefinementRouter`)**: Pure Fisher-Rao geodesic pull (`step_pull < 1`, `P32` Lyapunov contraction) with adaptive geodesic halting (`d_FR <= halt_d_fr_rad`).
