feat(media): multimodal attachments — image/video inlining per model capabilities

Adds media.rs for per-turn attachment routing, message_builder
partitioning by resolved model capabilities, controller endpoints
for uploads, and server routing for /data/* behind session auth.

See CLAUDE.md §Multimodal attachments for full design.
This commit is contained in:
2026-07-18 18:02:45 +01:00
parent 4fea04c57f
commit 2b35312abd
15 changed files with 631 additions and 35 deletions
+4
View File
@@ -210,6 +210,10 @@ impl ApiError {
pub fn forbidden(msg: impl Into<String>) -> Self {
Self { status: StatusCode::FORBIDDEN, message: msg.into() }
}
pub fn payload_too_large(msg: impl Into<String>) -> Self {
Self { status: StatusCode::PAYLOAD_TOO_LARGE, message: msg.into() }
}
}
/// Resolves the authenticated caller's per-user runtime context, or `401` when the