pub struct NodeConfig {Show 38 fields
pub node_id: String,
pub endpoint: String,
pub intent: String,
pub model: Option<String>,
pub backend: Option<String>,
pub region: Option<String>,
pub capabilities: Vec<String>,
pub directory_url: String,
pub timeout_ms: u64,
pub max_concurrent: usize,
pub tokens_per_min: u32,
pub max_tokens: u32,
pub transport_endpoint: Option<String>,
pub transport_method: Option<String>,
pub nat_type: Option<String>,
pub transport_metadata: Option<Value>,
pub exposure_mode: Option<String>,
pub cip_policy: Option<Arc<CooperativeInferencePolicy>>,
pub pricing: Option<PricingConfig>,
pub node_hmac_key: String,
pub availability_windows: Vec<Window>,
pub enable_idempotency: bool,
pub enable_mesh: bool,
pub relay_capable: bool,
pub relay_accept_port: u16,
pub relay_worker_endpoint: Option<String>,
pub relay_bind_ticket_public_key_hex: Option<String>,
pub relay_require_bind_ticket: bool,
pub log_dir: Option<PathBuf>,
pub operator_delegation: Option<Value>,
pub operator_display_name: Option<String>,
pub operator_created_at: Option<String>,
pub operator_integrity_hash: Option<String>,
pub policy_manifest: Option<Value>,
pub backend_url: Option<String>,
pub backend_api_key: Option<String>,
pub excluded_models: Vec<String>,
pub supported_receipt_profiles: Vec<String>,
}Expand description
Configuration for an IICP provider node.
Fields§
§node_id: String§endpoint: String§intent: String§model: Option<String>§backend: Option<String>Detected backend server flavor advertised at register (node-detail field):
ollama / lmstudio / vllm / llamacpp / anthropic / custom.
region: Option<String>§capabilities: Vec<String>§directory_url: String§timeout_ms: u64§max_concurrent: usizeMaximum concurrent tasks; excess requests receive 429 IICP-E021.
tokens_per_min: u32Tokens-per-minute capacity declared to directory (limits.tokens_per_min).
max_tokens: u32Per-request token cap declared on the capability object (capabilities[].max_tokens).
transport_endpoint: Option<String>Optional native IICP binary endpoint (spec/iicp-dir.md v0.7.0).
Scheme MUST be iicp:// (plaintext) or iicpsec:// (TLS).
Default IICP port is 9484 (ADR-040). When set, the directory persists it
and clients SHOULD prefer it over endpoint for task CALLs.
transport_method: Option<String>#331 Phase A.1 / ADR-041 — NAT-traversal observability fields surfaced
to the directory in the register payload. Populated by
IicpNode::apply_nat_profile when an operator runs detect_nat at
startup, OR set manually if the operator already knows their topology.
transport_method is one of direct / upnp_mapped / stun_hole_punch
/ turn_relay / external_tunnel / unknown.
nat_type: Option<String>One of full_cone / restricted_cone / port_restricted / symmetric
/ unknown (observability only).
transport_metadata: Option<Value>Forward-compat slot for ADR-041 transport_candidates[] + relay_endpoint.
exposure_mode: Option<String>ADR-043 §9 — 8-category exposure_mode, computed by qualify_service and set
in apply_nat_profile. Surfaced to the directory nodes.exposure_mode column (#344).
cip_policy: Option<Arc<CooperativeInferencePolicy>>S.12 §2.1 CIP policy block surfaced to the directory register payload.
When None, register() falls back to the module-level
crate::cip_policy::get_cip_policy — operators can configure once
and have it apply to all nodes that don’t override.
pricing: Option<PricingConfig>ADR-019 declarative pricing block. When None, the SDK does not
advertise pricing and the directory defaults to a 1.0 multiplier.
node_hmac_key: StringOperator-provisioned HMAC key for ADR-019 pricing signatures. When empty, the SDK captures the directory-issued key from the register response and uses it for subsequent signing.
availability_windows: Vec<Window>Phase 3+ availability windows (ADR-006). Local-time “HH:MM” windows that
shape the effective capacity advertised to the directory and gated at
serve time. Empty → always full capacity. See crate::availability.
enable_idempotency: boolADR-010 task_id idempotency. false by default to preserve the pre-0.6
contract (a task_id may be resubmitted). When true, a duplicate task_id
within the 5-minute window is rejected with IICP-E010.
enable_mesh: boolPhase 2 mesh (ADR-009/022). When true, serve() gossips peers and exposes
POST /v1/peers. Default false.
relay_capable: boolWhen true, serve() exposes POST /v1/relay to forward tasks to peers learned
via gossip (ADR-022). Requires enable_mesh. Default false.
relay_accept_port: u16Port for the RelayAcceptServer (R1 relay-as-last-resort, #341). Workers behind CGNAT connect here outbound and send RELAY_BIND. Default 9485.
relay_worker_endpoint: Option<String>R2: when set, this node acts as a relay WORKER — connects outbound to the specified relay endpoint. Format: “host:port” (e.g. “relay.example.com:9485”).
relay_bind_ticket_public_key_hex: Option<String>#510 — optional directory Ed25519 public key used to verify HTTP-poll relay bind tickets.
relay_require_bind_ticket: bool#510 — when true, HTTP-poll relay binds without a valid ticket are rejected.
log_dir: Option<PathBuf>Directory for persistent log files (<node_id>.log + events.jsonl).
None disables file logging (stderr only). Overridden by IICP_LOG_DIR.
operator_delegation: Option<Value>#463/#464 — operator-identity attributes advertised at register (bound only when the
delegation verifies). operator_delegation is the serialized ADR-045 token (built from
the operator identity for this node_id; operator_pub == operator_id). display_name is
the public handle (node detail + leaderboard); created_at + integrity_hash are
identity-integrity. NEVER the operator’s contact/email or secret key.
operator_display_name: Option<String>§operator_created_at: Option<String>§operator_integrity_hash: Option<String>§policy_manifest: Option<Value>Signed public node-policy manifest advertised to the directory (#588). The SDK signs a local JSON document with the operator key before this value is attached; re-registration reuses the same signed value.
backend_url: Option<String>#494 — backend base URL for live model health probing during heartbeat.
When set, heartbeat probes /api/tags (Ollama) or /v1/models (OpenAI-compat)
and includes health_models in the payload so the directory can filter
stale-model nodes from discover results. None = no probing.
backend_api_key: Option<String>Bearer API key for authenticated backends (LM Studio, hosted services).
excluded_models: Vec<String>Model IDs a backend may expose for internal or preview routing but that this node must not publish or use as live-health drift evidence.
supported_receipt_profiles: Vec<String>Pre-normative receipt profiles explicitly enabled by the operator. Unknown values are ignored and an empty list is not advertised.
Implementations§
Trait Implementations§
Source§impl Clone for NodeConfig
impl Clone for NodeConfig
Source§fn clone(&self) -> NodeConfig
fn clone(&self) -> NodeConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more