@@ -68,19 +68,20 @@ class Chatgpt_5(Chatgpt): 'gpt-5-codex': { 'input': Decimal('0.000625'), 'output': Decimal('0.005'), - } + }, + 'gpt-5.2': { + 'input': Decimal('0.000875'), + 'output': Decimal('0.007'), + 'web_search': { + 'low': Decimal('5'), # 1 call + 'medium': Decimal('5'), # 1 call + 'high': Decimal('5') # 1 call + }, + 'code_interpreter': Decimal('15') # 1 call + }, } - TOKEN_LIMITS = { - 'gpt-5': 200_000, - 'gpt-5-mini': 200_000, - 'gpt-5-nano': 200_000, - 'gpt-5.1': 200_000, - 'gpt-5-pro': 200_000, - 'gpt-5.1-codex-max': 200_000, - 'gpt-5.1-codex': 200_000, - 'gpt-5-codex': 200_000, - } + TOKEN_LIMITS = {key: 200_000 for key in TOKENS_COST.keys()} def make( self, @@ -170,13 +171,21 @@ class Chatgpt_5(Chatgpt): 'Минимальный': 'minimal', 'Низкий': 'low', 'Средний': 'medium', - 'Высокий': 'high' + 'Высокий': 'high', + 'Сверхвысокий': 'xhigh' } json_data['reasoning']['effort'] = reasoning_data[info['reasoning']] json_data['reasoning']['summary'] = 'auto' if info.get('reasoning') == 'Минимальный': info.pop('web_search', None) info.pop('code_interpreter', None) + if model_name == 'gpt-5.2' and info.get('verbosity', 'Отключено') != 'Отключено': + verbosity_data = { + 'Низкий': 'low', + 'Средний': 'medium', + 'Высокий': 'high', + } + json_data['text'] = {'verbosity': verbosity_data[info['verbosity']]} if model_name in ('gpt-5-nano', 'gpt-5-codex', 'gpt-5.1-codex', 'gpt-5.1-codex-max'): info.pop('web_search', None) if info.get('web_search', 'Отключено') != 'Отключено':