D. Gateway effective limits + Codex output-token semantics #136
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
P1
P2
P3
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Creatidy/scarcity-router#136
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Child D of #132. Fix the product problem where a normal supported model is unusable because an invisible generic ceiling sits far below evidenced capability — without removing safeguards. Covers program workstreams "gateway/effective limits" and "Codex output-token semantics" (#132 items 3 and 6).
Scope (frozen)
effective = intersection(model hard capability, execution-channel capability, administrator ceiling). Administrator ceilings stay authoritative and bounded; no client request may increase any limit; enforcement stays rejection-based (never silent clipping).max_output_tokens16384 cripples 128k-output models;max_input_context_tokens131072 and the 1 MiB body cap strangle real agent conversations; 300 s execution time is tight for max-effort reasoning turns. New defaults must not silently cripple evidenced capability without the operator knowingly choosing that policy — and the operator must be able to SEE the effective numbers.hard_properties.output_tokens); a smaller requested limit must fail closed (output_limit_unenforceable-class typed error) rather than be silently ignored; UNKNOWN hard max means no normalization. Arbitrarygeneration_paramsstay fail-closed.x_scarcity_routermodel metadata (child B). Configuration export represents non-default limits honestly; changes validated before persistence.Tests
Default supported-model request accepted; explicit lower administrator ceiling enforced; large-but-bounded request accepted; over-limit rejection unchanged; channel capability < model capability → effective value enforced and advertised; non-binding normalization above proven hard max (normalized + audited); binding-below-hard-max rejected closed; UNKNOWN hard max never normalized; body/limit boundary tests; export honesty.
Non-goals
No limits removed; no unbounded values; no tool-call work (child E); no admin UI redesign (child H consumes this).
Complexity boundary
gateway_contracts.py,gateway_coordinator.py,execution_sources.py/resource_state.py(capability plumbing),worker_codex_adapter.py(output-limit semantics only), defaults + config validation; evidence notes in the Codex evidence doc; ~3–5 test files. Budget: 120 min wall clock. Reuses child E's App-Server inspection where it covers output limits.Acceptance
Full gate green; child-A output-limit pin flipped to the new contract; representative request passes the limits gate; PR open for human review; not merged.
Additive scope note (D-056, PR #147 — frozen scope text above unchanged):
D-056 pt 6 names this child as the implementer of the effective-capability intersection's limits dimensions and assigns it one question the frozen scope above does not yet cover:
effective(route) = model hard capability ∩ execution-source/channel capability ∩ administrator allowanceis a per-route fact, and admission stays route-specific — but multiple routes serving the SAME logical model may have different effective context or output ceilings. This child must settle how those per-route facts are represented honestly at model-discovery level (GET /v1/models/x_scarcity_routermetadata, consumed by child H), without: advertising the strongest route's ceiling as if every route supports it; unnecessarily constraining a request that a stronger route could satisfy (aggregating to the weakest route is not automatically correct); or converting UNKNOWN evidence into a known value (UNKNOWN →nullin metadata, fail-closed in admission — D-055'seffective_context_limit_tokensis the precedent).Authoritative text: D-056 pt 6 in
docs/decisions.md; "Effective capability (D-056; architecture for #136)" indocs/execution-surface.mdanddocs/architecture.md.