Overview
What this demonstrates:- Using LiteLLM for provider abstraction
- Switching between providers seamlessly
- Capturing events from any provider
oisp-cookbook/python/02-litellm
Key Code
Captured Events
OISP Sensor detects the actual provider used:gpt-4o-mini→provider: "OpenAI"claude-3-haiku→provider: "Anthropic"gemini-pro→provider: "Google"
Running
Use Cases
- Multi-provider failover
- Cost optimization (route to cheapest)
- A/B testing models
- Provider-agnostic applications