Compare commits

...

5 Commits

Author SHA1 Message Date
ItzCrazyKns
b8e4152e77 Merge pull request #857 from skoved/fix-light-mode
make file icon in attachment modal in chat page fit light theme better
2025-09-12 21:16:46 +05:30
ItzCrazyKns
c8ac9279bd Merge pull request #866 from agungbesti/feat/add-openai-models
feat: add new OpenAI models with proper temperature parameter handling
2025-09-12 21:15:09 +05:30
akubesti
6f367c34a8 feat: add gpt-5, gpt-5-mini, o3 models and remove gpt-5-chat-latest
- Add new OpenAI models: gpt-5, gpt-5-mini, and o3 series

- Fix temperature parameter handling for o3 models

- Update models list to ensure compatibility
2025-09-12 22:22:16 +07:00
akubesti
328b12ffbe feat: add new OpenAI models with proper temperature parameter handling
- Add GPT 4.1 series and o1/o3/o4 models with temperature compatibility fixes

- Remove gpt-5/gpt-5-mini models due to organization verification restrictions

- Fix 400 errors for models that only support default temperature values
2025-09-11 16:38:01 +07:00
skoved
d8486e90bb make file icon in attachment modal in chat page fit light theme better
make the file icon in the attachment modal for the chat page an off-white background so that it matches the light theme better and looks the same as the attachment modal on the home page
2025-08-27 09:43:09 -04:00
3 changed files with 45 additions and 11 deletions

View File

@@ -107,8 +107,8 @@ const AttachSmall = () => {
key={i}
className="flex flex-row items-center justify-start w-full space-x-3 p-3"
>
<div className="bg-dark-100 flex items-center justify-center w-10 h-10 rounded-md">
<File size={16} className="text-white/70" />
<div className="bg-light-100 dark:bg-dark-100 flex items-center justify-center w-10 h-10 rounded-md">
<File size={16} className="text-black/70 dark:text-white/70" />
</div>
<p className="text-black/70 dark:text-white/70 text-sm">
{file.fileName.length > 25

View File

@@ -120,7 +120,11 @@ export const getAvailableChatModelProviders = async () => {
model: new ChatOpenAI({
apiKey: customOpenAiApiKey,
modelName: customOpenAiModelName,
temperature: 0.7,
...((() => {
const temperatureRestrictedModels = ['gpt-5-nano','gpt-5','gpt-5-mini','o1', 'o3', 'o3-mini', 'o4-mini'];
const isTemperatureRestricted = temperatureRestrictedModels.some(restrictedModel => customOpenAiModelName.includes(restrictedModel));
return isTemperatureRestricted ? {} : { temperature: 0.7 };
})()),
configuration: {
baseURL: customOpenAiApiUrl,
},

View File

@@ -26,6 +26,10 @@ const openaiChatModels: Record<string, string>[] = [
displayName: 'GPT-4 omni',
key: 'gpt-4o',
},
{
displayName: 'GPT-4o (2024-05-13)',
key: 'gpt-4o-2024-05-13',
},
{
displayName: 'GPT-4 omni mini',
key: 'gpt-4o-mini',
@@ -47,12 +51,28 @@ const openaiChatModels: Record<string, string>[] = [
key: 'gpt-5-nano',
},
{
displayName: 'GPT 5 mini',
displayName: 'GPT 5',
key: 'gpt-5',
},
{
displayName: 'GPT 5 Mini',
key: 'gpt-5-mini',
},
{
displayName: 'GPT 5',
key: 'gpt-5',
displayName: 'o1',
key: 'o1',
},
{
displayName: 'o3',
key: 'o3',
},
{
displayName: 'o3 Mini',
key: 'o3-mini',
},
{
displayName: 'o4 Mini',
key: 'o4-mini',
},
];
@@ -76,13 +96,23 @@ export const loadOpenAIChatModels = async () => {
const chatModels: Record<string, ChatModel> = {};
openaiChatModels.forEach((model) => {
chatModels[model.key] = {
displayName: model.displayName,
model: new ChatOpenAI({
// Models that only support temperature = 1
const temperatureRestrictedModels = ['gpt-5-nano','gpt-5','gpt-5-mini','o1', 'o3', 'o3-mini', 'o4-mini'];
const isTemperatureRestricted = temperatureRestrictedModels.some(restrictedModel => model.key.includes(restrictedModel));
const modelConfig: any = {
apiKey: openaiApiKey,
modelName: model.key,
temperature: model.key.includes('gpt-5') ? 1 : 0.7,
}) as unknown as BaseChatModel,
};
// Only add temperature if the model supports it
if (!isTemperatureRestricted) {
modelConfig.temperature = 0.7;
}
chatModels[model.key] = {
displayName: model.displayName,
model: new ChatOpenAI(modelConfig) as unknown as BaseChatModel,
};
});