%s', esc_html__( 'Pro', 'ai-content-wizard' ) ); $pro_note = sprintf( '%s', esc_html__( 'Available in AI Content Wizard Pro', 'ai-content-wizard' ) ); $upgrade_cta = sprintf( '%2$s', esc_url( 'https://aiwizard.buyreadysite.com/' ), esc_html__( 'Unlock in Pro', 'ai-content-wizard' ) ); $text_provider_locked = array( 'openai' => ! in_array( 'openai', $lite_text_providers, true ), 'anthropic' => ! in_array( 'anthropic', $lite_text_providers, true ), 'deepseek' => ! in_array( 'deepseek', $lite_text_providers, true ), 'gemini' => ! in_array( 'gemini', $lite_text_providers, true ), 'grok' => ! in_array( 'grok', $lite_text_providers, true ), ); $text_provider_labels = array( 'openai' => __( 'OpenAI', 'ai-content-wizard' ), 'anthropic' => __( 'Claude (Anthropic)', 'ai-content-wizard' ), 'deepseek' => __( 'DeepSeek', 'ai-content-wizard' ), 'gemini' => __( 'Google Gemini', 'ai-content-wizard' ), 'grok' => __( 'xAI Grok', 'ai-content-wizard' ), ); $openai_regular_models = array( 'gpt-5.1' => 'GPT-5.1', 'gpt-5-mini' => 'GPT-5 Mini', 'gpt-4.5-preview'=> 'GPT-4.5-preview', 'gpt-4.1' => 'GPT‑4.1', 'gpt-4.1-mini' => 'GPT‑4.1 Mini', 'gpt-4.1-nano' => 'GPT‑4.1 Nano', 'gpt-4o' => 'GPT‑4o', 'gpt-4o-mini' => 'GPT‑4o Mini' ); $openai_reasoning_models = array( 'o1' => 'O1', 'o1-pro' => 'O1 Pro', 'o1-mini' => 'O1 Mini', 'o3' => 'O3', 'o3-mini' => 'O3 Mini', 'o4-mini' => 'O4 Mini', 'gpt-5' => 'GPT-5', ); $anthropic_default = array( 'claude-4.5-sonnet-latest' => 'Claude Sonnet 4.5', 'claude-4-sonnet-latest' => 'Claude Sonnet 4', 'claude-4.5-haiku-latest' => 'Claude Haiku 4.5', 'claude-4.1-opus-latest' => 'Claude Opus 4.1', 'claude-4-opus-latest' => 'Claude Opus 4', 'claude-3-7-sonnet-20250219' => 'Claude 3.7 Sonnet', 'claude-3-5-haiku-20241022' => 'Claude 3.5 Haiku', 'claude-3-5-sonnet-20241022' => 'Claude 3.5 Sonnet', 'claude-3-opus-20240229' => 'Claude 3 Opus', 'claude-3-haiku-20240307' => 'Claude 3 Haiku' ); $deepseek_default_models = array( 'deepseek-chat' => 'DeepSeek V3 (Chat)', 'deepseek-reasoner' => 'DeepSeek R1 (Reasoner)' ); $gemini_all_models = array( 'gemini-3-pro-preview' => 'Gemini 3 Pro Preview', 'gemini-2.5-pro' => 'Gemini 2.5 Pro', 'gemini-2.5-flash' => 'Gemini 2.5 Flash', 'gemini-2.0-flash' => 'Gemini 2.0 Flash', 'gemini-2.0-flash-lite' => 'Gemini 2.0 Flash-Lite' ); $grok4_models = array( 'grok-4-fast-reasoning' => 'Grok 4 Fast Reasoning', 'grok-4-fast-non-reasoning' => 'Grok 4 Fast Non-Reasoning', 'grok-code-fast-1' => 'Grok Code Fast 1', 'grok-4' => 'Grok 4' ); $grok3_models = array( 'grok-3' => 'Grok 3', 'grok-3-mini' => 'Grok 3 Mini' ); $text_model_labels = array_merge( $openai_regular_models, $openai_reasoning_models, $anthropic_default, $deepseek_default_models, $gemini_all_models, $grok4_models, $grok3_models ); if ( ! in_array( $text_model, $lite_text_models, true ) ) { $text_model = 'gpt-4o-mini'; ai_content_wizard_update_setting( 'ai_content_wizard_text_model', $text_model ); } // Определяем текущего провайдера для текстовых моделей. $current_provider = 'openai'; if ( strpos( strtolower( $text_model ), 'gpt' ) !== false ) { $current_provider = 'openai'; } elseif ( strpos( strtolower( $text_model ), 'claude' ) !== false ) { $current_provider = 'anthropic'; } elseif ( strpos( strtolower( $text_model ), 'deepseek' ) !== false ) { $current_provider = 'deepseek'; } elseif ( strpos( strtolower( $text_model ), 'gemini' ) !== false ) { $current_provider = 'gemini'; } elseif ( strpos( strtolower( $text_model ), 'grok' ) !== false ) { $current_provider = 'grok'; } $active_text_model_label = $text_model_labels[ $text_model ] ?? strtoupper( $text_model ); $active_text_provider_label = $text_provider_labels[ $current_provider ] ?? ucfirst( $current_provider ); // --- Web search capable models --- $web_search_capable = ( $current_provider === 'openai' ) && in_array( $text_model, array( 'gpt-4.1', 'gpt-4o', 'gpt-4o-search-preview', 'gpt-4.1-mini', 'gpt-4o-mini', 'gpt-4o-mini-search-preview', 'gpt-5', 'gpt-5-mini', 'gpt-5.1' ), true ); // Массив стоимости из calculate_text_generation_cost $costs = [ // --- GPT-5 lineup --- 'gpt-5.1' => ['input' => 1.25 / 1000000, 'output' => 10.00 / 1000000], 'gpt-5' => ['input' => 1.25 / 1000000, 'output' => 10.00 / 1000000], 'gpt-5-mini' => ['input' => 0.25 / 1000000, 'output' => 2.00 / 1000000], // --- OpenAI GPT-4/4o/4.1 --- 'gpt-4.5-preview' => ['input' => 75.00 / 1000000, 'output' => 150.00 / 1000000], 'gpt-4o' => ['input' => 2.50 / 1000000, 'output' => 10.00 / 1000000], 'gpt-4o-mini' => ['input' => 0.15 / 1000000, 'output' => 0.60 / 1000000], // --- NEW GPT‑4.1 LINEUP --- 'gpt-4.1' => ['input' => 2.00 / 1000000, 'output' => 8.00 / 1000000], 'gpt-4.1-mini' => ['input' => 0.40 / 1000000, 'output' => 1.60 / 1000000], 'gpt-4.1-nano' => ['input' => 0.10 / 1000000, 'output' => 0.40 / 1000000], 'gpt-4o1-preview' => ['input' => 15 / 1000000, 'output' => 60 / 1000000], 'gpt-4o1-mini' => ['input' => 3 / 1000000, 'output' => 12 / 1000000], 'gpt-4o-audio-preview' => ['input' => 2.50 / 1000000, 'output' => 10.00 / 1000000], 'gpt-4o-realtime-preview' => ['input' => 5.00 / 1000000, 'output' => 20.00 / 1000000], 'gpt-4o-mini-audio-preview' => ['input' => 0.15 / 1000000, 'output' => 0.60 / 1000000], 'gpt-4o-mini-realtime-preview' => ['input' => 0.60 / 1000000, 'output' => 2.40 / 1000000], // --- Reasoning Models --- 'o1' => ['input' => 15.00 / 1000000, 'output' => 60.00 / 1000000], 'o1-preview' => ['input' => 15.00 / 1000000, 'output' => 60.00 / 1000000], 'o3' => ['input' => 2.00 / 1000000, 'output' => 8.00 / 1000000], 'o3-mini' => ['input' => 1.10 / 1000000, 'output' => 4.40 / 1000000], 'o1-mini' => ['input' => 1.10 / 1000000, 'output' => 4.40 / 1000000], 'o4-mini' => ['input' => 1.10 / 1000000, 'output' => 4.40 / 1000000], // --- Anthropic --- // New 4.x/4.5 lineup (latest aliases) 'claude-4.5-sonnet-latest' => ['input' => 3.00 / 1000000, 'output' => 15.00 / 1000000], 'claude-4-sonnet-latest' => ['input' => 3.00 / 1000000, 'output' => 15.00 / 1000000], 'claude-4.5-haiku-latest' => ['input' => 1.00 / 1000000, 'output' => 5.00 / 1000000], 'claude-4.1-opus-latest' => ['input' => 15.00 / 1000000, 'output' => 75.00 / 1000000], 'claude-4-opus-latest' => ['input' => 15.00 / 1000000, 'output' => 75.00 / 1000000], // Existing 3.x lineup 'claude-3-7-sonnet-20250219' => ['input' => 3.00 / 1000000, 'output' => 15.00 / 1000000], 'claude-3-5-sonnet-20241022' => ['input' => 3.00 / 1000000, 'output' => 15.00 / 1000000], 'claude-3-5-haiku-20241022' => ['input' => 0.80 / 1000000, 'output' => 4.00 / 1000000], 'claude-3-opus-20240229' => ['input' => 15.00 / 1000000, 'output' => 75.00 / 1000000], 'claude-3-haiku-20240307' => ['input' => 0.25 / 1000000, 'output' => 1.25 / 1000000], // --- DeepSeek --- // Conservative cache-miss input pricing; cache-hit можно учесть отдельно в калькуляторе 'deepseek-chat' => ['input' => 0.28 / 1000000, 'output' => 0.42 / 1000000], 'deepseek-reasoner' => ['input' => 0.28 / 1000000, 'output' => 0.42 / 1000000], // --- Google Gemini (Updated November 2025) --- // Gemini 3.0 (Preview - most advanced) 'gemini-3-pro-preview' => ['input' => 2.00 / 1000000, 'output' => 12.00 / 1000000], // Gemini 2.5 (Advanced) 'gemini-2.5-pro' => ['input' => 1.25 / 1000000, 'output' => 10.00 / 1000000], 'gemini-2.5-flash' => ['input' => 0.30 / 1000000, 'output' => 2.50 / 1000000], // Gemini 2.0 (Stable) 'gemini-2.0-flash' => ['input' => 0.10 / 1000000, 'output' => 0.40 / 1000000], 'gemini-2.0-flash-lite' => ['input' => 0.075 / 1000000, 'output' => 0.30 / 1000000], // --- xAI Grok (Updated November 2025) --- 'grok-4' => ['input' => 3.00 / 1000000, 'output' => 15.00 / 1000000], 'grok-4-fast-reasoning' => ['input' => 0.20 / 1000000, 'output' => 0.50 / 1000000], 'grok-4-fast-non-reasoning' => ['input' => 0.20 / 1000000, 'output' => 0.50 / 1000000], 'grok-code-fast-1' => ['input' => 0.20 / 1000000, 'output' => 1.50 / 1000000], 'grok-3' => ['input' => 3.00 / 1000000, 'output' => 15.00 / 1000000], 'grok-3-mini' => ['input' => 0.30 / 1000000, 'output' => 0.50 / 1000000], ]; // Функция форматирования стоимости для текстовых моделей function format_text_cost($model, $costs) { if (isset($costs[$model])) { $input_cost = $costs[$model]['input'] * 1000000; // Стоимость за 1M входящих токенов $output_cost = $costs[$model]['output'] * 1000000; // Стоимость за 1M исходящих токенов $article_cost = calculate_article_cost($model, $costs); // Расчет стоимости статьи return '$' . number_format($input_cost, 2) . " per 1M input tokens\n$" . number_format($output_cost, 2) . " per 1M output tokens\n**Estimated cost for a 2000-word article: $" . number_format($article_cost, 3) . "**"; } return "Cost information not available"; } // Расчет стоимости статьи на 2000 слов function calculate_article_cost($model, $costs) { $words = 2000; $tokens_per_word = 1.5; // Средний коэффициент $total_tokens = $words * $tokens_per_word; // 3000 токенов $input_tokens = $total_tokens / 2; // 1500 токенов $output_tokens = $total_tokens / 2; // 1500 токенов $input_cost = $costs[$model]['input'] * $input_tokens; // Стоимость входящих $output_cost = $costs[$model]['output'] * $output_tokens; // Стоимость исходящих return $input_cost + $output_cost; } ?>
style="display: none;" > style="display: none;" > style="display: none;" > style="display: none;" > style="display: none;" >

'; echo '
'; echo '
' . __( 'Reasoning Models', 'ai-content-wizard' ) . '
'; foreach ( $openai_reasoning_models as $key => $label ) { $checked = ( $text_model === $key ) ? 'checked' : ''; $class = ! empty( $available_models ) ? ( in_array( $key, $available_models ) ? '' : 'unavailable' ) : ''; $cost_info = format_text_cost($key, $costs); $label_text = $label; $label_markup = $label . $pro_badge; $label_classes = trim( $class . ' aiw-locked' ); echo ''; echo ''; } echo '
'; // Insert the web search toggle as a model-group here ?>
'; ?>
'; echo '
'; echo '
' . __( 'Grok 3 Generation', 'ai-content-wizard' ) . '
'; foreach ( $grok3_models as $key => $label ) { $checked = ( $text_model === $key ) ? 'checked' : ''; $cost_info = format_text_cost($key, $costs); echo ''; echo ''; } echo '
'; ?> __( 'DALL‑E (OpenAI)', 'ai-content-wizard' ), 'deepai' => __( 'DeepAI', 'ai-content-wizard' ), 'stablediffusion' => __( 'Stable Diffusion', 'ai-content-wizard' ), 'ideogram' => __( 'Ideogram', 'ai-content-wizard' ), 'gemini' => __( 'Gemini / Imagen', 'ai-content-wizard' ), ); $dalle_models = array( 'dall-e-2' => 'DALL‑E 2', 'dall-e-3' => 'DALL‑E 3', 'gpt-image-1' => 'GPT‑Image‑1', ); $deepai_models = array( 'deepai-standard' => 'DeepAI Standard', 'deepai-hd' => 'DeepAI HD', ); $stable_diffusion_models = array( 'sdxl-1-0' => 'SDXL 1.0', 'stable-diffusion-3' => 'Stable Diffusion 3', 'stable-diffusion-ultra'=> 'Stable Diffusion Ultra', ); $ideogram_models = array( 'V_1' => 'Ideogram V1', 'V_1_TURBO' => 'Ideogram V1 Turbo', 'V_2' => 'Ideogram V2', 'V_2_TURBO' => 'Ideogram V2 Turbo', 'V_2A' => 'Ideogram V2a', 'V_2A_TURBO' => 'Ideogram V2a Turbo', 'ideogram-upscale' => 'Ideogram Upscale', 'ideogram-2.0-edit' => 'Ideogram 2.0 Edit', 'ideogram-2.0-turbo-edit' => 'Ideogram 2.0 Turbo Edit', ); $gemini_image_models = array( 'gemini-3-pro-image-preview' => 'Gemini 3 Pro Image Preview 🍌', 'gemini-2.5-flash-image' => 'Gemini 2.5 Flash Image', ); $image_model_labels = array_merge( $dalle_models, $deepai_models, $stable_diffusion_models, $ideogram_models, $gemini_image_models ); $lite_image_providers = array( 'dalle' ); $lite_image_models = array( 'dall-e-2', 'dall-e-3' ); $normalized_lite_image_models = array_map( 'strtolower', $lite_image_models ); $image_provider_locked = array( 'dalle' => ! in_array( 'dalle', $lite_image_providers, true ), 'deepai' => ! in_array( 'deepai', $lite_image_providers, true ), 'stablediffusion' => ! in_array( 'stablediffusion', $lite_image_providers, true ), 'ideogram' => ! in_array( 'ideogram', $lite_image_providers, true ), 'gemini' => ! in_array( 'gemini', $lite_image_providers, true ), ); if ( ! in_array( strtolower( $image_model ), $normalized_lite_image_models, true ) ) { $image_model = 'dall-e-3'; ai_content_wizard_update_setting( 'ai_content_wizard_image_model', $image_model ); } $pro_badge = sprintf( '%s', esc_html__( 'Pro', 'ai-content-wizard' ) ); $pro_note = sprintf( '%s', esc_html__( 'Available in AI Content Wizard Pro', 'ai-content-wizard' ) ); $upgrade_cta = sprintf( '%2$s', esc_url( 'https://aiwizard.buyreadysite.com/' ), esc_html__( 'Unlock in Pro', 'ai-content-wizard' ) ); // Определяем текущего провайдера для изображений. $current_image_provider = 'dalle'; if ( stripos( $image_model, 'dall-e' ) !== false ) { $current_image_provider = 'dalle'; } elseif ( stripos( $image_model, 'deepai' ) !== false ) { $current_image_provider = 'deepai'; } elseif ( stripos( $image_model, 'stable' ) !== false || stripos( $image_model, 'sdxl' ) !== false ) { $current_image_provider = 'stablediffusion'; } elseif ( stripos( $image_model, 'ideogram' ) !== false || stripos( $image_model, 'v_' ) !== false ) { $current_image_provider = 'ideogram'; } elseif ( stripos( $image_model, 'gemini' ) !== false || stripos( $image_model, 'imagen' ) !== false ) { $current_image_provider = 'gemini'; } $image_model_labels_lower = array_change_key_case( $image_model_labels, CASE_LOWER ); $active_image_model_label = $image_model_labels[ $image_model ] ?? ( $image_model_labels_lower[ strtolower( $image_model ) ] ?? strtoupper( $image_model ) ); $active_image_provider_label = $image_provider_labels[ $current_image_provider ] ?? ucfirst( $current_image_provider ); // Функция форматирования стоимости для моделей изображений function format_image_cost($model) { $image_costs = [ 'dall-e-3' => "$0.080\n(average cost,\ndepends on resolution and quality)", 'gpt-image-1' => "$0.042\n(average cost for medium-quality images,\nLow \$0.011 • Medium \$0.042 • High \$0.17)", 'dall-e-2' => "$0.018\n(average cost,\ndepends on resolution)", 'deepai-standard' => '$0.050 per image', 'deepai-hd' => '$0.050 per image', 'sdxl-1-0' => '$0.03 per image', 'stable-diffusion-3' => '$0.04 per image', 'stable-diffusion-ultra' => '$0.08 per image', // Ideogram (legacy tooltip costs) 'v_1' => '$0.06 per image', 'v_1_turbo' => '$0.02 per image', 'v_2' => '$0.08 per image', 'v_2_turbo' => '$0.05 per image', 'v_2a' => '$0.04 per image', 'v_2a_turbo' => '$0.025 per image', 'ideogram-upscale' => '$0.06 per image', 'ideogram-2.0-edit' => '$0.08 per image', 'ideogram-2.0-turbo-edit' => '$0.05 per image', // Gemini Image Generation (as per November 2025 pricing) 'gemini-3-pro-image-preview' => '$0.134 per image (1K-2K) • $0.24 per image (4K)', 'gemini-2.5-flash-image' => '$0.039 per image', ]; return $image_costs[strtolower($model)] ?? 'Cost information not available'; } ?>
style="display: none;" > style="display: none;" > style="display: none;" > style="display: none;" > style="display: none;" >