refactor(models): Refine MessageAgentThought SQLAlchemy typing#46
Conversation
🤖 Augment PR SummarySummary: This PR refactors the Changes:
Technical Notes: The model now defaults nullable fields to 🤖 Was this summary useful? React with 👍 or 👎 |
| answer_token=0, | ||
| answer_unit_price=0, | ||
| answer_price_unit=0, | ||
| answer_unit_price=Decimal("0.001"), |
There was a problem hiding this comment.
In create_agent_thought, answer_unit_price/answer_price_unit look swapped vs the model defaults (*_price_unit is non-null and defaults to 0.001). Setting answer_price_unit=Decimal(0) could lead to incorrect cost calculations (or division-by-zero assumptions elsewhere) if this row is read before llm_usage is applied.
🤖 Was this useful? React with 👍 or 👎
| tool_call_response.append( | ||
| ToolPromptMessage( | ||
| content=tool_responses.get(tool, agent_thought.observation), | ||
| content=str(tool_inputs.get(tool, agent_thought.observation)), |
There was a problem hiding this comment.
ToolPromptMessage.content is built from tool_inputs here, so the reconstructed tool message history will contain inputs rather than tool observations; also tool_responses becomes effectively unused. This likely breaks downstream behavior that expects the tool-response payload in the tool message.
🤖 Was this useful? React with 👍 or 👎
Benchmark PR from qodo-benchmark#425