feat(plugin): serving_provenance on openai.exchange.v1 terminal event (stacked on #1437) - #1
Open
StevenMih wants to merge 2 commits into
Open
feat(plugin): serving_provenance on openai.exchange.v1 terminal event (stacked on #1437)#1StevenMih wants to merge 2 commits into
StevenMih wants to merge 2 commits into
Conversation
Surface the maximum inference provenance the host actually knows at serve time onto the raw-proxy path's terminal event: what ran (model identity hash, canonical ref, revision), at what fidelity (quantization, architecture, context length, parameter size, layer count), on whose hardware (gpu, vram_bytes, is_soc, hostname), served by which node. All values are read from state the local mesh::Node already holds -- the served-model descriptor (ServedModelMetadata / ServedModelIdentity) and the node's startup hardware survey. Every field is a real value or omitted (serde skip_serializing_if); nothing the host does not know is fabricated. No raw prompt/response text is carried -- provenance only. Stacked on the Mesh-LLM#1331 lifecycle-hooks terminal-broadcast wiring (Mesh-LLM#1437 must land first). One new ServingProvenance struct wired onto the existing OpenAiExchangeEnvelope via a with_serving_provenance builder, plus a small publish_raw_proxy_terminal helper at the ingress callsite -- no refactor. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: stevenmih <stevenmih88@gmail.com>
…esh-LLM#1437) Signed-off-by: Steven Mih <stevenmih88@gmail.com>
Owner
Author
|
Pushed a Verified locally (fork CI can't show the Linux/Quality lanes — private Docker image; see Mesh-LLM#1437): head
|
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.
What
Surface the maximum inference provenance the host actually knows at serve time onto the
openai.exchange.v1terminal event — the stranger-promise / proof-of-inference metadata a downstream capsule attests over (advances Mesh-LLM#1233's digest advertisement): what ran, at what fidelity, on whose hardware, served by which node.One new
ServingProvenancestruct, attached to the existingOpenAiExchangeEnvelopevia awith_serving_provenancebuilder, populated at the raw-proxy dispatch callsite (network/openai/ingress.rs) from state the localmesh::Nodealready holds:ServedModelMetadata):quantization,architecture,context_length,parameter_size,layer_count.ServedModelIdentity):model_identity_hash(a digest of the model identity, not a hash of the name string),model_canonical_ref,model_revision.gpu,vram_bytes,is_soc,hostname.served_by_node_id(real serving iroh node id).Honesty contract
Every field is
Option+skip_serializing_if: a fact the host genuinely does not know is omitted, never fabricated. On a synthetic plugin-served endpoint with no loaded GGUF, hardware fields populate (host-wide survey) while model-fidelity fields are correctly absent. No raw prompt/response text — provenance only.Stacking
Stacked on Mesh-LLM#1437 (
mesh1331-lifecycle-hooks) — must land first; this PR targets that branch as its base. Clean addition: one struct + a builder + a smallpublish_raw_proxy_terminalhelper, no refactor.Tests
cargo build/test/clippygreen onmesh-llm-host-runtime. New unit tests cover envelope carries-provenance / omits-unknown / effective-has-none. Proven end-to-end against a realmesh-llm serveon macOS (realgpu: Apple M4 Max, vram, soc, hostname, node id), captured into a signed capsule thatagent-action-capsule verify --storeaccepts.🤖 Generated with Claude Code