Skip to content

Conversation

@cto-new
Copy link

@cto-new cto-new bot commented Nov 11, 2025

Summary

This PR introduces full compatibility for OpenAI's Chat-format messages to the /v1/chat/completions endpoint. The API now supports text-to-image, image-to-image, text-to-video, and image-to-video with smart, automatic routing and robust parameter parsing.

Details

  • Introduced message parsing utility for extracting text, images (URL or base64), and intent from OpenAI-style messages
  • Enhanced chat endpoint and controllers to intelligently route requests to text-to-image, image-to-image, text-to-video, or image-to-video based on content/model
  • Added full support for multimodal messages (text + multiple images), both URL and base64 flavors
  • Refactored video/image handlers to process Buffers as well as legacy file-objects for best compatibility
  • Improved streaming logic to track user-visible status for each task type
  • Added comprehensive documentation (OPENAI_CHAT_COMPAT.md) with usage and best practices
  • No breaking API changes; existing endpoints and usages remain working

Warning: Task VM test is not passing, cto.new will perform much better if you fix the setup

…rt routing to image, image-to-image, and video generation

Implements OpenAI chat/message parsing and intelligent routing so the /v1/chat/completions endpoint now fully supports text-to-image, image-to-image, text-to-video, and image-to-video tasks. Unified multimodal input parsing—URLs and base64 images—enables seamless compatibility with OpenAI-style message arrays, including streaming output. Video/image routines, file uploading, and buffer handling are updated for maximum format flexibility. New README guides usage and best practices.

This change unifies the API for all creative tasks through smart message/content analysis, supporting multi-modal prompts and robust parameter options for AI image and video generation.

Closes #59
@cto-new cto-new bot merged commit b21314f into main Nov 11, 2025
@puyujian puyujian deleted the feat-openai-chat-compat-multimodal-routing-params branch November 11, 2025 11:28
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