mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-10 23:59:45 +08:00
fix(OpenAIResponseAPIClient): refine client selection logic for non-chat models (#8238)
- Updated the getClient method to ensure the OpenAIResponseAPIClient is only returned for non-chat completion models, improving model compatibility checks.
This commit is contained in:
parent
9218ac237b
commit
fe91d4b56a
@ -78,7 +78,7 @@ export class OpenAIResponseAPIClient extends OpenAIBaseClient<
|
|||||||
* 根据模型特征选择合适的客户端
|
* 根据模型特征选择合适的客户端
|
||||||
*/
|
*/
|
||||||
public getClient(model: Model) {
|
public getClient(model: Model) {
|
||||||
if (this.provider.type === 'openai-response') {
|
if (this.provider.type === 'openai-response' && !isOpenAIChatCompletionOnlyModel(model)) {
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
if (isOpenAILLMModel(model) && !isOpenAIChatCompletionOnlyModel(model)) {
|
if (isOpenAILLMModel(model) && !isOpenAIChatCompletionOnlyModel(model)) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user