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:
kangfenmao 2025-12-11 15:43:28 +08:00
parent ed695a8620
commit 5f3af646f4
3 changed files with 3 additions and 2 deletions

View File

@ -255,7 +255,7 @@ export function providerToAiSdkConfig(actualProvider: Provider, model: Model): A
const cherryinProvider = getProviderById(SystemProviderIds.cherryin)
if (cherryinProvider) {
extraOptions.anthropicBaseURL = cherryinProvider.anthropicApiHost
extraOptions.geminiBaseURL = cherryinProvider.apiHost + '/gemini/v1beta'
extraOptions.geminiBaseURL = cherryinProvider.apiHost + '/v1beta/models'
}
}

View File

@ -589,6 +589,7 @@ export function getGeminiReasoningParams(
if (effortRatio > 1) {
return {
thinkingConfig: {
thinkingBudget: -1,
includeThoughts: true
}
}

View File

@ -51,7 +51,7 @@ const CherryINSettings: FC<CherryINSettingsProps> = ({ providerId, apiHost, setA
value: option.value,
label: (
<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>
</div>
)