v0.9.0: Runware FLUX.1 schnell as default image provider
New Runware image backend at ~$0.0006/image (FLUX.1 schnell) — 65× cheaper than Gemini 2.5 Flash Image. Provider mirrors OpenRouter's split: interface + provider + support + pricing + batch, all under the 300-line cap. Batch class uses curl_multi for true parallel A/B dispatch — wall-clock drops to the slowest single image instead of the sum. Changes: - Add PRAutoBlogger_Runware_Image_Provider + Pricing + Support + Batch - Flip PRAUTOBLOGGER_DEFAULT_IMAGE_PROVIDER/MODEL to runware:100@1 - Add prautoblogger_runware_api_key settings field (encrypted at rest) - v0.9.0 one-time migration flips legacy default model + re-derives provider - Wire runware branch into Image_Pipeline::create_default_provider() - Add runware:100@1 and runware:101@1 to Image_Model_Registry (defaults top) - Update image prompt builder: no more anthropomorphized molecules; prefer concrete human-scale scenes (gym bros, doctors, scientists) - ARCHITECTURE.md + CHANGELOG.md updated with new integration + decision - Unit tests for pricing, support, provider; update model registry test Cost impact at 100 images/day (50 articles × A/B): - Before (Gemini via OpenRouter): $3.90/day ≈ $117/mo - After (FLUX schnell via Runware): $0.06/day ≈ $1.80/mo Net saving: ~$115/mo
This commit is contained in:
@@ -242,4 +242,29 @@ class PRAutoBlogger_Activator {
|
||||
|
||||
update_option( 'prautoblogger_migrated_run_id_meta_v081', '1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* v0.9.0 migration: flip legacy default image model to Runware schnell
|
||||
* and re-derive provider. CEO decision 2026-04-21 — 65× cheaper than
|
||||
* Gemini Nano Banana. Explicit user selections are preserved.
|
||||
*
|
||||
* Side effects: may update `prautoblogger_image_model`,
|
||||
* `prautoblogger_image_provider`, and sets the
|
||||
* `prautoblogger_migrated_default_image_v090` flag.
|
||||
*/
|
||||
public static function migrate_default_image_v090(): void {
|
||||
if ( get_option( 'prautoblogger_migrated_default_image_v090' ) ) {
|
||||
return;
|
||||
}
|
||||
$curr = (string) get_option( 'prautoblogger_image_model', '' );
|
||||
if ( in_array( $curr, [ '', 'google/gemini-2.5-flash-image' ], true ) ) {
|
||||
update_option( 'prautoblogger_image_model', 'runware:100@1' );
|
||||
}
|
||||
$final = (string) get_option( 'prautoblogger_image_model', 'runware:100@1' );
|
||||
$prov = PRAutoBlogger_Image_Model_Registry::provider_for( $final );
|
||||
if ( '' !== $prov ) {
|
||||
update_option( 'prautoblogger_image_provider', $prov );
|
||||
}
|
||||
update_option( 'prautoblogger_migrated_default_image_v090', '1' );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user