Skip to content

Module: Routing & Cross-Protocol Translation ​

Chinese Source Guide

Full source-anchored notes are maintained in Chinese at repo-docs/modules/routing-and-protocols.md.

  • Ingress: OpenAI (/v1/models, /v1/chat/completions, /v1/completions, /v1/responses, /v1/embeddings, /v1/images/{generations,edits}, /v1/audio/{speech,transcriptions,translations,turn-detection}, WS /v1/audio/realtime), Specialized (/v1/rerank, /v1/translations, /v1/classifications, /v1/extractions, /v1/decisions, /v1/vision, /v1/ai/run), Anthropic (/v1/messages), Gemini (/v1beta/models/*, /v1/models/*; :countTokens returns 501).
  • Resolution and checks. resolveModelName accepts explicit targets and consults the saved model map for aliases. New instances start with 48 presets. For example, a saved Qwen embedding alias routes to embeddings on /v1/ai/run and receives a 400 with the embedding endpoint if sent to chat. Task handlers check request sizes and model constraints before inference.