claude-haiku-4-5
| @@ -3017,6 +3017,9 @@ | |||
| 3017 | <select id="model_claude_select"> | 3017 | <select id="model_claude_select"> |
| 3018 | <optgroup label="Versions"> | 3018 | <optgroup label="Versions"> |
| 3019 | <option value="claude-sonnet-4-5">claude-sonnet-4-5</option> | 3019 | <option value="claude-sonnet-4-5">claude-sonnet-4-5</option> |
| 3020 | <option value="claude-sonnet-4-5-20250929">claude-sonnet-4-5-20250929</option> | ||
| 3021 | <option value="claude-haiku-4-5">claude-haiku-4-5</option> | ||
| 3022 | <option value="claude-haiku-4-5-20251001">claude-haiku-4-5-20251001</option> | ||
| 3020 | <option value="claude-opus-4-1">claude-opus-4-1</option> | 3023 | <option value="claude-opus-4-1">claude-opus-4-1</option> |
| 3021 | <option value="claude-opus-4-1-20250805">claude-opus-4-1-20250805</option> | 3024 | <option value="claude-opus-4-1-20250805">claude-opus-4-1-20250805</option> |
| 3022 | <option value="claude-opus-4-0">claude-opus-4-0</option> | 3025 | <option value="claude-opus-4-0">claude-opus-4-0</option> |
| @@ -82,6 +82,9 @@ | |||
| 82 | <option data-type="openai" value="gpt-4.5-preview">gpt-4.5-preview</option> | 82 | <option data-type="openai" value="gpt-4.5-preview">gpt-4.5-preview</option> |
| 83 | <option data-type="openai" value="gpt-4.5-preview-2025-02-27">gpt-4.5-preview-2025-02-27</option> | 83 | <option data-type="openai" value="gpt-4.5-preview-2025-02-27">gpt-4.5-preview-2025-02-27</option> |
| 84 | <option data-type="anthropic" value="claude-sonnet-4-5">claude-sonnet-4-5</option> | 84 | <option data-type="anthropic" value="claude-sonnet-4-5">claude-sonnet-4-5</option> |
| 85 | <option data-type="anthropic" value="claude-sonnet-4-5-20250929">claude-sonnet-4-5-20250929</option> | ||
| 86 | <option data-type="anthropic" value="claude-haiku-4-5">claude-haiku-4-5</option> | ||
| 87 | <option data-type="anthropic" value="claude-haiku-4-5-20251001">claude-haiku-4-5-20251001</option> | ||
| 85 | <option data-type="anthropic" value="claude-opus-4-1">claude-opus-4-1</option> | 88 | <option data-type="anthropic" value="claude-opus-4-1">claude-opus-4-1</option> |
| 86 | <option data-type="anthropic" value="claude-opus-4-1-20250805">claude-opus-4-1-20250805</option> | 89 | <option data-type="anthropic" value="claude-opus-4-1-20250805">claude-opus-4-1-20250805</option> |
| 87 | <option data-type="anthropic" value="claude-opus-4-0">claude-opus-4-0</option> | 90 | <option data-type="anthropic" value="claude-opus-4-0">claude-opus-4-0</option> |
| @@ -154,9 +154,9 @@ async function sendClaudeRequest(request, response) { | |||
| 154 | const useTools = Array.isArray(request.body.tools) && request.body.tools.length > 0; | 154 | const useTools = Array.isArray(request.body.tools) && request.body.tools.length > 0; |
| 155 | const useSystemPrompt = Boolean(request.body.claude_use_sysprompt); | 155 | const useSystemPrompt = Boolean(request.body.claude_use_sysprompt); |
| 156 | const convertedPrompt = convertClaudeMessages(request.body.messages, request.body.assistant_prefill, useSystemPrompt, useTools, getPromptNames(request)); | 156 | const convertedPrompt = convertClaudeMessages(request.body.messages, request.body.assistant_prefill, useSystemPrompt, useTools, getPromptNames(request)); |
| 157 | const useThinking = /^claude-(3-7|opus-4|sonnet-4)/.test(request.body.model); | 157 | const useThinking = /^claude-(3-7|opus-4|sonnet-4|haiku-4-5)/.test(request.body.model); |
| 158 | const useWebSearch = /^claude-(3-5|3-7|opus-4|sonnet-4)/.test(request.body.model) && Boolean(request.body.enable_web_search); | 158 | const useWebSearch = /^claude-(3-5|3-7|opus-4|sonnet-4|haiku-4-5)/.test(request.body.model) && Boolean(request.body.enable_web_search); |
| 159 | const isLimitedSampling = /^claude-(opus-4-1|sonnet-4-5)/.test(request.body.model); | 159 | const isLimitedSampling = /^claude-(opus-4-1|sonnet-4-5|haiku-4-5)/.test(request.body.model); |
| 160 | const cacheTTL = getConfigValue('claude.extendedTTL', false, 'boolean') ? '1h' : '5m'; | 160 | const cacheTTL = getConfigValue('claude.extendedTTL', false, 'boolean') ? '1h' : '5m'; |
| 161 | let fixThinkingPrefill = false; | 161 | let fixThinkingPrefill = false; |
| 162 | // Add custom stop sequences | 162 | // Add custom stop sequences |
| @@ -1834,7 +1834,7 @@ router.post('/generate', function (request, response) { | |||
| 1834 | } | 1834 | } |
| 1835 | 1835 | ||
| 1836 | const cachingAtDepth = getConfigValue('claude.cachingAtDepth', -1, 'number'); | 1836 | const cachingAtDepth = getConfigValue('claude.cachingAtDepth', -1, 'number'); |
| 1837 | const isClaude3or4 = /anthropic\/claude-(3|opus-4|sonnet-4)/.test(request.body.model); | 1837 | const isClaude3or4 = /anthropic\/claude-(3|opus-4|sonnet-4|haiku-4-5)/.test(request.body.model); |
| 1838 | const cacheTTL = getConfigValue('claude.extendedTTL', false, 'boolean') ? '1h' : '5m'; | 1838 | const cacheTTL = getConfigValue('claude.extendedTTL', false, 'boolean') ? '1h' : '5m'; |
| 1839 | if (Array.isArray(request.body.messages) && Number.isInteger(cachingAtDepth) && cachingAtDepth >= 0 && isClaude3or4) { | 1839 | if (Array.isArray(request.body.messages) && Number.isInteger(cachingAtDepth) && cachingAtDepth >= 0 && isClaude3or4) { |
| 1840 | cachingAtDepthForOpenRouterClaude(request.body.messages, cachingAtDepth, cacheTTL); | 1840 | cachingAtDepthForOpenRouterClaude(request.body.messages, cachingAtDepth, cacheTTL); |