Inclusion criteria  Willing and able to provide informed consent. Age ≥18 years at the time of consent. Histologically confirmed unresectable locally advanced or metastatic transitional cell carcinoma of the urothelium. Documented Stage IV disease (per American Joint Committee on Cancer/International Union for Cancer Control Tumor Node Metastasis (TNM) system, 7th edition) (AJCC 2012) at the start of first-line chemotherapy. Prior first-line chemotherapy consisting of at least 4 but not more than 6 cycles of gemcitabine + cisplatin and/or gemcitabine + carboplatin and/or dose-dense methotrexate, vinblastine, doxorubicin, and cisplatin (ddMVAC) with last dose received no less than 4, and no more than 10 weeks prior to date of first study treatment dose. No evidence of PD during or following first-line chemotherapy (ie, ongoing PR or SD per RECIST v1.1). At least 1 measurable lesion per RECIST v1.1 after completion of first-line chemotherapy. Willing to undergo mandatory de novo tumor biopsies at baseline and Cycle 3 in the absence of existing biopsy material without intervening therapy. Eastern Cooperative Oncology Group (ECOG) performance status of 0 or 1.  Adequate bone marrow function, including:  Absolute neutrophil count (ANC) ≥1500/mm^3 or ≥1.5 × 10^9/L; Platelets ≥100,000/mm^3 or ≥100 × 10^9/L; Hemoglobin ≥9 g/dL (may have been transfused). Adequate renal function, defined as estimated creatinine clearance ≥30 mL/min (creatinine clearance should be calculated per institutional standard).  Adequate liver function, including:  Total serum bilirubin ≤1.5 × upper limit of normal (ULN); Aspartate aminotransferase (AST) and alanine aminotransferase (ALT) ≤2.5 × ULN, or, for patients with documented metastatic disease to the liver, AST, and ALT ≤5 × ULN. Serum pregnancy test (for female of childbearing potential) negative at screening. Female patients of childbearing potential who are, in the opinion of the investigator, sexually active and at risk of pregnancy, must agree to use a highly effective method of contraception throughout the study and for at least 30 days after the last dose of assigned treatment. Willing to follow protocol-specific contraceptive guidance for the duration of the study  Exclusion Criteria:  Persisting toxicity related to prior therapy NCI-CTCAE Grade >1) at the time of enrollment; however, alopecia, sensory neuropathy Grade ≤2 is acceptable; or other grade ≤2 AEs not constituting a safety risk based on the investigator's judgment are acceptable. Prior immunotherapy with IL-2, interferon (IFN)-α, or an anti-PD-1, anti-PD-L1, anti-PD-L2, anti-CD137, or cytotoxic T-lymphocyte-associated protein-4 (CTLA-4) antibody (including ipilimumab), or any other antibody or drug specifically targeting T-cell co-stimulation or immune checkpoint pathways. Prior adjuvant or neoadjuvant systemic therapy within 12 months of enrollment. Known symptomatic central nervous system (CNS) metastases requiring steroids. Patients with previously diagnosed CNS metastases are eligible if they have completed their treatment and have recovered from the acute effects of radiation therapy or surgery prior to enrollment, have discontinued corticosteroid treatment for these metastases for at least 4 weeks, and are neurologically stable. CR to the preceding platinum-based chemotherapy for locally advanced or metastatic disease received systemic antibiotics within 2 weeks prior to first dose. Received systemic antibiotics within 2 weeks prior to first dose. Prior or concurrent malignancy whose natural history or treatment has the potential to interfere with the safety or efficacy assessment of the investigational regimen for this study. Female patients who are pregnant or breastfeeding. Allergy to amoxicillin/clavulanic acid, erythromycin, and imipenem. Known inability for oral intake of capsules. Active infection requiring systemic therapy. Known severe hypersensitivity reactions to monoclonal antibodies (Grade ≥3), any history of anaphylaxis, or uncontrolled asthma (ie, 3 or more features of asthma symptom control per the Global Initiative for Asthma 2015). Known prior or suspected hypersensitivity to study medications or any component in their formulations.  Use of immunosuppressive medication within 7 days prior to first dose of study treatment, EXCEPT the following:  Intranasal, inhaled, topical steroids, or local steroid injections (eg, intra-articular injection); System corticosteroids at physiologic doses ≤10 mg/day of prednisone or equivalent; Steroids as premedication for hypersensitivity reactions (eg, computerized tomography [CT] scan premedication). Diagnosis of prior immunodeficiency or organ transplant requiring immunosuppressive therapy. Positive test for HIV infection or known AIDS. Evidence of hepatitis B virus (HBV) or hepatitis C virus (HCV) infection at screening (positive HBV surface antigen or HCV RNA if anti-HCV antibody screening test positive). Vaccination with live vaccines within 4 weeks prior to the first dose of study treatment and while on study is prohibited except for administration of inactivated vaccines (for example, inactivated influenza vaccines). Vaccination with approved COVID-19 vaccines is permitted any time prior to and/or during the study except the days of Avelumab administration. Diagnosis of any other malignancy within 5 years prior to enrollment, except for adequately treated basal cell or squamous cell skin cancer, or carcinoma in situ of the breast or cervix, low grade (Gleason ≤6) prostate cancer on surveillance without any plans for treatment intervention (eg, surgery, radiation, or castration), or prostate cancer that has been adequately treated with prostatectomy or radiotherapy and currently with no evidence of disease or symptoms. Participating in other studies involving investigational drug(s) within 4 weeks prior to enrollment. Observational studies are permitted. Active autoimmune disease that might deteriorate when receiving an immunostimulatory agent. Patients with diabetes type I, vitiligo, psoriasis, or hypo- or hyperthyroid disease not requiring immunosuppressive treatment are eligible. Clinically significant (ie, active) cardiovascular disease: cerebral vascular accident/stroke (<6 months prior to enrollment), myocardial infarction (<6 months prior to enrollment), unstable angina, congestive heart failure (≥ New York Heart Association Classification Class II), or serious cardiac arrhythmia requiring medication. Patients who are investigational site staff members directly involved in the conduct of the study and their family members, or site staff members otherwise supervised by the investigator. Other severe acute or chronic medical conditions including but not limited to colitis, inflammatory bowel disease, pneumonitis, and pulmonary fibrosis; psychiatric condition including recent (within the past year) or active suicidal ideation or behavior; or laboratory abnormality that may increase the risk associated with study participation or study treatment administration or may interfere with the interpretation of study results and, in the judgment of the investigator, would make the patient inappropriate for entry into this study.