GEMINI BAD RESPONSE:
{
  "candidates": [
    {
      "content": {
        "role": "model"
      },
      "finishReason": "STOP",
      "index": 0
    }
  ],
  "usageMetadata": {
    "promptTokenCount": 172,
    "totalTokenCount": 958,
    "promptTokensDetails": [
      {
        "modality": "TEXT",
        "tokenCount": 172
      }
    ],
    "thoughtsTokenCount": 786,
    "serviceTier": "standard"
  },
  "modelVersion": "gemini-2.5-flash",
  "responseId": "ntNOauTvOrm8jrEPzv2B4Qg"
}


INVALID JSON FROM GEMINI:
{
"summary":"Demolition of a three-story multi-unit masonry residence, clearing the site for potential future redevelopment.",
"building_type":"Multi-unit Residence",
"units":0,
"estimated_job":"",
"likely_work":["Demolition", "Debris Removal", "Hauling", "Site Cleanup"],
"opportunity_score":8,
"customer_type":"Residential Developer",
"emoji":"🚧",
""call_reason":"This permit is for the wrecking and removal of a three-story multi-unit residence, indicating a demolition-only project. It offers an immediate and strong opportunity for demolition contractors, debris hauling services, dumpster companies, and equipment rental providers due to the scope of the building. For general contractors and trades involved in new construction (e.g., concrete, framing, HVAC, plumbing, electrical), the direct opportunity from this specific permit is limited as no new building work is included. However, this project is a critical precursor to future development, suggesting the site will likely be redeveloped. Contractors should track this location for subsequent new construction permits, as the cleared site presents a prime opportunity for a future build."
}

INVALID JSON FROM GEMINI:
{
"summary": "Extensive renovation and repair project for a vacant commercial/industrial powerhouse building, offering significant work for various trades.",
"building_type": "Commercial/Industrial (Utility)",
"units": 0,
""estimated_job": "Large Commercial Renovation",
"likely_work": [
"Demolition",
"Concrete Work",
"Masonry Repair",
"Structural Repair",
"Electrical Systems",
"HVAC Systems",
"Plumbing",
"Roofing",
"Framing",
"Site Work",
"Equipment Rental",
"Dumpster Services",
"Material Supply"
],
"opportunity_score": 85,
"customer_type": "Commercial Property Owner",
"emoji": "⚙️",
"call_reason": "This project involves substantial repairs and alterations to an unoccupied powerhouse building with a basement, indicating a comprehensive renovation rather than minor cosmetic work. Given its 'unoccupied' status, the project scope may be extensive without operational constraints. Opportunities are strong for general contractors, and various specialized subcontractors including concrete (especially for basement and structural repairs), electrical (critical for a powerhouse facility), HVAC, plumbing, structural framing, masonry, and roofing. Material suppliers, equipment rental companies, and demolition/hauling services will also find this a valuable lead due to the probable scale and specialized nature of the facility. Contractors with experience in industrial or utility infrastructure are particularly well-suited."
}

INVALID JSON FROM GEMINI:
{
"summary": "Comprehensive interior renovation of an existing 3-story multi-unit building, including the addition of a new dwelling unit in the basement and a new rear wood open porch. Mechanical, electrical, and plumbing systems are being updated per plans.",
"building_type": "Multifamily Residential",
"units": 3,
"estimated_job": "Major Multifamily Renovation and Unit Conversion",
"likely_work": [
"Interior Demolition",
"Framing",
"Electrical Installation/Upgrade",
"Plumbing Installation/Upgrade",
"HVAC Installation/Upgrade",
"Drywall Installation",
"Painting",
"Flooring Installation",
"Carpentry (Finish and Rough)",
"Concrete (for porch footings/slab)",
"Exterior Framing (porch)",
"Material Supply",
"Dumpster Services",
"Site Cleanup"
],
"opportunity_score": 85,
"customer_type": "Residential Investor",
"emoji": "🏗️",
""call_reason": "This project represents a significant interior renovation of an existing multi-unit building, including the creation of a new dwelling unit in the basement and construction of a new rear porch. This comprehensive scope points to strong demand for a General Contractor to manage the entire project, as well as specialized trades such as Framing, Electrical, Plumbing, and HVAC contractors for the new installations and comprehensive system updates. Significant opportunities also exist for Demolition, Concrete (for porch footings), Drywall, Painting, and Flooring contractors. The addition of a new dwelling unit indicates a valuable investment project with extensive work beyond a typical remodel, making it highly worth pursuing for multiple trades."
}

INVALID JSON FROM GEMINI:
{
"summary":"Full rebuild of an existing open wood porch at the rear of the building.",
"building_type":"Residential",
"units":0,
"estimated_job":"Unknown",
"likely_work":[
"Porch construction",
"Wood framing"
],
"opportunity_score":55,
"customer_type":"Residential Homeowner",
"emoji":"🔨",
""call_reason":"This permit describes a full rebuild project for a single existing open wood porch. Opportunity appears focused on contractors specializing in porch construction and carpentry, and is limited in scope to this specific structure."
}

INVALID JSON FROM GEMINI:
{
"summary":"Installation of a new or replacement 385-foot long wood fence.",
"building_type":"",
"units":0,
"estimated_job":"Unknown",
"likely_work":[
"Fence installation"
],
"opportunity_score":45,
"customer_type":"Residential Homeowner",
"emoji":"🚧",
""call_reason":"Residential fence installation project involving a 385-foot wood fence. This is a substantial linear footage for a fence. Opportunity appears primarily limited to fencing contractors and suppliers."
}

INVALID JSON FROM GEMINI:
{
"summary": "Revision to an existing permit for new structural, mechanical, and architectural layouts.",
"building_type": "Unknown",
"units": 0,
"estimated_job": "",
"likely_work": [
"Structural modifications",
"Mechanical system modifications",
"Architectural redesign"
],
"opportunity_score": 80,
"customer_type": "Commercial Property Owner",
"emoji": "🏗️",
""call_reason": "This permit details a significant revision encompassing new structural, mechanical, and architectural layouts for an existing project. This indicates a strong business opportunity for structural contractors, mechanical contractors, and general contractors overseeing complex alteration or renovation work."
}

INVALID JSON FROM GEMINI:
{
"summary": "New construction of a detached wood frame garage.",
"building_type": "Residential accessory structure",
"units": 0,
"estimated_job": "New construction",
"likely_work": [
"New garage construction",
"Wood framing"
],
"opportunity_score": 75,
"customer_type": "Residential Homeowner",
"emoji": "🏠",
""call_reason": "New detached wood frame garage construction project. This indicates a strong opportunity for general construction work related to building a new accessory structure from the ground up."
}

INVALID JSON FROM GEMINI:
{
"summary":"Exterior masonry restoration project involving tuckpointing, unit masonry repair, and lintel replacement for a building's front facade, porch, and stoop.",
"building_type":"Unknown",
"units":0,
"estimated_job":"",
"likely_work":[
"Tuckpointing",
"Masonry repair",
"Lintel replacement"
],
"opportunity_score":55,
"customer_type":"Unknown",
"emoji":"🧱",
""call_reason":"This permit describes a moderate masonry restoration project, including tuckpointing, unit masonry repair, and lintel replacement for the building's front wall, porch, and stoop. Opportunity appears strong for masonry contractors and material suppliers."
}

INVALID JSON FROM GEMINI:
{
"summary":"Permitted scope for a 500 sq. ft. roof replacement project.",
"building_type":"Unknown",
"units":0,
""estimated_job":"Roof replacement",
"likely_work":[
"Roof replacement"
],
"opportunity_score":45,
"customer_type":"Unknown",
"emoji":"🏠",
"call_reason":"Roof replacement project for a 500 sq. ft. area. Opportunity appears limited to roofing contractors and suppliers."
}

INVALID JSON FROM GEMINI:
{
"summary":"Replacement of an existing enclosed rear porch with a new open porch and roof for a two-unit residential building.",
"building_type":"Multi-family Residential",
"units":2,
"estimated_job":"Porch replacement and roof construction",
"likely_work":[
"Porch replacement",
"Porch roof construction",
"Demolition"
],
"opportunity_score":75,
"customer_type":"Residential Investor",
"emoji":"🏠",
""call_reason":"This permit is for an exterior renovation project on a two-dwelling unit building, involving the replacement of an existing enclosed rear porch with a new open porch and a new porch roof. The opportunity appears strong for contractors experienced in residential exterior structural work and porch construction."
}

INVALID JSON FROM GEMINI:
{
"summary":"Installation of low voltage and communication electrical systems on the 23rd floor.",
"building_type":"Commercial",
"units":0,
"estimated_job":"Unknown",
"likely_work":[
"Low voltage electrical installation",
"Communication electrical installation"
],
"opportunity_score":30,
"customer_type":"Commercial Property Owner",
"emoji":"🔌",
""call_reason":"This permit describes low voltage and communication electrical work specifically on the 23rd floor. The opportunity appears limited to contractors specializing in low voltage and communication electrical systems."
}

INVALID JSON FROM GEMINI:
{
"summary":"Elevator governor cable replacement for a passenger elevator in a 16-story building.",
"building_type":"Commercial",
"units":0,
"estimated_job":"Unknown",
"likely_work":[
"Elevator repair",
"Elevator governor cable replacement"
],
"opportunity_score":25,
"customer_type":"Commercial Property Owner",
"emoji":"⚙️",
""call_reason":"Elevator governor cable replacement project. Opportunity appears limited to specialized elevator contractors and component suppliers."
}

INVALID JSON FROM GEMINI:
{
"summary":"Major residential renovation including interior remodeling of a 1st-floor dwelling unit, replacement of an exterior wood porch, and conversion of a multi-unit building to a single unit by removing the basement dwelling unit.",
"building_type":"Multi-family Residential",
"units":1,
"estimated_job":"Unknown",
"likely_work":[
"Interior remodeling",
"Porch replacement",
"Residential conversion"
],
"opportunity_score":78,
"customer_type":"Residential Investor",
"emoji":"🏠",
""call_reason":"This permit describes a major residential renovation project, encompassing interior remodeling of a 1st-floor dwelling unit, replacement of an existing wood porch, and the conversion of a two-unit building to a single unit by removing the basement dwelling unit. The scope indicates a strong opportunity for contractors experienced in comprehensive residential renovations."
}

INVALID JSON FROM GEMINI:
{
"summary":"Installation of an internally illuminated, face-lit suspended window sign for the Just Salad commercial tenant.",
"building_type":"Commercial",
"units":0,
"estimated_job":"Sign installation",
"likely_work":[
"Sign installation"
],
"opportunity_score":15,
"customer_type":"Commercial Tenant",
"emoji":"🪧",
""call_reason":"This permit describes the installation of a specific internally illuminated window sign for a commercial tenant. Opportunity appears limited to sign fabrication and installation contractors and suppliers."
}

INVALID JSON FROM GEMINI:
{
"summary":"Permit for the temporary installation and removal of a mobile stage for the Fiesta Boricua Street Fest.",
"building_type":"Temporary Event Structure",
"units":0,
"estimated_job":"Unknown",
"likely_work":[
"Temporary stage installation",
"Temporary stage removal"
],
"opportunity_score":15,
"customer_type":"Commercial Property Owner",
"emoji":"🚧",
""call_reason":"This permit covers the temporary setup and takedown of a mobile stage for a street festival. The opportunity is highly specialized and appears very limited, primarily for event production companies or stage rental services, focusing solely on the short-term installation and removal of the mobile stage."
}

GEMINI API ERROR:
{
  "error": {
    "code": 503,
    "message": "The service is currently unavailable.",
    "status": "UNAVAILABLE"
  }
}


INVALID JSON FROM GEMINI:
{
"summary":"Residential backyard wood fence replacement.",
"building_type":"Residential",
"units":0,
"estimated_job":"Unknown",
"likely_work":[
"Fence installation"
],
"opportunity_score":25,
"customer_type":"Residential Homeowner",
"emoji":"🏡",
""call_reason":"This permit is for a residential backyard wood fence installation. The opportunity appears limited to fencing contractors and suppliers."
}

INVALID JSON FROM GEMINI:
{
"summary":"Installation of data and video communication systems on the 10th floor.",
"building_type":"Commercial",
"units":0,
"estimated_job":"Unknown",
"likely_work":[
"Low-voltage electrical work",
"Data/video installation"
],
"opportunity_score":30,
"customer_type":"Commercial Property Owner",
"emoji":"🔌",
""call_reason":"Low-voltage electrical work for data and video communication systems on the 10th floor. Opportunity appears limited to specialized low-voltage and communication contractors."
}

INVALID JSON FROM GEMINI:
{
"summary":"Installation of a roof-mounted solar panel array and an energy storage system on an accessory building.",
"building_type":"Accessory Building",
"units":0,
"estimated_job":"Moderate-sized solar installation with energy storage",
"likely_work":[
"Solar panel installation",
"Energy storage system installation"
],
"opportunity_score":65,
"customer_type":"Residential Homeowner",
"emoji":"☀️",
""call_reason":"This permit is for the installation of a roof-mounted solar panel array and a 13.5 kWh energy storage system on an accessory building. Opportunity appears strong for solar energy contractors and suppliers specializing in residential-scale energy generation and storage solutions."
}

INVALID JSON FROM GEMINI:
{
"summary":"Residential roof replacement for a single-family home and detached garage.",
"building_type":"Residential",
"units":1,
"estimated_job":"Unknown",
"likely_work":[
"Roof replacement"
],
"opportunity_score":50,
"customer_type":"Residential Homeowner",
"emoji":"🏠",
""call_reason":"Residential roof replacement project for a home and detached garage. Opportunity appears limited to roofing contractors and asphalt shingle suppliers."
}

INVALID JSON FROM GEMINI:
{
"summary":"Administrative permit for the registration of a replacement plumbing contractor.",
"building_type":"Unknown",
"units":0,
""estimated_job":"Unknown",
"likely_work":[
"Plumbing work"
],
"opportunity_score":5,
"customer_type":"Unknown",
"emoji":"\ud83d\udca7",
"call_reason":"This permit is an administrative update to register a replacement plumbing contractor for an existing project. It indicates ongoing or planned plumbing work. Direct business opportunity from *this specific permit record* is very limited as it is a contractor change, not a new construction or renovation permit."
}

GEMINI API ERROR:
{
  "error": {
    "code": 503,
    "message": "This model is currently experiencing high demand. Spikes in demand are usually temporary. Please try again later.",
    "status": "UNAVAILABLE"
  }
}


GEMINI API ERROR:
{
  "error": {
    "code": 503,
    "message": "This model is currently experiencing high demand. Spikes in demand are usually temporary. Please try again later.",
    "status": "UNAVAILABLE"
  }
}


GEMINI API ERROR:
{
  "error": {
    "code": 503,
    "message": "This model is currently experiencing high demand. Spikes in demand are usually temporary. Please try again later.",
    "status": "UNAVAILABLE"
  }
}


GEMINI API ERROR:
{
  "error": {
    "code": 503,
    "message": "This model is currently experiencing high demand. Spikes in demand are usually temporary. Please try again later.",
    "status": "UNAVAILABLE"
  }
}


INVALID JSON FROM GEMINI:
{
"summary":"Full building permit for new construction of a 2-story plus basement, two-dwelling unit building, including a detached garage with two enclosed parking spaces.",
"building_type":"Residential",
"units":2,
"estimated_job":"New construction",
"likely_work":[
"New residential construction",
"New garage construction"
],
"opportunity_score":95,
"customer_type":"Residential Developer",
"emoji":"🏗️",
""call_reason":"This is a strong opportunity for contractors involved in new residential construction. The permit is for a full building permit for a new 2-story plus basement, two-dwelling unit building, and includes a detached garage with two enclosed parking spaces. This indicates broad construction activity for a new residential development."
}

GEMINI API ERROR:
{
  "error": {
    "code": 403,
    "message": "Lightning dunning decision is deny for project: projects/635700894531",
    "status": "PERMISSION_DENIED"
  }
}


GEMINI API ERROR:
{
  "error": {
    "code": 403,
    "message": "Lightning dunning decision is deny for project: projects/635700894531",
    "status": "PERMISSION_DENIED"
  }
}


GEMINI API ERROR:
{
  "error": {
    "code": 403,
    "message": "Lightning dunning decision is deny for project: projects/635700894531",
    "status": "PERMISSION_DENIED"
  }
}


GEMINI API ERROR:
{
  "error": {
    "code": 403,
    "message": "Lightning dunning decision is deny for project: projects/635700894531",
    "status": "PERMISSION_DENIED"
  }
}


GEMINI API ERROR:
{
  "error": {
    "code": 403,
    "message": "Lightning dunning decision is deny for project: projects/635700894531",
    "status": "PERMISSION_DENIED"
  }
}


GEMINI API ERROR:
{
  "error": {
    "code": 403,
    "message": "Lightning dunning decision is deny for project: projects/635700894531",
    "status": "PERMISSION_DENIED"
  }
}


GEMINI API ERROR:
{
  "error": {
    "code": 403,
    "message": "Lightning dunning decision is deny for project: projects/635700894531",
    "status": "PERMISSION_DENIED"
  }
}


GEMINI API ERROR:
{
  "error": {
    "code": 403,
    "message": "Lightning dunning decision is deny for project: projects/635700894531",
    "status": "PERMISSION_DENIED"
  }
}


GEMINI API ERROR:
{
  "error": {
    "code": 403,
    "message": "Lightning dunning decision is deny for project: projects/635700894531",
    "status": "PERMISSION_DENIED"
  }
}


GEMINI API ERROR:
{
  "error": {
    "code": 403,
    "message": "Lightning dunning decision is deny for project: projects/635700894531",
    "status": "PERMISSION_DENIED"
  }
}


GEMINI API ERROR:
{
  "error": {
    "code": 403,
    "message": "Lightning dunning decision is deny for project: projects/635700894531",
    "status": "PERMISSION_DENIED"
  }
}


GEMINI API ERROR:
{
  "error": {
    "code": 403,
    "message": "Lightning dunning decision is deny for project: projects/635700894531",
    "status": "PERMISSION_DENIED"
  }
}


GEMINI API ERROR:
{
  "error": {
    "code": 403,
    "message": "Lightning dunning decision is deny for project: projects/635700894531",
    "status": "PERMISSION_DENIED"
  }
}


GEMINI API ERROR:
{
  "error": {
    "code": 403,
    "message": "Lightning dunning decision is deny for project: projects/635700894531",
    "status": "PERMISSION_DENIED"
  }
}


GEMINI API ERROR:
{
  "error": {
    "code": 403,
    "message": "Lightning dunning decision is deny for project: projects/635700894531",
    "status": "PERMISSION_DENIED"
  }
}


GEMINI API ERROR:
{
  "error": {
    "code": 403,
    "message": "Lightning dunning decision is deny for project: projects/635700894531",
    "status": "PERMISSION_DENIED"
  }
}


GEMINI API ERROR:
{
  "error": {
    "code": 403,
    "message": "Lightning dunning decision is deny for project: projects/635700894531",
    "status": "PERMISSION_DENIED"
  }
}


GEMINI API ERROR:
{
  "error": {
    "code": 403,
    "message": "Lightning dunning decision is deny for project: projects/635700894531",
    "status": "PERMISSION_DENIED"
  }
}


GEMINI API ERROR:
{
  "error": {
    "code": 403,
    "message": "Lightning dunning decision is deny for project: projects/635700894531",
    "status": "PERMISSION_DENIED"
  }
}


GEMINI API ERROR:
{
  "error": {
    "code": 403,
    "message": "Lightning dunning decision is deny for project: projects/635700894531",
    "status": "PERMISSION_DENIED"
  }
}


GEMINI API ERROR:
{
  "error": {
    "code": 403,
    "message": "Lightning dunning decision is deny for project: projects/635700894531",
    "status": "PERMISSION_DENIED"
  }
}


GEMINI API ERROR:
{
  "error": {
    "code": 403,
    "message": "Lightning dunning decision is deny for project: projects/635700894531",
    "status": "PERMISSION_DENIED"
  }
}


GEMINI API ERROR:
{
  "error": {
    "code": 403,
    "message": "Lightning dunning decision is deny for project: projects/635700894531",
    "status": "PERMISSION_DENIED"
  }
}


GEMINI API ERROR:
{
  "error": {
    "code": 403,
    "message": "Lightning dunning decision is deny for project: projects/635700894531",
    "status": "PERMISSION_DENIED"
  }
}


GEMINI API ERROR:
{
  "error": {
    "code": 403,
    "message": "Lightning dunning decision is deny for project: projects/635700894531",
    "status": "PERMISSION_DENIED"
  }
}


GEMINI API ERROR:
{
  "error": {
    "code": 403,
    "message": "Lightning dunning decision is deny for project: projects/635700894531",
    "status": "PERMISSION_DENIED"
  }
}


GEMINI API ERROR:
{
  "error": {
    "code": 403,
    "message": "Lightning dunning decision is deny for project: projects/635700894531",
    "status": "PERMISSION_DENIED"
  }
}


GEMINI API ERROR:
{
  "error": {
    "code": 403,
    "message": "Lightning dunning decision is deny for project: projects/635700894531",
    "status": "PERMISSION_DENIED"
  }
}


GEMINI API ERROR:
{
  "error": {
    "code": 403,
    "message": "Lightning dunning decision is deny for project: projects/635700894531",
    "status": "PERMISSION_DENIED"
  }
}


GEMINI API ERROR:
{
  "error": {
    "code": 403,
    "message": "Lightning dunning decision is deny for project: projects/635700894531",
    "status": "PERMISSION_DENIED"
  }
}


GEMINI API ERROR:
{
  "error": {
    "code": 403,
    "message": "Lightning dunning decision is deny for project: projects/635700894531",
    "status": "PERMISSION_DENIED"
  }
}


GEMINI API ERROR:
{
  "error": {
    "code": 403,
    "message": "Lightning dunning decision is deny for project: projects/635700894531",
    "status": "PERMISSION_DENIED"
  }
}


GEMINI API ERROR:
{
  "error": {
    "code": 403,
    "message": "Lightning dunning decision is deny for project: projects/635700894531",
    "status": "PERMISSION_DENIED"
  }
}


GEMINI API ERROR:
{
  "error": {
    "code": 403,
    "message": "Lightning dunning decision is deny for project: projects/635700894531",
    "status": "PERMISSION_DENIED"
  }
}


GEMINI API ERROR:
{
  "error": {
    "code": 403,
    "message": "Lightning dunning decision is deny for project: projects/635700894531",
    "status": "PERMISSION_DENIED"
  }
}


GEMINI API ERROR:
{
  "error": {
    "code": 403,
    "message": "Lightning dunning decision is deny for project: projects/635700894531",
    "status": "PERMISSION_DENIED"
  }
}


GEMINI API ERROR:
{
  "error": {
    "code": 403,
    "message": "Lightning dunning decision is deny for project: projects/635700894531",
    "status": "PERMISSION_DENIED"
  }
}


GEMINI API ERROR:
{
  "error": {
    "code": 403,
    "message": "Lightning dunning decision is deny for project: projects/635700894531",
    "status": "PERMISSION_DENIED"
  }
}


GEMINI API ERROR:
{
  "error": {
    "code": 403,
    "message": "Lightning dunning decision is deny for project: projects/635700894531",
    "status": "PERMISSION_DENIED"
  }
}


GEMINI API ERROR:
{
  "error": {
    "code": 403,
    "message": "Lightning dunning decision is deny for project: projects/635700894531",
    "status": "PERMISSION_DENIED"
  }
}


GEMINI API ERROR:
{
  "error": {
    "code": 403,
    "message": "Lightning dunning decision is deny for project: projects/635700894531",
    "status": "PERMISSION_DENIED"
  }
}


GEMINI API ERROR:
{
  "error": {
    "code": 403,
    "message": "Lightning dunning decision is deny for project: projects/635700894531",
    "status": "PERMISSION_DENIED"
  }
}


GEMINI API ERROR:
{
  "error": {
    "code": 403,
    "message": "Lightning dunning decision is deny for project: projects/635700894531",
    "status": "PERMISSION_DENIED"
  }
}


GEMINI API ERROR:
{
  "error": {
    "code": 403,
    "message": "Lightning dunning decision is deny for project: projects/635700894531",
    "status": "PERMISSION_DENIED"
  }
}


GEMINI API ERROR:
{
  "error": {
    "code": 403,
    "message": "Lightning dunning decision is deny for project: projects/635700894531",
    "status": "PERMISSION_DENIED"
  }
}


GEMINI API ERROR:
{
  "error": {
    "code": 403,
    "message": "Lightning dunning decision is deny for project: projects/635700894531",
    "status": "PERMISSION_DENIED"
  }
}


INVALID JSON FROM GEMINI:
{
"summary":"Installation of a new LED illuminated channel letter sign on a backer panel for "Hair Cuttery" on the west elevation of a commercial building.",
"building_type":"Commercial",
"units":0,
"estimated_job":"Unknown",
"likely_work":[
"Signage installation",
"LED sign installation",
"Channel letter installation",
"Backer panel installation"
],
"opportunity_score":20,
"customer_type":"Commercial Tenant",
"emoji":"💡",
"call_reason":"Commercial sign installation project for a business. The scope is limited to the installation of an LED illuminated channel letter sign and its backer panel. Opportunity appears limited to signage contractors and suppliers."
}

INVALID JSON FROM GEMINI:
{
"summary":"Construction of a new landscape pergola at the rear of an existing single-family home.",
"building_type":"Single-Family Home",
"units":0,
"estimated_job":"Unknown",
"likely_work":[
"Pergola construction"
],
"opportunity_score":25,
"customer_type":"Residential Homeowner",
"emoji":"🌳",
""call_reason":"Residential landscape pergola construction project. Opportunity appears limited to specialized contractors for outdoor structures and related material suppliers."
}

INVALID JSON FROM GEMINI:
{
"summary":"Residential project for the removal and replacement of an existing rear wood porch and stairs.",
"building_type":"Residential",
"units":0,
"estimated_job":"Porch and stairs replacement",
"likely_work":[
"Porch replacement",
"Stair construction"
],
"opportunity_score":55,
"customer_type":"Residential Homeowner",
"emoji":"🔨",
""call_reason":"This is a residential renovation project involving the removal and replacement of an existing rear wood porch and stairs. Opportunity appears strong for contractors specializing in exterior carpentry and structural repairs, and for suppliers of lumber and decking materials."
}

INVALID JSON FROM GEMINI:
{
"summary":"Electrical service upgrade and installation of new circuits, receptacles, and lighting outlets in the basement and exterior.",
"building_type":"Residential",
""units":0,
"estimated_job":"Electrical service upgrade",
"likely_work":[
"Electrical service upgrade",
"Electrical outlet installation",
"Lighting installation"
],
"opportunity_score":35,
"customer_type":"Residential Homeowner",
"emoji":"⚡",
"call_reason":"Electrical service upgrade project involving a new 100 amp service disconnecting means, 24 circuits, and installation of receptacle and lighting outlets in the basement and exterior. Opportunity appears limited to electrical contractors."
}

INVALID JSON FROM GEMINI:
{
"summary": "Installation of roof-mounted solar panels with an integrated energy storage system for a residential property.",
"building_type": "Residential",
"units": 1,
"estimated_job": "Solar panel and energy storage system installation",
"likely_work": [
"Solar panel installation",
"Energy storage system installation"
],
"opportunity_score": 75,
"customer_type": "Residential Homeowner",
"emoji": "☀️",
""call_reason": "Residential solar panel and energy storage system installation project. This permit indicates significant electrical work specific to the solar and energy storage systems, including inverter and array outputs. Opportunity appears strong for solar installation contractors, energy storage system providers, and electrical contractors specializing in renewable energy systems."
}

INVALID JSON FROM GEMINI:
{
"summary":"Demolition and removal of an existing oversized garage structure.",
"building_type":"Accessory Structure",
"units":0,
"estimated_job":"Demolition",
"likely_work":[
"Demolition",
"Debris removal"
],
"opportunity_score":45,
"customer_type":"Residential Homeowner",
"emoji":"🏗️",
""call_reason":"This is a demolition and debris removal project for an oversized garage structure. Opportunity appears limited to demolition contractors, site clearing services, and debris haul-off."
}

INVALID JSON FROM GEMINI:
{
"summary": "Demolition and removal of a two-story multi-unit residence and a detached garage.",
"building_type": "Multifamily",
""units": 0,
"estimated_job": "Demolition",
"likely_work": [
"Demolition"
],
"opportunity_score": 90,
"customer_type": "Residential Developer",
"emoji": "🏗️",
"call_reason": "This permit indicates a significant demolition project for a multi-unit residential building and a detached garage. Opportunity appears strong for demolition contractors and waste removal services."
}

GEMINI API ERROR:
{
  "error": {
    "code": 503,
    "message": "The service is currently unavailable.",
    "status": "UNAVAILABLE"
  }
}


