refactor(models): Refine MessageAgentThought SQLAlchemy typing#11
Conversation
🤖 Augment PR SummarySummary: Refactors the Changes:
🤖 Was this summary 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.
tool_responses is parsed above but this ToolPromptMessage uses tool_inputs, which looks like it will surface the tool inputs as the tool output in history. This also makes tool_responses unused, so consider switching this to tool_responses.get(...) (stringified) to preserve the actual observation/result.
🤖 Was this 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=Decimal("0.001") with answer_price_unit=Decimal(0) seems inverted compared to the message fields and the DB defaults (price unit defaulting to 0.001). If this record is read before llm_usage is applied, these initial values could misrepresent pricing.
🤖 Was this useful? React with 👍 or 👎
Benchmark PR from agentic-review-benchmarks#11