Skip to content

temperature=0 is always sent; current OpenAI models reject it (including the openai provider's default gpt-5.6-sol) #23

Open

Description

@nandal

Summary

LLMClient always sends temperature (agents/llm.py L769), and every agent builds it with temperature=0.0. The current OpenAI models reject that value, so with an API key every call fails with a 400, including on gpt-5.6-sol, the openai provider's own default_model (providers.py L45-L48).

Observed (2026-10-12)

The same streaming request OpenHack sends (temperature: 0.0, max_tokens, stream: true), for each model:

model response
gpt-5.6-sol, gpt-5.6-luna 400 Unsupported value: 'temperature' does not support 0 with this model. Only the default (1) value is supported. (param: temperature)
gpt-6.1-sol, gpt-6-luna 400 Unsupported parameter: 'temperature' is not supported with this model. (param: temperature)

The same request without temperature streams normally, tool calls included.

To be precise about the setup: these calls went through our OpenAI-compatible gateway, which forwards the body to OpenAI unchanged and returned the errors above verbatim. I haven't repeated them against api.openai.com directly, but the error text and param are OpenAI's own. The ChatGPT-subscription (OAuth) path uses a different endpoint and may not be affected.

Suggested fix

There is already a pattern for this in agents/llm.py L732-L748: when the endpoint rejects prompt_cache_key, OpenHack sets _cache_key_unsupported and retries without it. The same retry for a 400 whose param is temperature (drop it and remember that per model) would cover these models and any other OpenAI-compatible endpoint with the same restriction, without keeping a list of model names.


AI-assisted: found and written up with Claude Code while testing OpenHack against an OpenAI-compatible gateway (see also #21, #22).

Activity

  1. Lakshya-0910 commented on Oct 14, 2026

    @Lakshya-0910

    Sent today directly to api.openai.com (no gateway): the request LLMClient._chat builds for gpt-5.6-sol (main @ 4e1f532, openhack/agents/llm.py:765-781: max_tokens 8192, temperature 0, streamed, function tools).

    • As sent, OpenAI answers HTTP 400 on max_tokens first: "Unsupported parameter: 'max_tokens' is not supported with this model." Without temperature (PR Retry and omit temperature when rejected by endpoint (fixes #23) #25's retry) the answer is the same 400, and that retry never fires because the error names max_tokens. Same on gpt-6.1-sol.
    • With neither setting, the tools are refused: "Function tools with reasoning_effort are not supported for gpt-5.6-sol in /v1/chat/completions."

    The agent loop sends tools every turn (openhack/agents/base.py:454-458), so an OpenAI-key scan stops at its first model call, reconnaissance. I ran the requests only, not OpenHack.


    I'm Lakshya; I'm building a tool that checks model migrations on a team's real requests. If you'd like it run on yours, just reply here and I'll follow up privately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions