OpenRouter: Fix fallback model request

f861beb24498994d68860ad2db7356f534755823

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +2 -2Showing whitespace changes
public/scripts/openai.js+2 -2
@@ -2597,13 +2597,13 @@ export async function createGenerationParameters(settings, model, type, messages
2597 }2597 }
25982598
2599 // Remove logit bias/logprobs/stop-strings if not supported by the model2599 // Remove logit bias/logprobs/stop-strings if not supported by the model
2600 const isVision = (m) => ['gpt', 'vision'].every(x => m.includes(x));2600 const isVision = (m) => ['gpt', 'vision'].every(x => typeof m === 'string' && m.includes(x));
2601 if (gptSources.includes(settings.chat_completion_source) && isVision(model)) {2601 if (gptSources.includes(settings.chat_completion_source) && isVision(model)) {
2602 delete generate_data.logit_bias;2602 delete generate_data.logit_bias;
2603 delete generate_data.stop;2603 delete generate_data.stop;
2604 delete generate_data.logprobs;2604 delete generate_data.logprobs;
2605 }2605 }
2606 if (gptSources.includes(settings.chat_completion_source) && model.includes('gpt-4.5')) {2606 if (gptSources.includes(settings.chat_completion_source) && /gpt-4.5/.test(model)) {
2607 delete generate_data.logprobs;2607 delete generate_data.logprobs;
2608 }2608 }
26092609