plano/demos/llm_routing/session_pinning/demo.sh
Adil Hafeez 0105897692 add session pinning to llm_chat handler and rewrite session pinning demo
- extend brightstaff llm_chat_inner to extract X-Session-Id, check the
  session cache before routing, and cache the result afterward — same
  pattern as routing_service.rs
- replace old urllib-based demo with a real FastAPI research agent that
  runs 3 independent tool-calling tasks with alternating intents so
  Plano routes to different models; demo.py is a pure httpx client that
  shows the routing trace side-by-side with and without session pinning
2026-03-26 16:44:05 -07:00

19 lines
441 B
Bash
Executable file

#!/bin/bash
set -e
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
export PLANO_URL="${PLANO_URL:-http://localhost:12000}"
export AGENT_PORT="${AGENT_PORT:-8000}"
export AGENT_URL="http://localhost:$AGENT_PORT"
cleanup() {
[ -n "$AGENT_PID" ] && kill "$AGENT_PID" 2>/dev/null
}
trap cleanup EXIT INT TERM
# Start the agent in the background
"$SCRIPT_DIR/start_agents.sh" &
AGENT_PID=$!
# Run the demo client
uv run "$SCRIPT_DIR/demo.py"