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