Repository navigation
Conversation
Add immutable backend descriptors and explicit source-consistent selection without loading models or changing existing runtime paths. Reserve U2 identifiers as planned and unavailable. Implementation generated by the native Paperclip Modality Integration worker; operator corrected lint/formatting and created this commit after worker Git staging was denied. Independent native review follows. Co-Authored-By: Paperclip <noreply@paperclip.ing>
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the backend metadata contract changes.
No open issues 🎉
What changed in this PR
Adds a dependency-free backend metadata contract so callers can discover existing execution paths and validate selectors and capabilities before model construction. Runtime routing remains unchanged, and U2 backends are explicitly planned and unavailable.
Changes:
- Introduces immutable backend descriptors and stable discovery and resolution APIs.
- Validates selector conflicts, contract versions, and capability requests without loading models.
- Adds contract tests and documentation covering compatibility and side-effect-free metadata operations.
| File | Description |
|---|---|
tests/test_backend_contract.py |
Tests discovery, immutability, validation, legacy selection, and side-effect isolation. |
src/backends/contracts.py |
Defines immutable descriptors and capability normalization. |
src/backends/capabilities.py |
Implements the registry, discovery, and metadata-only resolution. |
src/backends/__init__.py |
Exports the public backend metadata API. |
docs/api/model.md |
Documents version 1 capabilities, selection rules, and execution boundaries. |
Review effort: Balanced
This was referenced Nov 4, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add dependency-free discovery and resolution metadata for PRISM's existing local and Hugging Face causal paths. Callers can enumerate backend names, inspect immutable descriptors and reject conflicting selectors or unsupported capabilities before model construction.
u2_referenceandu2_nativeare explicitly planned and unavailable. This is the first metadata slice of the optional-backend roadmap; it does not load InternLumina-U2, add diffusion execution or wire the resolver into model construction or training.Proposal: Sande33p#1
Type of Change
Compatibility
src.*import paths — addssrc.backends; existing imports remain intact.No migration is required. Default metadata resolution follows existing
llm_backbone_idtruthiness. Legacyhf_model_idremains an initialization field. Existing CLI, Hydra, ModelConfig, checkpoints, launchers and runtime selection are unchanged.How Has This Been Tested?
At commit
a7c7552a9c626a0170b98ed381e15757a1e111d7:python -B -Sfrom an empty temporary directory and rejects optional-model imports, asset reads, writes, process launches and network activity while exercising metadata operations.New Dependencies, Data, or Assets
None.
Checklist
AI/LLM Assistance
The native Paperclip Modality Integration worker generated the implementation and CPU tests. Its Git staging operation was denied by the sandbox and its run timed out. The operator preserved the work, corrected lint/formatting, reran validation and created the commit. This is an operator-assisted contribution; the author run is not represented as successful or autonomous. Native Evaluation independently approved this exact commit after reviewing a clean Git archive and rerunning the focused checks. It does not substitute for accountable human review.
Additional Context
Plan and operating boundaries: https://github.com/Sande33p/PRISMAgents/pull/4
The advertised capabilities are conservative: local
causal_forward; HFcausal_forwardandautoregressive_generate. No diffusion, modality, training, structured-decoder, quality or XPU capability is asserted. The existing localgenerate()placeholder is deliberately not advertised.