potiuk commented on PR #67355:
URL: https://github.com/apache/airflow/pull/67355#issuecomment-5148915054

   Thanks — the underlying problem is real, and pinning the model is the right 
call while tuning support is missing on the newer models. Two things before 
this can go in.
   
   **The discovery path becomes dead code.** `use_hardcoded_model` defaults to 
`True` and the only caller is `_get_actual_model(key)` at line 132, so nothing 
ever reaches the API lookup below the early return, and `key` is unused on 
every call path. Better to gate it on something operators can flip without 
editing code:
   
   ```python
   USE_HARDCODED_MODEL = os.environ.get("SYSTEM_TESTS_GEN_AI_HARDCODED_MODEL", 
"true").lower() == "true"
   ```
   
   That keeps the discovery logic live and testable, and the pin can be lifted 
by changing one env var once tuning support lands.
   
   **This needs a tracking issue.** The project requires workarounds to carry 
one, with the full URL as a comment at the workaround site so the reference 
survives the merge — see the "Tracking issues for deferred work" section in 
`AGENTS.md`. Something like:
   
   ```python
   # Newer Gemini models do not support tuning yet, so the source model is 
pinned.
   # Remove once tuning is supported; tracked at 
https://github.com/apache/airflow/issues/NNNNN
   ```
   
   Worth also double-checking that `gemini-2.5-flash-lite` is still the right 
pin — this PR has been open since May.
   
   ---
   Drafted-by: Claude Code (Opus 5); reviewed by @potiuk before posting
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to