Remove council_query tool to force stage-by-stage usage
The all-in-one council_query tool returned everything as a single blob, preventing the iOS app from displaying individual model responses as separate content blocks. By removing it, the agent must now use: - council_stage1_collect (individual responses) - council_stage2_rank (peer rankings) - council_stage3_synthesize (final synthesis) Each stage call generates a separate tool_result, enabling granular display in the UI.
This commit is contained in:
@@ -59,55 +59,7 @@ async def api_request(
|
||||
|
||||
|
||||
# ============================================================================
|
||||
# HIGH-LEVEL COUNCIL TOOL
|
||||
# ============================================================================
|
||||
|
||||
@mcp.tool()
|
||||
async def council_query(
|
||||
query: str,
|
||||
conversation_id: str | None = None
|
||||
) -> dict[str, Any]:
|
||||
"""
|
||||
Run the complete LLM Council 3-stage deliberation process.
|
||||
|
||||
Stage 1: Query all council models in parallel for individual responses.
|
||||
Stage 2: Each model anonymously ranks the other responses.
|
||||
Stage 3: Chairman model synthesizes a final answer based on all inputs.
|
||||
|
||||
This process typically takes 1-3 minutes depending on model response times.
|
||||
|
||||
Args:
|
||||
query: The user's question to deliberate on
|
||||
conversation_id: Optional existing conversation ID for multi-turn context
|
||||
|
||||
Returns:
|
||||
Complete council response with all 3 stages and metadata including:
|
||||
- conversation_id: The conversation ID used
|
||||
- stage1: Individual model responses
|
||||
- stage2: Peer rankings with aggregate scores
|
||||
- stage3: Chairman's synthesized final answer
|
||||
- metadata: Label mappings and aggregate rankings
|
||||
"""
|
||||
# Create conversation if not provided
|
||||
if not conversation_id:
|
||||
conv = await api_request("POST", "/api/conversations", {})
|
||||
conversation_id = conv["id"]
|
||||
|
||||
# Send message and get full council response
|
||||
result = await api_request(
|
||||
"POST",
|
||||
f"/api/conversations/{conversation_id}/message",
|
||||
{"content": query}
|
||||
)
|
||||
|
||||
return {
|
||||
"conversation_id": conversation_id,
|
||||
**result
|
||||
}
|
||||
|
||||
|
||||
# ============================================================================
|
||||
# INDIVIDUAL STAGE TOOLS
|
||||
# INDIVIDUAL STAGE TOOLS (council_query removed to force stage-by-stage usage)
|
||||
# ============================================================================
|
||||
|
||||
@mcp.tool()
|
||||
|
||||
Reference in New Issue
Block a user