# Example model provider config. Do not put real secrets in this file.
providers:
  routing:
    image_provider_env: PET_IMAGE_PROVIDER
    default_image_provider: openai_then_apimart
    default_image_provider_order:
      - openai
      - apimart
    supported_image_providers:
      - qwen
      - apimart
      - openai
  qwen:
    api_key_env: QWEN_API_KEY
    base_url_env: QWEN_BASE_URL
    default_model_env: QWEN_MODEL_DEFAULT
    models:
      text:
        model_env: QWEN_MODEL_TEXT
        purpose: pet_profile_cleanup_and_prompt_writing
      vision:
        model_env: QWEN_MODEL_VISION
        purpose: pet_photo_understanding_and_quality_review
      image:
        model_env: QWEN_MODEL_IMAGE
        purpose: pet_image_generation_or_image_editing
      image_edit:
        model_env: QWEN_MODEL_IMAGE_EDIT
        purpose: pet_action_pose_editing_and_identity_consistency
        status: planned_router_support
      image_fast:
        model_env: QWEN_MODEL_IMAGE_FAST
        purpose: low_cost_prompt_probe_and_direction_screening
        status: planned_router_support
      image_style:
        model_env: QWEN_MODEL_IMAGE_STYLE
        purpose: visual_style_exploration
        status: planned_router_support
      image_backup:
        model_env: QWEN_MODEL_IMAGE_BACKUP
        purpose: high_quality_backup_generation
        status: planned_router_support
      review:
        model_env: QWEN_MODEL_REVIEW
        purpose: final_pet_similarity_and_safety_review
  apimart:
    status: optional_not_default
    data_processor:
      name: APIMart
      purpose: image_generation
      requires_explicit_external_processor_consent: true
      authorization_scope:
        - canonical_pet_image_generation
        - per_frame_action_image_generation
      allowed_inputs:
        - authorized_pet_reference_images
        - generated_canonical_pet_image
        - minimal_pet_name
        - action_frame_prompts
        - generation_task_metadata
      prohibited_inputs:
        - api_keys
        - account_credentials
        - payment_data
        - full_memory_notes
        - frontend_logs
        - internal_local_paths
        - unauthorized_media
    enabled_env: APIMART_IMAGE_PROVIDER_ENABLED
    api_key_env: APIMART_API_KEY
    base_url_env: APIMART_BASE_URL
    models:
      image:
        model_env: APIMART_MODEL_IMAGE
        default: gpt-image-2
        purpose: ordinary_apimart_gpt_image_2_image_generation_probe_with_base64_reference_images
    generation:
      resolution_env: APIMART_IMAGE_RESOLUTION
      poll_interval_env: APIMART_IMAGE_POLL_INTERVAL_SECONDS
      timeout_env: APIMART_IMAGE_TIMEOUT_SECONDS
      input_reference_mode: base64_data_uri_in_image_urls
      notes:
        - ordinary_gpt_image_2_supports_url_and_base64_image_urls
        - official_gpt_image_2_channel_requires_public_stable_reference_urls
  openai:
    status: optional_not_default
    data_processor:
      name: OpenAI
      purpose: image_generation
      requires_explicit_external_processor_consent: true
      authorization_scope:
        - canonical_pet_image_generation_from_authorized_references
        - action_frame_image_editing_from_generated_canonical_pet
        - action_strip_image_editing_from_generated_canonical_pet_and_layout_guide
      allowed_inputs:
        - authorized_pet_reference_images
        - generated_canonical_pet_image
        - generated_layout_guide_image
        - minimal_pet_name
        - action_frame_prompts
        - generation_task_metadata
      prohibited_inputs:
        - api_keys
        - account_credentials
        - payment_data
        - full_memory_notes
        - frontend_logs
        - internal_local_paths
        - unauthorized_media
    enabled_env: OPENAI_IMAGE_PROVIDER_ENABLED
    api_key_env: OPENAI_API_KEY
    base_url_env: OPENAI_BASE_URL
    models:
      image:
        model_env: OPENAI_MODEL_IMAGE
        purpose: optional_pet_image_generation_probe
      image_edit:
        model_env: OPENAI_MODEL_IMAGE_EDIT
        purpose: optional_pet_action_pose_editing_probe
      review:
        model_env: OPENAI_MODEL_REVIEW
        default: gpt-4.1-mini
        purpose: direct_openai_visual_review_for_action_rows_and_contact_sheets
    generation:
      quality_env: OPENAI_IMAGE_QUALITY
      size_env: OPENAI_IMAGE_SIZE
      request_timeout_env: OPENAI_IMAGE_REQUEST_TIMEOUT_SECONDS
      max_retries_env: OPENAI_IMAGE_MAX_RETRIES
      daily_test_limit_env: OPENAI_IMAGE_DAILY_TEST_LIMIT
      endpoint_mode:
        canonical_pet: POST /images/edits
        action_frame: POST /images/edits
        action_strip: POST /images/edits
        text_only_minimal_frame: POST /images/generations
        visual_review: POST /chat/completions
