mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-11 08:19:01 +08:00
🐛 fix: use correct reasoning parameter format for GitHub Copilot GPT-5 models
Co-authored-by: GeorgeDong32 <98630204+GeorgeDong32@users.noreply.github.com>
This commit is contained in:
parent
7fceb434b8
commit
044eac0cf9
@ -306,6 +306,13 @@ export class OpenAIAPIClient extends OpenAIBaseClient<
|
|||||||
|
|
||||||
// Grok models/Perplexity models/OpenAI models
|
// Grok models/Perplexity models/OpenAI models
|
||||||
if (isSupportedReasoningEffortModel(model)) {
|
if (isSupportedReasoningEffortModel(model)) {
|
||||||
|
// For OpenAI models (GPT-5, o1, o3, o4, etc), use the base class implementation
|
||||||
|
// which returns the correct { reasoning: { effort, summary } } format
|
||||||
|
if (isSupportedReasoningEffortOpenAIModel(model)) {
|
||||||
|
return super.getReasoningEffort(assistant, model)
|
||||||
|
}
|
||||||
|
|
||||||
|
// For non-OpenAI models (Grok, Perplexity, etc), use reasoning_effort parameter
|
||||||
// 检查模型是否支持所选选项
|
// 检查模型是否支持所选选项
|
||||||
const modelType = getThinkModelType(model)
|
const modelType = getThinkModelType(model)
|
||||||
const supportedOptions = MODEL_SUPPORTED_REASONING_EFFORT[modelType]
|
const supportedOptions = MODEL_SUPPORTED_REASONING_EFFORT[modelType]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user