fix: use _max_tokens_param in max-iterations retry path
The retry summary in _handle_max_iterations hardcodes max_tokens instead of calling _max_tokens_param(). For direct OpenAI API users (gpt-4o, o-series), the correct parameter name is max_completion_tokens. The first attempt at line 2697 already uses _max_tokens_param correctly but the retry path at line 2743 was missed.
This commit is contained in:
parent
ada3713e77
commit
e25ad79d5d
2 changed files with 29 additions and 1 deletions
|
|
@ -2740,7 +2740,7 @@ class AIAgent:
|
|||
"messages": api_messages,
|
||||
}
|
||||
if self.max_tokens is not None:
|
||||
summary_kwargs["max_tokens"] = self.max_tokens
|
||||
summary_kwargs.update(self._max_tokens_param(self.max_tokens))
|
||||
if summary_extra_body:
|
||||
summary_kwargs["extra_body"] = summary_extra_body
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue