Skip to main content

Python agent settings

Required options

llm_license= llm.whatap.server.host=

The Python agent can be used with an APM project and an LLMOBS project together. The values related to the LLM project must be tagged in these options.

llm_enabled=true

This option enables the LLM logsink pack and metric collection. When you use LLMOBS, this option must be set to true.

Recognizing LLM API hosts

llm_api_hosts=localhost:8000,api.openai.com:443

This option lets the agent treat calls to LLM API endpoints that automatic instrumentation does not know (vLLM, LiteLLM, a private gateway, and so on) as LLM calls. The httpc driver marks calls going to those hosts with the LLM API driver.

Entering model prices manually

llm_model_pricing=gpt-4o|2.50|10.00|1.25,gpt-4o-mini|0.15|0.60|0.075,my-custom-model|1.00|5.00

You can specify the price per token of a model manually. The configured value takes the highest precedence even when the actual cost is recognized.

Format: model|input_per_1m|output_per_1m|cached_per_1m

  • 4 fields

  • Models are separated by commas

  • The fourth field (cached) is optional and can be left empty or omitted