feat: add OpenCode Go provider and support for custom models
- Introduced OpenCode Go provider with relevant configurations. - Enhanced model management by allowing users to add and delete custom models. - Updated UI components to support model selection for image types. - Adjusted sidebar visibility to include image media kinds.
This commit is contained in:
16
src/app/api/v1/images/generations/route.js
Normal file
16
src/app/api/v1/images/generations/route.js
Normal file
@@ -0,0 +1,16 @@
|
||||
import { handleImageGeneration } from "@/sse/handlers/imageGeneration.js";
|
||||
|
||||
export async function OPTIONS() {
|
||||
return new Response(null, {
|
||||
headers: {
|
||||
"Access-Control-Allow-Origin": "*",
|
||||
"Access-Control-Allow-Methods": "POST, OPTIONS",
|
||||
"Access-Control-Allow-Headers": "*",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/** POST /v1/images/generations - OpenAI-compatible image generation endpoint */
|
||||
export async function POST(request) {
|
||||
return await handleImageGeneration(request);
|
||||
}
|
||||
Reference in New Issue
Block a user