fix: Add fallback for reasoning_content attribute access

This commit is contained in:
Paul Gauthier 2025-03-09 08:24:09 -07:00 committed by Paul Gauthier (aider)
parent f5a5b85e9d
commit a405063385

View file

@ -1712,7 +1712,10 @@ class Coder:
try:
reasoning_content = completion.choices[0].message.reasoning_content
except AttributeError:
reasoning_content = None
try:
reasoning_content = completion.choices[0].message.reasoning
except AttributeError:
reasoning_content = None
try:
self.partial_response_content = completion.choices[0].message.content or ""