Skip to content

Conversation

@calebjubal
Copy link

@calebjubal calebjubal commented Nov 23, 2025

Pull-Request Template

Thank you for your contribution! Please provide a brief description of your changes and ensure you've completed the checklist below.

Description

What does this PR do?

  • Centralizes the Vertex AI API version in [default.py] via a new VERTEX_API_VERSION setting (defaulting to v1beta1).

  • Updates all Vertex/GenAI client initializations in

  • models/character_consistency.py

  • models/image_models.py

  • models/model_setup.py

  • models/upscale.py

  • models/veo.py

  • vto.py

to pass http_options={'api_version': cfg.VERTEX_API_VERSION} (or config.VERTEX_API_VERSION), merging with any existing http_options where needed.

  • Ensures all image, video, character-consistency, upscale, Veo, and VTO flows consistently use the same configured Vertex AI API version.

Why is it necessary?

  • Consistency: Previously, the Vertex AI API version was either implicit or scattered; centralizing it avoids subtle mismatches across different model entry points.

  • Configurability: The API version can now be changed via configuration/environment without code changes, simplifying upgrades and rollbacks when Vertex AI versions change.

  • Reliability: Explicitly setting the API version reduces risk of breaking changes when the default backend version changes, helping keep all media workflows (Imagen, Veo, VTO, upscaling, character consistency) behaving predictably across environments.

Fixes #913 (if applicable)

Checklist

  • Contribution Guidelines: I have read the Contribution Guidelines.
  • CLA: I have signed the CLA.
  • Authorship: I am listed as the author (if applicable).
  • Conventional Commits: My PR title and commit messages follow the Conventional Commits spec.
  • Code Format: I have run nox -s format to format the code.
  • Spelling: I have fixed any spelling errors, and added false positives to .github/actions/spelling/allow.txt if necessary.
  • Sync: My Fork is synced with the upstream.
  • Documentation: I have updated relevant documentation (if applicable) in the docs folder.
  • Template: I have followed the aaie_notebook_template.ipynb if submitting a new jupyter notebook.
  • Experiments: My code is in the experiments folder and is tested and working.

@calebjubal calebjubal requested review from a team, awaemmanuel and ghchinoy as code owners November 23, 2025 19:09
@Chaiyphopnilpat
Copy link

เทมเพลต Pull-Request

ขอขอบคุณสำหรับการสนับสนุนของคุณ! โปรดอธิบายการเปลี่ยนแปลงของคุณโดยย่อ และตรวจสอบให้แน่ใจว่าคุณได้ปฏิบัติตามรายการตรวจสอบด้านล่างนี้แล้ว

คำอธิบาย

PR นี้ทำอะไร?

  • รวมเวอร์ชัน API ของ Vertex AI ไว้ที่ [default.py] โดยใช้การตั้งค่า VERTEX_API_VERSION ใหม่ (ค่าเริ่มต้นคือ v1beta1)
  • อัปเดตการเริ่มต้นไคลเอนต์ Vertex/GenAI ทั้งหมดใน
  • models/character_consistency.py
  • models/image_models.py
  • models/model_setup.py
  • models/upscale.py
  • models/veo.py
  • vto.py

เพื่อผ่านhttp_options={'api_version': cfg.VERTEX_API_VERSION}(หรือ config.VERTEX_API_VERSION) โดยรวมกับ http_options ที่มีอยู่ตามที่จำเป็น

  • รับประกันว่ารูปภาพ วิดีโอ ความสอดคล้องของตัวละคร การอัปสเกล Veo และการไหลของ VTO จะใช้เวอร์ชัน Vertex AI API ที่กำหนดค่าเดียวกันอย่างสม่ำเสมอ

เพราะเหตุใดจึงจำเป็น?

  • ความสอดคล้อง: ก่อนหน้านี้ เวอร์ชัน API ของ Vertex AI จะเป็นแบบโดยนัยหรือกระจัดกระจาย การรวมศูนย์จะช่วยหลีกเลี่ยงความไม่ตรงกันที่ละเอียดอ่อนระหว่างจุดเข้าใช้โมเดลที่แตกต่างกัน
  • ความสามารถในการกำหนดค่า: ขณะนี้สามารถเปลี่ยนแปลงเวอร์ชัน API ได้ผ่านการกำหนดค่า/สภาพแวดล้อมโดยไม่ต้องเปลี่ยนแปลงโค้ด ทำให้การอัปเกรดและการย้อนกลับเมื่อเวอร์ชัน Vertex AI เปลี่ยนแปลงง่ายขึ้น
  • ความน่าเชื่อถือ: การตั้งค่าเวอร์ชัน API อย่างชัดเจนจะช่วยลดความเสี่ยงในการเปลี่ยนแปลงล้มเหลวเมื่อเวอร์ชันแบ็กเอนด์เริ่มต้นเปลี่ยนแปลง ช่วยให้เวิร์กโฟลว์สื่อทั้งหมด (Imagen, Veo, VTO, การอัปสเกล, ความสอดคล้องของอักขระ) ทำงานตามที่คาดเดาได้ในทุกสภาพแวดล้อม

แก้ไข #913 (ถ้ามี)

รายการตรวจสอบ

  • **แนวทางการมีส่วนร่วม:**ฉันได้อ่านแนวทางการมีส่วนร่วมแล้ว
  • **CLA:**ฉันได้ลงนามในCLAแล้ว
  • **ผู้ประพันธ์:**ฉันถูกระบุเป็นผู้เขียน (ถ้ามี)
  • **การยืนยันแบบเดิม:**ชื่อ PR และข้อความการยืนยันของฉันเป็นไปตามข้อกำหนดการยืนยันแบบเดิม
  • **รูปแบบโค้ด:**ฉันได้ดำเนินnox -s formatการจัดรูปแบบโค้ดแล้ว
  • **การสะกดคำ:**ฉันได้แก้ไขข้อผิดพลาดในการสะกดคำทั้งหมดแล้ว และเพิ่มผลบวกปลอมลงใน .github/actions/spelling/allow.txt หากจำเป็น
  • **ซิงค์:**ฟอร์กของฉันซิงค์กับอัปสตรีมแล้ว
  • **เอกสารประกอบ:**ฉันได้อัปเดตเอกสารประกอบที่เกี่ยวข้อง (ถ้ามี) ในโฟลเดอร์เอกสารแล้ว
  • **เทมเพลต:**ฉันได้ปฏิบัติตามaaie_notebook_template.ipynbif ส่ง jupyter notebook ใหม่แล้ว
  • **การทดลอง:**โค้ดของฉันอยู่ในโฟลเดอร์การทดลองและได้รับการทดสอบและใช้งานได้แล้ว

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Centralize Vertex AI API Version Configuration

2 participants