a9aa594d73
LiteLLM passes extra parameters as top-level JSON fields in the request body. _extract_agent_name() now reads agent_id and agent_name from the body first, then falls back to X-Agent-Name / X-Agent-Id headers. Critically, both fields are stripped from the body before any upstream call — otherwise Claude/LM Studio reject the unknown parameters. Applied to all four route handlers: /v1/chat/completions, /v1/messages, /api/chat, /api/generate. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>