I’m using a LiteLLM router with LangChain to switch between multiple models, but I’m having an issue with observability in LangSmith. Here’s my setup:
from langchain_litellm import ChatLiteLLMRouter
from litellm.router import Router
model_list = [
{
"model_name": "medium",
"litellm_params": {
"model": "openai/gpt-4.1-mini",
"api_key": settings.openai_api_key.get_secret_value(),
},
},
{
"model_name": "medium",
"litellm_params": {
"model": "anthropic/claude-haiku-4-5",
"api_key": settings.anthropic_api_key.get_secret_value(),
},
},
]
router = Router(
model_list=model_list,
routing_strategy="simple-shuffle",
num_retries=2,
)
chat = ChatLiteLLMRouter(
router=router,
model="medium",
temperature=0,
streaming=True,
stream_options={"include_usage": True},
)
I’m using a LiteLLM router through LangChain and in LangSmith I only see token usage (input/output), but I don’t see the actual model that was used for each call and the cost per LLM invocation (cost is the most important metric I need). Is there a way to enable this via configuration, or do I need to implement a custom handler? It just feels a bit surprising that this isn’t supported out of the box in LangChain/LangSmith.
Thanks in advance!

