Skip to content

[py/openai] Fail locally when tools are sent to reasoning models without reasoning_effort='none' #194

Backlog

Description

@cabljac

On Chat Completions, gpt-5.6-sol, gpt-5.6-terra, gpt-5.6-luna, gpt-6-sol, gpt-6-luna and gpt-6.1-terra accept function tools only with reasoning_effort='none', and they don't default to it. Their catalog info advertises tools=True, so this call goes out with tools and no reasoning_effort and fails at the API:

ai.generate(model=OpenAI.gpt('gpt-6-sol'), prompt='...', tools=['get_weather'])

The README documents the constraint (## Tools on reasoning models), but the first call still fails with a server 400, and the Dev UI shows tools as supported without the condition.

Proposal

Fail locally with INVALID_ARGUMENT that names reasoning_effort='none', the same way the GPT Image xhigh/max check works:

  • Applies only to these ids (and their dated snapshots) when the request has tools.
  • Reads reasoning_effort from both config and extra.
  • Skips OpenAI-compatible hosts, which may serve the same ids with different rules.

Auto-sending reasoning_effort='none' was considered and rejected: it changes reasoning without the user asking.

Raised in review of #128.

Activity

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