Skip to content

Commit ec1477c

Browse files
committed
debug: log whether AutoAgents passes json_schema to chat method
Added logging to verify if AutoAgents ReAct framework actually uses the output_schema() method and passes it to chat() calls. Will show: - ✅ AutoAgents passed json_schema - API-level enforcement active - ⚠️ AutoAgents did NOT pass json_schema - prompt-only enforcement This answers whether structured outputs are enforced at API level or only through prompt instructions.
1 parent 59afae3 commit ec1477c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

crates/codegraph-mcp/src/autoagents/agent_builder.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,13 @@ impl ChatProvider for CodeGraphChatAdapter {
7272
_tools: Option<&[Tool]>,
7373
json_schema: Option<autoagents::llm::chat::StructuredOutputFormat>,
7474
) -> Result<Box<dyn ChatResponse>, LLMError> {
75+
// Log whether schema is being passed by AutoAgents
76+
if json_schema.is_some() {
77+
tracing::info!("✅ AutoAgents passed json_schema to chat()");
78+
} else {
79+
tracing::warn!("⚠️ AutoAgents did NOT pass json_schema - schema enforcement may be prompt-only!");
80+
}
81+
7582
// Convert AutoAgents messages to CodeGraph messages
7683
let cg_messages: Vec<Message> = messages
7784
.iter()

0 commit comments

Comments
 (0)