Repository navigation
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the "MODEL_NAME" constant in both "auto_agent/constants.py" and "hitl_agent/constants.py" to be loaded from the environment variable "MODEL_NAME" with a fallback default. The feedback recommends using the "or" operator when retrieving the environment variable to ensure that empty string values also correctly fall back to the default model name.
| MODEL_NAME = "gemini-3.1-pro-preview" | ||
| import os | ||
|
|
||
| MODEL_NAME = os.environ.get("MODEL_NAME", "gemini-3.1-pro-preview") |
There was a problem hiding this comment.
If the MODEL_NAME environment variable is defined but empty (e.g., MODEL_NAME=""), os.environ.get will return the empty string instead of falling back to the default value. This can cause downstream initialization failures. Using or ensures that any falsy or empty value falls back to the default model name.
| MODEL_NAME = os.environ.get("MODEL_NAME", "gemini-3.1-pro-preview") | |
| MODEL_NAME = os.environ.get("MODEL_NAME") or "gemini-3.1-pro-preview" |
| MODEL_NAME = "gemini-3.1-pro-preview" | ||
| import os | ||
|
|
||
| MODEL_NAME = os.environ.get("MODEL_NAME", "gemini-3.1-pro-preview") |
There was a problem hiding this comment.
If the MODEL_NAME environment variable is defined but empty (e.g., MODEL_NAME=""), os.environ.get will return the empty string instead of falling back to the default value. This can cause downstream initialization failures. Using or ensures that any falsy or empty value falls back to the default model name.
| MODEL_NAME = os.environ.get("MODEL_NAME", "gemini-3.1-pro-preview") | |
| MODEL_NAME = os.environ.get("MODEL_NAME") or "gemini-3.1-pro-preview" |
Support overriding the default model name using the MODEL_NAME environment variable in auto_agent and hitl_agent.
cb1f0f6 to
cb10413
Compare
Description
Allow overriding the default model name in MaxKernel via the
MODEL_NAMEenvironment variable.Changes
maxkernel/adk/auto_agent/constants.pyto readMODEL_NAMEfromos.environ.get("MODEL_NAME", "gemini-3.1-pro-preview").maxkernel/adk/hitl_agent/constants.pyto readMODEL_NAMEfromos.environ.get("MODEL_NAME", "gemini-3.1-pro-preview").