Skip to content

feat: expand OpenAI API compatibility with extended schemas, streaming usage, and advanced parameters - #17

Open
raiyanu wants to merge 1 commit into
sums001:mainfrom
raiyanu:openapi-compatible
Open

raiyanu wants to merge 1 commit into
sums001:mainfrom
raiyanu:openapi-compatible

Conversation

@raiyanu

@raiyanu raiyanu commented Sep 14, 2026

Copy link
Copy Markdown

Summary

Makes the server fully OpenAI-compatible so it works seamlessly as a drop-in provider for OpenAI SDKs, LangChain, n8n, NextChat, OpenWebUI, etc.

Key Changes

  • Dual Endpoints: Added root paths alongside /v1 (e.g. POST /chat/completions, GET /models, POST /embeddings).
  • OpenAI Schema: Supports all standard request parameters (stream_options, response_format, stop, max_tokens, etc.) with extra="allow" to prevent 422 errors.
  • Response & Streaming: Compliant chat.completion and chat.completion.chunk formatting (with usage in streaming, system_fingerprint, and standard finish reasons).
  • Model Aliases & Thinking: Added aliases (gpt-4o, gpt-3.5-turbo, deepseek-reasoner) and auto-enables DeepThink for reasoning models.
  • CORS & Auth: Added CORS middleware and optional API_KEY verification.

@raiyanu

raiyanu commented Sep 14, 2026

Copy link
Copy Markdown
Author

@sums001

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant