Files
cortiq-gateway/src/protocols/mod.rs
T
infosave2007andClaude Opus 4.8 ddca3a8363 feat: MCP (Model Context Protocol) server
- POST /mcp (JSON-RPC 2.0): initialize, ping, tools/list, tools/call; notifications -> 202
- tools: cortiq_route (classify -> routing decision) and cortiq_chat (route -> answer)
- gated by protocols.mcp; admin meta marks it implemented
- docs: README/README.ru protocol tables, highlights and status updated for
  streaming, Anthropic, embeddings, semantic cache and MCP

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-30 17:12:55 +03:00

23 lines
828 B
Rust

//! Incoming protocol adapters. Each one builds its own axum routes and translates
//! its protocol to/from the canonical model. Enabled via flags in `[protocols]`.
pub mod anthropic_messages;
pub mod mcp;
pub mod openai_chat;
pub mod openai_embeddings;
use crate::state::SharedState;
use axum::Router;
/// Build the protocols router. Implemented adapters are **always** mounted;
/// each handler checks the live `protocols.*` flag from config itself, so
/// toggles in the admin panel take effect without a restart (hot switching).
pub fn build_router() -> Router<SharedState> {
Router::new()
.merge(openai_chat::routes())
.merge(openai_embeddings::routes())
.merge(anthropic_messages::routes())
.merge(mcp::routes())
// TODO: openai_completions, openai_models, native_passthrough.
}