OpenAI client and the SDK meters it with the OpenAI recipe.
Set up
Point theOpenAI client’s baseURL at vLLM and wrap it:
http://localhost:8000/v1 is vLLM’s default.
What is reported
vLLM returns ausage object in OpenAI’s format with the number of tokens each call consumed. Calls are reported under the openai.chat.completions.create event name, with the same metrics as OpenAI.
Every usage field the provider returns is also included, with a raw. prefix. See How usage is reported.
For details on vLLM’s API, see vLLM’s OpenAI-compatible server docs.