Skip to content

feat: Support editing all parameters individually for each model #1562

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

Emt-lin
Copy link
Collaborator

@Emt-lin Emt-lin commented Jun 20, 2025

Overview

Now, you can edit all all parameters individually for each model and new models by duplicating existing ones.

actual effect:

CleanShot 2025-06-20 at 18 09 08

issues

Key changes

  • support copy model for quicklly add.
  • support edit maxToken、temperature、topP args for each model

@logancyang
Copy link
Owner

bugbot run

cursor[bot]

This comment was marked as outdated.

@logancyang
Copy link
Owner

With these individual parameter settings, should the global one still exist?

@Emt-lin
Copy link
Collaborator Author

Emt-lin commented Jun 21, 2025

With these individual parameter settings, should the global one still exist?

Now, temperature and maxTokens is global parameters. For non-technical personnel, default values for these parameters are needed, and it should be convenient to quickly adjust all models.

Once they understand the meaning of these parameters, they can independently configure the parameters for each model.

This is a step-by-step process.

@logancyang logancyang self-requested a review June 24, 2025 00:07
Copy link
Owner

@logancyang logancyang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to our previous chat, we should either remove the global settings or do something else, the idea is to have only 1 source of truth.

@Emt-lin
Copy link
Collaborator Author

Emt-lin commented Jun 24, 2025

According to our previous chat, we should either remove the global settings or do something else, the idea is to have only 1 source of truth.

I have removed the global settings for temperature and maxTokens

@Emt-lin Emt-lin requested a review from logancyang June 24, 2025 06:33
@logancyang
Copy link
Owner

bugbot run

cursor[bot]

This comment was marked as outdated.

@logancyang
Copy link
Owner

I just realized that embedding models are not editable like the chat models. We should make them editable too same as chat models.

@logancyang
Copy link
Owner

Also don't forget to rebase on the new master.

@logancyang
Copy link
Owner

bugbot run

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: API Parameter Removal Breaks User Configurations

The safeFetch function unconditionally deletes the frequency_penalty parameter from all API request bodies. This causes user-configured frequencyPenalty settings (added in chatModelManager.ts) to be ignored by all providers using safeFetch with CORS enabled, rendering the feature non-functional. Although the code comment indicates this was a temporary workaround for perplexity.ai, its global application breaks the feature for all other providers.

src/utils.ts#L491-L495

const newBody = JSON.parse(options.body ?? {});
// todo(emt-lin):frequency_penalty: default 0, but perplexity.ai requires 1 by default. so, delete this argument for now
delete newBody["frequency_penalty"];
options.body = JSON.stringify(newBody);
}

Fix in Cursor


Bug: Temperature Slider Default Mismatch

The temperature slider in the model edit modal uses a fallback default value of 1. This is inconsistent with the PR discussion, which indicated a default of 0.9, and the previous global default of 0.1. A temperature of 1 is unusually high for most AI models, leading to overly creative and unpredictable outputs.

src/settings/v2/components/ModelEditDialog.tsx#L298-L299

<SettingSlider
value={localModel.temperature ?? settings.temperature ?? 1}

Fix in Cursor


Was this report helpful? Give feedback by reacting with 👍 or 👎

</TooltipContent>
</Tooltip>
</TooltipProvider>
</div>
}
>
<SettingSlider
value={localModel.temperature ?? 0.1}
value={localModel.temperature ?? settings.temperature ?? 1}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why 1? It's another magic number, if there's a reason we should name it something obvious.

Copy link
Collaborator Author

@Emt-lin Emt-lin Jun 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's the result of autocompelete by ai. I forget to keep it consistent with the setting default value.(and also maxTokens )

@Emt-lin
Copy link
Collaborator Author

Emt-lin commented Jun 25, 2025

@logancyang Can you test the perplexity.ai API? It has supported the frequency_penalty value of 0.

docs: https://docs.perplexity.ai/api-reference/chat-completions-post#body-frequency-penalty

Google Chrome 2025-06-25 14 53 56

@Emt-lin Emt-lin requested a review from logancyang June 25, 2025 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants