mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-07 08:26:51 +00:00
Hard cap max tokens for 3-7 models in lieu of extended thinking
This commit is contained in:
parent
88de5b26cd
commit
8eb9c28bb2
1 changed files with 8 additions and 2 deletions
|
|
@ -32,11 +32,17 @@ export async function getLiteLLMModels(apiKey: string, baseUrl: string): Promise
|
|||
|
||||
if (!modelName || !modelInfo || !litellmModelName) continue
|
||||
|
||||
let determinedMaxTokens = modelInfo.max_tokens || modelInfo.max_output_tokens || 8192
|
||||
|
||||
if (modelName.includes("claude-3-7-sonnet")) {
|
||||
// due to https://github.com/BerriAI/litellm/issues/8984 until proper extended thinking support is added
|
||||
determinedMaxTokens = 64000
|
||||
}
|
||||
|
||||
models[modelName] = {
|
||||
maxTokens: modelInfo.max_tokens || 8192,
|
||||
maxTokens: determinedMaxTokens,
|
||||
contextWindow: modelInfo.max_input_tokens || 200000,
|
||||
supportsImages: Boolean(modelInfo.supports_vision),
|
||||
// litellm_params.model may have a prefix like openrouter/
|
||||
supportsComputerUse: Boolean(modelInfo.supports_computer_use),
|
||||
supportsPromptCache: Boolean(modelInfo.supports_prompt_caching),
|
||||
inputPrice: modelInfo.input_cost_per_token ? modelInfo.input_cost_per_token * 1000000 : undefined,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue