Configure Promptfoo’s target and grader separately.

Promptfoo provider documentation and one public issue checked 27 October 2026. No Promptfoo run or provider request was tested.

Promptfoo has two provider roles here: providers sends the test prompt to the model under test; defaultTest.options.provider sends model-graded assertions to a judge. A compatible gateway can serve the first model and still reject the grader's different model ID. Use openai:chat: when the custom endpoint accepts Chat Completions; a bare openai: ID selects Promptfoo's Responses route for supported recent OpenAI models.

Set the model under test

Use the exact model ID your gateway documents or lists. For a custom OpenAI-compatible Chat Completions API, set apiBaseUrl to its API root, including a required prefix such as /v1. Do not append /chat/completions or /responses; Promptfoo builds the operation path.

apiHost is a hostname setting that builds the HTTPS /v1 root. Use apiBaseUrl when the endpoint has a custom path, protocol, or port.

Point model-graded assertions to a supported judge

Only model-graded assertions, such as llm-rubric, need a grader model. Deterministic checks such as contains do not need one. If the model output was returned but the evaluation fails with an unsupported model or model-not-found message, check which provider made the grading call.

Promptfoo target and grader configuration
providers:
  - id: openai:chat:YOUR_TARGET_MODEL_ID
    config:
      apiBaseUrl: https://api.example.com/v1
      apiKeyEnvar: MODEL_API_KEY

defaultTest:
  options:
    provider:
      id: openai:chat:YOUR_GRADER_MODEL_ID
      config:
        apiBaseUrl: https://api.example.com/v1
        apiKeyEnvar: MODEL_API_KEY
  assert:
    - type: llm-rubric
      value: The answer addresses the question accurately

Replace both model IDs with IDs supported by the endpoint. They may be the same, but they do not have to be. Keep MODEL_API_KEY in the environment of the process running Promptfoo; the official configuration says a missing apiKeyEnvar value does not fall back to OPENAI_API_KEY.

Separate a path failure from a grader failure

Observed failureCheck
404 on the target requestCompare the configured apiBaseUrl with the provider's API root. Confirm whether the documented base needs /v1; do not put the full operation path in this field.
Target response succeeds, then a grading error appearsCheck defaultTest.options.provider and any test- or assertion-level provider override. Confirm the judge model ID is served by that same endpoint.
API key is not setCheck that MODEL_API_KEY exists in the environment of the Promptfoo process and is available to its execution container or CI job.
Only a deterministic assertion failsCheck the assertion value and actual target output. A model grader setting does not change the target model or its response.

Promptfoo issue #10526 describes one report where an origin-only apiBaseUrl omitted /v1 and the default grader requested a model the gateway did not serve. The issue remained open when checked on 27 October 2026. This report does not show how common the failure is or prove that every current installation behaves the same way.

Check the current Promptfoo configuration

Documentation and the public issue checked 27 October 2026. No Promptfoo run, account, API key, or provider request was used.

Exact symptom wording and source

Use the quoted text to locate the relevant check. Providers and clients can phrase the same failure differently; compare the complete response before applying a fix.

  • Reported text: Promptfoo custom OpenAI-compatible API: grader model not found or 404 after target success

    One custom OpenAI-compatible API report combines an apiBaseUrl missing /v1 with a default grader model the gateway does not serve. Promptfoo's current docs say apiBaseUrl must include a documented API prefix such as /v1 and the grader is configured separately; llm-rubric can fail with an unsupported model. This does not establish prevalence or current behavior for every version.

    Open this check

    default graders still use gpt-5.5

    Promptfoo issue #10526, open report checked 27 October 2026