mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-19 14:41:24 +08:00
fix: update CherryIN API URL and add thinking budget parameter
- Changed the Gemini base URL in providerToAiSdkConfig to point to '/v1beta/models' for CherryIN provider. - Added a default thinking budget of -1 in getGeminiReasoningParams to enhance reasoning configuration.
This commit is contained in:
parent
ed695a8620
commit
5f3af646f4
@ -255,7 +255,7 @@ export function providerToAiSdkConfig(actualProvider: Provider, model: Model): A
|
|||||||
const cherryinProvider = getProviderById(SystemProviderIds.cherryin)
|
const cherryinProvider = getProviderById(SystemProviderIds.cherryin)
|
||||||
if (cherryinProvider) {
|
if (cherryinProvider) {
|
||||||
extraOptions.anthropicBaseURL = cherryinProvider.anthropicApiHost
|
extraOptions.anthropicBaseURL = cherryinProvider.anthropicApiHost
|
||||||
extraOptions.geminiBaseURL = cherryinProvider.apiHost + '/gemini/v1beta'
|
extraOptions.geminiBaseURL = cherryinProvider.apiHost + '/v1beta/models'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -589,6 +589,7 @@ export function getGeminiReasoningParams(
|
|||||||
if (effortRatio > 1) {
|
if (effortRatio > 1) {
|
||||||
return {
|
return {
|
||||||
thinkingConfig: {
|
thinkingConfig: {
|
||||||
|
thinkingBudget: -1,
|
||||||
includeThoughts: true
|
includeThoughts: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -51,7 +51,7 @@ const CherryINSettings: FC<CherryINSettingsProps> = ({ providerId, apiHost, setA
|
|||||||
value: option.value,
|
value: option.value,
|
||||||
label: (
|
label: (
|
||||||
<div className="flex flex-col gap-0.5">
|
<div className="flex flex-col gap-0.5">
|
||||||
<span>{t(option.labelKey)}</span>
|
<span>{option.labelKey}</span>
|
||||||
<span className="text-[var(--color-text-3)] text-xs">{t(option.description)}</span>
|
<span className="text-[var(--color-text-3)] text-xs">{t(option.description)}</span>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user