Skip to main content

node_app_sdk_rust/llm/
mod.rs

1//! Consumer SDK surface for the public api-store LLM endpoint (feature 472).
2//!
3//! These types let a Rust application (or another builtin app) call the
4//! host's `/api/v2/public/api_store/llm/{call,stream}` endpoints in a
5//! type-safe way, with the routing fields (`route` / `execution_route` /
6//! `via_node_id`) threaded through the request and response shapes.
7//!
8//! **Honest framing** (security finding S5 / U4, surfaced via rustdoc on
9//! [`LlmRoute`]): `Private` isolates the upstream provider's API
10//! credentials on the peer's host and routes egress through a separate
11//! device; it does NOT mask prompt contents from the upstream provider or
12//! anonymize the user.
13
14#![allow(missing_docs)]
15
16pub mod api_store_client;
17pub mod errors;
18pub mod types;
19
20pub use api_store_client::WithRoute;
21pub use errors::{InvalidRouteModeCombinationError, PrivateUnavailableError};
22pub use types::{
23    ChatMessage, ExecuteBestModelRequest, ExecuteChatRequest, ExecuteChatResponse, ExecuteRequest,
24    LlmRoute, ProxyMode, StreamChatChunk, StreamChatRequest,
25};