(
&self,
messages: &[Message],
system: Option<&str>,
tools: &[ToolDefinition],
)
| 1633 | #[async_trait::async_trait] |
| 1634 | impl LlmClient for SchemaCoercionClient { |
| 1635 | async fn complete( |
| 1636 | &self, |
| 1637 | messages: &[Message], |
| 1638 | system: Option<&str>, |
| 1639 | tools: &[ToolDefinition], |
| 1640 | ) -> Result<LlmResponse> { |
| 1641 | if system == Some(crate::prompts::PRE_ANALYSIS_SYSTEM) { |
| 1642 | return Ok(pre_analysis_response(messages)); |
| 1643 | } |
| 1644 | // The structured-output coercion injects a synthetic tool named |
| 1645 | // `emit_<schema_name>` (here `emit_step_output`). |
| 1646 | if tools.iter().any(|t| t.name == "emit_step_output") { |
| 1647 | return Ok(MockLlmClient::tool_call_response( |
| 1648 | "coerce-1", |
| 1649 | "emit_step_output", |
| 1650 | serde_json::json!({ "verdict": "ok" }), |
| 1651 | )); |
| 1652 | } |
| 1653 | Ok(text_response("The verdict is ok.")) |
| 1654 | } |
| 1655 | |
| 1656 | async fn complete_streaming( |
| 1657 | &self, |
nothing calls this directly
no test coverage detected