Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON for your Agentic workflows.
Python ai4sciencedocument-analysisdocxextract-datalayout-analysisocrparserpdfpdf-converterpdf-extractor-llmpdf-extractor-pretrainpdf-extractor-ragpdf-parserpptxpythonxlsx
docs: derive tier ranks from ordered tiers
jinzhenjff2eb50ebaf3
diff --git a/docs/plans/2026-07-21-central-tier-types-design.md b/docs/plans/2026-07-21-central-tier-types-design.mdindex f3573927..9a632199 100644--- a/docs/plans/2026-07-21-central-tier-types-design.md+++ b/docs/plans/2026-07-21-central-tier-types-design.md@@ -14,6 +14,7 @@ Keep the existing `Tier`, `ServerTier`, and `ManagedServerTier` types in `mineru- `MANAGED_SERVER_TIERS: tuple[ManagedServerTier, ...] = ("basic", "standard")`- `MODEL_TIERS: tuple[ModelTier, ...] = ("basic", "standard")`- `TIERS: tuple[Tier, ...] = ("flash", "basic", "standard", "advanced")`+- `TIER_ORDER: dict[Tier, int] = {tier: index for index, tier in enumerate(TIERS)}`- `TIERS_BY_SERVER_TIER: dict[ServerTier, tuple[Tier, ...]]`The request-tier mapping remains:@@ -22,7 +23,7 @@ The request-tier mapping remains:- Basic server: Flash and Basic requests;- Standard server: Flash, Basic, Standard, and Advanced requests.-Definitions remain explicit rather than deriving tuples dynamically from `Literal` annotations. This preserves precise static types and keeps allowed values visible to source analysis.+Tuple definitions remain explicit rather than being derived dynamically from `Literal` annotations. `TIER_ORDER` is a convenience rank index derived from the canonical `TIERS` tuple, avoiding a second manually maintained tier ordering while preserving readable comparisons, sorting, and tolerant `.get(..., -1)` lookups.## Migration@@ -40,7 +41,7 @@ No compatibility aliases or old-module re-exports remain. This is an internal soTests and static checks verify:-1. All five canonical constants have the expected ordered values and mapping.+1. All five canonical constants have the expected ordered values and mapping, and `TIER_ORDER` matches the indices of `TIERS`.2. API-server startup validation and request-tier expansion are unchanged.3. Managed-server configuration accepts only Basic and Standard.4. Model commands and model-repository selection still accept only Basic and Standard.