-
-
Notifications
You must be signed in to change notification settings - Fork 774
fix: correct duplicate gpt-4o-mini key in MODEL_WINDOWS to gpt-4o #1115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -107,7 +107,7 @@ class LLM: | |
| MODEL_WINDOWS = { | ||
| # OpenAI | ||
| "gpt-4": 6144, # 8,192 actual | ||
| "gpt-4o-mini": 96000, # 128,000 actual | ||
| "gpt-4o": 96000, # 128,000 actual | ||
| "gpt-4o-mini": 96000, # 128,000 actual | ||
|
Comment on lines
107
to
111
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Normalize provider-qualified model names before relying on this entry. This fixes bare 💡 Proposed fix def get_context_size(self) -> int:
"""Get safe input size limit for this model"""
- for model_prefix, size in self.MODEL_WINDOWS.items():
- if self.model.startswith(model_prefix):
+ normalized_model = self.model.split("/", 1)[-1] if self.model else ""
+ for model_prefix, size in self.MODEL_WINDOWS.items():
+ if normalized_model.startswith(model_prefix):
return size
return 4000 # Safe default🧰 Tools🪛 Ruff (0.15.4)[warning] 107-147: Mutable default value for class attribute (RUF012) 🤖 Prompt for AI Agents |
||
| "gpt-4-turbo": 96000, # 128,000 actual | ||
| "o1-preview": 96000, # 128,000 actual | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1. Provider-prefixed model mismatch
🐞 Bug✓ CorrectnessAgent Prompt
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools