Skip to content

openai-codex classifier fails closed because temperature is unsupported #3

Description

@Enubia

Summary

Using openai-codex/gpt-5.6-luna as the classifier causes classifier-routed tool calls to fail closed with:

Classifier response was not valid decision JSON; auto mode fails closed.

The response is not malformed JSON. The underlying provider error is:

Codex error: Unsupported parameter: temperature

Reproduction

With @czottmann/pi-automode 1.7.0, set:

{
  "autoMode": {
    "classifierModel": "openai-codex/gpt-5.6-luna"
  }
}

Then trigger any classifier-routed action.

Cause

classifyWithRetry() defaults temperature to 0 and always passes it to complete(). The openai-codex-responses endpoint rejects that parameter.

The resulting assistant message has stopReason: "error", empty text, and the provider error in errorMessage. The classifier tries to parse the empty text and replaces the useful provider error with the misleading invalid-JSON message.

Expected behavior

  • Omit temperature for openai-codex-responses classifier calls.
  • Handle stopReason: "error" before JSON parsing and fail closed with the sanitized errorMessage.

Suggested regression coverage

  • An openai-codex classifier completion receives no unsupported temperature option.
  • An assistant response containing stopReason: "error" and errorMessage reports the provider failure rather than malformed JSON.

As a control, openai/gpt-5.6-luna works with the current classifier options, and openai-codex/gpt-5.6-luna works as a normal Pi model with provider-compatible options.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions