Add gpt-4.5-preview
| @@ -2867,6 +2867,10 @@ | ||
| 2867 | 2867 | <option value="o3-mini">o3-mini</option> |
| 2868 | 2868 | <option value="o3-mini-2025-01-31">o3-mini-2025-01-31</option> |
| 2869 | 2869 | </optgroup> |
| 2870 | + <optgroup label="GPT-4.5"> | |
| 2871 | + <option value="gpt-4.5-preview">gpt-4.5-preview</option> | |
| 2872 | + <option value="gpt-4.5-preview-2025-02-27">gpt-4.5-preview-2025-02-27</option> | |
| 2873 | + </optgroup> | |
| 2870 | 2874 | <optgroup label="GPT-4 Turbo and GPT-4"> |
| 2871 | 2875 | <option value="gpt-4-turbo">gpt-4-turbo</option> |
| 2872 | 2876 | <option value="gpt-4-turbo-2024-04-09">gpt-4-turbo-2024-04-09</option> |
| @@ -1945,7 +1945,7 @@ async function sendOpenAIRequest(type, messages, signal) { | ||
| 1945 | 1945 | } |
| 1946 | 1946 | |
| 1947 | 1947 | // Remove logit bias, logprobs and stop strings if it's not supported by the model |
| 1948 | 1948 | if (isOAI && oai_settings.openai_model.includes('vision') || isOpenRouter && oai_settings.openrouter_model.includes('vision') || isOAI && oai_settings.openai_model.includes('gpt-4.5-preview')) { |
| 1949 | 1949 | delete generate_data.logit_bias; |
| 1950 | 1950 | delete generate_data.stop; |
| 1951 | 1951 | delete generate_data.logprobs; |
| @@ -4997,6 +4997,8 @@ export function isImageInliningSupported() { | ||
| 4997 | 4997 | 'gpt-4-turbo', |
| 4998 | 4998 | 'gpt-4o', |
| 4999 | 4999 | 'gpt-4o-mini', |
| 5000 | + 'gpt-4.5-preview', | |
| 5001 | + 'gpt-4.5-preview-2025-02-27', | |
| 5000 | 5002 | 'o1', |
| 5001 | 5003 | 'o1-2024-12-17', |
| 5002 | 5004 | 'chatgpt-4o-latest', |
| @@ -108,6 +108,7 @@ export function isHiddenReasoningModel() { | ||
| 108 | 108 | |
| 109 | 109 | /** @type {{ name: string; func: MatchingFunc; }[]} */ |
| 110 | 110 | const hiddenReasoningModels = [ |
| 111 | + { name: 'gpt-4.5', func: FUNCS.startsWith }, | |
| 111 | 112 | { name: 'o1', func: FUNCS.startsWith }, |
| 112 | 113 | { name: 'o3', func: FUNCS.startsWith }, |
| 113 | 114 | { name: 'gemini-2.0-flash-thinking-exp', func: FUNCS.startsWith }, |
| @@ -410,6 +410,10 @@ export function getTokenizerModel(requestModel) { | ||
| 410 | 410 | return 'gpt-4o'; |
| 411 | 411 | } |
| 412 | 412 | |
| 413 | + if (requestModel.includes('gpt-4.5-preview')) { | |
| 414 | + return 'gpt-4o'; | |
| 415 | + } | |
| 416 | + | |
| 413 | 417 | if (requestModel.includes('gpt-4-32k')) { |
| 414 | 418 | return 'gpt-4-32k'; |
| 415 | 419 | } |