Skip to main content
PrismML provides the open-weight Bonsai model family, which can run locally through an OpenAI-compatible server. The default server endpoint is http://localhost:8080/v1, so Phoenix captures PrismML calls via the openinference-instrumentation-openai package, the same instrumentor that covers OpenAI’s hosted API.

Prerequisites

Start PrismML’s OpenAI-compatible server at http://localhost:8080 by following PrismML’s Run the Server guide. The server loads the model selected by its configuration and does not require authentication.

Install

Setup

PrismML’s local server does not require an API key. The OpenAI client still requires a non-empty value, so the example uses not-needed. Connect your application to Phoenix with the register function:

Run PrismML

Observe

Now that you have tracing set up, all invocations of the OpenAI client pointed at PrismML will be streamed to your running Phoenix for observability and evaluation. Each call appears as a ChatCompletion LLM span with the prompt, response, model name, token usage, and latency.

Common Issues

  • Spans missing: register(..., auto_instrument=True) must run before your application sends requests, and openinference-instrumentation-openai must be installed in the same environment
  • Connection refused or ConnectError to localhost:8080: The PrismML server is not running or is listening on a different port. Start it with PrismML’s server instructions
  • Model not found: The server exposes the model it loaded. Use the model name returned by GET http://localhost:8080/v1/models, or use bonsai as shown in this guide
  • Empty or cut-off answer: Thinking used up max_tokens before the model finished. PrismML recommends a max_tokens of 8,192 or more with thinking on

Resources

PrismML OpenAI-Compatible Server

OpenInference OpenAI Instrumentation