PhoenixKitAI.Providers.OpenAICompatible (PhoenixKitAI v0.23.1)

Copy Markdown View Source

The default PhoenixKitAI.Provider adapter: what any OpenAI-shaped API offers with no provider-specific knowledge.

  • Editing goes through POST <base_url>/chat/completions with the prompt and the images as image_url content parts — the way gateways serve image-capable chat models (Gemini's image models, for one). The output arrives on choices[0].message.images[] or as an image content part. An aspect_ratio option travels as Gemini's image_config.
  • Generation goes through POST <base_url>/images/generations.
  • No model capability listing.

The other adapters reuse its pieces (chat_edit/5, post_images/4, the decoders) and override only the transport that differs.

Summary

Functions

Vision through chat completions: messages already carry the image parts; options may hold :response_format and the sampling keys. Not every model behind a chat endpoint takes response_format (image-output models answer 400), so a 4xx on a JSON request is retried once without the field — the prompt asks for JSON anyway.

Functions

vision(endpoint, messages, options)

Vision through chat completions: messages already carry the image parts; options may hold :response_format and the sampling keys. Not every model behind a chat endpoint takes response_format (image-output models answer 400), so a 4xx on a JSON request is retried once without the field — the prompt asks for JSON anyway.