mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-25 06:44:59 +00:00
Re-raise openai.error.InvalidRequestError if it is not context exhaustion
This commit is contained in:
parent
b4fe54a917
commit
579a3eb4c3
1 changed files with 2 additions and 0 deletions
|
@ -485,6 +485,8 @@ class Coder:
|
||||||
except openai.error.InvalidRequestError as err:
|
except openai.error.InvalidRequestError as err:
|
||||||
if "maximum context length" in str(err):
|
if "maximum context length" in str(err):
|
||||||
exhausted = True
|
exhausted = True
|
||||||
|
else:
|
||||||
|
raise err
|
||||||
|
|
||||||
if exhausted:
|
if exhausted:
|
||||||
self.num_exhausted_context_windows += 1
|
self.num_exhausted_context_windows += 1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue