Skip to main content

Overview

Promptfoo can evaluate TokenLab through its OpenAI-compatible chat and Responses providers.
Type: Evaluation FrameworkPrimary Paths: OpenAI-compatible chat completions and ResponsesSupport Confidence: Supported path

Environment

export TOKENLAB_API_KEY="sk-your-tokenlab-key"

Example Config

description: TokenLab provider example

prompts:
  - 'Answer in one concise paragraph: {{question}}'

providers:
  - id: openai:chat:gpt-5.4-mini
    label: tokenlab-chat-gpt-5.4-mini
    config:
      apiBaseUrl: https://api.tokenlab.sh/v1
      apiKey: '{{env.TOKENLAB_API_KEY}}'
  - id: openai:responses:gpt-5.5
    label: tokenlab-responses-gpt-5.5
    config:
      apiBaseUrl: https://api.tokenlab.sh/v1
      apiKey: '{{env.TOKENLAB_API_KEY}}'

tests:
  - vars:
      question: What are two practical ways to evaluate an LLM gateway?
    assert:
      - type: contains-any
        value:
          - latency
          - reliability
          - cost
          - quality

Run

promptfoo eval
Use chat providers for broad compatibility. Use Responses providers when the eval specifically depends on Responses behavior.