| 967 | if (getConfigValue('openai.randomizeUserId', false)) { | 967 | if (getConfigValue('openai.randomizeUserId', false)) { |
| 968 | bodyParams['user'] = uuidv4(); | 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 | } else if (request.body.chat_completion_source === CHAT_COMPLETION_SOURCES.OPENROUTER) { | 975 | } else if (request.body.chat_completion_source === CHAT_COMPLETION_SOURCES.OPENROUTER) { |
| 971 | apiUrl = 'https://openrouter.ai/api/v1'; | 976 | apiUrl = 'https://openrouter.ai/api/v1'; |
| 972 | apiKey = readSecret(request.user.directories, SECRET_KEYS.OPENROUTER); | 977 | apiKey = readSecret(request.user.directories, SECRET_KEYS.OPENROUTER); |