Inclusion Criteria:
* Age ≥18 years, able to understand the study and independently provide written informed consent for the use of relevant clinical data and planned follow-up.
* Gastric or gastroesophageal junction adenocarcinoma confirmed by diagnostic endoscopic biopsy, with no previous systemic therapy, radiotherapy, or other anticancer treatment for the current malignancy.
* Clinical stage cT3-4a, N+, M0, established using contrast-enhanced CT, endoscopy, and clinically indicated laparoscopy or peritoneal washing cytology. - Following multidisciplinary assessment, the treating team must have independently decided, before model prediction, to administer neoadjuvant chemotherapy plus immunotherapy with curative intent and subsequent assessment for curative surgery. Staging will follow the AJCC 8th edition rules appropriate to the tumor location.
* ECOG performance status 0-1, life expectancy ≥6 months, adequate ability to swallow and absorb oral medications, and suitability for the clinically planned treatment and subsequent surgical assessment.
* Adequate bone marrow function: absolute neutrophil count ≥1.5 × 10\^9/L, platelet count ≥100 × 10\^9/L, and hemoglobin ≥90 g/L. No transfusion or hematopoietic growth factor use within 14 days before enrollment solely to achieve these eligibility thresholds.
* Adequate hepatic, renal, and coagulation function: total bilirubin ≤1.5 times the upper limit of normal (ULN), ALT and AST ≤2.5 × ULN, serum creatinine ≤1.5 × ULN, and creatinine clearance \>50 mL/min calculated using the Cockcroft-Gault equation with the appropriate female correction. No clinically significant coagulation abnormality, with INR and aPTT generally ≤1.5 × ULN and suitability for the planned treatment and surgery.
* Pretreatment biopsy H\&E images and baseline contrast-enhanced CT images meeting the frozen model's prespecified input and quality requirements.
* A negative pregnancy test within 7 days before the first treatment dose for women of childbearing potential. Participants of reproductive potential and their partners must agree to effective contraception during treatment and for at least 6 months after the last dose, or longer if required by any administered drug's prescribing information. Sperm or egg donation is prohibited during this period.
* No previous inclusion in the model's training, tuning, calibration, internal validation, or external validation datasets, and ability to comply with planned visits and clinical medication requirements.
Exclusion Criteria:
* Non-adenocarcinoma histology, distant or peritoneal metastasis, positive peritoneal washing cytology, absence of curative treatment intent, or a plan for palliative or conversion therapy.
* Previous anticancer treatment for the current malignancy or previous treatment with immune checkpoint inhibitors, including PD-1, PD-L1, or CTLA-4 inhibitors. Participation in another interventional anticancer study within 4 weeks before enrollment or an incomplete washout period for another investigational drug.
* Another malignancy within the preceding 3 years, except tumors treated with curative intent and considered to have a very low recurrence risk, such as basal cell carcinoma, cutaneous squamous cell carcinoma, or carcinoma in situ, as assessed by the investigator.
* A history of severe hypersensitivity to the planned PD-1 inhibitor, oxaliplatin or other platinum compounds, S-1, capecitabine, or their excipients. Known complete dihydropyrimidine dehydrogenase deficiency, unexplained severe early-onset toxicity during previous fluoropyrimidine treatment, or another clear contraindication to the planned clinical treatment.
* Active autoimmune disease or autoimmune disease requiring systemic immunosuppression within the preceding 2 years. Stable hypothyroidism or type 1 diabetes controlled with replacement therapy, and vitiligo or localized skin disease not requiring systemic treatment, may be permitted after investigator assessment.
* Requirement for systemic immunosuppressants or corticosteroids exceeding a prednisone-equivalent dose of 10 mg/day within 14 days before the first treatment dose. Topical, inhaled, or intranasal corticosteroids, short-course antiemetic or allergy premedication, and physiological replacement therapy are permitted. Previous solid-organ transplantation or allogeneic hematopoietic stem-cell transplantation.
* Active interstitial lung disease, current pneumonitis, previous noninfectious pneumonitis requiring systemic corticosteroids, active tuberculosis, or uncontrolled infection requiring systemic treatment.
* Active viral hepatitis, defined as HBsAg positivity with HBV DNA ≥500 IU/mL, or anti-HCV positivity with detectable HCV RNA. Otherwise eligible patients with low-level HBV replication require specialist assessment, antiviral treatment when indicated, and monitoring. Known HIV infection or another significant immunodeficiency.
* Myocardial infarction, stroke, or clinically significant arterial or venous thrombosis within the preceding 6 months. Unstable angina, uncontrolled serious arrhythmia, NYHA class III-IV heart failure, uncontrolled hypertension, or another cardiovascular condition substantially increasing treatment risk.
* Gastrointestinal perforation, intra-abdominal abscess, recent severe gastrointestinal bleeding, clinically significant intestinal obstruction within the preceding 3 months, uncontrolled active ulceration, persistent diarrhea, malabsorption, or another condition preventing safe oral administration or absorption of the planned medications.
* Baseline grade ≥2 peripheral sensory neuropathy, unresolved effects of major surgery or trauma, an unhealed wound, or major surgery within 4 weeks before the first treatment dose. Minor diagnostic procedures, including diagnostic laparoscopy, are excepted.
* Receipt of a live vaccine within 28 days before the first treatment dose or planned live vaccination during treatment or the restricted period of at least 60 days after the last PD-1 inhibitor dose. Current use of drugs contraindicated with fluoropyrimidines, such as brivudine or sorivudine, or an incomplete required washout period.
* Pregnancy, breastfeeding, or inability to comply with contraception and other reproductive safety requirements.
* Inability to obtain pretreatment biopsy H\&E or baseline contrast-enhanced CT through routine care, or persistent failure of either image type to meet prespecified input quality requirements after review or retrieval of existing data. Overlap with previous model development or validation participants, refusal to participate or authorize relevant data use, or inability to independently provide written informed consent.
* Any other serious physical illness, mental condition, or adherence concern that, in the investigator's judgment, makes participation unsuitable or unsafe.