Skip to content

feat(combo): publish safe metadata and enforce portable context - #2656

Open
zierocode wants to merge 8 commits into
decolua:masterfrom
zierocode:codex/combo-safe-model-metadata
Open

feat(combo): publish safe metadata and enforce portable context#2656
zierocode wants to merge 8 commits into
decolua:masterfrom
zierocode:codex/combo-safe-model-metadata

Conversation

@zierocode

@zierocode zierocode commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Problem

Logical fallback Combos need one portable context contract even when members have different context windows. Public metadata must stay conservative, and oversized requests should not be dispatched to a known undersized fallback member.

Closes the context-routing requirement in #1089.

Implementation

  • recursively resolves nested Combo members to physical leaves
  • intersects boolean capabilities and takes the minimum verified token limits
  • omits aggregate metadata for cycles, missing leaves, or unknown values
  • keeps members and representative physical models out of the public response
  • canonicalizes public model ordering for stable response bytes
  • returns a strong ETag over public state plus an HMAC-backed private-membership revision
  • honors exact, list, weak, and wildcard If-None-Match validators with an empty 304
  • estimates input + requested output + buffer before Combo dispatch
  • preserves route order while skipping members whose known context window is too small
  • returns typed combo_context_window_exceeded without provider dispatch when every known member is undersized

The runtime check is defense in depth, not exact tokenizer proof. Clients should size and compact against the logical Combo's advertised minimum context window.

Upstream relationship

Verification

  • Combo metadata, context preflight, routing, and fusion: 4 files, 32 tests passed
  • production build: npm run build passed
  • RED proof: the 5 new context tests failed before implementation and pass after it

Base: 79918c7830695bbca4a45c9fea4a42c3e9fd73d1 (v0.5.40)
Head: 80181614

@zierocode zierocode changed the title test(models): define safe logical Combo metadata contract feat(models): project safe logical Combo metadata Jul 23, 2026
@zierocode
zierocode marked this pull request as ready for review July 23, 2026 02:20
@zierocode zierocode changed the title feat(models): project safe logical Combo metadata feat(combo): publish safe metadata and enforce portable context Jul 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant