Making WordPress.org

Changeset 14609


Ignore:
Timestamp:
11/18/2025 05:24:37 PM (3 months ago)
Author:
amieiro
Message:

Translate: Add the reasoning_effort value for OpenAI gpt-5.1 model

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/inc/ai/class-openai-client.php

    r14593 r14609  
    145145            $body['reasoning_effort']  = 'minimal';
    146146            $body['verbosity']         = 'low';
    147         }
     147
     148            // For gpt-5.1 specifically
     149            if ( preg_match( '/^gpt-5\.1(?:$|-)/i', $this->model ) ) {
     150                $body['reasoning_effort'] = 'none';
     151            }
     152        }
     153       
    148154        $response = $this->request( '/chat/completions', $body );
    149155        if ( false === $response ) {
Note: See TracChangeset for help on using the changeset viewer.