| 967 | 967 | if (getConfigValue('openai.randomizeUserId', false)) { |
| 968 | 968 | bodyParams['user'] = uuidv4(); |
| 969 | 969 | } |
| 970 | + |
| 971 | + // A few of OpenAIs reasoning models support reasoning effort |
| 972 | + if (['o1', 'o3-mini', 'o3-mini-2025-01-31'].includes(request.body.model)) { |
| 973 | + bodyParams['reasoning_effort'] = request.body.reasoning_effort; |
| 974 | + } |
| 970 | 975 | } else if (request.body.chat_completion_source === CHAT_COMPLETION_SOURCES.OPENROUTER) { |
| 971 | 976 | apiUrl = 'https://openrouter.ai/api/v1'; |
| 972 | 977 | apiKey = readSecret(request.user.directories, SECRET_KEYS.OPENROUTER); |