From dc6aeb638d5fe3e9bffac11e57b4f358b00366eb Mon Sep 17 00:00:00 2001 From: Joshua Vial Date: Wed, 29 Nov 2023 23:26:02 +1300 Subject: [PATCH] gpt-4-vision-preiview can receive 128k tokens --- aider/commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aider/commands.py b/aider/commands.py index 81045c246..0ccc1f273 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -175,7 +175,7 @@ class Commands: # Check if any images are in the chat and override the max context window size if so image_in_chat = any(relative_fname.endswith(ext) for ext in IMAGE_EXTENSIONS for relative_fname in self.coder.get_inchat_relative_files()) - limit = 4096 if image_in_chat else self.coder.main_model.max_context_tokens + limit = 128000 if image_in_chat else self.coder.main_model.max_context_tokens remaining = limit - total if remaining > 1024: self.io.tool_output(f"{cost_pad}{fmt(remaining)} tokens remaining in context window")