mstar.api_server.openai

mstar.api_server.openai#

OpenAI-compatible API layer for mstar.

Sits alongside the native /generate endpoint and reuses the same request path (APIServer.submit_request / collect_results / iter_result_chunks). Per-model translation lives in mstar.api_server.openai.adapters; the HTTP endpoints in mstar.api_server.openai.router stay model-agnostic.

Modules

adapters

Per-model translation between OpenAI-shaped requests and mstar's request path.

protocol

Pydantic request models for the OpenAI-compatible endpoints.

router

FastAPI routes for the OpenAI-compatible API.

serving_chat

/v1/chat/completions handler (streaming + non-streaming).

serving_images

/v1/images/generations (text-to-image) and /v1/images/edits (image-to-image) handlers.

serving_speech

/v1/audio/speech handler (text-to-speech).