fix(chat): add PATCH to CORS and use Gemini for title generation

- Add PATCH method to CORS allowed methods
- Change title generation to use Gemini 2.5 Flash instead of GPT-5

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Till-JS 2025-11-29 15:20:24 +01:00
parent 24eafc5430
commit 90c696caf3
5 changed files with 21 additions and 4 deletions

View file

@ -16,7 +16,7 @@ async function bootstrap() {
'exp://localhost:8081',
'http://localhost:3001', // Mana Core Auth
],
methods: ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS'],
methods: ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS'],
credentials: true,
});

View file

@ -164,7 +164,7 @@ export const conversationService = {
const response = await chatApi.createCompletion({
messages: [{ role: 'user', content: titlePrompt }],
modelId: '550e8400-e29b-41d4-a716-446655440004', // GPT-4o-Mini
modelId: '550e8400-e29b-41d4-a716-446655440101', // Gemini 2.5 Flash (default)
temperature: 0.3,
maxTokens: 50,
});